
    var killer = 
    {
        topMargin  : 50,
        suave  : 55,
        desplazaTime  : 700,
        mila  : document.all ? document.all.guia : 
        (document.layers ? document.guia : document.getElementById('guia'))
    }

    window.setInterval("killer.coordenadas( )", 35)


    killer.coordenadas = function( )
    {
        if(document.all)
        {
            this.actualY = this.mila.style.pixelTop;
            this.scrollTop = document.body.scrollTop;
        }
        else if(document.layers)
        {
            this.actualY = this.mila.top;
            this.scrollTop = window.pageYOffset;
        }            
        else if(document.getElementById)
        {
            this.actualY = parseInt(this.mila.style.top);
            this.scrollTop = window.pageYOffset;
         }      
     

        var descroll  = Math.max( this.scrollTop + this.topMargin, this.suave );
        

        if ( this.actualY != descroll ) 
        {
            if ( descroll != this.targetY ) 
            {
                this.targetY = descroll;
                this.desplazaInit( );
            }
            this.desplaza( );  
       }
   }

    killer.desplazaInit = function( )
    {
        var ahora    = new Date( )    
        this.A     = this.targetY - this.actualY ;  
        this.B     = Math.PI / ( 2 * this.desplazaTime );     
        this.C     = ahora.getTime( );
        this.D     = this.actualY;
    }

    killer.desplaza = function( )
    {
        var ahora    = new Date( );
        var nuevaY  = this.A * Math.sin( this.B * ( ahora.getTime( ) - this.C ) ) + this.D;
        nuevaY        = Math.round( nuevaY );

        if ( ( this.A > 0 && nuevaY > this.actualY ) ||  ( this.A < 0 && nuevaY < this.actualY ) ) 
       {
           if (document.all)
               this.mila.style.pixelTop = nuevaY;
           else if(document.layers)
               this.mila.top = nuevaY;
           else if(document.getElementById)
               this.mila.style.top = nuevaY;               
       }
    }
