<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>免费注册{#$web_config.poweredby#}</title>
<link rel="stylesheet" type="text/css" href="../templates/www/{#$web_config.temp -> dir#}/css/{#$web_config.temp -> style#}.css" />
<script language="javascript" src="{#$base_weburl#}/js/jquery.min.js" ></script>
<script language="javascript" src="{#$base_weburl#}/js/common.js" ></script>
<script language="javascript">

	var webroot_url = '{#$base_weburl#}';
	var isregusername = true;
	var isregusepwd   = true;
	var isregreusepwd = true;
	var isreguseemail = true;
	
	var isregmsn 	    = true;
	var isregqq 	    = true;
	var isreghomephote  = true;
	var isregphote 		= true;
	var isregtel 	    = true;
	var isusecode       = true;
	
	
	
	function submitFun()
	{
		var iduse_name 		= document.getElementById('use_name');
		var iduse_pwd 		= document.getElementById('use_pwd');
		var idreuse_pwd 	= document.getElementById('reuse_pwd');
		var iduse_email 	= document.getElementById('use_email');
		var idregqq 		= document.getElementById('regqq');
		var iduse_code 		= document.getElementById('use_code');
 
		
		patn = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;

		var patadmin = new RegExp('admin');
		var patroot  = new RegExp('root');

		if(iduse_name.value=='')
		{
			alert(' 提 示：会员帐号不能为空！请输入！');
			iduse_name.focus();
			return false;
		}else if((iduse_name.value).length < 4)
		{
			alert(' 提 示：会员帐号不能小于4个字符！请重新输入！');
			iduse_name.focus();
			return false;
		}else if(patadmin.test(iduse_name.value))
		{
			alert(' 提 示：会员帐号不能存在admin字符！请重新其他帐号输入！');
			iduse_name.focus();
			return false;
		}else if(patroot.test(iduse_name.value))
		{
			alert(' 提 示：会员帐号不能存在root字符！请重新其他帐号输入！');
			iduse_name.focus();
			return false;
		}else if(iduse_pwd.value=='')
		{
			alert(' 提 示：密码不能为空！请输入！');
			iduse_pwd.focus();
			return false;
		}else if(idreuse_pwd.value=='')
		{
			alert(' 提 示：确认密码不能为空！请输入！');
			idreuse_pwd.focus();
			return false;
		}else if(idreuse_pwd.value!=iduse_pwd.value)
		{
			alert(' 提 示：确认密码与密码不一致！请重新输入！');
			idreuse_pwd.focus();
			return false;
		}else if(iduse_email.value=='')
		{
			alert(' 提 示：E-mail不能为空！请输入！');
			iduse_email.focus();
			return false;
		}else if(!patn.test(iduse_email.value))
		{
			alert ("提示：\n\n电子邮箱格式不正确，请输入正确的电子邮箱地址！！");
			iduse_email.focus (); 
			return false; 
		}
		
 
		
		
	  {#foreach item=item key=key from=$needReg#}
	  {#if $item.0 eq 1#}
	  {#if $item.1 eq 1#}
	  var id{#$key#} = document.getElementById('{#$key#}');
	   if(id{#$key#}.value=='')
		{
			alert(' 提 示：{#$_LANG[$key]#}不能为空！请输入！');
			id{#$key#}.focus();
			return false;
		}
	  {#/if#}
	  {#/if#}
	  {#/foreach#}  
		
		
		
		if(isregusername==false)
		{
			iduse_name.focus();
			return false;
		}
		
		if(isregusepwd==false)
		{
			iduse_pwd.focus();
			return false;
		}
		
		
		if(isregreusepwd==false)
		{
			idreuse_pwd.focus();
			return false;
		}
		
		
		if(isreguseemail==false)
		{
			iduse_email.focus();
			return false;
		}
		
		if(isregqq==false)
		{
			idregqq.focus();
			return false;
		}
		
		
		if(isusecode==false)
		{
			iduse_code.focus();
			return false;
		}
		
		if(iduse_code.value=='')
		{
			alert(' 提 示：验证码不能为空！请输入！');
			iduse_code.focus();
			return false;
		}
	}
</script>
<style >
.regtr{ height:35px;}
.tl{width:150px;text-align:right;padding-right:20px;}
.reg_title {border-bottom:#CCCCCC 1px solid;font-weight:bold;padding:0 0 10px 10px;margin:15px 55px 0 55px;font-size:14px;color:#FF6600;}
.reg_inp {border:#7F9DB9 1px solid;padding:3px 0 3px 0;}
.tips {position:absolute;z-index:1000;width:300px;background:url('image/tips_bg.gif') no-repeat 0 bottom;overflow:hidden;margin:-5px 0 0 -10px;}
.tips div{background:url('image/tips_top.gif') no-repeat;line-height:22px;padding:8px 10px 8px 35px;}
.tdred{border:#FF3300 1px solid;padding:3px 0 3px 0;}
.reg_noshow{display:none;}
.reg_show{display:block;}
</style>

</head>
<body>
 
{#include file="./{#$web_config.webtemp#}/cover/header.tpl"#}
{#include file="./{#$web_config.webtemp#}/cover/web_address.tpl"#}
<div class="maincss" style="padding:2px 0 0 0;">
	<table width="100%" cellpadding="0" cellspacing="0"  style="border: 1px solid #CCCCCC; font-size:14px;">
	<tr align="center" >
	<td>
	<form action="{#$base_weburl#}/user/index.php?load=login&act=reg_info" method="post" onsubmit="return submitFun(this)">
<table width="820" border="0" cellspacing="0" cellpadding="0">
  <tr  class="regtr">
    <td colspan="3" align="center"><span style="font-weight:bolder; text-align:center;" >新会员注册</span></td>
  </tr>


  <tr class="regtr">
    <td colspan="3" align="center"><span  style="color:#FF0000; font-weight:bold;">注意：同一个用户请不要重复注册。带*为必填项</span></td>
  </tr>
  <tr class="regtr">
    <td align="right"  height="25"><span  style="color:#FF6600; font-weight:bold;">帐户信息</span></td>
    <td colspan="2" align="left"></td>
    </tr>
  <tr class="regtr">
    <td width="27%" height="25" align="right">会员帐号：<span  style="color:#FF0000; font-weight:bold;">*</span></td><td width="32%" align="left"><input name="use_name" id="use_name" value=""  style="width:230px;" class="reg_inp" onblur="blurUsename('use_name','divuse_name')" onfocus="focusUsename('use_name','divuse_name')" ></td>
    <td width="41%" align="left">
    <div id="divuse_name" class="reg_noshow"><img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;帐号应为4-20个字符，只能使用小写字母(a-z)、数字(0-9)，且以字母或数字组合</div></td>
  </tr>

  <tr class="regtr">
    <td align="right"  height="25">登录密码：<span  style="color:#FF0000; font-weight:bold;">*</span></td><td align="left"><input type="password" name="use_pwd" id="use_pwd" value=""  style="width:230px;" class="reg_inp" onblur="blurUsepwd('use_pwd','divuse_pwd')" onfocus="focusUsepwd('use_pwd','divuse_pwd')" ></td>
    <td align="left"><div id="divuse_pwd" class="reg_noshow"><img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;6-20个字符，区分大小写，推荐使用数字、字母和特殊符号组合</div></td>
  </tr>
  
  <tr class="regtr">
    <td align="right"  height="25">确认密码：<span  style="color:#FF0000; font-weight:bold;">*</span></td>
    <td align="left"><input type="password" name="reuse_pwd" id="reuse_pwd" value=""  style="width:230px;" class="reg_inp" onblur="blurReusepwd('reuse_pwd','divreuse_pwd')" onfocus="focusReusepwd('reuse_pwd','divreuse_pwd')" ></td>
    <td align="left"><div id="divreuse_pwd" class="reg_noshow"><img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请再输入一遍上面填写的密码</div></td>
  </tr>
  

  
  <tr class="regtr">
    <td align="right"  height="25"><span  style="color:#FF6600; font-weight:bold;">联系方式</span></td>
    <td colspan="2" align="left"></td>
    </tr>
  <tr class="regtr">
    <td align="right"  height="25">电子邮箱：<span  style="color:#FF0000; font-weight:bold;">*</span></td>
    <td align="left"><input  name="use_email" id="use_email" value=""  style="width:230px;" class="reg_inp" onblur="blurUseemail('use_email','divuse_email')" onfocus="focusUseemail('use_email','divuse_email')" ></td>
    <td align="left"><div id="divuse_email" class="reg_noshow"><img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写常用邮箱(E-mail)地址，地址不会被公开</div></td>
  </tr>
  
 {#foreach item=item key=key from=$needReg#}
  {#if $item.0 eq 1#}
  <tr class="regtr">
    <td align="right"  height="25">{#$lang.reg[$key]#}：{#if $item.1 eq 1#}<span  style="color:#FF0000; font-weight:bold;">*</span>{#else#}&nbsp;{#/if#}</td>
    <td align="left"><input name="{#$key#}" id="{#$key#}" value=""  style="width:230px;" class="reg_inp" onblur="blurReg('{#$key#}','div{#$key#}',{#if $item.1 eq 1#}true{#else#}false{#/if#})" onfocus="focusReg('{#$key#}','div{#$key#}',{#if $item.1 eq 1#}true{#else#}false{#/if#})"></td>
    <td align="left"><div id="div{#$key#}" class="reg_noshow"><img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;</div></td>
  </tr>
  {#/if#}
  {#/foreach#}

  <tr class="regtr">
    <td align="right"  height="25">验&nbsp;证&nbsp;码：<span  style="color:#FF0000; font-weight:bold;">*</span></td>
    <td align="left"><table height="23"><tr><td ><input name="use_code" id="use_code" value="" type="text" style="width:100px;"  class="reg_inp" onblur="checkInfo('use_code','divuse_code')"></td><td><img src="./index.php?load=login&act=get_img_code" width="65" height="22" align="bottom" onclick="this.src='./index.php?load=login&act=get_img_code&time='+Math.random();" id="idimgCode" style="cursor:pointer;" /></td></tr></table></td>
    <td align="left"><div id="divuse_code" class="reg_noshow"><img src="{#$base_weburl#}/images/chkerror.gif"  width="12" height="12" />&nbsp;请把图片中显示内容填写到输入框中</div></td>
  </tr>

  <tr class="regtr">
    <td colspan="3" align="center"  height="25"><input type="submit" name="submit" id="submit" value="同意协议并注册" style="font-size:13px;padding:3px;"></td>
  </tr>
  
  <tr class="regtr">
    <td colspan="3" align="center"><a href="./agreement.html" target="_blank">《服务协议》</a></td>
  </tr>
  
  <tr class="regtr">
    <td colspan="3">&nbsp;</td>
  </tr>
  
  <tr class="regtr">
    <td colspan="3"><table width="100%" align="left"><tr><td><span style="font-weight:bolder">分享到：</span></td><td><!-- Baidu Button BEGIN HuCart.COM ADD  --><div id="bdshare" class="bdshare_t bds_tools get-codes-bdshare">
        <a class="bds_qzone">QQ空间</a>
        <a class="bds_tsina">新浪微博</a>
        <a class="bds_tqq">腾讯微博</a>
        <a class="bds_renren">人人网</a>
        <span class="bds_more">更多</span>    </div>
<script type="text/javascript" id="bdshare_js" data="type=tools&amp;mini=1" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
</script>
<!-- Baidu Button END HuCart.COM ADD --></td></tr></table></td>
  </tr>
</table>
</form>
	</td>
	</tr>
	</table>
</div>

<script language="javascript">

	function blurReg( typeid ,showid ,istrue)
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
 		var istrueval 	= istrue;
		patnqq 			= /^([0-9_-]{4,20})+/;		//QQ号
		patnmsn 		= /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;	//MSN
		patnphote 		= /^([0-9_-]{6,20})+/;		//办公电话
		patnhomephote 	= /^([0-9_-]{6,20})+/;		//家庭电话
		patntel 		= /^([0-9_-]{6,20})+/;		//手 机
		
		switch(typeid)
		{
		   case 'regphote':
 
		   		if(istrueval==true)
				{
					if(typeval.value =='' )
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n办公电话不能为空！请重新输入！";
						typeval.focus();
						isregphote = false;
						return false;
					}else if(!patnphote.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n办公电话格式不正确，请输入正确的办公电话！";
						typeval.focus();
						isregphote = false;
						return false;
				
					}else{
						 $("#divregphote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregphote = true;
						 return false;
					}
				}else{
					if(typeval.value =='' )
					{
						 $("#divregphote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregphote = true;
						 return false;
					}else if(!patnphote.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n办公电话格式不正确，请输入正确的办公电话！";
						typeval.focus();
						isregphote = false;
						return false;
				
					}else{
						 $("#divregphote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregphote = true;
						 return false;
					}
				}
			   back;
		   case 'reghomephote':
		   		if(istrueval==true)
				{
		   
					if(typeval.value =='' )
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n家庭电话不能为空！请重新输入！";
						typeval.focus();
						isreghomephote = false;
						return false;
					}else if(!patnhomephote.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n家庭电话格式不正确，请输入正确的家庭电话！";
						typeval.focus();
						isreghomephote = false;
						return false;
				
					}else{
						 $("#divreghomephote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isreghomephote = true;
						 return false;
					}
				}else{
					if(typeval.value =='' )
					{
						 $("#divreghomephote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isreghomephote = true;
						 return false;
					}else if(!patnhomephote.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n家庭电话格式不正确，请输入正确的家庭电话！";
						typeval.focus();
						isreghomephote = false;
						return false;
				
					}else{
						 $("#divreghomephote").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isreghomephote = true;
						 return false;
					}

				}
			   back;
		   case 'regtel':
		   
		   		if(istrueval==true)
				{
					if(typeval.value =='' )
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n手机号不能为空！请重新输入！";
						typeval.focus();
						isregtel = false;
						return false;
					}else if(!patntel.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n手机号格式不正确，请输入正确的手机！";
						typeval.focus();
						isregtel = false;
						return false;
				
					}else{
						 $("#divregtel").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregtel = true;
						 return false;
					}
				}else{
					if(typeval.value =='' )
					{
						 $("#divregtel").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregtel = true;
						 return false;
					}else if(!patntel.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n手机号格式不正确，请输入正确的手机！";
						typeval.focus();
						isregtel = false;
						return false;
				
					}else{
						 $("#divregtel").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregtel = true;
						 return false;
					}

				}
			   back;
		   case 'regmsn':
		   		if(istrueval==true)
				{
					if(typeval.value =='' )
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nMSN号不能为空！请重新输入！";
						typeval.focus();
						isregmsn = false;
						return false;
					}else if(!patnmsn.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nMSN号格式不正确，请输入正确的MSN！";
						typeval.focus();
						isregmsn = false;
						return false;
				
					}else{
						 $("#divregmsn").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregmsn = true;
						 return false;
					}
				}else{
					if(typeval.value =='' )
					{
						 $("#divregmsn").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregmsn = true;
						 return false;
					}else if(!patnmsn.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nMSN号格式不正确，请输入正确的MSN！";
						typeval.focus();
						isregmsn = false;
						return false;
				
					}else{
						 $("#divregmsn").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
						 isregmsn = true;
						 return false;
					}

				}
			   back;
		   case 'regqq' :
		   		if(istrueval==true)
				{
					if(typeval.value =='' )
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nQQ号不能为空！请重新输入！";
						typeval.focus();
						isregqq = false;
						return false;
					}else if(!patnqq.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nQQ号格式不正确，请输入正确的QQ号！";
						typeval.focus();
						isregqq = false;
						return false;
				
					}else{
						 $("#divregqq").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;');
						 isregqq = true;
						 return false;
					}
				}else{
					if(typeval.value =='' )
					{
						 $("#divregqq").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;');
						 isregqq = true;
						 return false;
					}else if(!patnqq.test(typeval.value))
					{
						typeval.className="tdred";
						showval.className="reg_show";
						showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\nQQ号格式不正确，请输入正确的QQ号！";
						typeval.focus();
						isregqq = false;
						return false;
				
					}else{
						 $("#divregqq").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;');
						 isregqq = true;
						 return false;
					}
				}
			    back;

		   default :
			   return false;
		}

	}
	
	function focusReg( typeid ,showid , istrue)
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		
		switch (typeid){
		   case 'regmsn':
				if( isregmsn == false | typeval.value == '' )
				{
					typeval.className = "reg_inp";
					showval.className = 'reg_show';
					showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写常用MSN，MSN号不会被公开';
					return false;
				}
				 back;
		   case 'regqq' :
				if( isregqq == false | typeval.value == '' )
				{
					typeval.className = "reg_inp";
					showval.className = 'reg_show';
					showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写常用QQ号，QQ号不会被公开';
					return false;
				}
				 back;
		   case 'regphote':
				if( isregphote == false | typeval.value == '' )
				{
					typeval.className = "reg_inp";
					showval.className = 'reg_show';
					showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写办公电话，办公电话不会被公开';
					return false;
				}
				 back;
		   case 'reghomephote' :
				if( isreghomephote == false | typeval.value == '' )
				{
					typeval.className = "reg_inp";
					showval.className = 'reg_show';
					showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写家庭电话，家庭电话不会被公开';
					return false;
				}
				 back;
		   case 'regtel' :
				if( isregtel == false | typeval.value == '' )
				{
					typeval.className = "reg_inp";
					showval.className = 'reg_show';
					showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写常用手机，手机号不会被公开';
					return false;
				}
				 back;
		   default :
			   return false;
			    back;
		}
	}



	function blurUseemail( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		patn = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
		
		if(typeval.value =='' )
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：电子邮箱不能为空！请重新输入！";
			typeval.focus();
			isreguseemail = false;
			return false;
		}else if(!patn.test(typeval.value))
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;提示：\n\n电子邮箱格式不正确，请输入正确的电子邮箱地址！";
			typeval.focus();
			isreguseemail = false;
			return false; 
		}else{
			jQuery.post( "./index.php?load=login&act=reg_ajax",{ typeval: typeval.value , typename: 'use_email' },function(data) { if(data=='success') {  $("#divuse_email").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); isreguseemail = true; }else{ $("#divuse_email").html( '<img src=\'/images/chkerror.gif\'  width=\'12\' height=\'12\' />&nbsp;'+data); isreguseemail = false; typeval.className="tdred"; showval.className="reg_show"; } } );
			return false; 
			
		}
	}
	
	function focusUseemail( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);

		if(isreguseemail==false | typeval.value == '' )
		{
			typeval.className = "reg_inp";
			showval.className = 'reg_show';
			showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;请填写常用邮箱地址，邮箱地址不会被公开';
		}
	}


	function blurReusepwd( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		if(typeval.value == '' )
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;请重新输入上面一致密码！";
			typeval.focus();
			isregusepwd = false;
			return false;
		}else if(typeval.value != document.getElementById('use_pwd').value )
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;两次密码输入不一致！请重新输入上面一致密码！";
			typeval.focus();
			isregusepwd = false;
			return false;
		}else{
			isregusepwd = true;
			typeval.className = "reg_inp";
 			$("#divreuse_pwd").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;'); 
		}
	}
	
	function focusReusepwd( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		//alert(isregusername);
		if(isregusepwd==false | typeval.value == '' )
		{
			typeval.className = "reg_inp";
			showval.className = 'reg_show';
			showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;密码应为6-20个字符，区分大小写，推荐使用数字、字母和特殊符号组合';
		}
	}
	

	function blurUsepwd( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		if((typeval.value).length < 6)
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;密码不能小于6个字符！请重新输入！";
			typeval.focus();
			isregusepwd = false;
			return false;
		}else if((typeval.value).length > 20)
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;密码不能大于20个字符！请重新输入！";
			typeval.focus();
			isregusepwd = false;
			return false;
		}else{
			isregusepwd = true;
 			showval.innerHTML="<img src='/images/chkright.gif'  width='12' height='12' />&nbsp;"; 
			return false;
		}
	}
	
	function focusUsepwd( typeid ,showid )
	{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		//alert(isregusername);
		if(isregusepwd==false | typeval.value == '' )
		{
			typeval.className = "reg_inp";
			showval.className = 'reg_show';
			showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;密码应为6-20个字符，区分大小写，推荐使用数字、字母和特殊符号组合';
		}
	}
	
	function blurUsename(typeid ,showid)
	{
		
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		patn = /^([a-zA-Z0-9_-])+/;
        if(typeval.value=='')
		{
			typeval.className="tdred";
			showval.className="reg_show";
			showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;会员帐号不能为空！";
			typeval.focus();
			isregusername = false;
			return false;
		}else{
			var patadmin = new RegExp('admin');
			var patroot  = new RegExp('root');
			
			if((typeval.value).length < 4)
			{
				typeval.className="tdred";
				showval.className="reg_show";
				showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;会员帐号不能小于4个字符！请重新输入！";
				typeval.focus();
				isregusername = false;
				return false;
			}else if(patadmin.test(typeval.value))
			{
				typeval.className="tdred";
				showval.className="reg_show";
				showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;会员帐号不能带有admin字符！请重新其他帐号输入！";
				typeval.focus();
				isregusername = false;
				return false;
			}else if(patroot.test(typeval.value))
			{
				typeval.className="tdred";
				showval.className="reg_show";
				showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;会员帐号不能带有root字符！请重新其他帐号输入！";
				typeval.focus();
				isregusername = false;
				return false;
			}else if(!patn.test(typeval.value))
			{
				typeval.className="tdred";
				showval.className="reg_show";
				showval.innerHTML="<img src='/images/chkerror.gif'  width='12' height='12' />&nbsp;只能使用小写字母(a-z)、数字(0-9)，且以字母或数字组合！请重新其他帐号输入！";
				typeval.focus();
				isregusername = false;
				return false;
			}else{
				jQuery.post( "./index.php?load=login&act=reg_ajax",{ typeval: typeval.value , typename: 'use_name' },function(data) { if(data=='success') {  $("#divuse_name").html('<img src=\'/images/chkright.gif\'  width=\'12\' height=\'12\' />&nbsp;一旦注册成功不能修改'); isregusername = true; }else{ $("#divuse_name").html( '<img src=\'/images/chkerror.gif\'  width=\'12\' height=\'12\' />&nbsp;'+data); isregusername = false;  } } );
				
			}
			

		}

	}
	
function focusUsename(typeid,showid)
{
		var typeval = document.getElementById(typeid);
		var showval = document.getElementById(showid);
		
		if(isregusername==false | typeval.value == '' )
		{
			typeval.className = "reg_inp";
			showval.className = 'reg_show';
			showval.innerHTML = '<img src="/images/chkerror.gif"  width="12" height="12" />&nbsp;帐号应为4-20个字符，只能使用小写字母(a-z)、数字(0-9)，且以字母或数字组合';
		}
}




	
</script>
{#include file="./{#$web_config.webtemp#}/cover/footer.tpl"#}

</body>
</html>