//<![CDATA[
function load() {
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("westboundmap"));
			map.addControl(new GLargeMapControl());
		var lineThickness = 1;
		
		map.setCenter(new GLatLng(39.861196, -105.062761), 15, G_HYBRID_TYPE);
		
		var icon = new GIcon();
		icon.image = "images/blue.png";
		icon.shadow = "images/shadow.png";
		icon.iconSize = new GSize(12, 20);
		icon.shadowSize = new GSize(22, 20);
		icon.iconAnchor = new GPoint(6, 20);
		icon.infoWindowAnchor = new GPoint(5, 1);
	
		function getPoints() {
		points = [];
		points2 = [];
		points3 = [];
    
		points3.push(new GLatLng(39.853803, -105.051063));
		points3.push(new GLatLng(39.854530, -105.051631));
		points3.push(new GLatLng(39.856303, -105.052879));
		points3.push(new GLatLng(39.857851, -105.053517));
		points3.push(new GLatLng(39.858481, -105.053603));
		points3.push(new GLatLng(39.859355, -105.053541));
		points3.push(new GLatLng(39.859905, -105.053711));
		points3.push(new GLatLng(39.860250, -105.053993));
		points3.push(new GLatLng(39.862458, -105.055741));
		points3.push(new GLatLng(39.864215, -105.056548));
		points3.push(new GLatLng(39.864948, -105.056795));
		points3.push(new GLatLng(39.865389, -105.056266));
		points3.push(new GLatLng(39.865270, -105.055656));
		points3.push(new GLatLng(39.864883, -105.055433));
		points3.push(new GLatLng(39.864060, -105.055470));
		points3.push(new GLatLng(39.863746, -105.055764));
		points3.push(new GLatLng(39.863629, -105.056291));
		
		points3.push(new GLatLng(39.863641, -105.065823));
		points3.push(new GLatLng(39.862223, -105.065837));
		points3.push(new GLatLng(39.862246, -105.066190));
		points3.push(new GLatLng(39.862346, -105.066297));
		points3.push(new GLatLng(39.862352, -105.067381));
		points3.push(new GLatLng(39.862230, -105.067522));
		points3.push(new GLatLng(39.862251, -105.068041));
		points3.push(new GLatLng(39.862774, -105.067987));
		points3.push(new GLatLng(39.862932, -105.068190));
		points3.push(new GLatLng(39.863219, -105.067943));
		
    
		}
	
		getPoints();

		map.addOverlay(new GPolyline(points, "#00ff00"));
		map.addOverlay(new GPolyline(points2, "#00ff00"));
		map.addOverlay(new GPolyline(points3, "#00ff00"));
		
		var label = new ELabel(new GLatLng(39.861642,-105.067200), "Costco", "style2");
		map.addOverlay(label);
		
		function createInfoMarker(point, address) {
			var marker = new GMarker(point);
			GEvent.addListener(marker, "click",
				function() {
					marker.openInfoWindowHtml(address);
					}
			);
		return marker;
		}
	
		var point = new GPoint (-105.067725, 39.863203);
		var marker = new GMarker(point, icon);
		
		var point2 = new GPoint (-105.051631, 39.854530);
		var marker2 = new GMarker(point2, icon);
		GEvent.addListener(marker2, "click", function() {
			marker2.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound1.jpg' style='width:250px;height:188px;'/><br/>Take the 92<sup>nd</sup> Ave / Sheridan Blvd. Exit");
		});
		
		var point3 = new GPoint (-105.053541, 39.859355);
		var marker3 = new GMarker(point3, icon);
		GEvent.addListener(marker3, "click", function() {
			marker3.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound2.jpg' style='width:250px;height:188px;'/><br/>Continue toward 92<sup>nd</sup> Ave. West");
		});
		
		var point4 = new GPoint (-105.053993, 39.860250);
		var marker4 = new GMarker(point4, icon);
		GEvent.addListener(marker4, "click", function() {
			marker4.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound3.jpg' style='width:250px;height:188px;'/><br/>Head straight toward 92<sup>nd</sup> Ave. West");
		});
		
		var point5 = new GPoint (-105.056548, 39.864215);
		var marker5 = new GMarker(point5, icon);
		GEvent.addListener(marker5, "click", function() {
			marker5.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound5.jpg' style='width:250px;height:188px;'/><br/>Take the 92<sup>nd</sup> Ave. West Ramp");
		});
		
		var point6 = new GPoint (-105.065522, 39.863687);
		var marker6 = new GMarker(point6, icon);
		GEvent.addListener(marker6, "click", function() {
			marker6.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound8.jpg' style='width:250px;height:188px;'/><br/>Turn Left at 6400 W., heading West");
		});
		
		var point7 = new GPoint (-105.065838, 39.862233);
		var marker7 = new GMarker(point7, icon);
		GEvent.addListener(marker7, "click", function() {
			marker7.openInfoWindowHtml("<img src='http://longtermfix.com/lakearbor/images/westbound/westbound9.jpg' style='width:250px;height:188px;'/><br/>Turn Right at the Costco, heading West");
		});
		
		var point8 = new GPoint (-105.067920, 39.862242);
		var marker8 = new GMarker(point8, icon);
		GEvent.addListener(marker8, "click", function() {
			marker8.openInfoWindowHtml("Turn Right at Marshall Pl., heading North");
		});
		
		var point = new GPoint(-105.067725, 39.863203);
		
		address = "<div style='font-family: arial; tahoma, verdana; font-size: 12px;'><b>Lake Arbor Automotive &amp; Truck</b><br />9146 Marshall Pl. | Westminster, CO 80031<br />Need driving directions? <a href='http://maps.google.com/maps?f=q&hl=en&geocode=9212516815892869125,39.862870,-105.067690&time=&date=&ttype=&q=9146+Marshall+Pl,+Westminster,+Colorado+80031&sll=39.862762,-105.067298&sspn=0.003673,0.007296&ie=UTF8&ll=39.863734,-105.068071&spn=0.007346,0.014591&t=h&z=16&om=1' target='_blank'>Click Here</a>.</div>";
		
		var marker = createInfoMarker(point, address);
		map.addOverlay(marker);
		marker.openInfoWindowHtml(address);
		map.addOverlay(marker2);
		map.addOverlay(marker3);
		map.addOverlay(marker4);
		map.addOverlay(marker5);
		map.addOverlay(marker6);
		map.addOverlay(marker7);
		map.addOverlay(marker8);
			
	}
	else {
		alert("Sorry, this just isn't going to work between us.");
	}
}
//]]>
