//Load Map
function LoadMap(){
	if (GBrowserIsCompatible()){     // Do Map if Compatible Browser only
		map = new GMap2(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
		latlng = new GLatLng(varLatitude,varLongitude) ;
		map.setCenter(latlng,parseFloat(varZoom));
		geocoder = new GClientGeocoder();

		//show marker
		latlng = new GLatLng(varLatitude,varLongitude) ;
		html = "<div id='contentArea' class='map'>RapidFire Systems<br>51 Market Square Road Suite G<br>Newnan, GA 30265<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='http://maps.google.com/maps?f=d&hl=en&saddr=&daddr=51+Market+Square+Rd,+Newnan,+Georgia+30265,+United+States&layer=&ie=UTF8&om=1&z=11' target='_blank'>Get Directions</a></div>";
		
		marker = new RapidFireMarker(latlng, html);
 	 	map.addOverlay(marker);
		
		//show marker
		latlng = new GLatLng(varLatitude2,varLongitude2) ;
		html = "<div id='contentArea' class='map'>Hartsfield-Jackson<br>Atlanta International (ATL)<br>United States</div>";

		marker = new AtlMarker(latlng, html);
 	 	map.addOverlay(marker);
		
	
	}else{
		document.getElementById("map").innerHTML = "<h1>Browser not compatible with Google Maps. Sorry...</h1>" ;
    }
}


function RapidFireMarker(point, html){
	var icon = new GIcon();
	//icon.image = "http://labs.google.com/ridefinder/images/mm_20_" + varIcon + ".png";
	icon.image = "RapidFire.png";
	//icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.iconSize = new GSize(39, 26);
	//icon.shadowSize = new GSize(22, 20);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point, icon)
	//CLICK ON MARKER
	GEvent.addListener(marker, "click", function(){
		marker.openInfoWindowHtml(html);
   	});
	return marker;
 }
 
 function AtlMarker(point, html){
	var icon = new GIcon();
	icon.image = "http://maps.google.com/mapfiles/kml/pal2/icon56.png"
	icon.iconSize = new GSize(32, 32);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	var marker = new GMarker(point, icon)
	//CLICK ON MARKER
	GEvent.addListener(marker, "click", function(){
		marker.openInfoWindowHtml(html);
   	});
	return marker;
 }
