    //<![CDATA[

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

    function load() {
      if (GBrowserIsCompatible()) {      
        map = new GMap2(document.getElementById("map"));

        gdir = new GDirections(map, document.getElementById("directions"));
        GEvent.addListener(gdir, "load", onGDirectionsLoad);
        GEvent.addListener(gdir, "error", handleErrors);
        var crossLayer = new GTileLayer(new GCopyrightCollection(""), 0, 15);
        crossLayer.getTileUrl =  function(tile, zoom) {
          return "./include/tile_crosshairs.png";
        }
        crossLayer.isPng = function() {return true;}
        var layerTerCross = [ G_PHYSICAL_MAP.getTileLayers()[0],
                              crossLayer ];
        var mtTerCross = new GMapType(layerTerCross,
                                      G_PHYSICAL_MAP.getProjection(), "Ter+");

        //setDirections("San Francisco", "Mountain View", "en_US");
        map.setCenter(new GLatLng(52.885770,11.7459970), 15);
	  var point = new GLatLng(52.885670,11.7437970);
      var marker = createMarker(point,'<h4 style="margin:5px; color:#000; font-size:1.1em; text-align:left; width:210px;">Bahnhof Seehausen</h4><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:210px;">Mit dem Zug ins Studio?</p><a href="http://reiseauskunft.bahn.de/bin/query.exe/dn?searchMode=ADVANCED&S=&start=1&Z=Seehausen%20%28Altmark%29%20Bahnhof&timesel=depart"><img src="http://www.bahn.de/p/view/mdb/pv/dbreisetou/reiseausku/MDB51096-anreise_regio_140x56.gif" alt="www.bahn.de Anreisebutton" title="www.bahn.de Anreiseplanung"></a><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:250px;">externer Link zur Bahnauskunft</p>')
      map.addOverlay(marker);
	  var point = new GLatLng(52.885580,11.7443970);
      var marker = createMarker(point,'<h4 style="margin-left:5px; color:#000; font-size:1.1em; text-align:left; width:210px;">Bushaltestelle Seehausen Bahnhof</h4><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:210px;">Mit dem Bus ins Studio?</p><a href="http://www.nasa.de/delfi52/query.exe/dn?REQ0JourneyStopsSID=&REQ0JourneyStopsZID=A=2@O=39615 Seehausen (Altmark), Bahnstraße 28@X=11745827@Y=52885553@U=103@a=144@B=1@V=12.9,@&REQ0JourneyDate=&REQ0JourneyTime=&REQ0HafasSearchForw=1&externalCall=yes"><img src="http://www.nasa.de/img52/d/insa4.gif" alt="HAFAS Routenplaner - Link (mit Vorbelegung)" title="www.nasa.de Anreiseplanung"></a><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:250px;">externer Link zur Bus-Fahrplanauskunft</p>')
      map.addOverlay(marker);
	  var point = new GLatLng(52.885770,11.7459970);
      var marker = createMarker(point,'<img src="/wp-content/themes/cms/images/studio-klein.jpg" width=150 height=89><h4 style="margin-left:5px; color:#000; font-size:1.1em; text-align:left; width:210px;">Fitness Gym Seehausen</h4><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:180px;">Bahnstr. 28a<br>39615 Seehausen/Altmark<br>Telefon: +4939386/79979</p><p style="margin-left:5px; color:#000; font-size:0.8em; text-align:left; width:210px;">&Ouml;ffnungszeiten:<br>Montag - Freitag:<br>09:30 - 22:00<br>Samstag: 13:00 - 18:00</p>')
      map.addOverlay(marker);

        map.addControl(new GSmallMapControl())

        var mapControl = new GHierarchicalMapTypeControl();
        
        // Set up map type menu relationships
        mapControl.clearRelationships();
        mapControl.addRelationship(G_SATELLITE_MAP, G_HYBRID_MAP, "Labels", false);
        mapControl.addRelationship(G_PHYSICAL_MAP, mtTerCross, "Crosshairs");
  
        // Add control after you've specified the relationships
        map.addControl(mapControl);
      }
    }
    
    function setDirections(fromAddress, toAddress, locale) {
      gdir.load("from: " + fromAddress + " to: " + toAddress,
                { "locale": "de" });
    }

      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        // The new marker "mouseover" listener        
        GEvent.addListener(marker,"mouseover", function() {
          marker.openInfoWindowHtml(html);
        }); 
        return marker;
      }

    
    function showAddress(address, popUpHtml) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " nicht gefunden");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(popUpHtml);
            }
          }
        );
      }
    }

    function handleErrors(){
	   if (gdir.getStatus().code == G_GEO_UNKNOWN_ADDRESS)
	     alert("Start- oder auch Zieladresse konnten nicht gefunden werden. Entweder sind sie nicht bekannt, nicht eindeutig oder die Eingabe ist nicht korrekt. Bitte überprüfen Sie die Eingabe.\nError code: " + gdir.getStatus().code);
	   else if (gdir.getStatus().code == G_GEO_SERVER_ERROR)
	     alert("Die Route konnte nicht berechnet werden.\n Error code: " + gdir.getStatus().code);
	   
	   else if (gdir.getStatus().code == G_GEO_MISSING_QUERY)
	     alert("Bitte geben Sie eine Startadresse ein.\n Error code: " + gdir.getStatus().code);

	//   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("Falscher Google Maps Key. \n Error code: " + gdir.getStatus().code);

	   else if (gdir.getStatus().code == G_GEO_BAD_REQUEST)
	     alert("Die Anfrage konnte nicht geparsed werden.\n Error code: " + gdir.getStatus().code);
	    
	   else alert("Unbekannter Fehler. Bitte überprüfen Sie die 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...
	}


    //]]>