 
// 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=46;
quoteArray = new Array(numQuotes);
quoteArray[0]="A righteous man may have many troubles, but the LORD delivers him from them all. Ps 34:19";
quoteArray[1]="He holds victory in store for the upright, he is a shield to those whose walk is blameless Prov 2:7"
quoteArray[2]="For surely, O LORD, you bless the righteous; you surround them with your favor as with a shield. Ps 5:12"
quoteArray[3]="The LORD is a refuge for the oppressed, a stronghold in times of trouble. Ps 9:9"
quoteArray[4]="You have made known to me the path of life; you will fill me with joy in your presence, with eternal pleasures at your right hand. Ps 16:11"
quoteArray[5]="Why are you downcast, O my soul? Why so disturbed within me? Put your hope in God, for I will yet praise him, my Savior and my God. Ps 42:5"
quoteArray[6]="Commit to the LORD whatever you do, and your plans will succeed. Prov 16:3" 
quoteArray[7]="Yet the LORD longs to be gracious to you; he rises to show you compassion. For the LORD is a God of justice. Blessed are all who wait for him! O people of Zion, who live in Jerusalem, you will weep no more. How gracious he will be when you cry for help! As soon as he hears, he will answer you. Is 30:18-19"
quoteArray[8]="For I know the plans I have for you, declares the LORD, plans to prosper you and not to harm you, plans to give you hope and a future. Jer 29:11"
quoteArray[9]="And let us consider how we may spur one another on toward love and good deeds. Heb 10:24"
quoteArray[10]="The LORD is good to those whose hope is in him, to the one who seeks him Lam 3:25"
quoteArray[11]="The Sovereign LORD is my strength; he makes my feet like the feet of a deer, he enables me to go on the heights. Hab 3:19"
quoteArray[12]="Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, to him be glory in the church and in Christ Jesus throughout all generations, for ever and ever! Amen. Eph 3:20-21"
quoteArray[13]="Finally, brothers, whatever is true, whatever is noble, whatever is right, whatever is pure, whatever is lovely, whatever is admirable - if anything is excellent or praiseworthy - think about such things. Phlp 4:8"
quoteArray[14]="He replied, If you have faith as small as a mustard seed, you can say to this mulberry tree, 'Be uprooted and planted in the sea,' and it will obey you. Lk 17:6"
quoteArray[15]="That if you confess with your mouth, Jesus is Lord, and believe in your heart that God raised him from the dead, you will be saved. Rom 10:9"
quoteArray[16]="Fight the good fight of the faith. Take hold of the eternal life to which you were called when you made your good confession in the presence of many witnesses. 1 Tim 6:12"
quoteArray[17]="Flee the evil desires of youth, and pursue righteousness, faith, love and peace, along with those who call on the Lord out of a pure heart. Don't have anything to do with foolish and stupid arguments, because you know they produce quarrels. 2 Tim 2:22-23"
quoteArray[18]="I pray that you may be active in sharing your faith, so that you will have a full understanding of every good thing we have in Christ. Phil 1:6"
quoteArray[19]="Therefore let us leave the elementary teachings about Christ and go on to maturity, not laying again the foundation of repentance from acts that lead to death, and of faith in God Heb 6:1"
quoteArray[20]="Now faith is being sure of what we hope for and certain of what we do not see. Heb 11:1"
quoteArray[21]="And without faith it is impossible to please God, because anyone who comes to him must believe that he exists and that he rewards those who earnestly seek him. Heb 11:6"
quoteArray[22]="Let us fix our eyes on Jesus, the author and perfecter of our faith, who for the joy set before him endured the cross, scorning its shame, and sat down at the right hand of the throne of God. Heb 12:2"
quoteArray[23]="Consider it pure joy my brothers whenever you face trials of many kinds, because you know that the testing of your faith develops perseverance. Perseverance must finish its work so that you may be mature and complete not lacking anything. Ja 1:2-4"
quoteArray[24]="As the body without the spirit is dead, so faith without deeds is dead. Ja 2:26"
quoteArray[25]="And the prayer offered in faith will make the sick person well; the Lord will raise him up. If he has sinned, he will be forgiven. Ja 5:15"
quoteArray[26]="If a man shuts his ears to the cry of the poor, he too will cry out and not be answered. Prov 21:13"
quoteArray[27]="Be still, and know that I am God. Ps 46:10"
quoteArray[28]="But when you pray, go into your room, close the door and pray to your Father, who is unseen. Then your Father, who sees what is done in secret, will reward you. Mt 6:6"
quoteArray[29]="Ask and it will be given to you; seek and you will find; knock and the door will be opened to you. For everyone who asks receives; he who seeks finds; and to him who knocks, the door will be opened. Mt 7:7-8"
quoteArray[30]="Again, I tell you that if two of you on earth agree about anything you ask for, it will be done for you by my Father in heaven. For where two or three come together in my name, there am I with them. Mt 18:19-20"
quoteArray[31]="If you believe, you will receive whatever you ask for in prayer. Mt 21:22"
quoteArray[32]="Jesus looked at them and said, With man this is impossible, but not with God; all things are possible with God. Mk 10:27"
quoteArray[33]="Therefore I tell you, whatever you ask for in prayer, believe that you have received it, and it will be yours. Mk 11:24"
quoteArray[34]="Ask and it will be given to you; seek and you will find; knock and the door will be opened to you. For everyone who asks receives; he who seeks finds; and to him who knocks, the door will be opened. Lk 11:9-10"
quoteArray[35]="And I will do whatever you ask in my name, so that the Son may bring glory to the Father. Jn 14:13"
quoteArray[36]="If you remain in me and my words remain in you, ask whatever you wish, and it will be given you. Jn 15:7"
quoteArray[37]="In that day you will no longer ask me anything. I tell you the truth, my Father will give you whatever you ask in my name. Jn 16:23"
quoteArray[38]="Now to him who is able to do immeasurably more than all we ask or imagine, according to his power that is at work within us, to him be glory in the church and in Christ Jesus throughout all generations, for ever and ever! Eph 3:20-21"
quoteArray[39]="Do not be anxious about anything, but in everything, by prayer and petition, with thanksgiving, present your requests to God. Phlp 4:6"
quoteArray[40]="And my God will meet all your needs according to his glorious riches in Christ Jesus. Phlp 4:19"
quoteArray[41]="Be joyful always; pray continually; give thanks in all circumstances, for this is God's will for you in Christ Jesus. 1 Th 5:16-18"
quoteArray[42]="I urge, then, first of all, that requests, prayers, intercession and thanksgiving be made for everyone, for kings and all those in authority, that we may live peaceful and quiet lives in all godliness and holiness. 1 Tim 2:1-2"
quoteArray[43]="Let us then approach the throne of grace with confidence, so that we may receive mercy and find grace to help us in our time of need. Heb 4:16"
quoteArray[44]="If any of you lacks wisdom, he should ask God, who gives generously to all without finding fault, and it will be given to him. But when he asks, he must believe and not doubt, because he who doubts is like a wave of the sea, blown and tossed by the wind. Ja 1:5-6"
quoteArray[45]="Therefore confess your sins to each other and pray for each other so that you may be healed. The prayer of a righteous man is powerful and effective. Ja 5:16"
quoteArray[46]="Dear friends, if our hearts do not condemn us, we have confidence before God and receive from him anything we ask, because we obey his commands and do what pleases him. 1 Jn 3:21-22"

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

