text: $(function(){function s(){var s="";s=o(resetpassPHP.FORGET_RESET_TITLE,resetpassPHP.FORGET_RESET_ERROR1,resetpassPHP.FORGET_RESET_ERROR2),$("#login-main").empty().append(s)}function e(){$("input[name=npassword]").focus(function(){""==$(this).val()&&n("#npassword")}).blur(function(){$(this).val()?(r("#npassword"),$("input[name=password]").val()&&r("#confirm_password")):n("#npassword")}),$("input[name=confirm_password]").focus(function(){""==$(this).val()&&n("#cpassword")}).blur(function(){$(this).val()?r("#cpassword"):n("#cpassword")})}function n(s){$(s).removeClass("login-success-notice"),$(s).addClass("login-error-notice")}function r(s){$(s).removeClass("login-error-notice"),$(s).addClass("login-success-notice")}function a(s,e){$(s).css("height","35px").html(e),window.setTimeout(function(){$(s).css("height","0px").html("")},6e3),c("#login-container","a-shake")}function o(s,e,n){var r=null;return r='<div class="login-error">',r+='<div class="login-error-title">'+s+"</div>",r+='<div class="login-error-content">',r+='<div class="login-error-icon"><i class="icon-uniEA30"></i></div>',r+="<p>"+e+"</p>",r+="<p>"+n+"</p>",r+="</div>",r+="</div>"}function t(s){var e=s,n=0,r=0,a="";return n=parseInt(e/60),r=parseInt(e%60),0!=n&&(a+=i(n,2)+":"),0==n||r||(a+=i(r,2)),0!=r&&(a+=i(r,2)),0==n&&(a+=" sec"),a}function i(s,e){return(""+s).length<e?(new Array(e+1).join("0")+s).slice(-e):""+s}function c(s,e){$(s).hasClass(e)||($(s).addClass(e),window.setTimeout(function(){$(s).removeClass(e)},1e3))}var l=$("input[name=setkey]").val();if(l.length<1)s();else{var p=!1;$.ajax({type:"POST",url:resetpassPHP.resetPassword,data:{setkey:l},beforeSend:function(){$(".login-container").hide()},success:function(r){var o=JSON.parse(r);switch(p=!0,parseInt(o.status)){case-1:case-2:case-3:s();break;case 200:e();var i=parseInt(o.time),l=parseInt(o.user_id),u=setInterval(function(){i--,0==i?(s(),clearInterval(u)):$("#forgot_showtime").html(t(i))},1e3);$(".login-container").show(),p&&$("#login_reset").click(function(s){var e=($(this),$("input[name=npassword]").val()),r=$("input[name=confirm_password]").val();s.preventDefault(),e.length<1&&r.length<1?(n("#npassword"),n("#cpassword"),c(".login-container","a-shake")):e.length>30?a(".login-error-show",resetpassPHP.Account_Password_Length):r.length<1&&e.length>0?(n("#cpassword"),c(".login-container","a-shake")):r.length>0&&e.length<1?(n("#npassword"),c(".login-container","a-shake")):e!=r?a(".login-error-show",resetpassPHP.Reset_User_Password_Confirm):$.ajax({type:"POST",url:resetpassPHP.UPresetPassword,data:{user_id:l,npass:e,cpass:r},beforeSend:function(){p=!1},success:function(s){switch(p=!0,parseInt(s)){case-1:a(".login-error-show",resetpassPHP.Reset_User_Password_Confirm);break;case-4:a(".login-error-show",resetpassPHP.Account_Password_Length);break;case-8:a(".login-error-show",resetpassPHP.Illegal_Operation);break;default:location.href=StrackPHP.INDEX}}})})}}})}});