// JavaScript Document
/*
  Simple slide show manuel ou automatique,
  dans la fenetre courante ou en popup,
  selon vos besoins...
  Creation 18/06/2008 Amelie Vanbockstael
*/

//adresse des images
myPix = new Array("photos/diaporama/magasin_1.jpg","photos/diaporama/magasin_2.jpg","photos/diaporama/facade.jpg","photos/diaporama/michel-roux.jpg","photos/diaporama/ext_vitrinebijoux.jpg","photos/diaporama/int_clients.jpg","photos/diaporama/pendules.jpg","photos/diaporama/int_vitrinebijoux.jpg","photos/diaporama/vitrine_souvenir.jpg")

//changement manuel
thisPic = 0
imgCt = myPix.length - 1
function chgSlide(direction) {
  if (document.images) {
     thisPic = thisPic + direction
     if (thisPic > imgCt) {
        thisPic = 0
     }
     if (thisPic < 0) {
        thisPic = imgCt
     }
     document.Puzzle.src = myPix[thisPic]
  }
}

//changement automatique
//vitesse de defilement en milliseconds
speed = 2000;
i = 0;
function autoSlideShow(imgname) {
  if (document.images)
  {
    document.getElementById(imgname).src = myPix[i];
    i++;
    if (i > myPix.length-1) i = 0;
    b=imgname;
    setTimeout('autoSlideShow(b)',speed);
  }
}