// Set up the image files to be used for the second book cover.
cover2 = new Array
// To add more cover images, continue with the pattern below, adding to the array.
	("images/ebook11.jpg",
	 "images/ebook12.jpg",
	 "images/ebook13.jpg",
	 "images/ebook14.jpg",
	 "images/ebook15.jpg",
	 "images/ebook16.jpg",
	 "images/ebook17.jpg",
	 "images/ebook18.jpg",
	 "images/ebook19.jpg",
	 "images/ebook20.jpg")

// Set up the links to the second set of books.
// The first link in the array matches the first cover listed in the book cover array, etc.
link2 = new Array
	("http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=6464",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=6692",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=403",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=4657",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=6929",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=844",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=1619",
	 "http://www.engnetbase.com/ejournals/books/book_summary/summary.asp?id=6600",
	 "http://uclibs.org/PID/109940",
	 "http://uclibs.org/PID/120094")

// 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.
imgCt2 = cover2.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 showImage2(){
	if (document.images) {    // if the document can handle images (it can)
	randomNum2 = Math.floor ((Math.random() * imgCt2))   // This is a random number generator
	}
// the XHTML is generated (book cover #2 with active link to the full text)
document.write('<a href="'+link2[randomNum2]+'"><img src="'+cover2[randomNum2]+'"></a>');
}
