/*<![CDATA[*/

function zxcSlider(o){
 mde=typeof(o.Mode)=='string'&&o.Mode.toUpperCase().charAt(0)=='V'?['top','height','Height','Top']:['left','width','Width','Left'];
 var p=document.getElementById(o.ID);
 var slides=[p.getElementsByTagName('DIV')[0]];
 slides[0].style[mde[1]]='10000px';
 p.style.overflow='hidden';
 var clds=slides[0].childNodes;
 for (var ary=[],z0=0;z0<clds.length;z0++){
  if (clds[z0].nodeType==1){
   ary.push(clds[z0]);
  }
 }
 slides[0].style[mde[1]]=o.Size+'px';
 this.slides=[];
 var nu=Math.max(Math.ceil(p['offset'+mde[2]]/o.Size),3);
 for (var lft=-o.Size,obj,z1=0;z1<nu;z1++){
  obj=slides[z1]||slides[0].cloneNode(true);
  p.appendChild(obj);
  obj.style[mde[0]]=lft+'px';
  this.slides[z1]=new zxcAnimate(mde[0],obj,lft);
  lft+=o.Size;
 }
 this.sz=o.Size;
 this.max=this.sz*(nu-1);
 this.ms=o.Duration||1000;
 this.cng=this.sz*nu;
 this.moveby=o.MoveBy||ary[1]['offset'+mde[3]];
}

zxcSlider.prototype.Slide=function(ud){
 ud=typeof(ud)=='number'&&ud>0?1:-1;
 for (var oop,z0=0;z0<this.slides.length;z0++){
  oop=this.slides[z0];
  if ((ud>0&&oop.data[0]+this.moveby*ud>this.max)||(ud<0&&oop.data[0]+this.moveby*ud<-this.max)){
   oop.data[0]+=this.cng*(ud*-1);
  }
  oop.animate(oop.data[0],oop.data[0]+this.moveby*ud,this.ms,[0,this.moveby]);
 }
}

S=new zxcSlider({
 ID:'tst',
 Size:2160,
 Duration:500  //(optional) the speed of the effect im milliseconds. (digits, default = 1000)
});

S1=new zxcSlider({
 Mode:'Vertical', //(optional) the mode, 'Vertical' or 'Horizontal'. (string, default = 'Horizontal')
 ID:'tst1',
 Size:474,
 Duration:500  //(optional) the speed of the effect im milliseconds. (digits, default = 1000)
});

/*]]>*/



