ns4=(document.layers)?true:false
ie4=(document.all)?true:false
ns6 = (navigator.appVersion.substring(0,3)=="5.0")? true:false

function encontrarObjeto(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=encontrarObjeto(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n);
  return x;
}

function showObject(obj) {
        if (ns4) obj.visibility = "show"
        else if (ie4 || ns6) obj.style.visibility = "visible"
}

function init(){

content=encontrarObjeto("txtc")
contain=encontrarObjeto("visible")

if (ns4){
content.ypos=content.top;
contain.ypos=contain.top;
contenidoAltura=content.document.height
contenedorAltura=contain.clip.height
}
if (ie4){
content.ypos=content.style.pixelTop;
contain.ypos=contain.style.top;
contenidoAltura=content.offsetHeight
contenedorAltura=contain.offsetHeight
}
if (ns6){
contain.ypos=contain.style.top;
contenidoAltura=content.offsetHeight
contenedorAltura=contain.offsetHeight
}

showObject(contain);
subir();
}

onload=init
var speed=90
var loop=1;

function subir(){
        if ((loop==1)){
                if (content.ypos>(-1)*contenidoAltura){
                        content.ypos-=1;
                        if (ns4) content.top=content.ypos
                        else content.style.top=content.ypos;
                        setTimeout("subir()",speed);
                }
                else {
                        content.ypos=contenedorAltura;
                        if (ns4) content.top=content.ypos
                        else content.style.top=content.ypos;
                        setTimeout("subir()",speed);
                }
        }
        else setTimeout("subir()",1);
}

