var currentMenu = '';
function showMenu(sourceEle,menuId)
{
	
	if(currentMenu != "")
	{
		document.getElementById(currentMenu).style.display = 'none';
	}
	document.getElementById(menuId).style.display = 'block';
	if(menuId == currentMenu)
		return;	
	
	sourceEle.onmouseout = function onmouseout(event){document.getElementById(menuId).style.display = 'none';}
	currentMenu = menuId;
}

function holdMenu(menuEle)
{
	if(menuEle.id == currentMenu)
		return;
	menuEle.getElementById(menuId).style.display = 'block';
	menuEle.onmouseout = function onmouseout(event){document.getElementById(menuId).style.display = 'none';}
}

function fwExec(funcName,headerParams,actionEle)
{
	var header = 'reqtype=ajax&funcname='+funcName+"&"+headerParams;
		
	if (window.XMLHttpRequest)
  		var req = new XMLHttpRequest();
  	else if (window.ActiveXObject)
		var req = new ActiveXObject("Microsoft.XMLHTTP")
	req.open("POST",location.href,true);
	
	req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	req.setRequestHeader("Content-length", header.length);
	req.setRequestHeader("Connection", "close");
	req.send(header);
	
	req.onreadystatechange = function()
	{
		if (req.readyState==4) 
		{
			if(actionEle && document.getElementById(actionEle))
				document.getElementById(actionEle).innerHTML = req.responseText
		}		
	}
}
