var BROWSER = "UNKNOWN";
var BROWSER_VERSION = "UNKNOWN";
var BROWSER_GENERATION;
var NS4 = false;
		
<!-- ************************************************** -->

if (top.navigator.appName != null)  // get browser app name
{
	if (top.navigator.userAgent.indexOf("Opera") != -1)
		BROWSER = "Opera";
	else if (top.navigator.appName == "Microsoft Internet Explorer")
		BROWSER = "ie";
	else if (top.navigator.appName == "Netscape")
		BROWSER = "nn";
}

if (top.navigator.appVersion != null)  // get browser version number
{
	BROWSER_VERSION = navigator.appVersion;
	var index = BROWSER_VERSION.indexOf (" ");
	BROWSER_VERSION = BROWSER_VERSION.substring (0, index);
	
	if (BROWSER == "ie") // fix for ie 5.0 appVersion bug
	{                                         // (returns 4.0 version number)
		if (top.navigator.userAgent.indexOf("5.0") != -1)
			BROWSER_VERSION = "5.0";
	}
}

BROWSER_GENERATION = BROWSER_VERSION.substring (0, BROWSER_VERSION.indexOf (".")) - 0;

if (BROWSER == 'nn' && BROWSER_GENERATION < 5)
{
	NS4 = true;
//	document.location.href = "/asp/ns4.asp";
}

else NS4 = false;

	if (BROWSER == 'nn' && BROWSER_GENERATION < 5)
		document.write ('<link rel="stylesheet" type="text/css" href="/styles/ns.css"/>');


<!-- ************************************************** -->

function FIND(item) 
{
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

<!-- ************************************************** -->

function Mark (row, mode)
{
	row.bgColor= (mode) ? '#eeeeee' : '#ffffff';
}

<!-- ************************************************** -->

var activeMenubarName = null;

function MarkMenubar (menubarname)
{
	if (menubarname != activeMenubarName)
	{
		if (activeMenubarName)
		{
			ColorMenubar (activeMenubarName, false);
			ShowPara (activeMenubarName, false);
		}
		
		ColorMenubar (menubarname, true);
		ShowPara (menubarname);
		
		activeMenubarName = menubarname;
	}
}

<!-- ************************************************** -->

function ColorMenubar (menubarname, mode)
{
	var menubar = FIND ("menu_" + menubarname);
	menubar.style.backgroundColor = (mode) ? '#ffffff' : '#ddeeff';
}

<!-- ************************************************** -->

function Hilight (icon_image)
{
	var srcname = icon_image.src;
	var gif_pos = srcname.indexOf (".gif");
	var active_pos = srcname.indexOf ("_active");
	var newname = "";
	if (active_pos >= 0)
		newname = srcname.substr (0, active_pos);
	else
		newname = srcname.substr (0, gif_pos) + "_active";
	newname += ".gif";
	icon_image.src = newname;
}

<!-- ************************************************** -->

function SwapMenuIcon(icon_image)
{
	var srcname = icon_image.src;
	var gif_pos = srcname.indexOf (".gif");
	var name_pos = srcname.indexOf ("_open");
	var newname = "";
	if (name_pos >= 0)
		newname = srcname.substr (0, name_pos) + "_close";
	else
	{
		name_pos = srcname.indexOf ("_close");
		newname = srcname.substr (0, name_pos) + "_open";
	}
	newname += ".gif";
	icon_image.src = newname;
}

<!-- ************************************************** -->

function ShowPara (para_name)
{
	var para = FIND (para_name);

	if (para.style.visibility != "visible")
	{
		para.style.visibility = "visible";
		para.style.display = "block";
	}
	else
	{
		para.style.visibility = "hidden";
		para.style.display = "none";
	}
}

<!-- ************************************************** -->

function SetOpenIcon (icon_id)
{
	Hilight (FIND (icon_id));
}

<!-- ************************************************** -->

function toggleSel (chkBox) 
{
	checkSubTasks(chkBox, chkBox.checked);
}

<!-- ************************************************** -->

function checkSubTasks(chkBox, value) 
{
	var elems = document.getElementsByTagName("input");
	var i = 0;
	for (i = 0; i <= elems.length-1; i++) 
	{
		if ((elems[i].type == "checkbox") && (elems[i].id.substr(0, chkBox.id.length) == chkBox.id) && (elems[i].id.length > chkBox.id.length)) 
		{
			elems[i].checked = value;
			checkSubTasks(elems[i], value);
		}
	}
}

<!-- ************************************************** -->

// document.onmousedown = cancelmenu;
