/* 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="";

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

function scrollDivLeft(id,speed){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
	if (speed) {
		timerRight=setTimeout("scrollDivLeft('" + id + "'," + speed + ")",speed)
	} else {
  	timerRight=setTimeout("scrollDivLeft('"+id+"')",.5)
	}
}

function scrollDivRight(id,speed) {
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
	if (speed) {
		timerLeft=setTimeout("scrollDivRight('" + id + "'," + speed + ")",speed)
	} else {
  	timerLeft=setTimeout("scrollDivRight('"+id+"')",.5)
	}
}

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

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

