var arr_sec_id = new Array("disable", "wep", "wpa_psk", "wpa_psk_wpa_enterprise", "wpa_enterprise_radius"); var arr_eap_id = new Array( "wpa_enterprise_radius_ttls_anonymous", "wpa_enterprise_radius_tls_ttls", "wpa_enterprise_radius_tls_ttls_cert", "wpa_enterprise_radius_tls", "wpa_enterprise_radius_ttls", "wpa_enterprise_radius_uid", "wpa_enterprise_radius_leap_ttls", "wpa_enterprise_radius_peap"); var arr_wifi_sec = new Array(obj_sec.disabled, obj_sec.wep, obj_sec.wpa_psk, obj_sec.wpa2_psk, obj_sec.wpa_enterprise, obj_sec.wpa2_enterprise, obj_sec.radius); var arr_wifi_sec_val = new Array("1", "2", "3", "4", "5", "6", "7"); var arr_txkey = new Array("1", "2", "3", "4"); var arr_txkey_val = new Array("0", "1", "2", "3"); var arr_wep_encp = new Array(obj_pro_tle.hex10, obj_pro_tle.hex26, obj_pro_tle.asc5, obj_pro_tle.asc13); var arr_wep_encp_val = new Array("0", "1", "2", "3"); var arr_wpapsk = new Array(obj_pro_tle.tkip, obj_pro_tle.aes); var arr_wpapsk_val = new Array("0", "1"); var arr_wpaeap = new Array(obj_sec.leap, obj_sec.tls, obj_sec.ttls, obj_sec.peap); var arr_wpaeap_val = new Array("3", "1", "2", "4"); var arr_chksrv_ca = new Array(obj_sb_tle.on, obj_sb_tle.off); var arr_chksrv_ca_val = new Array("1", "2"); var arr_wpattls_inr = new Array( obj_pro_tle.md5, obj_pro_tle.mschap2, obj_pro_tle.mschap, obj_pro_tle.pap, obj_pro_tle.chap); var arr_wpattls_inr_val = new Array("0", "1", "2", "3", "4"); var arr_wl_conn = new Array(obj_pro_tle.enabled, obj_pro_tle.disabled); var arr_wl_conn_val = new Array("4", "0"); function fn_sw_sec_opt(AG_form) { var i; var sec_ind; var obj_div_id; sec_ind = parseInt(AG_form.sl_wl_security.selectedIndex); for(i = 0; i < arr_sec_id.length; i++) { obj_div_id = top.frames[0].document.getElementById(arr_sec_id[i]); if(obj_div_id == null){alert("error on fn_sw_sec_opt");return;} obj_div_id.style.display = "none"; } for(i = 0; i < arr_eap_id.length; i++) { obj_eap_id = top.frames[0].document.getElementById(arr_eap_id[i]); if(obj_eap_id == null) { alert("error on fn_show_security_options"); return; } obj_eap_id.style.display = "none"; } switch(sec_ind) { case 1: for(i = 0; i <= 1; i++){fn_sw_sec_fld(arr_sec_id[i]);} top.frames[0].document.frm_wifi_pro.ra_wep_tx_key[0].checked = true; fn_chg_maxchar(AG_form, 'txt_wep_key', 4); break; case 2: case 3: for(i = 2; i <= 3; i++){fn_sw_sec_fld(arr_sec_id[i]);} break; case 4: case 5: fn_sw_sec_fld(arr_sec_id[2]); fn_sw_sec_fld(arr_sec_id[4]); fn_sw_eap_opt(AG_form); top.frames[0].document.frm_wifi_pro.ra_wap_chk_server_certify[1].checked = true; break; case 6: fn_sw_sec_fld(arr_sec_id[0]); fn_sw_sec_fld(arr_sec_id[4]); fn_sw_eap_opt(AG_form); top.frames[0].document.frm_wifi_pro.ra_wap_chk_server_certify[1].checked = true; break; } } function fn_get_cipher() { document.write("" + obj_sec.wep + ""); } function fn_chg_maxchar(AG_form, AG_pre_fname, AG_amount) { var i; var len_wepkey; switch(parseInt(AG_form.sl_wep_encrypt.selectedIndex)) { case 0: len_wepkey = 10; break; case 1: len_wepkey = 26; break; case 2: len_wepkey = 5; break; case 3: len_wepkey = 13; break; } for(i = 1; i <= AG_amount; i++) { eval("AG_form." + AG_pre_fname + i + ".value = ''"); eval("AG_form." + AG_pre_fname + i + ".maxLength = len_wepkey"); } } function fn_vfy_wepkey(AG_form, AG_obj, AG_fname) { var len_wepkey; var ret; switch(parseInt(AG_form.sl_wep_encrypt.selectedIndex)) { case 0: len_wepkey = 10; break; case 1: len_wepkey = 26; break; case 2: len_wepkey = 5; break; case 3: len_wepkey = 13; break; } if(AG_obj.value.length && (AG_obj.value.length != len_wepkey)) { alert(errmsg.err07h + len_wepkey + errmsg.err07t); AG_obj.value = AG_obj.defaultValue; eval("AG_form." + AG_fname + ".focus()"); return; } (len_wepkey == 10) || (len_wepkey == 26) ? ret = fn_isxdigit(AG_obj) : ret = fn_is_ascii(AG_obj, "SPACE_ALLOW"); if(ret == false) { eval("AG_form." + AG_fname + ".focus()"); return; } } function fn_vfy_wpapsk(AG_form, AG_obj, AG_fname) { var ret; if(!AG_obj.value.length){ return; }else if((AG_obj.value.length >= 8 ) && (AG_obj.value.length <= 63 )){ ret = fn_is_ascii(AG_obj, "SPACE_ALLOW"); if(ret == false) { eval("document.forms[0]." + AG_fname + ".focus()"); return; } }else{ alert(errmsg.err08); AG_obj.value = AG_obj.defaultValue; eval("document.forms[0]." + AG_fname + ".focus()"); return; } } function fn_sw_eap_opt(AG_form) { var eap_index; var i; var obj_eap_id; eap_index = parseInt(AG_form.sl_eap_type.selectedIndex); for(i = 0; i < arr_eap_id.length; i++) { obj_eap_id = top.frames[0].document.getElementById(arr_eap_id[i]); if(obj_eap_id == null) { alert("error on fn_sw_eap_opt"); return; } obj_eap_id.style.display = "none"; } switch(eap_index) { case 0: fn_sw_sec_fld(arr_eap_id[5]); fn_sw_sec_fld(arr_eap_id[6]); break; case 1: for(i = 1; i <= 5; i += 2){fn_sw_sec_fld(arr_eap_id[i]);} if(AG_form.ra_wap_chk_server_certify[0].checked){fn_sw_sec_fld(arr_eap_id[2]);} break; case 2: for(i = 0; i < arr_eap_id.length ; i++){if((i != 2) && (i != 3) && (i != 7)){fn_sw_sec_fld(arr_eap_id[i]);}} if(AG_form.ra_wap_chk_server_certify[0].checked){fn_sw_sec_fld(arr_eap_id[2]);} break; case 3: for(i = 0; i < arr_eap_id.length ; i++){if((i != 0) && (i != 2) && (i != 3) && (i != 4)){fn_sw_sec_fld(arr_eap_id[i]);}} if(AG_form.ra_wap_chk_server_certify[0].checked){fn_sw_sec_fld(arr_eap_id[2]);} break; } } function fn_sw_sec_fld(AG_sec_ind) { var obj_div_id; obj_div_id = top.frames[0].document.getElementById(AG_sec_ind); obj_div_id.style.display = "block"; } function fn_hd_sec_fld(AG_sec_ind) { var obj_div_id; obj_div_id = parent.frames[0].document.getElementById(AG_sec_ind); obj_div_id.style.display = "none"; } function fn_sw_root_ca(AG_form) { if(AG_form.ra_wap_chk_server_certify[0].checked){fn_sw_sec_fld(arr_eap_id[2]);}else{fn_hd_sec_fld(arr_eap_id[2]);} } function fn_sw_wifi_sta_pg(ARGV_page_name) { var obj_div; var i; obj_div = top.document.getElementById("hidden_webpage_wl_status"); if(obj_div == null) { alert("error: fn_sw_wifi_sta_pg"); return; } if(obj_div.src == ARGV_page_name){obj_div.src = blank_page;}else{obj_div.src = ARGV_page_name;} } function fn_vfy_rdnt_ssid(AG_form, AG_rec_ind) { var i; var profile_cnt = top.frames[3].arr_old_wifi_pro.length; if(!profile_cnt) { return true; } for(i = 0; i < profile_cnt; i++) { if((AG_form.txt_wl_ssid.value == top.frames[3].arr_old_wifi_pro[i].SSID) && parseInt(top.frames[0].document.frm_wifi_pro.hdn_flag_ssid_in_profile.value)) { if(window.confirm(errmsg.err75 + (i + 1) + errmsg.err76 + (i + 1) + errmsg.err77)) { AG_form.hdn_wl_key.value = top.frames[3].arr_old_wifi_pro[i].KEY; return true; }else{ return false; } }else if((AG_form.txt_wl_ssid.value == top.frames[3].arr_old_wifi_pro[i].SSID) && !parseInt(top.frames[0].document.frm_wifi_pro.hdn_flag_ssid_in_profile.value) && parseInt(AG_form.hdn_flag_add_new.value)){ if(window.confirm(errmsg.err75 + (i + 1) + errmsg.err76 + (i + 1) + errmsg.err77)) { AG_form.hdn_wl_key.value = top.frames[3].arr_old_wifi_pro[i].KEY; return true; }else{ return false; } } } return true; } function fn_get_inner() { document.write("" + obj_pro_tle.mschap2 + ""); }