var __password=function(a){var q=function(f){function n(a){if(!a)return alert("UI load error."),!1;var b=document.createElement("div");document.body.insertBefore(b,document.body.firstChild);b.innerHTML=a;return!0}function g(a){if(!a)return!1;a=a||window.event;13==(a.which||a.keyCode)&&document.getElementById("us-password-confirm-btn").click()}var c=function(){var b=window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0");b.open("GET",a.ESVS.SRCPath+"unisignweb/rsrc/layout/password.html?version="+a.ver,!1);b.send(null);return b.responseText},k=function(){var b=window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("MSXML2.XMLHTTP.3.0");b.open("GET",a.ESVS.SRCPath+"unisignweb/rsrc/lang/"+a.ESVS.Language+"/password_"+a.ESVS.Language+".js?version="+a.ver,!1);b.send(null);return b.responseText},d=a.ESVS.TabIndex;return function(){var b=a.CustomEval(c),e=a.CustomEval(k,!0);n(b());var l=document.getElementById("us-password-lbl-title");l.appendChild(document.createTextNode(e.IDS_PASSWORD));l.setAttribute("tabindex",d,0);document.getElementById("us-password-cls-btn-img").setAttribute("src",a.ESVS.SRCPath+"unisignweb/rsrc/img/x-btn.png",0);document.getElementById("us-password-cert-img").setAttribute("src",a.ESVS.SRCPath+"unisignweb/rsrc/img/password-cert-img.png",0);b=document.getElementById("us-password-notice-text");b.appendChild(document.createTextNode(e.IDS_PASSWORD_NOTICE));a.uiUtil().addCapsLockEvent("us-password-input-textbox","us-pwd-err-msg-capslock",e.IDS_MSGBOX_CAPSLOCK_ON,g);var h=document.getElementById("us-password-input-textbox");h.setAttribute("tabindex",d+1,0);h.setAttribute("title",e.IDS_PASSWORD,0);h=document.getElementById("us-password-confirm-btn");h.setAttribute("value",e.IDS_CONFIRM,0);h.setAttribute("tabindex",d+2,0);h.onclick=function(){if(e){var b=document.getElementById("us-password-input-textbox"),c=b.value;c&&4&a.ESVS.Mode&&("touchen"==a.ESVS.SecureKeyboardType&&a.bsUtil().isTouchEnKeyUsable()?c=a.bsUtil().GetEncryptPwd("us-keyboard-secure-frm","us-password-input-textbox"):"ahnlab"==a.ESVS.SecureKeyboardType&&a.bsUtil().isAhnlabProtectorUsable()&&(c=a.bsUtil().GetAhnlabEncInputInfo("us-password-input-textbox")));c?(f.onConfirm(c),b.value=""):(a.uiUtil().msgBox(e.IDS_MSGBOX_ERROR_PLEASE_INPUT_PASSWORD),b.focus())}};var m=document.getElementById("us-password-cancel-btn");m.setAttribute("value",e.IDS_CANCEL,0);m.setAttribute("tabindex",d+3,0);m.onclick=function(){f.onCancel()};var p=document.getElementById("us-password-cls-btn");p.setAttribute("title",e.IDS_PASSWORD_CLOSE,0);p.setAttribute("tabindex",d+4,0);p.onfocus=function(){l.focus()};p.onclick=function(){f.onCancel()};a.uiUtil().setRotationTabFocus(m,h,l);a.uiUtil().setRotationTabFocus(l,m,b);return document.getElementById("us-div-password")}()};return function(f){var n=a.uiLayerLevel,g=a.uiUtil().getOverlay(n),c=q({type:f.type,args:f.args,onConfirm:f.onConfirm,onCancel:f.onCancel});c.style.zIndex=n+1;a.ESVS.TargetObj.insertBefore(g,a.ESVS.TargetObj.firstChild);var k=window.onresize;return{show:function(){a.bsUtil().AhnlabClearText("us-password-input-textbox");a.ActiveUI=this;draggable(c,document.getElementById("us-div-password-title"));g.style.display="block";a.uiUtil().offsetResize(c);window.onresize=function(){a.uiUtil().offsetResize(c);k&&k()};a.uiLayerLevel+=10;a.ESVS.TabIndex+=30;a.bsUtil().ahnlabInit();setTimeout(function(){var d=c.getElementsByTagName("p");if(0<d.length)for(var b=0;b<d.length;b++)"us-password-lbl-title"==d[b].id&&d[b].focus();a.bsUtil().SetSecurityStatus("us-password-input-textbox");a.bsUtil().SetReScan()},10)},hide:function(){g.style.display="none";c.style.display="none"},dispose:function(){window.onresize=function(){k&&k()};c.parentNode.parentNode.removeChild(c.parentNode);g.parentNode.removeChild(g);a.uiLayerLevel-=10;a.ESVS.TabIndex-=30}}}};