<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<!--#include file="fuction.asp"-->
<SCRIPT LANGUAGE="JavaScript">
<!--
	function regInput(obj, reg, inputStr)
	{
		var docSel	= document.selection.createRange()
		if (docSel.parentElement().tagName != "INPUT")	return false
		oSel = docSel.duplicate()
		oSel.text = ""
		var srcRange	= obj.createTextRange()
		oSel.setEndPoint("StartToStart", srcRange)
		var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
		return reg.test(str)
	}

function checkspace(checkstr) {
  var str = '';
  for(i = 0; i < checkstr.length; i++) {
    str = str + ' ';
  }
  return (str == checkstr);
}

function checkk()
{
   if(checkspace(document.form2.searchkey.value)&&((document.form2.action.value=="3")||(document.form2.action.value=="1")))  {
	document.form2.searchkey.focus();
	alert("请输入查询关键字！");
	return false;
  }
   if(checkspace(document.form2.jiage.value)) {
	document.form2.jiage.focus();
    alert("对不起，请填写价格！");
	return false;
  }
  if(checkspace(document.form2.jiage2.value)) {
	document.form2.jiage2.focus();
    alert("对不起，请填写价格！");
	return false;
  }

   document.form2.submit();
}

//-->
</script>
<!--#include file="webtop.asp"-->
<table width="1000" align="center" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td valign="bottom"><img src="<%=weburl%>images/arrow01.gif" width="11" height="11" /> Your present position: <a href="<%=weburl%>"><%=webname%></a> ->Advanced Search</td>
    <td valign="bottom"> 
       
    </td>
  </tr>
  <tr>
    <td height="6" colspan="3"></td>
  </tr>
</table>
<table width="1000"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
		<td width="205"  valign="top"><!--#include file="index_login.asp"-->
	<!--#include file="rexiao.asp"-->
</td>
          <td valign="top">
            <table border="0" align="center" cellpadding="0" cellspacing="0" width="98%">
              <tr>
                <td height="30" valign="top"><img src="<%=weburl%>images/ss.jpg" width="780" height="33"></td>
              </tr>
              
              
              <tr>
                <td valign="top">
                    <table border="0" cellspacing="0" cellpadding="1" align="left" width="489">
                      <tr>
                        <td>
                          <table width="103%" border="0" align="left" cellpadding="2" cellspacing="5" bgcolor="#FFFFFF">
                            <form name="form2" method="post" action="research.asp">
                              <tr>
                                <td width="28%" style="padding-left:6px">
                                  <div align="right">Keywords:</div></td>
                                <td width="72%"  style="padding-left:6px">
                                <input name="searchkey" type="text" id="searchkey" class="wenbenkuang">                                </td>
                              </tr><tr>
                                <td style="padding-left:6px">
                                  <div align="right">Price From:<BR>
                                </div></td>
                                <td style="padding-left:6px" width="72%">                                  <input name="jiage"  class="wenbenkuang" type="text" id="jiage" size="6" onKeyPress="return event.keyCode>=46&&event.keyCode<=57" >
                                   
                                  - to
                                    <input name="jiage2"   class="wenbenkuang" type="text" id="jiage2" size="6" onKeyPress="return event.keyCode>=46&&event.keyCode<=57" >
                                (Please fill in numbers)</td>
                              </tr>
                              <tr>
                                <td style="padding-left:6px" width="28%">
                                  <div align="right">Search options:</div></td>
                                <td style="padding-left:6px" width="72%">
                                  <script>
	var selects111=[];
<%
	set rs=server.createobject("adodb.recordset")
	rs.open "select * From shop_pinpai order by pinpaiorder",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("pinpainame"))%>','<%=trim(rs("pinpainame"))%>'));
<%		else
%>
		new Option('<%=trim(rs("pinpainame"))%>','<%=trim(rs("pinpainame"))%>'),
<%
		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 name="action" id="select" onChange="showselect();" class="wenbenkuang">
                                          <option value="1" selected>Product name</option>
                                          <option value="2">Brand</option>
                                          <option value="3">Description</option>
										   <option value="4">Fuzzy search</option>
                                        </select>                                      </td>
                                      <td>
                                        <table border="0" cellspacing="0" cellpadding="0" id=T_select style="DISPLAY: none">
                                          <tr>
                                            <td>
                                              <select name="selectname" class="wenbenkuang">
                                              </select>                                            </td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table></td>
                              </tr>
                              
                              <tr>
                                <td height="18" style="padding-left:6px" width="28%">
                                  <div align="right">Product category: </div></td>
                                <td style="padding-left:6px" width="72%">
                                  <%
								  set rs = server.CreateObject("adodb.recordset")
								  sql = "select * from shop_anclass order by anclassidorder"
								  rs.open sql,conn,1,1
								  %>
                                  <select name="anclassid" class="wenbenkuang">
                                    <option value="0">Sear all categories</option>
                                    <%do while not rs.eof%>
                                    <option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
                                    <%
										rs.movenext
										loop
										rs.close
										set rs=Nothing
										%>
                                </select>                                </td>
                              </tr>
                              <tr>
                                <td height="18" colspan="2" style="padding-left:6px">
                                  <div align="center">
                                    <input name="Submit22" type="submit" class="go-wenbenkuang" value="Search" onClick="return checkk();">
                                    <input name="Submit2" type="reset" class="go-wenbenkuang" value="Reset">
                                    <input name="Submit32" type="button" class="go-wenbenkuang" value="Back" onClick="javascript:window.history.go(-1)">
                                </div></td>
                              </tr>
                            </form>
                        </table></td>
                      </tr>
                    </table>
                    <br>                </td>
              </tr>
            </table></td>
        </tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>