<%
set rss1=server.createobject("adodb.recordset")
sqls1 = "select * from SmallClass order by sj desc"
rss1.open sqls1,conn,1,1
%>
<script language = "JavaScript">
var onecount1;
subcat1 = new Array();
        <%
        count1 = 0
        do while not rss1.eof 
        %>
subcat1[<%=count1%>] = new Array("<%= trim(rss1("id"))%>","<%=trim(rss1("dl"))%>","<%= trim(rss1("smallclassname"))%>");
        <%
        count1 = count1 + 1
        rss1.movenext
        loop
        rss1.close
        %>
onecount1=<%=count1%>;

function changelocation1(locationid)
    {
    document.SearchInfo.SmallClassName.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < onecount1; i++)
        {
            if (subcat1[i][1] == locationid)
            { 
                document.SearchInfo.SmallClassName.options[document.SearchInfo.SmallClassName.length] = new Option(subcat1[i][2], subcat1[i][0]);
            }        
        }
    }    

</script><script language="javascript">
//检验表单的合法性
function SearchInfoForm() {
	if (document.SearchInfo.Keyword.value == "") {
		alert("\关健字不能为空！");
		document.SearchInfo.Keyword.focus();
	}
	else {
        return true;
    }
    return false;
}
function resetSearchImg(){
	var fact = document.all.SearchInfo
	fact.Keyword.style.backgroundImage="";
}
</script>
<table width="95%" border="0" align="center" cellPadding="0" cellSpacing="0" borderColor="#111111">
  <form name="SearchInfo" action="<% =gqwebdir%>list.asp" method="post">
  <tbody>
  <tr>
    <td class="STYLE2">信息搜索：</td>
    <td>
	<input  name="Keyword" type="text" class="boxttt" style="font-size: 12px; font-family; background-color: #ffffff; background-image: url('<% = strImageUrl%>ss.gif'); background-repeat: no-repeat; background-position: center 50%" onfocus="this.select()" onclick="resetSearchImg();" onmouseover="this.focus()" size="20"></td>
    <td><select name="InfoClass" size="1" class="boxtt0">
<%call  gqlx(1,request("InfoClass"))%>
        </select></td>
    <td><%
		set rsb=server.createobject("adodb.recordset")
        sqlb = "select * from BigClass order by sj desc"
        rsb.open sqlb,conn,1,1
		if rsb.eof and rsb.bof then
			response.write "请先添加栏目。"
		else
		%>
                    	<select name="InfoAdd" size="1" class="boxtt0">
                          <option value="" selected>地区</option>
<%
	  set mxdq=server.CreateObject("adodb.recordset")
	  	sqlmxdq = "Select * From mxdq order by sj desc"
 mxdq.Open sqlmxdq,Conn,1,1
	  if not( mxdq.bof and  mxdq.eof) then
		do while not  mxdq.eof
	%>
                          <option value="<%=mxdq("name")%>"><%=mxdq("name")%></option>
<%
 mxdq.movenext
	loop
	end if
mxdq.close
set mxdq=nothing
%>
</select></td>
    <td><select name="BigClassName" size="1" class="boxtt0" onchange="changelocation1(document.SearchInfo.BigClassName.options[document.SearchInfo.BigClassName.selectedIndex].value)">
      <option selected value="">所有类别</option>
      <%
		    do while not rsb.eof
			%>
      <option value="<%=trim(rsb("id"))%>"><%=trim(rsb("BigClassName"))%></option>
      <%
		        rsb.movenext
    	    loop
		end if
        rsb.close
        set rsb=nothing
			%>
    </select></td>
    <td><select name="SmallClassName" class="boxtt0">
      <option value="" selected>不指定小类</option>
    </select></td>
    <td><select name=sj class=boxtt0 size="1">
      <option selected value="">时间不限</option>
      <option value=7>七天内</option>
      <option value=15>半月内</option>
      <option value=30>一月内</option>
    </select></td>
    <td vAlign="top" align="center"><input type="image" height="22" width="55" src="<% =gqwebdir%>imger/mar_icon_search1.gif"  name="Submit1" border="0"></td>
  </tr>
  </tbody>
  </form>
</table>
