defaultStep=20 
step=defaultStep  

function scrollDivDown(id){ 
clearTimeout(timerDown)  
document.getElementById(id).scrollTop+=step  
timerDown=setTimeout("scrollDivDown('"+id+"')",10) 

}  

function scrollDivUp(id){ 
clearTimeout(timerUp) 
document.getElementById(id).scrollTop-=step  
timerUp=setTimeout("scrollDivUp('"+id+"')",10) 
}  

function scrollDivRight(id){ 
clearTimeout(timerDown)  
document.getElementById(id).scrollLeft+=step  
timerDown=setTimeout("scrollDivRight('"+id+"')",10)
checkArrowLeftRight(id); 

}  

function scrollDivLeft(id){ 
clearTimeout(timerUp) 
document.getElementById(id).scrollLeft-=step  
timerUp=setTimeout("scrollDivLeft('"+id+"')",10)
checkArrowLeftRight(id);
}

timerDown=""  
timerUp=""  

function stopMe(){ 
clearTimeout(timerDown)  
clearTimeout(timerUp)
}

function checkArrowLeftRight(id){
	el = document.getElementById(id);
	scrollPos = el.scrollLeft;
	if( scrollPos == 0 ){
		document.getElementById('scrollerLeft').className = 'inactive';
	}
	else {
		document.getElementById('scrollerLeft').className = 'active';
	}
	if (scrollPos >= (el.scrollWidth-el.offsetWidth)) {
		document.getElementById('scrollerRight').className = 'inactive';
	}
	else {
		document.getElementById('scrollerRight').className = 'active';
	}
}


document.onmousemove=function(){stopMe()}  
