<!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>
<!--{include file="inc/head.tpl"}-->
<script language="JavaScript" type="text/javascript" src="<!--{$cfg.url}-->common/js/FormValid.js"></script>
<script language="JavaScript" type="text/javascript" src="<!--{$cfg.url}-->common/js/FV_onBlur.js"></script>
<script language="JavaScript" type="text/javascript" src="<!--{$cfg.url}-->common/js/jquery-1.2.6.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){$("#province").change(function(){$("#province option").each(function(i,o){if($(this).attr("selected")){$(".city").hide();$(".city").eq(i).show();}});});$("#province").change();});</script>
<link href="<!--{$cfg.url}-->css/region.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!--{include file="inc/sub_top.tpl"}-->
<div class="body">
  <div class="reg">
    <div class="reg_a">
      <div style="height:26px; clear:both; overflow:hidden; width:100%"></div>
      <div class="reg_b1">
        <div class="reg_b11"><font class="t20 b"><font color="#FF0000">免费注册经纪人</font></font></div>
      </div>
      <div class="reg_b31"><font class="t20 b">如果您已拥有帐户，请在下面登录</font></div>
    </div>
    <div class="reg_b">
      <!-- reg -->
      <form name="registerform" id="registerform" method="POST" action="login.php">
        <input type="hidden" name="action" value="register">
        <input type="hidden" name="user_type" value="1">
        <div class="reg_b1">
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">您的用户名：</font></div>
            <div class="reg_b122">
              <input type="text" value="<!--{$smarty.post.username}-->" class="input_region" name="username" valid="required|custom|limit"  custom="ckname" errmsg="请输入帐号！|该账号已被使用！|长度须4-16个字符！" max="16" min="4">
            </div>
            <div class="reg_b123" id="errMsg_username"></div>
          </div>
          <div class="h5"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">您的密码：</font></div>
            <div class="reg_b122">
              <input type="password" value="" class="input_region" name="passwd" id="passwd" valid="required|limit" errmsg="请输入密码！|长度6-20个字符！" max="20" min="6">
            </div>
            <div class="reg_b123" id="errMsg_passwd"></div>
          </div>
          <div style="height:4px; clear:both; overflow: hidden"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">重复密码：</font></div>
            <div class="reg_b122">
              <input type="password" value="" class="input_region" name="passwd2" valid="eqaul" eqaulName="passwd" errmsg="输入密码不相同！">
            </div>
            <div class="reg_b123" id="errMsg_passwd2"></div>
          </div>
          <div class="h5"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">电子邮箱：</font></div>
            <div class="reg_b122">
              <input type="text" value="<!--{$smarty.post.email}-->" class="input_region" name="email" id="Email" valid="required|isEmail" errmsg="请输入Email！|Email格式不正确！">
            </div>
            <div class="reg_b123" id="errMsg_email"></div>
          </div>
          <div style="height:4px; clear:both; overflow:hidden;"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">真实姓名：</font></div>
            <div class="reg_b122">
              <input type="text" value="<!--{$smarty.post.realname}-->" class="input_region" name="realname" maxlength="16" valid="required"  custom="ckname" errmsg="请输入真实姓名！">
            </div>
            <div class="reg_b123" id="errMsg_realname"></div>
          </div>
          <div style=" height:4px; clear:both; overflow:hidden;"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">服务区域：</font></div>
             <div class="reg_b124">
              <select  name="cityarea_id" value="<!--{$smarty.post.mobile}-->"  valid="required" errmsg="请选择服务区域!">
						  <option>请选择</option>
						  <!--{html_options options=$cityarea_option selected=$dataInfo.cityarea_id}-->
						</select>
              </div>
              
              <div class="reg_b123" id="errMsg_cityarea_id"></div><span class="reg_b123" id="errMsg_citypart_id" style="display:none; width:0px; height:0px;"></span>

              
            </div>
            <div style="height:7px; clear:both; overflow:hidden;"></div>
            <div class="reg_b12">
              <div class="reg_b121"><font class="t14">所属公司：</font></div>
     
            <div class="reg_b122">
              <input id="outlet_first" type="text" value="" class="input_region"  valid="required" errmsg="请填写所属公司！">
            </div>
            <div class="reg_b123" id="errMsg_outlet_first"></div>
          </div>
          <div style="height:1px; clear:both; overflow:hidden;"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">所属门店：</font></div>
            <div class="reg_b122">
              <input id="outlet_last" type="text" value="" class="input_region" name="outlet_last" valid="required" errmsg="请填写门店！">
            </div>
            <div class="reg_b123" id="errMsg_outlet_last"></div>
          </div>
          <div style="height:3px; clear:both; overflow:hidden;"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">联系电话：</font></div>
            <div class="reg_b122">
              <input type="text" value="" class="input_region" name="mobile" valid="required"  custom="ckname" errmsg="联系电话不正确！">
            </div>
            <div class="reg_b123" id="errMsg_mobile"></div>
          </div>
          <div class="h5"></div>
          <div class="reg_b12">
            <div class="reg_b121"><font class="t14">注册校验：</font></div>
            <div class="reg_b126">
              <input name="vaild" type="text" class="input_region_yzm" valid="required" errmsg="请输入验证码！" />
            </div>
            <div class="reg_b127"><img onclick="this.src='<!--{$cfg.url}-->valid.php?' + Math.random();" id="valid_pic" src="<!--{$cfg.url}-->valid.php"></div>
            <div class="reg_b127" style="float:left; width:61px;"><span><a href="javascript:void(0)" onclick="document.getElementById('valid_pic').src='<!--{$cfg.url}-->valid.php?' + Math.random();"><font>换一换</font></a></span></div>
            <div style="float:left; width:110px;" class="reg_b123" id="errMsg_vaild"></div>
          </div>
          <div style="height:18px; clear:both; overflow:hidden"></div>
          <div class="reg_b123"><font color="#FF0000">
            <!--{$errorMsg}-->
            </font></div>
          <div class="reg_b12">
            <div class="reg_b128"><img src="<!--{$cfg.url}-->images/reg_button.jpg" width="115" height="37" style="cursor:pointer;" onclick="javascript:if (validator(document.registerform)){document.registerform.submit();}" /></div>
            <div class="reg_b129">
              <input name="checkbox" type="checkbox" id="checkbox" checked="checked" />
              &nbsp;您已阅读并接受《<span><a href="<!--{$cfg.url}-->about/treaty.php" target="_blank">最终用户协议</a></span>》</div>
          </div>
          <div style="height:20px; clear:both; overflow:hidden;"></div>
        </div>
      </form>
      <!-- end reg from -->
      <div class="reg_b2"></div>
      <form onsubmit="return validator(this)" action="<!--{$cfg.url}-->login/login.php" method="post" name="loginform" id="loginform">
        <input type="hidden" value="login" name="action">
        <input type="hidden" value="" name="back_to">
        <div class="reg_b3">
          <div style="height:3px; clear:both; overflow:hidden"></div>
          <div class="reg_b32">
            <div class="reg_b321">用户名：</div>
            <div class="reg_b322">
              <input type="text" name="username" class="input_region">
            </div>
          </div>
          <div style="height:11px; clear:both; overflow:hidden;"></div>
          <div class="reg_b32">
            <div class="reg_b321">密&nbsp;&nbsp;码：</div>
            <div class="reg_b322">
              <input type="password" name="passwd" class="input_region">
            </div>
          </div>
          <div style="height:10px; clear:both; overflow:hidden;"></div>
          <div class="reg_b32">
            <div class="reg_b321">&nbsp;</div>
            <div class="reg_b324">
              <input name="notForget" value="1" type="checkbox" id="remberme" checked="checked" />
              &nbsp;下次直接登录（慎用） <span>
              <!--<a href="#">忘记密码？</a></span>-->
            </div>
          </div>
          <div style="height:4px; clear:both; overflow:hidden"></div>
          <div class="reg_b123"><font color="#FF0000">
            <!--{$errorMsg1}-->
            </font></div>
          <div class="reg_b32">
            <div class="reg_b321"></div>
            <div class="reg_b323">
              <input type="image" src="<!--{$cfg.url}-->images/login.jpg" />
            </div>
          </div>
          <div style="height:33px; clear:both; overflow:hidden"></div>
          <div class="reg_b33">
            <div style="height:10px; clear:both; overflow:hidden;"></div>
            <ul>
              <li><font class="b" style="font-size:13px; _font-size:12px;">帮助与提示</font></li>
              <li style="height:4px; clear:both; overflow:hidden"></li>
              <li>(1) <a href="<!--{$cfg.url}-->help/regfail.php" target="_blank">注册遇到困难？</a></li>
              <li>(2) <a href="<!--{$cfg.url}-->help/loginfail.php" target="_blank">登录失败了吗？</a></li>
              <li>(3) <a href="<!--{$cfg.url}-->help/findpsw.php" target="_blank">如何找回密码？</a></li>
              <li>(4) <a href="<!--{$cfg.url}-->help/rmbpws.php" target="_blank">为什么慎用记住密码？</a></li>
            </ul>
            <div style="height:10px; clear:both; overflow:hidden"></div>
          </div>
        </div>
      </form>
    </div>
    <div class="reg_c"></div>
  </div>
</div>
<script type="text/javascript">

var  msgInfo  =  [];
msgInfo["username"] = '4-16个字符(包括小写字母、数字、下划线)<span class="cRed">(必填)</span>' ;
msgInfo["passwd"] = '6-20个字符组成(包括英文字母、数字、符号)，区分大小写。<span class="cRed">(必填)</span>' ;
msgInfo["passwd2"] = '请再输入一遍您上面输入的密码。<span class="cRed">(必填)</span>'; 
msgInfo["email"] = '重要！这是您找回密码的唯一方式！请留常用的Email。<span class="cRed">(必填)</span>'; 
msgInfo["valid"] = '请输入左侧显示的字符。<span class="cRed">(必填)</span>';

FormValid.showError = function(errMsg,errName,formName) {
	if (formName=='registerform') {
		for (key in FormValid.allName) {//alert('errMsg_'+FormValid.allName[key]);
			document.getElementById('errMsg_'+FormValid.allName[key]).innerHTML = '';
		}
		for (key in errMsg) {
			document.getElementById('errMsg_'+errName[key]).innerHTML = errMsg[key];
		}
	}
}

var r = null;
function ckname (inp) {
	$.ajax({type:"GET", url:"ajax.php?r="+Math.random()+'&action=unique&username='+inp.value, dataType:"text",async:false,success:function (msg){
		r = msg;
	}}); 
	if (r==0) {
		return false;
	} else {
		return true;
	}
}
</script>
<script type="text/javascript">
initValid(document.registerform);
</script>
<!--{include file="inc/foot.tpl"}-->
</body>
</html>
