preloadImage('../images/nav/blue.jpg');
preloadImage('../images/nav/nav28.jpg');
preloadImage('../images/nav/nav28Hover.jpg');

var defaultPage;

function insertHeader()
{
  document.write("<TABLE id='navTable' cellpadding='0' cellspacing='0' border='0' width='150px'>");
}

function insertFooter()
{
  document.write("</TABLE>");
}

var prev = null;
function display(lk, dest, loc)
{
  if (prev != null)
  {
    prev.className='ns';
  }
  if (dest == null)
  {
    contentValue = getCookie("contentValue");
    if (contentValue == null)
    {
      contentValue=defaultPage;
    }
    top.content.location=contentValue;
  }
  lk.className='nsDisplayed';
  prev = lk;
  if (loc != null)
  {
    setCookie("buttonValue", loc);
    setCookie("contentValue", dest);
  }
}

function hover(me)
{
  if (me.className == 'ns')
  {
    me.style.color='#3166ff';
  }
}

function deHover(me)
{
  me.style.color='';
}

var ocrs = 0;
function makeButton(name, dest)
{
  if (ocrs == 0)
  {
    defaultPage = dest;
  }
  var theButton;
  if (ie)
  {
    theButton = "<TR><TD class='ns' onmouseover='hover(this)' onmouseout='deHover(this)' onClick='deHover(this);display(this, \""+dest+"\", "+(ocrs++)+");top.content.location=\""+dest+"\";'>"+name+"</TD></TR>";
  }
  else
  {
    theButton = "<TR><TD class='ns' onClick='display(this, \""+dest+"\", "+(ocrs++)+");top.content.location=\""+dest+"\";'>"+name+"</TD></TR>";
  }
  document.write(theButton);
}

function setup()
{
  var spot = 0;
  
  var buttonValue = getCookie("buttonValue");
  if ((buttonValue != null)
  &&  (buttonValue.length > 0))
  {
    spot = buttonValue;
  }

  display(document.getElementById("navTable").rows[spot].cells[0]);
}

