/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Mike Hudson :: http://www.afrozeus.com */

function setupFadeLinks() {
arrFadeLinks[0] = "/contact/contact/scripture.html";
arrFadeTitles[0] = "The alien living with you must be treated as one of your native-born. Love him as yourself, for you were aliens in Egypt. I am the LORD your God.<br/><span class=\"vref\">Leviticus 19:34</span>";
arrFadeLinks[1] = "/contact/contact/scripture.html";
arrFadeTitles[1] = "For the LORD your God is God of gods and Lord of lords, the great God, mighty and awesome, who shows no partiality and accepts no bribes. He defends the cause of the fatherless and the widow, and loves the alien, giving him food and clothing.<br/><span class=\"vref\">Deut 10:17&ndash;18</span>";
arrFadeLinks[2] = "/contact/contact/scripture.html";
arrFadeTitles[2] = "There will always be poor people in the land. Therefore I command you to be openhanded toward your brothers and toward the poor and needy in your land.<br/><span class=\"vref\">Deut 15:11</span>";
arrFadeLinks[3] = "/contact/contact/scripture.html";
arrFadeTitles[3] = "When you have finished setting aside a tenth of all your produce in the third year, the year of the tithe, you shall give it to the Levite, the alien, the fatherless and the widow, so that they may eat in your towns and be satisfied.<br/><span class=\"vref\">Deut 26:12&ndash;13</span>";
arrFadeLinks[4] = "/contact/contact/scripture.html";
arrFadeTitles[4] = "You hear, O LORD, the desire of the afflicted; you encourage them, and you listen to their cry, defending the fatherless and the oppressed, in order that man, who is of the earth, may terrify no more.<br/><span class=\"vref\">Psalm 10:17&ndash;18</span>";
arrFadeLinks[5] = "/contact/contact/scripture.html";
arrFadeTitles[5] = "&quot;Because of the oppression of the weak and the groaning of the needy, I will now arise,&quot; says the LORD. &quot;I will protect them from those who malign them.&quot;<br/><span class=\"vref\">Psalm 12:5</span>";
arrFadeLinks[6] = "/contact/contact/scripture.html";
arrFadeTitles[6] = "My whole being will exclaim, &quot;Who is like you, O LORD ? You rescue the poor from those too strong for them, the poor and needy from those who rob them.&quot;<br/><span class=\"vref\">Psalm 35:10</span>";
arrFadeLinks[7] = "/contact/contact/scripture.html";
arrFadeTitles[7] = "Sing to God, sing praise to his name, extol him who rides on the clouds&mdash;his name is the LORD&mdash;and rejoice before him. A father to the fatherless, a defender of widows, is God in his holy dwelling.<br/><span class=\"vref\">Psalm 68:4&ndash;5</span>";
arrFadeLinks[8] = "/contact/contact/scripture.html";
arrFadeTitles[8] = "He will defend the afflicted among the people and save the children of the needy; he will crush the oppressor.<br/><span class=\"vref\">Psalm 72:4</span>";
arrFadeLinks[9] = "/contact/contact/scripture.html";
arrFadeTitles[9] = "Defend the cause of the weak and fatherless; maintain the rights of the poor and oppressed. 4 Rescue the weak and needy; deliver them from the hand of the wicked.<br/><span class=\"vref\">Psalm 82:3&ndash;4</span>";
arrFadeLinks[10] = "/contact/contact/scripture.html";
arrFadeTitles[10] = "The LORD works righteousness and justice for all the oppressed.<br/><span class=\"vref\">Psalm 103:6</span>";
arrFadeLinks[11] = "/contact/contact/scripture.html";
arrFadeTitles[11] = "Let them give thanks to the LORD for his unfailing love and his wonderful deeds for men, for he satisfies the thirsty and fills the hungry with good things.<br/><span class=\"vref\">Psalm 107:8&ndash;9</span>";
arrFadeLinks[12] = "/contact/contact/scripture.html";
arrFadeTitles[12] = "I know that the LORD secures justice for the poor and upholds the cause of the needy.<br/><span class=\"vref\">Psalm 140:12</span>";
arrFadeLinks[13] = "/contact/contact/scripture.html";
arrFadeTitles[13] = "The Maker of heaven and earth ... He upholds the cause of the oppressed and gives food to the hungry. The LORD sets prisoners free, the LORD gives sight to the blind, the LORD lifts up those who are bowed down, the LORD loves the righteous. The LORD watches over the alien and sustains the fatherless and the widow...<br/><span class=\"vref\">Psalm 146:6&ndash;9</span>";
arrFadeLinks[14] = "/contact/contact/scripture.html";
arrFadeTitles[14] = "He who oppresses the poor shows contempt for their Maker, but whoever is kind to the needy honors God.<br/><span class=\"vref\">Proverbs 14:31</span>";
arrFadeLinks[15] = "/contact/contact/scripture.html";
arrFadeTitles[15] = "He who is kind to the poor lends to the LORD, and he will reward him for what he has done.<br/><span class=\"vref\">Proverbs 19:17</span>";
arrFadeLinks[16] = "/contact/contact/scripture.html";
arrFadeTitles[16] = "A generous man will himself be blessed, for he shares his food with the poor.<br/><span class=\"vref\">Proverbs 22:9</span>";
arrFadeLinks[17] = "/contact/contact/scripture.html";
arrFadeTitles[17] = "He who gives to the poor will lack nothing, but he who closes his eyes to them receives many curses.<br/><span class=\"vref\">Proverbs 28:27</span>";
arrFadeLinks[18] = "/contact/contact/scripture.html";
arrFadeTitles[18] = "Learn to do right! Seek justice, encourage the oppressed. Defend the cause of the fatherless, plead the case of the widow.<br/><span class=\"vref\">Isaiah 1:17</span>";
arrFadeLinks[19] = "/contact/contact/scripture.html";
arrFadeTitles[19] = "You have been a refuge for the poor, a refuge for the needy in his distress, a shelter from the storm and a shade from the heat. For the breath of the ruthless is like a storm driving against a wall.<br/><span class=\"vref\">Isaiah 25:4</span>";
arrFadeLinks[20] = "/contact/contact/scripture.html";
arrFadeTitles[20] = "The poor and needy search for water, but there is none; their tongues are parched with thirst. But I the LORD will answer them; I, the God of Israel, will not forsake them. I will make rivers flow on barren heights, and springs within the valleys. I will turn the desert into pools of water, and the parched ground into springs.<br/><span class=\"vref\">Isaiah 41:17&ndash;18</span>";
arrFadeLinks[21] = "/contact/contact/scripture.html";
arrFadeTitles[21] = "&quot;Is not this the kind of fasting I have chosen: to loose the chains of injustice and untie the cords of the yoke, to set the oppressed free and break every yoke? Is it not to share your food with the hungry and to provide the poor wanderer with shelter&mdash;when you see the naked, to clothe him, and not to turn away from your own flesh and blood?<br/><span class=\"vref\">Isaiah 58:6&ndash;7</span>";
arrFadeLinks[22] = "/contact/contact/scripture.html";
arrFadeTitles[22] = "...and if you spend yourselves in behalf of the hungry and satisfy the needs of the oppressed, then your light will rise in the darkness, and your night will become like the noonday.<br/><span class=\"vref\">Isaiah 58:10</span>";
arrFadeLinks[23] = "/contact/contact/scripture.html";
arrFadeTitles[23] = "The Spirit of the Sovereign LORD is on me, because the LORD has anointed me to preach good news to the poor. He has sent me to bind up the brokenhearted, to proclaim freedom for the captives and release from darkness for the prisoners,<br/><span class=\"vref\">Isaiah 61:1</span>";
arrFadeLinks[24] = "/contact/contact/scripture.html";
arrFadeTitles[24] = "&#x27;Hear the word of the LORD, O king of Judah, you who sit on David&#x27;s throne&mdash;you, your officials and your people who come through these gates. This is what the LORD says: Do what is just and right. Rescue from the hand of his oppressor the one who has been robbed. Do no wrong or violence to the alien, the fatherless or the widow, and do not shed innocent blood in this place.<br/><span class=\"vref\">Jeremiah 22:2&ndash;3</span>";
arrFadeLinks[25] = "/contact/contact/scripture.html";
arrFadeTitles[25] = "&quot;Does it make you a king to have more and more cedar? Did not your father have food and drink? He did what was right and just, so all went well with him. He defended the cause of the poor and needy, and so all went well. Is that not what it means to know me?&quot; declares the LORD.<br/><span class=\"vref\">Jeremiah 22:15&ndash;16</span>";
arrFadeLinks[26] = "/contact/contact/scripture.html";
arrFadeTitles[26] = "Jesus replied, &quot;Go back and report to John what you hear and see: The blind receive sight, the lame walk, those who have leprosyare cured, the deaf hear, the dead are raised, and the good news is preached to the poor.<br/><span class=\"vref\">Matthew 11:4&ndash;5</span>";
arrFadeLinks[27] = "/contact/contact/scripture.html";
arrFadeTitles[27] = "Then he took the seven loaves and the fish, and when he had given thanks, he broke them and gave them to the disciples, and they in turn to the people. They all ate and were satisfied. Afterward the disciples picked up seven basketfuls of broken pieces that were left over.<br/><span class=\"vref\">Matt 15:32&ndash;37</span>";
arrFadeLinks[28] = "/contact/contact/scripture.html";
arrFadeTitles[28] = "Jesus answered, &quot;If you want to be perfect, go, sell your possessions and give to the poor, and you will have treasure in heaven. Then come, follow me.&quot;<br/><span class=\"vref\">Matthew 19:21</span>";
arrFadeLinks[29] = "/contact/contact/scripture.html";
arrFadeTitles[29] = "Jesus replied: &quot; &#x27;Love the Lord your God with all your heart and with all your soul and with all your mind.&#x27; This is the first and greatest commandment. And the second is like it: &#x27;Love your neighbor as yourself.&#x27; All the Law and the Prophets hang on these two commandments.&quot;<br/><span class=\"vref\">Matthew 22:37&ndash;40</span>";
arrFadeLinks[30] = "/contact/contact/scripture.html";
arrFadeTitles[30] = "&#x27;Lord, when did we see you hungry and feed you, or thirsty and give you something to drink? When did we see you a stranger and invite you in, or needing clothes and clothe you?&#x27; ... The King will reply, &#x27;I tell you the truth, whatever you did for one of the least of these brothers of mine, you did for me.&#x27;<br/><span class=\"vref\">Matthew 25:31&ndash;46</span>";
arrFadeLinks[31] = "/contact/contact/scripture.html";
arrFadeTitles[31] = "Sell your possessions and give to the poor. Provide purses for yourselves that will not wear out, a treasure in heaven that will not be exhausted, where no thief comes near and no moth destroys. For where your treasure is, there your heart will be also.<br/><span class=\"vref\">Luke 12:33&ndash;34</span>";
arrFadeLinks[32] = "/contact/contact/scripture.html";
arrFadeTitles[32] = "In Joppa there was a disciple named Tabitha (which, when translated, is Dorcas), who was always doing good and helping the poor.<br/><span class=\"vref\">Acts 9:36</span>";
arrFadeLinks[33] = "/contact/contact/scripture.html";
arrFadeTitles[33] = "Each man should give what he has decided in his heart to give, not reluctantly or under compulsion, for God loves a cheerful giver. And God is able to make all grace abound to you, so that in all things at all times, having all that you need, you will abound in every good work.<br/><span class=\"vref\">2 Corinthians 9:6&ndash;8</span>";
arrFadeLinks[34] = "/contact/contact/scripture.html";
arrFadeTitles[34] = "All they asked was that we should continue to remember the poor, the very thing I was eager to do.<br/><span class=\"vref\">Galatians 2:10</span>";
arrFadeLinks[35] = "/contact/contact/scripture.html";
arrFadeTitles[35] = "Religion that God our Father accepts as pure and faultless is this: to look after orphans and widows in their distress and to keep oneself from being polluted by the world.<br/><span class=\"vref\">James 1:27</span>";
arrFadeLinks[36] = "/contact/contact/scripture.html";
arrFadeTitles[36] = "Each of you should look not only to your own interests, but also to the interests of others.<br/><span class=\"vref\">Philippians 2:4</span>";
arrFadeLinks[37] = "/contact/contact/scripture.html";
arrFadeTitles[37] = "Carry each other's burdens, and in this way you will fulfill the law of Christ.<br/><span class=\"vref\">Galatians 6:2</span>";

}

// This is for creating random numbers.

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
}

function rand(number) {
        return Math.ceil(rnd()*number);
}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.


var m_FadeOut = 255;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 8000;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = rand(38)-1;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrFadeLinks = new Array();
  arrFadeTitles = new Array();
  setupFadeLinks();
  arrFadeMax = arrFadeLinks.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  ilink.innerHTML = arrFadeTitles[arrFadeCursor];
  ilink.href = "/contact/contact/scripture.html";
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor = rand(38)-1;
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor= rand(38)-1;
      setFadeLink();
      m_bFadeOut = false;
    }
  } else {
    m_Fade-=m_FadeStep;
    if (m_Fade<m_FadeIn) {
      clearInterval(m_iFadeInterval);
      setTimeout(Faderesume, m_FadeWait);
      m_bFadeOut=true;
    }
  }
  var ilink = document.getElementById("fade_link");
  if ((m_Fade<m_FadeOut)&&(m_Fade>m_FadeIn))
    ilink.style.color = "#" + ToHex(m_Fade);
}

function Faderesume() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
}

function ToHex(strValue) {
  try {
    var result = (parseInt(strValue).toString(16));

    while (result.length !=2)
            result = ("0" +result);
    result = result + result + result;
    return result.toUpperCase();
  }
  catch(e)
  {
  }
}

