var quotes = Array();
var authors = Array();
quotes[0] = "Son, if you really want something in this life, you have to work for it. Now quiet! They're about to announce the lottery numbers.";
authors[0] = "Homer Simpson";
quotes[1] = "If God wanted women to play ball, he would've made them men.";
authors[1] = "Al Bundy, Married with children";
quotes[2] = "Failure is not an option - it comes bundled with Windows.";
quotes[3] = "Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.";
authors[3] = "Albert Einstein";
quotes[4] = "Maybe this world is another planet's Hell.";
authors[4] = "Aldous Huxley (1894-1963)";
quotes[5] = "A business is too big when it takes a week for gossip to go from one end of the office to the other.";
quotes[6] = "A cemetery is the worst place to get stoned.";
quotes[7] = "Speak when you're angry and you'll make the best speech you'll ever regret.";
authors[7] = "Henry Ward Beecher";
quotes[8] = "No one is perfect, but some of us are closer than others.";
quotes[9] = "Politicians and Diapers should be changed often, and for the same reason.";
quotes[10] = "Some books are to be tasted, others to be swallowed, and a few must be chewed and digested.";
quotes[11] = "Talent does what it can; genius does what it must.";
authors[11] = "Edward George Bulwer";
quotes[12] = "Smoking is a choice. Breathing is a necessity. Don't rob others of that right!";
quotes[13] = "Some treasure the truth so much, they only use it sparingly.";
quotes[14] = "Some men were born to lie, and some women were born to believe them.";
quotes[15] = "You aren't born with happiness, you have to find it yourself.";
quotes[16] = "You can't always be the best, but you should always try your best.";
quotes[17] = "We are all novices. Only the dead have nothing left to learn.";
quotes[18] = "We didn't lose the game; we just ran out of time.";
authors[18] = "Vince Lombardi";
quotes[19] = "The chains of marriage are so heavy that it takes two to carry them.";
quotes[20] = "The direct use of force is such a poor solution to any problem, it is generally employed only by small children and large nations.";
authors[20] = "David Friedman";
quotes[21] = "We can stand here like the French, or we can do something about it.";
authors[21] = "Marge Simpson";
quotes[22] = "You aren't lost if you don't care where you are.";
quotes[23] = "The best way to appreciate you job is to imagine yourself without one.";
quotes[24] = "The fellow that agrees with everything you say is either a fool or he is getting ready to skin you.";
authors[24] = "Kin Hubbard";

function assignQuotes() {
	var a = document.getElementById('random');
	if(a) a.onclick = randomQuotes;
	return false;
}

function randomQuotes()	{
	var qe = document.getElementById('quote');
	var ae = document.getElementById('author');
	var rnd = Math.floor(Math.random() * (quotes.length-1));
	qe.innerHTML = '&raquo; ' + quotes[rnd];
	if(authors[rnd]) {
		author = authors[rnd];
	} else {
		author = 'no author';
	}
	ae.innerHTML = '&ndash; ' + author;
}

/* init & load */
window.oninit = function() {
	if (document.getElementById && document.getElementsByTagName) {
		assignQuotes();
	}
}
launchInit = function() {
	if (document.getElementsByTagName && typeof(window.oninit)=='function') {
		if (document.getElementsByTagName('body').length>0) window.oninit();
		else setTimeout('launchInit()',30);
	}
}
launchInit();