<!--

var arrDiv = new Array();
var constMenuMax = 50;

function documentClick()
{
	if (document.onclick)
	{
		eval(document.onclick.toString().replace('anonymous()','documentClick()'));
		document.onclick = new Function("documentClick();delDivNode(0);");
	}
	else
	{
		document.onclick = new Function("delDivNode(0);");
	}	
}

var timeoutMenu = null;
var _bIsDeleteMenu = true;
function setMenuMouseOut()
{
	_bIsDeleteMenu = true;
	
	if (timeoutMenu != null)
	{
		clearTimeout(timeoutMenu);
		timeoutMenu = null;
	}
	
	timeoutMenu = setTimeout("delDivNode(0);",500);
}

function setMenuMouseOver()
{
	_bIsDeleteMenu = false;
	
	if (timeoutMenu != null)
	{
		clearTimeout(timeoutMenu);
		timeoutMenu = null;
	}
	
}

function getMenuIsDelete()
{
	return _bIsDeleteMenu;
}

function delDivNode(subNodeIndex)
{
	if (!getMenuIsDelete())
	{
		return false;
	}
	
	var tempIndexStr = "";
	while(subNodeIndex/constMenuMax >= 1)
	{
		subNodeIndex = subNodeIndex / constMenuMax;
		tempIndexStr += "," +(subNodeIndex - subNodeIndex%constMenuMax) + ".";
	}
	
	var arrDivLength = arrDiv.length;
	for(var i = arrDivLength - 1;i >= 0 ;i--)
	{
		if (tempIndexStr.indexOf(","+arrDiv[i][1].toString() + ".") <= -1 )
		{
			//arrDiv[i][0].removeNode(true);
			arrDiv[i][0].parentNode.removeChild(arrDiv[i][0]);
			arrDiv.splice(i,1);
		}
	}
	
}

function insertDivNode(objElementNode,subNodeIndex)
{
	var arrLength = arrDiv.length;
	
	for(var i = 0;i<arrLength;i++)
	{
		if (arrDiv[i][0] == objElementNode)
		{
			return ;
		}
	}
	
	arrDiv[arrLength] = new Array();
	arrDiv[arrLength][0] = objElementNode;
	arrDiv[arrLength][1] = subNodeIndex;	

	if (getBrowserType() == appNavNameIE)
	{
		insertIEDivNode(objElementNode,subNodeIndex);
	}
	else
	{
		insertNetscapeDivNode(objElementNode,subNodeIndex);
	}
}

function actionMenu()
{
	//_xmlNode = xmlDataLoad("/EOC/xml/cnpopmenu.xml",false);
	document.write('<span id=\"popMenuSpanAllColorPage\">&nbsp;</span>');
	chooseBrowserFunction(
		'document.write("<script language=\'javascript\' src=\'../../file_manager/tc/js/popmenuIE.js\'></script>")',
		'document.write("<script language=\'javascript\' src=\'../../file_manager/tc/js/popmenuNetscape.js\'></script>")'
	);
}

//-->
