<%@ Page language="c#" Codebehind="WQREG.aspx.cs" AutoEventWireup="false" Inherits="wqeshop.Admin.WQREG" validateRequest=false%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>WQREG</title>
		<LINK href="inc/style.css" type="text/css" rel="stylesheet">
		<style> #table {width:95%;height:100%;text-align:center;float:left;font-size:12px;FONT-FAMILY: tahoma;}
	#body {float:left;clear:both;width:100%;height:auto;}
	.content {float:left;clear:both;width:100%;height:35px;}
	.names {float:left;clear:left;width:100px;height:19px;text-align:right;font-size:12px;padding-top:5px;}
	.inputs {float:left;clear:none;width:380px;height:24px;margin-top:2px;text-align:left;font-size:12px;}
	.info{float:right;clear:right;width:300px;height:28px;text-align:left;font-size:12px;padding-top:5px;padding-right:12px;color:#9C9A9C;}
	#button {float:left;clear:both;height:30px;width:95%;text-align:center;margin-top:6px;}
	#show {float:left;clear:left;width:130px;height:24px;text-align:center;margin-top:10px;font-size:12px;}
	#botton1 {float:right;clear:right;height:30px;text-align:left;width:420px;margin-top:6px;}
	#goup{float:left;clear:both;width:100%;height:auto;}
	a:link{text-decoration : none ;color : #000000;}
	a:visited {text-decoration : none ;color : #000000 ;}
	a:hover {text-decoration : underline ;color : #f60 ;}
	a:active {text-decoration : none ;color : #F90 ;}
	.reg_input1 { height:18px; width:250px; line-height:18px; border:1px solid #000;}
	.color1{ color:#ea3700;}
		</style>
		<script>
  String.prototype.IsEmail = function(){
    var myReg = /[\u4e00-\u9fa5]/;
    if(!myReg.test(this)){
      myReg = /^[_a-zA-Z0-9][-._a-zA-Z0-9]*@[-._a-zA-Z0-9]+\.[-._a-zA-Z0-9]+(\.[-._a-zA-Z])*$/;
      if (myReg.test(this)) return true;
    }else{
      myReg = /^[_a-zA-Z0-9\u4e00-\u9fa5][-_.a-zA-Z0-9\u4e00-\u9fa5]*@[-._a-zA-Z0-9\u4e00-\u9fa5]+(\.[-._0-9a-zA-Z\u4e00-\u9fa5]+)*$/;
      if (myReg.test(this)) return true;
    }
    return false;
  }
  String.prototype.IsDomain = function(){
      var myReg = /^[0-9a-zA-Z\-]+$/;
      if(myReg.test(this)) return true;
      return false;
  }
  String.prototype.IsNumber = function(){
    var myReg = /^[0-9]+$/;
    if(!myReg.test(this)) return false;
    ActRd=parseInt(this)	
    return true;
  }
  String.prototype.Trim = function(){
    var tmp = this.replace(/(^\s*)|(\s*$)/g, "");
    return tmp.replace(/(^\2005-9-28*)|(\　*$)/g,"");
  }

	function checkform(form1){
		if (form1.domain_name.value.Trim() == ""){
			form1.domain_name.focus();
			showmsg("企业代码不能为空!");
			return false;
		}
		if (form1.domain_name.value.IsNumber()){
			form1.domain_name.focus();
			form1.domain_name.select();
			showmsg("企业代码不能全为数字！");
			return false;
		}
		if (!form1.domain_name.value.IsDomain()){
			form1.domain_name.focus();
			form1.domain_name.select();
			showmsg("只能是字母,数字和下划线(_)!");
			return false;
		}
		if(document.getElementById("passwd").value.Trim() == ""){
			showmsg("请填写您的密码！") ;
			document.getElementById("passwd").focus();
			return false ;
		}
		if(document.getElementById("passwd").value.Trim() != document.getElementById("repasswd").value.Trim()){
			showmsg("两次输入的密码不一致！") ;
			document.getElementById("repasswd").focus();
			return false ;
		}
		document.getElementById("passwd").value = document.getElementById("passwd").value.Trim();
		document.getElementById("repasswd").value = document.getElementById("repasswd").value.Trim();
		if (form1.mail.value.Trim() == ""){
			form1.mail.focus();
			showmsg("为了方便我们与您联系,请填写真实email地址!");
			return false;
		}
		if (!form1.mail.value.Trim().IsEmail()){
			form1.mail.focus();
			form1.mail.select();
			showmsg("为了方便我们与您联系,请填写真实email地址!");
			return false;
		}
		return true;
	}

function mycheck(val){
	if (form1.domain_name.value.Trim() == ""){
		domain_name_ok = false;
		form1.domain_name.focus();
		alert("域名不能为空!");
		return false;
	}
	if (!form1.domain_name.value.IsDomain()){
		domain_name_ok = false;
		form1.domain_name.focus();
		form1.domain_name.select();
		alert("只能是字母,数字和中划线(-)!");
		return false;
	}
	if (form1.domain_name.value.IsNumber()){
		form1.domain_name.focus();
		form1.domain_name.select();
		alert("企业代码不能全为数字！");
		return false;
	}
	if (form1.domain_name.value.length < 4 || form1.domain_name.value.length > 30){
		domain_name_ok = false;
		form1.domain_name.focus();
		form1.domain_name.select();
		alert("域名要求至少4位长度！");
		return false;
	}
	return true;
}
function showmsg(str){
  alert(str);
}
		</script>
	</HEAD>
	<body>
		<FORM id="from1" name="form1" onsubmit="return checkform(this);" action="http://ekt.wangqi.com/do_company_reg.php" method="post">
<table width="100%" height="550" style="border:1px #619ADF solid; border-left:0;margin-top:6px; margin-right:7px;background:#F2F7FD;" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top">
<div class="top">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="tl"></td>
		<td class="tm"><span class="tt">注册在线客服 &gt;&gt; <asp:Label id="lblAction" runat="server"></asp:Label></span></td>
		<td class="tm2"><span class="tt"><a href="http://www.wangqi.com" target="_blank"><img src="Images/admin_help.gif" border="0" alt="帮助"></a></span></td>
		<td class="tr"></td>
	</tr>
</table>
</div>
<div class="mframe">
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="tl"></td>
		<td class="tm"><div class="tt">&nbsp; 注册在线客服</div></td>
		<td class="tr"></td>
	</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
      <td class="ml"></td>
    <td  class="mm" align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="#EBF3FE" valign="top" style=" border-right:1px #77ABE5 solid;">
<table width="90%"  cellspacing="0" cellpadding="0">
	<tr>
		<td class="ml1"></td>
		<td class="mm1">
			<DIV align="center">
								<DIV id="table">
									<DIV id="body">
										<DIV class="content">
											<DIV class="names"><SPAN class="color1"><FONT color="#ea3700">*</FONT></SPAN>&nbsp;企业代码：</DIV>
											<DIV class="inputs"><INPUT class="reg_input1" id="domain_name" onpropertychange="domain_name_ok = false;" type="text"
													maxLength="30" size="22" name="domain_name"> &nbsp; <INPUT style="CURSOR: pointer" onclick="if (mycheck(this.value)) {window.open('http://ekt.wangqi.com/chk_arg.php?domain_name='+document.getElementById('domain_name').value,'','status=0,directories=0,resizable=0,toolbar=0,location=0,scrollbars=0,width=322,height=180');}"
													type="button" value="域名检测" name="checkdomainname">&nbsp;
											</DIV>
										</DIV>
										<DIV class="content" style="COLOR: #666666; HEIGHT: 20px">
											<DIV class="names"></DIV>
											<DIV class="inputs">字母(a-zA-Z)、数字(0-9)、中划线(-)组成,且不能都为数字
											</DIV>
										</DIV>
										<DIV class="content">
											<DIV class="names"><SPAN class="color1"><FONT color="#ea3700">*</FONT></SPAN>&nbsp;密码：</DIV>
											<DIV class="inputs"><INPUT class="reg_input1" id="passwd" type="password" maxLength="16" size="35" name="passwd">&nbsp;</DIV>
										</DIV>
										<DIV class="content">
											<DIV class="names"><SPAN class="color1"><FONT color="#ea3700">*</FONT></SPAN>&nbsp;确认密码：</DIV>
											<DIV class="inputs"><INPUT class="reg_input1" id="repasswd" type="password" maxLength="16" size="35" name="repasswd">&nbsp;</DIV>
										</DIV>
										<DIV class="content">
											<DIV class="names"><SPAN class="color1"><FONT color="#ea3700">*</FONT></SPAN>&nbsp;E-mail：</DIV>
											<DIV class="inputs"><INPUT class="reg_input1" id="mail" type="text" size="35" name="mail">&nbsp;</DIV>
										</DIV>
										<DIV class="content">
											<DIV class="names"><SPAN class="color1"><FONT color="#ea3700">*</FONT></SPAN>&nbsp;单位网址：</DIV>
											<DIV class="inputs"><INPUT class="reg_input1" id="url1" type="text" maxLength="255" size="35" value="http://"
													name="url1">&nbsp;</DIV>
										</DIV>
										<DIV class="content">
											<DIV class="names"></DIV>
											<DIV class="inputs"><INPUT type="submit" value="提交注册信息" name="Submit"> <INPUT type="hidden" value="cn_01" name="version"><!--注册接口版本号，请勿修改-->
												<INPUT type="hidden" value="xinpu" name="proxy"><!--代理商的管理帐号--> <INPUT type="hidden" value="utf-8" name="charset"><!--本页面页面编码-->
											</DIV>
										</DIV>
										<DIV class="content">
										<DIV class="names"></DIV>
											<DIV class="inputs"><FONT color="red">*注册后请将js代码粘贴到"管理"</FONT></DIV>											
										</DIV>
									</DIV>
								</DIV>
							</DIV>
		</td>
		<td class="mr1"></td>
	</tr>
</table>
</td>
  </tr>
</table>


<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>
</td>
    <td  class="mr"></td>
  </tr>
</table>
<table width="100%" align="center" cellspacing="0" cellpadding="0">
	<tr>
		<td class="bl"></td>
		<td class="bm">&nbsp;</td>
		<td class="br"></td>
	</tr>
</table>

</div>
    </td>
  </tr>
</table>
		</form>
	</body>
</HTML>

