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 CambiarProvincia(id){
    location.href = "frmparques.php?idprovincia="+id;
}
function CambiarMunicipio(id){
    location.href = "frmparques.php?idprovincia="+document.getElementById('idprovincia').value+"&idmunicipio="+id;
}
function CambiarProvincia2(id){
    location.href = "frmparqueseditar.php?idprovincia="+id+"&fi="+document.getElementById('fi').value;
}
function CambiarMunicipio2(id){
    location.href = "frmparqueseditar.php?idprovincia="+document.getElementById('idprovincia').value+"&idmunicipio="+id+"&fi="+document.getElementById('fi').value;
}

//web
function MM_effectBlind(targetElement, duration, from, to, toggle)
{
    Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function MM_effectSlide(targetElement, duration, from, to, toggle)
{
    Spry.Effect.DoSlide(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
function ComprobarAlto(){
    MM_effectBlind("elementos", 500, "100%", "0%", false);
}
function ComprobarIncidencia(){
    bool = false; 
    if(document.getElementById('incparque').value == 0) {
        bool = false;
        alert(document.getElementById('txtoculto').value);
        document.getElementById('incparque').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('incnombre').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('incnombre').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('incapellidos').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('incapellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('inctelefono').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('inctelefono').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('incemail').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('incemail').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('inctexto').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('inctexto').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function ComprobarContacto(){
    bool = false; 
    if(document.getElementById('nombre').value == '') {
        bool = false;
        alert(document.getElementById('txtoculto').value);
        document.getElementById('nombre').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('apellidos').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('apellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('provincia').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('provincia').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('telefono').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('telefono').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('email').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('email').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('comentario').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('comentario').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function CargaMunicipios(id){
    location.href = "incidenciaspda.php?idprovincia="+id;
}
function CargaParques(id){
    location.href = "incidenciaspda.php?idprovincia="+document.getElementById('Provincia').value+"&idmunicipio="+id;
}
function CargaElementos(id){
    location.href = "incidenciaspda.php?idprovincia="+document.getElementById('Provincia').value+"&idmunicipio="+document.getElementById('Municipio').value+"&idparque="+id;
}
function ComprobarIncidenciaNo(){
    bool = false; 
    if(document.getElementById('innmunicipio').value == 0) {
        bool = false;
        alert(document.getElementById('txtoculto').value);
        document.getElementById('innmunicipio').focus();
    }
    else{
        bool = true;
    }
    if(bool){
        if(document.getElementById('innparque').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('innparque').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('innnombre').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('innnombre').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('innapellidos').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('innapellidos').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('inntelefono').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('inntelefono').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('innemail').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('innemail').focus();
        }
        else{
            bool = true;
        }
    }
    if(bool){
        if(document.getElementById('inntexto').value == '') {
            bool = false;
            alert(document.getElementById('txtoculto').value);
            document.getElementById('inntexto').focus();
        }
        else{
            bool = true;
        }
    } 
    if(bool){
        document.getElementById('frmdatos').submit();
    }   
}
function CargarProvincias(id){
    location.href = "incidencias.php?idpro="+id+"#frmdatos";
}
function CargarMunicipio(id){
    location.href = "incidencias.php?idmun="+id+"#frmdatos";
}