    var map;
    var gdir;
    var geocoder = null;
    var addressMarker;

    function initialize() {
      if (GBrowserIsCompatible()) {   
	  
	  function createMarker (point,html) {
            var marker = new GMarker(point);
            GEvent.addListener(marker, 'click', function(){
                marker.openInfoWindowHtml(html);
            });
            return marker;
        }

	  
	  
        map = new GMap2(document.getElementById("map_canvas"));
        gdir = new GDirections(map, document.getElementById("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        GEvent.addListener(gdir, "error", handleErrors);
		map.addControl(new GLargeMapControl());
		
		
		map.enableScrollWheelZoom() 

 		map.setMapType(G_SATELLITE_MAP);
			
        map.setCenter(new GLatLng(47.397797,11.180284), 16);
			
        var point = new GLatLng(47.397797,11.180284);
        map.addOverlay(new GMarker(point));
		
		
		
		var point = new GLatLng(47.397797,11.180284);
        var marker = createMarker(point,'<div><h3>Holiday Camping Leutasch</h3><p>Familie Haslwanter<br />Reindlau 230b<br />6105 Leutasch in Tirol<br />Austria</p><p><strong>Tel.:</strong> +43 (5214) 65700<br /><strong>Fax:</strong> +43 (5214) 657030<br /><a href=http://www.holiday-camping.at>www.holiday-camping.at</a><br /><a href=mailto:info@holiday-camping.at>info@holiday-camping.at</a></p></div>');
        map.addOverlay(marker);

	

        //setDirections("", "47.397797,11.180284", "de_AT");
      }
    }
    
    function setDirections(fromAddress, toAddress, locale) {
      gdir.load("from: " + fromAddress + " to: " + toAddress,
                { "locale": locale });
    }

    function handleErrors(){
	   if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
	     alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Eingabe.");
	   else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
	     alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Eingabe.");
	   
	   else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
	     alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Eingabe.");

	//   else if (gdir.getStatus().code == G_UNAVAILABLE_ADDRESS)  <--- Doc bug... this is either not defined, or Doc is wrong
	//     alert("The geocode for the given address or the route for the given directions query cannot be returned due to legal or contractual reasons.\n Error code: " + gdir.getStatus().code);
	     
	   else if (gdir.getStatus().code == G_GEO_BAD_KEY)
	     alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Eingabe.");

	   else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
	     alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Startadresse und wählen Sie Ihr Fahrzeug aus.");
	    
	   else alert("Ihre Route konnte leider nicht berechnet werden. Bitte überprüfen Sie Ihre Eingabe.");
	   
	}

	function onGDirectionsLoad(){ 
      // Use this function to access information about the latest load()
      // results.  

      // e.g.
      // document.getElementById("getStatus").innerHTML = gdir.getStatus().code;
	  // and yada yada yada...
	}

