<!--
var menuTop = 0;
var menuLeft = 0;

var domSMenu = null;
var oldDomSMenu = null;
var t = 0;
var lDelay = 5;
var lCount = 0;
var pause = 150;

function popMenu(menuNum){
	if (isDHTML) {
///// Sets the previous menu's visibility to hidden
		t = 2;
		if (oldDomSMenu) {
			oldDomSMenu.visibility = 'hidden'; 
			oldDomSMenu.zIndex = '0'; 
			t = 2; 
			lCount = 0;
		}
///// Defines the DOMs	of the menu objects
		var idMenu = 'container';
		var domMenu = findDOM(idMenu,0);
	
		
		var idMenuOpt = 'menuHead' + menuNum;
		var domMenuOpt = findDOM(idMenuOpt,0);	


		var idSMenu = 'menu' + menuNum;
		var domSMenu = findDOM(idSMenu,1);
		

		
///// Defines the positions of the sub-menus
	if (isID || isAll) { 
	/* IE5/Mac has a problem with this line block */
		var menuLeft = (domMenuOpt.offsetLeft) + 0;
		//the amount in pixels that we should place the menu from the top. IMPORTANT
		var menuTop = (domMenuOpt.offsetTop) + 20;
		}
		if (isLayers) {
			var menuLeft = document.layers[idMenuOpt].pageX  - 5;
			var menuTop = 55;
		}

///// Positions and shows the menu
		if (oldDomSMenu != domSMenu) {
			domSMenu.left = parseInt(menuLeft) + 'px'; //IE px fix
			domSMenu.top = parseInt(menuTop) + 'px'; //IE px fix
			domSMenu.visibility = 'visible';
			domSMenu.zIndex = '100';
			oldDomSMenu = domSMenu;
		}

///// Resets oldDom if it is the same as the current DOM
		else { oldDomSMenu = null; }
	}

////// Returns a 'null' value for non-DHTML Browsers 
	else { return null; }
}

function delayHide() {
///// Checks to see if there is a menu showing and whether 
///// the global variable 't' has been set to 0
    if ((oldDomSMenu) && (t == 0)) {

///// Hides the old menu, resets menu conditions, 
///// and stops the function running
        oldDomSMenu.visibility = 'hidden'; 
        oldDomSMenu.zIndex = '0';
        oldDomSMenu = null;
        lCount = 0; 
        return false;
    }

///// Interupts the function if another menu is opened
    if (t == 2) { lCount = 0; return false; }

///// Repeats the function adding 1 to lCount each time until 
///// lCount is equal to lDelay and then sets 't' to 0 so that 
///// the menu will hide when it runs again
    if (t == 1) { 
        lCount = lCount + 1;
        if (lDelay <= lCount) { t = 0; }
        if (lDelay >= lCount) { setTimeout('delayHide(' + t + ')',pause); }
    }
}
// -->
