function CambiarPwd(){
    bool = false; 
    if(document.getElementById('adm_pwd').value == '') {
        bool = false;
        alert("Introduce la contraseña");
        document.getElementById('adm_pwd').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('adm_pwd').value != document.getElementById('adm_pwd2').value) {
            bool = false;
            alert("Las contraseñas no coinciden");
            document.getElementById('adm_pwd2').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarAgenda(){
    bool = false; 
    if(document.getElementById('age_nombre').value == '') {
        bool = false;
        alert("Introduce el titular");
        document.getElementById('age_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('age_texto').value == '') {
            bool = false;
            alert("Introduce el texto");
            document.getElementById('age_texto').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarUsuario(){
    bool = false; 
    if(document.getElementById('usu_nombre').value == '') {
        bool = false;
        alert("Introduce el nombre");
        document.getElementById('usu_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('usu_apellidos').value == '') {
            bool = false;
            alert("Introduce los apellidos");
            document.getElementById('usu_apellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('usu_email').value == '') {
            bool = false;
            alert("Introduce el email");
            document.getElementById('usu_email').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('usu_dni').value == '') {
            bool = false;
            alert("Introduce el DNI");
            document.getElementById('usu_dni').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarInstitucion(){
    bool = false; 
    if(document.getElementById('ins_nombre').value == '') {
        bool = false;
        alert("Introduce el nombre");
        document.getElementById('ins_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('ins_login').value == '') {
            bool = false;
            alert("Introduce el login");
            document.getElementById('ins_login').focus();
        }
        else{
            bool = true;
        }
    }         
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarArtista(){
    bool = false; 
    if(document.getElementById('usu_nombre').value == '') {
        bool = false;
        alert("Introduce el nombre");
        document.getElementById('usu_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('usu_apellidos').value == '') {
            bool = false;
            alert("Introduce los apellidos");
            document.getElementById('usu_apellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){ 
        if(document.getElementById('usu_email').value == '') {
            bool = false;
            alert("Introduce el email");
            document.getElementById('usu_email').focus();
        }
        else{
            bool = true;
        }
    }         
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarBiografia(){
    bool = false; 
    if(document.getElementById('art_biografia').value == '') {
        bool = false;
        alert("Introduce la biografia");
        document.getElementById('art_biografia').focus();
    }
    else{
        bool = true;
    }       
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarCurriculum(){
    bool = false; 
    if(document.getElementById('cur_fecha').value == '') {
        bool = false;
        alert("Introduce la fecha");
        document.getElementById('cur_fecha').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('cur_texto').value == '') {
            bool = false;
            alert("Introduce el texto");
            document.getElementById('cur_texto').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarExposiciones(){
    bool = false; 
    if(document.getElementById('exp_nombre').value == '') {
        bool = false;
        alert("Introduce el nombre");
        document.getElementById('exp_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('exp_fecha').value == '') {
            bool = false;
            alert("Introduce la fecha");
            document.getElementById('exp_fecha').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('exp_texto').value == '') {
            bool = false;
            alert("Introduce el texto");
            document.getElementById('exp_texto').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function CambiarObras(){
    bool = false; 
    if(document.getElementById('obr_nombre').value == '') {
        bool = false;
        alert("Introduce el nombre");
        document.getElementById('obr_nombre').focus();
    }
    else{
        bool = true;
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}

//PAGINa
function CambiarAutor(valor){
    if(valor.value != ''){
        location.href = "artista.php?id="+valor.value;
    }
}
function CambiarAutorEdicion(valor){
    if(valor.value != ''){
        location.href = "edicion.php?id="+valor.value;
    }
}
function OlvidoCon(){
    bool = false; 
    if(document.getElementById('email').value == '') {
        bool = false;
        alert("Introduce el email");
        document.getElementById('email').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('contrasena').value == '') {
            bool = false;
            alert("Introduce la nueva contraseña");
            document.getElementById('contrasena').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function Registro(){
    bool = false; 
    if(document.getElementById('usu_nombre').value == '' || document.getElementById('usu_nombre').value == 'Introduce tu nombre') {
        bool = false;
        alert("Introduce tu nombre");
        document.getElementById('checkacepto').checked = 0;
        document.getElementById('usu_nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('usu_apellidos').value == '' || document.getElementById('usu_apellidos').value == 'Introduce tus apellidos') {
            bool = false;
            alert("Introduce tus apellidos");
            document.getElementById('checkacepto').checked = 0;
            document.getElementById('usu_apellidos').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('usu_dni').value == '' || document.getElementById('usu_dni').value == 'Introduce tu DNI') {
            bool = false;
            alert("Introduce tu DNI");
            document.getElementById('checkacepto').checked = 0;
            document.getElementById('usu_dni').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('usu_email').value == '' || document.getElementById('usu_email').value == 'Introduce tu email') {
            bool = false;
            alert("Introduce tu email");
            document.getElementById('checkacepto').checked = 0;
            document.getElementById('usu_email').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('usu_pwd').value == '' || document.getElementById('usu_pwd').value == 'Contrasenia') {
            bool = false;
            alert("Introduce tu contraseña");
            document.getElementById('checkacepto').checked = 0;
            document.getElementById('usu_pwd').focus();
        }
        else{
            bool = true;
        }
    }
}

function EnviarRegistro(){
    Registro();
    if(document.getElementById('checkacepto').checked == 1){
        document.getElementById('frmdatos').submit();
    }
    else{
        alert("Tienes que aceptar las condiciones de registro");
        document.getElementById('checkacepto').focus();    
    }
}

function EnviarAceptacion(){
    if(document.getElementById('checkacepto').checked == 1){
        document.getElementById('frmdatos').submit();
    }
    else{
        alert("Tienes que aceptar el aviso legal");
        document.getElementById('checkacepto').focus();    
    }
}

function EnviarPanel(){
    bool = false; 
    if(document.getElementById('usu_email').value == '') {
        bool = false;
        alert("Introduce el email");
        document.getElementById('usu_email').focus();
    }
    else{
        bool = true;
    }      
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}

function EnviarPanelUsu(){
    bool = false; 
    if(document.getElementById('usu_email').value == '') {
        bool = false;
        alert("Introduce el email");
        document.getElementById('usu_email').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('usu_dni').value == '') {
            bool = false;
            alert("Introduce tu DNI");
            document.getElementById('usu_dni').focus();
        }
        else{
            bool = true;
        }
    }       
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}
function EnviarContacto(){
    bool = false; 
    if(document.getElementById('Nombre').value == '' || document.getElementById('Nombre').value == 'nombre') {
        bool = false;
        alert("Introduce el Nombre");
        document.getElementById('Nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){ 
        if(document.getElementById('Email').value == '' || document.getElementById('Email').value == 'email') {
            bool = false;
            alert("Introduce el email");
            document.getElementById('Email').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){ 
        if(document.getElementById('Texto').value == '' || document.getElementById('Texto').value == 'comentario') {
            bool = false;
            alert("Introduce el comentario");
            document.getElementById('Texto').focus();
        }
        else{
            bool = true;
        }
    }        
    if(bool){
        document.getElementById('frmdatos').submit();
    }
}

    
function start() {
    document.getElementById('preloader').style.display = 'block';
    
    
    var ns6 = (!document.all && document.getElementById);
    var ie4 = (document.all);
    var ns4 = (document.layers);
    
    if(ns6||ns4) {
        document.getElementById('container').style.MozOpacity=0.10;
        pageWidth = innerWidth;
        pageHeight = innerHeight;
    }
    else if(ie4) {
        document.getElementById('container').style.filter='alpha(opacity=10)';
        pageWidth = document.body.clientWidth;
        pageHeight = document.body.clientHeight;
    }
    location.href="#container";
    //document.getElementById('preloader').style.top=(pageWidth - 100)+'px';
}
function CambiarAnio(anio){
    location.href = "calendario.php?anio="+anio;
}
function Nada(){}