iens6=document.all||document.getElementById;

// var speed=2; settata nello script principale
var crossobj=document.getElementById("content");
var contentheight=crossobj.offsetHeight;

function movedown(){
if (window.moveupvar) {clearTimeout(moveupvar);}
if (iens6&&parseInt(crossobj.style.top)>=(contentheight*(-1)+100)) {crossobj.style.top=parseInt(crossobj.style.top)-speed+"px";}
movedownvar=setTimeout("movedown()",20);
}

function moveup(){
if (window.movedownvar) {clearTimeout(movedownvar);}
if (iens6&&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();
if (iens6) {crossobj.style.top=0+"px";}
}

function getcontent_height(){
if (iens6) {contentheight=crossobj.offsetHeight;}
}

window.onload=getcontent_height;
