function verEmail(stringa) {
   if (stringa.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
   return true;
   else return false;
}

function controllo(f) {
var msgErrore = '';
var email=f.email;

if (email.value == "")
	{ msgErrore+="- E-mail è obbligatorio.\r"; }
else
	{
	if (!verEmail(email.value))
	{ msgErrore+="- Inserire un indirizzo e-mail corretto.\r"; }
	}

if (msgErrore != '')
	{
	msgErrore = "Si sono verificati i seguenti errori:\r\r" + msgErrore;
	alert(msgErrore);
	return false;
	}
return true;
}
