var divPromo = {
	
	verrou : false,
	imgSize : 287,
	myFx : null,
	
	ScrollDroit : function(scr){
		if(divPromo.verrou){ return(true);}
		
		var scroller = $(scr);
		var limit = (($$('#'+scr+' div.encar_promo').length)*divPromo.imgSize )-(divPromo.imgSize*2);
		var pos = ( scroller.getScrollLeft() >= limit ) ? 0 : scroller.getScrollLeft()+divPromo.imgSize;
		
		/*console.log('scrollLeft = '+scroller.getScrollLeft()+', pos = '+pos+', limit = '+limit);*/
		
		var myFx = new Fx.Scroll(scroller, {
						wait: false
						, duration: 500
						, transition: Fx.Transitions.Circ.easeInOut
						, onComplete : function() {
						divPromo.DeverrouillerScroll();
						}
					});
					
		myFx.start(pos,0);
		divPromo.VerrouillerScroll();
	},
	
	ScrollGauche : function(scr){
		if(divPromo.verrou){ return(true);}
		
		var scroller = $(scr);
		var limit = (($$('#'+scr+' div.encar_promo').length)*divPromo.imgSize )-(divPromo.imgSize*2);
		var pos = ( scroller.getScrollLeft() <= 0 ) ? limit : scroller.getScrollLeft()-divPromo.imgSize;
		
		/*console.log('scrollLeft = '+scroller.getScrollLeft()+', pos = '+pos+', limit = '+limit);*/
		
		var myFx = new Fx.Scroll(scroller, {
						wait: false
						, duration: 500
						, transition: Fx.Transitions.Circ.easeInOut
						, onComplete : function() {
						divPromo.DeverrouillerScroll();
						}
					});
					
		myFx.start(pos,0);
		divPromo.VerrouillerScroll();
	},
	
	VerrouillerScroll : function(){
		divPromo.verrou = true;
	},
	
	DeverrouillerScroll : function(){
		divPromo.verrou = false;
	}	
	
}