//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -5;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
 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' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1 valign=top >" + 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 multimedia0 = '<a href=\"#\">◇ 主日崇拜</a><br><a href=\"#\">◇ 代禱事項</a><br><a href=\"#\">◇ 教會新聞</a><br><a href=\"#\">◇ 主日學課程</a><br><a href=\"#\" target=blank>◇ 崇拜簡報</a><br><a href=\"#\" target=blank>◇ 聚會信息</a>'

//聖靈成長
var multimedia1 = '<a href=\"#\">◇ 專欄文章</a><br><a href=\"#\">◇ 見證分享</a><br><a href=\"#\">◇ 每週讀經</a><br><a href=\"#\">◇ 靈修書籍</a>'

//基要真理
var multimedia2 = '<a href=\"#\">◇ 教會宗旨</a><br><a href=\"#\">◇ 基本教義</a><br><a href=\"#\">◇ 咨詢解答</a><br><a href=\"#\">◇ 研經工具</a><br><a href=\"#\">◇ 資料推薦</a>'

//教會社區
var multimedia3 = '<a href=\"http://www.montrealalliance.org/blogutf/index.php\">◇ 靈修博客</a><br><a href=\"http://www.montrealalliance.org/blogutf/modules.php?name=Forums\">◇ 團契活動</a><br><a href=\"#\">◇ 家庭聚會</a><br><a href=\"#\">◇ </a><br><a href=\"#\">◇ 聚會圖片集</a>'

//教會介紹
var multimedia4 = '<a href=\"http://www.montrealalliance.org/blogutf/modules.php?name=Content&pa=showpage&pid=1\">◇ 教會發展歷史</a><br><a href=\"#\">◇ 教牧同工</a><br><a href=\"http://www.montrealalliance.org/blogutf/modules.php?name=Content&pa=showpage&pid=2\">◇ 年度事歷</a><br><a href=\"#\">◇ 聯係方法</a>'

//網上崇拜
var multimedia5 = '<a href=\"#\">◇ 見證分享</a><br><a href=\"#\">◇ 專題文章</a><br><a href=\"#\">◇ 主日崇拜</a><br><a href=\"#\">◇ 研經工具</a><br><a href=\"#\" target=blank>◇ 音像資料</a>'

//社會活動
var multimedia6 = '<a href=\"#\">◇ 海外宣教</a><br><a href=\"#\">◇ 宣教活動</a><br><a href=\"#\">◇ 大型聚會</a><br><a href=\"#\">◇ 聯合宣教</a>'

