<!--
/* Updated
*/
ScrollPane = function(oContentPane, oParentPane, oUpButton, oDownButton, sUpButton1, sUpButton2, sDownButton1, sDownButton2, hiddenScrollPos) {
  // content pane is contained by 
  this.oContentPane = oContentPane;
  this.oParentPane = oParentPane;
  this.oUpButton = oUpButton;
  this.oDownButton = oDownButton;
		// preload images
  this.imgUpButton1 = new Image();
  this.imgUpButton1.src = sUpButton1;
  this.imgUpButton2 = new Image();
  this.imgUpButton2.src = sUpButton2;
  this.imgDownButton1 = new Image();
  this.imgDownButton1.src = sDownButton1;
  this.imgDownButton2 = new Image();
  this.imgDownButton2.src = sDownButton2;
  this.hiddenScrollPos = hiddenScrollPos;

  oUpButton.src = this.imgUpButton1.src;
  oUpButton.onmousedown = this.onmousedown;
  oUpButton.onmouseup = this.onmouseup;
  oUpButton.scrollpane = this;
  oDownButton.src = this.imgDownButton1.src;
  oDownButton.onmousedown = this.onmousedown;
  oDownButton.onmouseup = this.onmouseup;
  oDownButton.scrollpane = this;
  
  this.oContentPane = oContentPane;
  this.oParentPane = oParentPane;

  oContentPane.style.position = "absolute";
  oContentPane.style.overflow = "hidden";
  oContentPane.style.width = oParentPane.offsetWidth;
  oContentPane.style.height = oParentPane.offsetHeight;
  oParentPane.scrollpane = this;
  if (oContentPane.scrollTop <= 0)
    oUpButton.style.display = "none";
  else
    oUpButton.style.display = "block";

  if (oContentPane.scrollTop + oContentPane.offsetHeight >= oContentPane.scrollHeight)
    oDownButton.style.display = "none";
  else
    oDownButton.style.display = "block";
  oParentPane.onresize = this.onresize; 
  if (hiddenScrollPos) oContentPane.scrollTop = parseInt(hiddenScrollPos.value, 10); 
}

ScrollPane.prototype.onresize = function(e)
{
  if (!e) e = window.event;
  var o = e.srcElement.scrollpane;
  o.doresize(e.srcElement);
}

ScrollPane.prototype.doresize = function(oEl)
{
  this.oContentPane.style.width = this.oParentPane.offsetWidth;
  this.oContentPane.style.height = this.oParentPane.offsetHeight;
  if (oEl == this.oParentPane)
  {
    if (this.oContentPane.scrollTop <= 0)
      this.oUpButton.style.display = "none";
    else
      this.oUpButton.style.display = "block";
    
    if (this.oContentPane.scrollTop + this.oContentPane.offsetHeight >= this.oContentPane.scrollHeight)
      this.oDownButton.style.display = "none";
    else
      this.oDownButton.style.display = "block";
  }
}

ScrollPane.prototype.onmousedown = function(e)
{
  if (!e) e = window.event;
  var o = e.srcElement.scrollpane;
  if (e.srcElement == o.oUpButton)
  {
    o.oUpButton.src = o.imgUpButton2.src;
    o.oUpButton.setCapture();
    oScrollObj = o;
    o.scrolldir = "up";
    o.toid = window.setInterval(doScrollTimer, 75);
  }
  if (e.srcElement == o.oDownButton)
  {
    o.oDownButton.src = o.imgDownButton2.src;
    o.oDownButton.setCapture();
    oScrollObj = o;
    o.scrolldir = "down";
    o.toid = window.setInterval(doScrollTimer, 75);
  }
}

ScrollPane.prototype.onmouseup = function(e)
{
  if (!e) e = window.event;
  var o = oScrollObj;
  if (!o || !o.oUpButton || !o.oDownButton) return;
  o.oUpButton.src = o.imgUpButton1.src;
  o.oDownButton.src = o.imgDownButton1.src;
  o.oUpButton.releaseCapture();
  o.oDownButton.releaseCapture();
  window.clearInterval(o.toid);
}

// only scroll one thing at a time..
var oScrollObj = null;
function doScrollTimer()
{
  if (oScrollObj)
  {
    var o = oScrollObj.oContentPane;
    if (oScrollObj.scrolldir == "up")
      o.scrollTop -= 10;
    else
      o.scrollTop += 10;
    
    if (o.scrollTop + o.offsetHeight >= o.scrollHeight)
    {
      oScrollObj.oDownButton.style.display = "none";
      oScrollObj.onmouseup();
    }
    else
    {
      oScrollObj.oDownButton.style.display = "block";
    }
    if (o.scrollTop <= 0)
    {
      oScrollObj.oUpButton.style.display = "none";
      oScrollObj.onmouseup();
   }
    else
    {
      oScrollObj.oUpButton.style.display = "block";
    }
    
    if (oScrollObj.hiddenScrollPos) oScrollObj.hiddenScrollPos.value = o.scrollTop.toString();
  }
}
-->