//<!--

function validate_mail (inp_str) {
return (inp_str.search (/\w+@\w+(.\w+)+/) != -1);
}


function Form1_Validator(theForm)
{

if (theForm.email.value == "" || theForm.email.value.indexOf('@', 0) == -1) {

alert("Email non valida!");
theForm.email.focus();
return (false);

}

if (!validate_mail (theForm.email.value)) {

alert("Email non valida!");
theForm.email.focus();
return (false);
}


if (theForm.testo.value == "")
{
alert("Inserite il testo del messaggio.");
theForm.testo.focus();
return (false);
}


if (!(theForm[2].checked)) {
alert('Per poter utilizzare il servizio dovete autorizzare il trattamento dei Vs. dati');
theForm[2].focus();
return (false);

}
return (true);
}


//-->

