
Ext.BLANK_IMAGE_URL = '../ext-2/resources/images/default/s.gif';

var cpt 		= 1;
var nbImg 		= 5;
var widthImg 	= 760;
var timeMove	= 2;
var effectMove 	= "easeOut";
var widthMove 	= widthImg;
var timeSlide 	= 5000;

function slideShowMove(){
	var el = Ext.get('slideShow');
	var sl = Ext.get('title1');
	if(cpt<nbImg) {
		cpt++;
		el.move('l', widthImg, {
			duration : timeMove,
			easing : effectMove
		});
		sl.move('r', widthMove, {
			duration : timeMove,
			easing : effectMove
		});
	} else {
		clearTimeout(stopSlideShowMove);
		/*cpt=1;
		var back = (widthImg*nbImg)-widthImg;		
		el.move('r', back, {
			duration : timeMove,
			easing : effectMove
		});
		sl.move('l', back, {
			duration : timeMove,
			easing : effectMove
		});*/
	}
	var stopSlideShowMove = setTimeout("slideShowMove()", timeSlide);
}

Ext.onReady(function(){
	var el = Ext.get('slideShow');
	var nav = Ext.get('nav');
	nav.slideIn('t', {
    easing: 'bounceOut',
    duration: timeMove
});
	el.fadeIn({
		endOpacity: 5, //can be any value between 0 and 1 (e.g. .5)
		easing: "easeOut",
		duration: 10,
		callback: slideShowMove,
		scope:el
	});	
});



/*
easeNone Uniform speed between points.
easeIn Begins slowly and accelerates towards end. (quadratic)
easeOut Begins quickly and decelerates towards end. (quadratic)
easeBoth Begins slowly and decelerates towards end. (quadratic)
easeInStrong Begins slowly and accelerates towards end. (quartic)
easeOutStrong Begins quickly and decelerates towards end. (quartic)
easeBothStrong Begins slowly and decelerates towards end. (quartic)
elasticIn Snap in elastic effect.
elasticOut Snap out elastic effect.
elasticBoth Snap both elastic effect.
backIn Backtracks slightly, then reverses direction and moves to end.
backOut Overshoots end, then reverses and comes back to end.
backBoth Backtracks slightly, then reverses direction, overshoots end, then reverses and comes back to end.
bounceIn Bounce off of start.
bounceOut Bounces off end.
bounceBoth Bounces off start and end.
*/
