      // arrays to hold copies of the markers and html used by the side_bar 
      // because the function closure trick doesnt work there 
      var gmarkers = []; 
	  var couchestade = [];
	  var coucheecole = [];
	  var couchemonument = [];
	  var couchehotel = [];
	  var coucheparking = [];

     // Variables globales pour la carte g\u00E9n\u00E9rale
      var map = null;
	  var geocoder;
	  
	  // Variables globales pour la carte alternative : 2\u00E8me carte sur une page
	   var marker2;
	var map2 = new Array();
//      var map2 = null;
	  var geocoder2;
	 
// A function to create the marker and set up the event window function 
function createMarker(latlng, name, html, FichierXML,pseudo,lienpseudo) {

    var contentString = html;
	// Affichage une icone diff\u00E9rente en fonction du param\u00E8tre d'appel
    switch (FichierXML) {
		case "stade": var MarkerImage = new google.maps.MarkerImage('../CarteStade.gif'); break;
		case "ecole": var MarkerImage = new google.maps.MarkerImage('../CarteEcole.gif'); break;
		case "parking": var MarkerImage = new google.maps.MarkerImage('../CarteParking.gif'); break;
		case "hotel": var MarkerImage = new google.maps.MarkerImage('../CarteHotel.gif'); break;
		case "monument": var MarkerImage = new google.maps.MarkerImage('../Cartemonument.gif'); break;
		default: var MarkerImage = new google.maps.MarkerImage('../CarteDefaut.gif'); break;
	}
	var marker = new google.maps.Marker({
		position: latlng,
		icon: MarkerImage,
		map: map,
        zIndex: Math.round(latlng.lat()*-100000)<<5
    });

    google.maps.event.addListener(marker, 'mouseover', function() {
        infowindow.setContent(contentString); 
        infowindow.open(map,marker);
        });
    if (lienpseudo=='Oui') {
	google.maps.event.addListener(marker, 'click', function() {
		ouvre_lien_vue("../vueTitre/"+pseudo+"?OpenDocument","Plan de la ville","Back");
		});
	}	
    // Stocke les informations des points dans un tableau pour pouvoir les supprimer ou les r\u00E9afficher
    switch (FichierXML) {
		case "stade": couchestade.push(marker); break;
		case "ecole": coucheecole.push(marker); break;
		case "parking": coucheparking.push(marker); break;
		case "hotel": couchehotel.push(marker); break;
		case "monument": couchemonument.push(marker); break;
	}
	gmarkers.push(marker);
    
}

// Shows any overlays currently in the array
function showOverlays(couche) {
	switch (couche) {
		case "stade": 
			if (couchestade) {
				for (i in couchestade) {
					couchestade[i].setMap(map);
				}
				break;
			}
		case "ecole": 
			if (coucheecole) {
				for (i in coucheecole) {
					coucheecole[i].setMap(map);
				}
				break;
			}
		case "parking": 
			if (coucheparking) {
				for (i in coucheparking) {
					coucheparking[i].setMap(map);
				}
				break;
			}
		case "hotel": 
			if (couchehotel) {
				for (i in couchehotel) {
					couchehotel[i].setMap(map);
				}
				break;
			}
		case "monument": 
			if (couchemonument) {
				for (i in couchemonument) {
					couchemonument[i].setMap(map);
				}
				break;
			}
	}
}

// Deletes all markers in the array by removing references to them
function deleteOverlays(couche) {
	switch (couche) {
		case "stade": 
			if (couchestade) {
				for (i in couchestade) {
					couchestade[i].setMap(null);
				}
				couchestade.length = 0;
				break;
			}
		case "ecole": 
			if (coucheecole) {
				for (i in coucheecole) {
					coucheecole[i].setMap(null);
				}
				coucheecole.length = 0;
				break;
			}
		case "parking": 
			if (coucheparking) {
				for (i in coucheparking) {
					coucheparking[i].setMap(null);
				}
				coucheparking.length = 0;
				break;
			}
		case "hotel": 
			if (couchehotel) {
				for (i in couchehotel) {
					couchehotel[i].setMap(null);
				}
				couchehotel.length = 0;
				break;
			}
		case "monument": 
			if (couchemonument) {
				for (i in couchemonument) {
					couchemonument[i].setMap(null);
				}
				couchemonument.length = 0;
				break;
			}
	}
}
// This function picks up the click and opens the corresponding info window
function myclick(i) {
  google.maps.event.trigger(gmarkers[i], "click");
}


function affichecouche(FichierXML) {

	downloadUrl("../vue"+FichierXML+"XML", function(doc) {
        var xmlDoc = xmlParse(doc);
        var markers = xmlDoc.documentElement.getElementsByTagName("marker");
        for (var cpt = 0; cpt < markers.length; cpt++) {
          // obtain the attribues of each marker
          var adresse = markers[cpt].getAttribute("adresse")+" 11000 Carcassonne France";
          var lng = parseFloat(markers[cpt].getAttribute("lng"));
          var cartoX = markers[cpt].getAttribute("cartoX");
          var cartoY = markers[cpt].getAttribute("cartoY");
          var html = markers[cpt].getAttribute("html");
          var label = markers[cpt].getAttribute("name");
          var pseudo = markers[cpt].getAttribute("pseudo");
		  var lienpseudo = markers[cpt].getAttribute("lienpseudo");
		  // s'il n'y a pas de longitude et latitude enregistr\u00E9es et qu'il y a une ancienne valeur pour positionner 
		  // l'\u00E9l\u00E9ment sur l'ancienne carte, alors on recalcule la valeur \u00E0 partir de cet \u00E9l\u00E9ment.
		  if (markers[cpt].getAttribute("lat")=="") {
			var lat = 0;
			if (cartoX!="" & cartoY!="") {
				var lat = parseFloat(0.0000219282119535843 * parseFloat(cartoY)+ 43.2855765634488);
				var lng = parseFloat(-0.0000311063197738489 * parseFloat(cartoX)+ 2.2357428048249);
			}
		  } else {
			var lat = parseFloat(markers[cpt].getAttribute("lat"));
		  }
		  // Retrouver latitude et longitude par g\u00E9ocodage si n\u00E9cessaire
  		  if (lat>0) {
			var point = new google.maps.LatLng(lat,lng);
            var marker = createMarker(point,label,html,FichierXML,pseudo,lienpseudo);
		   } 
		  /* else {
				geocoder.geocode( { 'address': adresse}, function(results, status) {
				if (status == google.maps.GeocoderStatus.OK) {
					//var point= new google.maps.LatLng(results[0].geometry.location);
					//var marker = createMarker(point,label,html);
					var marker = createMarker(results[0].geometry.location,label,html);
				}
			}); 
		   } */
        }
      });
  }
 
var infowindow = new google.maps.InfoWindow(
  { 
    size: new google.maps.Size(150,50)
  });

function majmonument() {
	if (valeurcheckbox("chpmonument")=="") {
		deleteOverlays('monument'); }
	else {
		showOverlays('monument');
	}
}
	
function majecole() {
	if (valeurcheckbox("chpecole")=="") {
		deleteOverlays('ecole'); }
	else {
		showOverlays('ecole');
	}
}
function majstade() {
	if (valeurcheckbox("chpstade")=="") {
		deleteOverlays('stade'); }
	else {
		showOverlays('stade');
	}
}
function afficheadresse() {

	if (! geocoder) {
  		geocoder = new google.maps.Geocoder();
  	}
	if (document.getElementById('geocodeadresse').value=="") {
		alert('Saisissez une adresse \u00E0 retrouver !')}
	else {
		var adressecarca=document.getElementById('geocodeadresse').value+" 11000 Carcassonne France"
		geocoder.geocode( { 'address': adressecarca}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			// on compare le r\u00E9sultat au coordonn\u00E9es retourn\u00E9es pour Carcassonne si l'adresse n'est pas trouv\u00E9 - si c'est les m\u00EAmes, alors l'adresse n'a pas \u00E9t\u00E9 trouv\u00E9e !
			if (results[0].geometry.location.lat().toFixed(7)==43.2183848 && results[0].geometry.location.lng().toFixed(7)==2.3517526) {
				alert('Adresse inconnue !')}
			else {
				map.setCenter(results[0].geometry.location);
				var marker = new google.maps.Marker({
				map: map, 
				position: results[0].geometry.location
				});
				google.maps.event.addListener(marker, 'mouseover', function() {infowindow.setContent('Localisation adresse :<br /><strong> '+document.getElementById('geocodeadresse').value+'</strong>');infowindow.open(map,marker);});
			};
		} else {
			//alert(adressecarca+" - Erreur en g\u00E9ocodage pour la raison suivante: " + status);
		}
		});
	}
}

function retourneLatAdresse(adresse) {

	var retour = "";
  	if (! geocoder) {
  		geocoder = new google.maps.Geocoder();
  	}
	if (adresse=="") {
		retour="Pas d'adresse"}
	else {
		var adressecarca=adresse+" France"
		geocoder.geocode( { 'address': adressecarca}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			// on compare le r\u00E9sultat au coordonn\u00E9es retourn\u00E9es pour Carcassonne si l'adresse n'est pas trouv\u00E9 - si c'est les m\u00EAmes, alors l'adresse n'a pas \u00E9t\u00E9 trouv\u00E9e !
			if (results[0].geometry.location.lat().toFixed(7)==43.2183848 && results[0].geometry.location.lng().toFixed(7)==2.3517526) {
				retour="Pas trouv\u00E9";}
			else {
				retour=results[0].geometry.location.lat().toFixed(7)
			};
		} else {
			//retour="Erreur en g\u00E9ocodage";
		}
		});
	}
	geocoder = null;
	return retour;
}
function retourneLngAdresse(adresse) {

  	if (! geocoder) {geocoder = new google.maps.Geocoder();}
	if (adresse=="") {
		return('')}
	else {
		var adressecarca=adresse+" France"
		geocoder.geocode( { 'address': adressecarca}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			// on compare le r\u00E9sultat au coordonn\u00E9es retourn\u00E9es pour Carcassonne si l'adresse n'est pas trouv\u00E9 - si c'est les m\u00EAmes, alors l'adresse n'a pas \u00E9t\u00E9 trouv\u00E9e !
			if (results[0].geometry.location.lat().toFixed(7)==43.2183848 && results[0].geometry.location.lng().toFixed(7)==2.3517526) {
				return('')}
			else {
				return(results[0].geometry.location.lng().toFixed(7))
			};
		} else {
			return('');
		}
		});
	}
	geocoder = null;
}

function GeocodeAddresseGoogleMapPgePlanVille(Titre,Lat,Lng) {
	if (! geocoder) {initializeGoogleMap();}
	// Si des champs existe dans la page, alors on les met \u00E0 jour
	if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=Lat;}
	if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=Lng;}
	// si une zone span avec pour id 'lat' ou 'lng' existe alors on consid\u00E8re qu'elle doit \u00EAtre mise \u00E0 jour
	if(document.getElementById("lat")) {document.getElementById("lat").innerHTML=Lat;}
	if(document.getElementById("lng")) {document.getElementById("lng").innerHTML=Lng;}
	var pointmobile = false;
	if (document.getElementById("chpPointMobile")) {
		if (document.getElementById("chpPointMobile").value=="Oui") {pointmobile = true;}
	}
	if (document.getElementById("chpPseudoPage").value=="docPlandelavilleXY" | pointmobile) {
		var mydrag = true;
	} else {
		var mydrag = false;
	}
	if (Lat != "") {
		var latlng = new google.maps.LatLng(Lat,Lng);
		map.setCenter(latlng);
		var marker = new google.maps.Marker({  map: map, draggable: mydrag, position: latlng});
		google.maps.event.addListener(marker, 'mouseover', function() {
			infowindow.setContent(Titre);infowindow.open(map,marker);
			if(document.getElementById("chpGoogleLatSaisie")) {document.getElementById("chpGoogleLatSaisie").value=marker.getPosition().lat().toFixed(10);}
			if(document.getElementById("chpGoogleLngSaisie")) {document.getElementById("chpGoogleLngSaisie").value=marker.getPosition().lng().toFixed(10);}
			if(document.getElementById("lat") && document.getElementById("lng")) {
				var point =marker.getPosition();
				document.getElementById('quoi').innerHTML = '';
				document.getElementById('lat').innerHTML = point.lat().toFixed(10);
				document.getElementById('lng').innerHTML = point.lng().toFixed(10);
				if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=point.lat().toFixed(10);}
				if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=point.lng().toFixed(10);}
			}
		});
		// Modification de marker2 vers marker
		google.maps.event.addListener(marker, 'dragend', function() {
			if(document.getElementById("lat") && document.getElementById("lng")) {
					document.getElementById('quoi').innerHTML = '';
					var point =marker.getPosition();
					document.getElementById('lat').innerHTML = point.lat().toFixed(10);
					document.getElementById('lng').innerHTML = point.lng().toFixed(10);
					// Si des champs existe dans la page, alors on les met \u00E0 jour
					if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=point.lat().toFixed(10);}
					if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=point.lng().toFixed(10);}
			}
		});
	}
	else {
		var address = document.getElementById("chpAdresse1").value;
		address = address+" "+document.getElementById("chpCodePostal").value;
		address = address+" "+document.getElementById("chpVille").value;
		geocoder.geocode( { 'address': address}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			map.setCenter(results[0].geometry.location);
			var marker = new google.maps.Marker({
			map: map, 
			draggable: mydrag,
			position: results[0].geometry.location
			});
	} else {
	// alert("Erreur en g\u00E9ocodage pour la raison suivante: " + status);
	}
	});
	}
}
/* Montre le point des latitudes et longitudes pass\u00E9s en param\u00E8tre de ligne de commande */
function MontrePointURL() {
	var Titre = document.getElementById("Param1").value;
	var Lat = document.getElementById("Param2").value;
	var Lng = document.getElementById("Param3").value;
	if (Titre!="" & Lat!="" & Lng!="") {
		x=GeocodeAddresseGoogleMapPgePlanVille(Titre,Lat,Lng);	
	}
}

    
// Permet de montrer ou cacher un calque
function montreCacheCarte(id,status) {//status = rien ou montre ou cache
var objetMontreCache = document.getElementById(id);
if (objetMontreCache!=null) {
	if (!status){
		if (objetMontreCache.style.visibility=='visible') {
			objetMontreCache.style.visibility='hidden';
			objetMontreCache.style.display='none';
		}else{
			objetMontreCache.style.visibility='visible';
			objetMontreCache.style.display='block';
		}
	}else{
		if (status == "montre"){
			if (objetMontreCache.style.visibility!='visible') {
				objetMontreCache.style.visibility='visible';
				objetMontreCache.style.display='block';
			}
		}
		if (status == "cache"){
			if (objetMontreCache.style.visibility!='hidden') {
				objetMontreCache.style.visibility='hidden';
				objetMontreCache.style.display='none';
			}
		}
	}
}
}

function ChangeAdresse(adresse) {

	if (adresse=="") {
		alert('Saisissez une adresse \u00E0 retrouver !')}
	else {
		var adressecarca=adresse+" 11000 Carcassonne France"
		geocoder2.geocode( { 'address': adressecarca}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			// on compare le r\u00E9sultat au coordonn\u00E9es retourn\u00E9es pour Carcassonne si l'adresse n'est pas trouv\u00E9 - si c'est les m\u00EAmes, alors l'adresse n'a pas \u00E9t\u00E9 trouv\u00E9e !
			if (results[0].geometry.location.lat().toFixed(7)==43.2183848 && results[0].geometry.location.lng().toFixed(7)==2.3517526) {
				alert('Adresse inconnue !')}
			else {
				map2.setCenter(results[0].geometry.location);
				if (! marker2) {
				marker2 = new google.maps.Marker({
				map: map2,
				draggable: true,
				position: results[0].geometry.location
				})}
				else
				{
					marker2.setPosition(results[0].geometry.location)
				};
				// Mise \u00E0 jour des indicateurs de coordonn\u00E9es en bas de la carte
				document.getElementById('lat').innerHTML = results[0].geometry.location.lat().toFixed(10)
				document.getElementById('lng').innerHTML = results[0].geometry.location.lng().toFixed(10)
				if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=results[0].geometry.location.lat().toFixed(10);}
				if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=results[0].geometry.location.lng().toFixed(10);}

			    google.maps.event.addListener(marker2, 'mouseover', function() {
					document.getElementById('quoi').innerHTML = '';
					var point =marker2.getPosition();
					document.getElementById('lat').innerHTML = point.lat().toFixed(10);
					document.getElementById('lng').innerHTML = point.lng().toFixed(10);
					if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=point.lat().toFixed(10);}
					if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=point.lng().toFixed(10);}
				});

				// pour afficher les coordonn\u00E9es de l'icone lorsqu'on la d\u00E9place
				google.maps.event.addListener(marker2, 'dragend', function() {
					document.getElementById('quoi').innerHTML = '';
					var point =marker2.getPosition();
					document.getElementById('lat').innerHTML = point.lat().toFixed(10);
					document.getElementById('lng').innerHTML = point.lng().toFixed(10);
					if (document.getElementById("chpGoogleLat")) {document.getElementById("chpGoogleLat").value=point.lat().toFixed(10);}
					if (document.getElementById("chpGoogleLng")) {document.getElementById("chpGoogleLng").value=point.lng().toFixed(10);}
				});
			};
		} else {
			//alert("Erreur en g\u00E9ocodage pour la raison suivante: " + status);
		}
		});
	}
}


function initialize2(carteid) {
  // create the map2
  geocoder2 = new google.maps.Geocoder();
  var myOptions = {
    zoom: 15,
    center: new google.maps.LatLng(43.213,2.35),
    mapTypeControl: true,
    mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
    navigationControl: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
	map2[carteid] = new google.maps.Map(document.getElementById(carteid),myOptions);
	google.maps.event.addListener(map2[carteid], 'click', function() {infowindow.close();});
}

function ChangeLatLng(carteid,Lat,Lng) {
  x=montreCacheCarte(carteid,'montre');	
  if( !map2[carteid]){initialize2(carteid);}
	if (Lat != "") {
		var latlng = new google.maps.LatLng(Lat,Lng);
		map2[carteid].setCenter(latlng);
		if (! marker2) {
			var marker2 = new google.maps.Marker({  map: map2[carteid], position: latlng})}
		else {
			marker2.setPosition(latlng)
		};
	}
}

function flingue(carteid) {
	geocoder2 = null;
	map2[carteid]= null;
	x=montreCacheCarte(carteid,'cache');	
}

function MontreCacheCarte2(id,Lat,Lng) {
	if (document.getElementById("carteid"+id).style.display=='none') {
		x=ChangeLatLng('carteid'+id,Lat,Lng);
		var elmt = document.getElementById('bt'+id); 
		elmt.src="../GoogleMapPlanSeulCache.gif";
	}
	   else
	{
		x=flingue('carteid'+id)
		var elmt = document.getElementById('bt'+id); 
		elmt.src="../GoogleMapPlanSeul.gif";
	}
}

/* Permet d'afficher sur une carte google map l'emplacement d'un lieu en fonction des latitudes et longitudes */
/* stock\u00E9es dans la fiche du lieu ou en fonction de l'adresse indiqu\u00E9e dans la fiche */
function initializeGoogleMap() {
	geocoder = new google.maps.Geocoder();
	var latlng = new google.maps.LatLng(43.2126485, 2.3547823);
	var myOptions = {
	zoom: 16,
	center: latlng,
	mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
}

function initialize() {
  // create the map
  geocoder = new google.maps.Geocoder();
  var myOptions = {
    zoom: 15,
    center: new google.maps.LatLng(43.213,2.35),
    mapTypeControl: true,
    mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
    navigationControl: true,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  map = new google.maps.Map(document.getElementById("cartegoogle"),myOptions);
 
  google.maps.event.addListener(map, 'click', function() {infowindow.close();});
  // Read the data from example.xml
}

function envoicoordonnees(){
	if (document.getElementById("chpGoogleLat").value!='') {
		doc=document.location.href.split('/'); //top.document.location.href recupere l'url situee dans la barre d'adresse
		var urlcible;
		//urlcible="http://"+doc[2]+"/carcassonnedemandes.nsf/msqcourrier?openform&&&Envoi latitude longitude&Coordonn\u00E9es : "+document.getElementById("chpGoogleLat").value+","+document.getElementById("chpGoogleLng").value
		urlcible="http://"+doc[2]+"/carcassonnedemandes.nsf/msqcourrier?openform&&&Envoi latitude longitude&http:%2F%2Fwww.carcassonne.org%2Fcarcassonneville.nsf%2Fvuetitre%2FdocPlandelavilleXY?opendocument%26%26%26%26%26%26%26Point%26"+document.getElementById("chpGoogleLat").value+"%26"+document.getElementById("chpGoogleLng").value
		
//		var tmp = 	window.open(urlcible);
		var tmp = 	document.location.href=urlcible;
	}
}

function AfficheBt_Carte() {
	if (document.getElementById("chpAdresse1").value!='' | document.getElementById("chpGoogleLat").value!='') {document.getElementById("bt_carte").style.display = 'block'}
}

function GeocodeAddresseGoogleMap() {
	
	if (! geocoder) {initializeGoogleMap();}
  	
	if (document.getElementById("map_canvas").style.display=='none') {
	var elmt = document.getElementById('libCarte'); 
	elmt.src="../GooglemapCache.gif";
	document.getElementById("map_canvas").style.display = 'block'
	document.getElementById("adresse").style.display = 'block'
	var Lat = document.getElementById("chpGoogleLat").value;
	var Lng = document.getElementById("chpGoogleLng").value;
	if (Lat != "") {
		var latlng = new google.maps.LatLng(Lat,Lng);
		map.setCenter(latlng);
		var marker = new google.maps.Marker({  map: map, position: latlng});
	}
	else {
	var address = document.getElementById("chpAdresse1").value;
	address = address+" "+document.getElementById("chpCodePostal").value;
	address = address+" "+document.getElementById("chpVille").value;
	geocoder.geocode( { 'address': address}, function(results, status) {
	if (status == google.maps.GeocoderStatus.OK) {
		map.setCenter(results[0].geometry.location);
		var marker = new google.maps.Marker({
		map: map, 
		position: results[0].geometry.location
		});
	} else {
		//alert(address+ " - Erreur en g\u00E9ocodage pour la raison suivante: " + status);
	}
	});
	}
	}
	   else
	{
	
	document.getElementById("map_canvas").style.display = 'none'
	document.getElementById("adresse").style.display = 'none'
	/*geocoder = null;
	map = null;*/
	var elmt = document.getElementById('libCarte'); 
	elmt.src="../Googlemap.gif";
	}
}


function MontreCacheIframePlan(id) {
	
if (document.getElementById("iframe"+id).style.display=='none') {
	var elmt = document.getElementById('bt'+id); 
	elmt.src="../GoogleMapPlanSeulCache.gif";
	document.getElementById("iframe"+id).style.display = 'block';
}
   else
{
	var elmt = document.getElementById('bt'+id); 
	elmt.src="../GoogleMapPlanSeul.gif";
	document.getElementById("iframe"+id).style.display = 'none';
}
}

function GeocodeAddresseVue(address) {
	
	if (! geocoder) {initializeGoogleMap();}
	if (document.getElementById("map_canvas").style.display=='none') {
		var elmt = document.getElementById('libCarte'); 
		elmt.src="../GooglemapCache.gif";
		document.getElementById("map_canvas").style.display = 'block'
		geocoder.geocode( { 'address': address}, function(results, status) {
		if (status == google.maps.GeocoderStatus.OK) {
			map.setCenter(results[0].geometry.location);
			var marker = new google.maps.Marker({
			map: map, 
			position: results[0].geometry.location
			});
		} else {
			//alert("Erreur en g\u00E9ocodage pour la raison suivante: " + status);
		}
		});
	}
	else
	{
		document.getElementById("map_canvas").style.display = 'none'
		var elmt = document.getElementById('libCarte'); 
		elmt.src="../Googlemap.gif";
	}
}


