

<div class="lgHead">
	<div class="logo"></div>
</div>
<div class="activateCon">
	<h1 id="helloStr" class="hello">{%label.activate%}</h1>
	<ul class="line userpwd">
		<li class="tipLine">
			<span>{%label.userName%}</span>
		</li>
		<li class="lgLine">
			<div id="lgUsernameBdg" class="lgBdBg username">
				<input class="username" id="userName" maxLength="32" />
				<label id="userTipStr" for="userName">{%label.loginUserNameKey%}</label>
			</div>
		</li>
		<li class="tipLine">
			<span>{%label.loginSetPwd%}</span>
		</li>
		<li class="lgLine lgPwd">
			<div id="lgPwdBdg" class="lgBdBg password">
				<div id="lgPwdWrap" style="display: inline-block;">
					<input class="password " id="lgPwd" type="password" maxLength="64"/>
				</div>
				<label id="pwdTipStr" for="lgPwd" class="zIndexLevelHigh">{%label.passwd8to64Char%}</label>
				<img id="lgPwdBdgEyeIcon" class="zIndexLevelHigh" src="../web-static/images/eye_slash_fill.png" tabindex="-1"></img>
			</div>
		</li>
		<li class="tipLine">
			<span>{%label.checkPasswd%}</span>
		</li>
		<li class="lgLine lgPwd">
			<div id="lgCkPwdBdg" class="lgBdBg password">
				<div id="lgCkPwdrap" style="display: inline-block;">
					<input class="password" id="lgCkPwd" type="password" maxLength="64"/>
				</div>
				<label id="pwdCkTipStr" for="lgCkPwd" class="zIndexLevelHigh"> {%label.inputPwdAgain%}</label>
				<img id="lgCkPwdBdgEyeIcon" class="zIndexLevelHigh" src="../web-static/images/eye_slash_fill.png" tabindex="-1"/>
			</div>
		</li>
	</ul>
	<div class="activateFunc">
		<input class="login subBtn" type="button" id="activateSub" value="{%label.activation%}" />
	</div>

	<div class="passwdDiv" id="weakPasswd">
		<div class="weakPasswdStrDiv">
			<span class="line1">{%label.weakPaswdStr%}</span>
		</div>
		<div class="passwdMaxStrengthLine"></div>
		<div class="weakPasswdLine"></div>
	</div>

	<div class="passwdDiv" id="midPasswd">
		<div class="midPasswdStrDiv">
			<span class="line1">{%label.midPaswdStr%}</span>
		</div>
		<div class="passwdMaxStrengthLine"></div>
		<div class="midPasswdLine"></div>
	</div>

	<div class="passwdDiv" id="strongPasswd">
		<div class="strongPasswdStrDiv">
			<span class="line1">{%label.strongPaswdStr%}</span>
		</div>
		<div class="passwdMaxStrengthLine"></div>
		<div class="strongPasswdLine"></div>
	</div>
</div>
<script type="text/javascript">var t_auth_encrypt,UCI_OPT=uciUserMgt.optName,UCI_FILE=uciUserMgt.fileName,GET_ENCRYPT_INFO=uciUserMgt.actionName.getEncryptInfo,CHG_USER_INFO=uciUserMgt.actionName.chgUsrInfo,USER_NAME=UCI_OPT.username,USER_COMMENT=UCI_OPT.comment,USER_SECNAME=UCI_OPT.secName,USER_PWD=UCI_OPT.passwd,USER_OLD_PWD=UCI_OPT.oldPasswd,CIPHERTEXT=UCI_OPT.ciphertext,ROOT_TYPE=uciUserMgt.secType.root;
function showActivateState(b,a,n){closeToast();0>=a?$.logout():(showToast(b,{noteStr:n+"("+a+"s)",stopSuccessTime:!0}),setTimeout(function(){showActivateState(b,a-1,n)},1E3))}
function forceModifyPwd(){var b={},a={};b[UCI_FILE]={};b[UCI_FILE][CHG_USER_INFO]=a;var n=id("lgPwd"),c=id("lgCkPwd");a[USER_NAME]=$.rootName;a[USER_SECNAME]=ROOT_TYPE;$.tmpPwdMD5=$.getPwdMD5($.rootName,c.value);a[USER_PWD]=$.dynEncryptPwd(orgAuthPwd(c.value),!0);a[USER_OLD_PWD]=$.dynEncryptPwd(orgAuthPwd(n.value));a[CIPHERTEXT]=$.encryptPwd(c.value);t_auth_encrypt&&(a[uciUserMgt.optName.encryptType]=$.getAuthEncryptType());$.action(b,function(a){0==a[ERR_CODE]?setTimeout(function(){showActivateState("success",
3,label.activateDone)},1E3):setTimeout(function(){showActivateState("warning",3,label.activateFailed)},1E3)})}function getEncryptInfo(b){if(t_auth_encrypt){var a={};a[UCI_FILE]={};a[UCI_FILE][GET_ENCRYPT_INFO]=null;$.action(a,function(a){if(0==a[ERR_CODE]){var c=a[uciUserMgt.optName.encryptType],p=a[uciUserMgt.optName.key];a=a[uciUserMgt.optName.nonce];c&&p&&a&&$.updAuthEncrypt(c,p,a);$.isFunction(b)&&b()}})}else $.isFunction(b)&&b()}
function getModuleSpceAndChangePasswd(){var b={};b[uciFunction.fileName]={};b[uciFunction.fileName][KEY_NAME]=[uciFunction.secName.moduleSpec];$.query(b,function(a){ENONE==a[ERR_CODE]||ENEEDACTIVATE==a[ERR_CODE]?($.moduleSpec=a[uciFunction.fileName][uciFunction.secName.moduleSpec],t_auth_encrypt=0,void 0!=$.moduleSpec[uciFunction.optName.authEncrypt]&&(t_auth_encrypt=parseInt($.moduleSpec[uciFunction.optName.authEncrypt])),getEncryptInfo(forceModifyPwd)):(closeToast(),showToast("warning",{noteStr:label.activateFailed}),
setTimeout(function(){closeToast();$.logout()},3E3))})}
function init(){function b(){var a=document.documentElement.clientHeight,d=$("div.lgCon"),a=parseInt(0.235*(400<a?a:400));d.css("marginTop",a);$("#Cover p").css("marginTop",a-10+parseInt(d.css("height")))}function a(){closeNote("lgPwdBdg");closeNote("lgUsernameBdg");closeNote("lgCkPwdBdg")}function n(){var b=id("userName"),d=id("lgPwd"),c=id("lgCkPwd"),e=b.value,g=d.value;a();0==g.length&&0==c.value.length?(showNote("lgPwdBdg",label.loginUserPwdKey),showNote("lgCkPwdBdg",label.inputPwdAgain)):8>g.length?
showNote("lgPwdBdg",label.passwdLengthRestrict64):0==g.length?showNote("lgPwdBdg",label.loginUserPwdKey):0==c.value.length?showNote("lgCkPwdBdg",label.inputPwdAgain):c.value!=g?showNote("lgCkPwdBdg",label.passwdNotSame):/((?=.*\d)(?=.*\D)|(?=.*[a-z])(?=.*[^a-z])|(?=.*[A-Z])(?=.*[^A-Z]))(?!^.*[\u4E00-\u9FA5].*$)/.test(d.value)?B(e,d.value)&&(showToast("loading",{noteStr:label.activating,stopSuccessTime:!0}),setTimeout(function(){$.auth(e,orgAuthPwd(g),g,function(a){a==ENONE||a==ENEEDACTIVATE?getModuleSpceAndChangePasswd():
setTimeout(function(){showActivateState("warning",3,label.activateFailed+a)},1E3)})},1E3)):(showNote("lgPwdBdg",errStr.pwdTypeValid),showNote("lgCkPwdBdg",errStr.pwdTypeValid))}function c(a,d){void 0==h&&(h=$("div.username")[0]);!0==d?$(h).removeClass("normal").addClass("active"):$(h).removeClass("active").addClass("normal");setStyle(a,{height:"32px"})}function p(a,d){void 0==k&&(k=$("div.password")[0]);!0==d?$(k).removeClass("normal").addClass("active"):$(k).removeClass("active").addClass("normal");
setStyle(a,{height:"32px"})}function r(a,d){void 0==l&&(l=$("div.password")[1]);!0==d?$(l).removeClass("normal").addClass("active"):$(l).removeClass("active").addClass("normal")}function B(a,d){if(!/^[\x21-\x7e]+$/.test(d))return showNote("lgPwdBdg",errStr.pwdCharValid),showNote("lgCkPwdBdg",errStr.pwdCharValid),!1;if(-1!=d.indexOf(a)||-1!=d.indexOf(a.split("").reverse().join("")))return showNote("lgPwdBdg",errStr.pwdUsrNameSame),showNote("lgCkPwdBdg",errStr.pwdUsrNameSame),!1;for(var b=1;b<d.length;b++)if("`"==
d.charAt(b))return showNote("lgPwdBdg",errStr.pwdCharValid),showNote("lgCkPwdBdg",errStr.pwdCharValid),!1;return!0}var s=id("userName"),e=id("lgPwd"),C=id("activateSub"),q=id("userTipStr"),t=id("pwdTipStr");id("helloStr");var m=id("lgCkPwd"),u=id("pwdCkTipStr"),v=id("lgPwdBdgEyeIcon"),w=id("lgCkPwdBdgEyeIcon"),h,k,l;(function(){function h(){t.style.display="none";p(this,!0)}function d(){0==this.value.length?t.style.display="inline":8>this.value.length&&showNote("lgPwdBdg",label.passwdLengthRestrict64);
p(this,!1)}function k(f){f=id("weakPasswd");var b=id("midPasswd"),d=id("strongPasswd"),c,e=id("lgPwd");f.style.visibility="hidden";b.style.visibility="hidden";d.style.visibility="hidden";a();8<=e.value.length&&(c=0,/[0-9]/.test(e.value)&&c++,/[a-z]/.test(e.value)&&c++,/[A-Z]/.test(e.value)&&c++,/[^a-zA-Z0-9]/.test(e.value)&&c++,1==c?f.style.visibility="visible":2==c?12>=e.value.length?f.style.visibility="visible":b.style.visibility="visible":3==c?12>=e.value.length?b.style.visibility="visible":d.style.visibility=
"visible":d.style.visibility="visible")}function l(f){a();p(this,!0);t.style.display="none";stopProp(f)}function g(){u.style.display="none";r(this,!0)}function x(){0==this.value.length&&(u.style.display="inline");0==id("lgCkPwd").value.length&&closeNote("lgCkPwdBdg");r(this,!1)}function y(a){id("lgCkPwd").value!=id("lgPwd").value?showNote("lgCkPwdBdg",label.passwdNotSame):closeNote("lgCkPwdBdg")}function z(f){8<=id("lgPwd").value.length&&a();r(this,!0);u.style.display="none";stopProp(f)}var A=id("userName");
A.value="admin";disableInput(A,!0);disableInput("lgUsernameBdg",!0);q.style.display="none";b();C.onclick=n;s.onfocus=function(){q.style.display="none";c(this,!0)};s.onblur=function(){0==this.value.length&&(q.style.display="inline");c(this,!1)};e.onfocus=h;e.onblur=d;e.value="";e.onkeyup=k;e.onclick=l;m.onfocus=g;m.onblur=x;m.value="";m.onkeyup=y;m.onclick=z;s.onclick=function(f){a();c(this,!0);q.style.display="none";stopProp(f)};window.onresize=function(){b()};document.body.style.height="100%";v.onclick=
function(){var a="",a=id("lgPwdWrap").innerHTML,b=id("lgPwd").value,c=id("lgPwd").orgBC;0<b.length&&("password"==id("lgPwd").getAttribute("type")?(v.src="../web-static/images/eye_fill.png",a=a.replace(/type\s*=\s*('|")?password('|")?/ig,'type="text"')):(v.src="../web-static/images/eye_slash_fill.png",a=a.replace(/type\s*=\s*('|")?text('|")?/ig,'type="password"')),a=$("#lgPwdWrap").html(a).find("input")[0],a.value=b,a.onclick=l,a.onkeyup=k,a.onblur=d,a.onfocus=h,e=id("lgPwd"),void 0!=c&&(e.orgBC=c))};
w.onclick=function(){var a="",a=id("lgCkPwdrap").innerHTML,b=id("lgCkPwd").value,c=id("lgCkPwd").orgBC;0<b.length&&("password"==id("lgCkPwd").getAttribute("type")?(w.src="../web-static/images/eye_fill.png",a=a.replace(/type\s*=\s*('|")?password('|")?/ig,'type="text"')):(w.src="../web-static/images/eye_slash_fill.png",a=a.replace(/type\s*=\s*('|")?text('|")?/ig,'type="password"')),$("#lgCkPwdrap").html(a).find("input")[0].value=b,a=$("#lgCkPwdrap").html(a).find("input")[0],a.value=b,a.onclick=z,a.onkeyup=
y,a.onblur=x,a.onfocus=g,m=id("lgCkPwd"),void 0!=c&&(m.orgBC=c))}})()}init();
</script><style type="text/css">.zIndexLevelHigh{z-index:20}.zIndexLevelMid{z-index:19}.zIndexLevelLow{z-index:18}</style>