/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Mr J | http://www.huntingground.net/ */

scrollStep=2

timerLeft="5"
timerRight="5"

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function scrollDivLeft(id){
stopMe()
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}

function scrollStart(id){
stopMe()
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=1
  timerRight=setTimeout("scrollStart('"+id+"')",30)
}

function scrollDivRight(id){
stopMe()
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

