var speed=2
var crossobj=document.getElementById? document.getElementById("content") : document.all.content
var contentheight=crossobj.offsetHeight
var contobj=document.getElementById? document.getElementById("container") : document.all.container
var containerheight=contobj.offsetHeight
function movedown(){
if (window.moveupvar) clearTimeout(moveupvar)
if (parseInt(crossobj.style.top)>=(contentheight*(-1)+containerheight))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
movedownvar=setTimeout("movedown()",20)
}
function moveup(){
if (window.movedownvar) clearTimeout(movedownvar)
if (parseInt(crossobj.style.top)<=0)
crossobj.style.top=parseInt(crossobj.style.top)+speed+"px"
moveupvar=setTimeout("moveup()",20)
}
function stopscroll(){
if (window.moveupvar) clearTimeout(moveupvar)
if (window.movedownvar) clearTimeout(movedownvar)
}
function movetop(){
stopscroll()
crossobj.style.top=0+"px"
}
function movebottom(){
stopscroll()
crossobj.style.top=(contentheight*(-1)+containerheight)+"px"
}
function getcontent_height(){
contentheight=crossobj.offsetHeight;
containerheight=contobj.offsetHeight;
centerDiv();
}
window.onload=getcontent_height
