/* 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[15]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[15] = "Partying is such sweet sorrow.  -- Robert Byrne<br><br>I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco";

  arrFadeLinks[14]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[14] = "Nothing inspires forgiveness quite like revenge.  -- Scott Adams<br><br>Honest criticism is hard to take, particularly from a relative, a friend, an acquaintance, or a stranger. -- Franklin P. Jones";

  arrFadeLinks[13]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[13] = "Idealism is what precedes experience; cynicism is what follows.  -- David T. Wolf<br><br>All things are difficult before they are easy. -- Dr. Thomas Fuller, Gnomologia, 1732";

  arrFadeLinks[12]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[12] = "When they discover the center of the universe, a lot of people will be disappointed to discover they are not it. -- Bernard Bailey<br><br>If a dog jumps in your lap, it is because he is fond of you; but if a cat does the same thing, it is because your lap is warmer. -- Alfred North Whitehead";

  arrFadeLinks[11]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[11] = "There are many who dare not kill themselves for fear of what the neighbours will say. -- Cyril Connolly<br><br>About the most originality that any writer can hope to achieve honestly is to steal with good judgment. -- Josh Billings";

  arrFadeLinks[10]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[10] = "The first half of our lives is ruined by our parents, and the second half by our children. -- Clarence Darrow<br><br>Nothing is as simple as we hope it will be. -- Jim Horning";

  arrFadeLinks[9]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[9] = "A little inaccuracy sometimes saves tons of explanation. -- Saki, 'The Square Egg', 1924<br><br>What is the difference between unethical and ethical advertising? Unethical advertising uses falsehoods to deceive the public; ethical advertising uses truth to deceive the public. -- Vilhjalmur Stefansson, 'Discovery', 1964";

  arrFadeLinks[8]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[8] = "I'm an idealist. I don't know where I'm going, but I'm on my way. -- Carl Sandburg, Incidentals (1907)<br><br>My favorite thing about the Internet is that you get to go into the private world of real creeps without having to smell them. -- Penn Jillette, in a Compuserve chat";

  arrFadeLinks[7]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[7] = "The rule is perfect: in all matters of opinion our adversaries are insane. -- Mark Twain, in Christian Science<br><br>Cynically speaking, one could say that it is true to life to be cynical about it. -- Paul Tillich, The Courage to Be";

  arrFadeLinks[6]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[6] = "Walking isn't a lost art: one must, by some means, get to the garage.  -- Evan Esar<br><br>Diplomacy is the art of saying 'Nice doggie' until you can find a rock.  -- Will Rogers";

  arrFadeLinks[5]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[5] = "One of the keys to happiness is a bad memory. -- Rita Mae Brown<br><br>I can win an argument on any topic, against any opponent. People know this, and steer clear of me at parties. Often, as a sign of their great respect, they don't even invite me. -- Dave Barry";     

  arrFadeLinks[4]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[4] = "Thirty-five is a very attractive age. London society is full of women of the very highest birth who have, of their own free choice, remained thirty-five for years. -- Oscar Wilde, The Importance of Being Earnest, Act 3<br><br>The only thing that scares me more than space aliens is the idea that there aren't any space aliens. We can't be the best that creation has to offer. I pray we're not all there is. If so, we're in big trouble. -- Ellen DeGeneres";    
   
  arrFadeLinks[3]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[3] = "The hardest thing to learn in life is which bridge to cross and which to burn. -- David Russell<br><br>The truth does not change according to our ability to stomach it. -- Flannery O'Connor";    
  
  arrFadeLinks[2]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[2] = "It is forbidden to kill; therefore all murderers are punished unless they kill in large numbers and to the sound of trumpets. -- Voltaire<br><br>Whenever you find that you are on the side of the majority, it is time to reform. -- Mark Twain";         

  arrFadeLinks[1]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[1] = "Mustard's no good without roast beef. -- Chico Marx<br><br>Hollywood is a place where they'll pay you a thousand dollars for a kiss and fifty cents for your soul.  -- Marilyn Monroe";

  arrFadeLinks[0]  = "http://www.cdroms.com.au/cd/duplication.html";
  arrFadeTitles[0] = "I feel like a fugitive from the law of averages. -- William H. Mauldin";

   




}



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

var m_FadeOut =10;
var m_FadeIn=0;
var m_Fade = 0;
var m_FadeStep = 5;
var m_FadeWait =8000;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 50);
  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 = arrFadeLinks[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)
  {
  }
}
