// JavaScript Document

/* randomly load a single banner image from a list of file names */

/* image folder name relative to the html file*/

folderName = "images/teachingbanners/"

/* list of banner file names to pick from */

imageNames = new Array();

imageNames[0] = "barbie.jpg";
imageNames[1] = "dew.jpg";
imageNames[2] = "knives.jpg";
imageNames[3] = "loneliness.jpg";
imageNames[4] = "matzaball.jpg";
imageNames[5] = "murmur.jpg";
imageNames[6] = "provocative.jpg";
imageNames[7] = "serene.jpg";
imageNames[8] = "twisted.jpg";
imageNames[9] = "typhoon.jpg";

/* FUNCTION WHICH LOADS THE IMAGE */

function randomBanner(imageName){
	if(document.images){
		randomNum = Math.random(); 
		randomNum *= (imageNames.length - .6);     
		currentImage = Math.round(randomNum);
		document[imageName].src = folderName + imageNames[currentImage];
	}
}


