XN.DOM.readyDo(function(){if($("name")){$("name").setAttribute("rule","blank#realName");$("name").setAttribute("tip",'<p style="color:#000; font-size: 12px;">注册后不可修改，<b>建议使用中文</b></p>')}if($("pwd")&&$("repwd")){$("pwd").setAttribute("rule","blank#length:6,20");$("pwd").setAttribute("tip",'<p style="color:#000; font-size: 12px;">密码由6-20个英文字母、数字或特殊字符组成<br />密码强度：<span id="pwdStrength"></span><span style="background-image:url(http://img.hi.mop.com/imgpro/reg/pwd.png);background-position:0 -120px;display:block;line-height:5px;height:5px;marign:0;padding:0;" id="pwdScore">&nbsp;</span></p>');$("repwd").setAttribute("rule","blank#compare:pwd#length:6,20");$("repwd").setAttribute("error",'您的两次输入不一致或者不<br/><span style="margin-left: 33px;_margin-left:18px;">符合密码规则</span>')}else{if($("pwd")){if(document.location.href.indexOf("msnChannel")>=0){$("pwd").setAttribute("rule","blank#length:6,20");$("pwd").setAttribute("tip",'<p style="color:#000; font-size: 12px;">密码由6-20个英文字母、数字或特殊字符组成<br />密码强度：<span id="pwdStrength"></span><span style="background-image:url(http://img.hi.mop.com/imgpro/reg/pwd.png);background-position:0 -120px;display:block;line-height:5px;height:5px;marign:0;padding:0;" id="pwdScore">&nbsp;</span></p>')
}else{$("pwd").setAttribute("rule","blank");$("pwd").setAttribute("tip","<p style='color:#000; font-size: 12px;'>请再次确认您的密码（与通行证密码保持一致）</p>")}}}if($("regEmail")){$("regEmail").setAttribute("rule","blank#regName");$("regEmail").setAttribute("tip","<p  style='color:#000; font-size: 12px;'><span>请填</span><b><span style='color:red;'>有效邮箱</span></b><span>，用于密码找回，<b>推荐使用网易、雅虎、Hotmail邮箱</b></span></p>");if($("email_allowfirst")){XN.FORM.checkers.regName.cachedFirstValue=$("regEmail").value}}if($("regform").gender){XN.ARRAY.each($("regform").gender,function(b,a){if(isElement(a)){a.setAttribute("rule","selectOne");a.setAttribute("error","您还没有选择性别")}})}if($("icode")){$("icode").setAttribute("rule","blank#verifyCode")}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"};window.getCode=function(){new XN.NET.xmlhttp({url:"/AjaxRegisterIcodeAuth.do?authType=getIcode",onSuccess:function(a){key_id=a.responseText;$("key_id").value=key_id;$("verifyPic").src="http://icode.hi.mop.com/getcode.do?t=register_"+key_id+"&rnd="+Math.random()}})};function checkLogin(){var c=document.cookie.split("; ");for(var b=0;b<c.length;b++){var a=c[b].split("=")[0];if(a=="mop_logon"){return true}}return false};