iens6=document.all||document.getElementById
ns4=document.layers

<!-- Lower is faster -->
var scrollspeed = 1




<!-- scroll down function -->
function scrolldown() {
	if(window.scrolltimerup){
		clearTimeout(scrolltimerup)
	}
	if(iens6&&parseInt(contentobj.style.top)>=(contentheight*(-1)+100)){
		contentobj.style.top=parseInt(contentobj.style.top)-step
	}else if(ns4&&contentobj.top>=(contentheight*(-1)+100)){
		contentobj.top-=step
	}
	scrolltimerdown = setTimeout("scrolldown()",scrollspeed)
}
<!-- scroll up function -->
function scrollup() {
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown)
	}
	if(iens6&&parseInt(contentobj.style.top)<=0){
		contentobj.style.top=parseInt(contentobj.style.top)+step
	}else if(ns4&&contentobj.top<=0){ 
		contentobj.top+=step
	}
	scrolltimerup = setTimeout("scrollup()",scrollspeed)	
}
<!-- function to stop all scroll timers -->
function stopall() {
	if(window.scrolltimerup){
		clearTimeout(scrolltimerup)
	}
	if(window.scrolltimerdown){
		clearTimeout(scrolltimerdown)
	}
}
<!-- function that shifts the object to top -->
function shifttotop(){
	stopall()
	if (iens6) {
		contentobj.style.top=0
	}else{
		contentobj.top=0
	}
}

function getcontent_height(){
	if (iens6)
	contentheight=contentobj.offsetHeight
}