//<![CDATA[
    if (GBrowserIsCompatible()) {
	  var gicons = [];
      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 "Naar hier" form open
        to_htmls[i] = html + '<br>Route: <b>Naar hier<\/b> - <a href="javascript:fromhere(' + i + ')">Van hier<\/a>' +
           '<br>Startpunt: <span class="advice">(vb. Kwatrechtsteenweg, Wetteren)</span><form action="http:\/\/maps.google.com\/maps" method="get" target="_blank">' +
           '<input type="text" size="35" maxlength="40" name="saddr" id="saddr" value="" \/><br \/>' +
           '<input value="Toon route" type="submit" \/>' +
           '<input type="hidden" name="daddr" value="Daknam-dorp 34, Lokeren, Belgium" \/>';
        // The info window version with the "Van hier" form open
        from_htmls[i] = html + '<br \/>Directions: <a href="javascript:tohere(' + i + ')">Naar hier<\/a> - <b>Van hier<\/b>' +
           '<br>Eindpunt: <span class="advice">(vb. Kwatrechtsteenweg, Wetteren)</span><form action="http:\/\/maps.google.com\/maps" method="get"" target="_blank">' +
           '<input type="text" size="35" maxlength="40" name="daddr" id="daddr" value="" \/><br \/>' +
           '<input value="Toon route" type="submit" \/>' +
           '<input type="hidden" name="saddr" value="Daknam-dorp 34, Lokeren, Belgium" \/>';
        // The inactive version of the direction info
        html = html + '<br \/>Route: <a href="javascript:tohere('+i+')">Naar hier<\/a> - <a href="javascript:fromhere('+i+')">Van hier<\/a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });

        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        //return marker;
		map.addOverlay(marker);
	    marker.openInfoWindowHtml(html);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
      }

      // 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 
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(51.126071,3.980935), 10);
      // Set up markers with info windows 
      var point = new GLatLng(51.126071,3.980935);
      var marker = createMarker(point,'Tiecelijn','<h3 class="sIFR-ignore">Tiecelijn<\/h3>Daknam-dorp 34<br \/>9160 Lokeren<br \/>Belgium<br \/>+32 (0)9 348 00 59');
    }
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
    //]]>
