/* 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=1

timerLeft=""
timerRight=""
scrolldirection=1

function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

function toNext(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollLeft+204
}

function scrollDivLeft(id){
  clearTimeout(timerRight) 
  if (document.getElementById(id).scrollLeft >= 1704) document.getElementById(id).scrollLeft=0
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",22)
  scrolldirection=0
}

function scrollDivRight(id){
  clearTimeout(timerLeft)
  alert(document.getElementById(id).scrollLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",22)
  scrolldirection=1
	
}

function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}
function toCenter(id){
document.getElementById(id).scrollLeft=(document.getElementById(id).scrollWidth/2)
  
}
function continueMe(id){
  if (scrolldirection == 1)
  	scrollDivRight(id)
  else 
  	scrollDivLeft(id)
}

function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}

