    var baseIcon = new GIcon();
		  baseIcon.iconSize=new GSize(32,32);
			baseIcon.shadowSize=new GSize(32,32);
			baseIcon.iconAnchor=new GPoint(16,32);
			baseIcon.infoWindowAnchor=new GPoint(16,0);
   
		var iconODT = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon2.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon10.png");


    var iconBlue = new GIcon(); 
    iconBlue.image = 'http://maps.google.com/mapfiles/kml/pal2/icon2.png';
    iconBlue.shadow = 'http://maps.google.com/mapfiles/kml/pal2/icon10.png';
//    iconBlue.image = 'http://labs.google.com/ridefinder/images/mm_20_blue.png';
//    iconBlue.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconBlue.iconSize = new GSize(16, 16);
    iconBlue.shadowSize = new GSize(16, 16);
    iconBlue.iconAnchor = new GPoint(8, 16);
    iconBlue.infoWindowAnchor = new GPoint(5,1);

    var iconRed = new GIcon(); 
    iconRed.image = 'http://labs.google.com/ridefinder/images/mm_20_red.png';
    iconRed.shadow = 'http://labs.google.com/ridefinder/images/mm_20_shadow.png';
    iconRed.iconSize = new GSize(12, 20);
    iconRed.shadowSize = new GSize(22, 20);
    iconRed.iconAnchor = new GPoint(6, 20);
    iconRed.infoWindowAnchor = new GPoint(5, 1);

    var customIcons = [];
    customIcons["restaurant"] = iconBlue;
    customIcons["bar"] = iconRed;

////////////////////////////    
//////////////////////////// Fonction automatique recherche de la ville
////////////////////////////

      function showAddress() {
        var search = document.getElementById("search").value;
        // ====== Perform the Geocoding ======        
        geo.getLocations(search, function (result)
          {
            map.clearOverlays(); 
            if (result.Status.code == G_GEO_SUCCESS) {
              // ===== If there was more than one result, "ask did you mean" on them all =====
              if (result.Placemark.length > 1) { 
                document.getElementById("message").innerHTML = "Did you mean:";
                // Loop through the results
                for (var i=0; i<result.Placemark.length; i++) {
                  var p = result.Placemark[i].Point.coordinates;
                  document.getElementById("message").innerHTML += "<br>"+(i+1)+": <a href='javascript:place(" +p[1]+","+p[0]+")'>"+ result.Placemark[i].address+"<\/a>";
                }
              }
              // ===== If there was a single marker, is the returned address significantly different =====
              else {
                document.getElementById("message").innerHTML = "";
                if (different(search, result.Placemark[0].address)) {
                  document.getElementById("message").innerHTML = "Did you mean: ";
                  var p = result.Placemark[0].Point.coordinates;
                  document.getElementById("message").innerHTML += "<a href='javascript:place(" +p[1]+","+p[0]+")'>"+ result.Placemark[0].address+"<\/a>";
                } else {
                  var p = result.Placemark[0].Point.coordinates;
                  place(p[1],p[0]);
                  document.getElementById("message").innerHTML = "Located: "+result.Placemark[0].address;
                }
              }
            }
            // ====== Decode the error status ======
            else {
              var reason="Code "+result.Status.code;
              if (reasons[result.Status.code]) {
                reason = reasons[result.Status.code]
              } 
              alert('Could not find "'+search+ '" ' + reason);
            }
          }
        );
      }
      
////////////////////////////    
//////////////////////////// Fonction automatique recherche de la ville
////////////////////////////
     
    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_google"));
        //map.addControl(new GSmallMapControl());
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        map.setCenter(new GLatLng(46.9284620, 1.7753220), 6);
        

        GDownloadUrl("http://www.iziloo.com/odotoo.xml", function(data) {
          var xml = GXml.parse(data);
          var markers = xml.documentElement.getElementsByTagName("odt");
          for (var i = 0; i < markers.length; i++) {
            var societe = markers[i].getAttribute("societe");
            var adresse1 = markers[i].getAttribute("adresse1");
            var codpos = markers[i].getAttribute("codpos");
            var ville = markers[i].getAttribute("ville");
            var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),
                                    parseFloat(markers[i].getAttribute("lng")));
            var marker = createMarker(iconODT, point, societe, adresse1, codpos, ville);
            map.addOverlay(marker);
          }
        });
      }
    }

    function createMarker(myIcon, point, societe, adresse1, codpos, ville) {
      var marker = new GMarker(point, {icon: myIcon, title: codpos+" "+ville});
      var html = "<b>" + societe + "</b> <br/>" + adresse1 + "<br/>" + codpos + " " + ville;
      GEvent.addListener(marker, 'click', function() {
        marker.openInfoWindowHtml(html);
      // Affichage du details
      if (societe) {
				document.getElementById("odt_head").innerHTML = societe;
				document.getElementById("odt_head").style.display = "block";
			} else {
				document.getElementById("odt_head").style.display = "none";
			}
			if (adresse1) {
				document.getElementById("odt_description").innerHTML = adresse1 +"<br/>" + codpos + " " + ville;
				document.getElementById("odt_description").style.display = "block";
			} else {
				document.getElementById("odt_description").style.display = "none";
			}
				document.getElementById("details_odt").style.display = "block";
				document.getElementById("details_msg").style.display = "none";
      });
      
      document.getElementById("odt_head").innerHTML = "cici";
      
			GEvent.addListener(marker, 'dragstart', function() {
				document.getElementById("odt_head").innerHTML = "la1";
				document.getElementById("details_odt").style.display = "none";
				document.getElementById("details_msg").style.display = "block";
			});
			GEvent.addListener(marker, 'dragstop', function() {
				document.getElementById("odt_head").innerHTML = "la2";
				document.getElementById("details_odt").style.display = "none";
				document.getElementById("details_msg").style.display = "block";
			});
			GEvent.addListener(marker, 'drag', function() {
				document.getElementById("odt_head").innerHTML = "la3";
				document.getElementById("details_odt").style.display = "none";
				document.getElementById("details_msg").style.display = "block";
			});
			GEvent.addListener(marker, 'mousedown', function() {
				document.getElementById("odt_head").innerHTML = "la4";
				document.getElementById("details_odt").style.display = "none";
				document.getElementById("details_msg").style.display = "block";
			});
			GEvent.addListener(marker, 'mouseup', function() {
				document.getElementById("odt_head").innerHTML = "la5";
				document.getElementById("details_odt").style.display = "none";
				document.getElementById("details_msg").style.display = "block";
			});

      return marker;
    }
    