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 CambiarPatrocinadores(id){
    location.href = "frmpatrocinadores.php?idcategoria="+id;
}
function CambiarSemincitv(id){
    location.href = "frmsemincitv.php?idcategoria="+id;
}
function CambiarParticipantes(id){
    location.href = "frmparticipantes.php?idcategoria="+id;
}
function CambiarNoticias(id){
    location.href = "frmnoticias.php?idcategoria="+id;
}
function CambiarAgenda(id){
    location.href = "frmagenda.php?idcategoria="+id;
}
function CambiarFotos(id){
    location.href = "frmfotos.php?idcategoria="+id;
}
function MM_effectBlind(targetElement, duration, from, to, toggle){
    Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
    Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function Contacto(){
    bool = false; 
    if(document.getElementById('Nombre').value == '' || document.getElementById('Nombre').value == 'nombre') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('Nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('Apellidos').value == '' || document.getElementById('Apellidos').value == 'apellidos') {
            bool = false;
            alert('Apellidos obligatorios');
            document.getElementById('Apellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('Email').value == '' || document.getElementById('Email').value == 'email') {
            bool = false;
            alert('Email obligatorio');
            document.getElementById('Email').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('Observaciones').value == '' || document.getElementById('Observaciones').value == 'comentario') {
            bool = false;
            alert('Comentario obligatorio');
            document.getElementById('Observaciones').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function Acreditaciones(){
    bool = false; 
    if(document.getElementById('Nombre').value == '' || document.getElementById('Nombre').value == 'nombre') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('Nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('Apellidos').value == '' || document.getElementById('Apellidos').value == 'apellidos') {
            bool = false;
            alert('Apellidos obligatorios');
            document.getElementById('Apellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('Empresa').value == '' || document.getElementById('Empresa').value == 'empresa') {
            bool = false;
            alert('Empresa obligatoria');
            document.getElementById('Empresa').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('Email').value == '' || document.getElementById('Email').value == 'email') {
            bool = false;
            alert('Email obligatorio');
            document.getElementById('Email').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('Observaciones').value == '' || document.getElementById('Observaciones').value == 'comentario') {
            bool = false;
            alert('Comentario obligatorio');
            document.getElementById('Observaciones').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function Datos(){
    bool = false; 
    if(document.getElementById('usunombre').value == '') {
        bool = false;
        alert('Nombre obligatorio');
        document.getElementById('usunombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('usuemail').value == '') {
            bool = false;
            alert('Email obligatorio');
            document.getElementById('usuemail').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('usupwd').value == '') {
            bool = false;
            alert('Contraseña obligatoria');
            document.getElementById('usupwd').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('usuempresa').value == '') {
            bool = false;
            alert('Empresa obligatoria');
            document.getElementById('usuempresa').focus();
        }
        else{
            bool = true;
        }
    }
    
    if(bool){
        if(document.getElementById('usutelefono').value == '') {
            bool = false;
            alert('Teléfono obligatorio');
            document.getElementById('usutelefono').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function Cerrar(id){
    //alert('Id '+id);
    //alert('Id 2 '+document.getElementById('submenu2').style.display);
    /*if(id == 1){
        document.getElementById('menuprinci_menuprinci_1').backgroundImage = "url(../imagenes/botonmenuon.gif)";   
    }
    alert('Hola '+document.getElementById('menuprinci_menuprinci_1').backgroundImage);*/
    //alert('Hola '+document.getElementById('menuprinci_menuprinci_2').style.display);
    /*if(id != 1 && document.getElementById('menuprinci_menuprinci_1').style.display == 'block'){
        MM_effectBlind('submenu1', 500, '100%', '0%', false);
        document.getElementById('menuprinci_menuprinci_1').style.display == 'none';
    }*/
    //if(id != 2){
        //MM_effectBlind('submenu2', 500, '100%', '0', false);
        //document.getElementById('menuprinci_menuprinci_2').style.display == 'none';
    //}
    /*if(id != 3 && document.getElementById('menuprinci_menuprinci_3').style.display == 'block'){
        MM_effectBlind('submenu3', 500, '100%', '0%', false);
        document.getElementById('menuprinci_menuprinci_3').style.display == 'none';
    }
    if(id != 4 && document.getElementById('menuprinci_menuprinci_4').style.display == 'block'){
        MM_effectBlind('submenu4', 500, '100%', '0%', false);
        document.getElementById('menuprinci_menuprinci_4').style.display == 'none';
    }
    if(id != 5 && document.getElementById('menuprinci_menuprinci_5').style.display == 'block'){
        MM_effectBlind('submenu5', 500, '100%', '0%', false);
        document.getElementById('menuprinci_menuprinci_5').style.display == 'none';
    }
    if(id != 6 && document.getElementById('menuprinci_menuprinci_6').style.display == 'block'){
        MM_effectBlind('submenu6', 500, '100%', '0%', false);
        document.getElementById('menuprinci_menuprinci_6').style.display == 'none';
    }*/
}
