HTTP/1.0 200 Ok Server: httpd/2.0 x-frame-options: SAMEORIGIN x-xss-protection: 1; mode=block Date: Mon, 15 Sep 2025 08:07:37 GMT Cache-Control: no-cache Pragma: no-cache Expires: 0 Content-Type: text/javascript Connection: close var keyPressed; var wItem; var ip = ""; function inet_network(ip_str){ if(!ip_str) return -1; var re = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; if(re.test(ip_str)){ var v1 = parseInt(RegExp.$1); var v2 = parseInt(RegExp.$2); var v3 = parseInt(RegExp.$3); var v4 = parseInt(RegExp.$4); if(v1 < 256 && v2 < 256 && v3 < 256 && v4 < 256) return v1*256*256*256+v2*256*256+v3*256+v4; } return -2; } function ipFilterZero(ip_str){ var re = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; if(re.test(ip_str)){ var v1 = parseInt(RegExp.$1); var v2 = parseInt(RegExp.$2); var v3 = parseInt(RegExp.$3); var v4 = parseInt(RegExp.$4); return v1+"."+v2+"."+v3+"."+v4; } return -2; } function isMask(ip_str){ if(!ip_str) return 0; var re = /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/; if(re.test(ip_str)){ var v1 = parseInt(RegExp.$1); var v2 = parseInt(RegExp.$2); var v3 = parseInt(RegExp.$3); var v4 = parseInt(RegExp.$4); if(v4 == 255 || !(v4 == 0 || (is1to0(v4) && v1 == 255 && v2 == 255 && v3 == 255))) return -4; if(!(v3 == 0 || (is1to0(v3) && v1 == 255 && v2 == 255))) return -3; if(!(v2 == 0 || (is1to0(v2) && v1 == 255))) return -2; if(!is1to0(v1)) return -1; } return 1; } function is1to0(num){ if(typeof(num) != "number") return 0; if(num == 255 || num == 254 || num == 252 || num == 248 || num == 240 || num == 224 || num == 192 || num == 128) return 1; return 0; } function getSubnet(ip_str, mask_str, flag){ var ip_num, mask_num; var sub_head, sub_end; if(!ip_str || !mask_str) return -1; if(isMask(mask_str) <= 0) return -2; if(!flag || (flag != "head" && flag != "end")) flag = "head"; ip_num = inet_network(ip_str); mask_num = inet_network(mask_str); if(ip_num < 0 || mask_num < 0) return -3; sub_head = ip_num-(ip_num&~mask_num); sub_end = sub_head+~mask_num; if(flag == "head") return sub_head; else return sub_end; } function str2val(v){ for(i=0; i=match.length) c2=160; else c2 = match.charCodeAt(j); if (c1==160) c1 = 32; if (c2==160) c2 = 32; if (c1>c2) return (1); else if (c1 0 && isload == 0) is_wlphrase("WLANConfig11b", "wl_phrase_x", document.form.wl_phrase_x); } wl_wep_change(); } function change_wlkey(o, s){ wep = document.form.wl_wep_x.value; if(wep == "1"){ if(o.value.length > 10) o.value = o.value.substring(0, 10); } else if(wep == "2"){ if(o.value.length > 26) o.value = o.value.substring(0, 26); } return true; } function subnetPrefix(ip, orig, count) {r=''; c=0; for(i=0;i=count) r = r + orig.charAt(i); } return (r); } function subnetPostfix(ip, num, count){ //Change subnet postfix .xxx r=''; orig=""; c=0; for(i=0;i= 64){ o.value = o.value.substring(0, 63); alert("Pre-shared key should be less than 64 characters!"); return false; } return true; } if(v=='wl_wpa_psk') return(valid_WPAPSK(o)); wepType = document.form.wl_wep_x.value; wepKey1 = document.form.wl_key1; wepKey2 = document.form.wl_key2; wepKey3 = document.form.wl_key3; wepKey4 = document.form.wl_key4; phrase = o.value; if(wepType == "1"){ for(var i = 0; i < phrase.length; i++){ pseed[i%4] ^= phrase.charCodeAt(i); } randNumber = pseed[0] | (pseed[1]<<8) | (pseed[2]<<16) | (pseed[3]<<24); for(var j = 0; j < 5; j++){ randNumber = ((randNumber*0x343fd)%0x1000000); randNumber = ((randNumber+0x269ec3)%0x1000000); wep_key[j] = ((randNumber>>16)&0xff); } wepKey1.value = binl2hex_c(wep_key); for(var j = 0; j < 5; j++){ randNumber = ((randNumber * 0x343fd) % 0x1000000); randNumber = ((randNumber + 0x269ec3) % 0x1000000); wep_key[j] = ((randNumber>>16) & 0xff); } wepKey2.value = binl2hex_c(wep_key); for(var j = 0; j < 5; j++){ randNumber = ((randNumber * 0x343fd) % 0x1000000); randNumber = ((randNumber + 0x269ec3) % 0x1000000); wep_key[j] = ((randNumber>>16) & 0xff); } wepKey3.value = binl2hex_c(wep_key); for(var j = 0; j < 5; j++){ randNumber = ((randNumber * 0x343fd) % 0x1000000); randNumber = ((randNumber + 0x269ec3) % 0x1000000); wep_key[j] = ((randNumber>>16) & 0xff); } wepKey4.value = binl2hex_c(wep_key); } else if(wepType == "2"){ password = ""; if(phrase.length > 0){ for(var i = 0; i < 64; i++){ ch = phrase.charAt(i%phrase.length); password = password+ch; } } for(i=0;i<4;i++){ password = calcMD5(password); if(i == 0) wepKey1.value = password.substr(0, 26); else if(i == 1) wepKey2.value = password.substr(0, 26); else if(i == 2) wepKey3.value = password.substr(0, 26); else wepKey4.value = password.substr(0, 26); } } return true; } function wl_wep_change(){ var mode = document.form.wl_auth_mode_x.value; var wep = document.form.wl_wep_x.value; if(mode == "psk" || mode == "psk2" || mode == "pskpsk2" || mode == "wpa" || mode == "wpa2" || mode == "wpawpa2"){ if(mode != "wpa" && mode != "wpa2" && mode != "wpawpa2"){ inputCtrl(document.form.wl_crypto, 1); inputCtrl(document.form.wl_wpa_psk, 1); } inputCtrl(document.form.wl_wpa_gtk_rekey, 1); inputCtrl(document.form.wl_wep_x, 0); inputCtrl(document.form.wl_phrase_x, 0); inputCtrl(document.form.wl_key1, 0); inputCtrl(document.form.wl_key2, 0); inputCtrl(document.form.wl_key3, 0); inputCtrl(document.form.wl_key4, 0); inputCtrl(document.form.wl_key, 0); } else if(mode == "radius"){ //2009.01 magic inputCtrl(document.form.wl_crypto, 0); inputCtrl(document.form.wl_wpa_psk, 0); inputCtrl(document.form.wl_wpa_gtk_rekey, 0); inputCtrl(document.form.wl_wep_x, 0); //2009.0310 Lock inputCtrl(document.form.wl_phrase_x, 0); inputCtrl(document.form.wl_key1, 0); inputCtrl(document.form.wl_key2, 0); inputCtrl(document.form.wl_key3, 0); inputCtrl(document.form.wl_key4, 0); inputCtrl(document.form.wl_key, 0); } else{ inputCtrl(document.form.wl_crypto, 0); inputCtrl(document.form.wl_wpa_psk, 0); inputCtrl(document.form.wl_wpa_gtk_rekey, 0); if(mode == "open" && document.form.wl_nmode_x.value != 2){ document.form.wl_wep_x.parentNode.parentNode.style.display = "none"; document.form.wl_wep_x.value = "0"; } else inputCtrl(document.form.wl_wep_x, 1); if(wep != "0"){ inputCtrl(document.form.wl_phrase_x, 1); inputCtrl(document.form.wl_key1, 1); inputCtrl(document.form.wl_key2, 1); inputCtrl(document.form.wl_key3, 1); inputCtrl(document.form.wl_key4, 1); inputCtrl(document.form.wl_key, 1); } else{ inputCtrl(document.form.wl_phrase_x, 0); inputCtrl(document.form.wl_key1, 0); inputCtrl(document.form.wl_key2, 0); inputCtrl(document.form.wl_key3, 0); inputCtrl(document.form.wl_key4, 0); inputCtrl(document.form.wl_key, 0); } } change_key_des(); // 2008.01 James. } function change_wep_type(mode, isload){ var cur_wep = document.form.wl_wep_x.value; var wep_type_array; var value_array; free_options(document.form.wl_wep_x); if(mode == "shared"){ //2009.0310 Lock wep_type_array = new Array("WEP-64bits", "WEP-128bits"); value_array = new Array("1", "2"); } else{ if(document.form.wl_nmode_x.value != 2 && sw_mode != 2){ wep_type_array = new Array("None"); value_array = new Array("0"); } else{ wep_type_array = new Array("None", "WEP-64bits", "WEP-128bits"); value_array = new Array("0", "1", "2"); } } add_options_x2(document.form.wl_wep_x, wep_type_array, value_array, cur_wep); if(mode == "psk" || mode == "psk2" || mode == "pskpsk2" || mode == "wpa" || mode == "wpa2" || mode == "wpawpa2" || mode == "radius") //2009.03 magic document.form.wl_wep_x.value = "0"; change_wlweptype(document.form.wl_wep_x, isload); } function isArray(o) { return Object.prototype.toString.call(o) === '[object Array]'; } function filter_5g_channel_by_bw(ch_ary, bw){ var del, ary;; if(bw == 160){ var ch=[36,100], cnt=[0,0], d = 28, nr_ch=8; }else if(bw == 80){ var ch=[36,52,100,116,149], cnt=[0,0,0,0,0], d=12, nr_ch=4; }else if(bw == 40){ var ch=[36,44,52,60,100,108,116,124,132,149,157], cnt=[0,0,0,0,0,0,0,0,0,0,0], d=2, nr_ch=2; }else return ch_ary; ary = ch_ary.slice(); for(i=0; i < ary.length; i++){ for(j=0; j= 0 && (ary[i] - ch[j]) <= d) cnt[j]++; } for(i=0; i < ary.length; i++){ del=1; for(j=0; j= 0 && (ary[i] - ch[j]) <= d && cnt[j] == nr_ch) del=0; if(del){ ary.splice(i,1); i--; } } return ary; } function insertExtChannelOption(){ if('0' != '0'){ insertExtChannelOption_5g(); }else{ insertExtChannelOption_2g(); } } function insertExtChannelOption_5g(){ var country = "GB"; var orig = document.form.wl_channel.value; free_options(document.form.wl_channel); if(wl_channel_list_5g != ""){ //With wireless channel 5g hook if('0' == '1') wl_channel_list_5g = eval('[100,104,108,112,116,132,136,140]'); else wl_channel_list_5g = eval('[36,40,44,48,52,56,60,64]'); if(document.form.wl_bw.value != "0" && document.form.wl_nmode_x.value != "2") { //not Legacy mode and BW > 20MHz var i; for(i=0; i < wl_channel_list_5g.length; i++) if((document.form.wl_bw.value == "2" || document.form.wl_bw.value == "3") && wl_channel_list_5g[i] == "165") { wl_channel_list_5g.splice(i,(wl_channel_list_5g.length - i)); break; } for(i=0; i < wl_channel_list_5g.length; i++) { if(wl_channel_list_5g[i] == "56" && (i == 0 || wl_channel_list_5g[i-1] != "52")) { if(!(Rawifi_support || Qcawifi_support || Rtkwifi_support)) ; else if(band5g_11ac_support && (document.form.wl_bw.value == "3") && (document.form.wl_nmode_x.value == "0" || document.form.wl_nmode_x.value == "8")) { for(var j=wl_channel_list_5g.length; j>=i ; j--) if(wl_channel_list_5g[j] >= "56" && wl_channel_list_5g[j] <= "64") wl_channel_list_5g.splice(j,1); i--; } else { if(document.form.wl_bw.value != "1" && document.form.wl_bw.value != "0"){ // only for channel 56 wl_channel_list_5g.splice(i,1); i--; } } } if(wl_channel_list_5g[i] == "116" && (i + 1 < wl_channel_list_5g.length && wl_channel_list_5g[i+1] != "120")) { if(!(Rawifi_support || Qcawifi_support || Rtkwifi_support)) ; else if((document.form.wl_bw.value == "3" || document.form.wl_bw.value == "2") && (document.form.wl_nmode_x.value == "0" || document.form.wl_nmode_x.value == "8")) { wl_channel_list_5g.splice(i,1); i--; } } if(!(Rawifi_support || Qcawifi_support || Rtkwifi_support)) ; else if((document.form.wl_bw.value == "3") && (document.form.wl_nmode_x.value == "0" || document.form.wl_nmode_x.value == "8")) { if(wl_channel_list_5g[i] == "132" || wl_channel_list_5g[i] == "136" || wl_channel_list_5g[i] == "140") { wl_channel_list_5g.splice(i,1); i--; } } else if((document.form.wl_bw.value == "2") && wl_channel_list_5g[i] == "140") { wl_channel_list_5g.splice(i,1); i--; } } if(vht80_80_support && document.form.wl_bw.value == "4" && (Rawifi_support || Qcawifi_support)){ wl_channel_list_5g = filter_5g_channel_by_bw(wl_channel_list_5g, 80); } if(vht160_support && document.form.wl_bw.value == "5" && (Rawifi_support || Qcawifi_support)){ wl_channel_list_5g = filter_5g_channel_by_bw(wl_channel_list_5g, 160); } } if(wl_channel_list_5g[0] != "Auto") wl_channel_list_5g.splice(0,0,"0"); channels = wl_channel_list_5g; }else{ //start Without wireless channel 5g hook if (document.form.wl_bw.value == "0"){ // 20 MHz inputCtrl(document.form.wl_nctrlsb, 0); if (country == "AL" || country == "DZ" || country == "AU" || country == "BH" || country == "BY" || country == "CA" || country == "CL" || country == "CO" || country == "CR" || country == "DO" || country == "SV" || country == "GT" || country == "HN" || country == "HK" || country == "IN" || country == "IL" || country == "JO" || country == "KZ" || country == "LB" || country == "MO" || country == "MK" || country == "MY" || country == "MX" || country == "NZ" || country == "NO" || country == "OM" || country == "PK" || country == "PA" || country == "PR" || country == "QA" || country == "RO" || country == "RU" || country == "SA" || country == "SG" || country == "SY" || country == "TH" || country == "UA" || country == "AE" || country == "US" || country == "Q2" || country == "VN" || country == "YE" || country == "ZW") channels = new Array(0, 36, 40, 44, 48, 149, 153, 157, 161, 165); // Region 0 else if(country == "AT" || country == "BE" || country == "BR" || country == "BG" || country == "CY" || country == "DK" || country == "EE" || country == "FI" || country == "DE" || country == "GR" || country == "HU" || country == "IS" || country == "IE" || country == "IT" || country == "LV" || country == "LI" || country == "LT" || country == "LU" || country == "NL" || country == "PL" || country == "PT" || country == "SK" || country == "SI" || country == "ZA" || country == "ES" || country == "SE" || country == "CH" || country == "GB" || country == "EU" || country == "UZ") channels = new Array(0, 36, 40, 44, 48); // Region 1 else if(country == "AM" || country == "AZ" || country == "HR" || country == "CZ" || country == "EG" || country == "FR" || country == "GE" || country == "MC" || country == "TT" || country == "TN" || country == "TR") channels = new Array(0, 36, 40, 44, 48); // Region 2 else if(country == "AR" || country == "TW") channels = new Array(0, 52, 56, 60, 64, 149, 153, 157, 161, 165); // Region 3 else if(country == "BZ" || country == "BO" || country == "BN" || country == "CN" || country == "ID" || country == "IR" || country == "PE" || country == "PH") channels = new Array(0, 149, 153, 157, 161, 165); // Region 4 else if(country == "KP" || country == "KR" || country == "UY" || country == "VE") channels = new Array(0, 149, 153, 157, 161, 165); // Region 5 else if(country == "JP") channels = new Array(0, 36, 40, 44, 48); // Region 9 else channels = new Array(0, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165); // Region 7 } else if(document.form.wl_bw.value == "1"){ // 20/40 MHz inputCtrl(document.form.wl_nctrlsb, 1); if (country == "AL" || country == "DZ" || country == "AU" || country == "BH" || country == "BY" || country == "CA" || country == "CL" || country == "CO" || country == "CR" || country == "DO" || country == "SV" || country == "GT" || country == "HN" || country == "HK" || country == "IN" || country == "IL" || country == "JO" || country == "KZ" || country == "LB" || country == "MO" || country == "MK" || country == "MY" || country == "MX" || country == "NZ" || country == "NO" || country == "OM" || country == "PK" || country == "PA" || country == "PR" || country == "QA" || country == "RO" || country == "RU" || country == "SA" || country == "SG" || country == "SY" || country == "TH" || country == "UA" || country == "AE" || country == "US" || country == "Q2" || country == "VN" || country == "YE" || country == "ZW") channels = new Array(0, 36, 40, 44, 48, 149, 153, 157, 161); // Region 0 else if(country == "AT" || country == "BE" || country == "BR" || country == "BG" || country == "CY" || country == "DK" || country == "EE" || country == "FI" || country == "DE" || country == "GR" || country == "HU" || country == "IS" || country == "IE" || country == "IT" || country == "LV" || country == "LI" || country == "LT" || country == "LU" || country == "NL" || country == "PL" || country == "PT" || country == "SK" || country == "SI" || country == "ZA" || country == "ES" || country == "SE" || country == "CH" || country == "GB" || country == "EU" || country == "UZ") channels = new Array(0, 36, 40, 44, 48); // Region 1 else if(country == "AM" || country == "AZ" || country == "HR" || country == "CZ" || country == "EG" || country == "FR" || country == "GE" || country == "MC" || country == "TT" || country == "TN" || country == "TR") channels = new Array(0, 36, 40, 44, 48); // Region 2 else if(country == "AR" || country == "TW") channels = new Array(0, 52, 56, 60, 64, 149, 153, 157, 161); // Region 3 else if(country == "BZ" || country == "BO" || country == "BN" || country == "CN" || country == "ID" || country == "IR" || country == "PE" || country == "PH") channels = new Array(0, 149, 153, 157, 161); // Region 4 else if(country == "KP" || country == "KR" || country == "UY" || country == "VE") channels = new Array(0, 149, 153, 157, 161); // Region 5 else if(country == "JP") channels = new Array(0, 36, 40, 44, 48); // Region 9 else channels = new Array(0, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161); // Region 7 } else{ // 40 MHz inputCtrl(document.form.wl_nctrlsb, 1); if (country == "AL" || country == "DZ" || country == "AU" || country == "BH" || country == "BY" || country == "CA" || country == "CL" || country == "CO" || country == "CR" || country == "DO" || country == "SV" || country == "GT" || country == "HN" || country == "HK" || country == "IN" || country == "IL" || country == "JO" || country == "KZ" || country == "LB" || country == "MO" || country == "MK" || country == "MY" || country == "MX" || country == "NZ" || country == "NO" || country == "OM" || country == "PK" || country == "PA" || country == "PR" || country == "QA" || country == "RO" || country == "RU" || country == "SA" || country == "SG" || country == "SY" || country == "TH" || country == "UA" || country == "AE" || country == "US" || country == "Q2" || country == "VN" || country == "YE" || country == "ZW") channels = new Array(0, 36, 40, 44, 48, 149, 153, 157, 161); else if(country == "AT" || country == "BE" || country == "BR" || country == "BG" || country == "CY" || country == "DK" || country == "EE" || country == "FI" || country == "DE" || country == "GR" || country == "HU" || country == "IS" || country == "IE" || country == "IT" || country == "LV" || country == "LI" || country == "LT" || country == "LU" || country == "NL" || country == "PL" || country == "PT" || country == "SK" || country == "SI" || country == "ZA" || country == "ES" || country == "SE" || country == "CH" || country == "GB" || country == "EU" || country == "UZ") channels = new Array(0, 36, 40, 44, 48); else if(country == "AM" || country == "AZ" || country == "HR" || country == "CZ" || country == "EG" || country == "FR" || country == "GE" || country == "MC" || country == "TT" || country == "TN" || country == "TR") channels = new Array(0, 36, 40, 44, 48); else if(country == "AR" || country == "TW") channels = new Array(0, 52, 56, 60, 64, 149, 153, 157, 161); // Region 3 else if(country == "BZ" || country == "BO" || country == "BN" || country == "CN" || country == "ID" || country == "IR" || country == "PE" || country == "PH") channels = new Array(0, 149, 153, 157, 161); else if(country == "KP" || country == "KR" || country == "UY" || country == "VE") channels = new Array(0, 149, 153, 157, 161); else if(country == "JP") channels = new Array(0, 36, 40, 44, 48); else channels = new Array(0, 36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161); } } //end Without wireless channel 5g hook var ch_v = new Array(); for(var i=0; i 1){ x.selectedIndex = 1; x.remove(x.selectedIndex); } if ((CurrentCh >=1) && (CurrentCh <= 4)){ x.options[0].text = "Above"; x.options[0].value = "lower"; } else if ((CurrentCh >= 5) && (CurrentCh <= 7)){ x.options[0].text = "Above"; x.options[0].value = "lower"; add_option(document.form.wl_nctrlsb, "Below", "upper"); if (document.form.wl_nctrlsb_old.value == "upper") document.form.wl_nctrlsb.options.selectedIndex=1; if(is_high_power && CurrentCh == 5) // for high power model, Jieming added at 2013/08/19 document.form.wl_nctrlsb.remove(1); else if(is_high_power && CurrentCh == 7) document.form.wl_nctrlsb.remove(0); } else if ((CurrentCh >= 8) && (CurrentCh <= 9)){ x.options[0].text = "Below"; x.options[0].value = "upper"; if (option_length >=14){ add_option(document.form.wl_nctrlsb, "Above", "lower"); if (document.form.wl_nctrlsb_old.value == "lower") document.form.wl_nctrlsb.options.selectedIndex=1; } } else if (CurrentCh == 10){ x.options[0].text = "Below"; x.options[0].value = "upper"; if (option_length > 14){ add_option(document.form.wl_nctrlsb, "Above", "lower"); if (document.form.wl_nctrlsb_old.value == "lower") document.form.wl_nctrlsb.options.selectedIndex=1; } } else if (CurrentCh >= 11){ x.options[0].text = "Below"; x.options[0].value = "upper"; } else{ x.options[0].text = "Auto"; x.options[0].value = "1"; } } else inputCtrl(document.form.wl_nctrlsb, 0); } function wl_auth_mode_change(isload){ var mode = document.form.wl_auth_mode_x.value; var wireless_mode = document.form.wl_nmode_x.value; var i, cur, algos; inputCtrl(document.form.wl_wep_x, 1); /* enable/disable crypto algorithm */ if(mode == "wpa" || mode == "wpa2" || mode == "wpawpa2" || mode == "psk" || mode == "psk2" || mode == "pskpsk2") inputCtrl(document.form.wl_crypto, 1); else inputCtrl(document.form.wl_crypto, 0); /* enable/disable psk passphrase */ if(mode == "psk" || mode == "psk2" || mode == "pskpsk2") inputCtrl(document.form.wl_wpa_psk, 1); else inputCtrl(document.form.wl_wpa_psk, 0); /* update wl_crypto */ if(mode == "psk" || mode == "psk2" || mode == "pskpsk2" || mode == "wpa" || mode == "wpa2" ||mode == "wpawpa2"){ /* Save current crypto algorithm */ for(var i = 0; i < document.form.wl_crypto.length; i++){ if(document.form.wl_crypto[i].selected){ cur = document.form.wl_crypto[i].value; break; } } opts = document.form.wl_auth_mode_x.options; if(opts[opts.selectedIndex].text == "WPA-Personal" || opts[opts.selectedIndex].text == "WPA-Enterprise") algos = new Array("TKIP"); else if(opts[opts.selectedIndex].text == "WPA2-Personal" || opts[opts.selectedIndex].text == "WPA2-Enterprise") algos = new Array("AES"); else algos = new Array("AES", "TKIP+AES"); /* Reconstruct algorithm array from new crypto algorithms */ free_options(document.form.wl_crypto); document.form.wl_crypto.length = algos.length; for(i=0; i= 0 || mode.search("wpa2") >= 0)){ inputCtrl(document.form.wl_mfp, 1); } else{ inputCtrl(document.form.wl_mfp, 0); } } change_wep_type(mode, isload); /* Save current network key index */ cur = "1"; for(var i = 0; i < document.form.wl_key.length; i++){ if(document.form.wl_key[i].selected){ cur = document.form.wl_key[i].value; break; } } /* Define new network key indices */ if(mode == "wpa" || mode == "wpa2" || mode == "wpawpa2" || mode == "psk" || mode == "psk2" || mode == "pskpsk2" || mode == "radius") algos = new Array("1", "2", "3", "4"); else{ algos = new Array("1", "2", "3", "4"); } /* Reconstruct network key indices array from new network key indices */ free_options(document.form.wl_key); document.form.wl_key.length = algos.length; for(i=0; i 1) { var left_css = "border-top-left-radius:8px;border-bottom-left-radius:8px;"; var right_css = "border-top-right-radius:8px;border-bottom-right-radius:8px;"; var gen_pressed_content = function(_itemArray, _cssMode) { var pressed_code = ""; pressed_code += "
"; pressed_code += "
" + _itemArray[0] + "
"; pressed_code += "
"; return pressed_code; }; var gen_not_pressed_content = function(_itemArray, _cssMode) { var not_pressed_code = ""; not_pressed_code += "
"; not_pressed_code += ""; not_pressed_code += "
" + _itemArray[0] + "
"; not_pressed_code += "
"; not_pressed_code += "
"; return not_pressed_code; }; var loop_idx_end = array_list_num; var loop_idx = 1; for (var key in _arrayList) { if (_arrayList.hasOwnProperty(key)) { var cssMode = ""; if(loop_idx == 1) { cssMode = left_css; } else if(loop_idx == loop_idx_end) { cssMode = right_css; } if(_currentItem == key) { code += gen_pressed_content(_arrayList[key], cssMode); } else { code += gen_not_pressed_content(_arrayList[key], cssMode); } loop_idx++; } } return code; } }