//以下用于淡入淡出
function inchmeal(objSrc)
{
	var bAddIt = (inchmeal.arguments.length>1) ? inchmeal.arguments[1] : 1;
	var iStep = (inchmeal.arguments.length>2) ? inchmeal.arguments[2] : 20;
	var iMaxVal = (inchmeal.arguments.length>3) ? inchmeal.arguments[3] : (bAddIt ? 80 : 20);

	if (bAddIt)
	{
		if (objSrc.filters.alpha.opacity  <= iMaxVal)
		{
			objSrc.filters.alpha.opacity += iStep;
		}
		else
		{
			if (window.objLighting)
			{
				clearInterval(objLighting);
			}
		}
	}
	else
	{
		if (objSrc.filters.alpha.opacity  >= iMaxVal)
		{
			objSrc.filters.alpha.opacity -= iStep;
		}
		else
		{
			if (window.objLighting)
			{
				clearInterval(objLighting);
			}		
		}
	}
}


function MenuMouseOverOut(objSrc)
{
	objCurObj = (MenuMouseOverOut.arguments.length>1) ? MenuMouseOverOut.arguments[1] : objSrc;

	if (window.objLighting)
	{
		clearInterval(objLighting);
	}

	if (objSrc.contains(event.toElement))
	{
		objLighting = setInterval("inchmeal(objCurObj)", 10);
	}
	else
	{
		if (objSrc.contains(event.fromElement))
		{
			objLighting = setInterval("inchmeal(objCurObj, 0)", 100);
		}
	}
}

var CurrentRow = -1;
//以下用于淡入淡出菜单
function ShowMenu(obj, RowNo)
{
	if ((CurrentRow != RowNo) && (document.all.menuDiv.filters.alpha.opacity == 0))
	{
		document.all.menuDiv.style.posLeft = document.body.scrollLeft + event.clientX;//event.clientX;
		document.all.menuDiv.style.posTop = document.body.scrollTop + event.clientY; //event.clientY;
		CurrentRow = RowNo;

		/*
		var MenuTop = obj.offsetTop;
		var MenuLeft = obj.offsetLeft;
		while(obj == obj.offsetParent)
		{
			MenuTop += obj.offsetTop;
			MenuLeft += obj.offsetLeft;
		}

		document.all.menuDiv.style.posLeft = document.body.scrollLeft + MenuLeft;
		document.all.menuDiv.style.posTop =	document.body.scrollTop + MenuTop +  60;
		*/

		MenuMouseOverOut(obj, menuDiv);
	}
}