//<![CDATA[		
	var map;
	var gdir;
	var geocoder = null;
	var addressMarker;
	
	var icon = new GIcon();
	icon.image = "http://maps.google.com/mapfiles/ms/icons/blue-dot.png";
	icon.iconSize = new GSize(32, 32);
	icon.iconAnchor = new GPoint(0, 32);
	icon.infoWindowAnchor = new GPoint(25, 1);
	
	function load() {
	  if (GBrowserIsCompatible()) {      
	    map = new GMap2(document.getElementById("map"));
		map.enableScrollWheelZoom();
		
	    gdir = new GDirections(map, document.getElementById("directions"));
	    GEvent.addListener(gdir, "load", onGDirectionsLoad);
	    GEvent.addListener(gdir, "error", handleErrors);
	
		var geocoder = new GClientGeocoder();
	    
	   	map.addControl(new GLargeMapControl());
	   	map.addControl(new GMapTypeControl());


			point = new GLatLng(51.986017,5.904958);    
			map.setCenter(point, 16);        
			var marker = new GMarker(point, icon);        
			map.addOverlay(marker);        
			marker.openInfoWindowHtml('<img src="images/chainresult_logo.png" alt="" title="" />');
			GEvent.addListener(marker, "click", function() {
		    	marker.openInfoWindowHtml('<img src="images/chainresult_logo.png" alt="" title="" />');
		  	}); 
	  }
	  
	 map.setMapType(G_HYBRID_MAP); 
	}
	    
	function setDirections(fromAddress, toAddress) {
	  gdir.load("from: " + fromAddress + " to: " + toAddress,
	            { "locale": 'nl' });
	}
	
	function handleErrors(){
	  	alert("Vul aub een correct adres in, voorbeeld:\nSonsbeekweg 4, Arnhem");
	   
	}
	
	function onGDirectionsLoad(){ 
	
	}
	
	function handleEnter(inField, e) {
	    var charCode;
	    
	    if(e && e.which){
	        charCode = e.which;
	    }else if(window.event){
	        e = window.event;
	        charCode = e.keyCode;
	    }
	
	    if(charCode == 13) {
	        plan();
	    }
	}
	
	function plan()
	{
		var from = document.getElementById('fromAddress').value;
		var to = "Chainresult Consultancy &amp; Implementatie B.V., Sonsbeekweg 4, 6814 BA Arnhem @51.986017,5.904958";
		setDirections(from, to);
	}
	
	function go()
	{
		var a = window.open('','','width=670')
		a.document.open("text/html")
		a.document.write(document.getElementById('directions').innerHTML)
		a.document.close()
		a.print()
	}
//]]>
