function setupFadeLinks() {
  arrFadeLinks[0] = "http://www.gourdfestival.com";
  arrFadeTitles[0] = "First time ever at a gourd festival...Absolutely blew me away...I had so much fun watching people get excited over the art. -<b>Caroll G. Loomis</b>, Toledo, OR";
  arrFadeLinks[1] = "http://www.gourdfestival.com";
  arrFadeTitles[1] = "Fantastic! I love to attend every year...I travel about 200 miles one way to attend and would not miss it! <b>-Sandra Heinig</b>, California City, CA";
  arrFadeLinks[2] = "http://www.gourdfestival.com";
  arrFadeTitles[2] = "Absolutely wonderful! The best Festival of any kind I have ever attended. -<b>Vicki Dyas</b>, Brookdale, CA";
  arrFadeLinks[3] = "http://www.gourdfestival.com";
  arrFadeTitles[3] = "The Gourd Festival was such a blast! Set in such gorgeous scenery...with so many beautiful works of art to see. Can't wait to visit again next year. -<b>Becky R.</b>, Murrieta, CA";
  arrFadeLinks[4] = "http://www.gourdfestival.com";
  arrFadeTitles[4] = "Absolutely awesome...everyone raved about what an incredible experience it was...the food was great...the art was AMAZING and the atmosphere magical... -<b>Cynthia Jacobs</b>, Long Beach, CA";
  arrFadeLinks[5] = "http://www.gourdfestival.com";
  arrFadeTitles[5] = "Wonderful! Worth the trip from Missouri. -<b>Cher Hargis</b>, Wheatland, MO";
  arrFadeLinks[6] = "http://www.gourdfestival.com";
  arrFadeTitles[6] = "WONDERFUL!! So many booths and loved the workshop using the GourdMaster inks. -<b>Susan Thompson</b>, Vista, CA";
  arrFadeLinks[7] = "http://www.gourdfestival.com";
  arrFadeTitles[7] = "The quality of work and the creative genius of the presenters was amazing. -<b>Marcia</b>, Irvine, CA";
  arrFadeLinks[8] = "http://www.gourdfestival.com";
  arrFadeTitles[8] = "Breathtaking Exhibition! -<b>Raves Entertainment Roundup</b>";
}

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

var m_FadeOut = (245,224,150);
var m_FadeIn= 0;
var m_Fade = 0;
var m_FadeStep = 3;
var m_FadeWait = 4800;
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, 20);
  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)
  {
  }
}
