scrollflag = 0;
scrollspeedx = 0;
scrollspeedy = 0;
scrollid = "";

function scrollstart(id, speedy, speedx)
{

  scrollflag = 1;

  scrollid = id;

  scrollspeedx = speedx;
  scrollspeedy = speedy;

  scrolltimer();

  return true;
}

function scrollstop()
{
  scrollflag = 0;

  scrollspeedx = 0;
  scrollspeedy = 0;

  return true;
}

function scrolltimer()
{
  if (scrollflag)
  {
    document.getElementById(scrollid).scrollTop += scrollspeedy;
    document.getElementById(scrollid).scrollLeft += scrollspeedx;
    setTimeout ("scrolltimer()",1);
  }
}