function load() {
if (GBrowserIsCompatible()) { 
      // A function to create the marker and set up the event window
      // Dont try to unroll this function. It has to be here for the function closure
      // Each instance of the function preserves the contends of a different instance
      // of the "marker" and "html" variables which will be needed later when the event triggers.    


       var baseIcon = new GIcon();
          baseIcon.iconSize=new GSize(32,32);
          baseIcon.shadowSize=new GSize(56,32);
          baseIcon.iconAnchor=new GPoint(16,32);
          baseIcon.infoWindowAnchor=new GPoint(16,0);

       var resto = new GIcon(baseIcon, "http://www.tourisme-coeurdelomagne.fr/images/picto-restauration.png", null, "http://maps.google.com/mapfiles/kml/pal3/icon21s.png");    
       
      function createMarker(point,html,icon) {
        var marker = new GMarker(point,icon);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }



      // 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(43.97255740289798,0.8349609375),11);

       // Set up three markers with info windows 
    
      var point = new GLatLng(43.89034650754046,0.7691985368728638);
      var marker = createMarker(point,'<div style="width:240px">Le Rison</div>', resto)
      map.addOverlay(marker);

      var point = new GLatLng(43.890532073525016,0.7695472240447998);
      var marker = createMarker(point,'<div style="width:240px">Terre et Mer / Saint-Clar Locations</div>', resto)
      map.addOverlay(marker);

      
      var point = new GLatLng(43.91038429322458,0.7574772834777832);
      var marker = createMarker(point,'<div style="width:240px">Le Rest\'O du Lac</div>', resto)
      map.addOverlay(marker);
      
      var point = new GLatLng(43.89152174901147,0.7704055309295654);
      var marker = createMarker(point,'<div style="width:240px">L\'aļoli</div>', resto)
      map.addOverlay(marker);

      var point = new GLatLng(44.03986393959389,0.8899140357971191);
      var marker = createMarker(point,'<div style="width:240px">L\'Auberge de Bardigues</div>', resto)
      map.addOverlay(marker);

      var point = new GLatLng(43.93390771197337,0.9025311470031738);
      var marker = createMarker(point,'<div style="width:240px">La Ferme de Floris</div>', resto)
      map.addOverlay(marker);

    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
}

window.onload=load;
window.onunload=GUnload; 
