// JavaScript Document

var encours = 0;
var timediapo = 8000;

var img = new Array();
	img[0] = 'img_01.jpg';
	img[1] = 'img_02.jpg';
	img[2] = 'img_03.jpg';
	img[3] = 'img_04.jpg';
	img[4] = 'img_05.jpg';
	img[5] = 'img_06.jpg';

var pathImg = 'images/';


function diaporama(encours, id, dir){
	encours++;
	if(encours == img.length)
		encours=0;
	
	$('#'+id).fadeOut('slow', function(){	
								
			$('#'+id).attr('src', pathImg+dir+'/'+img[encours]);			
			$('#'+id).fadeIn('slow');		
				
			
	});
	timerDiapo = setTimeout(function(){diaporama(encours, id, dir);}, timediapo);
	
	
	
}
