 
// Author: Brandon Checketts
// Homepage: http://www.brandonchecketts.com/
// Email: brandon@brandonchecketts.com

numQuotes=19;
quoteArray = new Array(numQuotes);
quoteArray[0]="No word in the the English dictionary rhymes with \"MONTH\".";
quoteArray[1]="All polar bears are left handed."
quoteArray[2]="\"Q\" is the only letter in the alphabet that does not appear in the name of any of the United States."
quoteArray[3]="All the gold ever mined could be molded into a cube 60 feet high and 60 feet wide."
quoteArray[4]="All the pet hamsters in the world are descended from a single wild golden Hamster found in Syria in 1930!"
quoteArray[5]="All the platinum ever mined would fit into an average-sized living-room!"
quoteArray[6]="All the swans in England are property of the Queen."
quoteArray[7]="Almonds are a member of the peach family."
quoteArray[8]="Almost all varieties of breakfast cereals are made of grass."
quoteArray[9]="Aluminum used to be more valuable than gold!"
quoteArray[10]="America once issued a 5-cent bill!"
quoteArray[11]="Ants never sleep."
quoteArray[12]="The human brain is 80% water."
quoteArray[13]="Every year, kids in North America spend close to half a billion dollars on chewing gum."
quoteArray[14]="The parachute was invented by DiVinci in 1515."
quoteArray[15]="Your right lung takes in more air than your left one does."
quoteArray[16]="There are 86,400 seconds in day."
quoteArray[17]="A goldfish has a memory span of about 3 seconds."
quoteArray[18]="Singapore has only one train station."
quoteArray[19]="The earth is approx. 6,588,000,000,000,000,000 tons."

quoteShowing=-1;

function nextQuote()
{
  // restart at 0 if done
  if (quoteShowing >= numQuotes) quoteShowing=-1;
  quoteShowing++;

  // assign the value in the textbox to the new quote
  document.quoteForm.quoteHere.value = quoteArray[quoteShowing];
}

function prevQuote()
{
  // restart at end if on 0
  if (quoteShowing <= 0) quoteShowing=numQuotes+1;
  quoteShowing--;

  document.quoteForm.quoteHere.value = quoteArray[quoteShowing];
}

function randQuote()
{ 
  // Make sure you don't show the same quote 2x in a row
  prevQuoteShowing = quoteShowing;
  while(quoteShowing == prevQuoteShowing)
    quoteShowing = Math.ceil(Math.random() * numQuotes);

  document.quoteForm.quoteHere.value = quoteArray[quoteShowing];
}


