 
// Author:Brandon Checketts
// Homepage: http://www.apeleon.net/~microbit/brandon.html
// Email: Brandon@microbits.com
// For this script and more, visit http://wsabstract.com

numQuotes=75;
quoteArray = new Array(numQuotes);
quoteArray[0]="USED + SEX = WORDS"
quoteArray[1]="LETīS + LIST + AT + LEAST = THIRTY"
quoteArray[2]="PLEASE + MAKE = OFFERS"
quoteArray[3]="DOWN + WWW = ERROR"
quoteArray[4]="TESS + SEES = ELLEN"
quoteArray[5]="SYSTEM - DEEMED = SENSE"
quoteArray[6]="SNIP - NIPS = PINS" 
quoteArray[7]="BUM + BUM + BUM = DUD"
quoteArray[8]="MEET + MOST = TEENS"
quoteArray[9]="YES + YES + YES + YES = EVER"
quoteArray[10]="OOOH + FOOD = FIGHT"
quoteArray[11]="HAPPY + HAPPY + HAPPY + DAYS = AHEAD"
quoteArray[12]="GOOD + DOG = OREO"
quoteArray[13]="TOO + TOO + TOO + TOO = GOOD"
quoteArray[14]="EAT + THAT = APPLE"
quoteArray[15]="TWO x TWO = THREE"
quoteArray[16]="PEAR + APPLE = GRAPE"
quoteArray[17]="DAD + HAD + A + BAD = HEAD"
quoteArray[18]="ON + MONTY + PYTHON = SPIRIT"
quoteArray[19]="CRACK + HACK = ERROR"
quoteArray[20]="NO + GUN + NO = HUNT"
quoteArray[21]="BEST + MADE = MASER"
quoteArray[22]="BYE + BYE + BYE + BYE + BYE + BYE = RAY"
quoteArray[23]="NEVER - DRIVE = RIDE"
quoteArray[24]="SPOT + A + TOP = GHOST"
quoteArray[25]="THIS + SIZE = SHORT"
quoteArray[26]="SEEN + SOME = BONES"
quoteArray[27]="HE + SEES + THE = LIGHT"
quoteArray[28]="WHAT + THAT = HERE"
quoteArray[29]="MEMO + FROM = HOMER"
quoteArray[30]="SHHH - S = ZZZ"
quoteArray[31]="NINE + FINE = WIVES"
quoteArray[32]="TED + HAS + GOOD = TASTE"
quoteArray[33]="THE + TEN + MEN = MEET"
quoteArray[34]="HERE + SHE = COMES"
quoteArray[35]="OLD + OLD + OLD = GOOD"
quoteArray[36]="SEND + MORE = MONEY"
quoteArray[37]="HE x HE = SHE"
quoteArray[38]="NOT + THIS = YOUTH"
quoteArray[39]="NINA + SING = AGAIN"
quoteArray[40]="LABEL + ALL + SEAL = BALES"
quoteArray[41]="AT + EAST + WEST = SOUTH"
quoteArray[42]="THY + HAY = MYTH"
quoteArray[43]="MEET + MOST = TEENS"
quoteArray[44]="TAKE + A + CAKE = KATE"
quoteArray[45]="TAKE + HER + SHARE = THESE"
quoteArray[46]="WHO + IS + THIS = IDIOT"
quoteArray[47]="TUT + TUT + A = RAT"
quoteArray[48]="STARS + RATE = TREAT"
quoteArray[49]="NO + MAN + NO = HAND"
quoteArray[50]="TAKE + THAT = SHEET"
quoteArray[51]="DONALD + GERALD = ROBERT"
quoteArray[52]="DAYS + TOO = SHORT"
quoteArray[53]="BASE + BALL = GAMES"
quoteArray[54]="LYNNE + LOOKS = SLEEPY"
quoteArray[55]="BARREL + BROOMS = SHOVELS"
quoteArray[56]="COCA + COLA = OASIS"
quoteArray[57]="BE x BE = MOB"
quoteArray[58]="MOSES + MEETS = SALOME"
quoteArray[59]="NO + NO + TOO = LATE"
quoteArray[60]="COUPLE + COUPLE = QUARTET"
quoteArray[61]="STORE + AND + NAME = BRANDS"
quoteArray[62]="CROSS + ROADS = DANGER"
quoteArray[63]="TRIED + DRIVE = RIVET"
quoteArray[64]="WAIT + ALL = GIFTS"
quoteArray[65]="LEAH + LOVES = RUSSIA"
quoteArray[66]="FOOD + FAD = DIETS"
quoteArray[67]="LEW + WILL + BE = ABLE"
quoteArray[68]="START + START + THIS + START = ARIGHT"
quoteArray[69]="WOW  + WOW + WOW + WOW + WOW = MEOW"
quoteArray[70]="DOUBLE + DOUBLE + TOIL = TROUBLE"
quoteArray[71]="SEEM + MEAN = TEAMS"
quoteArray[72]="NOTICE + NICE = PRICES"
quoteArray[73]="WOW + WHAT + A = TOOT"
quoteArray[74]="MAKE + A + CAKE = EMMA"
quoteArray[75]="TELL + TALE + TELL + TALE = LATE"
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];
}

window.onload=randQuote

