var delay=199999 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
	randomimages[0]="http://www.fws.gov/fisheries/images/toppics/fwco11.jpg"
	randomimages[1]="http://www.fws.gov/fisheries/images/toppics/tpic22.jpg"
	randomimages[2]="http://www.fws.gov/fisheries/images/toppics/tpic20.jpg"
	randomimages[3]="http://www.fws.gov/fisheries/images/toppics/tpic10.jpg"
	randomimages[4]="http://www.fws.gov/fisheries/images/toppics/tpic18.jpg"
	randomimages[5]="http://www.fws.gov/fisheries/images/toppics/fwco7.jpg"
	randomimages[6]="http://www.fws.gov/fisheries/images/toppics/tpic19.jpg"
	randomimages[7]="http://www.fws.gov/fisheries/images/toppics/joemoran.jpg"
	randomimages[8]="http://www.fws.gov/fisheries/images/toppics/tpic7.jpg"
	randomimages[9]="http://www.fws.gov/fisheries/images/toppics/tpic23.jpg"
	randomimages[10]="http://www.fws.gov/fisheries/images/toppics/tpic24.jpg"
	randomimages[11]="http://www.fws.gov/fisheries/images/toppics/tpic26.jpg"
	randomimages[12]="http://www.fws.gov/fisheries/images/toppics/tpic25.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)



		  