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

var randomimages=new Array()

	randomimages[0]="./img/expo2/gauche/1.jpg"
	randomimages[1]="./img/expo2/gauche/2.jpg"
	randomimages[2]="./img/expo2/gauche/3.jpg"
	randomimages[3]="./img/expo2/gauche/4.jpg"
	randomimages[4]="./img/expo2/gauche/5.jpg"
	randomimages[5]="./img/expo2/gauche/6.jpg"
	randomimages[6]="./img/expo2/gauche/7.jpg"
	randomimages[7]="./img/expo2/gauche/8.jpg"
	randomimages[8]="./img/expo2/gauche/9.jpg"
	randomimages[9]="./img/expo2/gauche/10.jpg"
	randomimages[10]="./img/expo2/gauche/11.jpg"
	randomimages[11]="./img/expo2/gauche/12.jpg"
	randomimages[12]="./img/expo2/gauche/13.jpg"
	randomimages[13]="./img/expo2/gauche/14.jpg"
	randomimages[14]="./img/expo2/gauche/15.jpg"
	randomimages[15]="./img/expo2/gauche/16.jpg"
	randomimages[16]="./img/expo2/gauche/17.jpg"
	randomimages[17]="./img/expo2/gauche/18.jpg"
	randomimages[18]="./img/expo2/gauche/19.jpg"
	randomimages[19]="./img/expo2/gauche/20.jpg"
	randomimages[20]="./img/expo2/gauche/21.jpg"
	randomimages[21]="./img/expo2/gauche/22.jpg"
	randomimages[22]="./img/expo2/gauche/23.jpg"
	randomimages[23]="./img/expo2/gauche/24.jpg"
	randomimages[24]="./img/expo2/gauche/25.jpg"
	randomimages[25]="./img/expo2/gauche/26.jpg"
	randomimages[26]="./img/expo2/gauche/27.jpg"
	randomimages[27]="./img/expo2/gauche/28.jpg"
	randomimages[28]="./img/expo2/gauche/29.jpg"
	randomimages[29]="./img/expo2/gauche/30.jpg"
	randomimages[30]="./img/expo2/gauche/31.jpg"
	randomimages[31]="./img/expo2/gauche/32.jpg"
	randomimages[32]="./img/expo2/gauche/33.jpg"
	randomimages[33]="./img/expo2/gauche/34.jpg"
	randomimages[34]="./img/expo2/gauche/35.jpg"
	randomimages[35]="./img/expo2/gauche/36.jpg"
	randomimages[36]="./img/expo2/gauche/37.jpg"
	randomimages[37]="./img/expo2/gauche/38.jpg"
	randomimages[38]="./img/expo2/gauche/39.jpg"
	randomimages[39]="./img/expo2/gauche/40.jpg"
	randomimages[40]="./img/expo2/gauche/41.jpg"
	randomimages[41]="./img/expo2/gauche/42.jpg"
	randomimages[42]="./img/expo2/gauche/43.jpg"
	randomimages[43]="./img/expo2/gauche/44.jpg"
	randomimages[44]="./img/expo2/gauche/45.jpg"
	randomimages[45]="./img/expo2/gauche/46.jpg"
	randomimages[46]="./img/expo2/gauche/47.jpg"
	randomimages[47]="./img/expo2/gauche/48.jpg"
	randomimages[48]="./img/expo2/gauche/49.jpg"
	randomimages[49]="./img/expo2/gauche/50.jpg"
	randomimages[50]="./img/expo2/gauche/51.jpg"
	randomimages[51]="./img/expo2/gauche/52.jpg"
	randomimages[52]="./img/expo2/gauche/53.jpg"
	randomimages[53]="./img/expo2/gauche/54.jpg"
	randomimages[54]="./img/expo2/gauche/55.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)
