var delay=199999 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
	randomimages[0]="http://www.fws.gov/fisheries/images/4a.jpg"
	randomimages[1]="http://www.fws.gov/fisheries/images/4b.jpg"
	randomimages[2]="http://www.fws.gov/fisheries/images/4c.jpg"
	randomimages[3]="http://www.fws.gov/fisheries/images/4d.jpg"
	randomimages[4]="http://www.fws.gov/fisheries/images/4e.jpg"
	randomimages[5]="http://www.fws.gov/fisheries/images/4f.jpg"
	randomimages[6]="http://www.fws.gov/fisheries/images/4g.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)



