if (GBrowserIsCompatible()) { 

	var map = new GMap2(document.getElementById("map"));
	map.enableScrollWheelZoom(); 
  	map.setMapType(eval(mapType));
	
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	
	// ==== It is necessary to make a setCenter call of some description before adding markers ====
	// ==== At this point we dont know the real values ====
	map.setCenter(new GLatLng(0,0),0);
	
	var gmarkers = [];
	var htmls = [];
	var i = 0;

	function myclick(i) {
		gmarkers[i].openInfoWindowHtml(htmls[i]);
	}
	
	var userIcon = new GIcon();
	userIcon.image = iconPath + "/clock_24.png";
	userIcon.shadow = iconPath + "/clock_24_s.png";
	userIcon.iconSize = new GSize(24, 24);
	userIcon.shadowSize = new GSize(37, 24);
	userIcon.iconAnchor = new GPoint(12, 12);
	userIcon.infoWindowAnchor = new GPoint(12, 12);
	
	markerOptions = { icon:userIcon };
  
	function createMarker(point,html) {
		var marker = new GMarker(point, userIcon);
		GEvent.addListener(marker, "click", function() {
		  marker.openInfoWindowHtml(html);
		});
		gmarkers[i] = marker;
		htmls[i] = html;
		i++;
		return marker;
	}
  
	// ===== Start with an empty GLatLngBounds object =====     
	var bounds = new GLatLngBounds();
	
	// Read the data from example.xml
	
	var point = new GLatLng(eventData['lat'], eventData['lng']);
	bounds.extend(point); 
	
	map.addOverlay(new GMarker(point, markerOptions)); 
	map.setZoom(map.getBoundsZoomLevel(bounds));
	map.setCenter(point);

} else {
	alert("Sorry, the Google Maps API is not compatible with this browser");
}
