 var move = {
         sDiv : null,
         intervels : 1000,
         showintervels:1000,
         distance : 100,
         width : 100,
         _step : 0,
         _steps : 0,
         _shown : 0,
         _pow : 1,
         s_steps : 60,
         _smove : null,
         showitems:null,
         presentitem:0,
         nextitem:1,
         init:function(_move) {
		     
		      var _sDiv = document.getElementById(""+_move.slideDiv);
		      this.showitems = _sDiv.getElementsByTagName("div");
		      this.sDiv = _sDiv;
	          this.intervels = _move.intervels;
	          this.width = _move.width;
	          this.distance = _move.distance;
	          this.s_steps = _move.steps;
	          this._pow = _move.pow;
	          this._shown = Math.round(_move.width/this.distance);
	          this._steps = this.showitems.length - this._shown;
	          this.showintervels = _move.showintervels;
              this.scroll();
	     },
	     scroll:function(){
	        
	         _items = move.showitems;      
	         if(move.presentitem<_items.length-1){
	            
	            var sDivs = new Array(2);
	            sDivs[0] = _items[move.presentitem];
	            sDivs[1] = _items[move.nextitem];
	            move.hideitems(_items);
	            move.position(sDivs);
	            move.smoothMove(parseInt(move.sDiv.style.left),"left",0);
	            ++move.presentitem;
	            ++move.nextitem;
                   
                   
	            
	         }
	         else{
	            
	            move.presentitem = _items.length-1;
	            move.nextitem = 0;
	            var sDivs = new Array(2);
	            sDivs[0] = _items[move.presentitem];
	            sDivs[1] = _items[move.nextitem];
	            move.hideitems(_items);
	            move.position(sDivs);
	            move.smoothMove(parseInt(move.sDiv.style.left),"left",0);
	            move.presentitem = 0;
	            move.nextitem = 1;
                    

	         }
	         
	     },
	     hideitems:function(_items){
	       for(i=0;i<_items.length;i++){
		       if(i!=this.presentitem && i!=this.nextitem){
		       _items[i].style.position = "absolute";
		       _items[i].style.display = "none";
		       }
	       }
	     },
	     position:function(sDivs) {
	         var left = 0;
	         this.sDiv.style.left = 0+"px";
	         for(i=0;i<sDivs.length;i++) {
	            sDivs[i].style.position = "absolute";
	            sDivs[i].style.display = "block";
	            sDivs[i].style.left = left+"px";
	            left = left + this.distance;
	         }
	          
	     },
	     smoothMove:function(sPos,direction,type){
			  
			  var _ssteps = 0;
			  
			  if (this._smove) return;
			    this._smove = window.setInterval( function(){
				   
				   var _movement = Math.pow(((1 / move.s_steps)*_ssteps),move._pow) * move.distance;
				    
				   var movement = Math.ceil(_movement);
				    
				   
				   move.sDiv.style.left = (direction=="left" ? (sPos - movement) : (sPos + movement))+"px";
				   _ssteps++;
			     	if (_ssteps > move.s_steps) {
			     	window.clearInterval(move._smove); 
			     	move._smove = null;
                            
			     	if(type==1 && move.m_stop==0) {
			        move.m_move(direction);
			         }
                            setTimeout(move.scroll,move.showintervels);
			     	
			     	}
			   
			  }
			  ,this.intervels);   
	          
	          if(direction == "left"){
			   ++move._step;
			   }
			   else {
			   --move._step;
			   } 
	
	     }
};