function mailMe(obj, sDom, sUser){
  //obj.outerHtml = '<a href="test.htm" id="mail" onmouseover="javascript:this.href=mailMe(this, "example%23com","me");">Test Link</a>';
  return("mail"+"to:"+sUser+"@"+sDom.replace(/%23/g,"."));

  ////obj.innerHTML = "Test";	//works
  //obj.firstChild.data = "Test2";	//best solution
  ////obj.innerText = "Test";	//worked in IE7
  ////obj.outerHtml = "Test";	//failed
  ////obj.outerText = "Test";	worked in IE7
  ////obj.title = "Test";	//failed - created a tooltip instead
  //obj.href = "test.htm";
}

function mailDisplay(obj, sDom, sUser){
  obj.innerHtml = sUser+"@"+sDom.replace(/%23/g,".");
}

function showNav(area, topmenu)  {
	nav_area="nav"+area;

	// topmenu will be 1 when hovering over the top menu items.
	// When hovering over the dropdown menus we don't need to set the position
	// since it will already have been set when hovering over the top menu item.
	// Also, doing this when hovering over the dropdown menus caused a problem
	// in Firefox on Linux.
	if (topmenu == 1)
	{
		var menu_left = -1;
		var menu_width = -1;
		var menu_bottom = -1;
		var menu = "mnu" + area;
		var header_elem = document.getElementById("header");
		var navmenu_elem = document.getElementById("nav_main");
		var menu_elem = document.getElementById(menu);
		if (menu_elem == null)	// if not found then we want the 'id=current' element instead
		{
			menu_elem = document.getElementById("current");
		}
		if (menu_elem != null)
		{
			var header_height = header_elem.clientHeight;

			//menu_elem.style.font-size = "0.75px";	//doesn't seem to work

			//alert(menu_elem.style.left);		//shows blank
			//alert(menu_elem.left);		//shows undefined		
			//alert(menu_elem.style.pixelLeft);	//shows 0
			//alert(menu_elem.style.posLeft);	//shows 0
			//alert(menu_elem.offsetLeft + "     " + menu_elem.clientWidth + "   " + menu_elem.offsetWidth);		//ok

			menu_left = menu_elem.offsetLeft + navmenu_elem.offsetLeft;	// or try style.pixelLeft or style.posLeft
			menu_width = menu_elem.clientWidth - 3;	// or try offsetWidth or style.pixelWidth or style.posWidth
			menu_bottom = menu_elem.clientHeight + header_height;

			//alert("dropdown_left=" + menu_left + ", dropdown_top=" + menu_bottom);
		}

		if (menu_left > 0)
		{
			// position the dropdown menu correctly
			// firefox seems to require the "px"
			document.getElementById(nav_area).style.left = menu_left + "px";
		}
		if (menu_width > 0)
		{
			// size the dropdown menu correctly
			document.getElementById(nav_area).style.width = menu_width + "px";
		}
		if (menu_bottom > 0)
		{
			// position the dropdown menu correctly
			document.getElementById(nav_area).style.top = menu_bottom + "px";
		}
	}
	
	// make the dropdown menu visible
	document.getElementById(nav_area).style.visibility = 'visible';
}


function hideNav (area)   {
	nav_area="nav"+area;
	document.getElementById(nav_area).style.visibility='hidden';
}