XN.DOM.readyDo(function(){$("regEmail").setAttribute("rule","blank#regName");$("regEmail").setAttribute("tip","<p>重要！请填<b>有效邮箱地址</b>，以收邮件完成注册</p>");$("pwd").setAttribute("rule","blank#lengthWithSec:6,16");$("pwd").setAttribute("tip",'<p>密码由6-16个英文字母、数字或特殊字符组成<br />密码强度：<span id="pwdStrength"></span><span style="background-image:url(http://mopimg.cn/imgpro/reg/pwd.png);background-position:0 -120px;display:block;width:161px;line-height:5px;height:5px;marign:0;padding:0;" id="pwdScore">&nbsp;</span></p>');$("repwd").setAttribute("rule","blank#compare:pwd#lengthWithSec:6,16");$("repwd").setAttribute("error","您的两次输入不一致或者不符合密码规则");$("name").setAttribute("rule","blank#realName");$("name").setAttribute("tip",'<p>请一定填写你的<b style="color:red">真实中文姓名</b>，以方便朋友联络<br />默认设置下，只有你的熟人才能看到你的资料<br/></p>');$("birth_year").setAttribute("rule","blank");$("birth_year").setAttribute("error","请填写您的出生年份");$("birth_month").setAttribute("rule","blank");$("birth_month").setAttribute("error","请填写您的出生月份");$("birth_day").setAttribute("rule","blank");
$("birth_day").setAttribute("error","请填写您的出生日期");$("homeprovince").setAttribute("rule","blank");$("homeprovince").setAttribute("error","请您选择省份");$("homecitycode").setAttribute("rule","blank");$("homecitycode").setAttribute("error","请您选择城市");$("icode").setAttribute("rule","blank#verifyCode");$("accept").setAttribute("rule","check");$("accept").setAttribute("error","请阅读猫扑网服务条款");window.pwdSec=function(){var c=$("pwd").value;var a=/^(\w|\`|\~|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\_|\+|\{|\}|\:|\"|\||\<|\>|\?|\=|\-|\]|\[|\\|\'|\;|\/|\.|\,)\1*$/;var b="12345678909876543210";if(c.length<6){return false}else{if(a.test(c)){return false}else{if(b.indexOf(c)!=-1){return false}else{return true}}}return true};XN.ARRAY.each($("regform").gender,function(b,a){if(isElement(a)){a.setAttribute("rule","selectOne");a.setAttribute("error","您还没有选择性别")}});new XN.FORM.autoChecker({id:"regform",alertMethod:"div",tipMethod:"tip",submit:"reg_sub"});XN.FORM.checkPasswordStrength("pwd",function(a){if($("pwdScore")){$("pwdScore").style.backgroundPosition="0 -"+((5-a.level)*30)+"px"
}if($("pwdStrength")){$("pwdStrength").innerHTML=a.strength}});window.refreshCode=function(){var a=$("verifyPic");if(XN.BROWSER.IE6){new Image().src=a.src+"x"}a.src+="x"}});