
var i = 1;
var navig = navigator.appName;

function colorCell(cella){
	cella.bgColor="#007684";
}

function decolor(cella){
	cella.bgColor="";
	}

function zoom(){

	 if(i==9){
			window.alert("Non si può più fare lo zoom");
		}else{
			i++;
			map.src="images/map/"+i+".jpg";
			}
}

function resize(){
	
	if(i==1){
			window.alert("Non si può diminuire più di questo");
		}else{
			i--;
			map.src="images/map/"+i+".jpg";
			}
}

function verif(){

	var nome = document.preventivo.cognomeenome.value;

	var email = document.preventivo.email.value;

	var partenza = preventivo.partenza;

	var arrivo = preventivo.destinazione;

	var numPart = preventivo.Numero;

	

	if(nome == "" || email == "" || partenza == "" || arrivo == "" || numPart == ""){

		alert("Attenzione devi inserire tutti i campi obbligatori!");

		return false;

	}

	else if(email.indexOf("@",0) == - 1 || email.indexOf(".",0) == - 1){

		alert("Il formato dell'e-mail non è esatto");

		return false;

	}else{

		return true;

	}

}

 function PopupCentrata(file, w, h) {

   var l = Math.floor((screen.width-w)/2);

   var t = Math.floor((screen.height-h)/2);
   
   var stile = 'top='+t+', left='+l+', width='+w+', height='+h+', status=no, menubar=no, toolbar=no scrollbars=yes';
   
   if (navig=='Netscape')
   		window.open(file,"");
   else
   		window.open(file,"",stile);

 }


 function loadOrari(url) {
	 
	 if(url.value=="homeOrari"){
		window.location.href = "servizio.php#orari"; 
	 }else if(url.value!=""){
		window.location.href = "servizio.php?dest=" + url.value + "#orari"; 
	 }
 }
