// Set up the image files to be used for the first book cover.
cover1 = new Array
// To add more cover images, continue with the pattern below, adding to the array.
	("../images/ne_cover01.jpg",
	 "../images/ne_cover03.jpg",
	 "../images/ne_cover05.jpg")

// Set up the links to the first set of books.
// The first link in the array matches the first cover listed in the book cover array, etc.
link1 = new Array
	("http://berkeley.worldcat.org/oclc/269437306?referer=list_view",
	 "http://berkeley.worldcat.org/oclc/213451373?referer=list_view",
	 "http://berkeley.worldcat.org/oclc/230199554?referer=list_view")

// This sets a counter to the total number of items in each of the two arrays.
// The value of the counter is used by the random number generator.
imgCt1 = cover1.length;

/* This function selects a random number to determine which book cover image
will be displayed, and the corresponding link to the book is activated.   */
function showImage1(){
	if (document.images) {    // if the document can handle images (it can)
	randomNum1 = Math.floor ((Math.random() * imgCt1))   // This is the random number generator
	}
// the XHTML is generated (book cover #1 with active link to the full text)
document.write('<a href="'+link1[randomNum1]+'"><img src="'+cover1[randomNum1]+'"></a>');
}
