// JavaScript Document
 var h;
 var w;
 var l;
 var t;
 var topMar = 7;
 var leftMar = -10;
 var space = 2;
 var isvisible;
 var MENU_SHADOW_COLOR='#FFFFFF';
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
}
}

function ShowMenu(vMnuCode,tWidth) {
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellpadding='0' cellspacing='0' style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23 bgcolor=#FFE7C1><td nowrap align=left class=tablebody1>" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}

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) + '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=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}

var px= '&nbsp;<a href="yclist_px_10.html">月度人气榜</a>&nbsp;<br>&nbsp;<a href="yclist_px_5.html">季度人气榜</a>&nbsp;<br>&nbsp;<a href="yclist_px_6.html">投票评论榜</a>&nbsp;<br>&nbsp;<a href="yclist_px_7.html">读编评分榜</a>&nbsp;<br>&nbsp;<a href="yclist_px_1.html">按更新时间排序</a>&nbsp;<br>&nbsp;<a href="yclist_px_2.html">按总人气排序</a>&nbsp;<br>&nbsp;<a href="yclist_px_3.html">按文章字数排序</a>&nbsp;<br>&nbsp;<a href="yclist_px_4.html">按作品进度排序</a>&nbsp;'

var fl= '&nbsp;<a href="yctuijian.asp" target="_blank" ><font color="#FF0000">编辑推荐作品</font></a>&nbsp;<br>&nbsp;<a href="yclist_vip_1.html"><font color="#FF0000">VIP作品</font></a>&nbsp;<br>&nbsp;<a href="yclist_lb_5.html"><font color="#FF0000">花雨学院作品</font></a>&nbsp;<br>&nbsp;<a href="yclist_lb_1.html" title="“花与梦”参赛作品"><font color="#FF0000">花与梦参赛作品</font></a>&nbsp;'

var zzpx= '<br>&nbsp;&nbsp;<a href="ycauthor_px_1.html">按作品排序</a><br>&nbsp;&nbsp;<a href="ycauthor_px_2.html">按字顺排序</a>&nbsp;&nbsp;<br>'
