<!--#include file="../head.asp"-->
 <!--#include file="../checkrole.asp"-->
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
      call checkuser("xz")


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

sql="select * from Websen_corporation where id="&id&""
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof then 
response.Redirect("../index.asp")
response.end
else
sid=rs("sortid")
tid=rs("typeid")
tid2=rs("typeid_2")
zycp=rs("zycp")
pharry=split(rs("phone"),"&nbsp;")
faarry=split(rs("fax"),"&nbsp;")
%>

<SCRIPT language=javascript> 
<!-- Hide 
function killErrors() { 
return true; 
} 
window.onerror = killErrors; 
 // --> 
</SCRIPT> 

<script Language="JavaScript"> 
function FormCheck() 
{ 

if (trim(document.form.name.value) =="") 
{ 
alert("请输入您的真实姓名！"); 
document.form.name.focus(); 
return (false); 
} 

if (trim(document.form.email.value) =="")
{
alert("请输入您的电子邮件地址！");
document.form.email.focus();
document.form.email.select();
return false;
}
var str1 = document.form.email.value
if(str1.indexOf("@") == -1 || str1.indexOf(".") == -1){ 
alert("E-mail格式不正确,请重新填写！"); 
document.form.email.focus();
document.form.email.select();
return false; 
} 
if (trim(document.form.phonecountry.value) =="") 
{ 
alert("请输入联系电话的国家区号！"); 
document.form.phonecountry.focus(); 
return (false); 
} 
var filter=/^\s*[0-9]{0,3}\s*$/;
if (!filter.test(document.form.phonecountry.value)) { 
alert("国家区号不正确,请重新填写！不超过3个数字，注意不要使用空格。"); 
document.form.phonecountry.focus();
document.form.phonecountry.select();
return false; 
} 
if (trim(document.form.phonearea.value) =="") 
{ 
alert("请输入联系电话的城市区号！"); 
document.form.phonearea.focus(); 
return (false); 
} 
var filter=/^\s*[0-9]{0,4}\s*$/;
if (!filter.test(document.form.phonearea.value)) { 
alert("城市区号不正确,请重新填写！不超过4个数字，注意不要使用空格。"); 
document.form.phonearea.focus();
document.form.phonearea.select();
return false; 
} 
if (trim(document.form.phonenumber.value) =="") 
{ 
alert("请输入您的联系电话号码！"); 
document.form.phonenumber.focus(); 
return (false); 
}
if (trim(document.form.country1.value) =="中国") 
{ 
if (trim(document.form.province.value) =="")
{
alert("请选择省份！"); 
document.form.province.focus(); 
return (false); 
}
if (trim(document.form.city.value) =="")
{
alert("请选择地级城市！"); 
document.form.city.focus(); 
return (false); 
}
} 
if (trim(document.form.address.value) =="") 
{ 
alert("请输入您的联系地址！"); 
document.form.address.focus(); 
return (false); 
} 
if (trim(document.form.qymc.value) =="") 
{ 
alert("请输入您公司的名称！"); 
document.form.qymc.focus(); 
return (false); 
} 
if (trim(document.form.zw.value) =="") 
{ 
alert("请输入您的职位！"); 
document.form.zw.focus(); 
return (false); 
} 
if(trim(document.form.productionService.value) == "") 
{
alert("主要相关产品名/服务名最少要填一个\n\n并且按左至右的顺序填写");
document.form.productionService.focus();
return (false);
}  

if(trim(document.form.p_z_Z_RootCategory.value) =="0") 
{
alert("请选择主营行业!");
document.form.p_z_Z_RootCategory.focus();
return (false);
}  


   var productionService = form.productionService.value;
   for(i=0;i<productionService.length;i++){productionService=productionService.replace(',','，');}
    if(form.productionService2.value){
        for(i=0;i<form.productionService2.value.length;i++){form.productionService2.value=form.productionService2.value.replace(',','，');}
        productionService+=','+form.productionService2.value;
    }
    if(form.productionService3.value){
        for(i=0;i<form.productionService3.value.length;i++){form.productionService3.value=form.productionService3.value.replace(',','，');}
        productionService+=','+form.productionService3.value;
    }    
    form.p_z_Z_productionService.value = productionService
 
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>

<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="19%"><IMG height=32 src="../images/modifymemberinfo.gif" width=149 
border=0></TD>
<TD width="81%" 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><FORM name="form" action="modify_save.asp" method="post">

<TABLE cellSpacing=0 cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD align=right bgcolor="#EFF7FF">为提高发布效率，获得更多贸易机会，请用汉字如实填写以下表格。 （打<FONT 
  color=#ff0000>*</FONT>为必填项）</TD>
</TR></TBODY></TABLE>


<TABLE   width="100%">
<TBODY>
<TR>
<TD height="30"><font color="red">◆</font><strong>姓名和联系方式</strong></TD>
</TR></TBODY></TABLE>
<TABLE cellSpacing=1 cellPadding=1 width="100%" border=0>
<COLGROUP>
<COL 
style="VERTICAL-ALIGN: top; PADDING-TOP: 6px; TEXT-ALIGN: right"></COLGROUP>
<TBODY>
<TR>
<TD  width="22%" bgColor=#eff7ff><B>真实姓名：</B></TD>
<TD width="78%" bgColor=#ffffde><FONT color=#ff0000 
    >*</FONT> <INPUT maxLength=10 size=12 value="<%=rs("name")%>"  name="name"> &nbsp;&nbsp;&nbsp;<INPUT type=radio <%if rs("ch") ="先生" then Response.Write "checked"%> value="先生" 
  name="ch"> <FONT class=f2>先生&nbsp; <INPUT type=radio <%if rs("ch") ="女士" then Response.Write "checked"%> 
  value="女士" name="ch"> 女士 </FONT><BR>&nbsp;&nbsp;&nbsp;<FONT class=f2 
  color=#ff5500>姓名必须是1-10个字</FONT> </TD>
</TR>
<TR>
<TD   width="22%" height="25" bgColor=#eff7ff><FONT 
  color=#ff0000><B>电子邮箱</B>：</FONT></TD>
<TD bgColor=#ffffde><FONT color=#ff0000  >*</FONT> <INPUT 
  maxLength=50 size=30 value="<%=rs("email")%>" 
  name="email">  &nbsp;&nbsp;<FONT 
  class=note>这是客户与您联系的首选方式，请填最常用的。</FONT><BR></TD>
</TR>
  <tr>
<td   bgcolor=EFF7FF> <FONT color=#ff0000><b>即时通讯TM号：</b></FONT></td>
						<td width="78%" bgcolor=#ffffde class="lh15"><font class=s>&nbsp;&nbsp;</font>
<input name="tm" id="tm" value="<%=rs("tm")%>" size=30 maxlength="28" onKeyUp="value=value.replace(/[^\d]/g,'') ">
<input name=regtm  onclick="javascript:win=window.open('http://freereg.qq.com/step1.shtml');win.focus();" type=button value="注册TM帐号" class="m"><br>
  <font class=s>&nbsp;&nbsp;&nbsp;&nbsp;</font><FONT class=S color=#cc3300>建议使用！</font><FONT class=S color=#9a9a9a>这是客户直接与您即时沟通的重要工具。</FONT><br>
<font class=s>&nbsp;&nbsp;&nbsp;&nbsp;</font><span class="s">既填写您的QQ号码 ！</span>
</td>
</tr>

<TR>
<TD   bgColor=#eff7ff><FONT 
  color=#ff0000><B>公司电话</B>：</FONT></TD>
<TD bgColor=#ffffde>
  <TABLE cellSpacing=0 cellPadding=0 border=0>
	<TBODY>
	<TR>
	  <TD>
	  <TD><FONT color=#ff0000  >*</FONT>&nbsp;</TD>
	  <TD>
		<TABLE cellSpacing=2 cellPadding=0 width="60%" 
		  border=0><TBODY>
		  <TR>
			<TD><FONT class=f2>国家区号：</FONT></TD>
			<TD><FONT class=f2>城市区号：</FONT></TD>
			<TD colSpan=2><FONT class=f2>号码：</FONT></TD></TR>
		  <TR>
			<TD><INPUT class=f2 maxLength=8 size=8 value="<%=pharry(0)%>" 
			  name="phonecountry"></TD>
			<TD><INPUT class=f2 maxLength=8 size=8 value="<%=pharry(1)%>" 
			  name="phonearea"></TD>
			<TD><INPUT class=f2 maxLength=30 size=13 
			  value="<%=pharry(2)%>" 
		name="phonenumber"></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD height="25"  bgColor=#eff7ff><B>传真：</B></TD>
<TD bgColor=#ffffde>
  <TABLE cellSpacing=0 cellPadding=0 border=0>
	<TBODY>
	<TR>
	  <TD>
	  <TD>&nbsp;&nbsp;</TD>
	  <TD>
		<TABLE cellSpacing=2 cellPadding=0 border=0>
		  <TBODY>
		  <TR>
			<TD>国家区号：</TD>
			<TD>城市区号：</TD>
			<TD>号码：</TD></TR>
		  <TR>
						<%select case ubound(faarry)
case 0
response.write"<TD><INPUT class=f2 maxLength=8 size=8 value='"&rs("fax")&"' name=faxCountry></TD><TD><INPUT class=f2 maxLength=8 size=8 name=faxArea></TD><TD><INPUT class=f2 maxLength=30 size=13 name=faxNumber></TD>"
case 1
response.write"<TD><INPUT class=f2 maxLength=8 size=8 value='"&faarry(0)&"' name=faxCountry></TD><TD><INPUT class=f2 maxLength=8 size=8 value='"&faarry(1)&"' name=faxArea></TD><TD><INPUT class=f2 maxLength=30 size=13 name=faxNumber></TD>"
case 2
response.write"<TD><INPUT class=f2 maxLength=8 size=8 value='"&faarry(0)&"' name=faxCountry></TD><TD><INPUT class=f2 maxLength=8 size=8 value='"&faarry(1)&"' name=faxArea></TD><TD><INPUT class=f2 maxLength=30 size=13 value='"&faarry(2)&"' name=faxNumber></TD>"
end select%>
						
						
			</TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD height="25"   bgColor=#eff7ff><B>手机：</B></TD>
<TD bgColor=#ffffde>&nbsp;&nbsp;<INPUT maxLength=15 size=30 value="<%=rs("mobile")%>" 
name="mobile"></TD></TR>
<TR>
<TD height="25"   bgColor=#eff7ff><B>邮政编码：</B></TD>
<TD bgColor=#ffffde>&nbsp;&nbsp;<INPUT maxLength=10 size=10 value="<%=rs("post")%>" 
name="post"></TD></TR> 

<TR>
<TD height="25" bgColor=#eff7ff><B><FONT        color=#ff0000>所在地区：</FONT></B> </TD>
<TD bgColor=#ffffde colSpan=2>
  <TABLE id=div1 cellSpacing=0 cellPadding=3 width="100%"              border=0>
	<TBODY>
	<TR>
	  <TD><FONT color=#ff0000   >*</FONT>
<SELECT style="WIDTH: 90px"        onchange=javascript:changeCountry1(this); name=country1>
	</SELECT> <SELECT style="WIDTH: 60px"         onchange=changeProvince(this); name=province>
	  <OPTION value=""             selected>省份</OPTION>
	</SELECT> <SELECT name=city>
	  <OPTION value=""           selected>地级</OPTION>
	</SELECT>
<SCRIPT language=javascript src="../../js/area1.js"     purpose="INITIALIZER"></SCRIPT>
<SCRIPT language=javascript>
<!--
//设置国家1的缺省值
for (var i=0;i<5;i++){
if (country1form.options[i].value == '<%=rs("country")%>'){
country1form.options[i].selected=true;
}
}

for (var i=0;i<catArr1.length;i++) {
catform.options[i+1]=new Option(catArr1[i].title,catArr1[i].id);
//设置省选择框的选择值
if(catform.options[i+1].value == '<%=rs("sf")%>'){
catform.options[i+1].selected=true;
}
}
changeProvince(catform);
var len = boardform.options.length;
for (var i=0;i<len;i++) {
//设置城市选择框的选择值
if(boardform.options[i].value == '<%=rs("city")%>') {
boardform.options[i].selected=true;
}
}

if (country1form.options[country1form.selectedIndex].value!='中国') {
catform.style.display = 'none';
boardform.style.display = 'none';
}

-->
</SCRIPT>	</TD>
	</TR></TBODY></TABLE>
  <TR>
<TD  bgColor=#eff7ff><B>街道地址：</B></TD>
<TD bgColor=#ffffde colSpan=2>
  <TABLE width="100%" border=0>
	<TBODY>
	<TR>
	  <TD width=10><FONT color=#ff0000   >*</FONT></TD>
	  <TD><SPAN id=PreAddress></SPAN><BR>
				  <INPUT 
		title=请补充后面的详细街道地址 maxLength=100 size=30 value="<%=rs("address")%>" 
		name="address">&nbsp;<FONT class=note>请补充县（区）、街道、门牌号</FONT></TD></TR>
	 </TBODY></TABLE></TD></TR>
</TABLE>
  <TABLE   width="100%">
<TBODY>
<TR>
<TD height="30"><font color="red">◆</font><strong>公司名称和主营业务</strong> </TD>
</TR></TBODY></TABLE>
<TABLE cellSpacing=2 cellPadding=3 width="100%" border=0>
<COLGROUP>
<COL class=formtop></COLGROUP>
<TBODY>
<TR>
<TD  width="21%" height="25" bgColor=#eff7ff><B>公司名称：</B></TD>
<TD width="79%" bgColor=#ffffde><FONT color=#ff0000   >*</FONT> <INPUT 
  maxLength=50 size=30 value="<%=rs("qymc")%>" name="qymc"> &nbsp;<FONT class=note>请提供在工商管理局注册的公司全称</FONT></TD>
</TR>
<TR>
<TD height="25"  bgColor=#eff7ff><B>我的职位：</B></TD>
<TD bgColor=#ffffde colSpan=2><FONT color=#ff0000 
    >*</FONT> <INPUT maxLength=16 size=30 value="<%=rs("zw")%>" 
  name="zw"></TD>
</TR>
<TR>
<TD height="25"   bgColor=#eff7ff> 
  <B>主营产品/服务：</B></TD>
<TD bgColor=#ffffde>
<FONT color=#ff0000>*</FONT> 
		  <%
if zycp<>"" then
  if instr(zycp,",")>0 then
		zcarry=split(rs("zycp"),",")
		if ubound(zcarry)=1 then
		   response.write"<INPUT maxLength=20 size=10 value='"&zcarry(0)&"' name=productionService>, <INPUT maxLength=20 size=10 value='"&zcarry(1)&"' name=productionService2>, <INPUT maxLength=20 size=10 name=productionService3>"
		   elseif ubound(zcarry)=2 then
		   response.write"<INPUT maxLength=20 size=10 value='"&zcarry(0)&"' name=productionService>, <INPUT maxLength=20 size=10 value='"&zcarry(1)&"' name=productionService2>, <INPUT maxLength=20 size=10 value='"&zcarry(2)&"' name=productionService3>"
		   elseif ubound(zcarry)>2 then
		   response.write"<INPUT maxLength=20 size=10 value='"&zcarry(0)&"' name=productionService>, <INPUT maxLength=20 size=10 value='"&zcarry(1)&"' name=productionService2>, <INPUT maxLength=20 size=10 value='"&zcarry(2)&"' name=productionService3>"
		 end if
  else
  response.write"<INPUT maxLength=20 size=10 value='"&zycp&"' name=productionService>, <INPUT maxLength=20 size=10 name=productionService2>, <INPUT maxLength=20 size=10 name=productionService3>"
  end if
else
response.write"<INPUT maxLength=20 size=10 name=productionService>, <INPUT maxLength=20 size=10 name=productionService2>, <INPUT maxLength=20 size=10 name=productionService3>"
end if%>
<INPUT type=hidden 
  name=p_z_Z_productionService> &nbsp;<SPAN class=note>3个主要相关产品名/服务名，最少要填一个</SPAN></TD>
	  </TR>
	  
	  
	  <tr   bgcolor="#FFFFFF" onMouseOut="this.style.backgroundColor='#ffffff'" onMouseOver="this.style.backgroundColor='#D7E3F3'">
<td align="left" bgcolor="#EFF7FF"><b>经营模式：</b></td>
<td colspan="2" bgcolor="#FFFFDE">
&nbsp;&nbsp;
<INPUT type=checkbox value="生产型" <%if instr(rs("qylb"),"生产型")>0 then Response.Write "checked"%> name=qylb>生产型 
				<INPUT type=checkbox value="贸易型" <%if  instr(rs("qylb"),"贸易型")>0   then Response.Write "checked"%> name=qylb>贸易型
				 <INPUT type=checkbox value="服务型" <%if  instr(rs("qylb"),"服务型")>0  then Response.Write "checked"%> name=qylb>服务型
				  <INPUT  type=checkbox value="政府或其他机构" <%if instr(rs("qylb"),"政府或其他机构")>0  then Response.Write "checked"%> name=qylb>政府或其他机构 
</td>
</tr> 
<TR>
<TD height="25" bgColor=#eff7ff><B>主营行业：</B></TD>
<TD bgColor=#ffffde><FONT color=#ff0000   >*</FONT>


<select name="p_z_Z_RootCategory" onChange="changeCategory(this)"  >
				  <option selected value="0">--请选择行业大类--</option>
		  </select> <select name="p_z_Z_CategoryId1" maxlength="80">
				  <option value="0" selected>--该行业无子类--</option>
				</select></TD>
</TR>
<TR>
<TD height="25"   bgColor=#eff7ff><B>网页地址： </B></TD>
<TD bgColor=#ffffde>&nbsp;&nbsp;<INPUT maxLength=50 size=30 value="<%=rs("web")%>"
  name="web">   &nbsp;&nbsp;<FONT class=note 
  color=#595959>如果没有，可以不填</FONT></TD></TR></TBODY></TABLE>
  <TABLE cellSpacing=6 cellPadding=3 width="100%" bgColor=#f9f9f9 
border=0>
<TBODY>
<TR>
<TD class=note><div align="center"   style=" display:none">
  <INPUT type=checkbox <%if rs("isournotify")=true then response.write"CHECKED"%> value="<%=rs("isournotify")%>"
  name="isournotify">
  <FONT   class=f2>我愿意收到<%=webname%>新产品/服务的通知信 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><BR>
  <INPUT type=checkbox 
  <%if rs("isothernotify")=true then response.write"CHECKED"%> value="<%=rs("isothernotify")%>" name="isothernotify">
  <FONT  class=f2>我愿意收到我感兴趣的其他公司新产品/服务的通知信</FONT> 
</div></TD></TR></TBODY></TABLE>
<BR> 

<BR>
<TABLE cellSpacing=0 cellPadding=4 border=0>
<TBODY>
<TR>

<TD vAlign=top noWrap><INPUT class=subbutton style="WIDTH: 160px" onClick="FormCheck()" type=button value=" 填好了，提交！ " name=Post> 
</TD></TR></TBODY></TABLE>
<BR>
</FORM></TD></TR>
</TABLE></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('/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
%>

