<!doctype html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]>    <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]>    <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="">
<!--<![endif]-->
<!--#include file="../Inc/QC.Conn.asp" -->
<!--#include file="../Inc/QC.Funtion.asp" -->
<!--#include file="../Inc/QC.PageClass.asp" -->
<HEAD>
<link href="help.css" rel="stylesheet" type="text/css" />
<script language="javascript">
var ModelXmlHttp; //定义一个全局变量
//主函数，用于层和图标的样式及执行AJAX
//id,层id
//rid,数据在表中的id
//pid,图id
function DivDisplay(id,rid,pid)
{
	if (GetModeldID(id).style.display=='')
	{
		GetModeldID(id).style.display='none';
		GetModeldID(pid).src = '../images/closed.gif';
	}
	else
	{
		GetModeldID(id).style.display='';
		GetModeldID(pid).src = '../images/opened.gif';
		if (GetModeldID(id).innerHTML=='')
		{
			ShowChild(id,rid);
		}
	}
}

//创建XMLHttpRequest对象
function CreateXMLHttpRequest()
{
	if (window.ActiveXObject)
	{
		ModelXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		ModelXmlHttp = new XMLHttpRequest();
	}
}

//Ajax处理函数
//id,层id
//rid,数据在表中的id
function ShowChild(id,rid)
{
	CreateXMLHttpRequest();
	if(ModelXmlHttp)
	{
		ModelXmlHttp.open('POST','LeftGet.asp',true);
		ModelXmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
		var SendData = 'id='+rid;
		ModelXmlHttp.send(SendData);
		ModelXmlHttp.onreadystatechange=function()
		{
		   if(ModelXmlHttp.readyState==4)
		   {
			 if(ModelXmlHttp.status==200)
			 {
				GetModeldID(id).innerHTML = ModelXmlHttp.responseText;
			 }
			 else
			 {
				GetModeldID(id).innerHTML='出错：'+ModelXmlHttp.statusText;
			 }
		   }
		   else
		   {
				GetModeldID(id).innerHTML="正在提交数据...";
			}
	  	}
	 }
	 else
	 {
	 	GetModeldID(id).innerHTML='抱歉，您的浏览器不支持XMLHttpRequest，请使用IE6以上版本！';
	 }
}
//id,层id
function GetModeldID(id)
{
	return document.getElementById(id);
} 
</script>
</HEAD>
<BODY>
<div><b><%=Getconfig("QC_SystemName")%> <%=Getconfig("QC_SystemVersion")%> </b></div>
<div class="leftmenu">
<%
set Rs=server.CreateObject("adodb.recordset")
Sql="select * from QC_SystemModel where QC_ModelLevels=0 Order by QC_ModelRoot,QC_ModelSort"
Rs.open Sql,conn,1,1
do while not Rs.eof
if Rs("QC_ModelChild")>"0" then
Response.Write("<img id='p"&Rs("ModelID")&"' src=""../images/closed.gif"" width=""30"" height=""15"" onclick=""DivDisplay('c"&Rs("ModelID")&"','"&Rs("ModelID")&"','p"&Rs("ModelID")&"')"" style=""cursor : hand;"" align=""absmiddle"">")
Response.Write"<a href=""Right.asp?MID="&Rs("ModelID")&""" target=""Right""><b>"&Rs("QC_ModelName")&"</b></a>"
else
Response.Write("<img src=""../images/nofollow2.gif"" width=""30"" height=""15"" align=""absmiddle"" >")
Response.Write"<a href=""Right.asp?MID="&Rs("ModelID")&""" target=""Right"">"&Rs("QC_ModelName")&"</a>"
end if
Response.Write("<br>")
if Rs("QC_ModelChild")>0 then
Response.Write("<div id='c"&Rs("ModelID")&"' style='display:none;'></div>")
end if
Rs.movenext 
loop 
Rs.Close
Set Rs= Nothing
%>
</div>
</BODY>
</HTML>