 
// 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=16;
quoteArray = new Array(numQuotes);
quoteArray[0]="\"DO... Use any digital camera above 3 mega pixels. \"   ";
quoteArray[1]="\"DO... Keep all of the product in the frame. \"   ";
quoteArray[2]="\"DO... Use a reasonably uniform background. \"   ";
quoteArray[3]="\"DO... Ensure there is contrast between product and background. \"   ";
quoteArray[4]="\"DO... Ensure adequate lighting. \"   ";
quoteArray[5]="\"TIP... Using inside lighting? - avoid harsh shadows. \"   ";
quoteArray[6]="\"DONT... Use flash - it throws harsh shadows. \"   ";
quoteArray[7]="\"DONT... Place the product against a busy or similar background. \"   ";
quoteArray[8]="\"DONT... Make the product too small in the frame. \"   ";
quoteArray[9]="\"DONT... Shoot outside inthe middle of the day in direct sunlight. \"   ";
quoteArray[10]="\"TIP... Make sure of camera focus. \"   ";
quoteArray[11]="\"TIP... Set camera to highest quality setting. \"   ";
quoteArray[12]="\"TIP... If possible shoot outside on a well lit day in an evenly shaded area. \"   ";
quoteArray[13]="\"TIP... For inside lighting use halogen rather than tungsten lights. \"   ";
quoteArray[14]="\"TIP... Take as many pictures as possible - they are free!  \"   ";
quoteArray[15]="\"TIP... Take pictures from as many angles as possible. \"   ";

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

