var map = null;
var geocoder = null;

function initialize(Latitude, Longitude, MapAddress) {
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map_canvas"));
		map.addControl(new GLargeMapControl());
		//map.addControl(new GMapTypeControl());
		//map.setCenter(new GLatLng(Latitude, Longitude), 13);
		if ((Latitude == '0') || (Latitude == '')){
			geocoder = new GClientGeocoder();
			showAddress(MapAddress);
		}else{
			geocoder = new GClientGeocoder();
			map.setCenter(new GLatLng(Latitude, Longitude), 14);
			var marker = new GMarker(new GLatLng(Latitude, Longitude));
			map.addOverlay(marker);
		}
		//map.addControl(new GScaleControl());
		//geocoder = new GClientGeocoder();
	}
}
function showAddress(address) {
	if (geocoder) {
		geocoder.getLatLng(address,function(point) {
			if (!point) {
			//alert(address + " not found");
			//map_canvas.style.display = 'none';
			}else{
				map.setCenter(point, 14);
				var marker = new GMarker(point);
				map.addOverlay(marker);
				//marker.openInfoWindowHtml(address);
			}
		}
	)
}
}


