<SCRIPT LANGUAGE="JavaScript">
<!--
function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}
function checkk()
{
   if(checkspace(form2.searchkey.value))  {
	document.form2.searchkey.focus();
	alert("请输入查讯关键字！");
	return false;
  }

}



//-->
</script>

<table width="17%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#FFFFFF">
                      <form name="form2" method="post" action="research.asp">
                        <tr> 
                          <td align="right"> 
                            <div align="left">
                              <input name="searchkey" type="text" class=wenbenkuang id="searchkey" value="关键字">                          
                              </div></td>
                        </tr>
                        <tr> 
                          <td align="right"> 
                            <div align="left">
                              <%set rs=server.CreateObject("adodb.recordset")
		  rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
		  %>
                              <select class="wenbenkuang"  name="anclassid">
                                <option value="0">查讯所有分类</option>
                                <%do while not rs.eof%>
                                <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                                <%rs.movenext
		  loop
		  rs.close
		  set rs=nothing%>
                              </select>
                              </div></td>
                        </tr>
                        <tr> 
                          <td align="right"> 
                            <div align="left">
                                <select class="wenbenkuang"  name="jiage" id="jiage">
                                  <option value="20">20元以下</option>
                                  <option value="30">30元以下</option>
                                  <option value="50" >50元以下</option>
                                  <option value="100">100元以下</option>
                                  <option value="500">500元以下</option>
                                  <option value="1000">1000元以下</option>
                                  <option value="10000">10000元以下</option>
                                  <option value="100000" selected>100000元以下</option>
                                </select>
                              </div></td>
                        </tr>
                        <tr> 
                          <td align="right"> 
                            <div align="left">
                                <script>
	var selects111=[];
<%dim i
	set rs=server.createobject("adodb.recordset")
	rs.open "select * from Pingpai order by pingpaiorder",conn,1,1
	'有大类
%>
	selects111['2']=new Array(
<%
	if rs.recordcount>0 then
	    for i=1 to rs.recordcount
		if i=rs.recordcount then 
%>
		new Option('<%=trim(rs("pingpainame"))%>','<%=trim(rs("pingpainame"))%>'));
<%		else
%>
		new Option('<%=trim(rs("pingpainame"))%>','<%=trim(rs("pingpainame"))%>'),
<%
		end if
		rs.movenext
		next
	else 
%>
		new Option('',''));
<%
	end if
rs.close
set rs=nothing

	set rs=server.createobject("adodb.recordset")
	rs.open "select * from shihe order by shiheorder",conn,1,1
	'有大类
%>
	selects111['3']=new Array(
<%
	if rs.recordcount>0 then
	    for i=1 to rs.recordcount
		if i=rs.recordcount then 
%>
		new Option('<%=trim(rs("shihename"))%>','<%=trim(rs("shihename"))%>'));
<%		else
%>
		new Option('<%=trim(rs("shihename"))%>','<%=trim(rs("shihename"))%>'),
<%
		end if
		rs.movenext
		next
	else 
%>
		new Option('',''));
<%
	end if
rs.close
set rs=nothing
%> 

function showselect()
{
if (document.form2.action.value=="2") {
	T_select.style.display = "";
	//加入内容
		with (document.form2){
			if(action.value) {
				selectname.options.length=0;
				for(var i=0;i<selects111[action.value].length;i++){
					selectname.add(selects111[action.value][i]);
				}
			}
		}
}else{
	T_select.style.display = "none";
} 
}
                              </script>
                              <table border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                  <td> 
                                    <select class="wenbenkuang"  name="action" id="action" onChange="showselect();">
                                      <option value="1" selected>商品名称</option>
                                      <option value="2">商品品牌</option>
                                      <option value="3">内容简介</option>
                                    </select>
                                  </td>
                                  <td> 
                                    <table border="0" cellspacing="0" cellpadding="0" id=T_select style="DISPLAY: none">
                                      <tr> 
                                        <td> 
                                          <select class="wenbenkuang" name="selectname">
                                          </select>
                                        </td>
                                      </tr>
                                    </table>
                                  </td>
                                </tr>
                                    </table>
                          </div></td>
                        </tr>
                        <tr> 
                        <td height="40" align="center"> 
						  <div align="left">
						    <input name="submit"  type=image value=" 开始查询 " src="imagess/go_search.gif">
                          </div></td>
                        </tr>
                      </form>
</table>
