function controllo(){
    var email = document.getElementById('email').value;
    var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
    var strError = new String("");
    var tmpErrorField = new String("");

    if (document.getElementById('testo').value == "") tmpErrorField = tmpErrorField.concat(" - Testo\n");
    if (!document.getElementById('privacy').checked) tmpErrorField = tmpErrorField.concat(" - Autorizzazione Privacy\n");


    if ((email == "") || (email == "undefined"))
    {
           document.getElementById('email').select();
           tmpErrorField = tmpErrorField.concat(" - E-Mail\n");
    }else if(!email_reg_exp.test(email))
    {
        document.getElementById('email').select();
        tmpErrorField = tmpErrorField.concat("\nL'email è errata\n");
    };


    if (tmpErrorField.length) {
        strError = strError.concat("Attenzione!!\n\nNon sono stati valorizzati i seguenti campi obbligatori:\n", tmpErrorField);
    };

    if (strError.length) {
        alert(strError);
        return false;
    } else {
        return true;
    };
}