    /**
    * variables globales de asignacion de navegador
    */    
    var ie=(document.all) ? 1:0;
    var n4=(document.layers) ? 1:0;
    var n6=(document.getElementById) ? 1:0;  
    var paso=0;
    var valor;
    var tiempo;
    var altura=-50;
    var Y;
    var activo=false; 
    var capa="texto";
    var tiempo;
    
    /**
    * funcion para inicializar valores generales en la interfaz
    */
    function iniciaValores()
    {
        Y=200;
        paso=0;        
        
        if(ie)
        {      
            document.all[capa].style.top=Y;
            document.all[capa].style.height=300;
            document.all[capa].style.clip="rect(0px,300px,300px,0px)"; 
        }
        else if(n4)
        {
             document.layers[capa].top=Y;
             document.layers[capa].height=300;
         }
        if(n6)
        {            
            document.getElementById(capa).style.top=Y;
            document.getElementById(capa).style.height=300;
            document.getElementById(capa).style.clip="rect(0px,270px,280px,0px)";
        }
    }
   
    /**
    * funcion para scrolear la capa de textos
    */
    function recorta(donde)
    {
        if(ie)
        {
            clearTimeout(tiempo);
            Y=parseInt(document.all[capa].style.top);
            var H=parseInt(document.all[capa].style.height);
            if((Y>altura)&&(donde==0))
            {
                activo=true;
                valor=2;     
                paso+=valor;
                document.all[capa].style.top = Y-valor;
                document.all[capa].style.height = H+valor;
                eval("document.all['"+capa+"'].style.clip='rect("+paso+",300,"+(H+valor)+",0)'");
                tiempo=setTimeout("recorta(0)",50);
            }
            else if((Y<=200) && (donde==1) && (activo==true))
            {         
                valor=-2;
                paso+=valor;
                document.all[capa].style.top = Y-valor;
                document.all[capa].style.height = H+valor;
                eval("document.all['"+capa+"'].style.clip='rect("+paso+",300,"+(H+valor)+",0)'");
                tiempo=setTimeout("recorta(1)",50);
            }
        }
        else if( n4)
        {
            Y=document.layers[capa].top;
            var H=document.layers[capa].height;
            if((Y>altura)&&(donde==0))
            {
                activo=true;
                valor=2;     
                paso+=valor;
                document.layers[capa].top = Y-valor;
                document.layers[capa].height = H+valor;
                document.layers[capa].clip.top=paso;
                document.layers[capa].clip.bottom=(H+valor);
                tiempo=setTimeout("recorta(0)",50);
            }
            else if((Y<=120)&&(donde==1) && (activo==true))
            {         
                valor=-2;
                paso+=valor;
                document.layers[capa].top = Y-valor;
                document.layers[capa].height = H+valor;
                document.layers[capa].clip.top=paso;
                document.layers[capa].clip.bottom=(H+valor);
                tiempo=setTimeout("recorta(1)",50);
            }
        }
        else if(n6)
        {
            Y=parseInt(document.getElementById(capa).style.top);
            var H=parseInt(document.getElementById(capa).style.height);
            if((Y>altura)&&(donde==0))
            {
                activo=true;
                valor=5;     
                paso+=valor;
                document.getElementById(capa).style.top = Y-valor;
                document.getElementById(capa).style.height = H+valor;
                eval("document.getElementById('"+capa+"').style.clip='rect("+paso+",300,"+(H+valor)+",0)'");
                tiempo=setTimeout("recorta(0)",50);
            }
            else if((Y<=120)&&(donde==1) && (activo==true))
            {         
                valor=-5;
                paso+=valor;
                document.getElementById(capa).style.top = Y-valor;
                document.getElementById(capa).style.height = H+valor;
                eval("document.getElementById('"+capa+"').style.clip='rect("+paso+",300,"+(H+valor)+",0)'");
                tiempo=setTimeout("recorta(1)",50);
            }
        }
    }

