f = document._slideShow;
n = 0;
t = 0;
btPlay = document.getElementById("bt_play");

f.delay.value = display;

function rollOver(type){
	if(!t) {	
		if (type == 0){ this.MM_swapImgRestore(); } 
		else { this.MM_swapImage('bt_play','','/medias/communs/slide_play_on.gif',0); }
	}
}

function startSS(){
	stopSS();
	btPlay.src="/medias/communs/slide_play_act.gif";
	t = setTimeout("runSS(" + f.currSlide.value + ")", 1 * 1);
}

function runSS(n){
	n++;
	if(n >= SLIDES.length){ n = 0; }						
	document.images["stage"].src = S[n].src;
	showLabel(n);
	f.currSlide.value = n;
	t = setTimeout("runSS(" + f.currSlide.value + ")", f.delay.value * 1000);
}

function stopSS(){ 
	if(t){ t = clearTimeout(t); btPlay.src="/medias/communs/slide_play_off.gif"; }
}

function nextSS(){
	stopSS();
	n = f.currSlide.value;					
	n++;
	setSS(n);
}

function prevSS(){
	stopSS();
	n = f.currSlide.value;
	n--;
	setSS(n);
}

function setSS(n){
	if(n >= SLIDES.length){ n = 0; }
	if(n < 0){ n = SLIDES.length - 1; }
	document.images["stage"].src = S[n].src;
	showLabel(n);
	f.currSlide.value = n;
}

function selected(n){
	stopSS();
	document.images["stage"].src = S[n].src;
	showLabel(n);
	SLIDES[a][0];
	f.currSlide.value = n;
}

function showLabel(n){
	label = document.getElementById("lblVisionneuse");
	if (SLIDES[n][1] !== ""){
		label.style.display = "";
		label.innerHTML = "<br>" + SLIDES[n][1];
	} else {
		label.style.display = "none";
	}
}

function slideStarter(){
	document.images['stage'].src = SLIDES[0][0];
	showLabel(0);
}

Timer();