function zxcScroller(zxcmde,zxcid,zxcud,zxcspd,zxchold,zxcholdpos,zxcsrt){
 var zxcp=document.getElementById(zxcid);
 zxcmde=(typeof(zxcmde)=='string'?(zxcmde+' '):' ').charAt(0).toLowerCase();
 if ((zxcmde!='v'&&zxcmde!='h')||!zxcp) return;
 if (!zxcp[zxcmde+'scroll']) return zxcp[zxcmde+'scroll']=new zxcScrollerOOP(zxcmde,zxcp,zxcud,zxcspd,zxchold,zxcholdpos,zxcsrt);
 var zxcoop=zxcp[zxcmde+'scroll']
 clearTimeout(zxcp.to);
 zxcoop.spd=zxcspd||zxcoop.spd;
 zxcoop.ud=zxcud||-zxcoop.ud;
}


function zxcScrollerSS(zxcp,zxcmde,zxcrun){
 if (typeof(zxcp)=='string') zxcp=document.getElementById(zxcp);
 zxcmde=(typeof(zxcmde)=='string'?(zxcmde+' '):' ').charAt(0).toLowerCase();
 if ((zxcmde!='v'&&zxcmde!='h')||!zxcp) return;
 var zxcoop=zxcp[zxcmde+'scroll'];
 if (zxcoop){
  zxcrun=zxcrun||false;
  clearTimeout(zxcoop.to);
  if (typeof(zxcrun)=='boolean') zxcoop.run=zxcrun||false;
  else zxcoop.run=!zxcoop.run;
  if (zxcoop.run) zxcoop.scroll();
 }
}


function zxcScrollerOOP(zxcmde,zxcp,zxcud,zxcspd,zxchold,zxcholdpos,zxcsrt){
 zxcp.style.overflow='hidden';
 this.p=zxcp;
 this.mde=zxcmde;
 this.vh=zxcmde=='v'?'top':'left';
 var zxcos=zxcmde=='v'?['offsetHeight','offsetTop','height']:['offsetWidth','offsetLeft','width'];
 var zxcc=zxcp.getElementsByTagName('DIV')[1];
 var zxcclds=zxcc.childNodes;
 for (var zxc0=0;zxc0<zxcclds.length;zxc0++){
  if (zxcclds[zxc0].nodeType==1){
   this.wh=zxcclds[zxc0][zxcos[0]]+zxcclds[zxc0][zxcos[1]];
  }
 }
 zxcholdpos=(typeof(zxcholdpos)=='number'?zxcholdpos:0)-this.wh;
 zxcc.style.position='absolute';
 zxcc.style[this.vh]=zxcholdpos+'px';
 zxcc.style[zxcos[2]]=this.wh+'px';
 var zxcmax=(zxcc[zxcos[0]]+zxcp[zxcos[0]]);
 var zxcpos=0;
 this.ary=[[zxcc,0,[]]];
 while (zxcpos<zxcmax){
  var zxc1=this.ary.length;
  this.ary[zxc1]=[zxcc.cloneNode(true),zxcpos+=this.wh,[]];
  this.ary[zxc1][0].style[this.vh]=this.ary[zxc1][1]+zxcholdpos+'px';
  zxcp.appendChild(this.ary[zxc1][0]);
 }
 for (var zxcclds,zxc2=0;zxc2<this.ary.length;zxc2++){
  zxcclds=this.ary[zxc2][0].childNodes;
  for (var zxc2a=0;zxc2a<zxcclds.length;zxc2a++){
   if (zxcclds[zxc2a].nodeType==1) this.ary[zxc2][2].push(zxcclds[zxc2a][zxcos[1]]);
  }
 }
 this.ud=zxcud||-1;
 this.spd=zxcspd||100;
 this.hold=typeof(zxchold)=='number'?zxchold:false;
 this.holdpos=typeof(zxchold)=='number'?zxcholdpos:0;
 this.to=null;
 this.data=[zxcpos,-this.wh];
 this.run=false;
 if (typeof(zxcsrt)=='number'){
  this.run=true;
  this.to=setTimeout(function(zxcoop){return function(){zxcoop.scroll();}}(this),zxcsrt);
 }
}
zxcScrollerOOP.prototype.scroll=function(){
 zxcspd=this.spd;
 for (var zxcr=0,zxc1=0;zxc1<this.ary.length;zxc1++){
  this.ary[zxc1][1]+=this.ud;
  this.ary[zxc1][0].style[this.vh]=this.ary[zxc1][1]+this.holdpos+'px'
  if (this.hold&&Math.abs(this.ud)==1){
   for (var zxc1a=0;zxc1a<this.ary[zxc1][2].length;zxc1a++){
    if (parseInt(this.ary[zxc1][0].style[this.vh])+this.ary[zxc1][2][zxc1a]*this.ud==this.holdpos) zxcspd=this.hold;
   }
  }
  if ((this.ud<0&&this.ary[zxc1][1]<=this.data[1])||(this.ud>0&&this.ary[zxc1][1]>this.data[0])) this.ary[zxc1][1]=this.data[(this.ud<0)?0:1]+this.ud;
 }
 this.to=setTimeout(function(zxcoop){return function(){zxcoop.scroll();}}(this),zxcspd);
}


