/* 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() {
  arrQ[0] = "There's nothing wrong with the younger generation that becoming taxpayers won't cure.";
  arrT[0] = " - Dan Bennett";
  arrQ[1] = "Collecting more taxes than is absolutely necessary is legalized robbery.";
  arrT[1] = " - Calvin Coolidge";
  arrQ[2] = "A liberal is someone who feels a great debt to his fellow man, which debt he proposes to pay off with your money.";
  arrT[2] = " - G. Gordon Liddy";
  arrQ[3] = "The purpose of a tax cut is to leave more money where it belongs: in the hands of the working men and working women who earned it in the first place.";
  arrT[3] = " - Robert Dole";
  arrQ[4] = "Isn't it appropriate that the month of the tax begins with April Fool's Day and ends with cries of 'May Day!'";
  arrT[4] = " - Rob Knauerhase";
  arrQ[5] = "But we need to quit taxing people upon death. No taxation without respiration.  ";
  arrT[5] = " - Steve King ";
  arrQ[6] = "It would be a hard government that should tax its people one-tenth part of their income.";
  arrT[6] = " - Benjamin Franklin";
  arrQ[7] = "Our forefathers made one mistake. What they should have fought for was representation without taxation. ";
  arrT[7] = " - Fletcher Knebel ";
  arrQ[8] = "Nearly everywhere monarchs raised themselves further above the level of the greatest nobles and buttressed their new pretensions to respect and authority with cannons and taxation.  ";
  arrT[8] = " - J. M. Roberts ";
  arrQ[9] = "Rulers do not reduce taxes to be kind. Expediency and greed create high taxation, and normally it takes an impending catastrophe to bring it down.   ";
  arrT[9] = " - Charles Adams  ";
  arrQ[10] = "Taxation: how the sheep are shorn.  ";
  arrT[10] = " - Edward Abbey ";
  arrQ[11] = "The level of taxation is driven by spending. Less spending leads to lower taxes. ";
  arrT[11] = " - Gregory D. Hess  ";
  arrQ[12] = "The tendency of taxation is to create a class of persons who do not labor, to take from those who do labor the produce of that labor, and to give it to those who do not labor.   ";
  arrT[12] = " - William Cobbett ";
  arrQ[13] = "Throughout his life, Ronald Reagan believed America is capable of great things and its people could and would lead the way if left unburdened by taxation and regulation. ";
  arrT[13] = " - William L. Jenkins  ";
  arrQ[14] = "The way to crush the bourgeoisie is to grind them between the millstones of taxation and inflation. ";
  arrT[14] = " - Vladimir Lenin ";
  arrQ[15] = "We now have so many regulations that everyone is guilty of some violation. ";
  arrT[15] = " - Donald Alexander";
}

// 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 = 2400;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrQ;
var arrT;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrQ = new Array();
  arrT = new Array();
  setupFadeLinks();
  arrFadeMax = arrQ.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  ilink.innerHTML = arrQ[arrFadeCursor] + arrT[arrFadeCursor];
  
}

function fade_ontimer() {
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      arrFadeCursor++;
      if (arrFadeCursor>arrFadeMax)
        arrFadeCursor=0;
      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)
  {
  }
}
