// Base functions for Google Map
if (GBrowserIsCompatible()) {	
	// Create marker with message
	function createMarker(point, html, icontype) {

		// Create a base icon for all of our markers that specifies the shadow, dimensions, etc.
		var baseIcon = new GIcon();
		baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
		baseIcon.iconSize = new GSize(20, 34);
		baseIcon.shadowSize = new GSize(37, 34);
		baseIcon.iconAnchor = new GPoint(9, 34);
		baseIcon.infoWindowAnchor = new GPoint(9, 2);
		baseIcon.infoShadowAnchor = new GPoint(18, 25);		
			
		var icon = new GIcon(baseIcon);

		if (icontype == "custom") {
			icon.image = "/images/icons/markers/custom.png";
			icon.shadow = "/images/icons/markers/shadow.png";
			icon.iconSize = new GSize(29, 35);
			icon.shadowSize = new GSize(46, 35);
			icon.iconAnchor = new GPoint(15, 35);
			icon.infoWindowAnchor = new GPoint(15, 2);
			icon.infoShadowAnchor = new GPoint(15, 35);		
			}
		else {
			icon.image = "/images/icons/markers/" + icontype + ".png";
			icon.iconSize = new GSize(20, 34);
			};

		var marker = new GMarker(point,icon);

		// Show this marker's address/msg in the info window when it is clicked
		GEvent.addListener(marker, "click", function() { 
			marker.openInfoWindowHtml(html); 
		});
		
		return marker;
	}	
				
	// Open the info box for the specified marker.
	function openWindowHTML(i) {
		GEvent.trigger(aLocations[i], "click");
	}
}