// Set up the image files to be used for the third book cover.
cover3 = new Array
// To add more cover images, continue with the pattern below, adding to the array.
	("images/ebook21.gif",
	 "images/ebook22.gif",
	 "images/ebook23.gif",
	 "images/ebook24.gif",
	 "images/ebook25.gif",
	 "images/ebook26.gif",
	 "images/ebook27.gif",
	 "images/ebook28.gif",
	 "images/ebook29.gif",
	 "images/ebook30.gif",
	 "images/ebook31.gif")

// Set up the links to the third set of books.
// The first link in the array matches the first cover listed in the book cover array, etc.
link3 = new Array
	("http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=1424",
	 "http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=1580",
	 "http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=608",
	 "http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=1956",
	 "http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=1229",
	 "http://www.knovel.com/web/portal/browse/display?_EXT_KNOVEL_DISPLAY_bookid=1953",
	 "http://proquest.safaribooksonline.com/0596527349",
	 "http://proquest.safaribooksonline.com/1565922069",
	 "http://proquest.safaribooksonline.com/1565926641",
	 "http://proquest.safaribooksonline.com/0596001886",
	 "http://proquest.safaribooksonline.com/0596008031")

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