
  var Init = false;
  var TopOpacity = 0;
  var StepSize = 0;
  var Bubble = false;

  var StatusIndex = Array();
  var StatusReset = Array();
  StatusIndex[0] = "Home";
  StatusReset[0] = false;

  StatusIndex[1] = "Portfolio";
  StatusReset[1] = false;

  StatusIndex[2] = "Services";
  StatusReset[2] = false;

  StatusIndex[3] = "Company";
  StatusReset[3] = false;

  StatusIndex[4] = "Contact";
  StatusReset[4] = false;

  StatusIndex[5] = "Quote";
  StatusReset[5] = false;

  function nav_fader(obj, mouseOver)
  {
    for(var i=0; i<StatusIndex.length; i++)
    {
      if (StatusIndex[i] == obj)
      {
        if (StatusReset[i] == true)
        {
          StatusReset[i] = false;
          mouseOver = !mouseOver;
          break;
        }
      }
    }

    var objAppearing = null;
    var objDisappearing = null;

    if (mouseOver)
    {
      objAppearing = $("nav" + obj + "Hover");
      objDisappearing = $("nav" + obj + "Normal");
    } else {
      objAppearing = $("nav" + obj + "Normal");
      objDisappearing = $("nav" + obj + "Hover");
    }

    var dispOpacity = Element.getOpacity(objDisappearing);
    var apprOpacity = Element.getOpacity(objAppearing);

    if (dispOpacity > 0 && apprOpacity < TopOpacity)
    {
      dispOpacity = dispOpacity - StepSize;
      if (dispOpacity < 0) dispOpacity = 0;

      apprOpacity = apprOpacity + StepSize;
      if (apprOpacity > TopOpacity) apprOpacity = TopOpacity;

      Element.setOpacity(objDisappearing, dispOpacity);
      Element.setOpacity(objAppearing, apprOpacity);

      if (dispOpacity > 0 && apprOpacity < TopOpacity)
      {
        setTimeout("nav_fader(\"" + obj + "\", " + mouseOver + ");", 10);
      }
    }

    //Effect.Fade(objDisappearing);
    //Effect.Appear(objAppearing);
  }

  function nav_fade(obj)
  {
    var Normal = $("nav" + obj + "Normal");
    var Hover = $("nav" + obj + "Hover");

    if (Bubble)
    {
      Bubble = false;
      return;
    }
    Bubble = false;

    //Element.getOpacity
    //Element.setOpacity
    //Transition:
    //  Takes 1 second
    //  Every 10 milliseconds
    //  Takes away 1/10th of availiable opacity each operation
    if (!Init)
    {
      Init = true;
      TopOpacity = Element.getOpacity(Normal);
      StepSize = TopOpacity/30;
    }

    //$("bodyContent").innerHTML += "Mouse Over";

    if (Element.getOpacity(Hover) == 0)
    {
      nav_fader(obj, true);
    } else {
      for(var i=0; i<StatusIndex.length; i++)
      {
        if (StatusIndex[i] == obj)
        {
          StatusReset[i] = true;
          break;
        }
      }
    }
  }

  function nav_appear(obj)
  {
    var Normal = $("nav" + obj + "Normal");
    var Hover = $("nav" + obj + "Hover");

    if (Bubble)
    {
      Bubble = false;
      return;
    }
    Bubble = false;

    //Element.getOpacity
    //Element.setOpacity
    //Transition:
    //  Takes 1 second
    //  Every 10 milliseconds
    //  Takes away 1/10th of availiable opacity each operation
    if (!Init)
    {
      Init = true;
      TopOpacity = Element.getOpacity(Hover);
      StepSize = TopOpacity/30;
    }

    //$("bodyContent").innerHTML += "Mouse Out";

    if (Element.getOpacity(Normal) == 0)
    {
      nav_fader(obj, false);
    } else {
      for(var i=0; i<StatusIndex.length; i++)
      {
        if (StatusIndex[i] == obj)
        {
          StatusReset[i] = true;
          break;
        }
      }
    }
  }

function findPosX(obj)
{
  return parseFloat(Element.getStyle(obj,'left') || '0');
}

function findPosY(obj)
{
return parseFloat(Element.getStyle(obj,'top') || '0');
}

menuLoaded = true;
