
// Scroll code
var timeoutID; // global variable to hold the timer

function scrollDiv(inc,dir) { /* inc(rement) is positive or negative, direction is v(ertical) or h(orizontal) */

  if (timeoutID) clearTimeout(timeoutID); // make sure we do not start another timer
  var theDiv=document.getElementById('scrollholder'); // get the hardcoded div
  if (theDiv) { // does it exist?
    if (dir == "v") theDiv.scrollTop+=inc; /* if vertical scroll increment the scrollTop to move down or up */
    else theDiv.scrollLeft+=inc; // else increment scrollLeft to move right or left
    timeoutID = setTimeout("scrollDiv(" + inc + ",'" + dir + "')", 20); // do it again in 20 miliseconds
  }
}

function stopScroll() { //
  if (timeoutID) clearTimeout(timeoutID); // if we have a timerID clear it
}