var __changepassword=function(a){var w=function(k){function t(a){if(!a)return alert("UI load error."),!1;var c=document.createElement("div");document.body.insertBefore(c,document.body.firstChild);c.innerHTML=a;return!0}function n(){var b=document.getElementById("us-change-password-new-first-textbox").value,c=document.getElementById("us-change-password-check-rule1"),d=document.getElementById("us-change-password-check-rule2"),h=document.getElementById("us-change-password-check-rule3"),g=document.getElementById("us-change-password-check-rule4"),f=document.getElementById("us-change-password-check-rule5"),e=!0;a.ESVS.LimitMinNewPWLen<=b.length?c.className="check":(c.className="",e=!1);if(a.bsUtil().isKeyProtected())return e;"NPKI"===a.ESVS.PKI&&a.ESVS.ChangePWByNPKINewPattern||"NPKI"!=a.ESVS.PKI&&2===a.ESVS.LimitNewPWPattern?(c=/^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[^a-zA-Z0-9])/g,c.exec(b)?d.className="check":(d.className="",e=!1)):1===a.ESVS.LimitNewPWPattern&&(c=/^(?=.*[a-zA-Z])(?=.*[0-9])/g,c.exec(b)?d.className="check":(d.className="",e=!1));if("NPKI"===a.ESVS.PKI&&a.ESVS.ChangePWByNPKINewPattern)if(c=/['"\\|]/g,c.exec(b)?(f.className="",e=!1):f.className="check",2("+a.ESVS.LimitMinNewPWLen+c.IDS_CHANGE_PASSWORD_LIMIT+")";document.getElementById("us-change-password-origin-lbl").appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_ORIGIN+" :"));event.getModifierState?(a.uiUtil().addCapsLockEvent("us-change-password-origin-textbox","us-change-password-err-msg-capslock","",null),a.uiUtil().addCapsLockEvent("us-change-password-new-first-textbox","us-change-password-err-msg-capslock","",null),a.uiUtil().addCapsLockEvent("us-change-password-new-second-textbox","us-change-password-err-msg-capslock","",null)):a.uiUtil().addCapsLockEvent("us-change-password-origin-textbox","us-change-password-err-msg-capslock","",null);document.getElementById("us-change-password-err-msg-capslock-text").appendChild(document.createTextNode(c.IDS_MSGBOX_CAPSLOCK_ON));var h=document.getElementById("us-change-password-origin-textbox");h.setAttribute("tabindex",l+1,0);h.setAttribute("title",c.IDS_CHANGE_PASSWORD_ORIGIN,0);h.onkeyup=function(a){a.getModifierState&&(a.getModifierState("CapsLock")?(document.getElementById("us-change-password-err-msg-capslock").style.top=h.offsetTop+0+30+"px",document.getElementById("us-change-password-err-msg-capslock").style.display="block"):document.getElementById("us-change-password-err-msg-capslock").style.display="none")};h.onfocus=function(a){"block"==document.getElementById("us-change-password-err-msg-capslock").style.display&&(document.getElementById("us-change-password-err-msg-capslock").style.top=h.offsetTop+0+30+"px")};document.getElementById("us-change-password-new-first-lbl").appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_NEW_FIRST+" :"));var g=document.getElementById("us-change-password-new-first-textbox");g.setAttribute("tabindex",l+2,0);g.setAttribute("title",c.IDS_CHANGE_PASSWORD_NEW_FIRST,0);g.onkeyup=function(a){a.getModifierState&&(a.getModifierState("CapsLock")?(document.getElementById("us-change-password-err-msg-capslock").style.top=g.offsetTop+0+30+"px",document.getElementById("us-change-password-err-msg-capslock").style.display="block"):document.getElementById("us-change-password-err-msg-capslock").style.display="none");n()};g.onfocus=function(a){"block"==document.getElementById("us-change-password-err-msg-capslock").style.display&&(document.getElementById("us-change-password-err-msg-capslock").style.top=g.offsetTop+0+30+"px")};document.getElementById("us-change-password-new-second-lbl").appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_NEW_SECOND+" :"));var f=document.getElementById("us-change-password-new-second-textbox");f.setAttribute("tabindex",l+3,0);f.setAttribute("title",c.IDS_CHANGE_PASSWORD_NEW_SECOND,0);f.onkeydown=function(a){if(a=a?a:event)a=a||window.event,13==(a.which||a.keyCode)&&document.getElementById("us-change-password-confirm-btn").click()};f.onkeyup=function(a){a.getModifierState&&(a.getModifierState("CapsLock")?(document.getElementById("us-change-password-err-msg-capslock").style.top=f.offsetTop+0+30+"px",document.getElementById("us-change-password-err-msg-capslock").style.display="block"):document.getElementById("us-change-password-err-msg-capslock").style.display="none")};f.onfocus=function(a){"block"==document.getElementById("us-change-password-err-msg-capslock").style.display&&(document.getElementById("us-change-password-err-msg-capslock").style.top=f.offsetTop+0+30+"px")};document.getElementById("us-change-password-check-rule1").appendChild(document.createTextNode(a.ESVS.LimitMinNewPWLen+""+c.IDS_CHANGE_PASSWORD_RULE1));if("NPKI"===a.ESVS.PKI&&a.ESVS.ChangePWByNPKINewPattern){var e=document.getElementById("us-change-password-check-rule2");e.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE2_ALL));var p=document.getElementById("us-change-password-check-rule3");p.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE3));var r=document.getElementById("us-change-password-check-rule4");r.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE4));var u=document.getElementById("us-change-password-check-rule5");u.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE5));a.bsUtil().isKeyProtected()&&(e.className="disable",p.className="disable",r.className="disable",u.className="disable")}else e=document.getElementById("us-change-password-check-rule2"),1===a.ESVS.LimitNewPWPattern?e.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE2_ENGNUM)):"NPKI"!=a.ESVS.PKI&&2===a.ESVS.LimitNewPWPattern&&e.appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_RULE2_ALL)),a.bsUtil().isKeyProtected()&&(e.className="disable");document.getElementById("us-change-password-warning-text").appendChild(document.createTextNode(c.IDS_CHANGE_PASSWORD_WARNING));e=document.getElementById("us-change-password-confirm-btn");e.setAttribute("value",c.IDS_CONFIRM,0);e.setAttribute("tabindex",l+4,0);e.onclick=function(){m(c)};p=document.getElementById("us-change-password-cancel-btn");p.setAttribute("value",c.IDS_CANCEL,0);p.setAttribute("tabindex",l+5,0);p.onclick=function(){k.onCancel()};r=document.getElementById("us-change-password-cls-img-btn");r.setAttribute("tabindex",l+6,0);r.onclick=function(){k.onCancel()};a.uiUtil().setRotationTabFocus(p,e,b);a.uiUtil().setRotationTabFocus(b,p,d);return document.getElementById("us-div-change-password")}()};return function(k){var t=a.uiLayerLevel,n=a.uiUtil().getOverlay(t),m=w({type:k.type,args:k.args,onConfirm:k.onConfirm,onCancel:k.onCancel});m.style.zIndex=t+1;a.ESVS.TargetObj.insertBefore(n,a.ESVS.TargetObj.firstChild);var q=window.onresize;return{show:function(){a.ActiveUI=this;draggable(m,document.getElementById("us-div-change-password-title"));n.style.display="block";a.uiUtil().offsetResize(m);window.onresize=function(){a.uiUtil().offsetResize(m);q&&q()};a.uiLayerLevel+=10;a.ESVS.TabIndex+=30;a.bsUtil().ahnlabInit();setTimeout(function(){var k=m.getElementsByTagName("p");if(0