// 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/ebook01.jpg",
	 "images/ebook02.jpg",
	 "images/ebook03.jpg",
	 "images/ebook04.jpg",
	 "images/ebook05.jpg",
	 "images/ebook06.jpg",
	 "images/ebook07.jpg",
	 "images/ebook08.gif",
	 "images/ebook09.jpg",
	 "images/ebook10.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://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10085501&amp;page=1",
	 "http://www.hbcpnetbase.com/",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10082033&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10173732&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10188365&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10137220&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10079920&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10081935&amp;page=1",
	 "http://site.ebrary.com/lib/berkeley/document/display.jsp?docID=10180034&amp;page=1",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=585")

// 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>');
}
