		function diaporama_photo() {
			textContentOk = (document.getElementsByTagName("body")[0].textContent != undefined) ? true : false;
			diaporama = document.getElementById('iddiaporama') ;
			photo = document.getElementById('idphoto') ;
			pied = document.getElementById('idpied') ;
			titre = document.getElementById('idtitre') ;
			flecheG = document.getElementById('idflecheG') ;
			flecheD = document.getElementById('idflecheD') ;
			planche = document.getElementById('idplanche') ;
			liens  = planche.getElementsByTagName('a') ;
			precedent = document.getElementById('prec');
			suivant = document.getElementById('suiv');
			for (var i = 0 ; i < liens.length ; ++i) {
				liens[i].onclick = function() {
				charge_photo(this);	
				return false;			
				};
			}
			
		}
		function charge_photo(lien) {
			var imageTmp = new Image();
			
			imageTmp.onload = function() {
				pointeur=lien.tabIndex;
				photo.src=lien.href;
				photo.alt=lien.title;
				photo.style.width=lien.style.width;
				photo.style.height=lien.style.height;
				diaporama.style.paddingTop=""+((parseInt(photo.style.height) < 300)?"120px":"40px");
				if(textContentOk) titre.textContent=lien.title;
				else titre.innerText=lien.title;
				flecheG.src="flecheG.gif";
				if(lien.tabIndex == 1) flecheG.src="blanc.gif";
				flecheD.src="flecheD.gif";
				if(lien.tabIndex == liens.length) flecheD.src="blanc.gif";
				opacity('idplanche',100,0,500,0);
				setTimeout("faireretard1()",550);
				opacity('idphoto',0,100,500,600);
			};
			imageTmp.src = lien.href;
		}
		function faireretard1() {
			planche.style.display = 'none';
			changeOpac(0, 'idphoto');
			diaporama.style.display = 'block';
		}
		function retourPlanche() {
			opacity('idphoto',100,0,500,0);
			setTimeout("faireretard2()",550);
			opacity('idplanche',0,100,500,600);
		}
		function faireretard2() {
			diaporama.style.display = 'none';
			changeOpac(0, 'idplanche');
			
			planche.style.display = 'block';
		}
		function mouve(sens) {
			--pointeur;
			if (sens) var i = pointeur + 1;
			else var i = pointeur - 1;
			if(i < 0 || i >= liens.length) {
				++pointeur;
				return false;
			}
			var imageTmp = new Image();
			
			imageTmp.onload = function() {
				opacity('idphoto',100,0,500,0);
				setTimeout("faireretard3(" + i + ")",550);
				opacity('idphoto',0,100,500,600);
			};
			imageTmp.src = liens[i].href;
		}
		function faireretard3(i) {
			photo.src=liens[i].href;
			photo.alt=liens[i].title;
			photo.style.width=liens[i].style.width;
			photo.style.height=liens[i].style.height;
			if(textContentOk) titre.textContent=liens[i].title;
			else titre.innerText=liens[i].title;
			flecheG.src="flecheG.gif";
			if(liens[i].tabIndex == 1) flecheG.src="blanc.gif";
			flecheD.src="flecheD.gif";
			if(liens[i].tabIndex == liens.length) flecheD.src="blanc.gif";
			diaporama.style.paddingTop=""+((parseInt(photo.style.height) < 300)?"120px":"40px");
			pointeur=liens[i].tabIndex;
		}
		function opacity(id, opacStart, opacEnd, millisec, delai) {
			var speed = Math.round(millisec / 100);
			var timer = 0;
			if(opacStart > opacEnd) {
				for(i = opacStart; i >= opacEnd; i--) {
					setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed) + delai);
					timer++;
				}
			} else if(opacStart < opacEnd) {
				for(i = opacStart; i <= opacEnd; i++) {
					setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed) + delai);
					timer++;
				}	
			}
		}
		function changeOpac(opacity, id) {
			var object = document.getElementById(id).style;
			object.opacity = (opacity / 100);
			object.MozOpacity = (opacity / 100);
			object.KhtmlOpacity = (opacity / 100);
			object.filter = "alpha(opacity=" + opacity + ")";
		} 	
		function overFlecheG() {
			var i = pointeur - 1
			if(liens[i].tabIndex != 1) flecheG.src="flecheGB.gif";
		}
		function outFlecheG() {
			var i = pointeur - 1
			if(liens[i].tabIndex != 1) flecheG.src="flecheG.gif";
		}
		function overFlecheD() {
			var i = pointeur - 1
			if(liens[i].tabIndex != liens.length) flecheD.src="flecheDB.gif";
		}
		function outFlecheD() {
			var i = pointeur - 1
			if(liens[i].tabIndex != liens.length) flecheD.src="flecheD.gif";
		}