 
// 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=5;
quoteArray = new Array(numQuotes);
quoteArray[0]="\"In these trying times, haven to reconnect with the spirit.  Bless you for your generosity in making this wonderful place available to others. I'll be back again and again.\"-J.C.C., Lunenburg County"
quoteArray[1]="\"We had the most wonderful time.  You have a beautiful home and country.  We will be back.  Thank you so much.\"-Sharon & Colin McEning,  Peebles Scotland"
quoteArray[2]="\"Perfect honeymoon spot - Thanks so much!\"  -Meredith and Ken Kremlin, Princeton New Jersey"
quoteArray[3]="\"Beautiful cottage... great view...Just wanted to say we loved it\"  -Rene and Tina Sips, Schyndel Holland"
quoteArray[4]="\"Almost spiritual - loved it....the fireplace, rocking chairs, lake ...beautiful area!\" -Malyons and Scott Arden, Winnipeg Manitoba"
quoteArray[5]="\"It was perfect. Something you would see in a story book. I would strongly advise that if you haven't been there, and you're thinking of going, then go!\" -Pam"

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
