<%@ Page Language="VB" AutoEventWireup="false" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_Member_add" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="inc/admin_style.css" rel="stylesheet" type="text/css" /><link href="inc/style.css" rel="stylesheet" type="text/css" />
<title><%=AppConst.SiteName%></title>
<script language="javascript" type="Text/JavaScript">
//验证用户提交表单
function check(){
	if(document.form.M_Userid.value==""){
		alert("用户名不能为空！");
		document.form.M_Userid.focus();
		return false;
	}
	if(document.form.M_Password.value==""){
		alert("密码不能为空！");
		document.form.M_Password.focus();
		return false;
	}
	if((document.form.M_Password.value).length<6){
		alert("为了安全起见，您输入的密码长度必须大于或等于6位！");
		document.form.M_Password.focus();
		return false;
	}
	
	if(document.form.M_Name.value==""){
		alert("真实姓名不能为空！");
		document.form.M_Name.focus();
		return false;
	}
	if(!checkmail(document.form.M_Email.value)){
		alert("您输入的邮箱不正确！");
		document.form.M_Email.focus();
		return false;
	}
	if(document.form.M_Tel.value=="" || isNaN(document.form.M_Tel.value)){
		alert("国家区号不能为空，且只能为数字！");
		document.form.M_Tel.focus();
		return false;
	}
	if(document.form.M_TelB.value=="" || isNaN(document.form.M_TelB.value)){
		alert("城市区号不能为空，且只能为数字！");
		document.form.M_TelB.focus();
		return false;
	}
	if(document.form.M_TelC.value=="" || ((document.form.M_TelC.value).length<7) || isNaN(document.form.M_TelC.value)){
		alert("电话号码不正确，只能为数字！\n且必须大于７位！");
		document.form.M_TelC.focus();
		return false;
	}
	if(document.form.province.style.display!="none"){
		if(document.form.province.value==""){
			alert("请选择贵公司所在的地区！");
			return false;
		}
	}
	if(document.form.city.style.display!="none"){
		if(document.form.city.value==""){
			alert("请选择贵公司所在的诚市！");
			return false;
		}
	}
	if(document.form.M_Adder.value==""){
		alert("详细地址不能为空！");
		document.form.M_Adder.focus();
		return false;
	}
	
//如果用户选择了加入公司库那就要验证其表单的输入
		if(document.form.C_Name.value==""){
			alert("公司名称不能为空！");
			document.form.C_Name.focus();
			return false;
		}
		if(document.form.C_ProductsBClas.value==""){
			alert("请选择企业类别(大类)！");
			document.form.C_ProductsBClas.focus();
			return false;
		}
		if(document.form.C_ProductsSClas.value==""){
			alert("请选择企业类别(子栏目) 最少一项已上\n可多选！！");
			return false;
		}
		if(document.form.C_PurveyProducts.value==""){
			alert("供应产品不能为空。\n多个产品间用 ','号分开！");
			document.form.C_PurveyProducts.focus();
			return false;
		}
		if(document.form.C_BuyProducts.value==""){
			alert("求购产品不能为空。\n多个产品间用 ','号分开！");
			document.form.C_BuyProducts.focus();
			return false;
		}
		if(document.form.C_Info.value==""){
			alert("公司简介不能为空！");
			document.form.C_Info.focus();
			return false;
		}
	strselect()
}


//邮箱验证函数
function checkmail(email)
{
if (email=="" )
return false;


	invalidChars = " /:"

	if (email == "") {
		return (false);
	}

	for (i=0; i < invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (email.indexOf(badChar,0) != -1) {
			return (false);
		}
	}

	atPos = email.indexOf("@", 1)
	if (atPos == -1) {
		return (false);
	}

	//if (email.indexOf("@", atPos + 1) != -1) {
	//	return (false);
	//}

	periodPos = email.indexOf(".", atPos)
	if (periodPos == -1) {
		return (false);
	}

	if (periodPos + 3 > email.length) {
		return (false);
	}

	return (true);
}


</script>
<script language="JavaScript" type="Text/JavaScript"><!--
function addOption(e1, e2){
    try{
		var len = e2.length;
			if (len<10){
		//var es = e2.options[e2.selectedIndex];
		var e = e1.options[e1.selectedIndex];		
        	e2.options.add(new Option(e.text, e.value));
		}else{
		alert("最多可选择9个类目");
		//break;
		return;
		}
    }
	
		catch(e){}
}

function delOption(e1, e2){
    try{
			e1.options.remove(e1.selectedIndex);
    }   
	catch(e){}
}

function strselect() {
 //var selectedList = gGetElementById('destList');
  for (var i=0;i<document.form.C_ProductsSClas2.length;i++) { document.form.C_ProductsSClas2[i].selected=true; } } //--></script>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FF0000}
.M {FONT: 14px 宋体
}
.style2 {	font-size: 10pt;
	font-weight: bold;
}
.style2 {color: <%=AppConst.Skincolor%>}
.style4 {font-size: 10pt;
	font-weight: bold;
}
.style4 {color: #CC0000}
-->
</style>
</head>

<body>
<table style="height:100%; width:100%"  border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table style="height:22; width:100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="topbg">
        <td style="height:22" align="center" class="topbg"><strong>注 册 会 员</strong></td>
      </tr>
    </table><table style="width:100%"  border="0" align="center" cellpadding="0" cellspacing="0">
	  <form name="form1" method="get" action="Member_manage.aspx">
        <tr>
          <td style="height:27; width:25" align="center"><img src="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/gojump01.gif" width="16" height="16" /></td>
          <td><a href="Member_manage.aspx?usertype=0">未验证会员</a> | <a href="Member_manage.aspx?usertype=3">免费会员</a> | <a href="Member_manage.aspx?usertype=6"><%=AppConst.SiteNamefw%>会员</a> | <a href="Member_manage.aspx?usertype=11">金牌供应商</a> | <a href="Member_add.aspx">添加会员</a> | <a href="Member_send_email.aspx">邮件群发</a> | <a href="Member_jifeng.aspx">充积分点</a></td>
          <td align="right">在<b>免费会员</b>里搜索:</td>
          <td style="width:100"><div align="center">
            <input name="keyword" type="text" id="keyword" style="width:80" />
          </div></td>
          <td style="width:60"><div align="center">
		    <input name="usertype" type="hidden" id="usertype" value="3" />
		    <input type="submit" name="Submit" value="搜 索" style="width:50" />
          </div></td>
        </tr>
		</form>
      </table>
      <table style="width:100%" border="0" cellpadding="4" cellspacing="1" class="aa">
        <form method="POST" onsubmit="return check();" name="form">
          <tr>
            <td style="height:26" colspan="2" class="title0"><span class="style2">帐号信息</span></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>用户名：</td>
            <td style="background-color:#F1F9FF; height:20"><font color="#000000">
              <input name="M_Userid" type="text" id="M_Userid"  size="20" maxlength="20" />
			  <script type="Text/JavaScript">
			  function check_u(us){
			  if (us==""){
			  	alert("用户名不能为空")
				return false;
			}
			  	window.location='Member_add_check.aspx?u='+us
			  }
			  </script>
              <input name="t" type="button" id="t" value="验证" onclick="check_u(document.form.M_Userid.value)" />
            </font></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>密码：</td>
            <td style="background-color:#F1F9FF; height:20"><font color="#000000">
              <input name="M_Password" type="text" id="M_Password"  size="20" maxlength="20" />
            </font></td>
          </tr>
          <tr>
            <td style="height:26" colspan="2" align="left" class="title0"><font color="#BE3511" class="style2"><b> <font color="#CC0000">企业联系方式</font></b></font></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>真实姓名：</td>
            <td style="background-color:#F1F9FF; height:5"><font color="#000000">
              <input name="M_Name" type="text" id="M_Name"  size="10" maxlength="20" />
            </font></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>E-MAIL：</td>
            <td style="background-color:#F1F9FF; height:22"><input name="M_Email" type="text" id="M_Email"  size="30" maxlength="50" /></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>电话号码：</td>
            <td style="background-color:#F1F9FF; height:22"><input name="M_Tel" type="text" id="M_Tel" value="86" size="2" />
              -
              <input name="M_TelB" type="text" id="M_TelB" size="4" maxlength="4" />
              -
              <input name="M_TelC" type="text" id="M_TelC" size="12" maxlength="10" /></td>
          </tr>
	
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>地区：</td>
            <td style="background-color:#F1F9FF; height:22" colspan="2"><span class="M">
              <input type="hidden" name="country" />
              <select style="WIDTH: 90px" onchange="javascript:changeCountry1(this);" name="country1">
              </select>
              <select onchange="javascript:changeCountry2(this);" name="country2" style="display:none">
              </select>
              <select style="WIDTH: 60px" onchange="changeProvince(this);" name="province">
                <option value="" selected="selected">省份</option>
              </select>
              <select name="city">
                <option value="" selected="selected">地级</option>
              </select>
              <script language="JavaScript" src="../Include/SelectAdder.js" type="Text/JavaScript"></script>
           </span></td>
          </tr>
		
          <tr>
            <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>详细地址：</td>
            <td style="background-color:#F1F9FF; height:22"><span class="S" id="PreAddress" name="PreAddress"></span>
                <input name="M_Adder" type="text" id="M_Adder"  size="30" maxlength="20" /></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right">邮政编码：</td>
            <td style="background-color:#F1F9FF; height:27"><input name="M_Zipcode" type="text" id="M_Zipcode" onkeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;"   size="12" maxlength="10"></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right">传真号码：</td>
            <td style="background-color:#F1F9FF; height:28"><input name="M_Fax" type="text" id="M_Fax" value="86" size="2" />
-
<input name="M_FaxB" type="text" id="M_FaxB" size="4" maxlength="4" />
-
<input name="M_FaxC" type="text" id="M_FaxC" size="12" maxlength="10" /></td>
          </tr>
          <tr>
            <td style="background-color:#B7E2FF" align="right">手机：</td>
            <td style="background-color:#F1F9FF; height:29"><input name="M_Combined" type="text" id="M_Combined" onkeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;"   size="15" maxlength="50"></td>
          </tr>
          <div id='CompanyInfo'>
            <tr>
              <td colspan="2" class="title0"><table style="height:18; width:100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td style="height:18; width:28%" class="style4"><font color="#BE3511"><b><font color="#CC0000">企业公司信息</font></b></td>
                  <td style="width:72%"><span class="text"></span></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>公司名称：</td>
              <td style="background-color:#F1F9FF; height:28"><input name="C_Name" type="text" id="C_Name"   size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>公司性质：</td>
              <td style="background-color:#F1F9FF; height:22"><select name="C_Cy" id="C_Cy" >
                  <option label="私营企业" value="私营企业">私营企业</option>
                  <option label="国营企业" value="国营企业">国营企业</option>
                  <option label="民营企业" value="民营企业">民营企业</option>
                  <option label="外商独资" value="外商独资">外商独资</option>
                  <option label="三资企业" value="三资企业">三资企业</option>
                  <option label="其他" value="其他">其他</option>
                </select>              </td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>企业类别(大类)：</td>
              <td style="background-color:#F1F9FF; height:22"><script language="javascript" type="Text/JavaScript">
//大类与子栏目相关联
function selectc(bvalue,svalue){ 
	if(svalue!=""){
			bvalue.options.length=0;
			for(j=0;j<selectclass.length;j++){
				if(selectclass[j][0]==svalue){
					bvalue.options[bvalue.options.length] = new Option(selectclass[j][1], selectclass[j][2]);	
				}
			}
	}else{
			bvalue.options.length=0;
	}
}
            </script>
                <select name="C_ProductsBClas" id="C_ProductsBClas" onchange="selectc(this.form.C_ProductsSClas,this.value)"><option value="" selected="selected">-----------点击选择大类-----------</option><%=GetBigClassOptions()%></select></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>企业类别(子栏目)：</td>
              <td style="background-color:#F1F9FF; height:128" valign="top">
                <script language="javascript" type="Text/JavaScript">
                //大类JS
                    var selectclass= new Array();
                    <%=GetSmallClassArray("selectclass", True)%>
                </script>
                                              <select name="C_ProductsSClas" size="4" id="C_ProductsSClas" style="width:255px;height:120px">
											  <option value="" selected="selected">------请选择您合适的行业子栏目------</option>
                                   			</select></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">&nbsp;</td>
              <td style="background-color:#F1F9FF; height:22"><input type="button" name="Submit" value="添加" onclick="addOption(this.form.C_ProductsSClas, this.form.C_ProductsSClas2)" />
              <input type="button" name="Submit2" value="删除" onclick="delOption(this.form.C_ProductsSClas2, this.form.C_ProductsSClas)" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">&nbsp;</td>
              <td style="background-color:#F1F9FF; height:22">
			   <select name="C_ProductsSClas2"  multiple="multiple" id="destList" style="width:255px;height:100px">
              </select></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font><span class="td_left">经营模式<font color="#FF0000"></font></span>：</td>
              <td style="background-color:#F1F9FF; height:22"><select name="C_Mode" id="C_Mode">
                  <option label="生产型" value="生产型">生产型</option>
                  <option label="贸易型" value="贸易型">贸易型</option>
                  <option label="服务型" value="服务型">服务型</option>
                </select>              </td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>供应产品：</td>
              <td style="background-color:#F1F9FF; height:10"><input name="C_PurveyProducts" type="text" id="C_PurveyProducts"   size="30" maxlength="50" />              </td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>求购产品：</td>
              <td style="background-color:#F1F9FF; height:10"><input name="C_BuyProducts" type="text" id="C_BuyProducts"   size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">雇员人数：</td>
              <td style="background-color:#F1F9FF; height:22">
			  <select name="C_PeopleCount" id="C_PeopleCount">
                  <option label="20人以下" value="20人以下">20人以下</option>
                  <option label="20-100人" value="20-100人">20-100人</option>
                  <option label="100-500人" value="100-500人">100-500人</option>
                  <option label="500-1000人" value="500-1000人">500-1000人</option>
                  <option label="1000人以上" value="1000人以上">1000人以上</option>
                </select>              </td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">年营业额：</td>
              <td style="background-color:#F1F9FF; height:22">
			  <select name="C_Turnover" id="C_Turnover">
                  <option label="50万以下" value="50万以下">50万以下</option>
                  <option label="50万-500万" value="50万-500万">50万-500万</option>
                  <option label="500万-3000万" value="500万-3000万">500万-3000万</option>
                  <option label="3000万以上" value="3000万以上">3000万以上</option>
                </select>              </td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">法人代表：</td>
              <td style="background-color:#F1F9FF; height:22"><input name="C_CEO" type="text" id="C_CEO"  size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">成立日期：</td>
              <td style="background-color:#F1F9FF; height:31"><input name="C_CreateTime" type="text" id="C_CreateTime" size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">营业执照：</td>
              <td style="background-color:#F1F9FF; height:31"><input name="C_Certificate" type="text" id="C_Certificate"  size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">注册资金：</td>
              <td style="background-color:#F1F9FF; height:1"><input name="C_RegFund" type="text" id="C_RegFund"  size="30" maxlength="50" /></td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right">公司网址：</td>
              <td style="background-color:#F1F9FF; height:4"><input name="C_Url" type="text" id="C_Url" value="http://"  size="30" maxlength="50" />
              必需带&quot;http://&quot;</td>
            </tr>
            <tr>
              <td style="background-color:#B7E2FF" align="right"><font color="#FF0000">*</font>公司简介：</td>
              <td style="background-color:#F1F9FF; height:11"><textarea name="C_Info" cols="40" rows="6" id="C_Info" ></textarea></td>
            </tr>
          </div>
		              
		              <tr>
		                <td style="background-color:#B7E2FF" align="right">OEM：</td>
		                <td style="background-color:#F1F9FF; height:1"><input type="radio" name="C_oem" value="是" checked="checked" />
是
  <input name="C_oem" type="radio" value="否" />
否
<input name="send" type="hidden" id="send" value="isok" /></td>
          </tr>
     <tr style="background-color:#F1F9FF">
            <td style="height:47" colspan="2" align="center">
             
              <input type="submit" name="Submit3" value="添 加" onclick="return check()" /> 
            <input type="reset" name="Submit22" value="重 置" />            </td>
          </tr>
        </form>
    </table></td>
  </tr>
</table>
</body>
</html>
