// Class for creating Google Map displays.
function GoogleMap(elementId, domainAPIKey, x, y, zoom) {
	this.element = document.getElementById(elementId);
	this.x 			 = x;
	this.y			 = y;
	this.zoom		 = zoom;
	
	//API key stuff not used for now.	
	this.APIKeys = {
		development: 'ABQIAAAAGzb1SNZSwKRCEdBQBAnpgBRi_j0U6kJrkFvY4-OX2XYmEAa76BRv0GfKnUoamkrTrjW2eSuV8917mg',
		staging    : 'ABQIAAAAGzb1SNZSwKRCEdBQBAnpgBTzb6HFbW65ugygd-aNDvW682eCphTb1LdU6Z7a0PzV3d0xzPwQPcCUBQ',
		production : domainAPIKey 
	};
	
	// Not used for now.
	this.APIKey  = function() {
		var host = window.location.hostname;

		switch(host) {
			case '127.0.0.1':
				return this.APIKeys.development;
				break;
			default:
				return this.APIKeys.production;
		}
	};
	
	this.load		 = function() {
		if (GBrowserIsCompatible()) {

			var map   = new GMap2(document.getElementById(elementId));
			var point = new GLatLng(y,x);		
			map.addControl(new GLargeMapControl());
			map.checkResize();
			map.setCenter(point, zoom);
			map.addOverlay(new GMarker(point));
		} 		
	};
}
