scrollStep=1

timerLeft=""
timerRight=""
temp = true
function toLeft(id){
  document.getElementById(id).scrollLeft=0
}

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

function scrollDivLeftFast(){
  temp = false;
  scrollStep=3
}

function scrollDivLeftSlow(){
  temp = true;
  scrollStep=1
}

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

function scrollDivRightFast(){
  temp = false;
  scrollStep=3
}

function scrollDivRightSlow(){
  temp = true;
  scrollStep=1
}

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

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


