

var quotes = new Array(7);
var books = new Array(7);

quotes[0] = "The chief glory of every people arises from its authors.";
books[0] = "Preface to the Dictionary";

quotes[1] = "No man but a blockhead ever wrote, except for money.";
books[1] = "Dr Samuel Johnson";

quotes[2] = "When a man is tired of London, he is tired of life; for there is in London all that life can afford.";
books[2] = "Dr Samuel Johnson";

quotes[3] = "Patriotism is the last refuge of a scoundrel.";
books[3] = "Dr Samuel Johnson";

quotes[4] = "Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information upon it.";
books[4] = "Dr Samuel Johnson";

quotes[5] = "The triumph of hope over experience.";
books[5] = "On second marriages";

quotes[6] = "A man, Sir, should keep his friendship in constant repair.";
books[6] = "Dr Samuel Johnson";




//calculate a random index
index = Math.floor(Math.random() * quotes.length);

//display the quotation
function showQuote()
{
	var theQuote = quotes[index];
	document.write(theQuote);
}
function showBook()
{
	var theBook = books[index];
	document.write(theBook);
}






