//Menu Code Copyright 2002 by Harold Blackorby III
//May not be reused in any way without written permission

function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns2 = (this.ns && (this.major == 3));
  this.ns3 = (this.ns && (this.major == 3));
  this.ns4b = (this.ns && (this.minor < 4.04));
  this.ns4up = (this.ns && (this.major >= 4));
  this.ns4 = (this.ns && (this.major == 4));
  this.ns6up = (this.ns && (this.major >= 5));
  this.ie = (agent.indexOf("msie") != -1);
  this.ie3 = (this.ie && (this.major == 2));
  this.ie4up = (this.ie && (this.major >= 4));
  this.op3 = (agent.indexOf("opera") != -1);
  this.win = (agent.indexOf("win")!=-1);
  this.mac = (agent.indexOf("mac")!=-1);
  this.unix = (agent.indexOf("x11")!=-1);
}

var is = new Is();
var doc;
var sty;
var htm;
var allready = false;

function showMenu(menu)
{
	if (allready)
	{
		if (is.ie4up || is.ns4up)
		{
			myLyr = eval(doc + menu + sty);
			if (myLyr)
			{
				myLyr.visibility = "visible";
			}
		}
	}
}


function startup()
{
	//Basically determines what Document Object Model to use.
	//Note there is one for Netscape 4, Netscape 6, and IE.
	
	if(is.ns4) {
		//alert("Netscape 4!");
		doc = "document.";
		sty = "";
		htm = ".document";
	}
	else if (is.ns6up)
	{
		//alert("Netscape 6!");
		doc = 'document.getElementById("';
		sty = '").style';
		htm = "";
	}
	else if(is.ie4up) {
		//alert("IE!");
		doc = "document.all.";
		sty = ".style";
		htm = "";
	}
	allready = true;
}

function flip(objName)
{
    obj = document.getElementById(objName);
    curState = obj.style.display;
    if (curState == "" || curState == "none")
        obj.style.display = "block";
    else
        obj.style.display = "none";
    return false;
}

function hoverover(obj)
{
    obj.className = "menuover";
    obj.style.background = "white";
}

function hoveroff(obj,color)
{
    obj.className = "menu";
    obj.style.background = color;
}