

function ingrandimentoviaggi(valore, larg, altez){
		if(mywindow){
			mywindow.close();	
		}
		var imgscelta = new Image();
		
			var estensione = (valore.substring(0, valore.length-4));
			estensione = estensione + "_big.jpg"
			 imgscelta.src = estensione;
			 larghezza = imgscelta.width;
			 altezza = imgscelta.height;			 
			 dist_da_sx = (580 - larghezza)/2
			 dist_da_top = (580 - altezza)/2			 
			//return false;
			//estensione = estensione + "_big.jpg"
			//estensione = estensione.replace("ssb.jpg", "sb.jpg");	
var mywindow=window.open("","help","toolbar=0,top=100,left=250,location=0,directories=0,status=0,menubar=0,resizable=0,copyhistory=0,width=580,height=580,screenX=100,screenY=100"); 
mywindow.document.write("<HTML><HEAD>");
mywindow.document.write("<TITLE>Help</TITLE>");
mywindow.document.write("</HEAD><BODY marginwidth=0 BGCOLOR=00741E>");
mywindow.document.write("<table style=margin-top:" + dist_da_top +" align=center cellspacing=0 cellpadding=0 border=0><tr><td align=center valign=middle>");
mywindow.document.write("<img src=" + estensione + " border=0 />");
mywindow.document.write("</td></tr></table>");
mywindow.document.write("</BODY></HTML>");
mywindow.focus();			
} 




function ingrandimento550x366(valore, larg, altez){
		if(mywindow){
			mywindow.close();	
		}
		var imgscelta = new Image();
			 imgscelta.src = valore;
			 larghezza = imgscelta.width;
			 altezza = imgscelta.height;
			 dist_da_sx = (580 - larghezza)/2
			dist_da_top = (580 - altezza)/2			 
//			 alert("larghezza " + larghezza)
//			 alert("altezza " + altezza)			 
			 
			 
			var estensione = (valore.substring(0, valore.length-5));
			estensione = estensione + "sb.jpg"
			estensione = estensione.replace("ssb.jpg", "sb.jpg");
			//var win = window.open(,"pippo","width=580,height=580"); 			
			 
var mywindow=window.open("","help","toolbar=0,top=100,left=250,location=0,directories=0,status=0,menubar=0,resizable=0,copyhistory=0,width=580,height=580,screenX=100,screenY=100"); 
mywindow.document.write("<HTML><HEAD>");
mywindow.document.write("<TITLE>Help</TITLE>");
mywindow.document.write("</HEAD><BODY marginwidth=0 BGCOLOR=00741E>");
mywindow.document.write("<table style=margin-top:" + dist_da_top +" align=center cellspacing=0 cellpadding=0 border=0><tr><td align=center>");
mywindow.document.write("<img src=" + estensione + " border=0 />");
mywindow.document.write("</td></tr></table>");
mywindow.document.write("</BODY></HTML>");
mywindow.focus();
}



 function Controllodati(){
	 
	if(document.modulo.nome.value==""){
		alert("Il campo nome č obbligatorio");
		document.modulo.nome.focus();
		return false;
	}
	if(document.modulo.cognome.value==""){
		alert("Il campo cognome č obbligatorio");
		document.modulo.cognome.focus();
		return false;
	}
	if(document.modulo.Indirizzo.value){
		if( !isNaN(document.modulo.Indirizzo.value) ){
			alert("Il campo Indirizzo non puņ essere un numero");
			document.modulo.Indirizzo.focus();
			return false;
		}
	}
	if(document.modulo.Cap.value){
		if( isNaN(document.modulo.Cap.value) ){
			alert("Il campo CAP non puņ essere un numero");
			document.modulo.Cap.focus();
			return false;
		}
	}	
	if(document.modulo.Citta.value){
		if( !isNaN(document.modulo.Citta.value) ){
			alert("Il campo Citta non puņ essere un numero");
			document.modulo.Citta.focus();
			return false;
		}
	}
	if(document.modulo.Prov.value){
		if( !isNaN(document.modulo.Prov.value) ){
			alert("Il campo Provincia non puņ essere un numero");
			document.modulo.Prov.focus();
			return false;
		}
	}
	if(document.modulo.stato_nazione.value){
		if( !isNaN(document.modulo.stato_nazione.value) ){
			alert("Il campo Stato/Nazione non puņ essere un numero");
			document.modulo.stato_nazione.focus();
			return false;
		}
	}	
	if(document.modulo.mail.value == ""){
		alert("\n INDIRIZZO E-MAIL non corretto. Inserire un indirizzo e-mail valido.");
		document.modulo.mail.focus();
		return false;		
	}
	if (document.modulo.mail.value.indexOf ('@',0) == -1 ||
		document.modulo.mail.value.indexOf ('.',0) == -1) {
		alert ("\n INDIRIZZO E-MAIL non corretto. Inserire un indirizzo e-mail valido.")
		document.modulo.mail.focus();
		return false;
	}
	if(document.modulo.textarea.value==""){
		alert("Il campo testo č obbligatorio");
		document.modulo.textarea.focus();
		return false;
	}	
}
 function Controllodati_e(){
	 
	if(document.modulo.nome.value==""){
		alert("Name, please!");
		document.modulo.nome.focus();
		return false;
	}
	if(document.modulo.cognome.value==""){
		alert("Last name, please!");
		document.modulo.cognome.focus();
		return false;
	}
	if(document.modulo.Indirizzo.value){
		if( !isNaN(document.modulo.Indirizzo.value) ){
			alert("Address, is not a number!");
			document.modulo.Indirizzo.focus();
			return false;
		}
	}
	if(document.modulo.Cap.value){
		if( isNaN(document.modulo.Cap.value) ){
			alert("Cap, is a number!");
			document.modulo.Cap.focus();
			return false;
		}
	}	
	if(document.modulo.Citta.value){
		if( !isNaN(document.modulo.Citta.value) ){
			alert("City, is not a number!");
			document.modulo.Citta.focus();
			return false;
		}
	}
	if(document.modulo.Prov.value){
		if( !isNaN(document.modulo.Prov.value) ){
			alert("City and district, is not a number!");
			document.modulo.Prov.focus();
			return false;
		}
	}
	if(document.modulo.stato_nazione.value){
		if( !isNaN(document.modulo.stato_nazione.value) ){
			alert("State/Nation, is not a number!");
			document.modulo.stato_nazione.focus();
			return false;
		}
	}	
	if(document.modulo.mail.value == ""){
		alert("E-mail, please");
		document.modulo.mail.focus();
		return false;		
	}
	if (document.modulo.mail.value.indexOf ('@',0) == -1 ||
		document.modulo.mail.value.indexOf ('.',0) == -1) {
		alert ("E-mail, please")
		document.modulo.mail.focus();
		return false;
	}
	if(document.modulo.textarea.value==""){
		alert("Text, please");
		document.modulo.textarea.focus();
		return false;
	}	
}

