<!--#include file="../prohead.asp"-->
 <!--#include file="../checkrole.asp"-->
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%

  call checkuser("cp")
if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
  id=Replace_Text(request("id"))

sql="select * from Websen_productshow where id="&id&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof then 
response.Redirect("edit.asp")
response.end
else
sid=rs("sortid")
tid=rs("typeid")
tid2=rs("typeid_2")
  %>
 <TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD style="BACKGROUND-POSITION: right 50%; BACKGROUND-IMAGE: url(i../mages/bg1.gif); BACKGROUND-REPEAT: repeat-y; BACKGROUND-COLOR: #ffffff" 
    vAlign=top align=middle><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=100% border=0>
        <TBODY>
        <TR>
        <TD width="74%"><IMG height=32 src="../images/product_manage.gif" width=578 
            border=0></TD>
        <TD width="26%" background="../images/info_bg.gif">&nbsp;</TD>
        </TR></TBODY></TABLE>
      <TABLE class=content_border cellSpacing=0 cellPadding=0 width=100% 
border=0>
        <TBODY>
        <TR>
          <TD align=middle><BR>
		  
<SCRIPT language=JavaScript>

function setSubjectText(){

	if(trim(document.form.bigclassid.value) == "") {
		    alert("请先选择产品大类");
			document.form.bigclassid.focus();
		    return false;
	} 
	if(trim(document.form.smallclassid.value) == "") {
		    alert("请先选择产品小类");
			document.form.smallclassid.focus();
		    return false;
	} 
	
	if(trim(document.form.cpmc.value) == "") {
		    alert("请先填写产品名称");
			document.form.cpmc.focus();
		    return false;
	} 
	if(trim(document.form.cpgg.value) == "") {
		    alert("请先填写产品型号");
			document.form.cpgg.focus();
		    return false;
	} 
	if(trim(document.form.cpcd.value) == "") {
		    alert("请先填写产品原产地");
			document.form.cpcd.focus();
		    return false;
	} 
	
		if(trim(document.form.p_z_Z_RootCategory.value) == "") {
      alert("请先选择行业大类");
      form.p_z_Z_RootCategory.focus();
      return false;
    }
		if(trim(document.form.p_z_Z_CategoryId1.value) == "") {
		    alert("请先选择行业小类");
			document.form.p_z_Z_CategoryId1.focus();
		return false; 
	}
	if(trim(document.form.keywords.value) == "") {
		    alert("注意：请按左至右的顺序填写\n\n关键字最少要填一个");
			document.form.keywords.focus();
		    return false;
	}

   var keywords = form.keywords.value;
   for(i=0;i<keywords.length;i++){keywords=keywords.replace(',','，');}
    if(form.keywords2.value){
        for(i=0;i<form.keywords2.value.length;i++){form.keywords2.value=form.keywords2.value.replace(',','，');}
        keywords+=','+form.keywords2.value;
    }
    if(form.keywords3.value){
        for(i=0;i<form.keywords3.value.length;i++){form.keywords3.value=form.keywords3.value.replace(',','，');}
        keywords+=','+form.keywords3.value;
    }    
    form.p_z_Z_Keywords.value = keywords
	
  //  return true;
	document.form.submit()
    }
function trim(inputString) {
	   
              if (typeof inputString != "string") { return inputString; }
              var retValue = inputString;
              var ch = retValue.substring(0, 1);
              while (ch == " ") { 
	          //检查字符串开始部分的空格
                  retValue = retValue.substring(1, retValue.length);
                  ch = retValue.substring(0, 1);
              }
              ch = retValue.substring(retValue.length-1, retValue.length);
              while (ch == " ") {
                 //检查字符串结束部分的空格
                 retValue = retValue.substring(0, retValue.length-1);
                 ch = retValue.substring(retValue.length-1, retValue.length);
              }
              while (retValue.indexOf("  ") != -1) { 
	         //将文字中间多个相连的空格变为一个空格
                 retValue = retValue.substring(0, retValue.indexOf("  ")) + retValue.substring(retValue.indexOf("  ")+1, retValue.length); 
              }
              return retValue;
           } 	

</SCRIPT>
<script language="JavaScript">
function pre_pic()
{
var pic_view;
if (document.form.file.value=="")
{
		alert("请选择图片");
		document.form.file.focus();
	 	return false;
	 }

pic_view="<img src='" + document.form.file.value +"' onload='javascript:if(this.width>500){this.width=500;}'>";
pic.innerHTML=pic_view;
return true;
}
</script>

<script language = "JavaScript"> 
sallt=new Array();
<%
Dim ii
ii=0
set rs8=server.CreateObject("adodb.recordset")
sql8="select * from Websen_productclass_1 where gsid="&gsid
rs8.open sql8,conn,1,1
if not rs8.eof then
do while not rs8.eof
%>
sallt[<%=ii%>]=new Array("<%=rs8("smallclassname")%>","<%=rs8("bigclassid")%>","<%=rs8("smallclassid")%>");
<%
ii=ii+1
rs8.movenext
loop
rs8.close
end if
%>
function changeselect1(selvalue)  
   { 
      document.form.smallclassid.length=0;  
      var selvalue=selvalue;
      var ii;
      for(ii=0;ii<sallt.length;ii++) 
	{
	    if(sallt[ii][1]==selvalue) 
      		{
  	var newOption1=new Option(sallt[ii][0],sallt[ii][2]);
	document.all.smallclassid.add(newOption1);
		}
	}
}
</script> 
<form method="POST" action="save_edit.asp" name="form">
<input type="hidden" name="id" value="<%=id%>">
            <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
					  <TR>
                        <TD height=30 align="right" class=M><img src="../images/classpic.gif"> <a href="addclass.asp">产品大类管理</a>&nbsp;&nbsp;<img src="../images/classpic.gif"> <a href="addclass_1.asp">产品小类管理</a>&nbsp;</TD>
                      </TR>
                    </TBODY></TABLE>
					  <table width="98%"  border="0" align="center" cellpadding="8" cellspacing="0" id="table103">
                    <tr>
                      <td class="s lh15" style="border:#FFCB99 1px solid; background:#FFF8EE;">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
                    <TBODY>
					  <TR>
                      <TD height=30 colspan="2" class=M>产品目录的好处</TD>
                      </TR>
                    <TR>
                      <TD colSpan=2><SPAN 
                        class=lh15>它帮您体现供应实力，直观在网上展示产品，它有3大优势：</SPAN></TD></TR>
                    <TR>
                      <TD>
                        <DIV align=center><FONT 
                        face="Verdana, Arial, Helvetica, sans-serif" 
                        size=2>1.</FONT></DIV></TD>
                      <TD><SPAN class=lh15>长期有效：相当于您的长期供应清单！</SPAN></TD></TR>
                    <TR>
                      <TD>
                        <DIV align=center><FONT 
                        face="Verdana, Arial, Helvetica, sans-serif" 
                        size=2>2.</FONT></DIV></TD>
                      <TD><SPAN class=lh15>数量多：可容纳200个产品！</SPAN></TD></TR>
                    <TR>
                      <TD>
                        <DIV align=center><FONT 
                        face="Verdana, Arial, Helvetica, sans-serif" 
                        size=2>3.</FONT></DIV></TD>
                      <TD><SPAN class=lh15>直观：型号、图片，一目了然！</SPAN></TD></TR>
                    </TBODY></TABLE>
</td>
                    </tr>
                </table><BR>                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="2" bgcolor="ff7300"></td>
                    </tr>
                  </table>
            <TABLE cellSpacing=2 cellPadding=3 width="100%" border=0>
              <COLGROUP>
              <COL class=formtop></COLGROUP>
              <TBODY>
             <TR bgcolor="#FFF8EE">
                        <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                          <B>产品系列：</B></TD>
                <TD class=lh15>
				<%
  set rs9=server.CreateObject("adodb.recordset")
sql9="select Websen_productclass_1.bigclassid as yxbigclassid,Websen_productclass_1.smallclassid as yxsmallclassid,Websen_productclass_1.smallclassname,Websen_productclass.* from Websen_productclass_1,Websen_productclass where Websen_productclass_1.smallclassid="&rs("smallclassid")&" and Websen_productclass.bigclassid=Websen_productclass_1.bigclassid and Websen_productclass.gsid="&gsid&" and Websen_productclass_1.gsid="&gsid
rs9.open sql9,conn,1,1
 if not rs9.eof then
 
%>
				<select name="bigclassid" onChange="changeselect1(document.form.bigclassid.options[document.form.bigclassid.selectedIndex].value)" size="1"> 
<option selected value="<%=rs9("yxbigclassid")%>"><%=rs9("bigclassname")%></option> 
<%
set rs7=server.CreateObject("adodb.recordset")
sql7="select * from Websen_productclass where bigclassid<>"&rs9("bigclassid")&" and gsid="&gsid
rs7.open sql7,conn,1,1
if not rs7.eof then

do while not rs7.eof
response.write "<option value='"&rs7("bigclassid")&"'>"&rs7("bigclassname")&"</option>"&chr(13)+chr(10)
rs7.movenext
loop
rs7.close
end if
%>
                            
</select> 
<select name="smallclassid"> 
<option selected value="<%=rs9("yxsmallclassid")%>"><%=rs9("smallclassname")%></option> 
<%
set rs10=server.CreateObject("adodb.recordset")
sql10="select * from Websen_productclass_1 where bigclassid="&rs9("yxbigclassid")&" and smallclassid<>"&rs9("yxsmallclassid")&" and gsid="&gsid
rs10.open sql10,conn,1,1
if not rs10.eof then
do while not rs10.eof
response.write "<option value='"&rs10("smallclassid")&"'>"&rs10("smallclassname")&"</option>"&chr(13)+chr(10)
rs10.movenext
loop
rs10.close
end if
rs9.close
end if
 
%>
                             
</select>　　<SPAN class=note><a href="addclass.asp">您可以添加更多产品系列</a></SPAN></TD>
                    </TR>
			  
              <TR bgcolor="#FFF8EE">
                <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                  <B>产品名称：</B></TD>
                <TD class=lh15><INPUT maxLength=50 size=30 name="cpmc" value="<%=rs("cpmc")%>"> <BR>
                      <SPAN 
                  class=note>例：“数控车床”</SPAN></TD>
                    </TR>
				<TR bgcolor="#FFF8EE">
                <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                  <B>产品型号：</B></TD>
                <TD class=lh15><INPUT maxLength=50 size=30 name="cpgg" value="<%=rs("cpgg")%>"> <BR>
                      <SPAN 
                  class=note>例：“CJK0632”</SPAN> </TD>
                    </TR>
				<TR bgcolor="#FFF8EE">
                <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                  <B>原 产 地：</B></TD>
                <TD class=lh15><INPUT maxLength=50 size=30 name="cpcd" value="<%=rs("cpcd")%>"> <BR>
                      <SPAN 
                  class=note>例：“广东省北京市”</SPAN> </TD>
                    </TR>
              <TR bgcolor="#FFF8EE">
                <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                  <B>行 业：</B></TD>
                <TD class=lh15>
				<select name="p_z_Z_RootCategory" onChange="changeCategory(this)"  >
                                  <option selected>--请选择行业大类--</option>
                        </select> <select name="p_z_Z_CategoryId1" maxlength="80">
                                  <option value="0" selected>--请选择行业子类--</option>
                                </select>
		
	   <BR>
                      <SPAN 
                  class=note>指您产品所属的行业</SPAN> </TD>
                    </TR>
              
				<script language = "JavaScript" src = "../../file_ico/file_js.js" type="text/javascript"></script>
				<tr>
				  <TD class=C vAlign=top width="20%" 
                bgColor=#FFFCF7><B>产品缩略图：</B></TD>
                  <td height="30" bgcolor="#FFF8EE">
		 <%'处理无图情况:^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
				
			if rs("picture_summ")="../../UploadFile/nopicture.gif" then
             response.Write("<font color=red>请注意:</font><font color=#0099CC>当前图片为默认无图片的标志图<a href='../../UploadFile/nopicture.gif' target=_blank><img src='../../UploadFile/nopicture.gif' width=20 height=20 border=0 ></a>，请上传自己的相关产品图片！</font>")
			end if
			'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		 	%>
							<br>
							<input name="yx_pic" type="text" size="40" maxlength="48" onClick="lookmagic(1)" ID="magicfacepic(1)" readonly value="<%=rs("picture_summ")%>"> <font onclick="lookmagic(1)" style="CURSOR:hand">选择图片</font>&nbsp;<A  href="javascript:win=window.open('../myfiles.asp','contact','left=100,top=100,width=650,height=500,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no');win.focus();">统一上传图片</A>
	<div id="magicframe(1)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="../inc_file.asp?action=1" width="380" height="210" frameborder="0" scrolling="no"></iframe></div></td>
  </tr>
               <tr>
				  <TD class=C vAlign=top width="20%" 
                bgColor=#FFFCF7>
				
				<B>产品大图：</B></TD>
                  <td height="30" bgcolor="#FFF8EE">
			 <%'处理无图情况:^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
				
			if rs("picture")="../../UploadFile/nopicture.gif" then
             response.Write("<font color=red>请注意:</font><font color=#0099CC>当前图片为默认无图片的标志图<a href='../../UploadFile/nopicture.gif' target=_blank><img src='../../UploadFile/nopicture.gif' width=20 height=20 border=0 ></a>，请上传自己的相关产品图片！</font>")
			end if
			'^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
			%>
			<br>
			
				  <input name="yx_pic2" type="text" size="40" maxlength="48" onClick="lookmagic(2)" ID="magicfacepic(2)" readonly value="<%=rs("picture")%>"> <font onclick="lookmagic(2)" style="CURSOR:hand">选择图片</font>&nbsp;<a href="../myfiles.asp" target="_blank">统一上传图片</a>
	<div id="magicframe(2)" style="visibility:hidden; position: absolute;width:10; left: 2px; top: 479px;"><iframe src="../inc_file.asp?action=2" width="380" height="210" frameborder="0" scrolling="no"></iframe></div></td>
  </tr>
              <TR bgcolor="#FFF8EE">
                <TD vAlign=top bgColor=#FFFCF7 class=C><FONT 
                  color=#ff0000>*</FONT> <B>关键字：</B></TD>
                <TD class=lh15>
				          <%
				keywords=rs("keywords")
				if keywords<>"" then
				  if instr(keywords,",")>0 then
				     kwarry=split(keywords,",")
					 if ubound(kwarry)=1 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
				           elseif ubound(kwarry)=2 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 value='"&kwarry(2)&"' name=keywords3>"
                           elseif ubound(kwarry)>2 then
				           response.write"<INPUT maxLength=8 size=10 value='"&kwarry(0)&"' name=keywords>, <INPUT maxLength=8 size=10 value='"&kwarry(1)&"' name=keywords2>, <INPUT maxLength=8 size=10 value='"&kwarry(2)&"' name=keywords3>"
                     end if
				  else
				  response.write"<INPUT maxLength=8 size=10 value='"&keywords&"' name=keywords>, <INPUT maxLength=8 size=10 name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
                  end if
				else
				response.write"<INPUT maxLength=8 size=10 name=keywords>, <INPUT maxLength=8 size=10 name=keywords2>, <INPUT maxLength=8 size=10 name=keywords3>"
				end if
				%>
                           <INPUT type=hidden 
                  name=p_z_Z_Keywords> <SPAN 
                  class=note><BR>用产品名、行业类目做关键字，可填1-3个（每个最多8个字），尽量填全；<BR>
                          例：供应发电机，可填“发电机”“发电机及电动机”“机械”为关键字<BR>
                    </SPAN></TD>
                </TR>
              <TR bgcolor="#FFF8EE">
                <TD bgColor=#FFFCF7 class=C><FONT color=#ff0000>*</FONT> 
                  <B>详细说明：</B></TD>
                <TD class=lh15><TEXTAREA name="xxsm" rows=10 cols=50><%=rs("xxsm")%></TEXTAREA> 
                  <SPAN class=note><BR>说明尽可能详细，以提高信息的可信度，促使您做成生意；<BR><FONT 
                  color=red>注意：请不要在详细说明中留下公司名称和任何联系方式。</FONT></SPAN> </TD></TR>
              			 <TR bgcolor="#FFF8EE">
                <TD colspan="2" align="center"><span id="pic"></span></TD>
                </TR>
			  </TBODY></TABLE>                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="2" bgcolor="ff7300"></td>
                    </tr>
                  </table><BR> 
            <IMG id=img1 src="../images/downArrow.gif" align=absMiddle>
			 <span class="C"><b>补充更多信息（非必须）</b></span><BR><BR>
            
            <TABLE cellSpacing=2 cellPadding=3 width="100%" border=0>
              <COLGROUP>
              <COL class=formtop></COLGROUP>
              <TBODY>  <TR>
                <TD class=C bgColor=#FFFCF7><span class="STYLE1">产品报价<B>：</B></span></TD>
                <TD class=lh15 bgColor=#FFF8EE>是否参与产品报价:
                  <input type=radio value="0" <% if rs("iscpbj")=0 then response.write "checked" %> name="iscpbj" checked>
                  否
                  <input type=radio value="1"  <% if rs("iscpbj")=1 then response.write "checked" %> name="iscpbj">
                  是<span style="font-size: 18px">{</span>
                  <input name="proprice" type="text"   value="<%=rs("proprice")%>" size="10" maxlength="10" >
                  元 请输入报价的金额(当选择<span style="color: #FF0000">是</span>时有效！)	<span style="font-size: 18px">}</span>                  </TD>
              </TR>
			  <TR>
                <TD class=C bgColor=#FFFCF7><B>产品品牌：</B></TD>
                <TD class=lh15 bgColor=#FFF8EE><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  name="cpsb" value="<%=rs("cpsb")%>"> </TD></TR>
              
              <TR>
                <TD class=C bgColor=#FFFCF7><B>产品数量</B>：</TD>
                <TD class=lh15 bgColor=#FFF8EE><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  name="Quantity" value="<%=rs("Quantity")%>"></TD></TR>
              <TR>
                <TD class=C bgColor=#FFFCF7><B>包装说明：</B></TD>
                <TD class=lh15 bgColor=#FFF8EE><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  name="Packaging" value="<%=rs("Packaging")%>"></TD></TR>
              <TR>
                <TD class=C bgColor=#FFFCF7><B>价格说明：</B></TD>
                <TD class=lh15 bgColor=#FFF8EE><INPUT 
                  style="FONT-SIZE: 9pt; WIDTH: 250px" maxLength=50 size=30 
                  name="cpjg" value="<%=rs("cpjg")%>"></TD></TR></TBODY></TABLE>                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="2" bgcolor="ff7300"></td>
                    </tr>
                  </table><BR>
            <TABLE cellSpacing=6 cellPadding=3 width="100%" bgColor=#f9f9f9 
            border=0>
              <TBODY>

              <TR>
                <TD> 
                      </TD>
                </TR></TBODY></TABLE>                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="2" bgcolor="ff7300"></td>
                    </tr>
                  </table><BR>
            <TABLE width="95%">
              <TBODY>
              <TR>
                <TD class=lh15><SPAN class=C><FONT 
                  color=#ff0000><STRONG>最后一步很重要！<BR>
                          </STRONG></FONT></SPAN><STRONG>请确保联系资料是完整准确的，以保证客户找到您。如要修改，<A 
                  href="../modify/modify_info.asp" 
                  target=_blank>点此修改联系资料</A></STRONG></TD>
                    </TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width="95%" border=0>
              <TBODY>
              <TR>
                <TD bgColor=#cccccc>
                  <TABLE cellSpacing=1 cellPadding=4 width="100%" border=0>
                    <TBODY>
 <%
 set rs5=server.CreateObject("adodb.recordset")
sql5="select name,ch,qymc,phone,fax,email from Websen_corporation where id="&gsid
rs5.open sql5,conn,1,1
if not rs5.eof then 
%>
                    <TR>
                      <TD style="PADDING-LEFT: 10px" align=right width="25%" 
                      bgColor=#ffffff>姓名：</TD>
                      <TD style="PADDING-LEFT: 10px" bgColor=#ffffff><%=rs5("name")%>&nbsp; 
                        <%=rs5("ch")%> </TD></TR>
                    <TR>
                      <TD style="PADDING-LEFT: 10px" align=right 
                        bgColor=#ffffff>公司名称：</TD>
                      <TD style="PADDING-LEFT: 10px" bgColor=#ffffff><%=rs5("qymc")%> </TD></TR>
                    <TR>
                      <TD style="PADDING-LEFT: 10px" align=right 
                        bgColor=#ffffff>电话：</TD>
                      <TD style="PADDING-LEFT: 10px" bgColor=#ffffff><%=rs5("phone")%> </TD></TR>
                    <TR>
                      <TD style="PADDING-LEFT: 10px" align=right 
                        bgColor=#ffffff>传真：</TD>
                      <TD style="PADDING-LEFT: 10px" bgColor=#ffffff><%=rs5("fax")%> </TD></TR>
                    <TR>
                      <TD style="PADDING-LEFT: 10px" align=right 
                        bgColor=#ffffff>电子邮件：</TD>
                      <TD style="PADDING-LEFT: 10px" 
                        bgColor=#ffffff><%=rs5("email")%> 
                </TD></TR>
 <%
				
 rs5.close
set rs5=nothing
end if
 	%>
				</TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
            <TABLE cellSpacing=0 cellPadding=4 border=0>
              <TBODY>
              <TR>
                
                <TD vAlign=top noWrap><INPUT class=subbutton style="WIDTH: 160px" onclick=javascript:setSubjectText() type=button value=一切完成，我要发布！ name=Post> 
                </TD></TR></TBODY></TABLE></FORM><BR>
				
            <TABLE class=bdr1 cellSpacing=0 cellPadding=0 width="95%" 
              border=0><TBODY>
              <TR>
                <TD height=103>
                  <TABLE class=bdr2 cellSpacing=0 cellPadding=0 width="100%" 
                  border=0>
                    <TBODY>
                    <TR>
                      <TD class=lh13 height=91><SPAN 
                        class=M>重要提醒：</SPAN><BR><BR>
                                1、只要两小时！您发布的信息就能被百万商人看到！（工作日8：00-17：30） <BR>
                                · 节假日发布的信息顺延至工作日上网；<BR>· 
                        信息发布高峰期上网时间稍有延后，敬请谅解！<BR><BR>2、发布信息后，为保证客户及时与您联系，请确保您的联系信息（特别是电话、电子邮箱地址）准确无误。<BR><BR>3、请勿一天内重复提交相同内容的信息，否则将不被审核通过。<BR><BR></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR><BR>

      <BR><BR></TD></TR></TBODY></TABLE><BR>
      <BR></TD></TR>
</TABLE>
<script>

        //category methods
        function Category(id,title) {
                this.id = id;
                this.title=title;
                this.boardlist=new Array();
                this.addBoard=addBoard;
                this.getOptions = getOptions;
        }        
        
        function addBoard(board) {
                this.boardlist = this.boardlist.concat(board);
        }
        
        function getOptions() {
                var tmp = new Array();
                for(var i=0; i < this.boardlist.length;i++) {
                        var b = this.boardlist[i];
                        tmp[i]= b.getOption();
                }
                return tmp;
        }
        
        //board methods
        function Board(catid,id,title,total) {                
                this.catid=catid;
                this.id=id;
                this.title=title;
                this.getOption=getOption;
        }
                
        function getOption() {
                return new Option(this.title,this.id);                
        }
                
        function changeCategory(list) {
        if (list.selectedIndex<=0) {
                catForm.options[0].selected=true;
                var len = boardForm.options.length;
                for (var i=len-1;i>0;i--){
                        boardForm.options[i]=null;
                }                                        
         }
        else {
                var boards = catArr[list.selectedIndex-1].getOptions();
                var len = boardForm.options.length;
                for (var i=len-1;i>0;i--){
                        boardForm.options[i]=null;
                }                
                for (var i=0;i<boards.length;i++) {
                        boardForm.options[i+1]=boards[i];
                }
                }
                boardForm.options[0].selected=true;
        }
                
        function selectBoard(catid,bid,list) {
                var isExist = false; //是否是叶子类目
                for(var i=0;i<catForm.length;i++) {
                        if (catForm.options[i].value==catid) {
                                //alert("get Category");
                                catForm.options[i].selected=true;
                                changeCategory(catForm);
                                break;                        
                        }                        
                }                                
                for(var i=0;i<boardForm.length;i++) {
                        if (boardForm.options[i].value==bid) {
                                //alert("get Board");
                                boardForm.options[i].selected=true;  
                                isExist = true;                              
                                break;
                        }                        
                }   
                
                if (!isExist) {//如果是二级类目，则下拉框只显示该二级类目下所有类目                   
                    var boards = catArr[catForm.selectedIndex-1].getOptions();
                    var len = boardForm.options.length;
                    for (var i=len-1;i>0;i--){
                        boardForm.options[i]=null;
                    }     
                    var locate = 1;           
                    for (var i=0;i<boards.length;i++) {                                                              
                        if(boards[i].text.indexOf(bid) == 0){
                            boardForm.options[locate]=boards[i];
                            locate++;
                        }                                                
                    }
                
                    boardForm.options[0].selected=true;   
                }            
        }        

        //static methods        
        var catArr = new Array();
        var cur;   
		//init catform
        var catForm = document.form.p_z_Z_RootCategory;
        var boardForm = document.form.p_z_Z_CategoryId1;
        
        
        
        function showCategorys() {
            var catId = catForm.value
            if(boardForm.value){
                catId = boardForm.value
            }else if(catForm.value){
                catId = catForm.value
            }
            window.open('<%=HOPE_InstallDir%>tradeinfo/smalllist.asp?sortid='+catId,'newwin','toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=600,height=500')            
        }
        for (var i=0;i<catArr.length;i++) {
                catForm.options[i+1]=new Option(catArr[i].title,catArr[i].id);
        }
  
                      function initRootCategorys(){
	    for (var i=0;i<catArr.length;i++) {
		 catForm.options[i+1]=new Option(catArr[i].title,catArr[i].id);
	    }
	}  
        //init                
</script>
<script src="../../js/allCategorys.js"></script>
<script>
initRootCategorys(); 
</script>
<script>
selectBoard("<%=sid%>","<%=tid%>,<%=tid2%>");
</script>
<%
end if
rs.close
set rs=nothing
 conn.close
 set conn=nothing
%>
