var oMyTimer = null;

function MyIFrameScroller(MyIFrameName, Action)
{
  var MyIntervalTime = 20;
  var oMyIframe = window.frames[MyIFrameName];

  switch (Action)
  {
    case "Up"    :
    case "Down"    :
      oMyTimer = setInterval("ScrollFrame('" + MyIFrameName + "', '" + Action + "')", MyIntervalTime);
      break;
    case "Stop"    :
      if (oMyTimer != null)
      {
          clearInterval(oMyTimer);
          oMyTimer = null;
      }
      break;
    case "Reset"    :
      ScrollFrame(MyIFrameName, Action)
      break;
    default    :
      break;
  }
}

function ScrollFrame(MyIFrameName, Action)
{
  var oMyIframe = window.frames[MyIFrameName];
  var nScrollUnit = 3;

  switch (Action)
  {
    case "Reset"    :
      oMyIframe.scroll(0, 0);
      break;
    case "Up"    :
      oMyIframe.scrollBy(0, -nScrollUnit);
      break;
    case "Down"    :
      oMyIframe.scrollBy(0, nScrollUnit);
      break;
    default    :
      break;
  }
}
