function ChangePhoto(offset) {
	// les balises html <img> et <h3> devant être swappées
    var img = document.getElementById("photo");
    //var tit	= document.getElementById("titre_photo");
	
	// le nombre d'images au total
	var nb_images = imgGalerie.length;
	
	// on change les contenus des balises html
   img.src		= imgGalerie[offset][0];
   img.alt		= imgGalerie[offset][1];
   img.width	= imgGalerie[offset][2];
   img.height	= imgGalerie[offset][3];
   //tit.firstChild.data = imgGalerie[offset][1];
   
	// on change la vignette active courante
   imgGalerieIndx = offset;
}

function NextPhoto() {
	var nb_images = imgGalerie.length;
	var phot;
	if (imgGalerieIndx==nb_images-1)
		phot = 0;
	else
		phot = imgGalerieIndx + 1;
	
   ChangePhoto(phot);
}

function PrevPhoto() {
	var nb_images = imgGalerie.length;
	var phot;
	if (imgGalerieIndx==0)
		phot = nb_images - 1;
	else
		phot = imgGalerieIndx - 1;
	
   ChangePhoto(phot);
}
