  // Initalization /////////////////
  if (navigator.appName.indexOf("Microsoft",0) != -1 && parseInt(navigator.appVersion) >= 4) {
      Browser = true;
  } else {
      Browser = false;
  }

  if (Browser) {
    document.onmouseover = doMouseOver;
    document.onmouseout = doMouseOut;
  }
  //////////////////////////////////

  // doMouseOver ///////////////////
  function doMouseOver() {
    if(Browser){
      srcElement = window.event.srcElement;
      if (srcElement.tagName == 'A' && srcElement.name != '' && srcElement.href != '') {
        var linkName = srcElement.name;
        // Edit colors here (must be in RGB value)
	//fade(23,115,170, 255,255,255, 15, 1, linkName);
	fade(118,154,160, 43,62,77, 15, 1, linkName);
        //fade(23,115,170, 0,0,0, 15, 1, linkName);
      }
    }
  }
  //////////////////////////////////

  // doMouseOut ////////////////////
  function doMouseOut() {
    if (Browser){
      srcElement = window.event.srcElement;
      if (srcElement.tagName == 'A' && srcElement.name != '' && srcElement.href != '') {
        var linkName = srcElement.name;
        // Edit colors here (must be in RGB value)
	fade(43,62,77, 118,154,160, 15, 1, linkName);
        //fade(255,255,255, 23,115,170, 15, 1, linkName);
        //fade(0,0,0, 23,115,170, 15, 1, linkName);
      }
    }
  }
  //////////////////////////////////

  // makeArray /////////////////////
  function makeArray(n) {
    this.length = n;
    for(var i = 1; i <= n; i++)
      this[i] = 0;
    return this;
  }
  //////////////////////////////////

  // Define Hex array //////////////
  hexa = new makeArray(16);
  for(var i = 0; i < 10; i++) {
      hexa[i] = i;
  }
  hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
  hexa[13]="d"; hexa[14]="e"; hexa[15]="f";
  //////////////////////////////////

  // Convert RGB to HEX ////////////
  function hex(i) {
    if (i < 0)
      return "00";
    else if (i > 255)
      return "ff";
    else
     return "" + hexa[Math.floor(i/16)] + hexa[i%16];
  }
  //////////////////////////////////

  // setbgColor ////////////////////
  function setbgColor(r, g, b, element) {
    var hr = hex(r); var hg = hex(g); var hb = hex(b);
    element.style.color = "#"+hr+hg+hb;
  }
  //////////////////////////////////

  // fade //////////////////////////
  function fade(sr, sg, sb, er, eg, eb, step, direction, element){
    for(var i = 0; i <= step; i++) {
      setTimeout("setbgColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+ ")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step);
    }
  }
  //////////////////////////////////
