<script type="text/javascript">
  var step = 2;
  var speed = 10;
  var direction = 'down';
  var tid = null;
  function scroll()
  {
    if(direction == 'up')
      scrollBy(0, -step);
    else
      scrollBy(0, step);
  }
  function startScroll(dir)
  {
    direction = dir;
    tid = setInterval('scroll();', speed);
  }
  function stopScroll()
  {
    clearInterval(tid);
  }
</script>