

function fadeIn(nombre) {
    var imagen = document.getElementById(nombre);
    if (imagen.style.filter) {
        var opacidad = imagen.style.filter.replace('alpha(opacity=','');
        opacidad = opacidad.replace(')','');
        if (eval(opacidad) < 100) {
            opacidad = eval(opacidad) + 5;
            imagen.style.filter = "alpha(opacity="+opacidad+")";
            setTimeout("fadeIn('"+nombre+"')",50);
        };

    } else if (imagen.style.opacity) {
        if (imagen.style.opacity < 1.0) {
            imagen.style.opacity = eval(imagen.style.opacity) + 0.05;
            setTimeout("fadeIn('"+nombre+"')",50);
        };
    };
};




function fadeOut(nombre) {
    var imagen = document.getElementById(nombre);
    if (imagen.style.filter) {
        var opacidad = imagen.style.filter.replace('alpha(opacity=','');
        opacidad = opacidad.replace(')','');
        if (eval(opacidad) > 0) {
            opacidad = eval(opacidad) - 5;
            imagen.style.filter = "alpha(opacity="+opacidad+")";
            setTimeout("fadeOut('"+nombre+"')",50);
        };
    } else if (imagen.style.opacity) {
        if (imagen.style.opacity > 0.0) {
            imagen.style.opacity = eval(imagen.style.opacity) - 0.05;
            setTimeout("fadeOut('"+nombre+"')",50);
        };
    };
};




function disappear(nombre) {
    var imagen = document.getElementById(nombre);
    if (imagen.style.filter) {
        imagen.style.filter = "alpha(opacity=0)";
    } else if (imagen.style.opacity) {
        imagen.style.opacity = 0.0;
    };
};

