var bt_status = "No connection"; var bt_enable = 0; var frz_pab = false; var max_pbrecords = 300; function fn_chk_bt_sta() { var arr_bt_st = new Array(); var obj_td_bt_dl_pb = top.document.getElementById("bt_dl_pb"); var cnt_pb_records = top.document.getElementById("iframe_personal_directory_list").contentWindow.arr_profile_field.length; arr_bt_st = bt_status.split(":"); if(parseInt(bt_enable) && (arr_bt_st.length == 2) && (arr_bt_st[1] == "C2")) { var bt_dwld_pb = document.createElement("input"); bt_dwld_pb.setAttribute("type", "button"); bt_dwld_pb.setAttribute("name", "bt_import_pb"); bt_dwld_pb.setAttribute("value", obj_btn.imp_pb); bt_dwld_pb.onclick = function(){fn_dw_btpb(top.frames[4].window.document.frm_hidden_bt_download)}; if(cnt_pb_records == max_pbrecords) bt_dwld_pb.disabled = true; else bt_dwld_pb.disabled = false; obj_td_bt_dl_pb.appendChild(bt_dwld_pb); } } function fn_personal_directory_info() { fn_onload(); fn_chk_bt_sta(); frz_pab = fn_is_readonly(obj_page.pab); } function fn_remove_personal_directory(ARGV_form, ARGV_submit_form) { var pd_list_length = top.frames[3].arr_old_pd_list.length; var i; var obj_chkbox; var counter = 0; var current_page; var start_record; var end_record; var total_page; ARGV_submit_form.hdn_submit_page.value = obj_page.pab; ARGV_submit_form.hdn_reply_page.value = obj_page.pab; ARGV_submit_form.hdn_rm_pd_records.value = ""; total_page = Math.ceil(pd_list_length / top.frames[3].max_record_per_page); current_page = top.frames[3].current_selected_index; start_record = (current_page - 1) * top.frames[3].max_record_per_page; if(top.frames[3].current_selected_index == total_page) { end_record = pd_list_length; }else{ end_record = current_page * top.frames[3].max_record_per_page; } if(top.frames[3].document.frm_pd_list.chk_sel_pd_list_all.checked) { if(!confirm(errmsg.err78)) { return; } for(i = start_record; i < end_record; i++) { if((i == (pd_list_length - 1)) || (i == (end_record - 1))) { ARGV_submit_form.hdn_rm_pd_records.value = ARGV_submit_form.hdn_rm_pd_records.value + top.frames[3].arr_old_pd_list[i].KEY; }else{ ARGV_submit_form.hdn_rm_pd_records.value = ARGV_submit_form.hdn_rm_pd_records.value + top.frames[3].arr_old_pd_list[i].KEY + smt_sep_ptn; } } }else{ for(i = start_record; i < end_record; i++) { eval("obj_chkbox = top.frames[3].document.getElementById(\"chk_select_pd_list" + i + "\")"); if(obj_chkbox.checked) { counter++; ARGV_submit_form.hdn_rm_pd_records.value = ARGV_submit_form.hdn_rm_pd_records.value + top.frames[3].arr_old_pd_list[i].KEY + smt_sep_ptn; } } if(counter) { if(!confirm(errmsg.err85)){return;} ARGV_submit_form.hdn_rm_pd_records.value = ARGV_submit_form.hdn_rm_pd_records.value.slice(0, ARGV_submit_form.hdn_rm_pd_records.value.lastIndexOf(smt_sep_ptn)); }else{ alert(errmsg.err57); return; } } ARGV_submit_form.submit(); } function fn_freeze_pab() { var pab_frm = document.frm_personal_directory; var arr_del_itm = new Array("bt_add_personal_directory", "bt_remove_personal_directory"); var pab_pro_lst_frm; var cnt_pab_pro = top.document.getElementById("iframe_personal_directory_list").contentWindow.arr_profile_field.length; var i; for(i = 0; i < arr_del_itm.length; i++) { eval("pab_frm." + arr_del_itm[i] + ".disabled = true;"); } pab_pro_lst_frm = top.document.getElementById("iframe_personal_directory_list").contentWindow.document.frm_pd_list; pab_pro_lst_frm.chk_sel_pd_list_all.disabled = true; if(!cnt_pab_pro){return;} fn_frz_entry_pab(pab_pro_lst_frm, 1); } function fn_frz_entry_pab(ARGV_form, ARGV_page) { var cnt_pab_rec = top.document.getElementById("iframe_personal_directory_list").contentWindow.arr_profile_field.length; var cnt_page = Math.ceil(cnt_pab_rec / max_record_per_page); var start_rec = (ARGV_page - 1) * max_record_per_page; var end_rec; var j; var obj_edt; var obj_sd; if(ARGV_page == cnt_page) { end_rec = cnt_pab_rec; }else{ end_rec = ARGV_page * max_record_per_page; } for(j = start_rec; j < end_rec; j++) { eval("ARGV_form.chk_select_pd_list" + j + ".disabled = true;"); obj_edt = eval("top.frames[3].document.getElementById(\"img_edit_pd_list" + j +"\")"); obj_edt.onclick = function(){return;}; obj_sd = eval("top.frames[3].document.getElementById(\"img_quick_dial_pd_list" + j +"\")"); obj_sd.onclick = function(){return;}; } } function fn_dw_btpb(ARGV_submit_form) { if(!confirm(errmsg.err97)){return;} top.document.getElementById("load_webpage4").contentWindow.fn_download_pb(ARGV_submit_form); fn_sw_bt_dwpb_pg(); } function fn_sw_bt_dwpb_pg() { var i; var arr_enable_disable_page = new Array("div_disable_page", "div_enable_page3"); var obj_div; var ret_value; obj_div = top.document.getElementById("load_webpage4"); if(obj_div == null) { alert("error: fn_sw_bt_dwpb_pg"); return; } for(i = 0; i < arr_enable_disable_page.length; i++) { obj_div = top.document.getElementById(arr_enable_disable_page[i]); if(obj_div == null) { alert("error: fn_sw_bt_dwpb_pg"); return; } if(obj_div.style.display == "none") { obj_div.style.display = "block"; }else{ obj_div.style.display = "none"; } } top.document.getElementById("load_webpage4").contentWindow.fn_count_down(); }