var delay=10000 //set delay in miliseconds
var curindex=0

var randomimages=new Array()

	randomimages[0]="./img/expo1/gauche/1.jpg"
	randomimages[1]="./img/expo1/gauche/2.jpg"
	randomimages[2]="./img/expo1/gauche/3.jpg"
	randomimages[3]="./img/expo1/gauche/4.jpg"
	randomimages[4]="./img/expo1/gauche/5.jpg"
	randomimages[5]="./img/expo1/gauche/6.jpg"
	randomimages[6]="./img/expo1/gauche/7.jpg"
	randomimages[7]="./img/expo1/gauche/8.jpg"
	randomimages[8]="./img/expo1/gauche/9.jpg"
	randomimages[9]="./img/expo1/gauche/10.jpg"
	randomimages[10]="./img/expo1/gauche/11.jpg"
	randomimages[11]="./img/expo1/gauche/12.jpg"
	randomimages[12]="./img/expo1/gauche/13.jpg"
	randomimages[13]="./img/expo1/gauche/14.jpg"
	randomimages[14]="./img/expo1/gauche/15.jpg"
	randomimages[15]="./img/expo1/gauche/16.jpg"
	randomimages[16]="./img/expo1/gauche/17.jpg"
	randomimages[17]="./img/expo1/gauche/18.jpg"
	randomimages[18]="./img/expo1/gauche/19.jpg"
	randomimages[19]="./img/expo1/gauche/20.jpg"
	randomimages[20]="./img/expo1/gauche/21.jpg"
	randomimages[21]="./img/expo1/gauche/22.jpg"
	randomimages[22]="./img/expo1/gauche/23.jpg"
	randomimages[23]="./img/expo1/gauche/24.jpg"
	randomimages[24]="./img/expo1/gauche/25.jpg"
	randomimages[25]="./img/expo1/gauche/26.jpg"
	randomimages[26]="./img/expo1/gauche/27.jpg"
	randomimages[27]="./img/expo1/gauche/28.jpg"
	randomimages[28]="./img/expo1/gauche/29.jpg"
	randomimages[29]="./img/expo1/gauche/30.jpg"
	randomimages[30]="./img/expo1/gauche/31.jpg"
	randomimages[31]="./img/expo1/gauche/32.jpg"
	randomimages[32]="./img/expo1/gauche/33.jpg"
	randomimages[33]="./img/expo1/gauche/34.jpg"
	randomimages[34]="./img/expo1/gauche/35.jpg"
	randomimages[35]="./img/expo1/gauche/36.jpg"
	randomimages[36]="./img/expo1/gauche/37.jpg"
	
var preload=new Array()

for (n=0;n<randomimages.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimages[n]
}

document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')

function rotateimage()
{

if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex

	document.images.defaultimage.src=randomimages[curindex]
}

setInterval("rotateimage()",delay)
