function CambiarPwd(){
    bool = false; 
    if(document.getElementById('admpwd').value != document.getElementById('admpwd2').value) {
        bool = false;
        alert("Las contraseñas no coinciden");
        document.getElementById('admpwd2').focus();
    }
    else{
        bool = true;
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function MM_effectBlind(targetElement, duration, from, to, toggle)
{
    Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function CambiarCategoria(id,pagina){
    location.href = pagina+".php?idcategoria="+id;
}
function ValidarFrmRecomendar(){
    bool = false; 
    if(document.getElementById('txtNombre').value == '' || document.getElementById('txtNombre').value == document.getElementById('obligatorio').value) {
        bool = false;
        alert(document.getElementById('obligatorio2').value);
        document.getElementById('txtNombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('txtNombreAmigo').value == '' || document.getElementById('txtNombreAmigo').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('txtNombreAmigo').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('txtEmail').value == '' || document.getElementById('txtEmail').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('txtEmail').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('txtEmailAmigo').value == '' || document.getElementById('txtEmailAmigo').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('txtEmailAmigo').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        alert(document.getElementById('obligatorio3').value);
        document.getElementById('frmRecomendar').submit();
    }
}
function Contacto(){
    bool = false; 
    if(document.getElementById('Empresa').value == '' || document.getElementById('Empresa').value == document.getElementById('obligatorio').value) {
        bool = false;
        alert(document.getElementById('obligatorio2').value);
        document.getElementById('Empresa').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('Nombre').value == '' || document.getElementById('Nombre').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('Nombre').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('Telefono').value == '' || document.getElementById('Telefono').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('Telefono').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('email').value == '' || document.getElementById('email').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('email').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('Asunto').value == '' || document.getElementById('Asunto').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('Asunto').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('Comentarios').value == '' || document.getElementById('Comentarios').value == document.getElementById('obligatorio').value) {
            bool = false;
            alert(document.getElementById('obligatorio2').value);
            document.getElementById('Comentarios').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        document.getElementById('frmprensa').submit();
    } 
}
