var h,w,l,t,isvisible;
 var topMar = 1;
 var leftMar = -5;
 var space = 1;
 var isvisible;
 var isvisible1;
 var MENU_SHADOW_COLOR='#428eff';//定义下拉菜单阴影色

 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array
//document.write ("<div id='menu' style='position:absolute; left:-800px; top:-800px; z-index:10;border:0px #999999 dashed; visibility:hidden;background-color: #f5f5f5;' style='filter:alpha(opacity=70)'></div>");
document.write ("<div id='menu' style='position:absolute; border:1px #eeeeee solid;visibility:hidden;'></div>");
//document.write ("<div id='menu1' style='position:absolute; border:3px #4283ff solid;visibility:hidden;'></div>");

function HideMenu() 
{
 	var mX,mY;
	if (isvisible == true)
	{
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(menu.style.left)) || (mX > parseInt(menu.style.left)+menu.offsetWidth) || (mY < parseInt(menu.style.top)-h) || (mY > parseInt(menu.style.top)+menu.offsetHeight))
		{
			menu.style.visibility = "hidden";
			isvisible = false;
		}
	}
}

function ShowMenu(vMnuCode,width,align) 
{
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=0 cellpadding=5 style='filter:alpha(opacity=70);width:"+width+"px' onmouseout='HideMenu()'><tr height=23><td align="+align+" nowrap  bgcolor=#ffffff valign=top ><b>" + vMnuCode + "</b></td></tr></table>";
	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft;
	t = vSrc.offsetTop+h+6;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menu.innerHTML = vMnuCode;
	menu.style.top = t;
	menu.style.left = l;
	menu.style.visibility = "visible";
	isvisible = true;
	//makeRectangularDropShadow(submenu,MENU_SHADOW_COLOR, 10)
}

function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i-2) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (60 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}


