// Procédures globales du projet
function  fondCellule(Num,rep){
//		alert(Num);
		var nb = Num ;
	if (nb == 1)var pUrl = rep + "/yeux.jpg";
	if (nb == 2)var pUrl = rep + "/yeuxbleus.jpg";
	if (nb == 3)var pUrl = rep + "/yeuxmarrons.jpg";
	if (nb == 4)var pUrl = rep + "/yeuxverts.jpg";
		document.getElementById("A1").style.backgroundImage='url("'+pUrl+'")';
		if (nb == 4) nb=0;
		nb = nb + 1 ;
	setTimeout ( "fondCellule("+nb+","+rep+")", 1000 ); 
		;	

}

function RunSlideShow(num,rep)
{

		// Set slideShowSpeed (milliseconds)
		var slideShowSpeed = 3000
		
		// Duration of crossfade (seconds)
		var crossFadeDuration = 1
		
		// Specify the image files
		var Pic = new Array() // don't touch this
		// to add more images, just continue
		// the pattern, adding to the array below
		
	Pic[0] = rep + '/Visage2.jpg'
	Pic[1] = rep + '/Visage3.jpg'
	Pic[2] = rep + '/Visage1.jpg'
	Pic[3] = rep + '/Visage2.jpg'
	Pic[4] = rep + '/Visage3.jpg'
	
		var t
		var j = num
		var p = Pic.length
		
		var preLoad = new Array()
		for (i = 0; i < p; i++){
			preLoad[i] = new Image()
			preLoad[i].src = Pic[i]
//			alert(i);
			}
		
		if (document.all){
			document.images.A1.style.filter="blendTrans(duration=2)"
			document.images.A1.style.filter="blendTrans(duration=crossFadeDuration)"
			document.images.A1.filters.blendTrans.Apply() 
		}
		document.images.A1.src = preLoad[j].src
		if (document.all){
			document.images.A1.filters.blendTrans.Play()
		}
		j = j + 1
		if (j > (p-1)) j=0
		t = setTimeout('RunSlideShow('+j+','+rep+')', slideShowSpeed)
	}

