 //<![CDATA[

    if (GBrowserIsCompatible()) {

      var gmarkers = [];
      var htmls = [];
      var to_htmls = [];
      var from_htmls = [];
      var i=0;

     function createMarker(point,name,html) {
        var marker = new GMarker(point);

        to_htmls[i] = html + '<br>Wegbeschreibung: zu Hick Pix<\/b> - <a href="javascript:fromhere(' + i + ')">von Hick Pix<\/a>' +
           '<br>Startadresse:<form action="http://maps.google.de/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="" /><br>' +
           '<INPUT value="Wegbeschreibung" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
        from_htmls[i] = html + '<br>Wegbeschreibung: <a href="javascript:tohere(' + i + ')">zu Hick Pix<\/a> - <a>von Hick Pix<\/a>' +
           '<br>Zieladresse:<form action="http://maps.google.de/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Wegbeschreibung" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
        // The inactive version of the direction info
        html = html + '<br>Wegbeschreibung: <a href="javascript:tohere('+i+')">zu Hick Pix<\/a> - <a href="javascript:fromhere('+i+')">von Hick Pix<\/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]);
      }

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(50.002671,8.258981),16);
      map.setMapType(G_HYBRID_MAP);

      var point = new GLatLng(50.002671,8.258981);
      var marker = createMarker(point,'Hick Pix','Hick Pix<br/>Erthalstraße 1 <br/>55118 Mainz<br/>');
      map.addOverlay(marker);

    }

    //]]>
