<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from branchcite where citeparent<>0"
rs.open sql,conn,1,1
response.write rs.recordcount
%>
<script language = "javascript">
var branchcount;
branchcount=0;
cites = new Array();
<%
count = 0
do while not rs.eof
%>
cites[<%=count%>] = new Array("<%= trim(rs("citename"))%>","<%= trim(rs("citeparent"))%>","<%= trim(rs("citeid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
branchcount=<%=count%>;
</script>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from errType order by TypeId"
rs.open sql,conn,1,1
response.write rs.recordcount
%>
<script language = "javascript">
classcount=0;
errclass = new Array();
<%
count = 0
do while not rs.eof
%>
errclass[<%=count%>] = new Array("<%= trim(rs("typecontent"))%>","<%= trim(rs("typeclass"))%>","<%= trim(rs("typeid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
classcount=<%=count%>;
</script>
<script language = "javascript">
function changebranch(branchid)
{
document.formaddlog.cite.length = 0;
var branchid=branchid;
var i;
for (i=0;i < branchcount; i++)
{
if (cites[i][1] == branchid)
{
document.formaddlog.cite.options[document.formaddlog.cite.length] = new Option(cites[i][0], cites[i][2]);
}
}
}
function changeerrtype(Classid)
{
document.formaddlog.ErrType.length = 0;
var Classid=Classid;
var i;
for (i=0;i < classcount; i++)
{
if (errclass[i][1] == Classid)
{
document.formaddlog.ErrType.options[document.formaddlog.ErrType.length] = new Option(errclass[i][0],errclass[i][2]);
}
}
<%
rs.MoveNext
loop
rs.Close:set rs=nothing
cn.Close:set cn=nothing
function checkid(x)
dim Tempnum
Tempnum=0
for i=1 to len(x)
if mid(x,i,1)="_" then
Tempnum=Tempnum+1
end if
next
checkid=Tempnum
end function
%>
<script language=VBS>
sub subtree(Client_para)
if instr(Client_para,"|")=0 then exit sub
Myarray=split(Client_para,"|")
Mytext=eval("R" & Myarray(0) & ".innertext")
select case Mytext
case "+"
document.all.item("R" & Myarray(0)).innertext="-"
for i=1 to ubound(Myarray)
if eval("T" & Myarray(i) & ".summary")-eval("T" & Myarray(0) & ".summary")=1 then
document.all.item("T" & Myarray(i)).style.display="block"
end if
if eval("T" & Myarray(i) & ".summary")-eval("T" & Myarray(0) & ".summary")>1 then
document.all.item("T" & Myarray(i)).style.display="none"
end if
next
case "-"
document.all.item("R" & Myarray(0)).innertext="+"
for i=1 to ubound(Myarray)
if eval("T" & Myarray(i) & ".summary")-eval("T" & Myarray(0) & ".summary")>=1 then
document.all.item("T" & Myarray(i)).style.display="none"
if eval("R" & Myarray(i) & ".innertext")="-" then
document.all.item("R" & Myarray(i)).innertext="+"
end if
end if
next
end select
set Myarray=nothing
end sub
Sub document_onselectstart
document.selection.clear
End Sub
if isobject(eval("T1")) then
subtree document.all("T1").abbr
subtree document.all("T1").abbr
end if
</script>