function changeStyle(e){
	var num = document.getElementsByTagName('li');
	
	//stuto tutti
	for (var i=0;i<num.length;i++) { 
			idx = num[i].id ;
					 
			arr = idx.split("_") ;
 		 
				if (arr[0] == "li") {   	 
					eval("$('"+idx+"').className='menu' ;");

				} 		
		}
		eval("$('"+e+"').className='menuH' ;");
}


function checkform_info() {
	var sw = 0;
	var msg = '';
	var nome = document.contatto.nome.value;
	var cognome = document.contatto.cognome.value;
	var email = document.contatto.email.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!nome) {
		msg += "devi inserire il nome.\n" ;
		sw = 1 ;
		}
		
		if (!cognome) {
		msg += "devi inserire il cognome.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}

function checkform_ecm() {
	var sw = 0;
	var msg = '';
	var nome = document.contatto.nome.value;
	var cognome = document.contatto.cognome.value;
	var codicefiscale = document.contatto.codicefiscale.value;
	var indirizzo = document.contatto.indirizzo.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;
	var telefono = document.contatto.telefono.value;
	var cellulare = document.contatto.cellulare.value;
	var farmacia = document.contatto.farmacia.value;
	var sede = document.contatto.sede.value;
	var ruolo = document.contatto.ruolo.value;
	var email = document.contatto.email.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!nome) {
		msg += "devi inserire il nome.\n" ;
		sw = 1 ;
		}
		
		if (!cognome) {
		msg += "devi inserire il cognome.\n" ;
		sw = 1 ;
		}
		if (!codicefiscale) {
		msg += "devi inserire il codice fiscale.\n" ;
		sw = 1 ;
		}
		if (!indirizzo) {
		msg += "devi inserire l\' indirizzo.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		if (!telefono) {
		msg += "devi inserire il telefono.\n" ;
		sw = 1 ;
		}	
		if (!cellulare) {
		msg += "devi inserire il cellulare.\n" ;
		sw = 1 ;
		}			
		if (!farmacia) {
		msg += "devi inserire la farmacia.\n" ;
		sw = 1 ;
		}	
		if (!sede) {
		msg += "devi inserire la sede.\n" ;
		sw = 1 ;
		}
		if (!ruolo) {
		msg += "devi inserire il ruolo.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}		
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}



function checkform_expo() {
	var sw = 0;
	var msg = '';
	var ragione_sociale = document.contatto.ragione_sociale.value;
	var settore = document.contatto.settore.value;
	var indirizzo = document.contatto.indirizzo.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;
	var telefono = document.contatto.telefono.value;
	var cellulare = document.contatto.cellulare.value;
	var fax = document.contatto.fax.value;
	var referente = document.contatto.referente.value;
	var qualifica = document.contatto.qualifica.value;
	var email = document.contatto.email.value;
	var sito = document.contatto.sito.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!ragione_sociale) {
		msg += "devi inserire la ragione sociale.\n" ;
		sw = 1 ;
		}
		
		if (!settore) {
		msg += "devi inserire il settore.\n" ;
		sw = 1 ;
		}
		if (!indirizzo) {
		msg += "devi inserire l\' indirizzo.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		if (!telefono) {
		msg += "devi inserire il telefono.\n" ;
		sw = 1 ;
		}	
		if (!cellulare) {
		msg += "devi inserire il cellulare.\n" ;
		sw = 1 ;
		}			
		if (!fax) {
		msg += "devi inserire il fax.\n" ;
		sw = 1 ;
		}	
		if (!referente) {
		msg += "devi inserire il referente.\n" ;
		sw = 1 ;
		}
		if (!qualifica) {
		msg += "devi inserire la qualifica.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}
		if (!sito) {
		msg += "devi inserire il sito.\n" ;
		sw = 1 ;
		}		
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}

function checkform_press() {
	var sw = 0;
	var msg = '';
	var nome = document.contatto.nome.value;
	var cognome = document.contatto.cognome.value;
	var email = document.contatto.email.value;
	var testata = document.contatto.testata.value;
	var n_tessera = document.contatto.n_tessera.value;
	var indirizzo = document.contatto.indirizzo.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;
	var provincia = document.contatto.provincia.value;
	var regione = document.contatto.regione.value;
	var telefono = document.contatto.telefono.value;
	var cellulare = document.contatto.cellulare.value;
	var fax = document.contatto.fax.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!nome) {
		msg += "devi inserire il nome.\n" ;
		sw = 1 ;
		}
		
		if (!cognome) {
		msg += "devi inserire il cognome.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}
		if (!testata) {
		msg += "devi inserire la testata.\n" ;
		sw = 1 ;
		}
		if (!n_tessera) {
		msg += "devi inserire in n di tessera.\n" ;
		sw = 1 ;
		}
		if (!indirizzo) {
		msg += "devi inserire l\' indirizzo.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		if (!provincia) {
		msg += "devi inserire la provincia.\n" ;
		sw = 1 ;
		}
		if (!regione) {
		msg += "devi inserire la regione.\n" ;
		sw = 1 ;
		}
		if (!telefono) {
		msg += "devi inserire il telefono.\n" ;
		sw = 1 ;
		}	
		if (!cellulare) {
		msg += "devi inserire il cellulare.\n" ;
		sw = 1 ;
		}			
		if (!fax) {
		msg += "devi inserire il fax.\n" ;
		sw = 1 ;
		}		
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}

function checkform_contatti() {
	var sw = 0;
	var msg = '';
	var nome = document.contatto.nome.value;
	var cognome = document.contatto.cognome.value;
	var email = document.contatto.email.value;
	var indirizzo = document.contatto.indirizzo.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;
	var provincia = document.contatto.provincia.value;
	var regione = document.contatto.regione.value;
	var telefono = document.contatto.telefono.value;
	var cellulare = document.contatto.cellulare.value;
	var fax = document.contatto.fax.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!nome) {
		msg += "devi inserire il nome.\n" ;
		sw = 1 ;
		}
		
		if (!cognome) {
		msg += "devi inserire il cognome.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}
		if (!indirizzo) {
		msg += "devi inserire l\' indirizzo.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		if (!provincia) {
		msg += "devi inserire la provincia.\n" ;
		sw = 1 ;
		}
		if (!regione) {
		msg += "devi inserire la regione.\n" ;
		sw = 1 ;
		}
		if (!telefono) {
		msg += "devi inserire il telefono.\n" ;
		sw = 1 ;
		}	
		if (!cellulare) {
		msg += "devi inserire il cellulare.\n" ;
		sw = 1 ;
		}			
		if (!fax) {
		msg += "devi inserire il fax.\n" ;
		sw = 1 ;
		}		
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}

function checkform_visitatori() {
	var sw = 0;
	var msg = '';
	var nome = document.contatto.nome.value;
	var cognome = document.contatto.cognome.value;
	var email = document.contatto.email.value;
	var azienda = document.contatto.azienda.value;
	var indirizzo = document.contatto.indirizzo.value;
	var citta = document.contatto.citta.value;
	var cap = document.contatto.cap.value;
	var provincia = document.contatto.provincia.value;
	var regione = document.contatto.regione.value;
	var telefono = document.contatto.telefono.value;
	var cellulare = document.contatto.cellulare.value;
	var fax = document.contatto.fax.value;

	var the_box1 = document.contatto.checklegge[0].checked;
		
		var x = document.contatto.email.value;
		var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		if (filter.test(x)) {
		//alert('YES! Correct email address');
		} else {
		
		msg += "Indirizzo email inesatto.\n" ;
		
		sw = 1 ;	
		} 


		if (!nome) {
		msg += "devi inserire il nome.\n" ;
		sw = 1 ;
		}
		
		if (!cognome) {
		msg += "devi inserire il cognome.\n" ;
		sw = 1 ;
		}
		if (!email) {
		msg += "devi inserire l\' email.\n" ;
		sw = 1 ;
		}
		if (!azienda) {
		msg += "devi inserire l\' l'azienda.\n" ;
		sw = 1 ;
		}
		if (!indirizzo) {
		msg += "devi inserire l\' indirizzo.\n" ;
		sw = 1 ;
		}
		if (!citta) {
		msg += "devi inserire la citta.\n" ;
		sw = 1 ;
		}
		if (!cap) {
		msg += "devi inserire il cap.\n" ;
		sw = 1 ;
		}
		if (!provincia) {
		msg += "devi inserire la provincia.\n" ;
		sw = 1 ;
		}
		if (!regione) {
		msg += "devi inserire la regione.\n" ;
		sw = 1 ;
		}
		if (!telefono) {
		msg += "devi inserire il telefono.\n" ;
		sw = 1 ;
		}	
		if (!cellulare) {
		msg += "devi inserire il cellulare.\n" ;
		sw = 1 ;
		}			
		if (!fax) {
		msg += "devi inserire il fax.\n" ;
		sw = 1 ;
		}		
		
		if (the_box1 == true) {
		msg += "Devi accettare la clausola.\n" ;
		
		sw = 1 ;
		}
		
		
		
		if(sw == 1 ) {
			
			alert(msg);
			return false ;
		
		}

}
