function esIE() {
    if (document.all) {
        return true;
    }
    return false;
}

function aceptarNumeros(evt){

    var key = null;
    if (esIE()) {
        key = evt.keyCode;
    } else {
        key = evt.which;
    }
    return (key == 95 || key == 9 || key == 127 || key == 8 || (key >= 48 && key <= 57));
}

function newImage( imgSrc ){

    var imgName = new Image();
    imgName.src = imgSrc;

    return imgName;

}

function change( imgName, imgLocation )
{
    //alert("hola mundo");
    document[imgName].src = imgLocation ;

}

var preloadFlag = false;
function loadImages()
{
    if (document.images)
    {
        //****Edit this list to include rollover state images ****
        //****Example: aboutus_over = newImage( "images/aboutus-over.gif" );
        home_over = newImage("images/img4/inicio.jpg");

        preloadFlag = true;
    }
}

function changeOver(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/inicio-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';

}
function changeOut(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/inicio.jpg)";
}


function changeOverCp(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/concurso-servicio-publico-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutCp(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/concurso-servicio-publico.jpg)";
}
function changeOverOs(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/otros-servicios-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutOs(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/otros-servicios.jpg)";
}

function changeOverAm(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/red-de-apoyo-a-migrantes-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutAm(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/red-de-apoyo-a-migrantes.jpg)";
}

function changeOverNr(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/noticias-recientes-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutNr(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/noticias-recientes.jpg)";
}

function changeOverCo(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/contactos-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutCo(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img4/contactos.jpg)";
}

function changeOverBe(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img5/cabecera-busco-empleo-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutBe(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img5/cabecera-busco-empleo.jpg)";
}
function changeOverBp(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img/cabecera-busco-personal-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutBp(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img/cabecera-busco-personal.jpg)";
}
function changeOverTc(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img6/casinos-d.jpg)";
    elem.style.cursor = 'pointer';
    elem.style.cursor = 'hand';
}
function changeOutTc(id)
{
    var elem = document.getElementById(id);
    elem.style.backgroundImage = "url(images/img6/casinos.jpg)";
}


