if (navigator.appName == "Netscape") {
		window.onresize = resizenow; }
	function resizenow() {
		if (navigator.platform.substr(0,3) == "Mac") {
			window.location.reload(); }
		}
	var numGraphics = 14;	// <=== Adjust the number of image files here
	var theGraphics = null;
	var theCaptions = null;
	var theIndexCaption = null;
	var theGraphicName = 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() {
		theGraphics = new initArray(numGraphics);
		theCaptions = new initArray(numGraphics);
		for(i = 1; i <= numGraphics; i++) {
			if (i < 10) {
				theGraphics[i] = "homephoto00" + i + ".jpg"
				theCaptions[i] = "homecaption00"  + i }
			else {
			theGraphics[i] = "homephoto0" + i + ".jpg"
			theCaptions[i] = "homecaption0"  + i }
			}
		}
	function getRandomGraphic() {
		 var theIndex = getRandomNumber(numGraphics);
		 theIndexCaption = theIndex
		return theGraphics[theIndex]; 
		}
		
	function getGraphic() {
		theGraphicName = getRandomGraphic();
		theGraphic = "../~earthsci/homephoto/" + theGraphicName
		return theGraphic
		}
	
	function loadGraphic() {
		theGraphic = getGraphic();
		var theTag = '<table width="301" border="0" align="left" id="advert"><tr><td><a href="http://www.dartmouth.edu/~earthsci/aboutphotos.html#' + theGraphicName + '"><IMG SRC= "' + theGraphic + '"';
		theTag += ' WIDTH="300" BORDER="0"';
		theTag += ' ALT="Click the link for information about this photo"></a></td></tr></table>';
		//theTag += ' <tr><td>' + theCaptions[theIndexCaption] + '</td></tr></table> ';
		document.write(theTag);
		}
	initGraphics();