function Scroll(extern,intern) {
  this.elemExt=eval('document.all.'+extern);
  this.elemInt=eval('document.all.'+intern);
  this.y=0;
  this.maxY=this.elemInt.offsetHeight-parseInt(this.elemExt.style.height);
  if (this.maxY<0) this.maxY=0;
}

function ScrollMove(incY) {
  this.y=this.y+incY;
  if (this.y<0) this.y=0;
  if (this.y>this.maxY) this.y=this.maxY;
  this.elemInt.style.top=-this.y;
}

Scroll.prototype.move = ScrollMove

var idInterval=null;
var scrollInc,scrollMax,scrollObj;

function ScrollInter() {
  scrollInc=scrollInc*1.05;
  if (scrollInc>0 && scrollInc>scrollMax) scrollInc=scrollMax;
  if (scrollInc<0 && scrollInc<-scrollMax) scrollInc=-scrollMax;
  scrollObj.move(scrollInc);
}

function ScrollEnd() {
  clearInterval(this.idInterval);
  this.idInterval=null;
}  

function ScrollInit(inc,obj) {
  if (idInterval!=null) ScrollEnd();
  scrollInc=inc;
  scrollMax=10;
  scrollObj=obj;
  idInterval=setInterval('ScrollInter()',20);
}

