var zxcVCnt=0;

function zxcVScroller(){
zxcarg=zxcVScroller.arguments;
zxcpobj=document.getElementById(zxcarg[0]);
if (zxcpobj.tagName=='IFRAME'){ zxciobj=window.frames[zxcarg[0]].document.getElementsByTagName('DIV')[0]; }
else { zxciobj=zxcpobj.getElementsByTagName('DIV')[0]; }
zxciobj.vnowspd=1;
zxciobj.ph=zxcpobj.offsetHeight;
zxciobj.sh=zxciobj.offsetHeight;
zxciobj.vpos=0;
zxciobj.vto=null;
zxciobj.vrun=true;
zxciobj.vto2=null;
zxciobj.vto3=null;
if (zxcarg[1]){
zxciobj.onmouseover=function(){ this.vrun=false; clearTimeout(this.vto); }
zxciobj.onmouseout=function(){ this.vrun=true; this.voop.vrotate(); }
}
zxciobj.voop=new zxcVOOP(zxciobj,zxcarg);
}


function zxcVOOP(zxcobj,zxcarg){
this.obj=zxcobj;
this.ref='zxcv'+zxcVCnt;
window[this.ref]=this;
if (zxcarg[1]){
this.srt=zxcarg[1][0];
this.dly=zxcarg[1][1];
this.inc=zxcarg[1][2];
this.dly2=zxcarg[1][4]||this.dly;
this.ph=zxcarg[1][3]||1; ;
this.setTimeOut("vrotate();",this.srt);
}
zxcVCnt++;
}

zxcVOOP.prototype.vrotate=function(){
if (!this.obj.vrun){ return; }
this.obj.vpos-=this.inc;
if (this.obj.vpos<-(this.obj.sh-this.obj.ph)){ this.obj.vpos=0; }
this.obj.style.top=(this.obj.vpos)+'px';
if (Math.abs(this.obj.vpos)%this.ph>0||this.dly==this.dly2){ this.setTimeOut("vrotate();",this.dly); }
else { this.setTimeOut("vrotate();",this.dly2); }
}

zxcVOOP.prototype.setTimeOut=function(zxcf,zxcd){
this.obj.vto=setTimeout("window."+this.ref+"."+zxcf,zxcd);
}

zxcVOOP.prototype.vcngspd=function(zxc){
if(zxc){ this.snu=zxc; }
this.snu=this.snu*1.05;
this.dly+=this.snu;
if (this.dly<1){ this.dly=1; }
if (this.dly>this.srt){ this.dly=this.srt; }
this.setTimeOut2("vcngspd();",500);
}

zxcVOOP.prototype.setTimeOut2=function(zxcf,zxcd){
this.obj.vto2=setTimeout("window."+this.ref+"."+zxcf,zxcd);
}

zxcVOOP.prototype.stepupdown=function(zxc){
if (this.obj.vpos%this.obj.vstep!=0){
if (zxc.nu<0){ this.obj.vpos=this.obj.vpos-(this.obj.vpos%this.obj.vstep); }
else { this.obj.vpos=this.obj.vpos-(this.obj.vpos%this.obj.vstep)-this.obj.vstep; }
}
if ((zxc.nu>0&&this.obj.vpos<0)||(zxc.nu<0&&-(this.obj.vpos)<this.obj.sh-(this.obj.ph))){
this.obj.vpos=(this.obj.vpos+this.obj.vstep*zxc.nu);
this.obj.style.top=(this.obj.vpos)+'px';
}
}

zxcVOOP.prototype.updown=function(zxc){
if (zxc){ this.ud=zxc; this.obj.vnowspd=this.obj.voldspd }
if ((this.ud.nu>0&&this.obj.vpos<0)||(this.ud.nu<0&&-this.obj.vpos<this.obj.sh-this.obj.ph)){
this.obj.vpos+=(this.ud.nu*this.obj.vnowspd);
this.obj.style.top=this.obj.vpos+'px';
if (this.obj.vnowspd<5){ this.obj.vnowspd=this.obj.vnowspd*1.05; }
this.setTimeOut3("updown();",10);
}
else {
if (this.ud.nu>0){ this.obj.style.top='0px'; }
else { this.obj.style.top=(-this.obj.sh+this.obj.ph)+'px'; }
}
}

zxcVOOP.prototype.setTimeOut3=function(zxcf,zxcd){
this.obj.vto3=setTimeout("window."+this.ref+"."+zxcf,zxcd);
}
