function fade(){
    this.tiempo1=20;
    this.tiempo2=8000; //tiempo que dura la noticia

    this.vofertas=new Array();
    cont_of=document.getElementById('fade');
    long_nodos=cont_of.childNodes.length;
    for(q=0;q<long_nodos;q++){  
        of=cont_of.firstChild;  
        this.vofertas[q]=of; 
        cont_of.removeChild(of);
        of.style.display='block';     
    }
    
    cont_of.appendChild(this.vofertas[0]);
    
    this.total=this.vofertas.length;
    this.actual=0;
    this.opacidad=100;
    this.apareciendo=false; //indica si está apareciendo o desapareciendo la publicacion
         
    this.accion=function(){  
        if (this.opacidad>0){
            if (this.apareciendo){
                cantidad=2;
            }else{
                cantidad=-2;
            }
            this.opacidad+=cantidad;       
            cambiarOpacidad(this.vofertas[this.actual],this.opacidad);
            if (this.opacidad<100){
                window.setTimeout("obj_fade.accion()",this.tiempo1);
            }else{ 
                this.apareciendo=!this.apareciendo;
                window.setTimeout("obj_fade.accion()",this.tiempo2);
            }
        }else{
                this.apareciendo=!this.apareciendo;  
                antiguo=this.vofertas[this.actual];
                this.actual++;
                if (this.actual==this.total) this.actual=0; 
                document.getElementById('fade').replaceChild(this.vofertas[this.actual],antiguo);
                this.opacidad+=2;
                window.setTimeout("obj_fade.accion()",this.tiempo1);
        } 
    }
    
    this.accion();
    
}

document.write('<style>#pie{overflow:hidden}');
document.write('.oculta{filter:alpha(opacity=0);-moz-opacity:0; opacity: 0; display:none;}</style>');