function cambiaMenu(immagine){
	document.getElementById(immagine).src = "img/over_" + immagine;
}
function ritornaMenu(immagine){
	document.getElementById(immagine).src = "img/" + immagine;
}
function cambiaMenuIng(immagine_en){
	document.getElementById(immagine_en).src = "img/inglese/over_" + immagine_en;
}
function ritornaMenuIng(immagine_en){
	document.getElementById(immagine_en).src = "img/inglese/" + immagine_en;
}

function showMappa() {
	sIndirizzo 	= "Via dei Bichi 293 55100 Lucca";
	sMarker 	= "<div id='marker'>Via dei Bichi, 293<br />55100 Lucca</div>";
	
	var map 		= null;
	var geocoder 	= null;
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("mappa"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		geocoder = new GClientGeocoder();
	}
	if (geocoder) {
		geocoder.getLatLng(sIndirizzo,
			function(point) {
				if (!point) {
					alert(sIndirizzo + " not found");
				} else {
					map.setCenter(point, 14);
					var marker = new GMarker(point);						
					map.addOverlay(marker);
					marker.openInfoWindowHtml(sMarker);
					GEvent.addListener(marker, "click",
						function() { marker.openInfoWindowHtml(sMarker); }
					);
				}
			}
		);
	}
}

function cambiaToolTip(scritta, nomeDiv){
	document.getElementById(nomeDiv).innerHTML = scritta;
}
function cancellaToolTip(nomeDiv){
	document.getElementById(nomeDiv).innerHTML = "";
}

//funzione per visualizzare la foto grande dell'immobile cliccando sulla thumb
function visualizzaGrande(nomeFile){
	temp = document.getElementsByTagName("div");
	for(var i=0; i<temp.length; i++){
		if (temp[i].className == "icona_villa_bianco") {
			temp[i].className = "icona_villa";
		} else if (temp[i].className == "icona_villa_ultimo_bianco") {
			temp[i].className = "icona_villa_ultimo";
		}
	}
	
	if (document.getElementById(nomeFile).className == "icona_villa_ultimo") {
		document.getElementById(nomeFile).className = "icona_villa_ultimo_bianco";
	} else {
		document.getElementById(nomeFile).className = "icona_villa_bianco";
	}
	document.getElementById('grande').src = "upload/immagini/" + nomeFile;
}