
    // Check to see if this browser can run the Google API

      var gmarkers = [];
      var htmls = [];
      var to_htmls = [];
      var from_htmls = [];
      var i=0;

      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);

        // The info window version with the "to here" form open
        to_htmls[i] = html + '<b>Route berechnen:</b><br><b>Hierher</b> - <a title="Von hier die Route berechnen..." href="javascript:fromhere(' + i + ')">Von hier</a>' +
           '<br>Startadresse:<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="saddr" id="saddr" value="" /><br>' +
           '<INPUT value="Start" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() + 
                  // "(" + name + ")" + 
           '"/>'
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<b>Route berechnen:</b><br><a title="Die Route hierher berechnen..." href="javascript:tohere(' + i + ')">Hierher</a> - <b>Von hier</b>' +
           '<br>Zieladresse:<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Start" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" + 
           '"/>';
        // The inactive version of the direction info
        html = html + '<br><b>Route berechnen:</b><br> <a title="Die Route hierher berechnen..." href="javascript:tohere('+i+')">Hierher</a> - <a title="Von hier die Route berechnen..." href="javascript:fromhere('+i+')">Von hier</a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        return marker;
      }

      // functions that open the directions forms
      function tohere(i) {
        gmarkers[i].openInfoWindowHtml(to_htmls[i]);
      }
      function fromhere(i) {
        gmarkers[i].openInfoWindowHtml(from_htmls[i]);
      }

      // Display the map, with some controls and set the initial location
      function load() {
      if (GBrowserIsCompatible()) {

	  var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng( 52.18243,11.67058), 12);

      // Set up markers with info windows 

      var point = new GLatLng( 52.18243,11.67058);
      var marker = createMarker(point,'NORDLAM GmbH','<table border="0" cellspacing="0" cellpadding="0"><tr><td rowspan="2" align="center" valign="top"><img src="http://www.brainworkx.de/NORDLAM/pix/NL_IMG_4335.jpg" alt="Nordlam GmbH" height="80" width="120" border="0"></td><td rowspan="2" valign="top" width="20"><div align="center"><img src="http://www.brainworkx.de/NORDLAM/pix/NL_red_pix.gif" alt="" height="210" width="1" border="0"></div></td><td align="center" valign="top"><br><img src="http://www.brainworkx.de/NORDLAM/pix/NORDLAM_Logo_RGB_120Px.gif" alt="" height="19" width="120" vspace="6" border="0"></td></tr><tr><td class="mapfooter" valign="top"><b><font size="2">Der Spezialist f&uuml;r<br></font><font size="2" face="Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif color="#71273d">Brettschichtholz</font><br><br><font size="1" face="Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif>Gasereistrasse 1<br>DE 39126 Magdeburg<br></font><p><font size="1" face="Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif>Telefon 0391 2888-100<br>Telefax 0391 2888-279<br><br><font size="1" face="Trebuchet MS", Geneva, Arial, Helvetica, SunSans-Regular, sans-serif><a title="Senden Sie uns Ihre Nachricht!" href="mailto:info@nordlam.com">info@nordlam.com</a><br><a title="Besuchen Sie unsere WebSite..." href="http://www.nordlam.com">www.nordlam.com</a></font></p></td></tr></table>')
      map.addOverlay(marker);
	  }
}

  