var speed=2
iens6=document.all||document.getElementById

function movedown(divContent){
  var crossobj=document.getElementById? document.getElementById(divContent) : document.all.content;
  var contentheight=crossobj.offsetHeight;
  if (window.moveupvar) clearTimeout(moveupvar);
  if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
    crossobj.style.top=parseInt(crossobj.style.top)-speed+"px";
  else 
    if (crossobj.top>=(contentheight*(-1)+100))
      crossobj.top-=speed;
  comando = "setTimeout(\"movedown(\'"+divContent+"\')\",20)";
  movedownvar=eval(comando);
}

function moveup(divContent){
  var crossobj=document.getElementById? document.getElementById(divContent) : document.all.content;
  if (window.movedownvar) clearTimeout(movedownvar);
  if (iens6&&parseInt(crossobj.style.top)<=0)
    crossobj.style.top=parseInt(crossobj.style.top)+speed+"px";
  else 
    if (crossobj.top<=0)
      crossobj.top+=speed;
  comando = "setTimeout(\"moveup(\'"+divContent+"\')\",20)";
  moveupvar=eval(comando);
}

function stopscroll(){
  if (window.moveupvar) clearTimeout(moveupvar);
  if (window.movedownvar) clearTimeout(movedownvar);
}

function movetop(){
  stopscroll()
  if (iens6)
    crossobj.style.top=0+"px";
  else
    crossobj.top=0;
}

function getcontent_height(divContent){
  if (iens6)
    contentheight=crossobj.offsetHeight;
  else 
    document.nscontainer.document.nscontent.visibility="show";
}
