// JavaScript Document

var delay=100000000000 //set delay in miliseconds //100000000000 //5000
var curindex=0
var randomimages=new Array()
	randomimages[0]="img/headpic_01.jpg"
	randomimages[1]="img/headpic_02.jpg"
	randomimages[2]="img/headpic_03.jpg"
	randomimages[3]="img/headpic_04.jpg"
	randomimages[4]="img/headpic_05.jpg"
	randomimages[5]="img/headpic_06.jpg"
	randomimages[6]="img/headpic_07.jpg"
	randomimages[7]="img/headpic_08.jpg"
	randomimages[8]="img/headpic_09.jpg"
	randomimages[9]="img/headpic_10.jpg"
	randomimages[10]="img/headpic_11.jpg"
	randomimages[11]="img/headpic_12.jpg"
	randomimages[12]="img/headpic_13.jpg"
	randomimages[13]="img/headpic_14.jpg"
	randomimages[14]="img/headpic_15.jpg"
	randomimages[15]="img/headpic_16.jpg"
	randomimages[16]="img/headpic_17.jpg"
	randomimages[17]="img/headpic_18.jpg"
	randomimages[18]="img/headpic_19.jpg"
	randomimages[19]="img/headpic_20.jpg"
	randomimages[20]="img/headpic_21.jpg"
	randomimages[21]="img/headpic_22.jpg"
	randomimages[22]="img/headpic_23.jpg"
	randomimages[23]="img/headpic_24.jpg"
	randomimages[24]="img/headpic_25.jpg"
	randomimages[25]="img/headpic_26.jpg"
	randomimages[26]="img/headpic_28.jpg"
	randomimages[27]="img/headpic_29.jpg"
	randomimages[28]="img/headpic_30.jpg"
	randomimages[29]="img/headpic_31.jpg"
	randomimages[30]="img/headpic_32.jpg"
	randomimages[31]="img/headpic_33.jpg"
	randomimages[32]="img/headpic_34.jpg"
	randomimages[33]="img/headpic_35.jpg"
	randomimages[34]="img/headpic_36.jpg"
	randomimages[35]="img/headpic_37.jpg"
	randomimages[36]="img/headpic_38.jpg"
	randomimages[37]="img/headpic_39.jpg"
	randomimages[38]="img/headpic_40.jpg"
	randomimages[39]="img/headpic_41.jpg"
	randomimages[40]="img/headpic_42.jpg"
	randomimages[41]="img/headpic_43.jpg"
	randomimages[42]="img/headpic_44.jpg"
	randomimages[43]="img/headpic_45.jpg"
	randomimages[44]="img/headpic_46.jpg"
	randomimages[45]="img/headpic_47.jpg"
	
	//randomimages[33]="img/headpic_a.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)