<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Kft_Kft_Register, V5Shop.Shop.Config" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>客服通注册</title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript">
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()
{
		if (document.getElementById("hav_read").checked!=true)
		{
		  alert("请先阅读并统一服务条款！");
			document.getElementById("hav_read").focus();
			return false;
		}
		if (form1.domain_name.value.Trim() == ""){
			form1.domain_name.focus();
			showmsg("企业代码不能为空!");
			return false;
		}
		if(form1.domain_name.value.length<4 || form1.domain_name.value.length>30)
		{
		  showmsg("企业代码长度要大于4位，小于30位！");
			form1.domain_name.focus();
			form1.domain_name.select();
			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;
		}
		
		if (form1.companyname.value.Trim() == ""){
			form1.companyname.focus();
			showmsg("单位全名不能为空,请重新填写!");
			return false;
		}
		
		if(form1.tel.value.Trim()=="")
		{
		  form1.tel.focus();
			showmsg("联系电话不能为空,请重新填写！");
			return false;
		}

    if (form1.conname.value.Trim() == ""){
			form1.conname.focus();
			showmsg("联系人不能为空,请重新填写!");
			return false;
		}

		if(form1.url1.value.Trim()=="http://")
		{
		  form1.url1.focus();
			showmsg("单位网址不能为空,请重新填写！");
			return false;
		}

	return true;
}
function mycheck(){
	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){
		form1.domain_name.focus();
		form1.domain_name.select();
		alert("域名要求至少4位长度,不大于30位！");
		return false;
	}

	return true;
}
function showmsg(msg)
{
  alert(msg);
}
    </script>

</head>
<body>
    <form action="http://kf.web08.net/do_company_reg.php" method="post" name="form1"
        id="form2" onsubmit="return checkform()">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 客服通注册 】"></asp:Label>
            </div>
        </div>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" id="OperateTable">
            <tr class="bottomborder2">
                <td height="30" colspan="2" align="center">
                    <font color="#006699">欢迎加入威博客服通 ！您只需要5秒钟，即可获得免费的威博客服帐号，如果您已经是会员请填写以下信息：</font></td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount" runat="server" Text="企业帐号：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="domain_name" type="text" id="domain_name" size="40"/>
                    <input name="button" type="button" style="cursor: pointer" onclick="if (mycheck()) {window.open('http://kf.web08.net/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');}"
                        value="域名检测" class="button"><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#ffffff">
                <td align="right" bgcolor="#ffffff" height="30" width="20%">
                   </td>
                
                <td bgcolor="#ffffff">
                    &nbsp;&nbsp; 字母(a-z,A-Z)、数字(0-9)、中划线(-)组成,且不能都为数字</td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount0" runat="server" Text="登录密码：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="passwd" type="password" id="passwd" value="" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount1" runat="server" Text="密码确认：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="repasswd" type="password" id="repasswd" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount2" runat="server" Text="E-mail：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="mail" type="text" id="mail" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 30px">
                    <asp:Label ID="lblCount3" runat="server" Text="单位简称：" ></asp:Label></td>
                <td bgcolor="#FFFFFF" style="height: 30px">
                    &nbsp;&nbsp;
                    <input name="companyname" type="text" id="companyname" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount4" runat="server" Text="联系电话：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="tel" type="text" id="tel" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount5" runat="server" Text="联 系 人：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="conname" type="text" id="conname" size="40" /><span class="NeedMsg"> *</span> </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" height="30" align="right" bgcolor="#FFFFFF">
                    <asp:Label ID="lblCount6" runat="server" Text="单位网址：" ></asp:Label></td>
                <td bgcolor="#FFFFFF">
                    &nbsp;&nbsp;
                    <input name="url1" type="text" id="url1" value="http://" size="40" /><span class="NeedMsg"> 
					*</span>
        </td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td width="20%" align="right" bgcolor="#FFFFFF" style="height: 30px">
                    <asp:Label ID="lblCount7" runat="server" Text="QQ / MSN：" ></asp:Label></td>
                <td bgcolor="#FFFFFF" style="height: 30px">
                    &nbsp;&nbsp;
                    <input name="qq" type="text" id="qq" size="40" /></td>
            </tr>
            <tr bgcolor="#FFFFFF">
                <td align="center" style="height: 30px">
                </td>
                <td align="left" style="height: 30px">
                    &nbsp;&nbsp;<input type="submit" name="Submit" value=" 注 册 " class="button" />
                    <input id="Button1" runat="server" type="button" value="返回列表" onclick="window.location.href='Kft_Kft_Login.aspx'"
                            class="button" />
                  
            </tr>
        </table>
        <table width="100%" border="0"  cellspacing="1" bgcolor="#BED3DA" cellpadding="0">
            <tr>
                <td bgcolor="#F4F7F9" style="padding:10px">
                    <font color="#FF6600">
                    <img height="14" src="images/kft/arrow.gif" width="13"/> 阅读注册协议<br />
					</font><br/>
                    <textarea name="textarea" cols="100" rows="7" readonly="readonly">我们欢迎个人及商业站点站长免费注册及使用我们的网上客服。但是请注意遵守如下条款，谢谢！
1.站点内容不得有政治过激言论及相关事件报道 
2.不得有渲染色情，暴力及其他国家法律不允许或公共道德所鄙弃的内容 
3.不得有贩卖，传播非法制品及管制产品的内容 
4.擅自修改投放代码将被删除 
5.首页显示“网上客服”文字链接
6.不能恶意浪费本站资源。
</textarea><br/><br/><br/>
                    <span class="input3" ><input type="checkbox" name="hav_read" value="1" id="hav_read"/></span>
                    已经阅读并同意服务条款
                <br />
                </td>
            </tr>
        </table>
        <div>

            <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
            </script>

        </div>
    </form>
    <uc1:PageBottom ID="PageBottom1" runat="server" />
</body>
</html>
