<!-- #include file="conn.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>left</title>
<style type="text/css">
<!--
body {
	background-color: #ECF4FB;
}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<iframe width="0" height="0" name="blank"></iframe>


<table width="96%" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>
	<% 

set rs=server.createobject("adodb.recordset") 
sql="select * from help_class where parentid=0" 
rs.open sql,conn,1,1 
img_jian="<img src=images/help_open.gif>"
c=3
for i=1 to rs.recordcount
	nbsp=""
	for k=1 to rs("classdepth")*c
		nbsp=nbsp&"&nbsp;"
	next
	span="<span id=span_"&rs("classid")&" class=select2>"&rs("className")&"</span>"
	href="<a href='help_right.asp?classid="&rs("classID")&"' target=rightFrame>"&span&"</a>"
	response.Write("<div>"&nbsp&img_jian&href&"</div>")
	response.Write("<div id=div_"&rs("classid")&">")
	set rs1=server.createobject("adodb.recordset") 
	sql1="select * from help_class where parentid=" &rs("classid")
	rs1.open sql1,conn,1,1 
	for j=1 to rs1.recordcount
		nbsp1=""
		for k1=1 to rs1("classdepth")*c
			nbsp1=nbsp1&"&nbsp;"
		next
		img_jia="<img id=img_"&rs1("classid")&" border=0 style=cursor:hand src=images/help_close.gif>"

		span1="<span  id=span_"&rs1("classid")&">"&rs1("className")&"</span>"
		href1="<a onclick=show_hidden("&rs1("classID")&") href='help_right.asp?classid="&rs1("classID")&"' target=rightFrame>"&img_jia&span1&"</a>"
		response.Write("<div>"&nbsp1&href1&"</div>")
		response.Write("<div style=display:none id=div_"&rs1("classid")&">loading...</div>")
	rs1.movenext
	next
	rs1.close 
	set rs1=nothing
rs.movenext
response.Write("</div>")
next
rs.close 
set rs=nothing
%>
	</td>
  </tr>
</table>

<script>
function show_hidden(id)
{
	if (eval("div_"+id).innerHTML!="")
	{
		(eval("div_"+id).style.display=='none')?(eval("div_"+id).style.display='',eval("img_"+id).src="images/help_open.gif"):(eval("div_"+id).style.display='none',eval("img_"+id).src="images/help_close.gif")
	}
	var str=eval("div_"+id).innerHTML
	str=str.replace(/&nbsp;/g,"")
	if (str=="loading...")//说明没有载入过数据
	{
	//alert()
		blank.location="help_tree_show_hidden.asp?classid="+id//载入数据页
	}
	select2(id)
}
function select2(id)
{
//	eval("div_"+id).style.display=''//显示
//	eval("img_"+id).src="images/help_open.gif"

	var arr=document.getElementsByTagName('span')//取得span
	for(var i=0;i<arr.length;i++)
	{
		if(arr[i].id.indexOf("span_")>-1)
		{
			arr[i].className=''//清空包含span_的span
		}
	}
	eval("span_"+id).className="select2"//设置当前被点的class
}
</script>




	 
</body>
</html>

