function slideshow()
{
  slideshow_banniere.background = PicCurrent.src;		//affiche image
  image_index = Math.floor(Math.random()*nb_img) + 1;

  if ((image_index > nb_img) || (image_index == 0 ))
     image_index = 1;
  PicCurrent.src = "./images/banniere" + image_index +".jpg";	//preload image  
  setTimeout("slideshow();", 3000);				//rappeler la fonction après un delai
}

var nb_img=13; 			//on declare que on aura 5 images
var image_index; 		//index de l'image à afficher
var PicCurrent = new Image();	//image pour preload
for (image_index = nb_img; image_index>0; image_index-- )
  PicCurrent.src = "./images/banniere" + image_index +".jpg";	//preload image    
image_index=1;
slideshow();			//démarrer le slideshow

