var scrollStep=5;
var timerLeft="";
var timerRight="";
var timerBottom="";
var timerTop="";

function toLeft(id){
  document.getElementById(id).scrollLeft=0;
}
function scrollDivLeft(id){
  document.getElementById(id).scrollLeft+=scrollStep;
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10);
}
function scrollDivRight(id){
  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);
  clearTimeout(timerBottom);
  clearTimeout(timerTop);
}

function scrollDivBottom(id){
  document.getElementById(id).scrollTop+=scrollStep;
  timerBottom=setTimeout("scrollDivBottom('"+id+"')",10);
}

function scrollDivTop(id){
  document.getElementById(id).scrollTop-=scrollStep;
  timerTop=setTimeout("scrollDivTop('"+id+"')",10);
}

