  //<![CDATA[
  
    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/   
    // http://www.econym.demon.co.uk/googlemaps/
    
    // Script modifié par Grégory Oudot
    // Juracom EURL
    // http://www.juracom.com
    // Vous souhaitez utiliser Google Map pour afficher vos données : 03 84 86 00 68
  
    if (GBrowserIsCompatible()) {

	// Create our "tiny" marker icon
	var icon = new GIcon();
	icon.image = "icones/020.gif";
	icon.shadow = "icones/mm_20_shadow.png";
	icon.iconSize = new GSize(10, 17);
	icon.shadowSize = new GSize(19, 17);
	icon.iconAnchor = new GPoint(6, 20);
	icon.infoWindowAnchor = new GPoint(5, 1);
	
	// Create our "tiny" marker icon
	var icon2 = new GIcon();
	icon2.image = "icones/115.gif";
	icon2.shadow = "icones/mm_20_shadow.png";
	icon2.iconSize = new GSize(10, 17);
	icon2.shadowSize = new GSize(19, 17);
	icon2.iconAnchor = new GPoint(6, 20);
	icon2.infoWindowAnchor = new GPoint(5, 1);	

      // create the map
      var map = new GMap(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      //map.addControl(new GMapTypeControl());
      map.centerAndZoom(new GPoint(5.855885,46.604536), 2);
      //map.centerAndZoom(new GPoint(6.104536056518555,46.21509016430318), 4);
      
      // array to hold copies of the markers 
      // we cant scan map.overlays[] because the order of teh entries changes
      var gmarkers = [];
      

      // Read the data from example.xml
      var request = GXmlHttp.create();
      request.open("GET", "marker.xml", true);
      request.onreadystatechange = function() {
        if (request.readyState == 4) {
          var xmlDoc = request.responseXML;
          // 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 GPoint(lng,lat);          
            var html = GXml.value(xmlDoc.documentElement.getElementsByTagName("mess")[i]);
            var titre = markers[i].getAttribute("titre");
            var marker = new PdMarker(point,icon);
	        
	        marker.setHoverImage("icones/023.gif");
            marker.my_html = html;
   			marker.setTooltip(titre);
   			marker.setOpacity(90); 
            
            map.addOverlay(marker);

            gmarkers.push(marker);
          }
        }
         
      GEvent.addListener(map, "click", function(overlay, point) {
        if (overlay) {
          if (overlay.my_html) {
            var content = '<table border="0" width="230"><tr><td>'
            		+overlay.my_html+'</td>'
            		+'<td></td></tr></table>';

					content = content;                        
            }
            overlay.openInfoWindowHtml(content);
          }
      });   
        
      }
      request.send(null);
    
    }
    else {
      alert("Désolé, L'API Google Map n'est pas compatible avec ce navigateur");
    }

    //]]>
