    if (GBrowserIsCompatible()) {

      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 +
           'Start address:<form action="http://maps.google.com/maps" method="get" />' +
           '<input type="text" name="saddr" id="saddr" value="" />' +
           '<input value="Get Directions" type="submit" />' +
           '<input type="hidden" name="daddr" value="116 Dyke Road, Brighton, BN1 3TE'+ 
                  // "(" + name + ")" + 
           '"/>';
// The inactive version of the direction info

        html = html + '<a href="javascript:tohere('+i+')"><strong>Get Directions</strong></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 

      var map = new GMap2(document.getElementById("map_canvas"));
      map.setCenter(new GLatLng(50.8312489, -0.1477108), 13);
	  map.addControl(new GLargeMapControl());
    
// Set up one markers with an info window 
    
      var point = new GLatLng(50.8312489, -0.1477108);
      var marker = createMarker(point,'Posture People','<ul><li><strong>Posture People,</strong></li> <li>116 Dyke Road, Brighton,</li> <li>BN1 3TE</li>')
      map.addOverlay(marker);
	  GEvent.trigger(marker,"click"); 
    }

// display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
