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 camping = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal3/icon23.png", null, "http://maps.google.com/mapfiles/kml/pal3/icon23s.png");
var logis = new GIcon(baseIcon, "http://www.valdegerstourisme.fr/images/logis.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.463136527413724,0.580902099609375), 12);
    
      

// Set up three markers with info windows           

   

var point2 = new GLatLng(43.43983281708327, 0.5776834487915039);
var marker = createMarker(point2,"<h5>Hôtel Restaurant La Grange</h5><br />32140 Masseube<br />Tél : 05 62 66 14 54</p>", camping)
map.addOverlay(marker);      

var point3 = new GLatLng(43.485216915325196, 0.5890130996704102); 
var marker = createMarker(point3,"<h5>Hôtel des Pyrénées</h5><p>32260 Seissan<br />Tél : 05 62 66 20 35</p>", camping)
map.addOverlay(marker);
    
var point4 = new GLatLng(43.49222227452263, 0.5949139595031738);      
var marker = createMarker(point4,"<h5>Hôtel Restaurant Samaran</h5><br/>32260 Seissan<br />Tél : 05 62 66 20 32<br /><a href=http://www.hotel-samaran.fr>www.hotel-samaran.fr</a></p>", logis)
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;
