// JavaScript Document

function loadMap(showWin){
	var prezoom = 16;
	infomsg = '<span style="font-family:arial;font-size:10px;">Google Maps hasn\'t quite caught up with<br /> us yet, so we\'ve redrawn the map a little bit.<br /><a href="/directions/" style="color:#990000">Click here for a printable map with directions.</a></span>';	
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("cfpMap"));
		//map.setMapType(G_SATELLITE_MAP);
		//map.setMapType(G_HYBRID_MAP);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());	
		var icon = new GIcon();			
		icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png";
		icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_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);	
		var point = new GLatLng(51.419600,-0.200509);
		//map.addOverlay(new GMarker(new GLatLng(officelat,officelong),icon));	
		//map.addOverlay(new GMarker(new GLatLng(officelat,officelong)));
		map.setCenter(new GLatLng(51.419600,-0.200509), prezoom);
		map.addOverlay(new GMarker(point),icon);
		//map.setMapType(G_HYBRID_MAP);
		var polyline = new GPolyline([
		  new GLatLng(51.419600, -0.200509),
		  new GLatLng(51.419750, -0.201309),
		  new GLatLng(51.419470, -0.201450)
		], "#ff0000", 5);
		map.addOverlay(polyline);
		if(showWin){
			map.openInfoWindowHtml(new GLatLng(51.419600,-0.200509),infomsg);		
		}
	}
}
