<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javascript" src="js/js.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
	function $(id){return document.getElementById(id)}
    function nav(num)
    {
	formsubmit.top_class.value=num;
	//alert(formsubmit.top_class.value)
	for(var i=1;i<=6;i++){
	if(num==i){
           $("nav_"+i).style.backgroundImage="url(images/top_ss.gif)";
		   $("nav_"+i).style.color="#ffffff";
		   $("nav_"+i).style.fontSize="12px";
		   $("nav_"+i).style.fontWeight="bold";
        }else{
           $("nav_"+i).style.backgroundImage="url()";
		   $("nav_"+i).style.color="#487802";
		   $("nav_"+i).style.fontSize="12px";
		   $("nav_"+i).style.fontWeight="";
		  }
      }
    }
function topsubmit()
{
if(formsubmit.product_name.value!=''){
		if(containInvalidChartwo(formsubmit.product_name.value)){
		alert("对不起,你输入的查询关键字中包含非法字符!");
		return;
	}
}
if (formsubmit.top_class.value=="1"){
	formsubmit.action="product_search.asp?action=topsubmit";
	formsubmit.submit();
}
if (formsubmit.top_class.value=="2"){
	formsubmit.action="product_search_2.asp?action=topsubmit";
	formsubmit.submit();
}
if (formsubmit.top_class.value=="3"){
	formsubmit.action="product_search_3.asp?action=topsubmit&class_id=技能";
	formsubmit.submit();
}
if (formsubmit.top_class.value=="4"){
	formsubmit.action="product_search_3.asp?action=topsubmit&class_id=虚拟";
	formsubmit.submit();
}
if (formsubmit.top_class.value=="5"){
	formsubmit.action="product_search_3.asp?action=topsubmit&class_id=游戏";
	formsubmit.submit();
}
if (formsubmit.top_class.value=="6"){
	formsubmit.action="product_search_3.asp?action=topsubmit&class_id=点卡";
	formsubmit.submit();
}
}
function sousuo(ss){
	if(ss=="1"){
		document.getElementById('ss_1').style.display = "none"
		document.getElementById('ss_2').style.display = ""
		document.getElementById('tb_1').style.display = ""
		document.getElementById('product_name').style.width = "250px"
     }
	 if(ss=="2"){
		document.getElementById('ss_1').style.display = ""
		document.getElementById('ss_2').style.display = "none"
		document.getElementById('tb_1').style.display = "none"
		formsubmit.sheng_hidden.value=""
		formsubmit.shi.value=""
		formsubmit.sheng.value=""
		document.getElementById('product_name').style.width = "400px"
     }
}
</script>
<%
        set rs=server.createobject("adodb.recordset")
        sql = "select * from city order by CID asc"
        rs.open sql,conn,3,3
%>
<script language = "JavaScript">
var one_one_count;
one_subcat = new Array();
        <%
        count_1 = 0
        do while not rs.eof 
        %>
one_subcat[<%=count_1%>] = new Array("<%= rs("City")%>","<%=rs("ProvinceID")%>","<%= rs("City")%>");
        <%
        count_1 = count_1 + 1
        rs.movenext
        loop
        rs.close
        %>
one_count=<%=count_1%>;

function changelocation_top(locationid)
    {
    document.formsubmit.shi.length = 1; 
    var locationid=locationid;
    var i;
    for (i=0;i < one_count; i++)
        {
            if (one_subcat[i][1] == locationid)
            { 
                document.formsubmit.shi.options[document.formsubmit.shi.length] = new Option(one_subcat[i][0], one_subcat[i][2]);
            }        
        }

    }    
function getSelected_Text(name){
var obj=document.getElementById(name);
for(i=0;i<obj.length;i++){
   if(obj[i].selected==true){
    formsubmit.sheng_hidden.value=obj[i].innerText;      //关键是通过option对象的innerText属性获取到选项文本
   }
}
//alert(getSelectedText('user_add'))
//alert(formsubmit.sheng_hidden.value)
}
</script>
<style type="text/css">
<!--
.STYLE1 {color: #487802}
-->
</style>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="80" background="images/top_b.gif"><table width="996"  border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="314" rowspan="2"><a href="index.asp"><img src="images/logo_b.gif" width="314" height="80" border="0"></a></td>        
        <td width="524" height="25" valign="bottom"><table width="475"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td width="33" height="25" background="images/top_ss.gif" id="nav_1" onClick="nav(1)" style="font-size:12px; color:#FFFFFF;cursor:hand;font-weight: bold;"><div align="center">交换</div></td>
            <td width="10"><div align="center" style="color:#487802">|</div></td>
            <td width="33" id="nav_2" onClick="nav(2)" style="font-size:12px; color:#487802;cursor:hand"><div align="center">买卖</div></td>
            <td width="10"><div align="center" style="color:#487802">|</div></td>
            <td width="33" id="nav_3" onClick="nav(3)" style="font-size:12px; color:#487802;cursor:hand"><div align="center" >技能</div></td>
            <td width="10"><div align="center" style="color:#487802">|</div></td>
            <td width="33" id="nav_4" onClick="nav(4)" style="font-size:12px; color:#487802;cursor:hand"><div align="center">虚拟</div></td>
			<td width="10"><div align="center" style="color:#487802">|</div></td>
            <td width="33" id="nav_5" onClick="nav(5)" style="font-size:12px; color:#487802;cursor:hand"><div align="center">游戏</div></td>
			<td width="10"><div align="center" style="color:#487802">|</div></td>
            <td width="33" id="nav_6" onClick="nav(6)" style="font-size:12px; color:#487802;cursor:hand"><div align="center">点卡</div></td>
            <td><div align="right" style="color:#487802; font-size:12px"><a href="#" style="color:#5a5a5a; font-size:12px" onClick="sousuo('1')" id="ss_1">同城搜索</a><a href="#" style="color:#5a5a5a; font-size:12px; display:none" id="ss_2" onClick="sousuo('2')">全站搜索</a></div></td>
            </tr>
        </table></td>
        <td width="54" rowspan="2"><div align="center"><a href="javascript:window.external.Addfavorite('http://www.huanwu001.com','换吧网')" class="STYLE1" style="font-size:12px">加入收藏</a></div></td>
        <td width="53" rowspan="2"><div align="center" ><a href=# onClick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://www.huanwu001.com');" class="STYLE1" style="font-size:12px">设为主页</a></div></td>
        <td width="51" rowspan="2"><div align="center"><a href="messages.asp" style="font-size:12px; color:#487802; target="_blank">在线留言</a></div></td>
      </tr>
      <tr>
        <td width="524" height="32" valign="top">          <table  border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td><table width="475"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#77b102">
          <form name="formsubmit" method="post" action=""><input type="hidden" name="top_class" id="top_class" value="1"><tr>
            <td height="25" bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
			  <tr>
                <td><input type="text" name="product_name" id="product_name" style="border:0; border-color:#FFFFFF; width:400px; color:#999999" value="请输入物品名称" onmousedown="if(this.value=='请输入物品名称')this.value='';this.focus();" onBlur="if (value ==''){value='请输入物品名称'}"></td>
                <td id="tb_1" style="display:none "><span style="border:1px solid #FFFFFF; width:70px">
          <select name="sheng" id="sheng" style="color: #666666;margin:-1px" onChange="changelocation_top(document.formsubmit.sheng.options[document.formsubmit.sheng.selectedIndex].value);getSelected_Text('sheng')">
          <option selected value="">请选择省</option>
          <%    set bigRs=server.CreateObject("adodb.recordset")
	  sql="select * from province order by PID asc"
	  bigRs.open sql,conn,3,3
	  if not bigRs.eof then
	  for i =0 to bigRs.recordcount-1
%><option value="<%=bigRs("ProvinceID")%>"><%=bigRs("Province")%></option>
      <%   bigRs.movenext
     if bigRs.eof then exit for
     next
     end if
	 bigRs.close
%>
    </select></span>
          <input type="hidden" name="sheng_hidden" value="" id="sheng_hidden"><span style="border:1px solid #FFFFFF; width:70px"><select name="shi" id="shi" style="color: #666666;margin:-1px">
            <option selected value="">请选择市</option>
          </select></span></td>
                <td width="42"><div align="left"><a href="#"><img src="images/sos.gif" height="18" border="0" style="cursor:hand" onclick="topsubmit()" /></a></div></td>
              </tr>
            </table></td>
          </tr></form>
        </table></td>
            </tr>
          </table></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="50" valign="middle" background="images/mune_bg.gif"><table width="980" height="50"  border="0" align="center" cellpadding="0" cellspacing="0" class="CCC">
      <tr>
        <td width="191" height="49" background="images/top_1.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25"><div align="center"><b><a href="mm.asp" target="_parent" class="text">买卖专区</a></b><%set rs=conn.execute("select * from product_xiao where class_id=8 order by id desc")
						do while not rs.eof
						z=z+1
						if z=1 or z=2 or z=3 or z=4 then
						%>&nbsp;<a href="product_mm.asp?class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						end if
						rs.movenext
						loop
						rs.close%></div></td>
          </tr>
          <tr>
            <td height="24"><div align="center"><img src="images/new.gif" width="23" height="14">&nbsp;&nbsp;&nbsp;
          <%set rs=conn.execute("select * from product_xiao where class_id=8 order by id desc")
						do while not rs.eof
						x=x+1
						if x=5 or x=6 or x=7 or x=8 then
						%>&nbsp;<a href="product_mm.asp?class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						end if
						rs.movenext
						loop
						rs.close%></div></td>
          </tr>
        </table></td>
        <td width="5"></td>
        <td width="272" background="images/top_2.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25"><div align="center"><b><a href="vr.asp" target="_parent" class="text">美女</a></b><%set rs=conn.execute("select * from product_xiao where class_id=6 order by id desc")
						do while not rs.eof%>&nbsp;<a href="product_class.asp?class_id=6&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%rs.movenext
						loop
						rs.close%></div></td>
          </tr>
          <tr>
            <td height="24"><div align="center"><b><a href="nr.asp" target="_parent" class="text">帅哥</a></b><%set rs=conn.execute("select * from product_xiao where class_id=5 order by id desc")
						do while not rs.eof
						%>&nbsp;<a href="product_class.asp?class_id=5&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						rs.movenext
						loop
						rs.close%></div></td>
          </tr>
        </table></td>
        <td width="6"></td>
        <td width="214" background="images/top_3.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25"><div align="center"><b><a href="dn.asp" target="_parent" class="text">电脑</a></b><%set rs=conn.execute("select * from product_xiao where class_id=4 order by id desc")
						do while not rs.eof
						%>&nbsp;<a href="product_class.asp?class_id=4&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						rs.movenext
						loop
						rs.close%></div></td>
          </tr>
          <tr>
            <td height="24"><div align="center"><b><a href="sh.asp" target="_parent" class="text">生活</a></b><%set rs=conn.execute("select * from product_xiao where class_id=2 order by id desc")
						do while not rs.eof
						%>&nbsp;<a href="product_class.asp?class_id=2&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						rs.movenext
						loop
						rs.close%></div></td>
          </tr>
        </table></td>
        <td width="5"></td>
        <td width="287" background="images/top_4.gif"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="25"><div align="center"><b><a href="sm.asp" target="_parent" class="text">数码</a></b><%set rs=conn.execute("select * from product_xiao where class_id=3 order by id desc")
						do while not rs.eof
						%>&nbsp;<a href="product_class.asp?class_id=3&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%
						rs.movenext
						loop
						rs.close%>&nbsp;</div></td>
          </tr>
          <tr>
            <td height="24"><div align="center"><b><a href="zh.asp" target="_parent" class="text">综合</a></b><%set rs=conn.execute("select * from product_xiao where class_id=1 order by id desc")
						do while not rs.eof
						%>&nbsp;<a href="product_class.asp?class_id=1&class_xiao=<%=rs("id")%>" class="text"><%=rs("xiao_name")%></a><%rs.movenext
						loop
						rs.close%></div></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
<table width="980"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="8" background="images/top_bottom_bg.gif"></td>
  </tr>
</table>
