// JavaScript Document
function controlla_modulo_prenotazione() {
	
	 if (eval(document.modulo.accetto[1].checked)) {
   	   alert("Al fine dell'effettuazione della richiesta di supporto bisogna accettare l'autorizzazione al trattamento dei dati personali.");
	   return false;
  	}
	
	
	if(document.modulo.cognome.value.length==0){
		alert("Inserisci il cognome");
		document.modulo.cognome.focus();
		return false;
	}
	
	
	if(document.modulo.login.value.length==0){
		alert("Inserisci la tua login");
		document.modulo.login.focus();
		return false;
	}
	if(document.modulo.password.value.length==0){
		alert("Inserisci la tua Password\'");
		document.modulo.password.focus();
		return false;
	}

	
EmailAddr = document.modulo.email.value;
Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

if (Filtro.test(EmailAddr)){
   return true;
} else {
	alert("Indirizzo e-mail non valido");
    document.modulo.email.focus();
    return false;
}

}

function controlla_modulo_educational() {
	
	 if (eval(document.modulo.accetto[1].checked)) {
   	   alert("Al fine dell'effettuazione della richiesta di supporto bisogna accettare l'autorizzazione al trattamento dei dati personali.");
	   return false;
  	}
	
	if(document.modulo.cognome.value.length==0){
		alert("Inserisci il cognome");
		document.modulo.cognome.focus();
		return false;
	}
	
	if(document.modulo.telefono.value.length==0){
		alert("Inserisci il tuo Telefono");
		document.modulo.telefono.focus();
		return false;
	}
		if(document.modulo.cognome.value.length==0){
		alert("Inserisci il cognome");
		document.modulo.cognome.focus();
		return false;
	}
	if (document.modulo.azienda.value.length==0) {
   	   alert("Selezionare il nome dell\'azienda.");
	   document.modulo.azienda.focus();
	   return false;
  	}
	if (!document.modulo.educational.checked) {
   	   alert("Selezionare il campo per partecipare agli Educational");
	   return false;
  	}
EmailAddr = document.modulo.email.value;
Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

if (Filtro.test(EmailAddr)){
   return true;
} else {
	alert("Indirizzo e-mail non valido");
    document.modulo.email.focus();
    return false;
}

}
function controllo(){
	if(document.login_tours.usn.value.length==0){
		alert("Inserisci la tua login");
		document.login_tours.usn.focus();
		return false;
	}
	if(document.login_tours.psw.value.length==0){
		alert("Inserisci la tua Password\'");
		document.login_tours.psw.focus();
		return false;
	}

}



