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.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.ie4 = (this.ie && (this.major == 4));
  this.ie4up = (this.ie && (this.major >= 4));
  this.ie5up = (this.ie && (this.major >= 5));
  this.win = (agent.indexOf("win")!=-1);
  this.mac = (agent.indexOf("mac")!=-1);
}

var is = new Is();
var doc;
var sty;
var htm;
var allready;

var lastTime;
var timeOut = 5000;

function hideAll()
{
	for (j=0;j<=subs.length-1;j++)
	{
		if (1)
		{
			myLyr = eval(doc + subs[j] + sty);
			if (myLyr)
				if (myLyr.display != "")
					myLyr.display = "none";
		//	document.images[arrows[j]].src = nav_arrow1.src
		}
		else if (subs[j].indexOf(section) == -1)
		{
			myLyr = eval(doc + subs[j] + sty);
			if (myLyr)
				if (myLyr.display != "")
					myLyr.display = "none";
		//	document.images[arrows[j]].src = nav_arrow1.src
		}
	}
}

function flip(menu,arrow)
{
	if (allready) {
	if (is.ie4up || is.ns6up || is.ns4up)
	{
		hideAll();
		myLyr = eval(doc + menu + sty);
		if (myLyr)
		{
			if (lastTime)
				window.clearTimeout(lastTime);
		//	document.images[arrow].src = nav_arrow2.src
			myLyr.display = "block";
		//	myLyr.visibility = "show";
			lastTime = window.setTimeout('hideAll()',timeOut);
			
		}
	}
	}
	return false;
}

function startup()
{
	//Basically determines what Document Object Model to use.
	//Note there is one for Netscape 4, Netscape 6, and IE.
	//You can also specify a xdifferency and a ydifference to
	//add to the x and y coordinates (to compensate for any browser differences)
	if(is.ns4 || is.ns4up) {
		doc = "document.layers['";
		sty = "']";
		htm = "']";
		xdiff = 0;
		ydiff = 0;
	}
	else if (is.ns6up || is.ie5up)
	{
		doc = 'document.getElementById("';
		sty = '").style';
		htm = '")';
		xdiff = 0;
		ydiff = 0;
	}
	else if(is.ie4) {
		doc = "document.all.";
		sty = ".style";
		htm = "";
		xdiff = 0;
		ydiff = 0;
	}
	
//	nav_arrow1 = new Image();
//	nav_arrow1.src = level + "graphics/nav/nav_arrow1.gif";
//	nav_arrow2 = new Image();
//	nav_arrow2.src = level + "graphics/nav/nav_arrow2.gif";
	
	allready=true;

}