function validateForm(frm){
    if(!isEmail(document.frm.CEMAIL,'Email')){
        return false;
    }

    if(document.frm.CPWD.value == "" || document.frm.CPWD.value.length < 8 || document.frm.CPWD.value.length > 20){
        alert("La contraseņa debe contener al menos 8 caracteres");
        document.frm.CPWD.focus();
        return (false);
    }
}
function recupera_pass(){
    if(!isEmail(document.frm.CEMAIL,'Email')){
        return false;
    }

    if(confirm("Confirmar solicitar de la contraseņa?")){
        var buf  = "CEMAIL="+document.frm.CEMAIL.value;
        var risp = getResponse(sitourl+"richiesta-password.asp",buf);
        if(String(risp) == "OK"){
            initiateModalDialog('rich_pass_ok');
            openModalDialog('rich_pass_ok');
        }else{
            initiateModalDialog('rich_pass_ko');
            openModalDialog('rich_pass_ko');
        }
        return true;
    }
    return false;
}
