function setupFadeLinks() {
  arrFadeLinks[0] = "testimonials.html";
  arrFadeTitles[0] = "<p style=\"text-decoration:none;\">With these reports I am now in a position to talk to treating practitioners about what an injured worker “can do” rather then simply what they can’t.</p><p style=\"font-style:italic;text-decoration:none; font-size:10px;\">-  Neil Masterson <br />(Kennards Hire: Vic Manager)</p>";
  arrFadeLinks[1] = "testimonials.html";
  arrFadeTitles[1] = "<p style=\"text-decoration:none;\">I have no hesitation in recommending Job Fit services to any business where manual handling is an issue or risk. It has worked for us. Money well spent.</p><p style=\"font-style:italic;text-decoration:none; font-size:10px;\">-  Neil Masterson<br /> (Kennards Hire: Vic Manager)</p>";
  arrFadeLinks[2] = "testimonials.html";
  arrFadeTitles[2] = "<p style=\"text-decoration:none;\">I am happy to recommend Andrew Funke and the services extended through Job Fit as a way to enhance the management of OH&S in any workplace.</p><p style=\"font-style:italic;text-decoration:none; font-size:10px;\">- Rita Housiaux <br />(Hella: OH&S Manager)</p>";
  arrFadeLinks[3] = "testimonials.html";
  arrFadeTitles[3] = "<p style=\"text-decoration:none;\">Andrew was very well received by our staff. I am happy to refer Andrew and “Job Fit” to any company as a way of complementing the management of an effective OH&S program in the workplace.</p><p style=\"font-style:italic;text-decoration:none; font-size:10px;\">- Roslyn MacInnes<br /> (Wagner Spraytech: OH&S Officer)</p>";
  arrFadeLinks[4] = "testimonials.html";
  arrFadeTitles[4] = "<p style=\"text-decoration:none;\">This program has been embraced by our staff.  Our warehouse staff use this program to physically prepare for the demanding duties required of them in the course of a normal day.</p><p style=\"font-style:italic;text-decoration:none; font-size:10px;\">- Roslyn MacInnes<br /> (Wagner Spraytech: OH&S Officer)</italics></p>";
}

// 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 = 4000;
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, 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 = 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)
  {
  }
}
