<!-- Hide
//do browser detect stuff

var isNS = (navigator.appName == "Netscape");
var isMacIE = ( (navigator.userAgent.indexOf("IE 4") > -1) && (navigator.userAgent.indexOf("Mac") > -1) );
var layerRef = (isNS) ? "document" : "document.all";
var styleRef = (isNS) ? "" : ".style";
var isDynamic = ( ((document.layers && document.layers['testmenu']) || (document.all && document.all['testmenu'])) && !isMacIE );
var activeMenu = 0;

// Work-around Netscape resize bug

if (isDynamic && isNS) {
	origWidth = innerWidth;
	origHeight = innerHeight;	
	onresize = reDo;
	}

function goOpener(myLink,closeme,closeonly) {
	if (! (window.focus && window.opener))return true;
	window.opener.focus();
	if (! closeonly)window.opener.location.href=myLink.href;
	if (closeme)window.close();
	return false;
	} 

function close_window(milliseconds) {
	setTimeout('self.close()',milliseconds);
	}

function popup_ext(url,width,height,scrollbars) {
	width = width || 640;
	height = height || 480;
	scrollbars = scrollbars || 'no';
	var props = 'toolbar=no,location=no,status=no,scrollbars=' + scrollbars + ',menubar=no,resizable=yes,copyhistory=no,width=' + width + ',height=' + height;
	indrevWin = window.open(url,'popup_ext',props);
	window.name="mainWindow"; // this renames the "main" browser window
	indrevWin.focus(); // this brings the popup to focus
	}

function activateMenu(menuLayerRef, LeftOffset, TopOffset) {
	if (isDynamic && activeMenu != menuLayerRef) {
		if (activeMenu) hideMenu("menu" + activeMenu); 
		menuID = "menu" + menuLayerRef;
		activeMenu = menuLayerRef;
		if (isNS) {
			document[menuID].top = TopOffset;
			document[menuID].left = LeftOffset;
			} else {
			document.all[menuID].style.pixelTop = TopOffset;
			document.all[menuID].style.pixelLeft = LeftOffset;
			}
		showMenu(menuID)
		}
	}

function showMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "visible"');
	}

function hideMenu(layerID) {
	eval(layerRef + '["' + layerID + '"]' + styleRef + '.visibility = "hidden"');
	}

// check if there's a menu active

function turnOff() {
	if (activeMenu) {
		menuID = "menu" + activeMenu;
		hideMenu(menuID);
		activeMenu = 0;
		}
	}

// kills menu on clickup
function MenuPopupInit() {
	if (isDynamic) {
		if (isNS) {
			document.captureEvents(Event.MOUSEUP);
			}
		document.onmouseup = turnOff;
		}
	}

// this function needs to be called from the sub menus DIV

function hideMe() {
	if (activeMenu) {
		menuID = "menu" + activeMenu;
		hideMenu(menuID);
		activeMenu = 0;
		}
	}

function reDo() {	
	if (innerWidth != origWidth || innerHeight != origHeight) {
		location.reload();
		}
	}	

function SetButton( TargetObject, Color ) {
	var TargetObjectLayer;
	var ButtonObject;

	if ( isNS ) {
		// take no action
	} else {
		ButtonObject = document.all[TargetObject];
		ButtonObject.style.backgroundColor = Color;
		}
	}	
// -->