用户名不能为空",flag[0]=0,check_data())}function check_password(){var e=$("input")[0].value;if(e.length>0){var n=$("input")[1].value,t=/[\u0391-\uFFE5]+/,a=t.test(n),s=/\s+/,i=s.test(n);n.length<6?($("span")[1].innerHTML=" 密码长度不能小于6",flag[1]=0,check_data()):a?($("span")[1].innerHTML=" 密码不能包含中文",flag[1]=0,check_data()):i?($("span")[1].innerHTML=" 密码不能包含空格",flag[1]=0,check_data()):(flag[1]=1,check_data())}}function reset_info(){for(var e=["用户名在30个字符以内","密码在6-30字符之间",""],n=0;n<$("span").length;n++)$("span")[n].innerHTML=e[n];for(var n=0;n<$("input").length-2;n++)$("input")[n].value="";flag=[0,0],check_data()}function check_data(){$("input")[2].disabled=1==flag[0]&&1==flag[1]?!1:!0}function checkid(e){var n;try{n=new XMLHttpRequest}catch(t){n=new ActiveXObject("Microsoft.XMLHTTP")}n.onreadystatechange=function(){if(4==n.readyState)if(200==n.status){var e=n.responseText;id_result(e)}else $("span")[0].innerHTML="用户名检测失败,请联系管理员";else $("span")[0].innerHTML="正在进行用户名校验..."},n.open("post","check_id.asp",!0),n.setRequestHeader("Content-type","application/x-www-form-urlencoded"),n.send("regid="+escape(e))}function id_result(e){var n=$("span")[0];"0"==e?(n.innerHTML=' 用户名不存在',flag[0]=0,check_data()):(n.innerHTML=' 用户名正确',flag[0]=1,check_data())}function checkpwd(){var e=$("input")[0].value,n=$("input")[1].value;if(1==flag[0]&&1==flag[1]){var t;try{t=new XMLHttpRequest}catch(a){t=new ActiveXObject("Microsoft.XMLHTTP")}t.onreadystatechange=function(){if(4==t.readyState)if(200==t.status){var e=t.responseText;pwd_result(e)}else $("span")[1].innerHTML="密码检测失败,请联系管理员";else $("span")[1].innerHTML="正在进行密码校验..."},t.open("post","check_pwd.asp",!0),t.setRequestHeader("Content-type","application/x-www-form-urlencoded"),t.send("regname="+escape(e)+"&pwd="+escape(n))}else $("input")[2].disabled=!0}function pwd_result(e){var n=$("span")[1];"0"==e&&(n.innerHTML=' 密码错误',flag[1]=0,check_data()),"2"==e&&(n.innerHTML=' 该用户已被系统限制登录',flag[1]=0,check_data()),"1"==e&&(n.innerHTML=' 密码正确',flag[1]=1,top.location.href="index.asp")}var flag=[0,0],$=function(e){return document.getElementsByTagName(e)};String.prototype.Trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")},String.prototype.LTrim=function(){return this.replace(/(^\s*)/g,"")},String.prototype.RTrim=function(){return this.replace(/(\s*$)/g,"")};