var arr_bluetooth_device_value = new Array("1", "0"); var arr_wl_bluetooth_id = new Array("bt_sta", "bt_mode", "bt_hsty", "bt_btn_rm", "bt_dev", "bt_btn_srch"); var obj_div_dev; var frz_bt = false; if(isHebrew == "1") { var arr_bluetooth_device = new Array(obj_sb_tle.off,obj_sb_tle.on); } else { var arr_bluetooth_device = new Array(obj_sb_tle.on,obj_sb_tle.off); } function fn_bluetooth_info() { var bt_enable = 0; var bt_form = document.frm_bluetooth; fn_onload(); if(parseInt(bt_enable)) { bt_form.ra_bluetooth_device[0].checked = true; }else{ bt_form.ra_bluetooth_device[1].checked = true; } fn_show_bluetooth_options(bt_form); frz_bt = fn_is_readonly(obj_page.bt); } function fn_view_history(ARGV_form) { var obj_history_id; obj_history_id = document.getElementById("history"); if(obj_history_id == null) { alert("error on fn_view_history"); return; } if(obj_history_id.style.display == "block") { obj_history_id.style.display = "none"; ARGV_form.bt_history.value = obj_options_label.view_history; }else{ obj_history_id.style.display = "block"; ARGV_form.bt_history.value = obj_options_label.close_history; } } function fn_show_bluetooth_options(ARGV_form) { var obj_div_id; var i; for(i = 0; i < arr_wl_bluetooth_id.length; i++) { obj_div_id = document.getElementById(arr_wl_bluetooth_id[i]); if(obj_div_id == null) { alert("error on fn_show_bluetooth_options"); return; } if(ARGV_form.ra_bluetooth_device[0].checked) { obj_div_id.style.display = "block"; }else{ obj_div_id.style.display = "none"; } } } function fn_show_bluetooth_status() { var current_status; current_status = "disconnect"; return current_status; } function fn_remove_bt_history(ARGV_form, ARGV_submit_form) { var bt_history_length = top.frames[3].arr_old_bt_history.length; var i; var obj_chkbox; var counter = 0; ARGV_submit_form.hdn_submit_page.value = obj_page.bt; ARGV_submit_form.hdn_reply_page.value = obj_page.bt; ARGV_submit_form.hdn_bt_device.value = ARGV_form.ra_bluetooth_device[0].value; ARGV_submit_form.hdn_rm_bt_history.value = ""; if(top.frames[3].document.frm_bt_history.chk_sel_bt_history_all.checked) { if(!confirm(errmsg.err83)) { return; } for(i = 0; i < bt_history_length; i++) { if(i == (bt_history_length - 1)) { ARGV_submit_form.hdn_rm_bt_history.value = ARGV_submit_form.hdn_rm_bt_history.value + top.frames[3].arr_old_bt_history[i].KEY; }else{ ARGV_submit_form.hdn_rm_bt_history.value = ARGV_submit_form.hdn_rm_bt_history.value + top.frames[3].arr_old_bt_history[i].KEY + smt_sep_ptn; } } }else{ for(i = 0; i < bt_history_length; i++) { eval("obj_chkbox = top.frames[3].document.getElementById(\"chk_select_bt_history" + i + "\")"); if(obj_chkbox.checked) { counter++; ARGV_submit_form.hdn_rm_bt_history.value = ARGV_submit_form.hdn_rm_bt_history.value + top.frames[3].arr_old_bt_history[i].KEY + smt_sep_ptn;; } } if(counter) { if(!confirm(errmsg.err90)){return;} ARGV_submit_form.hdn_rm_bt_history.value = ARGV_submit_form.hdn_rm_bt_history.value.slice(0, ARGV_submit_form.hdn_rm_bt_history.value.lastIndexOf(smt_sep_ptn)); }else{ alert(errmsg.err57); return; } } ARGV_submit_form.submit(); } function fn_show_bt_scan_page() { var i; var arr_enable_disable_page = new Array("div_disable_page", "div_enable_page1"); var obj_div; obj_div = top.document.getElementById("load_webpage1"); if(obj_div == null) { alert("error: fn_show_bt_scan_page"); 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_show_bt_scan_page"); return; } obj_div_dev = top.document.getElementById("iframe_bt_device"); if(obj_div_dev == null) { alert("error: fn_show_bt_scan_page"); return; } if(obj_div.style.display == "none") { obj_div.style.display = "block"; if(i == 0) { obj_div_dev.height = 90; obj_div_dev.src = obj_page.bt_list; top.document.getElementById("load_webpage1").contentWindow.fn_count_down(); } }else{ window.location.href = obj_page.bt_srch; obj_div.style.display = "none"; } } } function fn_submit_bluetooth(ARGV_form, ARGV_submit_form) { var field_separate_symbol = ":"; var i; var profile_length = top.frames[3].arr_old_bt_history.length; ARGV_submit_form.hdn_submit_page.value = obj_page.bt; ARGV_submit_form.hdn_reply_page.value = obj_page.bt; ARGV_submit_form.hdn_bt_device.value = ARGV_form.ra_bluetooth_device[0].checked ? ARGV_form.ra_bluetooth_device[0].value : ARGV_form.ra_bluetooth_device[1].value; ARGV_submit_form.hdn_bt_history_order.value = ""; ARGV_submit_form.hdn_bt_history_key_auto_connect.value = ""; for(i = 0; i < profile_length; i++) { if(i == (profile_length - 1)) { ARGV_submit_form.hdn_bt_history_order.value = ARGV_submit_form.hdn_bt_history_order.value + top.frames[3].arr_old_bt_history[i].KEY; ARGV_submit_form.hdn_bt_history_key_auto_connect.value = ARGV_submit_form.hdn_bt_history_key_auto_connect.value + top.frames[3].arr_old_bt_history[i].KEY + field_separate_symbol + top.frames[3].arr_old_bt_history[i].AUTO_CONNECT; }else{ ARGV_submit_form.hdn_bt_history_order.value = ARGV_submit_form.hdn_bt_history_order.value + top.frames[3].arr_old_bt_history[i].KEY + smt_sep_ptn; ARGV_submit_form.hdn_bt_history_key_auto_connect.value = ARGV_submit_form.hdn_bt_history_key_auto_connect.value + top.frames[3].arr_old_bt_history[i].KEY + field_separate_symbol + top.frames[3].arr_old_bt_history[i].AUTO_CONNECT + smt_sep_ptn; } } ARGV_submit_form.submit(); } function fn_remove_old_table_bt_data() { var table_tbody = top.frames[4].document.getElementById("tb_bt_list").getElementsByTagName("tbody")[0]; var table_tbody_tr; var max_bt_device = 10; var i; if(table_tbody == null) { alert("error: fn_remove_old_table_bt_data"); return; } for(i = -1; i < max_bt_device; i++) { table_tbody_tr = eval("top.frames[4].document.getElementById(\"tr" + i + "\")"); if(table_tbody_tr == null) { continue; } table_tbody.removeChild(table_tbody_tr); } } function fn_cancel_bluetooth(ARGV_page) { window.location.href = ARGV_page; } function fn_freeze_bt() { var bt_frm = document.frm_bluetooth; var arr_del_itm = new Array("ra_bluetooth_device[0]", "ra_bluetooth_device[1]", "bt_bt_status_update", "bt_remove_bt_history", "bt_search", "bt_submit", "bt_cancel"); var bt_hst_frm; var cnt_bt_hst = top.document.getElementById("iframe_bt_history").contentWindow.arr_old_bt_history.length; var i; var j; var obj_odr; var obj_cnnt; for(i = 0; i < arr_del_itm.length; i++) { eval("bt_frm." + arr_del_itm[i] + ".disabled = true;"); } bt_hst_frm = top.document.getElementById("iframe_bt_history").contentWindow.document.frm_bt_history; bt_hst_frm.chk_sel_bt_history_all.disabled = true; if(!cnt_bt_hst){return;} for(j = 0; j < cnt_bt_hst; j++) { eval("bt_hst_frm.chk_select_bt_history" + j + ".disabled = true;"); obj_odr = eval("top.frames[3].document.getElementById(\"img_order_profile" + j +"\")"); obj_odr.onclick = function(){return;}; obj_edt = eval("top.frames[3].document.getElementById(\"sl_bt_auto_connect" + j +"\")"); obj_edt.disabled = true; } }