// ******* GOOGLEMAP **********/
function load(long,latt, address) {

		function showAddress(address) {
		  var geocoder = new GClientGeocoder();
		  geocoder.getLatLng(
			address,
			function(point) {
			  //if no adress found display the swiss flag
			  if (!point) {
				map.setCenter(new GLatLng(long,latt), 6, G_SATELLITE_MAP);
				var icon = new GIcon();
				icon.image = "images/drapeau-suisse.gif";
				icon.iconSize = new GSize(40, 40);
				icon.shadowSize = new GSize(22, 20);
				icon.iconAnchor = new GPoint(20, 20);
				//Display the marker on the map
				map.addOverlay(new GMarker(new GLatLng(long,latt), icon));		
				//display the marker on the location found
			  } else {
			 
			 	/*map.setCenter(point, 7);
				var icon = new GIcon();
				icon.image = "images/ufo.png";
				icon.iconSize = new GSize(40, 40);
				icon.shadowSize = new GSize(22, 20);
				icon.iconAnchor = new GPoint(20, 20);
				//Display the marker on the map
				map.addOverlay(new GMarker(point, icon));		*/
			  
				map.setCenter(point, 7);
				var marker = new GMarker(point);
				map.addOverlay(marker);
			  }
			}
		  );
		}  
  if (GBrowserIsCompatible()) {
    //creation of a new map
	var map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallZoomControl ());
	//longitude, lattitude, zoom level, type of map
	map.setCenter(new GLatLng(long,latt), 6, G_SATELLITE_MAP);
	
	//call ShowAddress fonction
	showAddress(address);
  }
}


function sendtoafriend(lien)	{
	window.open('/sendtoafriend.php?lien='+lien,'tellafriend','dependent=yes,height=300,width=480,location=no,menubar=no,resizable=no,status=no,toolbar=no');
}

