function checkInput(theForm) {
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

	if ((theForm.nome.value==0) && (theForm.nome.value.length<=0)) {
		alert("Name missing !");
		theForm.nome.focus();
		return false
	}

	if ((theForm.cognome.value==0) && (theForm.cognome.value.length<=0)) {
		alert("Surname missing !");
		theForm.cognome.focus();
		return false
	}

	if ((theForm.azienda.value==0) && (theForm.azienda.value.length<=0)) {
		alert("Company missing !");
		theForm.azienda.focus();
		return false
	}
	
	if ((theForm.citta.value==0) && (theForm.citta.value.length<=0)) {
		alert("City missing !");
		theForm.citta.focus();
		return false
	}
	
	if ((theForm.stato.value==0) && (theForm.stato.value.length<=0)) {
		alert("Country missing !");
		theForm.stato.focus();
		return false
	}
	
	if ((theForm.telefono.value==0) && (theForm.telefono.value.length<=0)) {
		alert("Phone number missing !");
		theForm.telefono.focus();
		return false
	}

	if ((theForm.email.value==0) && (theForm.email.value.length<=0)) {
		alert("E-mail missing !");
		theForm.email.focus();
		return false
		}

	else if (!email_reg_exp.test(theForm.email.value)){
		alert("E-mail not correct !");
		return false
		}

	if ((theForm.note.value==0) && (theForm.note.value.length<=0)) {
		alert("Notes missing !");
		theForm.note.focus();
		return false
	}

	if (!theForm.privacy.checked) {
		alert("Privacy consent not given !");
		return false
		}

/*	if ((theForm.key.value==0) && (theForm.key.value.length<=0)) {
		alert("Control code not entered !");
		theForm.key.focus();
		return false
	}
*/
}