<%

response.write vbcrlf&"<script language=javascript>"
response.write vbcrlf&"var curShopID=199;"
response.write vbcrlf&"var subMenu_0='"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=100\';curShopID=100;setSubMenuColor();resetForm();\"" name=submenu_100>我的背景</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=200\';curShopID=200;setSubMenuColor();resetForm();\"" name=submenu_200>我的家具</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=300\';curShopID=300;setSubMenuColor();resetForm();\"" name=submenu_300>我的用品</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=400\';curShopID=400;setSubMenuColor();resetForm();\"" name=submenu_400>我的杂物</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=500\';curShopID=500;setSubMenuColor();resetForm();\"" name=submenu_500>我的货架</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=600\';curShopID=600;setSubMenuColor();resetForm();\"" name=submenu_600>我的旧品库</a>〗"
response.write "';"
response.write vbcrlf&"var subMenu_99='"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=199\';curShopID=199;setSubMenuColor();resetForm();\"" name=submenu_199>最新上架</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=299\';curShopID=299;setSubMenuColor();resetForm();\"" name=submenu_299>热销物品</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=399\';curShopID=399;setSubMenuColor();resetForm();\"" name=submenu_399>VIP专卖</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=499\';curShopID=499;setSubMenuColor();resetForm();\"" name=submenu_499>特价物品</a>〗"
response.write "';"
response.write vbcrlf&"var subMenu_96='"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=196\';curShopID=196;setSubMenuColor();resetForm();\"" name=submenu_196>背景类</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=296\';curShopID=296;setSubMenuColor();resetForm();\"" name=submenu_296>家具类</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=396\';curShopID=396;setSubMenuColor();resetForm();\"" name=submenu_396>用品类</a>〗"
response.write "&nbsp;&nbsp;"
response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid=496\';curShopID=496;setSubMenuColor();resetForm();\"" name=submenu_496>其他类</a>〗"
response.write "';"
dim rsType
set rsType=server.createobject("ADODB.recordset")
sqlhome="select seqno from home_type where visible order by orders"
rsType.open sqlhome,home_conn,1,1
dim isFirst
do while not rsType.eof
	response.write vbcrlf&"var subMenu_"&rsType("seqno")&"='"
	sqlhome="select seqno,subtypename from home_subtype where typeseq="&rsType("seqno")&" and visible order by orders"
	rshome.open sqlhome,home_conn,1,1
	do while not rshome.eof
		response.write "〖<a href=\""javascript:void(0)\"" onclick=\""top.ifrm_item_list.location=\'z_home_shop.asp?shopid="&rshome("seqno")&right("00"&rsType("seqno"),2)&"\';curShopID="&rshome("seqno")&right("00"&rsType("seqno"),2)&";setSubMenuColor();resetForm();\"" name=submenu_"&rshome("seqno")&right("00"&rsType("seqno"),2)&">"&rshome("subtypename")&"</a>〗"
		rshome.movenext
		if not rshome.eof then response.write "&nbsp;&nbsp;"
	loop
	rshome.close
	response.write "';"
	rsType.movenext
loop
rsType.close
set rsType=Nothing
response.write "function setMenuColor() {"
response.write "var i;"
response.write "for(i=0;i<document.all.length;i++) "
response.write "if(document.all[i].tagName==""A"") "
response.write "if(document.all[i].name!=null){"
response.write "var splitArray=document.all[i].name.split('_');"
response.write "if(splitArray.length==2) "
response.write "if(splitArray[0]=='menu') if(splitArray[1]==curShopID%100) {document.all[i].style.color='red';TD_SubMenu.innerHTML=eval(""subMenu_""+curShopID%100);setSubMenuColor();} else {document.all[i].style.color='white';}"
response.write "}}"
response.write "function setSubMenuColor() {"
response.write "var i;"
response.write "for(i=0;i<document.all.length;i++) "
response.write "if(document.all[i].tagName==""A"") "
response.write "if(document.all[i].name!=null){"
response.write "var splitArray=document.all[i].name.split('_');"
response.write "if(splitArray.length==2) "
response.write "if(splitArray[0]=='submenu') if(splitArray[1]==curShopID.toString()) {document.all[i].style.color='red';document.all[i].style.fontWeight='bold';} else {document.all[i].style.color='black';document.all[i].style.fontWeight='normal';}"
response.write "}}"
response.write "function submitSearch() {"
response.write "top.ifrm_item_list.location='z_home_shop.asp?shopid=195&search_str='+search_str.value+'&selprice_l='+selPrice_L.value+'&selprice_h='+selPrice_H.value+'&selperiod_l='+selPeriod_L.value+'&selperiod_h='+selPeriod_H.value+'&selflag='+selflag.value;"
response.write "}"
response.write "function resetForm() {"
response.write "search_str.value='';"
response.write "selPrice_L.value='';"
response.write "selPrice_H.value='';"
response.write "selPeriod_L.value='';"
response.write "selPeriod_H.value='';"
response.write "selflag.value=0;"
response.write "}"
response.write "</script>"
response.write "<table cellpadding=2 cellspacing=1 align=center class=tableborder1>"
response.write "<tr height=25>"
response.write "<th valign=middle id=tabletitlelink>"
response.write "<a href=""javascript:void(0)"" onclick=""top.ifrm_item_list.location='z_home_shop.asp?shopid=100';curShopID=100;setMenuColor();resetForm();"" name=menu_0>我的物品</a>"
response.write "</th>"
response.write "<th valign=middle id=tabletitlelink>"
response.write "<a href=""javascript:void(0)"" onclick=""top.ifrm_item_list.location='z_home_shop.asp?shopid=199';curShopID=199;setMenuColor();resetForm();"" name=menu_99>推荐物品</a>"
response.write "</th>"
sqlhome="select seqno,typename from home_type where visible order by orders"
rshome.open sqlhome,home_conn,1,1
TypeCount=0
set rs=server.createobject("adodb.recordset")
do while not rshome.eof
	sqlhome="select top 1 seqno from home_subtype where typeseq="&rshome("seqno")&" and visible order by orders"
	rs.open sqlhome,home_conn,1,1
	if not rs.eof then
		minsubtype=rs(0)
		response.write "<th valign=middle id=tabletitlelink>"
		response.write "<a href=""javascript:void(0)"" onclick=""top.ifrm_item_list.location='z_home_shop.asp?shopid="&minsubtype&"0"&rshome("seqno")&"';curShopID="&minsubtype&"0"&rshome("seqno")&";setMenuColor();resetForm();"" name=menu_"&rshome("seqno")&">"&rshome("TypeName")&"</a>"
		response.write "</th>"
		TypeCount=TypeCount+1
	end if
	rs.close
	rshome.movenext
loop
set rs=nothing
rshome.close
response.write "<th valign=middle id=tabletitlelink>"
response.write "<a href=""javascript:void(0)"" onclick=""top.ifrm_item_list.location='z_home_shop.asp?shopid=196';curShopID=196;setMenuColor();resetForm();"" name=menu_96>二手市场</a>"
response.write "</th>"
response.write "</tr>"
response.write "<tr height=25>"
response.write "<td align=center valign=middle colspan="&(TypeCount+5)&" class=tablebody1 id=TD_SubMenu>"
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "<br>"
response.write "<table cellpadding=2 cellspacing=1 align=center class=tableborder1>"
response.write "<tr height=25>"
response.write "<th valign=middle>搜索家园物品</th>"
response.write "</tr>"
response.write "<tr height=30>"
response.write "<td align=center valign=middle width=100% class=tablebody1>"
response.write "物品名称：<input type=""text"" name=""search_str"" size=""10"">&nbsp;"
response.write "<input type=""text"" name=""selPrice_L"" size=""5"" maxlength=""5"">≤价格≤<input type=""text"" name=""selPrice_H"" size=""5"" maxlength=""5"">&nbsp;"
response.write "<input type=""text"" name=""selPeriod_L"" size=""5"" maxlength=""5"">≤有效期≤<input type=""text"" name=""selPeriod_H"" size=""5"" maxlength=""5"">&nbsp;"
response.write "<select name=""selflag""><option value=0 selected>限购者不限</option><option value=1>所有会员</option><option value=2>版主以上</option><option value=3>超级版主</option><option value=4>管理员</option></select>&nbsp;"
response.write "<input type=""button"" name=""submit"" value=""开始搜索"" onclick=""javascript:submitSearch();curShopID=195;setMenuColor();setSubMenuColor();"">"
response.write "</td>"
response.write "</tr>"
response.write "</table>"
response.write "<script language=javascript>"
response.write "setMenuColor();"
response.write "setSubMenuColor();"
response.write "resetForm();"
response.write "</script>"
response.write "<br>"
%>