function ingrandisci(largh, altz, dir, img) {
	popuppa = window.open("../img.html", 'Immagini', 'width=' + largh + ', height=' + altz + ', , , , toolbar=no, location=_parent, status=no, menubar=no, scrollbar=no, resizable=no');
	scrivihtml = '';
	scrivihtml = '<html>'
				+'\n	<head>'
				+'\n		<title>.::| C.A.A.I. - Immagini |::.</title>'
				+'\n		<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">'
				+'\n        <link rel=\"stylesheet\" href=\"include/style.css\" TYPE=\"text/css\">'
				+'\n	</head>'
				+'\n	<body>'
				+'\n		<div class=\"centro\"><a class=\"linkset\" href=\"#\" title="Chiudi" alt="Chiudi" onclick="window.close()">Chiudi questa finestra X</a></div>'
				+'\n		<p></p>'
				+'\n		<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"centro\">'
				+'\n			<tr>'
				+'\n				<td>'
				+'\n					<img src=\"'+dir+img+ '\" alt=\"'+img+'\" title=\"'+img+'\" border=\"0\" vspace=\"0\" hspace=\"0\" />'
				+'\n				</td>'
				+'\n			</tr>'
				+'\n		</table>'
				+'\n	</body>'
				+'\n</html>';
				
	popuppa.document.write(scrivihtml);
	scrivihtml='';
}






function privacy_ok(chkbox) {
	if(!chkbox.checked) {
		document.contatti.invia.disabled = true;
		alert("Per proseguire con l\'invio del modulo è necessario accettare la Legge sulla Privacy.");
	}else{
		document.contatti.invia.disabled = false;
	}
}

function Email() {
	var nome = document.contatti.req_nome.value;
	var cognome = document.contatti.req_cognome.value;
	var email = document.contatti.req_email.value;
	var tel = document.contatti.req_telefono.value;
	
	var indirizzo = document.contatti.indirizzo.value;
	var civico = document.contatti.civico.value;
	var cap = document.contatti.cap.value;
	var citta = document.contatti.citta.value;
	
	var testo = document.contatti.req_testo.value;
	
	var oggetto = 'Richiesta contatti dal sito C.A.A.I.';
	
	
	if( (nome == "") || (nome == "undefined") ) {
		alert("Il campo Nome è obbligatorio.");
		document.contatti.req_nome.focus();
	}else if( (cognome == "") || (cognome == "undefined") ) {
		alert("Il campo Cognome è obbligatorio.");
		document.contatti.req_cognome.focus();
	}else if ( email.indexOf("@") == (-1) || email.indexOf(".") == (-1) || email == "" || email == "undefined" ) {
		alert("Il campo E-mail è obbligatorio. \n Controllare di avere scritto un indirizzo email valido!");
		document.contatti.req_email.focus();
	}else if ( (isNaN(tel)) || (tel == "") || (tel == "undefined") ) {
		alert("Il campo Telefono è obbligatorio. \n Controllare di non avere inserito spazi.");
		document.contatti.req_telefono.focus();
	}else if ( (citta == "") || (citta == "undefined") ) {
		alert("Il campo Città è obbligatorio.");
		document.contatti.citta.focus();
	}else if ( (testo == "") || (testo == "undefined") ) {
		alert("Inserire un messaggio di richiesta.");
		document.contatti.req_testo.focus();
	}else {
		if(indirizzo == "" || indirizzo == "undefined") {
			indirizzo = "---";
		}
		
		if(civico == "" || civico == "undefined") {
			civico = "---";
		}
		
		if(cap == "" || cap == "undefined") {
			cap == "---";
		}
		
		body= "|| Nome: " + nome + " ||"
			+ "|| Cognome: " + cognome + " ||"
			+ "|| Recapito Telefonico: " + tel + " ||"
			+ "|| Indirizzo E-Mail: " + email + " ||"
			+ "|| Indirizzo: " + indirizzo + " ||"
			+ "|| Numero Civico: " + civico + " ||"
			+ "|| CAP: " + cap + " ||"
			+ "|| Citta: " + citta + " ||"
			+ "|| RICHIESTA: " + testo + " ||";
		
		location.href = "mailto:support@caai.it" 
						+ "?Subject=" + oggetto 
						+ "&Body=" + body;
		document.contatti.submit();
	}
}
