//<![CDATA[	
var map;
var marker;
var MapZoomLevel;
var ZoomInLevel = 16;

function loadMap(ZoomLevel, lat, long){			
	
	MapZoomLevel = ZoomLevel==undefined?12:ZoomLevel;
	lat = lat==undefined?22.572646:lat;
	long = long==undefined?88.363895:long;
	
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("GoogleMap"));
		
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		
		map.setCenter(new GLatLng(lat, long), MapZoomLevel);
		
		var MyIcon = new GIcon(); 
		MyIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png"; 
		MyIcon.iconAnchor = new GPoint(15,10)
		MyIcon.infoWindowAnchor = new GPoint(5, 2);		
		markerOptions = { icon:MyIcon };		
		marker = new GMarker(new GLatLng(lat, long), markerOptions);		
		map.addOverlay(marker);
		map.setMapType(G_SATELLITE_MAP);
	}					
}	

function SearchMap(Location){
	var geocoder = new GClientGeocoder();
	if(Location==""){
		alert("Please enter a location name");
	}else{
		geocoder.getLocations(Location+", india", ParseSearchResponse);
	}
}
function ParseSearchResponse(geoResult)
{
	if (!geoResult || geoResult.Status.code != 200)
	{
		alert("Could not find any matched location\n\nCheck spelling and try again !!");
	 } 
	else 
	{			
		lat  = geoResult.Placemark[0].Point.coordinates[1];
		long = geoResult.Placemark[0].Point.coordinates[0];
				
		map.setCenter(new GLatLng(lat, long), ZoomInLevel);				
		
		if(marker!=null){
			map.removeOverlay(marker);
		}
		
		var MyIcon = new GIcon(); 
		MyIcon.image = "images/gMapMarker.gif"; 
		MyIcon.iconSize = new GSize(10, 10)
		MyIcon.iconAnchor = new GPoint(15,10)
		MyIcon.infoWindowAnchor = new GPoint(5, 2);		
		markerOptions = { icon:MyIcon };		
		marker = new GMarker(new GLatLng(lat, long), markerOptions);		
		map.addOverlay(marker);

	}
}
//]]>// JavaScript Document