﻿// JavaScript Document
window.onload = quotes;
function quotes(){
//store the quotations in arrays
quotes = new Array(12);
authors = new Array(12);
quotes[0] = "Be thankful we're not getting all the government we're paying for.";
authors[0] = "Will Rogers";
quotes[1] = "Reality is the leading cause of stress for those in touch with it.";
authors[1] = "Jack Wagner";
quotes[2] = "Few things are harder to put up with than the annoyance of a good example.";
authors[2] = "Mark Twain";
quotes[3] = "The pure and simple truth is rarely pure and never simple.";
authors[3] = "Oscar Wilde";
quotes[4] = "There's no business like show business, but there are several businesses like accounting.";
authors[4] = "David Letterman";
quotes[5] = "Man invented language to satisfy his deep need to complain.";
authors[5] = "Lily Tomlin";
quotes[6] = "If you can't explain it simply, you don't understand it well enough"
authors[6] = "Albert Einstein"
quotes[7] = "The difference between stupidity and genius is that genius has its limits. "
authors[7] = "Albert Einstein"
quotes[8] = "Education is what remains after one has forgotten what one has learned in school. "
authors[8] = "Albert Einstein"
quotes[9] = "Electricity is really just organized lightning. "
authors[9] = "George Carlin"
quotes[10] = "A two-year-old is kind of like having a blender, but you don't have a top for it."
authors[10] = "Jerry Seinfeld"
quotes[11] = "Do not make the mistake of treating your dogs like humans or they will treat you like dogs."
authors[11] = "Martha Scott"
quotes[12] = "The trouble with political jokes is that very often they get elected."
authors[12] = "Will Rogers"
quotes[13] = "Politicians and diapers should be changed, often for the same reason..."
authors[13] = "Unknown"
quotes[14] = "Silence is golden; duct tape is silver"
authors[14] = "Unknown"
quotes[15] = "There will be no crisis today.  My schedule is full"
authors[15] = "Unknown"
quotes[16] = "If you tell the truth you don't have to remember anything."
authors[16] = "Mark Twain"
quotes[17] = "I'm not bossy; I just have better ideas"
authors[17] = "Unknown"
quotes[18] = "A psychiatrist is a person who will give you expensive answers that your wife will give you for free."
authors[18] = "Anonymous"

//calculate a random index
index = Math.floor(Math.random() * quotes.length);

//display the quotation
document.getElementById("quotes").innerHTML = ("<DL>\n <DT>" + "\"" + quotes[index] + "\"\n <DD>" + "-- " + authors[index] + "\n </DL>\n");
}

//done
