scrollStep=1 timerUp="" timerDown="" function toTop(id){ document.getElementById(id).scrollTop=0 } function scrollDivDown(id){ clearTimeout(timerDown) document.getElementById(id).scrollTop+=scrollStep timerDown=setTimeout("scrollDivDown('"+id+"')",1) } function scrollDivUp(id){ clearTimeout(timerUp) document.getElementById(id).scrollTop-=scrollStep timerUp=setTimeout("scrollDivUp('"+id+"')",1) } function toBottom(id){ document.getElementById(id).scrollTop=document.getElementById(id).scrollHeight } function stopMe(){ clearTimeout(timerDown) clearTimeout(timerUp) }