/* main.js                                                   */
/* 19 feburay 2001                                           */
/* anthony ubelhor (ubelhor@mindspring.com)                  */
/* specific scripts for the uk english department home page  */


		/* Break out of frames */
		if (top.frames.length != 0)
			top.location=self.document.location;

		/* Get a random number */
		function getRandom(maxNum) {
 			return Math.floor(Math.random() * maxNum) + 1;
		}

		/* Display a random .jpg image */
		function getImage(title, numberOfPics, picWidth, picHeight, picBorder) {
			var choose_one = new String(getRandom(numberOfPics)); 
			document.write("<img src='photos/"+title+choose_one+".jpg' width='"+picWidth+"' height='"+picHeight+"' border='"+picBorder+"' alt='Exhibition Home' />");
		}

		/* Create a pop-up window */
		function openWin(URL) {
			noteWindow = window.open(URL,"newindow","toolbar=no,menubar=no,resizable=yes,scrollbars=yes,width=250,height=500");
		}

		/* Get date last updated */
		function lastUpdate() {
			var days = new Array(8);
				days[1]="Sunday";
				days[2]="Monday";
				days[3]="Tuesday";
				days[4]="Wednesday";
				days[5]="Thursday";
				days[6]="Friday";
				days[7]="Saturday";
			var months = new Array(13);
				months[1]="January";
				months[2]="February";
				months[3]="March";
				months[4]="April";
				months[5]="May";
				months[6]="June";
				months[7]="July";
				months[8]="August";
				months[9]="September";
				months[10]="October";
				months[11]="November";
				months[12]="December";
			var dateObj = new Date(document.lastModified);
			var wday = days[dateObj.getDay() + 1];
			var lmonth = months[dateObj.getMonth() + 1];
			var date = dateObj.getDate();
			var fyear = String(dateObj.getFullYear());
			fyear = '20' + fyear.substr(2,4);
			document.write("Last modified " + date + " " + lmonth + " " + fyear);
		}

		/* Begin mouse rollover functions */	
		function PreloadImages(length, path, aorb, type, imgWidth, imgHeight) {
			for(var i = 1; i<=length; i++) {
				this[i] = new Image(imgWidth, imgHeight)
				this[i].src = path + i + aorb + type
			}
			return this
		}

		over = new PreloadImages(9,'img/menu','b','.gif', 200, 40)
		norm = new PreloadImages(9,'img/menu','a','.gif', 200, 40)

		function enable(num){
			if(document.images)
				eval('document.images["norm'+num+'"].src='+'over[num].src')
		}

		function disable(num){
			if(document.images)
				eval('document.images["norm'+num+'"].src='+'norm[num].src')
		}
		/* End mouse rollover functions */
