// Direct Cars - Google Maps Javascript

	function initialize() {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map_canvas"));
			map.setCenter(new GLatLng(53.323491, -1.310463), 12);
			map.setUIToDefault();
			
			map.hideControls();
			GEvent.addListener(map, "mouseover", function(){map.showControls();});
			GEvent.addListener(map, "mouseout", function(){map.hideControls();}); 
			
			var directIcon = new GIcon(G_DEFAULT_ICON);
			directIcon.image = "../../styles/default/img/googlemap/direct_cars_arrow.png";
			directIcon.shadow = "";
			directIcon.iconSize = new GSize(154, 30);
			directIcon.iconAnchor = new GPoint(10, 13);

			
			markerOptions = { icon:directIcon };
			
			var point = new GLatLng(53.334411, -1.343561);
			map.addOverlay(new GMarker(point, markerOptions));
		}
	}
	
	// This adds an onload and onunload attribute to the <body> tag.
	
	function addLoadEvent(func) {
	  var oldonload = window.onload;
	  if (typeof window.onload != 'function') {
		window.onload = func;
	  } else {
		window.onload = function() {
		  if (oldonload) {
			oldonload();
		  }
		  func();
		}
	  }
	}
	
	addLoadEvent(initialize);
	
	// arrange for our onunload handler to 'listen' for onunload events
	if (window.attachEvent) {
			window.attachEvent("onunload", function() {
					GUnload();      // Internet Explorer
			});
	} else {
			window.addEventListener("unload", function() {
					GUnload(); // Firefox and standard browsers
			}, false);
	}

