<script language="javascript">
var areaData = [<%
set rsClass1=server.CreateObject("adodb.recordset")
sqlClass1="select * from com_china where LevelID=0 order by id asc"
rsClass1.open sqlClass1,conn,1,1
c1=1
do while not rsClass1.eof
%>{"id":"<%=rsClass1("id")%>","name":"<%=rsClass1("name")%>","childs":[<%
set rsClass2=server.CreateObject("adodb.recordset")
sqlClass2="select * from com_china where LevelID=1 and parentid="&rsClass1("id")&" order by id asc"
rsClass2.open sqlClass2,conn,1,1
c2=1
do while not rsClass2.eof
%>{"id":"<%=rsClass2("id")%>","name":"<%=rsClass2("name")%>","childs":[<%
set rsClass3=server.CreateObject("adodb.recordset")
sqlClass3="select * from com_china where LevelID=2 and parentid="&rsClass2("id")&" order by id asc"
rsClass3.open sqlClass3,conn,1,1
c3=1
do while not rsClass3.eof
%>{"id":"<%=rsClass3("id")%>","name":"<%=rsClass3("name")%>"}<%
if c3<>rsClass3.recordcount then response.Write(",")
c3=c3+1
rsClass3.movenext
loop
rsClass3.close
%>]}<%
if c2<>rsClass2.recordcount then response.Write(",")
c2=c2+1
rsClass2.movenext
loop
rsClass2.close
%>]}<%
if c1<>rsClass1.recordcount then response.Write(",")
c1=c1+1
rsClass1.movenext
loop
rsClass1.close
%>];
</script>