
<!-- Paste this code into an external JavaScript file named: marquee.js  -->

/* 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[0] = "sharepoint.html";
  arrFadeTitles[0] = "Microsoft Office SharePoint Server : Search : Quickly connect people with the right information.";
  arrFadeLinks[1] = "web_development.html";
  arrFadeTitles[1] = "Web Development : We provide quality web development services to enable businesses harness the power of the Internet.";
  arrFadeLinks[2] = "sharepoint.html";
  arrFadeTitles[2] = "Microsoft Office SharePoint : Share : convert insight into organizational knowledge. ";
  arrFadeLinks[3] = "web_design.html";
  arrFadeTitles[3] = "Web Design : we focus on building corporate websites that are not only aesthetically pleasing but are designed to meet the requirements of our clients.";
  arrFadeLinks[4] = "sharepoint.html";
  arrFadeTitles[4] = "Microsoft Office SharePoint Server : Collaborate : Simplify how people work together and help them more effectively apply information to their needs.";
}

// You can also play with these variables to control fade speed, fade color, and how fast the colors jump.

var m_FadeOut = 100;
var m_FadeIn=255;
var m_Fade = 250;
var m_FadeStep = 5;
var m_FadeWait = 4600;
var m_bFadeOut = true;

var m_iFadeInterval;

window.onload = Fadewl;

var arrFadeLinks;
var arrFadeTitles;
var arrFadeCursor = 0;
var arrFadeMax;

function Fadewl() {
  MM_preloadImages('images/facebook_ico_hover.png','images/twitter_ico_hover.png','images/linked_in_ico_hover.png','images/print_hover.png');	
  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)
  {
  }
}
