

scrollStep=2
scrollStepNew=2

timerLeft=""
timerRight=""

timerTop=""
timerBottom=""


function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function toTop(id){
  document.getElementById(id).scrollTop = 0
}

function scrollDivTop(id){
  clearTimeout(timerBottom) 
  document.getElementById(id).scrollTop+=scrollStepNew
  timerBottom = setTimeout("scrollDivTop('"+id+"')",10)
}

function scrollDivBottom(id){
  clearTimeout(timerTop)
  document.getElementById(id).scrollTop-=scrollStepNew
  timerTop=setTimeout("scrollDivBottom('"+id+"')",10)
}

function toBottom(id){
  document.getElementById(id).scrollTop = document.getElementById(id).scrollHeight
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
  clearTimeout(timerBottom) 
  clearTimeout(timerTop)
}

