// Get window dims before everything loads
FastInit.addOnLoad(loadGMap);

// if the map div exists on unload call GMap unload function
if (document.getElementById("map")) {	
	window.onunload=function(){
		GUnload();
	}
}

/* 

	Google Map notes:

	- GMap requires a unique key per domain for their API
	- The key gets added to the javascript API reference in the location file
	- Need Longitude and Latitude for each location, each copy of "common.js" will need these coordinates
		-http://maps.google.com/maps/geo?q=27+Church+Street,+Cambridge+MA&output=csv&key=ABQIAAAAhvtCISaRiyRbuN7WmOMMdhRuXA9IYUDRjsz6aOJRd0zqMqeVHBTLu4Fvud136vHOGscmJrVyIyyysA
	- Need a unique "get direction" URL for each copy of the location file
	
*/

function loadGMap() {
	if (document.getElementById("map")) {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			map.addControl(new GSmallMapControl());
			map.setCenter(new GLatLng(42.347220,-71.103144), 15);
			map.openInfoWindowHtml(map.getCenter(),document.getElementById('mapInfoWin').innerHTML);
		}
	}
}