window.addEvent('domready', function(){
	var myTimer = myFunction.periodical(5000);  
	  var totIncrement		= 0;
	  var increment			= 104;
	  var mooEl             = 0;
	  mooEl = $('nomb').value; 
	  var maxRightIncrement	= increment*(-(mooEl.toInt() - 4));
	  var fx = new Fx.Style('myList', 'margin-top', {
				duration: 1000,
				transition: Fx.Transitions.Back.easeInOut,
				wait: true
	   });
	   
	   //-------------------------------------
	 
	 function myFunction(){ 
		  
					if(totIncrement>maxRightIncrement){
				 totIncrement = totIncrement-increment;
		    	fx.stop()
				fx.start(totIncrement);
			}
			else{
				while(totIncrement<0){
					totIncrement = totIncrement+increment;
					fx.stop()
					fx.start(totIncrement);
				}
				}
				
			}		

	 
	 /* EVENTS for the button "previous"
	  $('previous').addEvents({ 
          'click' : function(event){ 
		  if(totIncrement<0){
					totIncrement = totIncrement+increment;
					fx.stop()
					fx.start(totIncrement);
				}
			}			  	  
      }); 
	 
       //-------------------------------------
	  // EVENTS for the button "next"
  	  $('next').addEvents({ 
          'click' : function(event){ 
			 if(totIncrement>maxRightIncrement){
				 totIncrement = totIncrement-increment;
		    	fx.stop()
				fx.start(totIncrement);
			}
          }		  		  
      })
  */
	 
});