/*
  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("images/diapo1.gif","images/diapo2.gif","images/diapo3.gif","images/diapo4.gif","images/diapo5.gif","images/diapo6.gif")


//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 = 1000;
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);
  }
}
