    if (GBrowserIsCompatible()) {
      var map = null;
	  var geocoder = null;
      var gmarkers = [];
      var htmls = [];
	  var to_htmls = [];
      var from_htmls = [];

	  // nouvel icon
	var icon = new GIcon();
   icon.image = "Icon.png";
   icon.iconSize = new GSize(20, 16);
   icon.iconAnchor = new GPoint(10, 10);
   icon.infoWindowAnchor = new GPoint(10, 10);
   
   
	
	  // A function to create the marker and set up the event window
      function createMarker(point,name,html,icontype) {
        var marker = new GMarker(point,icon);
        var i = gmarkers.length;

        // The info window version with the "to here" form open
        to_htmls[i] = html + '<br><b>Itin&eacute;raire:<\/b>' +
           '<br>Adresse de d&eacute;part :<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="" /><br>' +
           '<INPUT value="Calculer" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() + 
                  // "(" + name + ")" + 
           '"/>';
         // The inactive version the direction info
        html = html + '<br><a href="javascript:tohere('+i+')">Calculer votre itin&eacute;raire<\/a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
		  
        });
        gmarkers.push(marker);
        htmls[i] = html;
        return marker;
      }
      // This function picks up the click and opens the corresponding info window
      function myclick(i) {
        gmarkers[i].openInfoWindowHtml(htmls[i]);
      }

      // functions that open the directions forms
      function tohere(i) {
        gmarkers[i].openInfoWindowHtml(to_htmls[i]);
      }
      function fromhere(i) {
        gmarkers[i].openInfoWindowHtml(from_htmls[i]);
      }


      // create the map
      var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(46.9796267, 2.3150047), 5);
        map.addControl(new GSmallMapControl());
		map.setMapType(G_NORMAL_MAP);
		map.enableScrollWheelZoom();
		geocoder = new GClientGeocoder();
		geocoder.setBaseCountryCode('fr');

		function afficherAdresse(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " introuvable");
            } else {
              map.setCenter(point, 11);
              var marker = new GMarker(point,icon_search);
              map.addOverlay(marker);
                       }
          }
        );
      }
    }

      // Read the data from h1.xml
      var request = GXmlHttp.create();
      request.open("GET", "h1.xml", true);
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          var xmlDoc = GXml.parse(request.responseText);
          // obtain the array of markers and loop through it
          var markers = xmlDoc.documentElement.getElementsByTagName("marker");
          
          for (var i = 0; i < markers.length; i++) {
            // obtain the attribues of each marker
            var lat = parseFloat(markers[i].getAttribute("lat"));
            var lng = parseFloat(markers[i].getAttribute("lng"));
            var point = new GLatLng(lat,lng);
            var html = markers[i].getAttribute("html");
            var label = markers[i].getAttribute("label");
            // === read the icontype attribute ===
            var icontype = markers[i].getAttribute("icon");
            // === create the marker, passing the icontype string ===
            var marker = createMarker(point,label,html,icon);
            map.addOverlay(marker);
          }
          // put the assembled side_bar_html contents into the side_bar div
          document.getElementById("side_bar").innerHTML = side_bar_html;
        }
      }
      request.send(null);
	  
	}


    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
