/*
 Layer.js

更新记录:
 V1.1
	改变菜单消失的样式，现在为从下往上渐隐
 V1.2 
	支持多级菜单功能
	菜单条目可创建纯文字条目
 V1.3
	兼容Netscape 7
	支持多组菜单样式设置
	增加了2种windows样式菜单
	可以设置渐变效果

 函数列表：
	funcAddMenu(strMenuID,posLeft,posTop,strParentID): 开始创建新菜单
	funcAddMenuEnd(): 结束创建菜单状态
	funcAddMenuItem(url,title,strSubmenuID): 添加菜单条目
	funcAddWinMenu(strMenuID,posLeft,posTop,strParentID): 开始创建新Windows样式菜单
	funcAddWinMenuEnd(): 结束创建Windows样式菜单状态
	funcAddWinMenuItem(url,title,strSubmenuID,titleICO): 添加带图标菜单条目
	funcAddWinMenuItem1(url,title,strSubmenuID): 添加无图标的菜单条目
	funcAddWinMenuItemHR(HRColor): 添加分隔线
	funcInitMenu(): 初始化菜单
	funcMenuTimer(): 菜单定时器(内部函数)
	funcMenuTimerNN(): 菜单定时器(for Netscape)
	funcReposMenu(): 重定位菜单
	funcShowMenu(strMenuID): 显示菜单
	funcCloseMenu(strMenuID): 关闭菜单
*/

//========================================
// 菜单系统变量
var arrayMenuGroup=new Array(); // 菜单组
var arrayMenuID=new Array(); // 菜单ID
var arrayMenuParentID=new Array(); // 父级菜单ID
var intMenuCreateFlag=false; //创建新菜单状态标记
var strMenuHtmlTemp; // 显示菜单的HTML
var intMenuStyleID=0; // 临时变量，菜单样式组号
var objMenuTimer; // 菜单时钟

//========================================
// 检测浏览器，并初始化某些于浏览器有关参数
var NN;
var IE;
with(navigator){
	if (appName=="Netscape")
		NN=true;
	else if(userAgent.indexOf("MSIE 5"))
		IE=5;
	else if(userAgent.indexOf("MSIE 6"))
		IE=6;
}
//==================================
// 菜单设置
var intMenuRefreshTime; //菜单刷新时间
var intMenuShowStep; // 菜单显示周期
var intMenuCloseStep; // 菜单关闭周期
var intMenuMidPix; //屏幕横中点坐标(800 X 600默认)
var intMenuFadeMode; //菜单渐变模式(0:简单,1:复杂)
var strMenuBorderColor=new Array(); // 边框颜色
var strMenuBgColor=new Array(); // 背景颜色
var strMenuBgColorOver=new Array(); // mouseover背景颜色
var strMenuItemLinkCSS=new Array("public/66.css"); //菜单条目的连接使用的css名称
var strMenuItemTextCSS=new Array("public/66.css"); //菜单条目的非连接文字使用的css名称
var intMenuItemDefaultHeight=new Array(); // 默认菜单单元格高度
var intMenuBorder=new Array(); // 菜单边框宽度
var intMenuPadding=new Array(); // 菜单边距

//===================================


/*********************************************************************************************
	普通菜单创建函数:
	funcAddMenu(strMenuID,posLeft,posTop,strParentID): 开始创建新菜单
	funcAddMenuEnd(): 结束创建菜单状态
	funcAddMenuItem(url,title,strSubmenuID): 添加菜单条目
**********************************************************************************************/
/**
 * Short description. 
 *	开始创建菜单。
 * Detail description
 *  使用本函数后，使用funcAddMenuItem函数添加菜单条目，然后使用funcAddMenuEnd()函数结束添加菜单状态。
 * @param      
		strMenuID: 本菜单的ID
	    posLeft:	菜单的横坐标，坐标是基于800 X 600分辨率下的坐标，在其他分辨率的情况下系统自动转换为相应坐标。
	    posTop: 菜单纵坐标
	    strParentID: 菜单的父级菜单ID,如果菜单没有父级菜单，则填写false
		styleID: 菜单样式组号
 * @global
		arrayMenuID,arrayMenuParentID,strMenuHtmlTemp,intMenuCreateFlag,strMenuBorderColor
		intMenuPadding,intMenuBorder
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:10
*/
function funcAddMenu(strMenuID,posLeft,posTop,strParentID,styleID){
	if (intMenuCreateFlag)
	{
		alert("脚本错误，使用funcAddMent函数后请先使用funcEndAddMenu函数结束");
		return;
	}
	if(!styleID||styleID>strMenuBgColor.length||styleID<0)
		intMenuStyleID=0;
	else
		intMenuStyleID=styleID;
	arrayMenuID[arrayMenuID.length]=strMenuID;
	arrayMenuParentID[arrayMenuParentID.length]=strParentID;
	strMenuHtmlTemp="<div id=\""+strMenuID+"\" style=\"position:absolute; width:1px; height:1px; z-index:"+(arrayMenuGroup.length+1)+"; left: "+posLeft+"px; top: "+posTop+"px; overflow: hidden; visibility: hidden;\" onMouseOver=\"funcShowMenu('"+strMenuID+"')\" onMouseOut=\"funcCloseMenu('"+strMenuID+"')\">";
	strMenuHtmlTemp=strMenuHtmlTemp+"<table border=\"0\" id=\"tab"+strMenuID+"\" bgcolor=\""+strMenuBorderColor[intMenuStyleID]+"\" cellspacing=\"0\" cellpadding=\"0\"><tr><td>";
	strMenuHtmlTemp=strMenuHtmlTemp+"<table border=\"0\" cellspacing=\""+intMenuBorder[intMenuStyleID]+"\" cellpadding=\""+intMenuPadding[intMenuStyleID]+"\">";
	intMenuCreateFlag=1;
}

/**
 * Short description. 
 *	结束创建菜单状态
 * @param      none
 * @global
		arrayMenuGroup,strMenuHtmlTemp,intMenuCreateFlag
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:10
*/
function funcAddMenuEnd(){
	if (intMenuCreateFlag!=1)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	strMenuHtmlTemp=strMenuHtmlTemp+"</table></td></tr></table></div>";
	arrayMenuGroup[arrayMenuGroup.length]=strMenuHtmlTemp;
	intMenuCreateFlag=false;
}

/**
 * Short description. 
 *	创建菜单条目
 * @param      
		url: 菜单条目指向的连接.若菜单不指向任何连接，则填写false
		title: 菜单条目的题目.
		strSubmenuID: 本条目指向的子菜单ID，若没有子菜单，则填写false
 * @global
		strMenuHtmlTemp,strMenuBgColor,strMenuBgColorOver,strMenuBgColor,intMenuItemDefaultHeight
		strMenuItemTextCSS,strMenuItemLinkCSS
 * @since      1.2
 * @access     public
 * @return     void
 * @update     2002-12-26 20:52
*/
function funcAddMenuItem(url,title,strSubmenuID){
	if (intMenuCreateFlag!=1)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	if(strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr><td bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" nowrap onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\"><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td></tr>";
	}
	else if(strSubmenuID && !url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr><td bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" nowrap onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td></tr>";
	}
	else if(!strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr><td bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" nowrap onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\"><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td></tr>";
	}
	else
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr><td bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" nowrap onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td></tr>";
}

/*********************************************************************************************
	Windows样式菜单创建函数:
	funcAddWinMenu(strMenuID,posLeft,posTop,strParentID): 开始创建新菜单
	funcAddWinMenuEnd(): 结束创建菜单状态
	funcAddWinMenuItem(url,title,strSubmenuID): 添加菜单条目
**********************************************************************************************/
/**
 * Short description. 
 *	开始创建菜单。
 * Detail description
 * @param      
		strMenuID: 本菜单的ID
	    posLeft:	菜单的横坐标，坐标是基于800 X 600分辨率下的坐标，在其他分辨率的情况下系统自动转换为相应坐标。
	    posTop: 菜单纵坐标
	    strParentID: 菜单的父级菜单ID,如果菜单没有父级菜单，则填写false
 * @global
		arrayMenuID,arrayMenuParentID,strMenuHtmlTemp,intMenuCreateFlag,strMenuBorderColor
		intMenuPadding,intMenuBorder
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:09
*/
function funcAddWinMenu(strMenuID,posLeft,posTop,strParentID,styleID){
	if (intMenuCreateFlag)
	{
		alert("脚本错误，正在创建菜单状态，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	if(!styleID||styleID>strMenuBgColor.length||styleID<0)
		intMenuStyleID=0;
	else
		intMenuStyleID=styleID;
	arrayMenuID[arrayMenuID.length]=strMenuID;
	arrayMenuParentID[arrayMenuParentID.length]=strParentID;
	strMenuHtmlTemp="<div id=\""+strMenuID+"\" style=\"position:absolute; width:1px; height:1px; z-index:"+(arrayMenuGroup.length+1)+"; left: "+posLeft+"px; top: "+posTop+"px; overflow: hidden; visibility: hidden;\" onMouseOver=\"funcShowMenu('"+strMenuID+"')\" onMouseOut=\"funcCloseMenu('"+strMenuID+"')\">";
	strMenuHtmlTemp=strMenuHtmlTemp+"<table border=\"0\" id=\"tab"+strMenuID+"\" bgcolor=\""+strMenuBorderColor[intMenuStyleID]+"\" cellspacing=\"0\" cellpadding=\""+intMenuBorder[intMenuStyleID]+"\"><tr><td>";
	strMenuHtmlTemp=strMenuHtmlTemp+"<table border=\"0\" cellspacing=\"0\" cellpadding=\""+intMenuPadding[intMenuStyleID]+"\" bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\">";
	intMenuCreateFlag=2;
}

/**
 * Short description. 
 *	结束创建菜单状态
 * @param      none
 * @global
		arrayMenuGroup,strMenuHtmlTemp,intMenuCreateFlag
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:15
*/
function funcAddWinMenuEnd(){
	if (intMenuCreateFlag!=2)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	strMenuHtmlTemp=strMenuHtmlTemp+"</table></td></tr></table></div>";
	arrayMenuGroup[arrayMenuGroup.length]=strMenuHtmlTemp;
	intMenuCreateFlag=false;
}

/**
 * Short description. 
 *	创建菜单条目
 * @param      
		url: 菜单条目指向的连接.若菜单不指向任何连接，则填写false
		title: 菜单条目的题目.
		titleICO: 菜单条码的图标路径,如没有，则填写false. ico大小建议为16X16
		strSubmenuID: 本条目指向的子菜单ID，若没有子菜单，则填写false
 * @global
		strMenuHtmlTemp,strMenuBgColor,strMenuBgColorOver,strMenuBgColor,intMenuItemDefaultHeight
		strMenuItemTextCSS,strMenuItemLinkCSS
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:15
*/
function funcAddWinMenuItem(url,title,strSubmenuID,titleICO){
	if (intMenuCreateFlag!=2)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	if(titleICO){
		ico=titleICO;
	}
	else{
		ico=strMenuDefaultICO;
	}
	if(strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td><img src=\""+ico+"\"></td><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\"><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td><td align=right width=16><img src=\""+strSubMenuICO+"\"></td></tr>";
	}
	else if(strSubmenuID && !url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td><img src=\""+ico+"\"></td><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td><td align=right width=16><img src=\""+strSubMenuICO+"\"></td></tr>";
	}
	else if(!strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td><img src=\""+ico+"\"></td><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" colspan=2><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td></tr>";
	}
	else
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td><img src=\""+ico+"\"></td><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" colspan=2 class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td></tr>";
}

/**
 * Short description. 
 *	创建无图标菜单条目
 * @param      
		url: 菜单条目指向的连接.若菜单不指向任何连接，则填写false
		title: 菜单条目的题目.
		strSubmenuID: 本条目指向的子菜单ID，若没有子菜单，则填写false
 * @global
		strMenuHtmlTemp,strMenuBgColor,strMenuBgColorOver,strMenuBgColor,intMenuItemDefaultHeight
		strMenuItemTextCSS,strMenuItemLinkCSS
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:15
*/
function funcAddWinMenuItem1(url,title,strSubmenuID){
	if (intMenuCreateFlag!=2)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	if(strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" colspan=2><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\"><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td><td align=right width=16><img src=\""+strSubMenuICO+"\"></td></tr>";
	}
	else if(strSubmenuID && !url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"funcShowMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"funcCloseMenu('"+strSubmenuID+"');this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\" colspan=2><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td><td align=right width=16><img src=\""+strSubMenuICO+"\"></td></tr>";
	}
	else if(!strSubmenuID && url){
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" colspan=3><a href=\""+url+"\" class=\""+strMenuItemLinkCSS[intMenuStyleID]+"\">"+title+"</a></td></tr>";
	}
	else
		strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\" onMouseOver=\"this.bgColor='"+strMenuBgColorOver[intMenuStyleID]+"'\" onMouseOut=\"this.bgColor='"+strMenuBgColor[intMenuStyleID]+"'\"><td nowrap height=\""+intMenuItemDefaultHeight[intMenuStyleID]+"\" colspan=3 class=\""+strMenuItemTextCSS[intMenuStyleID]+"\">"+title+"</td></tr>";
}

/**
 * Short description. 
 *	创建分隔线
 * @param   
		HRColor: 分隔线颜色
 * @global
		strMenuBgColor,intMenuStyleID
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 23:15
*/
function funcAddWinMenuItemHR(HRColor){
	if (intMenuCreateFlag!=2)
	{
		alert("脚本错误，正在创建其他样式的菜单，请先用相应关闭函数结束菜单创建状态");
		return;
	}
	if(HRColor)
		color=HRColor;
	else
		color="#999999";
	strMenuHtmlTemp=strMenuHtmlTemp+"<tr bgcolor=\""+strMenuBgColor[intMenuStyleID]+"\"><td nowrap colspan=3 height=5 align=center><table border=0 cellpadding=0 cellspacing=0 width=98%><tr><td bgcolor=\""+color+"\"></td></tr></table></td></tr>";
}

/**
 * Short description. 
 *	初始化菜单
 * Detail description
 *  设置好菜单后，必须使用本函数初始化菜单。
 * @param      none
 * @global
		objMenuTimer,intMenuRefreshTime
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 18:18
*/
function funcInitMenu(){
	if (intMenuCreateFlag)
	{
		alert("脚本错误，使用funcAddMent函数后请先使用funcEndAddMenu函数结束");
		return;
	}
	var objMenuTable;
	var objMenu;
	for(i=0;i<arrayMenuGroup.length;i++){
		document.write(arrayMenuGroup[i]);
		objMenu=document.getElementById(arrayMenuID[i]);
		objMenuTable=document.getElementById("tab"+arrayMenuID[i]);
		objMenu.style.width=objMenuTable.scrollWidth+10;
		objMenu.style.height=objMenuTable.scrollHeight;
		objMenu.MenuState="closed";
		objMenu.MenuAlpha=0;
		objMenu.ParentMenuID=arrayMenuParentID[i];
	}
	funcReposMenu();
	if(NN){
		objMenuTimer=setTimeout("funcMenuTimerNN()",intMenuRefreshTime);
	}
	else if(IE)
		objMenuTimer=setTimeout("funcMenuTimer()",intMenuRefreshTime);
}

/**
 * Short description. 
 *	菜单定时刷新
 * Detail description
 *  本函数在使用菜单初始化函数后开始自动执行，用以不断更新菜单情况。
 *	一般在程序中不需要人为执行本函数！
 * @param      none
 * @global
		objMenuTimer,intMenuRefreshTime,intMenuShowStep,intMenuCloseStep
 * @since      1.3
 * @access     private
 * @return     void
 * @update     2003-1-18 18:18
*/
function funcMenuTimer(){
	if (intMenuCreateFlag)
	{
		return;
	}
	var i;
	for (i=0;i<arrayMenuID.length;i++){
		var objMenu;
		objMenu=document.getElementById(arrayMenuID[i]);
		if(objMenu.MenuState=="show"){
			objMenu.style.visibility="visible";
			objMenu.MenuAlpha=objMenu.MenuAlpha+100/intMenuShowStep;
			if(objMenu.MenuAlpha>=100){
				objMenu.MenuAlpha=100;
				objMenu.MenuState="active";
			}
			objMenu.style.filter="Alpha(Opacity="+objMenu.MenuAlpha+")";
		}
		else if(objMenu.MenuState=="hide"){
			objMenu.MenuAlpha=objMenu.MenuAlpha-100/intMenuCloseStep;
			if(objMenu.MenuAlpha<=10){
				objMenu.MenuAlpha=0;
				objMenu.MenuState="closed";
			}
			if(intMenuFadeMode==0){
				objMenu.style.filter="Alpha(Opacity="+objMenu.MenuAlpha+")"; // 简单效果
			}
			else if(intMenuFadeMode==1)
				objMenu.style.filter="Alpha(Opacity="+objMenu.MenuAlpha+",style=1,StartX=0,FinishX=0,StartY=0,FinishY="+parseInt(objMenu.style.height)*(objMenu.MenuAlpha/50)+")";
			if(objMenu.MenuAlpha==0)
				objMenu.style.visibility="hidden";
		}
		else if(objMenu.MenuState=="active"){
		}
		else if(objMenu.MenuState=="closed"){
		}
	}
	objMenuTimer=setTimeout("funcMenuTimer()",intMenuRefreshTime);
}

/**
 * Short description. 
 *	菜单定时刷新 for Netscape(无渐变效果，速度较快)
 * Detail description
 *  本函数在使用菜单初始化函数后开始自动执行，用以不断更新菜单情况。
 *	一般在程序中不需要人为执行本函数！
 * @param      none
 * @global
		objMenuTimer,intMenuRefreshTime,intMenuShowStep,intMenuCloseStep
 * @since      1.3
 * @access     private
 * @return     void
 * @update     2003-1-18 18:18
*/
function funcMenuTimerNN(){
	if (intMenuCreateFlag)
	{
		return;
	}
	var i;
	for (i=0;i<arrayMenuID.length;i++){
		var objMenu;
		objMenu=document.getElementById(arrayMenuID[i]);
		if(objMenu.MenuState=="show"){
			objMenu.style.visibility="visible";
			objMenu.MenuState="active";			
		}
		else if(objMenu.MenuState=="hide"){
			objMenu.MenuState="closed";
			objMenu.style.visibility="hidden";
		}
		else if(objMenu.MenuState=="active"){
		}
		else if(objMenu.MenuState=="closed"){
		}
	}
	objMenuTimer=setTimeout("funcMenuTimerNN()",intMenuRefreshTime);
}

/**
 * Short description. 
 *	把菜单重定位
 * Detail description
 *  在浏览器窗口大小改变或者屏幕分辨率改变的时候，系统自动执行本函数对菜单进行重定位，以保证菜单的位置正确。
 * @param      none
 * @global
		intMenuMidPix
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 18:18
*/
function funcReposMenu(){
	if (intMenuCreateFlag)
	{
		return;
	}
	var objMenu;
	var intNewMidPix=document.body.scrollWidth/2;
	for(i=0;i<arrayMenuGroup.length;i++){
		objMenu=document.getElementById(arrayMenuID[i]);
		objMenu.style.left=intNewMidPix-intMenuMidPix+parseInt(objMenu.style.left);
	}
	intMenuMidPix=intNewMidPix;
}

/**
 * Short description. 
 *	显示菜单以及其所有父级菜单
 * Detail description
 *  对于顶级菜单，需要手动在网页相应位置加入本函数以及funcCloseMenu函数以显示或关闭顶级菜单。
 *  如： <img border="0" src="images/index_06.gif" width="79" height="29" onMouseOver="funcShowMenu('menu1')" onMouseOut="funcCloseMenu('menu1')">
 * @param      none
 * @global	   none
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 18:17
*/
function funcShowMenu(strMenuID){
	if (intMenuCreateFlag)
	{
		return;
	}
	var objMenu;
	objMenu=document.getElementById(strMenuID);
	objMenu.MenuState="show";
	while (objMenu.ParentMenuID){
		objMenu=document.getElementById(objMenu.ParentMenuID);
		objMenu.MenuState="show";
	}
}

/**
 * Short description. 
 *	关闭菜单以及其所有父级菜单
 * Detail description
 *  对于顶级菜单，需要手动在网页相应位置加入本函数以及funcOpenMenu函数以显示或关闭顶级菜单。
 *  如： <img border="0" src="images/index_06.gif" width="79" height="29" onMouseOver="funcShowMenu('menu1')" onMouseOut="funcCloseMenu('menu1')">
 * @param      none
 * @global	   none
 * @since      1.3
 * @access     public
 * @return     void
 * @update     2003-1-18 18:17
*/
function funcCloseMenu(strMenuID){
	if (intMenuCreateFlag)
	{
		return;
	}
	var objMenu;
	objMenu=document.getElementById(strMenuID);
	objMenu.MenuState="hide";
	while (objMenu.ParentMenuID){
		objMenu=document.getElementById(objMenu.ParentMenuID);
		objMenu.MenuState="hide";
	}
}

// 定义onresize事件，在窗口大小改变的时候重新定位菜单。
window.onresize=new Function("funcReposMenu();");
window.onload=new Function("funcReposMenu();");

/*************************************************************************
*                   菜单程序完，使用本函数请保留版权以及作者信息	 			 *
*					如对本程序作出修改，请给我发一份 ：） 谢谢				 *
*					pcdreama@omnitech.com.cn							 *
*************************************************************************/

/*========================================================================
					 以下部分程序用于设置菜单样式
========================================================================*/

//菜单行为设置
intMenuRefreshTime=50; //菜单刷新时间
intMenuShowStep=2; // 菜单显示周期
intMenuCloseStep=5; // 菜单关闭周期
intMenuMidPix=390; //屏幕横中点坐标(800 X 600默认)
intMenuFadeMode=1; //菜单渐变模式(0:简单,1:复杂)

// 菜单样式设置，第一组菜单样式
strMenuBorderColor[0]="#FFFFFF"; // 边框颜色
strMenuBgColor[0]="#0489D6"; // 背景颜色
strMenuBgColorOver[0]="#1B4464"; // mouseover背景颜色
strMenuItemLinkCSS[0]="menu"; //菜单条目的连接使用的css名称
strMenuItemTextCSS[0]="menu"; //菜单条目的非连接文字使用的css名称
intMenuItemDefaultHeight[0]=20; // 默认菜单单元格高度
intMenuBorder[0]=1; // 菜单边框宽度
intMenuPadding[0]=5; // 菜单边距

// 增加多一组菜单样式设置
// 第二组菜单样式，第三组继续copy&paste
strMenuBorderColor[1]="#FFFFFF";
strMenuBgColor[1]="#FFFFFF";
strMenuBgColorOver[1]="#FFFFFF";
strMenuItemLinkCSS[1]="menu1";
strMenuItemTextCSS[1]="menu1";
intMenuItemDefaultHeight[1]=20;
intMenuBorder[1]=1;
intMenuPadding[1]=5;

// Windows样式菜单设置
var strMenuDefaultICO="/icos/defaultico.gif"; //Windows样式菜单默认图标
var strSubMenuICO="/icos/submenu.gif"; //子菜单箭头图标

/*========================================================================
					 以下部分程序用于创建菜单以及开始生成菜单
========================================================================*/

// 创建及设置菜单
funcAddMenu("menu1",293,256,false); 
funcAddMenuItem("dszzc.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;总裁致辞&nbsp;</font></span>",false);
funcAddMenuItem("jieshao.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;企业介绍&nbsp;</font></span>",false);
funcAddMenuItem("zzjg.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;组织机构&nbsp;</font></span>",false);
funcAddMenuItem("changqu.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;厂区介绍&nbsp;</font></span>",false);
funcAddMenuItem("licheng.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;发展历程&nbsp;</font></span>",false);
funcAddMenuItem("rongyu.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;企业荣誉&nbsp;</font></span>",false);
funcAddMenuItem("zlgl.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;质量管理&nbsp;</font></span>",false);
funcAddMenuEnd();
funcAddMenu("menu2",455,256,false); 
funcAddMenuItem("chanpin.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;产品展示&nbsp;</font></span>",false);
funcAddMenuItem("#","<span class=word4 align=center><font color=#FFFFFF>&nbsp;产品检索&nbsp;</font></span>",false);
//funcAddMenuItem("dingdan.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;在线定单&nbsp;</font></span>",false);
funcAddMenuEnd();
funcAddMenu("menu3",373,256,false); 
funcAddMenuItem("news.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;企业新闻&nbsp;</font></span>",false);
//funcAddMenuItem("news.asp?admin_type=2","<span class=word4 align=center><font color=#FFFFFF>&nbsp;行业新闻&nbsp;</font></span>",false);
//funcAddMenuItem("news.asp?admin_type=3","<span class=word4 align=center><font color=#FFFFFF>&nbsp;展会信息&nbsp;</font></span>",false);
funcAddMenuEnd();
funcAddMenu("menu4",492,256,false); 
funcAddMenuItem("fuwuwl.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;服务网络&nbsp;</font></span>",false);
funcAddMenuItem("#","<span class=word4 align=center><font color=#FFFFFF>&nbsp;售后服务&nbsp;</font></span>",false);
funcAddMenuEnd();
funcAddMenu("menu5",410,256,false); 
funcAddMenuItem("job_yr.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;用人之道&nbsp;</font></span>",false);
funcAddMenuItem("job.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;招聘信息&nbsp;</font></span>",false);
funcAddMenuEnd();
funcAddMenu("menu6",720,161,false); 
funcAddMenuItem("html/invite.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;职位需求&nbsp;</font></span>",false);
funcAddMenuItem("html/linkman.asp","<span class=word4 align=center><font color=#FFFFFF>&nbsp;联系方式&nbsp;</font></span>",false);
funcAddMenuEnd();


// 初始化菜单，生成菜单的Layer
funcInitMenu();