<!-- 
    function check_users_nomine_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.fornitore_name.value,1,255)) {
            err_msg +="FORNITORE: Nome mancante o valore non valido.\n";
        }
        if (!is_present(pForm.fornitore_phone.value,1,255)) {
            err_msg +="FORNITORE: Telefono mancante o valore non valido.\n";
        }
        if (!is_email(pForm.fornitore_email.value)) {
            err_msg +="FORNITORE: E-Mail mancante o valore non valido.\n";
        }
        if (!is_present(pForm.consignee_name.value,1,255)) {
            err_msg +="RICEVITORE: Nome mancante o valore non valido.\n";
        }
        if (!is_present(pForm.consignee_address.value,1,500)) {
            err_msg +="RICEVITORE: Indirizzo mancante o valore non valido.\n";
        }
        if (!is_email(pForm.consignee_email.value)) {
            err_msg +="RICEVITORE: E-Mail mancante o valore non valido.\n";
        }

        if (!is_present(pForm.port_of_loading.value,1,255)) {
            err_msg +="Porto di imbarco mancante o valore non valido.\n";
        }
        if (!is_present(pForm.terms.value,1,255)) {
            err_msg +="Resa mancante o valore non valido.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    function check_users_nomine_form2(pForm) {
        var err_msg="";
        if (!is_present(pForm.fornitore_name.value,1,255)) {
            err_msg +="FORNITORE: Nome mancante o valore non valido.\n";
        }
        if (!is_present(pForm.fornitore_phone.value,1,255)) {
            err_msg +="FORNITORE: Telefono mancante o valore non valido.\n";
        }
        if (!is_email(pForm.fornitore_email.value)) {
            err_msg +="FORNITORE: E-Mail mancante o valore non valido.\n";
        }
        if (!is_present(pForm.consignee_name.value,1,255)) {
            err_msg +="RICEVITORE: Nome mancante o valore non valido.\n";
        }
        if (!is_present(pForm.consignee_address.value,1,500)) {
            err_msg +="RICEVITORE: Indirizzo mancante o valore non valido.\n";
        }
        if (!is_email(pForm.consignee_email.value)) {
            err_msg +="RICEVITORE: E-Mail mancante o valore non valido.\n";
        }
        if (!is_present(pForm.notify_name.value,1,255)) {
            err_msg +="NOTIFICA: Nome mancante o valore non valido.\n";
        }
        if (!is_present(pForm.notify_phone.value,1,255)) {
            err_msg +="NOTIFICA: Telefono mancante o valore non valido.\n";
        }
        if (!is_email(pForm.notify_email.value)) {
            err_msg +="NOTIFICA: E-Mail mancante o valore non valido.\n";
        }
        if (!is_present(pForm.port_of_loading.value,1,255)) {
            err_msg +="Porto di imbarco mancante o valore non valido.\n";
        }
        if (!is_present(pForm.terms.value,1,255)) {
            err_msg +="Resa mancante o valore non valido.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    function check_users_auth_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_login.value,6,255)) {
            err_msg +="Login mancante o valore non valido (min. 6 max 255).\n";
        }
        if (!is_present(pForm.user_password.value,6,64)) {
            err_msg +="Password mancante o valore non valido (min 6. max 64).\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    
    function check_newsletters_form(pForm) {
        var err_msg="";
        if (!is_email(pForm.user_email.value,6,255) || pForm.user_email.value=='inserisci la tua e-mail') {
            err_msg +="e-Mail mancante o valore non valido ).\n";
        }

        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }

    function check_users_subscription_form(pForm) {
        var err_msg="";

        if (!is_present(pForm.user_first_name.value,2,64)) {
            err_msg +="Nome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_last_name.value,2,64)) {
            err_msg +="Cognome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_profession.value,2,64)) {
            err_msg +="Professione mancante o valore non valido.\n"
        }
        if (!is_email(pForm.user_email.value)) {
            err_msg +="E-Mail mancante o valore non valido.\n"
        }
        if (!pForm.statement_1[0].checked) {
            err_msg +="Non e' stata accettata la clausola sul trattamento dei dati personali.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    function check_contact_form(pForm) {
        var err_msg="";

        if (!is_present(pForm.contact_name.value,2,128)) {
            err_msg +="Nome richiedente mancante o valore non valido.\n"
        }


        if (!is_email(pForm.contact_email.value)) {
            err_msg +="E-Mail mancante o valore non valido.\n"
        }
        if (!pForm.statement_1[0].checked) {
            err_msg +="Non e' stata accettata la clausola sul trattamento dei dati personali.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    function check_websites_mod_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.website_name.value,2,255)) {
            err_msg +="Nome sito web mancante o valore non valido.\n"
        }
        if (!is_email(pForm.website_info_email.value)) {
            err_msg +="E-Mail INFO mancante o valore non valido.\n"
        }
        if (!is_email(pForm.website_newsletter_email.value)) {
            err_msg +="E-Mail NEWSLETTER mancante o valore non valido.\n"
        }
        if (!is_email(pForm.website_contact_email.value)) {
            err_msg +="E-Mail CONTATTO mancante o valore non valido.\n"
        }
        if (!is_email(pForm.website_webmaster_email.value)) {
            err_msg +="E-Mail WEBMASTER mancante o valore non valido.\n"
        }

        if (!is_present(pForm.website_url.value,7,255)) {
            err_msg +="URL mancante o valore non valido.\n"
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }

    function check_search_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.search_query.value,2)) {
            err_msg +="Non e' stato indicato nulla da cercare.\n(Minimo 2 caratteri)";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }

    function check_users_change_password_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_old_password.value,4,32)) {
            err_msg +="Password attuale mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_new_password.value,4,32)) {
            err_msg +="Nuova password mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_confirm_password.value,4,32)) {
            err_msg +="Conferma password mancante o valore non valido.\n";
        }
        if (pForm.user_new_password.value!=pForm.user_confirm_password.value) {
            err_msg +="I campi nuova password e conferma password contengono valori diversi.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    
    function check_users_retrieve_password_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_login.value,4,255)) {
            err_msg +="Login mancante o valore non valido.\n";
        }
        if (err_msg!="") {
            err_msg="ATTENZIONE!\n\n"+err_msg;
            alert(err_msg);
            err_msg="";
            return false;
        } else {
            return true;
        }
    }
    
    function check_colors() {
        if (document.users_mod_form.user_type.value == 2) {
            document.getElementById('company').style.color='#CC0033';
            document.getElementById('vat').style.color='#CC0033';
            document.getElementById('last_name').style.color='#000000';
            document.getElementById('first_name').style.color='#000000';
        } else {
            document.getElementById('company').style.color='#000000';
            document.getElementById('vat').style.color='#000000';
            document.getElementById('last_name').style.color='#CC0033';
            document.getElementById('first_name').style.color='#CC0033';
        }
    }

-->

