<!-- Beginning of JavaScript -

//JavaScript code by Sean Jackson; modified by Dale S. Farland, 7/9/2001
var numGraphics = 259;	     // The number of image files in the set
var filePrefix = "mts03-";   // First part of the file name
var fileExtension = ".jpg";  // Extension for image files
var filePath = "/evalctr/imgs/mts03institute/";  // Path to image directory on Web server
var imageAlt = "Photo from the MTS Summer Institute 2003";  //Alt for IMG tag
var theGraphics = null;
var theTag = null;

function initArray(n) {
	this.length = n;
	for(var i = 1; i <= n; i++) {
		this[i] = "";
		}
	return this;
}

function getRandomNumber(n) {
	//Returns a pseudorandom number between 1 and nunGraphics
	today = new Date();
	var bigNum = today.getSeconds() * today.getTime() *
Math.sqrt(today.getMinutes());
	var randNum = (bigNum % n) + 1;
	return Math.floor(randNum);
}

function initGraphics() {
	//Name Graphics: xxxnnn.jpg where nnn is a whole number
	//in the format "001" to "nnn"
	//images work OK in 320 x 240 size @ 72 ppi
	//note below that script assumes leading zeros
	theGraphics = new initArray(numGraphics);
	for(i = 1; i <= numGraphics; i++) {
		if (i < 100) {
			if (i < 10) {
				theGraphics[i] = filePrefix + "00" + i + fileExtension
			} else {
				theGraphics[i] = filePrefix + "0" + i + fileExtension
			}
		} else {
			theGraphics[i] = filePrefix + "" + i + fileExtension
		}
	}
}

function getRandomGraphic() {
	var theIndex = getRandomNumber(numGraphics);
	return theGraphics[theIndex];
}

function getGraphic() {
	var theGraphicName = getRandomGraphic();
	theGraphic = theGraphicName
	return theGraphic
}

initGraphics();
	theGraphic = getGraphic();
	var theTag = '<a href="index.html"><IMG SRC= "' + filePath + theGraphic + '"';
	theTag += ' HSPACE=0 VSPACE=0 BORDER="2" ALT="' + imageAlt + '"></a>'

	document.write(theTag);

// - End of JavaScript - -->
// - Unused code
