    function transicion(curva,ms,callback){
                this.ant=0.01;
                this.done_=false;
                var _this=this;
                this.start=new Date().getTime();
                this.init=function(){
                setTimeout(function(){
                    if(!_this.next()){
                        callback(1);
                        _this.done_=true;
                        window.globalIntervalo=0;
                 return;
                }
                    callback(_this.next());
                    _this.init();
                },13);
                }
                this.next=function(){
                var now=new Date().getTime();
                if((now-this.start)>ms)
                    return false;
                return this.ant=curva((now-this.start+.001)/ms,this.ant);
            }
            }

	function linear(p,a){
	    return p;
	} 

function efecto(o){
    var t=new transicion(linear,2000,function(p){
        o.style.opacity = p;
                o.style.MozOpacity = p;
                o.style.KhtmlOpacity = p;
                o.style.filter = 'alpha(opacity=' + p*100+ ')';
                o.style.zoom=1;//necesario para Explorer
                if(p==1)
                {
                     o.style.visibility = "hidden";
                     document.getElementById('wrap2').style.visibility="visible";
                     
                }
    });
    t.init();
    t=null;
} 


function efectoImagen(o){
    
    
    var t=new transicion(linear,2000,function(p){
        
        o.style.opacity = 1-p;
                o.style.MozOpacity = 1-p;
                o.style.KhtmlOpacity = 1-p;
                o.style.filter = 'alpha(opacity=' +(100-( p*100))+ ')';
                o.style.zoom=1;//necesario para Explorer
                if(p==1)
                {
                     o.style.visibility = "hidden";
                     
               }
    });
    t.init();
    t=null;
} 
            
        function animacion()
        {
           efectoImagen(document.getElementById('img24'));
           efecto(document.getElementById('imagenFondo'));
        }
        
        function retardo(tiempo)
        {
            setTimeout(animacion,tiempo);
        }

            
        function animacionPortada()
        {
            retardo(500);
         
        }    
