function controllo(){
if (document.theForm.ragsociale.value=="")
  {
	alert("Il campo Ragione Sociale e' obbligatorio");
	document.theForm.ragsociale.focus();
	return (false);
  } 
if (document.theForm.citta.value=="")
  {
	alert("Il campo Citta' e' obbligatorio");
	document.theForm.citta.focus();
	return (false);
  }
if (document.theForm.telefono.value=="")
  {
	alert("Il campo Telefono e' obbligatorio");
	document.theForm.telefono.focus();
	return (false);
  } 
var telef_reg_exp = /^([0-9]{5,})+$/;
if (!telef_reg_exp.test(document.theForm.telefono.value)) {
	alert("Inserire un numero di Telefono corretto");
	document.theForm.telefono.focus();
	return false;
 }
if (document.theForm.email.value=="")
  {
	alert("Il campo E-Mail e' obbligatorio");
	document.theForm.email.focus();
	return (false);
  } 
var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
if (!email_reg_exp.test(document.theForm.email.value)) {
	alert("Inserire un indirizzo E-mail corretto");
	document.theForm.email.focus();
	return false;
 }
if (document.theForm.testo.value=="")
  {
	alert("Il campo Note e' obbligatorio");
	document.theForm.testo.focus();
	return (false);
  }
return true;
}

function valida(mailingList) {
if (document.mailingList.userName.value=="")
  {
	alert("Il campo Nome e' obbligatorio");
	document.mailingList.userName.focus();
	return (false);
  }
if (document.mailingList.userEmail.value=="")
  {
	alert("Il campo Email e' obbligatorio");
	document.mailingList.userEmail.focus();
	return (false);
  }
var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
if (!email_reg_exp.test(document.mailingList.userEmail.value)) {
	alert("Inserire un indirizzo E-mail corretto");
	document.mailingList.userEmail.focus();
	return false;
 }
return true;
}
