

    var gmarkers = [];
    var htmls = [];
    var to_htmls = [];
    var from_htmls = [];
    var i=0;
	  
	function map_fr() 
	{

    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {

      

      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);
        
         // The info window version with the "to here" form open
        to_htmls[i] = html + '<br>Itin&eacute;raire: <b>Vers ce lieu</b> - <a style="white-space:nowrap;" href="javascript:fromhere(' + i + ')">&Agrave; partir de ce lieu</a>' +
           '<br>Lieu 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="" /><input type="hidden" name="hl" value="fr"><br>' +
           '<INPUT value="Itin&eacute;raire" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' +
           point.y + ',' + point.x + "(" + name + ")" + '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<br>Itin&eacute;raire: <a style="white-space:nowrap;" href="javascript:tohere(' + i + ')">Vers ce lieu</a> - <b>&Agrave; partir de ce lieu</b>' +
           '<br>Lieu d\'arriv&eacute;:<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Itin&eacute;raire" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' +
           point.y + ',' + point.x + "(" + name + ")" + '"/>';
        // The inactive version of the direction info
        html = html + '<br>Itin&eacute;raire: <a style="white-space:nowrap;" href="javascript:tohere('+i+')">Vers ce lieu</a> - <a style="white-space:nowrap;" href="javascript:fromhere('+i+')">&Agrave; partir de ce lieu</a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml('<div style="white-space:nowrap;">'+html+'</div>');
        });
        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        return marker;
      }
	  

     
      // Display the map, with some controls and set the initial location 
      var map = new GMap(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.centerAndZoom(new GPoint(-73.759203,45.587134),7);
    
      // Set up three markers with info windows 
    
      var point = new GPoint(-73.759203,45.587134);
      var marker = createMarker(point,'Florence Inc','Florence Inc');
      map.addOverlay(marker);
	  map.openInfoWindowHtml(map.getCenterLatLng(),'<div style="white-space:nowrap;">Florence Inc' +
	    '<br>Itin&eacute;raire: <a style="white-space:nowrap;" href="javascript:tohere(0)">Vers ce lieu</a> - <a style="white-space:nowrap;" href="javascript:fromhere(0)">&Agrave; partir de ce lieu</a></div>');
    }

	}
    
    function map_en() {

    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {

      

      // A function to create the marker and set up the event window
      function createMarker(point,name,html) {
        var marker = new GMarker(point);

        // The info window version with the "to here" form open
        to_htmls[i] = html + '<br>Directions: <b>To here</b> - <a style="white-space:nowrap;" href="javascript:fromhere(' + i + ')">From here</a>' +
           '<br>Start address:<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="Get Directions" TYPE="SUBMIT">' +
           '<input type="hidden" name="daddr" value="' +
           point.y + ',' + point.x + "(" + name + ")" + '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<br>Directions: <a style="white-space:nowrap;" href="javascript:tohere(' + i + ')">To here</a> - <b>From here</b>' +
           '<br>End address:<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=40 MAXLENGTH=40 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Get Directions" TYPE="SUBMIT">' +
           '<input type="hidden" name="saddr" value="' +
           point.y + ',' + point.x + "(" + name + ")" + '"/>';
        // The inactive version of the direction info
        html = html + '<br>Directions: <a style="white-space:nowrap;" href="javascript:tohere('+i+')">To here</a> - <a style="white-space:nowrap;" href="javascript:fromhere('+i+')">From here</a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml('<div style="white-space:nowrap;">'+html+'</div>');
        });
        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        return marker;
      }
	  

     
      // Display the map, with some controls and set the initial location 
      var map = new GMap(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.centerAndZoom(new GPoint(-73.759203,45.587134),7);
    
      // Set up three markers with info windows 
    
      var point = new GPoint(-73.759203,45.587134);
      var marker = createMarker(point,'Florence Inc','Florence Inc');
      map.addOverlay(marker);
	  map.openInfoWindowHtml(map.getCenterLatLng(),'<div style="white-space:nowrap;">Florence Inc' +
	    '<br>Directions: <a style="white-space:nowrap;" href="javascript:tohere(0)">To here</a> - <a style="white-space:nowrap;" href="javascript:fromhere(0)">From here</a></div>');
    }

	}
	
	
	// functions that open the directions forms
    function tohere(i) {
        gmarkers[i].openInfoWindowHtml('<div style="white-space:nowrap;">'+ to_htmls[i]+'</div>');
    }
    
	function fromhere(i) {
        gmarkers[i].openInfoWindowHtml('<div style="white-space:nowrap;">'+ from_htmls[i]+'</div>');
    }

    
