var diaporamas = new Array();var position = 0;var dBlocage = 0;var gBlocage = 0;var nbrImageConteneur = 0;var nbrImageTotal = 0;var temps = 0;var tailleConteneur = 0;var tailleSlidebox = 0;var tailleImage = 0;var positionMax = 0;var pas = 4;var tailleIdealConteneur = 612;var indice = 1;var vitesseSlide='slow';function calculDiaporama(ImageQty, imageSize, time, index){	tailleImage = imageSize;	nbrImageTotal = ImageQty;	temps = time;	indice = index;	nbrImageConteneur = Math.round( tailleIdealConteneur / tailleImage );	tailleSlidebox = tailleImage * nbrImageTotal + ( pas * ( nbrImageTotal - 1 ) );	tailleConteneur = nbrImageConteneur * tailleImage + ( nbrImageConteneur - 1) * pas;	positionMax = tailleSlidebox - tailleConteneur;	}function stockDiaporama(){		var diaporama  = new Array();	diaporama.push(tailleImage);	diaporama.push(nbrImageTotal);	diaporama.push(temps);	diaporama.push(indice);	diaporama.push(nbrImageConteneur);	diaporama.push(tailleSlidebox);	diaporama.push(tailleConteneur);	diaporama.push(positionMax);	diaporamas.push(diaporama);}function diaporama(ImageQty, imageSize, time, index){	calculDiaporama(ImageQty, imageSize, time, index);	stockDiaporama();	document.getElementById("conteneur"+indice).style.width = tailleConteneur + "px";	document.getElementById("slidebox"+indice).style.width = tailleSlidebox + "px";}function initDiaporama(index){	var diaporama = diaporamas[index-1];	tailleImage = diaporama[0];	nbrImageTotal = diaporama[1];	temps = diaporama[2];	indice = diaporama[3];	nbrImageConteneur = diaporama[4];	tailleSlidebox = diaporama[5];	tailleConteneur = diaporama[6];	positionMax = diaporama[7];	reInitDiaporama(indice);}function reInitDiaporama(index){	stop();	position = 0;	indice = index;	document.getElementById("slidebox"+indice).style.right = 0;	getStatus();}function finGauche(){	stop();		$("#slidebox"+indice).animate({right: "0"}, vitesseSlide);	position = 0;	getStatus();}function defilementGauche(){	stop();	gBlocage = 0;	gSlideShow();}function pasGauche(){	stop();		position = position - tailleImage - pas;	if (position < 0) position = 0;		positionner();}function pasDroite(){	stop();		position = position + tailleImage + pas;	if (position > positionMax) position = positionMax;		positionner();	}function defilementDroite(){	stop();	dBlocage = 0;	dSlideShow();	}function finDroite(){	stop();	$("#slidebox"+indice).animate({right: positionMax}, vitesseSlide);	position = positionMax;	getStatus();}function gSlideShow(){	if(gBlocage != 1){				position = position - tailleImage - pas;				if (position <= 0){ 						position = 0;			gBlocage = 1;					}		positionner();		t = setTimeout('gSlideShow()', temps)	}}function dSlideShow(){			if(dBlocage != 1){				position = position + tailleImage + pas;				if (position > positionMax) {						position = positionMax;			dBlocage = 1;					}		positionner();		t = setTimeout('dSlideShow()', temps);	}}function stop() {	dBlocage = 1;	gBlocage = 1;	getStatus();}function positionner() {	$("#slidebox"+indice).animate({right: position}, vitesseSlide);	getStatus();}oldImg = null;function rollOver(id) {		oldImg = document.getElementById(id).src;	if(document.getElementById(id).src.indexOf("static/images/"+id+".jpg") != -1){				document.getElementById(id).src = "static/images/"+id+"-rollover.jpg";	}}function rollOut(id) {		document.getElementById(id).src = oldImg;}function getStatus(){	if (gBlocage == 0){		document.getElementById('LectureGauche').src = "static/images/nondispo-LectureImageGauche.jpg";	}else{		document.getElementById('LectureGauche').src = "static/images/LectureImageGauche.jpg";	}	if (dBlocage == 0){		document.getElementById('LectureDroite').src = "static/images/nondispo-LectureImageDroite.jpg";	}else{		document.getElementById('LectureDroite').src = "static/images/LectureImageDroite.jpg";	}	if (position == positionMax){		document.getElementById('FinGauche').src = "static/images/nondispo-FinImageGauche.jpg";		document.getElementById('LectureGauche').src = "static/images/nondispo-LectureImageGauche.jpg";		document.getElementById('PasAGauche').src = 'static/images/nondispo-ParImageGauche.jpg';		}else{		document.getElementById('FinGauche').src = "static/images/FinImageGauche.jpg";		document.getElementById('LectureGauche').src = "static/images/LectureImageGauche.jpg";		document.getElementById('PasAGauche').src = 'static/images/ParImageGauche.jpg';		}	if (position == 0){		document.getElementById('PasADroite').src = 'static/images/nondispo-ParImageDroite.jpg';		document.getElementById('LectureDroite').src = "static/images/nondispo-LectureImageDroite.jpg";		document.getElementById('FinDroite').src = "static/images/nondispo-FinImageDroite.jpg";	}else{		document.getElementById('PasADroite').src = 'static/images/ParImageDroite.jpg';		document.getElementById('LectureDroite').src = "static/images/LectureImageDroite.jpg";		document.getElementById('FinDroite').src = "static/images/FinImageDroite.jpg";	}}function mouseOver(element){	if(element.src.search("nondispo") == -1){		if (document.all){			element.filters.alpha.opacity=70;		}else{			element.style.opacity=0.7;		}	}}function mouseOut(element){	if(element.src.search("nondispo") == -1){		if (document.all){			element.filters.alpha.opacity=100;		}else{			element.style.opacity=1;		}	}}function mouseUp(element){	if(element.src.search("nondispo") == -1){		if (document.all){			element.filters.alpha.opacity=70;		}else{			element.style.opacity=0.7;		}	}}function mouseDown(element){	if(element.src.search("nondispo") == -1){		if (document.all){			element.filters.alpha.opacity=40;		}else{			element.style.opacity=0.4;		}	}}