/* writes a random quote (and author) to the site
 * Written by Micah Taylor http://descender.kixor.net on 2003-12-23
 * last modified: 2003-12-25
 *
 * To use:  Link to this source file, add calls to "writeQuote()" 
 * (and if you want, "writeAuthor()") to your site inside of <script> tags
 */

// the text for the quotes
var quoteText= new Array(
	"We have nothing to fear, but fear itself.",
	"God does not play dice with the universe.",
	"Eloi, Eloi, lama sabachthani?",
	"Man is the only animal that laughs and has a state legislature.",
	"Out of life's school of war: What does not destroy me, makes me stronger.",
	"<i>I LOVE IT WHEN A PLAN COMES TOGETHER!</i>"
);

// the author of the quote
var quoteAuthor= new Array(
	"Franklin D. Roosevelt", 
	"Albert Einstein", 
	"Jesus Christ",
	"Samuel Butler",
	"Friedrich Nietzsche",
	"Pokey the Pengiun"
);

// used to pick a random quote
var random;

// generate a random number and writes a qoute
function writeQuote()
{
	random = Math.floor(Math.random() * quoteText.length);
	document.write( quoteText[ random ] );
}

// writes the author name
function writeAuthor()
{
	document.write( quoteAuthor[ random ] );
}

/* example use:

<html>
<head>
 <script src="./quote.js" type="text/javascript" language="javascript">
 </script>
</head>

<body>
 <script>
  writeQuote();
 </script>
 <br />
 <br />
 <script>
  writeAuthor();
 </script>
</body>

*/

