<!-- 
    function check_users_auth_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_login.value,4,255)) {
            err_msg +="Login mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_password.value,4,32)) {
            err_msg +="Password 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_tell_friend_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.tell_user_name.value,4,255) || pForm.tell_user_name.value=="inserisci il tuo nome") {
            err_msg +="Nome del vostro amico mancante o valore non valido.\n";
        }
        if (!is_present(pForm.tell_friend_email.value,4,32) || pForm.tell_friend_email.value=="inserisci e-mail a cui inviare") {
            err_msg +="E-Mail del vostro amico 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_order_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_company.value,2,32)) {
            err_msg +="Fatturare a: Azienda mancante o valore non valido.\n"
        }


        if (!is_present(pForm.user_last_name.value,2,32)) {
            err_msg +="Fatturare a: Cognome mancante o valore non valido.\n"
        }





        if (!is_present(pForm.user_city.value,2,64)) {
            err_msg +="Fatturare a: Citta' mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_state.value,2,64)) {
            err_msg +="Fatturare a: Provincia mancante o valore non valido.\n"
        }



        if (pForm.delivery_company.value || pForm.delivery_first_name.value || pForm.delivery_last_name.value || pForm.delivery_address.value || pForm.delivery_city.value) {
            if (!is_present(pForm.delivery_company.value,2,32)) {
                err_msg +="Spedire a: Azienda mancante o valore non valido.\n"
            }
            if (!is_present(pForm.delivery_last_name.value,2,32)) {
                err_msg +="Spedire a: Cognome mancante o valore non valido.\n"
            }




            if (!is_present(pForm.delivery_city.value,2,64)) {
                err_msg +="Spedire a: Citta' mancante o valore non valido.\n"
            }
            if (!is_present(pForm.delivery_state.value,2,64)) {
                err_msg +="Spedire a: Provincia 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_users_delivery_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.delivery_first_name.value,2,32)) {
            err_msg +="Nome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_last_name.value,2,32)) {
            err_msg +="Cognome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_address.value,4)) {
            err_msg +="Indirizzo mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_apartment.value,1)) {
            err_msg +="Numero civico mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_zip.value,2,16)) {
            err_msg +="CAP mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_city.value,2,64)) {
            err_msg +="Citta' mancante o valore non valido.\n"
        }
        if (!is_present(pForm.delivery_state.value,2,64)) {
            err_msg +="Provincia mancante o valore non valido.\n"
        }
        if (pForm.delivery_country_code_3.value=="@@") {
            err_msg +="Nazione 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_newsletter_subscription_form(pForm) {
        var err_msg="";
        if (!is_email(pForm.mlist_user_email.value,2)) {
            err_msg +="Indirizzo 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_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_login.value,6,255)) {
            err_msg +="User ID mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_password_old.value,6,32)) {
            err_msg +="Vecchia password mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_password_new.value,6,32)) {
            err_msg +="Nuova password mancante o valore non valido.\n";
        }
        if (!is_present(pForm.user_password_confirm.value,6,32)) {
            err_msg +="Conferma password mancante o valore non valido.\n";
        }
        if (pForm.user_password_new.value!=pForm.user_password_confirm.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_subscription_form(pForm) {
        var err_msg="";
        if (!is_present(pForm.user_company.value,2,32)) {
            err_msg +="Azienda mancante o valore non valido.\n"
        }


        if (!is_present(pForm.user_last_name.value,2,32)) {
            err_msg +="Cognome mancante o valore non valido.\n"
        }



        if (!is_present(pForm.user_city.value,2,64)) {
            err_msg +="Citta' mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_state.value,2,64)) {
            err_msg +="Provincia mancante o valore non valido.\n"
        }



        if (!is_email(pForm.user_email.value)) {
            err_msg +="E-Mail dell'utente 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_users_update_form(pForm) {
        var err_msg="";
        if (pForm.user_type[1].checked || pForm.user_type[2].checked) {
            if (pForm.user_country_code_3.value=="ITA") {
            if (!is_present(pForm.user_company.value,2,32)) {
                err_msg +="Azienda mancante o valore non valido.\n"
            }
            if (!is_present(pForm.user_vat.value,11,11)) {
                err_msg +="Partita IVA mancante o valore non valido.\n"
            }
            }
        } else {
            if (!is_present(pForm.user_vat.value,2,32)) {
                err_msg +="Codice Fiscale mancante.\n"
            }
        }
        if (!is_present(pForm.user_first_name.value,2,32)) {
            err_msg +="Nome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_last_name.value,2,32)) {
            err_msg +="Cognome mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_door_name.value,2,32)) {
            err_msg +="Presso mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_address.value,4)) {
            err_msg +="Indirizzo mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_apartment.value,1)) {
            err_msg +="Numero civico mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_zip.value,2,16)) {
            err_msg +="CAP mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_city.value,2,64)) {
            err_msg +="Citta' mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_state.value,2,64)) {
            err_msg +="Provincia mancante o valore non valido.\n"
        }
        if (!is_present(pForm.user_phone.value,2,64) && !is_present(pForm.user_mobile.value,2,64)) {
            err_msg +="Telefono fisso mancante, al limite indicare un telefono cellulare nel campo apposito.\n"
        }
        if (!pForm.statement_1[0].checked) {
            err_msg +="Non e' stata accettata la clausola sul trattamento dei dati personali.\n";
        }
        if (pForm.user_country_code_3.value=="@@") {
            err_msg +="Nazione mancante o valore non valido.\n";
        }
        if (!is_email(pForm.user_email.value)) {
            err_msg +="E-Mail dell'utente 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_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;
        }
    }

-->
