<!--- File:  menuhandler.js --->

	
	//open menu with given ID 
		function openMenu(menuID,linkObj)
		{
			//if the menu code is ready
			if(um.ready)
			{
				//find co-ordinates of link object
				var coords = {
					'x' : um.getRealPosition(linkObj,'x'),
					'y' : um.getRealPosition(linkObj,'y')
					};
					
				//increase y-position to place it below the link
				//coords.y += (linkObj.offsetHeight + 2);
				if (menuID == 'aliaslist' || menuID == 'poollist') {
					coords.x += (linkObj.offsetWidth + 2);
					coords.y += 10;
					}
				else {	coords.y += (linkObj.offsetHeight + 2);}

				//activate menu at returned co-ordinates
				um.activateMenu(menuID, coords.x + 'px', coords.y + 'px');
			}
		}
		
		//close menu with given ID
		function closeMenu(menuID)
		{
			//if the menu code is ready
			if(um.ready)
			{
				//deactive menu
				um.deactivateMenu(menuID);
			}
		}

		// show/hide toggle switch for the "my pools" and "my aliases" lists.
		function showhideswitchlinks(id) { 
			theTable = document.getElementById(id);
			theRows = theTable.getElementsByTagName('tr');
			//alert ('here: ' + theRows.length + ' ' + theRows[1].className);
			
			if(theRows[1].className == 'hidden') { 
				for (i=1; i<=theRows.length - 1; i++) {theRows[i].className = '';}
				theRows[0].className = 'down';
				}
			else { 
				for (i=1; i<=theRows.length - 1; i++) theRows[i].className = 'hidden';
				theRows[0].className = 'right';
				}
			}
