//<![CDATA[
var map = null;
var geocoder = null;

function loadGoogle()
{
	if (GBrowserIsCompatible())
	{
		var location = new GLatLng(51.439136,5.48707);
	
		map = new GMap2(document.getElementById("google-maps"));
		map.addControl(new GLargeMapControl());
		map.setCenter(location, 14);
		map.setMapType(G_NORMAL_MAP);
		
		var icon = new GIcon();
		icon.image = "/data/static/images/google/marker.png";
		icon.shadow = "/data/static/images/google/shadow.png";
		icon.iconSize = new GSize(20, 34);
		icon.shadowSize = new GSize(37, 34);
		icon.iconAnchor = new GPoint(6, 20);
		icon.infoWindowAnchor = new GPoint(5, 1);

		var html = '<div class="google-maps">' +
				'<span class="title">Schakenraad Advocaten</span><br />' +
				'<span class="address">Nachtegaallaan 10-12<br />5611 CV Eindhoven</span><br />' +
				'<span class="explain">Vul hier uw adres in voor een routebeschrijving</span><br />' +
				'<form action="http://maps.google.nl/maps" method="get" target="_blank" style="margin:">' +
					'<input type="text" size="20" maxlength="40" name="saddr" id="saddr" value="" />' +
					'<input value="Plan route" type="submit" class="button" />' +
					'<input type="hidden" name="daddr" id="daddr" value="' + location + '" />' +
				'</form>' +
			'</div>';
		
		var marker = new GMarker(location, {"title":"Schakenraad Advocaten", "icon": icon});
		
		GEvent.addListener(marker, "click", function()
			{
				marker.openInfoWindowHtml(html);
			});
			
		map.addOverlay(marker);
		
		marker.openInfoWindowHtml(html);
		
	}
}
//]]>

/* load map on page load */
addLoadEvent(loadGoogle);
