    
	
    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. 
	     
	  String.prototype.startsWith = function(s) { return this.indexOf(s)==0; }

	  function isValidURL(url){ 
      var RegExp = /^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; 
      if(RegExp.test(url)){ 
        return true; 
        }else{ 
        return false; 
        } 
      } 
	  
	  function isValidEmail(email){ 
      var RegExp = /^((([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+(\.([a-z]|[0-9]|!|#|$|%|&|'|\*|\+|\-|\/|=|\?|\^|_|`|\{|\||\}|~)+)*)@((((([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.))*([a-z]|[0-9])([a-z]|[0-9]|\-){0,61}([a-z]|[0-9])\.)[\w]{2,4}|(((([0-9]){1,3}\.){3}([0-9]){1,3}))|(\[((([0-9]){1,3}\.){3}([0-9]){1,3})\])))$/ 
      if(RegExp.test(email)){ 
        return true; 
        }else{ 
        return false; 
        } 
      } 

	

      function createMarker(point,id,nom,adresse,siteweb,image,nch,prix,repas,email,nclic) 
	  {
	  var marker = new GMarker(point, {icon:baseIcon, title:nom} );  
	  if ( !image.startsWith("http:") )
	    image = "vignettes/" + image; 
	    
	  var html = '<p class="v_nom">' + nom;
	  html += '<span class="v_desc"> ( ' + nclic + ' visites )</span></p>';
	  if ( isValidURL(siteweb) )
	    {
		html += '<form name="visite" action="visiter.php" target="_blank" >';
		html += '<input name="id" type="hidden" value="' + id +'" />';
		html += '<input name="siteweb" type="submit" value="' + siteweb + '" />';
		html += '</form>';
		/*
	    html += '<a href="' + siteweb + '" target="_blank" onClick="javascript:clicTracker('+id+');" ><img src="../images/Site_Internet.gif" title="visiter le site web" width="114" height="23" align="middle" border="0" /></a>';   
	    html += ' ( ' + nclic + ' visites )';
		*/
		}

	  html += '<p class="v_desc">' + adresse + '<br/>';
	  html += '<b>' + nch + '</b> chambre';
	  if ( nch != "1" ) html += "s";
	  s = prix.toString();
	  if ( s.substr(0,2) != 'de' )
	  	html += ' à';
	  html += ' <b>' + prix + '</b><br>';
	  html += "table d'hôtes : <b>" + repas + "</b></p>";
	  html += '<table width="240" height="180" border="3"><tr><td>';
	  html += '<img src="' + image + '" width="240" height="180" border="0" >';
	  html += '</td></tr></table>';
	  
	  if ( dovalid == "oui" )
	  	{
		html += '<form method="get" action="placenew.php"> <input name="valid" type="hidden" value="';
		html += id;
		html += '"><input name="valider" type="submit" value="valider"></form>'
		}
	  
	  
	  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"),{ size: new GSize(800,600) } );
      map.setCenter(new GLatLng(43.0210144,2.3933071), 9);
	  map.setUIToDefault();
	  
	  var minMapScale = 9; 
      var maxMapScale = 15; 
      // get array of map types 
      var mapTypes = map.getMapTypes(); 
      // overwrite the getMinimumResolution() and getMaximumResolution() methods for each map type 
      for (var i=0; i<mapTypes.length; i++) { 
      mapTypes[i].getMinimumResolution = function() {return minMapScale;} 
      mapTypes[i].getMaximumResolution = function() {return maxMapScale;} 
      }
	
	  // Create a base icon for all of our markers that specifies the
      // shadow, icon dimensions, etc.
      /* var baseIcon = new GIcon(G_DEFAULT_ICON);
      baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
      baseIcon.iconSize = new GSize(20, 34);
      baseIcon.shadowSize = new GSize(37, 34);
      baseIcon.iconAnchor = new GPoint(9, 34);
      baseIcon.infoWindowAnchor = new GPoint(9, 2); */
	  
	  /****** pour le jour ou je mettrai des pins
	  var baseIcon = new GIcon();
	  var iconFile = "img/pin.png";
		
      baseIcon.image = iconFile;
	  baseIcon.iconSize = new GSize(21, 21);
	  baseIcon.iconAnchor = new GPoint(0,0);
      baseIcon.infoWindowAnchor = new GPoint(0,0);
      ****/
      
      var baseIcon = new GIcon();
	  var iconFile = "img/house.png";
		
      baseIcon.image = iconFile;
	  baseIcon.iconSize = new GSize(21, 21);
	  baseIcon.iconAnchor = new GPoint(10,21);
      baseIcon.infoWindowAnchor = new GPoint(10,0);
	  
      // Set up  markers with info windows 

	  var markerCluster = new MarkerClusterer(map,null); 
	
    var furl = xmlurl + furl;
	GetXmlData(furl,0);
	
	
     
    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    
