/*
 //////////////////////////////////////////////////////////////////////////////////////////////////
 // Kemper Consulting Google Maps Implementation				
 // Nick M. Jones nick@littlerobothead.com		
 // $Id: mapping.js 117 2009-08-31 22:57:15Z njones2 $										
 //////////////////////////////////////////////////////////////////////////////////////////////////
*/
function loadMap() {
	// Store lat and lng to use later
	var richmond_latlng = "37.541252, -77.441599";
	
	// Build the map if the browser is kewl...
	if (GBrowserIsCompatible()) {
	
	// by setting up the marker object..	
	function createMarker(point,html) {
		var marker = new GMarker(point);
			GEvent.addListener(marker, "click", function() {
				marker.openInfoWindowHtml(html);
			});
			return marker;
		}
		
		map = new GMap2(document.getElementById("richmondmapdiv"));
		map.setCenter(new GLatLng(37.541252, -77.441599), 15);
		map.setUIToDefault();
		
		// And creating the markers

		
     
		var point = new GLatLng(37.541252, -77.441599); // Richmond
		var marker = createMarker(point,'<div class=\"balloon\"><ul><li>12 S. 3rd St.</li><li>Richmond, VA 23219</li><li><img class=\"icon\" src=\"/assets/icons/phone.gif\">804.649.7945</li><li><img class=\"icon\" src=\"/assets/icons/fax.gif\">804.648.6261</li><li><a href="http://maps.google.com/maps?saddr=&daddr=12 S. 3rd St. Richmond, VA 23219">Get Directions</a></li></ul></div>')
		map.addOverlay(marker);
			
	} else { // Browser is not kewl
		alert("Sorry, your browser is incompatible with Google Maps.");
	}
}
function zoomTo(lat, lng, level){
	map.setCenter( new GLatLng(lat,lng), level);
}
