<!-- Beginning of JavaScript -

//JavaScript code by Sean Jackson

var numGraphics = 77;	// <=== Adjust the number of image files here
var theGraphics = null;
var theTag = null;

function getRandomNumber(n) {
	//Returns a pseudorandom number between 1 and n
	today = new Date();
	var bigNum = today.getSeconds() * today.getTime() *
Math.sqrt(today.getMinutes());
	var randNum = (bigNum % n) + 1;
	return Math.floor(randNum);
}

function initArray(n) {
	this.length = n;
	for(var i = 1; i <= n; i++) {
		this[i] = "";
		}
	return this;
}

function initGraphics() {
	//Name Graphics: graphicnn where nn is a whole number
	//in the format "001" to "099"
	theGraphics = new initArray(numGraphics);
	for(i = 1; i <= numGraphics; i++) {
		if (i < 10) {
			theGraphics[i] = "Photo00" + i + ".jpg"
		} else {
			theGraphics[i] = "Photo0" + i + ".jpg"
		}
	}
}

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= "/evalctr/imgs/mts99institute/' + theGraphic + '"';
	theTag += ' HSPACE=0 VSPACE=0 BORDER="2" ALT="Photo from the MTS Summer Institute 1999"></a>'

	document.write(theTag);

// - End of JavaScript - -->
