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 CambiarSubCategoria(id,pagina){
    location.href = pagina+".php?idsubcategoria="+id+"&idcategoria="+document.getElementById('idcategoria').value;
}

function Propon(){
    bool = false; 
    if(document.getElementById('nombre').value == '' || document.getElementById('nombre').value == 'Escribe tu nombre') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('code').value == '' || document.getElementById('code').value == 'Escribe lo que ves en la imagen') {
            bool = false;
            alert('Código de verificación obligatorio');
            document.getElementById('code').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('comentario').value == '' || document.getElementById('comentario').value == 'Escribe tu desafío') {
            bool = false;
            alert('Desafío propuesto obligatorio');
            document.getElementById('comentario').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}

function Opinion(){
    bool = false; 
    if(document.getElementById('nombre').value == '' || document.getElementById('nombre').value == 'Escribe tu nombre') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('code').value == '' || document.getElementById('code').value == 'Escribe lo que ves en la imagen') {
            bool = false;
            alert('Código de verificación obligatorio');
            document.getElementById('code').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('comentario').value == '' || document.getElementById('comentario').value == 'Escribe tu comentario') {
            bool = false;
            alert('Comentario obligatorio');
            document.getElementById('comentario').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}

function Contacto(){
    bool = false; 
    if(document.getElementById('nombre').value == '' || document.getElementById('nombre').value == 'Escribe tu nombre') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('code').value == '' || document.getElementById('code').value == 'Escribe lo que ves en la imagen') {
            bool = false;
            alert('Código de verificación obligatorio');
            document.getElementById('code').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('comentario').value == '' || document.getElementById('comentario').value == 'Escribe tu comentario') {
            bool = false;
            alert('Comentario obligatorio');
            document.getElementById('comentario').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}