/*
This variable sets the interval of the image chage in ms. 
1000 ms will result in a 1 second interval.
*/
var ivl = 6000;

/*
This variable sets the number of images.
Images should be named 0.jpg thru ??.jpg
You need to set the value to the highest image increment you have.
*/
var nim = 6;


/*
This variable sets the number the path to the images folder.
*/
var folderPath = "http://wings.buffalo.edu/uncrownedqueens/Q/corReplacementImages/";

/*
Do not change script below
*/
var ia = 0;


function setNew(theState){
	
	//alert("test");
	if(document.images){
	  daNu = 0;
	  while (daNu == 0){
		 daNu = Math.round(Math.random() * nim);
		 if (daNu < 1){daNu = 0;}
		 if (daNu > nim){daNu = 0;}
		 if (daNu == ia){daNu = 0;}
		 if (daNu == 0){daNu = 0;}
	  }
	  ia = daNu; 
	  document.fa.src = folderPath + ia + '.jpg';
	  var tik = setTimeout('setNew()', ivl);
  	}
}

setNew();