 
// 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=15;
quoteArray = new Array(numQuotes);
quoteArray[0]="\"For God loved the world so much that he gave his one and only Son, so that everyone who believes in him will not perish but have eternal life.\"  - John 3:16";
quoteArray[1]="\"Give thanks to the Lord, for he is good! His faithful love endures forever.\"  - Psalm 136:1"
quoteArray[2]="\"For I know the thoughts and plans that I have for you, says the Lord, thoughts and plans for welfare and peace and not for evil, to give you hope in your final outcome.\"  - Jeremiah 29:11"
quoteArray[3]="\"He sends forth His word and heals them and rescues them from the pit and destruction.\"  - Psalm 107:20"
quoteArray[4]="\"...The Lord is my Healer...\"  - Exodus 15:26"
quoteArray[5]="\"She is clothed with strength and dignity; she can laugh at the days to come.\"  - Proverbs 31:25"
quoteArray[6]="\"...and the God of all grace who called you to his eternal glory in Christ, after you have suffered a little while, will himself restore you and make you strong, firm and steadfast. To him be the power for ever and ever. Amen\"  - 1 Peter 5:10-11" 
quoteArray[7]="\" and you have been given fullness in Christ, who is the head over every power and authority…\" - Colossians 2:10"
quoteArray[8]="\"The thief comes to steal kill and destroy: I have come that they may have life, and have it to the full.\" - John 10:10"
quoteArray[9]="\"Do you have layers of weight to remove? Forgiveness, the best weight loss plan… Bear with each other and forgive whatever grievance you may have against one another. Forgive as the Lord forgave you.\" - Colossians 3:13"
quoteArray[10]="\"Payback is a… (action, not of God)… Make sure that nobody pays back wrong for wrong, but always try to be kind to each other and to everyone else.\" - 1 Thessalonians 5:15"
quoteArray[11]="\"Do you have a get backatcha attitude? … Do not repay evil for evil…\" - Proverbs 20:22"
quoteArray[12]="\"…Find a quiet place to pray like Jesus did… And in the morning long before daylight. He got up and went to a deserted place, and there He prayed.\" - Mark 1:35"
quoteArray[13]="\"Sleeping with the Bible under your pillow… Meditate on the Word of God day and night\" - Joshua 1:8"
quoteArray[14]="\"Want to look cute on the inside as well as the outside? Being Transformed by the renewing of your mind\" - Romans 12:2"
quoteArray[15]="\"Once you open the door to Jesus, fear must exit the door… So we say with confidence, The Lord is my helper; I will not be afraid. What can man do to me?\" - Hebrews 13:6"
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
