<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.Iterator" %>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.database.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.guide.*" %>
<%@ page import="net.sz600.weboffice.*" %>
<%@ include file="/sessionInfo.jsp"%>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<style type=text/css>
	img{vertical-align:middle;} 

    t img { vertical-align:middle;}	
</style>    
</head>
<body>
<table width="98%" align="center">
<tr><td>
<%
    //获取提交的参数
    int iKEY =  SzConvert.toInt(request.getParameter("KEY"));
    //out.println(sKEY);
    //不是从菜单进来，取得当前模块ID,取得关联的ID
    Guide guide = new Guide();
    GuideInfo guideInfo = (GuideInfo)guide.getInfo(iKEY, iMKID_SESSION);
    String sTitle = "";
    String sContent = "";
    String ZNGLID = "";
    String ZNBH = "";
    if (guideInfo != null) {
    	sTitle = guideInfo.getZNBT();
    	sContent = guideInfo.getZNNR();
    	ZNGLID = guideInfo.getZNGLID();
    	ZNBH = guideInfo.getZNBH();
    }
    
%>    
<!-- 标题 -->
<br>
<div id="title" style="height:30;">
	<font size="3"><b><%=sTitle%></b></font>
</div>
<%
	out.println(sContent);
%>
<br>
<%
	
	int id = 0;
	if (!ZNGLID.equals("") && !ZNGLID.equals("0")) {
		String GLID[] = ZNGLID.split(",");
		int iLen = GLID.length;
		for (int i = 0; i<iLen; i++) {			
			guideInfo = (GuideInfo)guide.getInfoByKey(SzConvert.toInt(GLID[i]));
			id = guideInfo.getZNID();
%>
<div id="title">
<img src="../../images/share/dirClose2.gif" border="0" style="cursor:hand;" id="imgOpen<%=id%>"  OnClick="javascript:ClickDepart('<%=id%>');"><img src="../../images/share/dirOpen2.gif" border="0" style="cursor:hand;display:none;" id="imgClose<%=id%>" OnClick="javascript:ClickDepart('<%=id %>');">
<font size="2"><b><a href="guide_desktop.jsp?KEY=<%=guideInfo.getZNID()%>"><%=guideInfo.getZNBT()%></a></b></font>
</div>
<div id="<%=id%>" style="display:none;">
<%=guideInfo.getZNNR()%>
</div>

<%
			
		}
	} else {
		//列出下级
		String sCond = "ZNBH LIKE '" + ZNBH +  "%' AND " + SzSqlConvert.getFuncLen() + "(ZNBH)=" + (ZNBH.length() + SzLevelNumber.I_NUMBER_LEN);

		Iterator iter = guide.getArrayList(sCond).iterator();
		while (iter != null && iter.hasNext()) {
			guideInfo = (GuideInfo)iter.next();
			id = guideInfo.getZNID();
			%>
			<div id="title">
			<img src="../../images/share/dirClose2.gif" border="0" style="cursor:hand;" id="imgOpen<%=id%>"  OnClick="javascript:ClickDepart('<%=id%>');"><img src="../../images/share/dirOpen2.gif" border="0" style="cursor:hand;display:none;" id="imgClose<%=id%>" OnClick="javascript:ClickDepart('<%=id %>');">
			<font size="2"><b><a href="guide_desktop.jsp?KEY=<%=guideInfo.getZNID()%>"><%=guideInfo.getZNBT()%></a></b></font>
			</div>
			<div id="<%=id%>" style="display:none;">
			<%=guideInfo.getZNNR()%>
			</div>
			<%			
		}
		
	}
%>
<!-- 是否有关联 -->
</td></tr>
</table>
<script language="javascript">
	function ClickDepart(BMBH) {
		var oDiv = document.getElementById(BMBH);
		if (oDiv.style.display == "none") {
			oDiv.style.display = "";
			document.getElementById("imgOpen" + BMBH).style.display = "none";
			document.getElementById("imgClose" + BMBH).style.display = "";
		} else {
			oDiv.style.display = "none";
			document.getElementById("imgOpen" + BMBH).style.display = "";
			document.getElementById("imgClose" + BMBH).style.display = "none";
		}
	}
</script>
</body>