var __certlistui=function(a){var x=function(d){function r(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(){h&&h.restoreOnMouseEvent();d.onCancel()}function e(b,c){if(!b||!c)return!1;if(!a.certsList||0>h.selectedIndex())return a.uiUtil().msgBox(c.IDS_MSGBOX_COMMON_ERROR_NO_SELECTED_CERT),!1;var d=a.loadUI("certview")({type:null,args:{type:"Base64",idx:parseInt(h.selectedIndex()),cert:a.certsList.list[parseInt(h.selectedIndex())-1].cert},onConfirm:function(){d.dispose();b.focus()},onCancel:function(){d.dispose();b.focus()}});d.show();a.uiUtil().loadingBox(!1,"us-div-cert-list-load");return!0}function q(b,c){if(!b||!c)return!1;y=a.loadUI("gridlist");h=y({type:"certslist",tblid:"us-tbl-cert-list",tbltitleid:"us-tbl-cert-list-th",titlelistid:"us-grid2-head-div",titlerowid:"us-cert-list-title-row",titleelementid:"us-cert-list-title-element",titledividerid:"us-cert-list-title-divider",titlelistcn:"us-layout-grid-head-div",titlerowcn:"us-layout-grid-head-row",titleelementcn:"us-layout-grid-row-title-element",titledividercn:"us-layout-grid-row-title-divider",tblbodyid:"us-tbl-cert-list-td",datalistid:"us-grid2-body-div",datarowid:"us-cert-list-body-row",dataelementid:"us-cert-list-data-element",datalistcn:"us-layout-grid-body-div",datarowcn:"us-layout-grid-body-row",dataelementcn:"us-layout-grid-row-data-element",dataselectcn:"us-layout-grid-row-data-selected-element",textObj:c});var p=!0;"opera"==a.browserName&&(p=!1);h.drawList(b,b.length,null,0,z,p);u(A,B,c,"",function(b){if(0!=b)a.uiUtil().errMsgBox(c.IDS_MSGBOX_COMMON_ERROR_GET_CERT,b);else{if(a.certsList){b=a.certsList;var m=b.list.length,p=[],l=d.args.dn,e=null;null!=a.ESVS.Policy&&(-1!=a.ESVS.Policy.indexOf("|")?e=a.ESVS.Policy.split("|"):(e=[],e[0]=a.ESVS.Policy));var n=null;null!=a.ESVS.Organization&&(-1!=a.ESVS.Organization.indexOf("|")?n=a.ESVS.Organization.split("|"):(n=[],n[0]=a.ESVS.Organization));for(var f=0;fb||0>c||!e)return-1;var g=0,p=0;B=c;a.certsList&&(a.certsList=null);if(a.CONST.__PF_M_LS.device===b&&2&a.ESVS.Mode){a.PFSH||m(-1);try{a.PFSH.SelectStorage(1)}catch(f){l.log("***** Plugin Free SelectStorage error *****"),l.log("e.code : ",f.code,"e.message : ",f.message,"e.detail : ",f.detail)}try{a.PFSH.LoadAllCerts(document.domain)}catch(f){301E5===f.code?(a.PFSH.InstallCACerts(document.domain),a.PFSH.LoadAllCerts(document.domain)):(l.log("***** Plugin Free LoadAllCerts error *****"),l.log("e.code : ",f.code,"e.message : ",f.message,"e.detail : ",f.detail))}c=null;try{c=a.PFSH.GetUserCerts(document.domain),a.PFUC=c}catch(f){l.log("***** Plugin Free GetUserCerts error *****"),l.log("e.code : ",f.code,"e.message : ",f.message,"e.detail : ",f.detail)}c&&(g=c.length-1);l.log("***** Plugin Free *****");l.log("user certificate counts : ",g);if(0