<!--#include file="inc/userconn.inc" -->
<%on error resume next%>
<%
sql = "select * from trade order by id "
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("trade"))%>","<%= trim(rs("bigtrade"))%>","<%= trim(rs("trade"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=nothing
%>
onecount=<%=count%>;
function changelocation(bigtrade)
{
document.search.trade.length = 0;
var bigtrade=bigtrade;
var i;
document.search.trade.options[0] = new Option('请选择二级分类','');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == bigtrade)
{
document.search.trade.options[document.search.trade.length] = new Option(subcat[i][0], subcat[i][2]);
}
}