<!--
// fading marquee

function setupFadeLinks() {
  arrFadeLinks[5] = "#";
  arrFadeTitles[5] = "<center>Free Demo includes Tech Support - Try Us Out!</center>";
  arrFadeComments[5] = "Our Support was ranked 5 out of 5 in a review by NGWA Groundwater Journal.";
  arrFadeLinks[1] = "#";
  arrFadeTitles[1] = "<center>Exclusive Data Import Guarantee";
  arrFadeComments[1] = "We have the simplest and most intuitive data import process on the market.&nbsp;&nbsp; If you are unable to import your data, our experts will provide the necessary assistance for success or your money will be refunded.";
  arrFadeLinks[2] = "#";
  arrFadeTitles[2] = "<center>Creating State-of-the-Art Statistical Software for nearly Two Decades</center>";
  arrFadeComments[2] = "Dr. Henry Horsey conceived of GSAS, which later became Sanitas, in Boulder, Colorado in 1990.  Its first release was on the Macintosh platform in 1991.";
  arrFadeLinks[3] = "#";
  arrFadeTitles[3] = "<center>100% Satisfaction Guarantee</center>";
  arrFadeComments[3] = "We have hundreds of satisfied customers, and our reputation is important to us.  Software license purchases are 100% refundable if you are not completely satisfied.";
  arrFadeLinks[4] = "#";
  arrFadeTitles[4] = "<center>Also offering Fast and Accurate Consulting</center>";
  arrFadeComments[4] = "Get it off your plate!&nbsp;&nbsp; We have almost two decades of experience in going from raw data to regulatory submissions.  Click the 'services' tab for more info.";
  arrFadeLinks[0] = "#";
  arrFadeTitles[0] = "<center><font color=red>Version 9.1 Has Been Released!</font></center>";
  arrFadeComments[0] = "<font color=red>If you are a current Sanitas user and have not received an update notice, please contact us.  WQStat Plus is at v.9.0.</font>";
}

// 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 = 2;
var m_FadeWait = 1600;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeComments;
var arrFadeTitles;
var FadeCursor = 0;
var FadeMax;
var b_inside = false; //is the mouse over the link?
var dyn;
var counter = 0;

function Fadewl() {
  m_iFadeInterval = setInterval(fade_ontimer, 10);
  arrFadeLinks = new Array();
  arrFadeTitles = new Array();
  arrFadeComments = new Array();
  setupFadeLinks();
  FadeMax = arrFadeLinks.length-1;
  setFadeLink();
}

function setFadeLink() {
  var ilink = document.getElementById("fade_link");
  dyn = document.getElementById('dynamic_text');
  ilink.innerHTML = arrFadeTitles[FadeCursor];
  ilink.href = arrFadeLinks[FadeCursor];
  if (b_inside)
  {
    dyn.innerHTML = arrFadeComments[FadeCursor];
  }
  else
  {
    dyn.innerHTML = "";
  }
}

function fade_ontimer() {
  var ilink = document.getElementById("fade_link");
  if (b_inside) {
    ilink.style.color = "#" + ToHex(0);
    return;
  }
  if (m_bFadeOut) {
    m_Fade+=m_FadeStep;
    if (m_Fade>m_FadeOut) {
      FadeCursor++;
      if (FadeCursor>FadeMax)
        FadeCursor=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;
    }
  }
  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)
  {
  }
}
//-->