/* 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=4
scrollStepV=5
timerLeft=""
timerRight=""

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
}

//przesuniecie w dol 
function toTop(id){
  document.getElementById(id).scrollTop=0
}

function scrollDivTop(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollTop+=scrollStepV
  timerRight=setTimeout("scrollDivTop('"+id+"')",10)
}

function scrollDivBottom(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollTop-=scrollStepV
  timerLeft=setTimeout("scrollDivBottom('"+id+"')",10)
}

function toBottom(id){
  document.getElementById(id).scrollTop=document.getElementById(id).scrollWidth
}

//koniec przesuniecia w dol

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



