找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9708|回复: 3

烽火光猫HG6543C绕过无线SSID修改格式限制

[复制链接]
发表于 2020-10-4 22:28:10 | 显示全部楼层 |阅读模式
烽火HG6543C4采用默认终端配置账号密码登录(普通账号见设备背面标牌)
通过chome开发者工具(F12可打开),找个wlanBasicSettings_2G_CM.js这个文件,搜索saveApply函数,发现SSID等参数检测是通过wlcfgTestFields函数。片段信息如下:
function wlcfgTestFields(){
        else if(ssidmunidfir != "CMCC-" && areacode != "Jiangsu"){
                alert("SSID名称必须以CMCC-作为开头");
                return ;
        }
}
function saveApply(){
        var test = wlcfgTestFields();
        if (test != true) {
                return false;
        }
}
对if (test != true) {设置断点,然后点击页面保存设置,弹出告警信息确定后,程序会停在断电处,修改test变量值为true,继续脚本执行,即可绕过对SSID名称格式修改的限制。

  m0 C1 A  G* Z$ T7 L
! O6 @% c0 n7 X

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2020-10-5 23:43:56 | 显示全部楼层
  1. <script language="JavaScript" type="text/javascript">
      {: r6 p4 w3 o0 o

  2. ) r  h) `' A9 T" T
  3. var WapiFlag = '0';) h; y# Z$ e' X5 u$ {" x
  4. var aWiFiCustFlag = '0';
    9 ^4 o' ~$ A, b( b  @" u
  5. var aWiFiSSID2GInst = '';
    ; W7 I) Z: ]! i8 i3 z( V) |
  6. var wifiPasswordMask='1';
    ! y' Y1 w+ D' o7 K9 s
  7. var CfgMode ='HUBCMCC_RMS';  j0 o9 ^( {: J' p5 W. V; y: I
  8. var CurrentBin = 'CMCC';
    . n1 q1 ]) D1 J% Q% ]5 L2 E8 X$ o
  9. var curUserType='0';# m+ l2 J1 ~- i; l
  10. var MngtJsCmcc = '0';
    - K" E8 L) `& A. ?) S0 ?( _
  11. var TianyiFlag = '0';' m, b/ a8 ~: P# `1 s9 l; u# i
  12. var wep1password;
    ) s% h$ a' U! w6 ^- a6 m
  13. var wpapskpassword;& k- C; V0 c' d
  14. var radiuspassword;7 [( e1 C9 b* f' z
  15. var wep1PsdModFlag = false;. p$ \& r& ~) {, T. [9 c
  16. var pskPsdModFlag = false;
    : g; _  b( p0 f$ R8 ]$ Y
  17. var radPsdModFlag = false;" [7 g# V% L) |

  18. % k) E  I" x4 T: P
  19. var g_flags = new Array();' K; S. D% C5 r) j
  20. g_flags[0] = 0;
    # ]1 m& P' i- g# }6 d1 Q* o2 o
  21. g_flags[1] = 0;
    & @: @! R8 O2 }# \% W/ \& i
  22. g_flags[2] = 0;
    / w& }, H) t6 o6 U7 p/ x7 K
  23. var desc_show = "点击显示密码";$ j! a6 A: m1 ?1 H8 a2 m
  24. var desc_hide = "点击隐藏密码";
    - x! q' W: I; `4 |' c& }2 Y" ?

  25.   F+ F/ P) v5 P; E" \2 V, _  z- J' A
  26. function GetLanguageDesc(Name)
    2 z$ g, y, Q& O* F
  27. {
    8 E' E  d6 x$ w: @1 P2 Z$ O
  28.     return cfg_wlancfgdetail_language[Name];( p- R$ i) y* D9 j/ b, K
  29. }
    # R/ ?. u& y# ]8 @* \2 O' T0 U

  30. - G: e/ H7 D7 u! U7 p( J
  31. var wlanpage;7 S; o3 j8 ], C9 j
  32. if (location.href.indexOf("e8cWlanBasic.asp?") > 0)
    ' |3 m, L# s) p: W. @( ]" z9 I
  33. {3 \$ N7 v1 z8 |* _+ u5 O0 D5 {" S7 R
  34. wlanpage = location.href.split("?")[1];
    2 @; n$ ~! D9 ~1 F. K2 F
  35. top.WlanBasicPage = wlanpage;7 ~; V) G- m% I; F7 a7 J
  36. }
    2 {% X- Y4 V& |- x; j
  37. 3 n" [) n8 c, l
  38. wlanpage = top.WlanBasicPage;
    / r, \% B8 ^3 W5 A- N  ]: i, G
  39. 1 J$ ~8 ^7 X+ ^: c4 |
  40. 4 ~& {) @- a7 q+ O  c% ~. m1 R9 b
  41. function ShowOrHideText(flag, checkBoxId, passwordId, textId, value)
    4 e" R" u( A  z* e7 L
  42. {, z' L) m+ m: t& Z
  43.     if (1 == g_flags[flag])4 ]; z( `/ v/ p6 V, n% a
  44.     {
    ; Q! k( V' ]) U, b  q& P' c6 D
  45. getElById(checkBoxId).innerHTML = desc_show;
    " i- }$ w. W: ]5 ]7 z8 l( A" ?
  46.         setDisplay(passwordId, 1);
    2 \6 s, B8 K& P& o2 L! k
  47.         setDisplay(textId, 0);& O3 T4 N* a/ g: a, D" D" A# l
  48. g_flags[flag] = 0;( J7 i  L3 k: Z/ @7 u/ N" V. z( E6 L
  49.     }
    ; W* X9 ?1 Z9 S1 T
  50.     else
    ' o' y3 f, K; q9 [* `* S; D
  51.     {6 s' A6 W4 E" q7 z/ Q. Y3 m
  52. getElById(checkBoxId).innerHTML = desc_hide;
    ; T6 u! R) B4 k  \
  53.         setDisplay(passwordId, 0);
    9 s9 z9 p' ^& R. L  |
  54.         setDisplay(textId, 1);
    # Y& A4 }$ A% u7 [* ^
  55. g_flags[flag] = 1;/ {/ [2 N$ ]9 J6 D. w2 b8 ~: m
  56.     }1 B$ R6 y7 e4 l+ W
  57. }
    & @+ Q1 D/ f& e# c+ t8 Z

  58. + P. a* T9 X: r; k3 X( S# H
  59. function stWlan(domain,name,enable,ssid,BeaconType,BasicEncryptionModes,BasicAuthenticationMode,$ S2 z. `) X/ j% K! q$ f! Q2 t+ I
  60.                 KeyIndex,EncryptionLevel,WPAEncryptionModes,WPAAuthenticationMode,IEEE11iEncryptionModes,IEEE11iAuthenticationMode,& k7 ~; l+ U1 M/ m
  61.                 X_HW_WPAand11iEncryptionModes,X_HW_WPAand11iAuthenticationMode,RadiusServer,RadiusPort,RadiusKey,X_HW_ServiceEnable, LowerLayers,
    1 d! l; ~* F6 }8 X, ?
  62. X_HW_WAPIEncryptionModes,X_HW_WAPIAuthenticationMode,X_HW_WAPIServer,X_HW_WAPIPort)* }. m5 C, j0 i. `+ d) Z# j
  63. {
    8 C2 {7 b  g) T6 i/ c
  64.     this.domain = domain;
    9 L8 D& c* a# V# g
  65.     this.name = name;
    - ?6 S$ @5 f$ Q1 M
  66.     this.enable = enable;* W& m; X9 L* o& w
  67.     this.ssid = ssid;
    1 ~* m/ R% j4 X/ |7 |4 C7 M
  68.     this.BeaconType = BeaconType;
    - _7 \% n6 w* o( B% N/ @
  69.     this.BasicEncryptionModes = BasicEncryptionModes;8 ~0 Y# j8 W6 E; o' [4 v# P' Z; F
  70.     this.BasicAuthenticationMode = BasicAuthenticationMode;4 M  y. r& [/ p  }! h
  71.     this.KeyIndex = KeyIndex;' p  X" {/ W3 ]8 ^" g2 Q
  72.     this.EncypBit = EncryptionLevel;
    $ E$ ~9 }; ?4 `
  73.     this.WPAEncryptionModes = WPAEncryptionModes;% H+ O8 l1 c3 o
  74.     this.WPAAuthenticationMode = WPAAuthenticationMode;
    0 j# d. j& |0 a1 \: u9 E' o
  75.     this.IEEE11iEncryptionModes = IEEE11iEncryptionModes;
    : a, M' @( t& x' |
  76.     this.IEEE11iAuthenticationMode = IEEE11iAuthenticationMode;  D3 h+ o* E4 A/ v) p8 e
  77.     this.X_HW_WPAand11iEncryptionModes = X_HW_WPAand11iEncryptionModes;# F; h% I4 j4 S1 L' E
  78.     this.X_HW_WPAand11iAuthenticationMode = X_HW_WPAand11iAuthenticationMode;
    # h; Q" l1 i6 d' K
  79.     this.RadiusServer = RadiusServer;8 I" m+ b# V8 k5 _# T7 \
  80.     this.RadiusPort = RadiusPort;; d. z7 K4 `9 M2 {+ H
  81.     this.RadiusKey = RadiusKey;$ Q" R. n/ s. R
  82. this.X_HW_ServiceEnable = X_HW_ServiceEnable;
    % W* {* Z% `2 X) O( O: u5 q9 |
  83. this.LowerLayers = LowerLayers;
    7 W8 y) P" L% T+ n1 b2 [7 d+ F
  84. this.X_HW_WAPIEncryptionModes = X_HW_WAPIEncryptionModes;
    # K. ]& d1 Z- M1 r0 [* ]! i3 r
  85. this.X_HW_WAPIAuthenticationMode = X_HW_WAPIAuthenticationMode;# P6 W$ V2 G' D7 }9 |' R0 O
  86. this.X_HW_WAPIServer = X_HW_WAPIServer;2 \! q, ]5 M) _: _) \
  87. this.X_HW_WAPIPort = X_HW_WAPIPort;$ }  L" F6 e. _& x0 j( ^, ]
  88. }0 Q7 p6 v7 ]6 f
  89. 6 ]2 u* ]% K- W& a+ M; i* D* E* K

  90. $ G" [/ J6 k' z9 N
  91. function stWEPKey(domain, value)
    7 V; {* Q* F4 z( v
  92. {
    2 d" L* A9 k9 ]" E4 O5 z! ?% V
  93.     this.domain = domain;3 e- l# O4 U* [# `( _
  94.     this.value = value;* b9 k, {0 q) B- }; e
  95. }7 _( f/ L1 O8 {, P) ]( S4 l

  96. - d5 A) m9 H2 y! G: [! Y
  97. function stPreSharedKey(domain, value)$ }4 ?+ i( p% `
  98. {
    6 i" q: i4 y, F9 V/ M- S6 Y; T
  99.     this.domain = domain;
    0 o) ]+ b) D5 H& W* P
  100.     this.value = value;
    0 R  g+ ]: V4 w# b7 m
  101. }
    6 Z# O/ M5 M" g* M% Z" g

  102. 9 n+ V: H  E0 z% n
  103. function stMaxWLAN(idx, lang)
    6 ]) J% Z9 G1 l
  104. {( b6 J$ [. Y9 _8 f$ {) |1 O2 w" ]
  105.     this.MAX_ID = idx;5 s5 W% A6 H; \3 ^/ [
  106.     this.MAX_ID_LANG = lang;1 A: u! b: D- t$ m* P9 Q/ c! E
  107. }# M. R" K9 C8 `" P" \

  108. * p8 a* \+ ^! a% u2 Z. m
  109. function stIndexMapping(index,portIndex)
    ) Q! D9 R( w1 P# n
  110. {
    , R" v: @, \" K) i* U
  111.     this.index = index;
    / s/ a5 r) l5 x7 d
  112.     this.portIndex = portIndex;
    % j' k& f) O; C: `. ?% b
  113. }
    # O9 w. y3 C  @9 `/ A1 M

  114. % m! Z2 C3 r7 s6 t. ^
  115. function stWlanWifi(domain,name,enable,ssid,mode,channel,power,Country,AutoChannelEnable,channelWidth)7 R* [6 ]* I( D! k" `; o
  116. {
    & [+ t# W+ W4 J" V6 A3 W1 t' @
  117.     this.domain = domain;& j4 x1 A6 E, J& w; {
  118.     this.name = name;
    ! p9 t9 s/ }# k# Z
  119.     this.enable = enable;
    : v% R8 n, i( U6 I+ {1 b0 h0 a
  120.     this.ssid = ssid;- o8 i% ]( z8 O' e* F; I% l( \
  121.     this.mode = mode;
    " H) K- T8 Y/ |7 C
  122.     this.channel = channel;
    ' p& y+ w, D" ?8 a. h2 P
  123.     this.power = power;* I/ f& X, r9 m/ m" P, [# M
  124.     this.RegulatoryDomain = Country;
    3 ~0 c) Q# B3 U8 ~6 Z6 a
  125.     this.AutoChannelEnable = AutoChannelEnable;8 B) C% S/ l/ x, ^% `  Z& p
  126.     this.channelWidth = channelWidth;
    1 ]6 Y4 j% L2 m# }  F
  127. }/ x$ O, c& \# Z% Z' ~4 K! x6 V* M$ L
  128. 1 ~* o2 `- g) ?/ L

  129. + a; ?' E4 p# z5 u5 ~! _. B' s% U
  130. var WlanWifiArr = new Array(new stWlanWifi("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1","ath0","1","CMCC\x2dSheenHome","11bgn","0","80","CN","1","1"),null);! n0 p+ p) H" M% S) @
  131. var WlanWifi = WlanWifiArr[0];5 f9 @5 ^1 K, N, C- q) A' t) W1 q  c
  132. if (null == WlanWifi)" {& {$ X0 s3 N5 a2 q
  133. {% S4 C1 S9 C; F: P4 Q7 ?
  134. WlanWifi = new stWlanWifi("","","","","11n","","","","","");, ?" c! H, K  W! H5 P0 h: I
  135. }0 D/ [; ?+ _8 g1 [! V
  136. - W9 A' }7 x' I, j/ J$ q
  137. var enbl = '1';
    ! _$ u& K" O0 I# Y3 y* D
  138. 5 g2 o' c& \! c8 [  p4 S+ n6 Y
  139. var Wlan = new Array();2 h) G+ z3 L1 P: [$ S* p- P4 C

  140. * F1 A$ [" r* C/ j
  141. var WlanArr = new Array(new stWlan("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1","ath0","1","CMCC\x2dSheenHome","WPAand11i","None","None","1","104\x2dbit","TKIPEncryption","PSKAuthentication","TKIPandAESEncryption","PSKAuthentication","AESEncryption","PSKAuthentication","192\x2e168\x2e0\x2e100","1812","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a","1","InternetGatewayDevice\x2eLANDevice\x2e1\x2eWiFi\x2eRadio\x2e1","SMS4","WAPIPSK","192\x2e168\x2e100\x2e200","3810"),null);8 P# B( N- u$ K9 Q- e, R9 g
  142. 2 i' X: M/ {$ n* n
  143. var wlanArrLen = WlanArr.length - 1;. o! i& d9 f. q# `2 u8 {
  144. ' V& Z$ ]% q1 [8 \: N0 B* z
  145. for (i=0; i < wlanArrLen; i++), n- W2 `7 p0 {5 E) t8 A
  146. {
    7 J9 N7 }0 j$ o4 A: Z
  147.     Wlan[i] = new stWlan();
    3 d2 |9 x# s0 w9 v! y7 [0 n
  148.     Wlan[i] = WlanArr[i];
      j8 W2 ^4 J! m# b/ k! E
  149. }
    0 n. n) Y* L; k7 O

  150. 5 |. [' g$ W0 w
  151. var g_keys = new Array(new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e1","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e2","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e3","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),new stWEPKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2eWEPKey\x2e4","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),null);
    9 n* i' Y% t! L5 p# C# T
  152. if (null != g_keys)5 H' X# X+ y9 T' {* |
  153. {$ x4 B0 Z6 a  l$ r- T
  154. wep1password = g_keys[0];, C! X" o0 }! g% Y. a
  155. }2 |3 o- i& U& w9 Z9 i; `
  156. ' P4 c; t7 |4 g* o/ _5 b
  157. var wpaPskKey = new Array(new stPreSharedKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2ePreSharedKey\x2e1","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),null);- D  u1 ~' N/ A
  158. 0 i& K( N3 u" p1 _
  159. var wlanMac = '78\x3a58\x3a60\x3aD4\x3aD3\x3a44';1 ^2 h* N' @4 O6 j7 C+ F4 e

  160. 6 C! s$ A+ m/ P2 Y7 l
  161. var ssidIdx = -1;
    # N, n/ E. _! x; r# O* X
  162. var ssidAccessAttr = 'Subscriber';
    4 g- \4 A( w6 u' S9 B9 d4 K
  163. var AddFlag = true;
    9 @1 }# M+ N  s+ n
  164. var currentWlan = new stWlan();1 U% a; ?& b& {: N% T& v6 L
  165. var maxSingleWLAN     = new stMaxWLAN(4,'four');
    4 u$ h$ r' P6 O: f+ _1 o
  166. var maxDoubleWLAN     = new stMaxWLAN(8,'eight');$ P% j( p$ I3 u; l

  167. 3 _' w8 V# l7 J# j
  168. function getWlanPortNumber(name)7 ?3 a# O; i4 j: ^
  169. {
    3 |8 x# L' H; V# g! K
  170.     var length = name.length;
    1 j" R- c% H# m! {
  171.     var number;" R7 F" @$ ?  s1 k6 d7 n, d% p
  172.     var str = parseInt(name.charAt(length-1));; O% Q" a/ G/ a
  173.     return str;
      q# }& N  U9 Q$ E* E5 ]3 C4 o# i
  174. }
    % q' r5 A2 z- P" T

  175. 1 r& H9 ]! |" x
  176. var uiFirstRecordFor5G = 0;
    : U  P7 K2 J! }
  177. var RecordFor5G = 0;4 N5 \/ M' z4 Z2 i6 i
  178. var flag5Ghide = 0;
    2 g! X' h7 ~3 K( e: a+ @. P) i% Q
  179. function FirstRecordFor5G()
    6 Y/ @4 I9 D- e8 I" y2 C5 g
  180. {, e" h; t1 \* h6 ^
  181. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))$ k0 R" |& q. @; O8 }( @; f5 X
  182. {2 u: M/ w$ P, H+ N" S+ v/ |
  183. for (var loop = 0; loop < WlanMap.length; loop++)
    $ ]; c6 F4 v- J4 z8 j
  184. {
    . w; N, ?+ n; m& P% ?4 e4 j# `
  185. if (WlanMap[loop].portIndex > 3)
    - d* L1 r* P7 T0 H* i' h, g( S% [
  186. {- s3 L- O1 [. }! L' u% j
  187. uiFirstRecordFor5G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));
    : {& M3 E( K0 {5 o  y4 ?
  188. WlanWifi = WlanWifiArr[uiFirstRecordFor5G];
    : ]1 K% I7 m; ~( T
  189. RecordFor5G = loop;
    4 T9 O: _1 `0 M6 J, Z
  190. break;7 W- u! T( T& f9 O1 H( K1 T
  191. }
    ) g% f" X5 ]9 T% L& F  W4 r
  192. }# f, G' _. x, ?! }8 j- X
  193. }& m6 c8 p4 R) O8 s
  194. }
    & b( \  r' s8 t# W8 c% G
  195. 5 w+ q3 O6 t  a* B, v
  196. var uiFirstRecordFor2G = 0;5 N8 G9 i& w7 a2 D7 e  C
  197. var RecordFor2G = 0;, [. _2 T7 C9 k
  198. function FirstRecordFor2G()# \3 H$ c2 c; k7 B" ^9 r
  199. {0 J- @0 x  `, r0 M) a$ m
  200. if ((1 == DoubleFreqFlag) && ("2G" == wlanpage))
    " ]) E- X: K1 K. Q3 _
  201. {
    ) v5 W8 J, ]# _  }, q% U) f- ?
  202. for (var loop = 0; loop < WlanMap.length; loop++)
    7 H/ k/ w/ I6 Q6 H
  203. {
    & q, V" S2 @8 v0 Y
  204. if (WlanMap[loop].portIndex < 4)# ~% l6 K3 d$ ^, c2 a6 E2 Q6 t  g
  205. {. Y' u2 J  L& ^2 z# B$ Q+ [
  206. uiFirstRecordFor2G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));
    , |) ^, l# `% h$ g1 k: O1 F5 Q2 A
  207. WlanWifi = WlanWifiArr[uiFirstRecordFor2G];
    & j7 K0 e% E. B/ @% N) Q/ Z4 i
  208. RecordFor2G = loop;
    3 |# `0 J& X# Z, b
  209. break;" g: a4 ~9 x4 e. x& \+ H) r
  210. }4 {' r' Z8 P+ K9 n- Y1 h9 A
  211. }) ~( j- R& J1 P% ^
  212. }
    % v3 O$ {5 G4 _6 E
  213. }5 p- e0 j: R9 U4 {* J0 y" M
  214. ! N& D5 I6 {; s/ G$ E; c7 u, w" q. Y3 u2 P
  215. var uiTotal2gNum = 0;
    $ i2 W. }+ S0 R' F
  216. var uiTotal5gNum = 0;4 @" V, x4 P3 U$ B/ @
  217. var uiTotalNum = 0;
    6 x  l$ U) W2 e3 k5 N% k
  218. function Total2gNum()
    * t0 b9 D# t  A* [
  219. {
    # Z: `. ~: n9 G: F0 W; G! U
  220. uiTotal2gNum = 0;" t' I) h, I% v5 D5 M; Y4 r9 g
  221. uiTotal5gNum = 0;
    9 D% t5 P& P# m; b
  222. uiTotalNum = Wlan.length;
    # R+ C. ^% ~' o

  223. 9 }* f' I3 W- m0 ~4 @& z! R% \
  224. for (var loop = 0; loop < Wlan.length; loop++)
    ; G+ Y+ x7 h  W
  225. {
    2 H  U5 N; k  H$ R1 @) ?" Z
  226. if ('' == Wlan[loop].name)2 }! y$ f! c1 r* w6 n
  227. {
    : G4 e" L" l# a" n$ u
  228. continue;; X, W6 x) Q) @/ N+ x2 l
  229. }
    0 X: \- M+ C8 t) `% \

  230. 1 L) F7 f3 Q' p7 e$ W# S% L# [
  231. if (getWlanPortNumber(Wlan[loop].name) > 3): w" Z, G$ q* F& `# c" e# c7 Q
  232. {
    $ N7 }0 D$ e" w7 r
  233. uiTotal5gNum++;: U4 F( ~5 w( }7 p5 H
  234. }
      B" Y' \  h9 }, |+ m2 S
  235. else5 q7 C) c' L0 m6 I+ ~, q- i9 a6 `
  236. {
    8 v# f& x' ^4 J/ q0 J& h1 O3 a0 y7 H
  237. uiTotal2gNum++;
    ) ^6 q! _6 Y! j" r  F
  238. }( g7 }2 {: x8 k# s7 H
  239. }5 \8 K; _: e& W: k1 g6 @
  240. }
    " k; G+ ?: u" z  C
  241. var ShowISPSsidFlag = '0';9 \3 p1 t# Z$ `( w5 {) s# }

  242. 1 k( J' C( x2 D8 _
  243. var WlanMap = new Array();
    8 f! w; X4 T8 s6 R5 P; ^% }# y
  244. var j = 0;/ f% H6 e7 \) }  |
  245. for (var i = 0; i < Wlan.length; i++)
    5 b9 Y( a3 }7 L( Q
  246. {
    2 ~1 k; g6 p* p- Q- S- n4 {* J1 }1 M
  247.     var index = getWlanPortNumber(Wlan[i].name);- l! h3 m8 f0 C
  248.     var wlanInst = getWlanInstFromDomain(Wlan[i].domain);6 A( S# Y9 z9 z! ?8 U8 }, t- [

  249. ; W2 g8 N: S0 B8 W  h
  250.     if ((isSsidForIsp(wlanInst) == 1) && (1 != ShowISPSsidFlag))- l! a+ u" B' K: q- H) U
  251.     {
    3 ?& Q7 p2 q/ A( w
  252.      continue;
    6 A! _5 V' e* X) z1 y
  253.     }
    + s( J1 X2 }* \, d- |
  254.     else+ C& W% m+ }. r; b
  255.     {3 y! a$ m* a* y  l+ P
  256.    WlanMap[j] = new stIndexMapping(i,index);3 ^8 Z6 }( S% k% ]- |
  257.    j++;" F& b4 R' [# B
  258.     }. i8 ~" ^6 D- @3 q! R- S
  259. }) g3 \) \% ^) p7 O4 {1 f

  260.   l# |! `: w8 ^" B' ~% y
  261. if (WlanMap.length >= 2)
    . w8 o0 k1 u/ D: |" T* |
  262. {
    9 X3 ]0 y$ m6 @' u$ J
  263.     for (var i = 0; i < WlanMap.length-1; i++)
    5 K/ k5 ~$ [! w6 @1 Q! y1 _
  264.     {' `+ w' |9 t' ]# Y5 \
  265.         for( var j =0; j < WlanMap.length-i-1; j++)
    ; g3 D9 m5 {, }7 @. E! e- z
  266.         {2 P3 w6 f+ V0 P* s! l# d  H
  267.             if (WlanMap[j+1].portIndex < WlanMap[j].portIndex)
    4 ]; _3 F+ i  |( t* G1 s, k- m
  268.             {
    ( @; S0 x# I6 E% @/ [( G7 Q
  269.                 var middle = WlanMap[j+1];- V3 ]9 X! ^2 _9 ~0 _
  270.                 WlanMap[j+1] = WlanMap[j];
    * h) |2 f' M/ [4 H6 u
  271.                 WlanMap[j] = middle;
    1 \# t8 k2 N. o, M9 M
  272.             }5 j2 m$ u; Q+ a, ~
  273.         }+ V4 w, W$ Q& Y0 _
  274.     }
    " F( a- Y* B+ H, T& y1 E
  275. }9 M# q' i- R8 {6 H! g8 \, L. r0 J$ L

  276. 5 @, }0 a6 F1 b$ O+ n9 ^6 c% P! f
  277. function getIndexFromPort(index)
    & U5 K' o# L, a+ ^" r7 l8 c
  278. {0 j2 z& n: [/ N: C
  279.     for (var i = 0; i < WlanMap.length; i++)( C5 Y& b  K) ]
  280.     {6 e, @; H7 o/ i% y, c& X
  281.         if (index == WlanMap[i].portIndex)6 a8 N7 w* q5 Y' X
  282.         {
    ! R3 \! j: x. Z& L' g
  283.             return WlanMap[i].index;
    : v9 M' A4 }) _; S/ V. n/ x
  284.         }
    : v$ z' m; m- F5 A
  285.     }
    : P+ r% J1 e, S) L8 M, K' A0 y# p9 M
  286. }, O0 E) P8 e& D; u  n' _
  287. 5 m, C  ^& ]  f
  288. function getPortFromIndex(index)8 k! g* r+ P; q) k! k( Q6 m: A( N3 `
  289. {7 H; e1 ^) w* q0 U
  290.     for (var i = 0; i < WlanMap.length; i++)" @7 r6 C, n  ~. r! q
  291.     {7 M4 f  [3 r$ m5 w% L
  292.         if (index == WlanMap[i].index)( i( `" X- |: h9 m: O( s
  293.         {' o" c; m7 r. k7 g3 ]
  294.             return WlanMap[i].portIndex;
    # ?% j0 T) ^% ?) ]8 b4 l
  295.         }4 R6 p) }2 K3 z9 q' F/ h
  296.     }$ T5 m  }# \4 W6 x2 @$ r; ?7 D5 \" ]
  297. } 0 H1 Q/ @- [4 `4 [0 a+ H
  298. $ N) J% k3 n+ t! R# G. V5 |6 o3 A
  299. function getEncryLevel(encrylevel)2 s4 F) M, d, e% V& D
  300. {7 N; G' U1 Q8 Z" M* u' b/ D
  301.     var level = '';, h5 I3 A9 ~$ H7 A
  302.     for (var i = 0; i < encrylevel.length; i++)
    $ K) q+ f5 y9 ^. i) G( i1 M6 c1 [
  303.     {
    / b1 z! d5 f" n, r& R4 T: o
  304.         if (encrylevel.charAt(i) != '-')! j6 U7 T) O5 {$ S$ |. v: z
  305.         {
    8 h! q7 T- G! q, W
  306.             level += encrylevel.charAt(i);
    ! c& G1 V+ J$ [$ l8 B2 a
  307.         }
    * Y6 ~$ A. F7 T
  308.         else
    ) j1 K" N0 }( B* I: F& N! R0 H& j
  309.         {
    ( B* K1 C  Y7 H9 @
  310.             break;# ?! l# s# e3 }* o. i
  311.         }3 e& D; e& l4 j# h3 S9 c
  312.     }
    # ~2 u: b1 v2 j7 @" q, v* Z9 ^
  313.     return level;( D0 }: g  x& v. ?# d$ s6 S
  314. }
    3 _( H* C* U* {+ D: m. w
  315. 2 p9 J! n) i, K
  316. var auth_none = "NONE";
    # y* g* _( o) c9 c" F
  317. var auth_wep = "WEP";
    " K- I( z% R6 `! |* A
  318. var auth_wpa_psk = "WPA-PSK";
    . b% b# y* d- q6 Z7 S& I) H
  319. var auth_wpa2_psk = "WPA2-PSK";# o6 B+ B. E+ B) O* J  T
  320. var auth_wpawpa2_psk = "WPA-PSK/WPA2-PSK";6 z0 Q& _5 }# y
  321. var auth_wpa = cfg_wlancfgdetail_language['amp_auth_wpa'];
    : ~  Z* r5 K3 n+ s
  322. var auth_wpa2 = cfg_wlancfgdetail_language['amp_auth_wpa2'];8 q- B$ S+ j# N' P- O
  323. var auth_wpawpa2 = cfg_wlancfgdetail_language['amp_auth_wpawpa2'];
    - n- O6 K: V! j% m; U1 S
  324. 7 V% a6 @! L5 N5 J$ g1 M8 }6 `' Q
  325. var encrypt_none = "NONE";7 v! g- P/ k. L7 m) m
  326. var encrypt_open = "OPEN";1 _- d- i* A5 _, V; m0 S8 u$ X
  327. var encrypt_share = "SHARE";
    / F2 o! j$ t8 W# |3 @7 P3 C
  328. var encrypt_both = "OPEN+SHARE";  C# d+ Q# [, O6 m
  329. var encrypt_tkip = "TKIP";
    & a( y7 U& d8 D, b
  330. var encrypt_aes = "AES";
    1 h" R- ]4 ]1 C& C; Y( y6 @
  331. var encrypt_tkipaes = "TKIP+AES";. T0 j8 f0 R; G6 H) I
  332. 8 F) b4 D# i$ f# s8 T
  333. function addAuthModeOption()
    2 j7 d& o- _; V; D. }
  334. {
    : ^* p7 M" v% Y5 y: h$ b
  335.     var len = document.forms[0].WlanAuthMode_select.options.length;   
    3 {1 L+ Z3 k6 q9 b, {+ T) c/ C
  336.     var authMode = getSelectVal('WlanAuthMode_select'); 6 I7 o3 f! c3 ~; ?# w. i
  337.     var mode = WlanWifi.mode;
    # V. l- x# `8 A0 ^( U
  338.     : q% T# a8 V' D7 F9 B
  339.     for (i = 0; i < len; i++)" ]" V1 |2 Q; E) v
  340.     {, Q7 G9 h- @: c$ b+ ^! \; o
  341.         document.forms[0].WlanAuthMode_select.remove(0);9 _# w% G: Q* d% ?8 \
  342.     }
    " N& N2 W" i, l- v  q- p+ Q

  343. 9 l) B4 ]: T" h% e
  344.     if (mode == "11n")! W3 z% ^9 n# C) C  R
  345.     {% W# j6 N3 Q4 C4 G( C
  346. document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");7 a# D3 ]' K5 F4 ^; ?
  347. document.forms[0].WlanAuthMode_select[1] = new Option(auth_wpa_psk, "wpa-psk");' K' u8 c9 J9 H# ?6 S5 [* h
  348. document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa2_psk, "wpa2-psk");0 O, s4 D! v; D- H8 h: p
  349. document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");! `9 [5 W2 N8 b+ G3 M9 e8 Y7 `. c
  350. document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpa, "wpa");
    0 l6 \' W4 \7 Z
  351. document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa2, "wpa2");
    + K( N/ P/ L# s. j! [" F$ z
  352. document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpawpa2, "wpa/wpa2");) e! w* }# n0 _: b" ^. n/ z' o. F
  353.     }
    + r  \3 Y/ t2 q6 ]  v( O
  354.     else
    6 `& J1 R# {2 \- V; V  I0 R9 @
  355.     {
    9 s% q/ y% L7 X5 y* |0 T$ W. R  ]4 h
  356. document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");" t& o) z  _' ?
  357.         document.forms[0].WlanAuthMode_select[1] = new Option(auth_wep, "shared");
    . Q% Q/ F) b& K4 f* m# `
  358. document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa_psk, "wpa-psk");* Q& D, t# E+ t* }8 ^
  359. document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpa2_psk, "wpa2-psk");* R9 C! A+ U, Z9 {0 [
  360. document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");5 c* g3 Z7 l2 s4 l8 o7 k% B
  361. document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa, "wpa");! D4 ~( t2 y" U) i' S5 n8 e
  362. document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpa2, "wpa2");
    $ U. x- |6 G. ?1 A8 H
  363. document.forms[0].WlanAuthMode_select[7] = new Option(auth_wpawpa2, "wpa/wpa2");9 F3 I6 }" l% o# q" b6 E
  364. if(1 == WapiFlag); M, g( @5 y. U7 ^! P
  365. {
    1 S' c7 Q% c+ G! L5 ^
  366. document.forms[0].WlanAuthMode_select[8] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi_psk'], "wapi-psk");1 r1 A! o* ?- X! L* E
  367. document.forms[0].WlanAuthMode_select[9] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi'], "wapi");
    6 x2 |4 G' g. L, l$ \% P! b7 `1 _
  368. }
    & z  ^8 e( w, r1 w
  369.     }
    : G5 g' R# @1 l6 U* D
  370.    
    / A) A  _# p# u, J
  371.     setSelect('WlanAuthMode_select',authMode);! ^! W- ^2 w5 ?, j
  372. }
    9 _  r6 p2 J0 S, Y+ A$ m! Y
  373. + e: g  b/ o" v# s0 N3 s- }
  374. function addWapiEncryMethodOption()
    ) I% k, n* b% o8 ?% S
  375. {
    3 k7 U: G3 H: u, T3 h& r1 E
  376. var len = document.forms[0].WlanPwdMode_select.options.length;3 ^& J1 c2 c+ T: Y# Q- _# s2 Y
  377. for (i = 0; i < len; i++)) h- Y: O) J# C* Y2 B
  378.     {8 _) b9 x  C" A( p) x, U: T, Y" O
  379.         document.forms[0].WlanPwdMode_select.remove(0);
    7 Q, h7 ~  ]$ Q: u
  380.     }
    5 t0 c1 L- H7 k: z
  381. document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_sms4'], "SMS4");
    : ]# Q9 Z" g+ v& T* m0 I
  382. 2 r) q6 n, y% i* q5 @! e
  383. }: H/ o$ l( j; ^. z
  384.   u& \# p( @0 ]; Y1 v
  385. function addEncryMethodOption(type1,type2)
    ) x2 S, G: h5 N! n$ J0 R
  386. {7 S' |3 \+ |: ~( y
  387.     var len = document.forms[0].WlanPwdMode_select.options.length;, J  f* I3 Q" v4 j
  388.     var mode = WlanWifi.mode;
    % ?; a1 X+ D. }9 H: d0 v4 D
  389.    
    ' Q. Z) T  d) M0 L9 v3 {2 ^# j
  390.     for (i = 0; i < len; i++); T' M. `4 O2 S* W4 Q
  391.     {
    9 Z4 n" J; c: |% K4 \' E' q- M4 l3 w
  392.         document.forms[0].WlanPwdMode_select.remove(0);
    4 K- C8 V& A4 |) m& P9 I
  393.     }
    9 C8 R/ @" v4 Z* e- Q. m/ b

  394. : d7 o$ A0 x: G6 @: z# D8 j
  395.     if ((type1 == 0) && (type2 == 0)), N" e5 u) Z( m
  396.     {4 K. P0 s8 ?% p5 H9 M! G
  397.     }
    9 K9 q. o8 {  g9 g0 q$ Z- o$ o
  398.     else if ((type1 == 0) && (type2 == 1))
    # Q$ _( q. P+ I  A" q! a( w: m
  399.     {0 u' l* ~7 p  Q- \* A" @, p- n
  400.     }! t5 k& N% v9 [+ r
  401.     else+ a+ c+ c. o) A% A
  402.     {* j- m; O# T* t1 r
  403.         if (mode == "11n")% p/ N2 k& ^8 Q: w6 [1 ~
  404.         {% p+ J) J: a" u3 S
  405.             document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");   
    # ?( n2 E) A7 g) Z
  406.         }' r) ]: z: W* B4 ?$ K2 A0 y  a
  407.         else4 Q( j. A5 p! H0 M' Y9 m
  408.         {& }  h* [7 x) O* n
  409. document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");
    " H- O8 M" L4 ^! a* {
  410. document.forms[0].WlanPwdMode_select[1] = new Option(cfg_wlancfgdetail_language['amp_encrypt_tkip'], "TKIPEncryption");( P; v  _2 F4 p7 t% F) m
  411. document.forms[0].WlanPwdMode_select[2] = new Option(encrypt_tkipaes, "TKIPandAESEncryption");2 ^5 n$ d9 d& W/ ?( h! F& [  @
  412.         }
    ! w4 T4 q% L. `/ ~
  413.     }
    , T6 T" I. E6 ^+ x8 f: p; E: `# k
  414. }
    : S5 x5 H$ s( m. `3 M& W
  415. - I1 Z: a) L7 s2 z
  416. function GetWepEncrypt(BasicAuthenticationMode)( c( F! [8 Z$ G* S, R) p: [
  417. {
    . |* l2 L; K2 I& Q) s
  418. if ((BasicAuthenticationMode == 'None') ||(BasicAuthenticationMode == 'OpenSystem'))
    * ?7 X; ^& |" F. ~, z
  419. {
    & K, `3 s* V+ C6 _; `" x
  420. return 'OpenSystem';
    * P# g! N, h) X; T/ }3 V0 ?
  421. }
    . |6 x& u7 z( @5 C, \% `% E' A
  422. else if ((BasicAuthenticationMode == 'SharedAuthentication') ||(BasicAuthenticationMode == 'SharedKey'))
    6 v0 R) _3 i- Q7 K
  423. {  }9 `0 ?' V5 Y7 i# ~8 Q7 y% A
  424. return 'SharedKey';
    % L3 f1 ?: o7 I' c) E
  425. }* `  R1 O; R3 J
  426. else
    ! a4 |6 E" c3 z0 G
  427. {
    0 w4 H+ M/ |- n% d
  428. return 'Both';3 o" E9 I3 j- ?2 f
  429. }6 ~/ D3 j9 }4 n. L0 s, u
  430. }8 Q7 i2 R  @& X

  431. 5 g; O+ e" \- A/ p. x& b" z
  432. function ClearPsdModFlag()
    9 f' i! D& I2 @( ?6 x
  433. {+ v0 t- J. V% K8 s
  434.     wep1PsdModFlag = false;
    5 u) }" a3 j. d. f) {
  435.     pskPsdModFlag = false;
    " S3 I: b' d; f' x, ]" l
  436.     radPsdModFlag = false;
    " O9 T7 R  c; K9 s) |: H8 Z4 t
  437. }
    ! }5 T. U6 H2 Q& X, b/ o) k7 O
  438. 9 r0 C$ ?3 R- J+ x. a4 d
  439. function authModeChange()5 l4 G) K6 M; ?, ~3 M( r
  440. {   
    % q1 i$ {, T- k5 {0 ^
  441. ClearPsdModFlag();; [# R. K2 B& j2 b4 S9 }

  442. ! E7 I0 \7 G. f+ y, k# d6 j% Q
  443.     setDisplay("wlEncryMethod",0);
    4 _5 \  Q% ^/ i8 r
  444. setDisplay("wlEncryWep",0);
    ; C1 R+ D# G$ H) }0 X6 U
  445.     setDisplay("keyInfo", 0);
    3 r3 D. Q7 b* O, ^& N
  446.     setDisplay("wlRadius", 0);: i& y- m: U9 F) F9 z9 y
  447.     setDisplay("wpaPreShareKey", 0);) p* k* v, O% c5 C0 J3 }
  448.     setDisable("WlanPwdMode_select",0);9 K* [% @5 t+ d' \9 E
  449. setDisplay('wlWapi',0);
    & F% o! \5 N* Y2 ^# X

  450. 7 M9 g- `5 g, U
  451.     var authMode = getSelectVal('WlanAuthMode_select');      
    8 Q( T8 X  O" h& v. B6 V. U+ `

  452. , N/ b5 G' j  m) {
  453.     switch (authMode)
    & d4 |- k4 Z! f. y1 _
  454.     {
    ! o  n8 Z" U6 s# ^- z) t
  455.         case 'open':" f/ q8 J9 O+ Y  A
  456.             break;
    " @7 }5 Q/ n' `
  457. 6 Y+ D/ K$ x1 v" J% G
  458.         case 'shared':! K. T2 S' i1 X0 N# u
  459.             var level = getEncryLevel(Wlan[ssidIdx].EncypBit);! `+ D$ x5 P; Z
  460.             var mode = WlanWifi.mode;              : S# B- E) r; U! G) ?
  461.             
    5 }1 b. r: }' K
  462.             if (mode == "11n"); f  D7 v+ b+ A; {
  463.             {
    : A0 K7 Z& }: O5 E' w8 q* V) R
  464.             }
    ; k3 |% R  L8 Y: r/ J$ F* [
  465.             else8 r* c: y1 P9 s
  466.             {$ {3 Y, |4 m7 r2 r" M0 D& N
  467. setDisplay("wlEncryWep",1);
    # T- l" m& o4 w5 a
  468.                 setDisplay('keyInfo', 1);
    8 l. R/ H& C4 N; q% l6 S
  469.                 if (AddFlag == false)4 V: g7 g8 y2 G
  470.                 {# q3 J# g' v5 G) _3 p
  471. setSelect('WlanWepPwd_select', GetWepEncrypt(Wlan[ssidIdx].BasicAuthenticationMode));
    ! z4 y0 h7 z6 V; h8 k- `9 p
  472.                     setSelect('WlanKeyBit_select', parseInt(level)+24);
      M% d& S6 f# H: x
  473.                     setText('wlKeys1',g_keys[ssidIdx * 4].value);
    & n7 s: `& O' x
  474.                     wep1password = g_keys[ssidIdx * 4].value;
      G6 L8 I# g+ e7 Q9 {) J- E2 z
  475.                     setText('twlKeys1',g_keys[ssidIdx * 4].value);
    # @5 `* I& B* \8 A+ P# O
  476.                 }. Z9 P0 U* {) C, U
  477.                 else
    4 H9 F- [- y, u
  478.                 {
    6 H+ G1 G* V: `# H
  479. setSelect('WlanWepPwd_select', 'Both');
    : W0 c& \" C3 i; Q3 K, A* o
  480.                     setSelect('WlanKeyBit_select', 128);
    1 N( {  O. B) X% h) I/ h9 R5 A
  481.                     setText('wlKeys1','');
    $ h4 u, Q1 L3 @( M
  482.                     wep1password = ''; setText('twlKeys1','');+ L2 g. b) `+ Q# ?+ J
  483.                 }1 w% u* M4 Z- p, m' H2 z
  484.             }      " a: m9 q* @+ T+ U
  485.             break;
    $ I( z. j) D/ r

  486. 1 Y( Q& e, Y: J' i" y8 u! b, B/ x
  487.         case 'wpa':
    0 C: ^" d0 z8 a9 y) Z. u, P
  488.         case 'wpa2':
    7 L+ m; v8 K( I' W! i; O
  489.     case 'wpa/wpa2':
    : D9 K# Q+ q7 l. b2 D* _( P/ C
  490. setDisplay('wlEncryMethod',1);) I( O1 K  ?- y3 c
  491. addEncryMethodOption(1,0);" Z, o. C% K7 A1 B* x& l) k7 n
  492.             setDisplay('wlRadius', 1);
    ' }/ w( m$ `' j! f* X% U# W7 x
  493.             if (AddFlag == false); e$ J$ D4 f" q. ^
  494.             {
    ; X% t) F$ {! e% P! p, o% o9 L
  495.                 if (authMode == 'wpa')& s. `/ Q/ `3 u. F# P; O
  496.                 {8 g( W+ y1 h; X- o7 _  s* `
  497.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);, t1 B5 t7 d8 D1 q7 S3 ~
  498.                 }
    ' s8 E# @: G8 j+ Z0 X$ T3 A5 J4 j
  499.                 else if (authMode == 'wpa2')
    : S8 a: v7 x. ]9 [6 L; g8 X
  500.                 {* h$ U" r7 g2 p4 A
  501.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);: q/ G2 \/ {2 T& T, S) i' w/ U
  502.                 }
    + P, `) y# |4 C% a
  503. else
    6 w  ]4 D  i, o8 L4 S7 R
  504. {! A( a$ @: F1 K7 o8 o+ F5 S# k1 X
  505.     setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);: t2 e( ?2 J* @" k2 V
  506. }
    ' w' u" P0 y" C* x
  507.                 setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    0 r. N: a! K. x0 `2 P
  508.                 setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);% F  v1 q1 }0 C4 B& Z! J
  509.                 setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);
    2 [" F/ v4 a, o( \  P: x
  510. radiuspassword = Wlan[ssidIdx].RadiusKey; 6 @0 H6 `! U+ ~. E
  511. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);8 A8 O9 S- g- s: w) m6 S$ m
  512.             }2 w4 b* G4 q  v+ M2 t, z, i0 d
  513.             else
    ; h+ L/ t  Z$ M- J8 c- f" m: r
  514.             {$ t+ P7 g: E6 c: G+ g0 g
  515.                 setText('wlRadiusIPAddr','');
      T4 C, X& h8 w& @
  516.                 setText('wlRadiusPort','');$ g: U' f' P! Q- U- I6 h
  517.                 setText('wlRadiusKey','');
    0 N7 Z9 \3 r6 R( o
  518. radiuspassword = ''; - O6 C% d; g+ x
  519. setText('twlRadiusKey','');) X; L+ \4 G# T# I5 }- a. b5 w
  520.             }0 p: a6 k. W( I& A2 r0 `
  521.             break;
    & P) M) H' i3 W6 z
  522. ) }  I) D/ u6 F; p
  523.         case 'wpa-psk':* o* H1 n" o8 Q# O" W" `7 V$ k
  524.         case 'wpa2-psk':! ?  W% g7 {+ J+ D  i" {$ H0 D# X
  525.     case 'wpa/wpa2-psk':
    ) u* e2 ~3 o* W, K& x
  526. setDisplay('wlEncryMethod',1);
    & w" B4 Q+ P, K& }5 L+ v# M: c
  527. addEncryMethodOption(1,0);- }% W) ~/ ^$ ~2 w

  528. 2 G/ h# A1 Y; y' D$ D' M
  529.             setDisplay('wpaPreShareKey', 1);8 Z7 Y! F/ t' c9 ?$ M. v% N
  530.             if (AddFlag == false)- [0 R4 Y0 V0 o; _. G+ d
  531.             {
    ! i3 ]2 W$ Y4 z$ m
  532.                 if (authMode == 'wpa-psk')
    $ Q# k4 J$ O! N. V9 k
  533.                 {
    - R( R$ H. x3 _4 m2 o  M6 {: F' Y
  534.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);% i& Z+ |  |3 N0 v, n/ B, y
  535.                 }
    + D' N: S5 H, u% H. E- m( E7 M
  536. else if (authMode == 'wpa2-psk')% u$ B2 l4 L) g
  537.                 {
    $ x" r. K: m: ~: E! R& k
  538.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);7 X3 h+ @/ h/ f4 ]* B. d
  539.                 }
    3 L9 g8 ~2 \2 b& [" o: Y
  540.                 else0 N) K% |* y" S, j8 F5 d
  541.                 {
    1 E6 A, A: v3 B- U
  542.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);7 _' m, z, @- j0 b+ f
  543.                 }
    ' U; R9 z0 L: @" F+ ?
  544.                 setText('WlanPassword_password',wpaPskKey[ssidIdx].value);: q4 V; m! i& M1 O6 a& m
  545. wpapskpassword = wpaPskKey[ssidIdx].value;9 k3 \. ~; J: Y* n, \
  546. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    / t* w) M% V6 H6 E* Z# o  t0 T
  547.             }% \# ?- P8 m2 v# n7 d
  548.             else' s9 J, o0 T# R8 [! \$ I
  549.             {; K$ n5 W' ^1 L! h/ u3 f
  550.                 setText('WlanPassword_password','');; i3 B4 j: ?: b, ~  W9 o7 Y
  551. wpapskpassword = '';: o. X! O2 H: @+ S/ ?' @7 D
  552. setText('tWlanPassword_password','');
    + ]/ f0 u+ \$ ?. H- p( q/ B
  553.             }
    9 q, u% b1 v% l
  554.             break;$ K  _& Q. E& J+ Q5 T
  555. case 'wapi-psk':" Z- y5 ~* m" M/ F  {
  556. setDisplay('wlEncryMethod',1);             6 g1 ?/ H6 A2 ~2 i  V
  557.             addWapiEncryMethodOption();  2 }8 B3 o9 \0 Q6 }+ S6 W
  558. document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
    6 n2 k" N/ n, B% i1 K/ Z
  559. setDisable('WlanPwdMode_select',1);
    ! F% V  z: N0 }3 F* ~! _; G
  560. setDisplay("wpaPreShareKey", 1);
    & L6 S9 m& }8 b3 Q) K$ A" n3 A
  561. setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    , }, i2 e! Z2 h7 r
  562. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);/ s" Y6 S$ v: M( c3 |
  563. wpapskpassword = wpaPskKey[ssidIdx].value;, ^* B  i2 w0 ~, C3 p
  564. if(AddFlag == false)
    & N# [  l, O: [# T( S0 U: ?9 C
  565. {# [8 u$ R! d  @: b
  566. - a; |0 r% `  A; a- j; `$ }$ j
  567. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);; M/ G  f1 X' C- v. ~: {1 |9 ]
  568. }
    ! C3 y9 [, S; b& |' c8 u
  569. break;
    " d- b. I$ Q7 J# q# x
  570. case 'wapi':
    6 E! M5 `9 b- d0 Z* d
  571. setDisplay('wlEncryMethod',1);            
    . E2 j4 z2 t' l6 ]
  572.             addWapiEncryMethodOption();  5 z. m; _1 L% x# E4 c! v. _
  573. setDisable('WlanPwdMode_select',1);
    3 A# F! X) C% d
  574. setDisplay('wlWapi',1);
    + X5 a, ?+ j. M) l  \; q- l8 f1 x
  575. setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
    " e+ o2 e! p) y, q3 @
  576. setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
    + q3 |, L6 t7 l. z+ R
  577. if(AddFlag == false)
    0 F" a$ D' o& J
  578. {/ _3 K; t, P; `# H6 _
  579. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);8 s: A$ X# ?- p7 s6 D! A
  580. }
    : \3 ?5 r% d1 h* _
  581. break;7 R  T3 D. ?' R; M+ e1 D
  582.         default:3 x# w4 J4 b$ ^
  583.             break;8 }/ D$ h2 X6 X
  584.     }; d9 [$ G& U% e7 t3 o" ~
  585. }
    6 g/ h7 g" p( a
  586. ) J* K  d% l/ M1 Q
  587. function isValidKey(val, size)
    8 x6 g( v( {- b8 N/ e" T+ f- y
  588. {
    5 i+ I: {* Q: ^7 J' v* w
  589.     var ret = false;
    6 L' c/ `# }& W% w6 Z
  590.     var len = val.length;
    7 s9 L  X% D6 q9 G: ]/ }- R
  591.     var dbSize = size * 2;" r1 ?$ n2 G: R: n; x2 O+ i

  592. # q2 q  P  ~. o0 L1 |4 L
  593.      6 Z# c# I# a" v% h
  594.       if (isValidAscii(val) != '')
    $ ~3 m- V* U+ D* G# R
  595.      {
    4 U! s' N7 G' [8 n$ i4 E
  596.         return false;
    " c; ?8 W  o5 g9 K" N2 G4 {- d; ^
  597.      }
    ; v! E  Z) |+ R3 f

  598. ( u- W  J2 M2 W' ]! K
  599.     if ( len == size )
    * F4 @( y* K' B3 y7 _
  600.        ret = true;
    ! F7 Z& R0 k6 S6 g0 O! A
  601.     else if ( len == dbSize )
    9 i4 O% H8 D/ D5 i
  602.     {6 n! X( h! a  _9 `
  603.        for ( i = 0; i < dbSize; i++ )
    ' Z; }2 t" f3 O7 v& M* b) L2 f# {
  604.           if ( isHexaDigit(val.charAt(i)) == false )
    & j1 X- K4 y+ w8 o/ e' a2 S' C3 N  V
  605.              break;4 i! ?, E0 G/ c4 t  a, G* s1 {
  606.        if ( i == dbSize )7 Z4 b9 Z. F0 p: U$ b0 ^
  607.           ret = true;
    0 V4 s" L) M5 n" v) j1 u
  608.     }( N  N5 H" [' ?: X
  609.     else
    , a, [& y0 I' e* F, V1 M- s% F
  610.       ret = false;  u0 s& w- O& |& |/ I8 X, Y

  611. ) b+ t* F; {, E
  612.    return ret;- o5 A  v+ H* \; r6 q# X! N
  613. }
    4 N4 ^, D3 _/ e) e* D; z8 \( W* l% T2 G
  614. / l% J/ p; @% u9 l; G
  615. function displaywepkey()* q6 u" o9 u0 O* ]
  616. {   
      H1 }6 y4 Q. o6 e  V
  617.     if (AddFlag == false)
    , Z. I* K+ D3 X
  618.     {
    ! b$ T. o" e6 i5 I2 ?
  619.         setText('wlKeys1',g_keys[ssidIdx * 4].value);7 ?! j4 v6 l1 v$ o, P
  620. wep1password = g_keys[ssidIdx * 4].value; + d# ]4 I1 E- ~, |0 a
  621. setText('twlKeys1',g_keys[ssidIdx * 4].value);+ v. \! Y4 I5 Z& B  m$ M9 r
  622.     }3 k9 L$ l7 T3 N4 B& ~
  623.     else' m, {% c* d- K, ^- x/ `! x1 {
  624.     {
    " {3 Z. S; s1 k9 Q' X
  625.         setText('wlKeys1','');  n. `9 o$ x' ^7 M6 [
  626. wep1password = ''; " y( X9 ]. n' ~+ q0 e" S1 @# z0 l
  627. setText('twlKeys1', '');
    * m( e# }! m4 ~+ ]1 j
  628.     }
    ! k2 s" a* N6 v% U" X! _
  629. }5 X: Z. Q0 W' _* w# m, \: m
  630. 3 }: K; d. Q; u1 q$ h( _! n! p
  631. function beaconTypeChange(mode)7 ^) L9 s) N9 F9 n& z& v
  632. {
    3 |1 B" i5 [7 u: w0 q6 D
  633.     setDisplay('wlEncryMethod',0);, j( U: k/ T: k4 u3 A
  634. setDisplay("wlEncryWep",0);
    ; D0 h1 w  P( o5 t8 a  F
  635.     setDisplay('keyInfo', 0);
    : D" B' w9 x* t$ p) U) J
  636.     setDisplay('wlRadius', 0);
    8 l; f7 L- I6 _& ?! a
  637.     setDisplay('wpaPreShareKey', 0);
    5 C4 k) I2 F# T* U- e
  638. setDisplay('wlWapi',0);2 F/ ]/ H* ~4 y" h
  639.    
    " y6 T& \- W: Q4 t1 N$ ?: V
  640.     if (mode == 'Basic')
    / R! Q) h: U5 B7 ?( R
  641.     {
    ( V6 r& J4 p  S- V/ h8 u
  642.         var BasicAuthenticationMode = Wlan[ssidIdx].BasicAuthenticationMode;
    ; o6 c2 P5 ?! I* N
  643.         var BasicEncryptionModes = Wlan[ssidIdx].BasicEncryptionModes;$ p% c5 R- k9 Z% F! k; A) M
  644.         if (BasicEncryptionModes == 'None')
    # W; ^. G+ m5 G* n5 ~! n
  645.     {
    & h: j, \3 |$ W" O/ H1 b' C
  646.             setSelect('WlanAuthMode_select','open');, s* o5 v9 B0 T% |& K4 ]0 Y
  647.         }
    : _$ w& W4 }7 T$ ^1 Z. @' _& {
  648.         else
    4 B7 v+ H3 P8 Z. h% v) c
  649.         {
    9 r5 ^% @- V+ e" b# B
  650.             var level = getEncryLevel(Wlan[ssidIdx].EncypBit);, m( b- S" h, v+ s9 V3 b! ~
  651. setDisplay("wlEncryWep",1);' q" c( ^2 r# @  B3 }
  652.             setDisplay('keyInfo', 1);
    " q3 N- o! ~& o  J, z9 B9 Z1 Q( R
  653.             setSelect('WlanAuthMode_select','shared');
    3 u; j1 h; W$ ~) v  _
  654.             setSelect('WlanWepPwd_select',GetWepEncrypt(BasicAuthenticationMode));$ }! w, z$ j3 a; X
  655.             setSelect('WlanKeyBit_select', parseInt(level)+24);, b1 d& }8 e6 _7 Y  N5 A
  656. WlanKeyBit_selectChange();
    / l: C9 C/ J' Q4 @
  657.             displaywepkey();! N3 v% u6 K- u
  658.         }
    ! J( W) O6 X" s- l( t
  659.     }. w& Y6 t  D) ^8 ~  X+ x' ~
  660. else if (mode == 'WPA')3 v$ g2 H/ A+ m( U: ~& H9 ]5 o. J
  661. {
    3 p  N) s4 H, ~" M5 S4 H
  662.     if (Wlan[ssidIdx].WPAAuthenticationMode == 'EAPAuthentication')
    % M* H2 i" T% U& j6 x
  663.         {
    2 w5 {9 R8 k& ~+ n
  664.             setDisplay("wlEncryMethod",1);
    ' B) ^9 m$ }9 k" ^  v5 e( n5 g7 {
  665. addEncryMethodOption(1,0);
    4 ?, o9 m- s/ f: s* i
  666.             setDisplay("wlRadius", 1);
    2 i7 x. w; ]% \
  667.             setSelect('WlanAuthMode_select','wpa');/ e7 m4 }8 |0 f% w: N
  668.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);; I  O( j9 t0 r; g' b+ W
  669.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);8 @( u* g9 H7 @" [
  670.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);2 d. R, [! ^! c  b4 V. b
  671.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);" o5 c6 B  j* [5 Z" [
  672. radiuspassword = Wlan[ssidIdx].RadiusKey; 0 }  U) _: s# I' P! B- R
  673. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);4 U( R" S  w" E. e1 H
  674.         }
    * s) I8 b6 Y# T
  675.         else2 i$ M! X0 `6 C+ z# a
  676.         {
    " c1 i6 I8 ]2 B  Y! j
  677.             setDisplay("wlEncryMethod",1);6 `5 D. |' l) K6 J% H" k+ M' r
  678. addEncryMethodOption(1,1);
    9 z$ `* l! l7 i: a+ C
  679.             setDisplay("wpaPreShareKey", 1);
    1 C% X, ~4 S1 q7 A
  680.             setSelect('WlanAuthMode_select','wpa-psk');& \/ L/ J& L" X2 I, Z
  681.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);# p7 P" [% o- Y5 i/ s
  682.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value); : q, d6 E! I" z: z3 t' G* h& |$ f
  683. wpapskpassword = wpaPskKey[ssidIdx].value;
    2 I! p& T3 n/ R2 g) j
  684. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    9 H- E+ Z% a# t6 `4 @
  685.         }9 `" e/ i' s& b5 f1 d2 P! L" E
  686. }
    ' \0 a( Y1 B. O7 o( z6 d
  687. else if ((mode == '11i') || (mode == 'WPA2') )
    & ^# y! @* [: L# O6 W
  688.     {: m, E( p" N" M$ g5 y
  689.         if (Wlan[ssidIdx].IEEE11iAuthenticationMode == 'EAPAuthentication')9 Z  q# t% |& R( y  e
  690.         {
    ; ^, s- K+ X6 E4 S5 x) ]+ n$ |3 ^
  691.             setDisplay("wlEncryMethod",1);
    , B2 z5 f- e9 \8 j3 Z, n, a
  692. addEncryMethodOption(1,0);
    * N* A1 v7 {7 S# H' R2 s: _- ^# c
  693.             setDisplay("wlRadius", 1);  g# U; ?. Q9 m$ x* T( O
  694.             setSelect('WlanAuthMode_select','wpa2');
    3 o) S, @3 r) q4 I) Y$ v/ S3 N
  695.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);6 _1 S5 s  x7 i9 U: t) I! J' g
  696.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    & o/ ]  e" ], n( I  N
  697.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);( V. G) c- z) k& d' i
  698.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);
    - w+ }* S! o9 Y% ^+ \
  699. radiuspassword = Wlan[ssidIdx].RadiusKey; ! h% q" m( Q6 ]
  700. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);: q) t8 W1 l$ `8 O" k
  701.         }
    * n- [" R/ D* c( K) h
  702.         else+ m. ~$ q' `* X8 O( D& A
  703.         {
    1 }) s; q# x0 m# M! Q% H2 Q
  704.             setDisplay("wlEncryMethod",1);
    , O7 w& X' |0 x. @
  705. addEncryMethodOption(1,2);9 V# D" F/ X* A# ?
  706.             setDisplay("wpaPreShareKey", 1);
    % d. V. I& G8 d( i* i- D; C) c7 |! L
  707.             setSelect('WlanAuthMode_select','wpa2-psk');/ f! A5 D+ x7 f$ f6 }& d+ @
  708.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);4 E0 i* u" }7 A, F, E; U
  709.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    5 w' P( \! Z6 B1 J- T' j7 q  S
  710. wpapskpassword = wpaPskKey[ssidIdx].value; 4 c! k" M( [- o* c
  711. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    : a% U( ?& E5 j6 }
  712.         }3 j' _9 x8 U$ U3 ^
  713. }& V6 U# t" T6 ^/ G
  714. else if ((mode == 'WPAand11i')|| (mode == 'WPA/WPA2'))
    3 E  T* A- {% H4 _' ~2 M+ ^
  715.     {; V! L; i% N; y: W! E
  716.         if (Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode == 'EAPAuthentication')2 z+ o8 d, o& |* i: o$ \
  717.         {
    ! F8 R. w- n) X6 M$ N' b7 l
  718.             setDisplay("wlEncryMethod",1);
    ( e0 J% R- D2 q! b
  719. addEncryMethodOption(1,0);5 m: Q) H  r& G
  720.             setDisplay("wlRadius", 1);1 u" e) {: V" @9 e% ~! ?" L
  721.             setSelect('WlanAuthMode_select','wpa/wpa2');
    ; p7 s1 w* Y* s
  722.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);5 E1 t) Q* b0 r9 c
  723.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);$ |5 A. E+ o' r6 G1 x
  724.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);9 X; `0 Q+ G# @2 Z$ X
  725.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);. m5 V+ X0 O, [0 n; i) p4 L6 t$ f9 S
  726. radiuspassword = Wlan[ssidIdx].RadiusKey;
    4 |& \4 `/ R; F- @7 s; {' d3 k) ]
  727. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);
    , M' I; m  X, S7 A; \! w# L, Q; g
  728.         }  Z* k+ T/ E2 M. \- ~# K/ W: U5 S
  729.         else7 o$ a# _7 @4 r! l& X6 x
  730.         {
    ) F6 K; J5 c! C
  731.             setDisplay("wlEncryMethod",1);
    ( [5 _0 E+ s0 M2 H
  732. addEncryMethodOption(0,2);: N5 ]! O2 T8 m( G6 [
  733.             setDisplay("wpaPreShareKey", 1);" y3 P1 x2 t  j
  734.             setSelect('WlanAuthMode_select','wpa/wpa2-psk');# q) q. {1 Q9 Y6 h2 N* v) ?, k) b- D
  735.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);  F2 U$ r7 ]3 r2 m7 Q+ h; Y
  736.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    9 ^. L* o. s8 L, y, \, w# U
  737. wpapskpassword = wpaPskKey[ssidIdx].value;
    - P) a( m' h3 N  b
  738. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    * L, b, w6 M& }3 \& l& t
  739.         }4 f" n5 }. f/ A6 N8 U! Q' L6 ^
  740. }0 j6 M* }' _9 |6 r$ Q$ N
  741. else if(mode == 'X_HW_WAPI')
    / d" J6 x, K' [5 v
  742. {
    ) ~, O; [  `7 @( A  j
  743. if(Wlan[ssidIdx].X_HW_WAPIAuthenticationMode == 'WAPIPSK')% k: t( c: Q" E. p! o" |
  744. {2 S5 e6 U% P/ H7 d4 I7 j
  745. setSelect('WlanAuthMode_select','wapi-psk');
    9 t& i& o  a# U2 k0 R" B# R
  746. setDisplay('wlEncryMethod',1);            
    - s+ N: [9 A/ f* \1 _
  747.             addWapiEncryMethodOption();  # ^8 @' t- Y/ D4 D+ {) M5 T

  748.   d+ M% [8 Z; ]0 p2 e
  749. setDisable('WlanPwdMode_select',1);
    ( o' `8 A' x! m) b
  750. setDisplay("wpaPreShareKey", 1);
    ; \6 C* q* I4 K9 N' f/ r3 o/ v
  751. document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
    4 R8 ~6 v9 I: E, r5 F+ I$ W
  752. setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    5 s1 s5 z& p1 y: ^* u
  753. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);+ O" C6 x! I! Z0 O- x
  754. wpapskpassword = wpaPskKey[ssidIdx].value; ) y  R: W- p3 b' d% ]
  755. 6 t2 G7 Z; z) H, Z) [* C
  756. # Z, ^8 I% h0 Q+ `4 b$ I% [
  757.   H2 y# Q1 _; M* w! K3 b
  758. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);
    + X& g0 [6 _7 ?# O5 S! k' B9 r1 y
  759. }. m. i9 \) ?; e, O/ Y
  760. else1 z: N- D* f6 _& _8 x
  761. {. {' X: O4 R+ U
  762. setSelect('WlanAuthMode_select','wapi');
    9 z# ^6 c) t& i6 _1 D
  763. setDisplay('wlEncryMethod',1);            
    / t$ R6 r" S/ }/ S/ I
  764.             addWapiEncryMethodOption();  
    9 ^( v; X2 n; ^" q5 \9 u
  765. setDisable('WlanPwdMode_select',1);
    : a2 i' B2 x' C6 Q) k, {) m
  766. setDisplay('wlWapi',1); $ _0 A4 m2 `5 _
  767. setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
    $ x" w/ y6 K/ d
  768. setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
    0 C' W" N% z# @" E
  769. }
    + r6 \9 P" d& |; Q, f
  770. }4 f9 [& k+ i+ m5 S, b& k# d1 |
  771.     else
    - m& w" }9 }. o9 n0 g
  772.     {& t- v5 e9 ?6 t, p7 t# Y: ~
  773.         setSelect('WlanAuthMode_select','open');& I8 M9 O. ^* A" {8 u8 f7 k" c
  774.     }
    / s. b2 c- s; |* d2 H  U3 Z6 }! O
  775. }; b1 n3 V& R5 o( x; g# k2 p

  776. : ?( o$ V8 b( T5 p" T$ h. N$ N
  777. function WlanKeyBit_selectChange()/ o* [  }% z& n/ s. }6 n. |
  778. {9 D' f* Y: F5 N, l; |
  779. var desc;2 H& G( f! P* t4 @

  780. . R* u+ C& u7 @1 v/ `* O( A% O6 @
  781.     if (getSelectVal('WlanKeyBit_select') == 128)( p" v6 t6 {9 f  E
  782. {
    / R+ D+ _  @! z! X+ q0 \
  783. desc = "128位无线网络密钥需输入13个ASCII字符或26个十六进制数";
    * q/ U* E  I2 f! k
  784. }
    ) Q" }$ [% |" v4 T1 w
  785. else% c: H" M4 o, |5 s; p
  786. {8 P* z8 m8 ]( v/ b
  787. desc = "64位无线网络密钥需输入5个ASCII字符或10个十六进制数";! U/ k, B+ G3 X, o4 h3 \
  788. }
    ) k- f2 v4 D3 ?2 k$ g  {" e
  789. * m( `" U: `4 |7 D6 T
  790. getElById("Title_wlan_key_tips_lable").innerHTML = desc;
    9 b+ y+ c; f3 e) j/ \8 ]  H( Z8 N
  791. }
    0 [9 _( I1 R2 s) B8 g, v' [
  792. 0 k* v' w  V1 Y+ }4 Z% I8 M
  793. function onMethodChange(isSelected)
    ) A5 k6 g. f7 V( {5 G
  794. {   1 x4 a* O- u% I9 d* h  y: S
  795. var authMode = getSelectVal('WlanAuthMode_select');
    % y( T1 D2 h- e, y( Z
  796. if (authMode == 'open')" A- q  X& G5 O; z# e. V
  797. {
    ( ^6 \3 f. }- x/ ^
  798.     var var2 = getSelectVal('WlanPwdMode_select');. Z( }* c# N+ X* Y

  799. 9 u* ^( D* r% Y% z; B8 E
  800.     if (var2 == 'None')9 f; g5 T/ x8 M
  801.         {
      y# R7 W* A2 [' y$ ?7 g
  802.             setDisplay('keyInfo', 0);! h( \# r+ W- _1 D; V
  803.         }3 o- j0 L7 ~8 n7 ]8 n8 ]# t+ w
  804.         else
    + I/ H5 U/ \) T1 T8 t
  805.         {4 X% [! \0 F0 O# i% V4 J/ V
  806.             if (AddFlag == false); B" g5 A" L9 S. K6 c2 x
  807.             {# j( C8 S# s' _! Z: ?
  808.                 var level = getEncryLevel(Wlan[ssidIdx].EncypBit);
    1 ?) U1 J( i  }  J
  809.                 setDisplay('keyInfo', 1);
    ! `0 r# x) c' E1 N1 N8 J
  810.                 setSelect('WlanKeyBit_select', parseInt(level)+24);
    * f6 ?3 Q; [4 ^8 @% l
  811. 7 v8 O) F7 a9 y! G
  812.                 setText('wlKeys1',g_keys[ssidIdx * 4].value);6 m* I) m# L0 P" f  t9 ]6 ]
  813. wep1password = g_keys[ssidIdx * 4].value; ( J; r. x4 I% T7 ~/ X  }; T, N
  814. setText('twlKeys1',g_keys[ssidIdx * 4].value);3 c7 e" Q; i+ m: [4 \: P2 X
  815.             }+ F' V" {  o3 ~. G* w
  816.             else# V0 ^( l5 }& Y, s
  817.             {
    : P8 }- `; B9 Q: b  e/ _$ S4 b- Z
  818.                 setDisplay('keyInfo', 1);% ^3 y: i& C2 C  t1 r" A/ |
  819.                 setSelect('WlanKeyBit_select', 128);% v7 |) M+ s2 |7 B2 ?; v! \, ~
  820. % \1 g( V$ o7 M& L2 w# [6 Z
  821.                 setText('wlKeys1','');
    - x$ {: o  ?, z3 H7 d  V; X
  822. wep1password = '';
    ; ]2 N2 e, X+ h% r
  823. setText('twlKeys1','');9 q7 W! O7 b3 \6 e4 D$ Q& a' i( p! N
  824.             }2 m5 a# Y: v3 `3 y' b' h! Y! v% N
  825.         }: X) ]  e/ m% O' d. @7 p3 v
  826. }' x' _/ |% @3 z" q5 q
  827.     else  \+ o. h  s& T- t( @/ I2 a; y0 [
  828.     {
    8 }; o+ G; K; B- Q0 m- b7 {
  829.         setDisplay('keyInfo', 0);
    4 g- r% w+ F1 b. z/ H  R: ?/ R
  830.     }
    , Q" L; A' s4 e
  831. }& m$ }  ~: I, @- b: c8 r

  832. - h4 i- U6 K5 `" ]) W* w8 R
  833. function onWepChange()
    1 }' t4 w: h2 ]) K( V) K3 @" \% M
  834. {  U1 l6 d: j' h1 F

  835. ! c$ i8 L/ Y7 {+ h9 H8 K4 z1 O/ R
  836. }
    ) z4 o5 o+ z$ q$ A

  837. 0 a; z- G( K0 B+ k
  838. function SsidEnable()
    + x& z$ W$ Q8 D) P3 {9 z; s7 q
  839. {
    # H3 X3 C% W! S$ M; C  e
  840.     if (true == AddFlag)
    2 `) f% ^. P- B6 M7 Y4 y
  841.     {" _$ C3 d0 L3 x2 z" e4 e, a: l
  842.         return;
    # f1 u, _/ e2 O0 x/ W
  843.     }2 i, d- F8 u( b. O

  844. . ]5 v* M' H4 o0 v& g
  845. if (Wlan[ssidIdx].X_HW_ServiceEnable == 1)
    # b: d' v- P0 M
  846.     {
      t8 x7 F% |3 H  i4 u
  847.     }
    4 s6 i$ ]; H, C* O+ q9 X
  848.     else" k! L& V8 v. C6 h, v! g
  849.     {( {  b6 s5 O" G3 h+ I8 P2 K! e2 l" R
  850.         AlertEx(cfg_wlancfgother_language['amp_ssid_state']);
    ) ]3 r) H+ y. t! M5 F
  851.         setCheck('wlEnable', 0);" D6 I8 m/ @0 N& G
  852.     }7 c1 K9 V# r3 t+ Y& N$ E
  853. ; G) F# v9 L, @. M
  854. return;
    8 F7 N$ P3 l$ z  B2 a5 @
  855. }) k+ V, Z7 z: w# O4 I$ l

  856. . R% m1 o/ Z% A/ G& V) S
  857. function ShowSsidEnable(currentWlan)
    " @. ~% @/ }" u/ M6 l" H1 ]
  858. {
    $ O; O/ C4 J: t4 f8 o8 J9 d
  859. if (currentWlan.X_HW_ServiceEnable == 1)
    7 m# s: k4 J' H" i9 k9 C
  860.     {6 N/ Y& L4 @) V0 w* n
  861.     setCheck('wlEnable', currentWlan.enable);( Y$ ]& n" U& {9 W) s" l( Z3 P0 M- o
  862.     }; v: r! ^) S5 e  Y
  863.     else) {3 J2 ~5 V* ^+ \
  864.     {' s" u3 b5 J5 Q, J' T
  865.         setCheck('wlEnable', 0);. V, n1 A3 J' \: j5 x! B$ `# T
  866.     }
    " w- N- D: B" T% T: n

  867. ( b% q- M" n; p' k3 r
  868. return;( p+ w2 ?+ T2 k  u- G
  869. }$ L/ w9 C1 ~' |' r# |. l

  870. 1 Q) p: H/ X6 ]# ?# b
  871. function ltrim(str)
    6 M0 g4 r  D8 W& Z
  872. {
    3 U' I1 I( i2 C: O5 y; c. w
  873. return str.replace(/(^\s*)/g,"");   [) `7 p; Z% V* l, \4 z$ _/ [/ H3 t
  874. }: N- m+ T7 n8 D5 ~" Q3 ^1 V
  875. " j  q: A  D- X: h
  876. function IsCharandNum(str)# U$ c9 L- S4 n7 ?
  877. {
    8 B: F1 Y; L0 \- b; A
  878.     var prefix='';
    , p) W) W* j3 N& K
  879. var postfix = '-5G';& H2 f$ n* Q2 W3 N5 s4 }
  880. var endPos = str.length;- O" e2 c: J4 n% o' N1 s" q
  881. var ErrorNote = "SSID-1 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串。";. y' Z* c7 N: }  Y5 j0 d& H

  882. 2 j$ I4 r! Q" `6 r% J
  883. if (0 == getWlanPortNumber(currentWlan.name)): V* E6 L; l" e, N/ L/ s5 z
  884. {; ^* p& @2 g3 B. q# ^% k: u9 V+ t7 r. p
  885. prefix = "CMCC-";
    7 _0 T1 z' |" y
  886. }
    8 }8 s, Z- q* U1 I! |* X
  887. . S( S$ J' P6 c1 `+ f
  888. if ((1 == DoubleFreqFlag) && (4 == getWlanPortNumber(currentWlan.name)))
    ; z7 o8 x5 y7 ?
  889. {' a2 N2 P* L5 ~
  890. prefix = "CMCC-";- H+ Z4 M2 H/ o( E' l7 z3 m

  891. " y. W5 i# T' l$ _, i' k9 r( \5 ], L
  892. endPos = str.length - postfix.length;
    6 J+ d* P& ?% W8 ~  q9 V
  893. if (endPos != str.lastIndexOf(postfix))& a8 k) d' Q  s% c: \$ H
  894. {8 W) {. |+ `- U% ?' o/ w0 p7 |
  895. endPos = str.length;- A( ~3 F1 X% U1 F3 l6 V
  896. }/ f3 e4 b8 I! [4 a

  897. 9 e. m! W4 b/ @  [' B( m
  898. ErrorNote = "SSID-5 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串,并且允许以“-5G”结尾。";
    $ K, W) |( C0 O; E* v6 a
  899. }% L5 M; _/ o$ _
  900. * }) {4 f$ S) {; U$ _. q
  901. for( var i = prefix.length; i < endPos; i++ )
    6 m* k, A# w9 W8 [: [/ `+ f
  902. { - ~2 j0 V) J# C9 ^- P
  903. if(str.charAt(i) < '0' || str.charAt(i) > '9')
    ' L4 f# M: W9 M9 M: M" [" c
  904. {% ^$ s$ G/ \% C* o+ h+ f1 X# W
  905. if(str.charAt(i) < 'a' || str.charAt(i) > 'z')2 I, B/ g9 l: W3 e8 U2 R
  906. {& P' T2 i: X/ I
  907. if(str.charAt(i) < 'A' || str.charAt(i) > 'Z')) W! l( d/ n: ]! z  |7 ], l; M- m
  908. {
    ( U0 z& `, F3 O2 e& z2 }
  909. AlertEx(ErrorNote);. Z/ Q3 S/ @& X( f& @) C4 k# i
  910. return false;9 ^8 }- W  r' S% `$ z. |
  911. }
    5 L/ ]1 |* F6 j! N5 ]/ p
  912. }
    2 W3 J4 q# e% X
  913. }
    ) ]. N7 P2 R, ^9 F; M+ `
  914. }2 i+ v. c( l+ A& q, n; V# _0 s& ^
  915. 5 E4 E7 r2 t# J4 }$ Z3 [6 i9 q( q
  916. return true;
    6 Y& W, w! `: T, e$ m8 I
  917. }. M. S5 j5 }5 K6 u3 t/ ]
  918. % H+ O+ @) o* J8 }2 {2 s5 k
  919. function addParameter1(Form)
    $ w' m# s2 H% `7 q
  920. {   
    6 j9 S7 c7 R; d( W% t
  921.     Form.addParameter('y.Enable',getCheckVal('wlEnable'));
    9 |& h1 C/ @; I
  922.     var ssid;
    ; h0 M$ j8 p( K
  923.     ssid = ltrim(getValue('WlanSsid_text'));7 F- T( h- v/ N
  924. if (ssid == '')7 f+ K1 J; x9 t+ h. B0 t& w
  925.     {  j( P0 k: H# W5 I$ {0 \1 ]
  926.         AlertEx(cfg_wlancfgother_language['amp_empty_ssid']);
    & D7 ?% s# g6 U
  927.         return false;
    3 p) w& F7 Q( Z  E# {/ q& ^& k
  928.     }
    ' p$ J/ m; t; ~+ U2 r

  929. ) I% H* v& E* w& P9 I5 _
  930.     if (ssid.length > 32)# P, c$ u3 @7 f/ y4 o! V! K
  931.     {
    . H4 U3 B+ V9 ^/ \8 A
  932.         AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_too_loog']);/ U) T8 ?. h, F; p+ l, _
  933.         return false;
    $ E1 i, M  T2 k6 ?; p2 D
  934.     }: q8 O# G2 k1 s4 `/ Q
  935. : l! h7 d3 S% k+ a8 _$ k
  936.     if (isValidAscii(ssid) != '')* D+ Q! [6 x0 V4 Y
  937.     {, t# m1 l- W& m9 L4 f+ z7 b8 Z8 K/ H
  938.         AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_invalid'] + isValidAscii(ssid));8 {! {! e# I$ g3 m- L
  939.         return false;
    7 j% R6 q7 V: b# S# y$ X! a; i9 O
  940.     }
    & F: b+ Z4 r8 c/ C; G
  941. 8 p  F7 o1 N2 a7 S; a) F. ~2 [3 C
  942.     for (i = 0; i < Wlan.length; i++)
    # `" G+ R; ^! n2 Y7 C
  943.     {3 W' ^4 z1 ^+ m( x
  944.         if ((getWlanPortNumber(Wlan[i].name) > 3) && ((1 == DoubleFreqFlag) && ("2G" == wlanpage)) )
    9 p- }) ^4 u9 r! U) _
  945.         {  s2 q1 ~2 J% [6 [; U6 l- K
  946.             continue;
    ; f3 Z2 D* {! q# Z
  947.         }
    % ^  L: l' G& ^; D0 b$ @7 G
  948.         
    % k- M" f6 U7 \5 @
  949.         if ((getWlanPortNumber(Wlan[i].name) <= 3) && ((1 == DoubleFreqFlag) && ("5G" == wlanpage)) )
    ! @7 b% O6 b6 b  ?- K
  950.         {. V4 g' Z# \, l1 \8 ?" `7 ?, }/ {
  951.             continue;) d  k- ?+ ?. }) |) {" g
  952.         }
    7 l- M. E* ~1 _
  953.         4 |4 ?4 m' o0 s+ _5 ?: W) N4 T& A1 j
  954.         if (ssidIdx != i)
    / M! \6 O; G  l
  955.         {- Z! q9 @9 I  C6 B2 A3 B5 Z
  956.             if (Wlan[i].ssid == ssid)6 y3 \& V  h/ O, Q3 k
  957.             {$ P( n* }4 n% W- m- Q( H
  958.                 AlertEx(cfg_wlancfgother_language['amp_ssid_exist']);* I. I  O2 D& s, n. B
  959.                 return false;
    5 K" x. M, Q& K) q! S" _9 ]$ z
  960.             }
    6 k. K& y8 t+ A+ b' w3 H
  961.         }' f0 T+ R2 T' l, Y4 s
  962.         else' N. t+ W9 u( j
  963.         {
    ! P  h7 B7 |) D" g
  964.             continue;
    9 f0 i$ i7 _+ }4 C, T
  965.         }
    4 _5 \/ x2 ^$ Z8 X8 e$ a' h1 I
  966.     }
    2 n+ @- @- ~  o
  967.     1 w6 s8 ^' R2 d2 `
  968. if ('E8C' == CurrentBin.toUpperCase() && '0' == TianyiFlag)
    % }: w8 Q& a% d  j. b3 `4 y3 s
  969. {, Q' \* V) q/ E! p2 ?
  970. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) ), Q  R6 Q' V+ N, `  Q! Z! Q
  971. {6 `5 s) v  b+ j* `+ ^
  972. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet']);" Q1 s2 |* E! m0 k) x7 _& K
  973. return false;3 `' J; H  T1 t) n# }, M/ D) n
  974. }7 X' n' x: K( q0 g' U2 G' l5 F& P
  975. ) d- T3 r- y9 F6 B9 j
  976. if (1 == DoubleFreqFlag)
    % O6 h0 a7 }* F; q! y+ b
  977. {# ]- F" W1 q6 p' i5 u3 g' H: M
  978. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) )
    3 a  v9 B6 g8 U& ]- h5 p4 f9 t
  979. {
    7 |8 o. i" W) _, g$ r  t
  980. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet_5G']);
    " u3 s# U2 h+ J& _" ~; ?: u3 n+ N
  981. return false;) }; y- h" x0 j, l) \9 K
  982. }
    - s! g5 W, S5 @, |
  983. }
    & I2 \- G! f: @3 j) w
  984. }4 N+ S+ U! ~+ M7 Z7 Z+ ?. i
  985. 8 j+ z& V+ S" d" Y1 T+ u" }  @) _
  986. if ('CMCC' == CurrentBin.toUpperCase() && MngtJsCmcc != 1)5 L2 x" n4 L$ U2 u* a# I0 L$ ]
  987. {" n3 `8 v% h# }3 K7 z
  988. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) )  z$ h4 o: R+ B5 d$ T. o
  989. {
    ( N* p. I/ U2 b4 V+ R/ V
  990. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc']);
    ; R. k0 a8 ?/ S4 b/ J& t; M* J
  991. return false;' {) |# h. h6 w# G0 j; A. V* p& C
  992. }( ^$ c3 ]6 R/ A6 C

  993. 1 T0 m% I. B5 r. y  ]
  994. if (1 == DoubleFreqFlag)/ C' b, \) T' Y$ r) ~
  995. {; F0 q) H% i- R& R% S/ i) o' O6 f+ w
  996. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) ): x3 m) e) \: F# o8 b
  997. {
    ) ^4 J$ Z, {1 z
  998. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc_5G']);8 ~8 C/ t+ [& N" t* m, J  W. d
  999. return false;
    & \, s8 I1 K( R$ @3 V0 q* `
  1000. }
    " T% g, X% n8 b$ Z
  1001. }
    ( k! f4 _; L5 d( b+ {& |$ S
  1002. } ; |, h# S" I1 D$ W# i
  1003. : u5 m+ ^, ^4 Q& n$ U0 [7 i/ I5 w' ]# ^
  1004. if ('SHXCNCATV' == CfgMode.toUpperCase())
    : g' v' t& O; _/ L7 `
  1005. {
    / x/ Y2 k* d4 Z8 V# M
  1006. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) )4 l5 C3 m: P7 n" x9 m
  1007. {- t  o0 s. I4 s
  1008. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv']);7 l1 g6 \3 o/ q) w7 Q: W
  1009. return false;: B( b: U2 L' i! Z
  1010. }
    & d1 b, a: `1 T1 J
  1011. 7 V6 Q7 h5 r: U# H3 F2 _
  1012. if (1 == DoubleFreqFlag)
    : U2 H( o: `+ `! E
  1013. {, M$ n7 e. q; {: w8 F) i! X
  1014. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) ); U, J+ p, ~+ l& h4 [+ v; Y  ?
  1015. {
    7 r2 S$ q9 [" A/ I# B5 f7 Z
  1016. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv_5G']);1 g  k; o5 t$ I1 D# P3 h
  1017. return false;6 a* j1 k& W3 a
  1018. }
    + n# b! x5 x) h* P! ^8 h
  1019. }" B: ^  \5 A& N  X6 {4 n
  1020. }
    9 N8 s4 t; @/ H, S) R5 h
  1021. $ _/ o/ K$ F. v  }
  1022. if (('1' == aWiFiCustFlag) && (aWiFiSSID2GInst == getWlanInstFromDomain(currentWlan.domain)))
    ( O1 C, q8 f% o
  1023. {
    $ L5 L5 Z3 G" V9 H: W& d4 h
  1024. if ((ssid != 'aWiFi') && (0 != ssid.indexOf("aWiFi-")))
    & Q$ b( q5 A" E+ b" G' J
  1025. {* Z& @  Y) P% J9 \6 i+ U
  1026. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_awifi']);
    " d- {6 N1 z& `+ d  Q
  1027. return false;
    8 y4 g1 \4 ~2 ~8 x( J0 y
  1028. }
    6 o3 n/ p1 S! x& D
  1029. if (ssid == 'aWiFi-')
    / U; d; G# m6 c( |7 {  F
  1030. {
    + [% i4 \7 K! U4 y# v
  1031. ssid = 'aWiFi';5 z4 ^7 C7 D; u- m, W" L, e" l/ [
  1032. }7 v- m, F; B: D3 S- S: o
  1033. }# p3 r, Z5 S5 Z2 l& ~
  1034. 3 h% \. A5 J% Y" {
  1035.     Form.addParameter('y.SSID',ssid);
    ! V% Y) ~- z. F5 r- O9 G7 g2 K
  1036. }
    3 F* |* o/ D' k0 h; `8 ]& G& w
  1037.   @  D) N# `! C$ L
  1038. function addParameter2(Form)
    $ G: K  [' G% o! [$ M
  1039. { : r2 C( l; @6 `4 v7 J' m& }
  1040.     var url = '';
    * U- B( _( C7 d1 t3 G8 N: ^8 ~
  1041.     var temp = '';( b* q5 h% r. T/ p0 {

  1042. + l8 @) l. h& s8 _  b/ i4 _
  1043.     var AuthMode = getSelectVal('WlanAuthMode_select');
    * T+ `$ D8 C: Z/ N- i* k

  1044. * _$ Z' b; ]; z: `) n+ r2 Y
  1045. if (AuthMode == 'open'), W# V. ~+ w" e! ?4 [
  1046. {# \! l( C/ P. O& C1 Y) W# P
  1047. Form.addParameter('y.BeaconType','None');2 Y+ v" c2 }2 k  M6 ]. i" Y5 l
  1048. Form.addParameter('y.BasicAuthenticationMode','OpenSystem');( _5 y8 `/ u* C- w
  1049. Form.addParameter('y.BasicEncryptionModes','None');
    $ |4 y! f! R# U) [( e
  1050. }
    6 Q2 a% k, g4 G0 p2 H: h
  1051.     else if (AuthMode == 'shared')
    ; e0 A# ^) @5 T3 I7 W
  1052.     {
    $ ?' Q- x/ ]4 Q6 Y" c
  1053.         var KeyBit = getSelectVal('WlanKeyBit_select');
    1 ~: b* P2 k  c. h: \: j% _& |
  1054. var index = 1;
    : f  k, I; o0 L1 B6 R, q! t  W
  1055. var wlKeys1 = getValue('wlKeys1');% o& L3 a" B, f" ~! B3 v* I
  1056. var val;% Y6 K/ y+ |, k6 S# T! ~
  1057. var i;
    9 }+ O; ~( p4 q- G( M  e1 n
  1058. var vKey = 0;
    0 ]: w2 h% d! R' L- B0 y2 W3 q
  1059. var KeyDesc;
    * T0 K! p9 S! ^# Z  t
  1060. ( ]6 y  s! M' p# u, n" }2 e4 `
  1061. for (vKey = 0; vKey < 1; vKey++)
    , d' [% h) f5 i. |
  1062. {; b. j! P/ g8 b: c1 I
  1063.    if (vKey == 0)6 ^* e4 @& y* E/ C
  1064.    {3 O) i# E4 K1 v* I% t
  1065.    val = wlKeys1;
    3 I) l  s# u/ G, j
  1066.    KeyDesc = cfg_wlancfgdetail_language['amp_encrypt_key1'];7 n& Q! k! a% C4 M( c
  1067.    }9 O9 x, s1 V9 b9 L% o

  1068. % C3 b- z5 w4 V/ v/ Y
  1069.    if ( val != '' && val != null)) J" o, h( p2 y
  1070.    {   
    1 J" Q4 I( b3 h
  1071.    if ( KeyBit == '128' )3 p6 g* _9 \7 O) Y+ \& g) @
  1072.    {8 i3 |0 h. t3 d
  1073.    if (isValidKey(val, 13) == false )
    2 |! R" `, }& X1 v
  1074.    {  N; z( x6 B: {+ F. `
  1075.    AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid1']);
    & e5 O" X2 z, V: b2 y4 d; F
  1076.    return false;* x, M2 Q; o! [; @$ q% c9 ^
  1077.    }
    6 g3 U& x( ?# G; y7 k3 h& n  I
  1078.    }  m2 Y. ]# `* y# }: Y) U
  1079.    else- i) d# e# {+ t6 u+ H8 D( x" q
  1080.    {- d& O9 [/ G9 d% S
  1081.    if (isValidKey(val, 5) == false ), N- B# \9 D  Y
  1082.    {5 Z9 s/ Y" c. {- s0 ?! P6 Y, l
  1083.    AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid2']);- m! v1 W( S0 i. H7 U4 ]
  1084.    return false;
    / v) U% s: K5 d
  1085.    }
    . h( y- @2 k/ I+ {0 b: \# J
  1086.    }3 C( }& \0 X( G; c3 j( `8 A
  1087.    5 B% i; v/ z* u, w
  1088.    }
    + Z0 ^+ l6 X. d2 o# D
  1089.    else
    3 t2 D, I* z% j) I# q* E. n7 z
  1090.    {$ O& i5 \% e' S2 |1 s8 K& g
  1091.    AlertEx(cfg_wlancfgdetail_language['amp_key_invalid3']);4 t. ^+ V0 ?% t4 u8 ]
  1092.    return false;
    3 J# D6 Z! I, G& y1 p. F! B
  1093.    }% _, k  o% l3 F4 v. W( S$ _- H1 S
  1094. }3 A8 ]4 M9 d  B! F/ [
  1095. Form.addParameter('y.WEPEncryptionLevel',(KeyBit-24)+'-bit');2 y. w/ r! B$ U8 [. ~3 M5 y
  1096. Form.addParameter('y.WEPKeyIndex',index);" x+ ^4 ?' D7 W: q1 k' z
  1097. 3 g$ W! b2 P8 G0 B& H# d
  1098.         if (wifiPasswordMask == '1')4 N) s& W& `6 O
  1099.         {* X1 a3 S$ r6 [: u( x: H
  1100.             if (KeyBit == '128')
    * W$ A; E0 L+ m5 C! G
  1101.             {4 v. S. ?5 \" @) d6 p3 ~7 [
  1102.                 if ( (wlKeys1 != "*************") || (wep1PsdModFlag == true) )
    # L  _) Q& o7 p, {, U) [+ N+ u
  1103.                 {
    1 U* U0 v: C& h3 [" \4 D1 o- ]8 z$ }* T
  1104.                     Form.addParameter('k1.WEPKey', wlKeys1);
    2 B/ k$ ?0 X/ r$ o' h' J
  1105.                     Form.addParameter('k2.WEPKey', wlKeys1);4 w3 \  ^  w9 t2 Y$ `8 n* B
  1106.                     Form.addParameter('k3.WEPKey', wlKeys1);# G" C7 c; ~( |1 b, k" W$ o
  1107.                     Form.addParameter('k4.WEPKey', wlKeys1);  : \% T( U/ v: u; n9 K. @
  1108.                 }
    9 Y5 ?# s5 g, ~+ h0 F0 r4 ~" J
  1109.             }
    ; ]- _  I8 [7 }) Q. f
  1110.             else
    6 C' R4 p' s. I3 a
  1111.             {0 a+ v5 V4 w; @& J2 U# d
  1112.                 if ( (wlKeys1 != "*****") || (wep1PsdModFlag == true) )
    3 ]2 E. O1 F- u1 x. J3 o8 V
  1113.                 {
    + a: r5 s0 U9 C
  1114.                     Form.addParameter('k1.WEPKey', wlKeys1);
    7 _7 O: ~, a! d6 u; W
  1115.                     Form.addParameter('k2.WEPKey', wlKeys1);7 L4 v- X( n3 R/ E- V5 u
  1116.                     Form.addParameter('k3.WEPKey', wlKeys1);
    " U  q2 k2 L# D- F
  1117.                     Form.addParameter('k4.WEPKey', wlKeys1);
    / Q7 W9 C* L* X5 k' I! A6 i7 T7 Z, C
  1118.                 }
    ! \6 b: O2 R1 @( d  {
  1119.             }0 r# j9 ]) Z" b% }$ ]4 l
  1120.         }/ y$ f: ^# }+ D4 d# u
  1121.         else  x" u1 e) A0 V7 \& T  |+ Z
  1122.         {& |, _0 s0 |, O: g+ y' K
  1123.             Form.addParameter('k1.WEPKey', wlKeys1);1 m) ?- w& b1 w, g) L6 O
  1124.             Form.addParameter('k2.WEPKey', wlKeys1);: s2 ~! T- l/ J
  1125.             Form.addParameter('k3.WEPKey', wlKeys1);# E& ^6 L1 b& ^4 P; n# o7 {5 v
  1126.             Form.addParameter('k4.WEPKey', wlKeys1);  
    8 c1 n& I* Q2 R7 J; j+ {: z  T+ y/ `
  1127.         }! t6 A1 K7 i3 V! O& R1 @4 L* b

  1128. $ s" p) M; r7 s  E* m
  1129.         
    / Z, K/ ^, E6 g: n
  1130.         Form.addParameter('y.BeaconType','Basic');% m% A2 d, q5 M/ x9 b3 C
  1131. Form.addParameter('y.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));7 T3 b1 n; R* a" b
  1132.         Form.addParameter('y.BasicEncryptionModes','WEPEncryption');
    ( ?( ?& A4 t7 J+ w. m3 Q  I/ z
  1133.     }; Z) U* N: D1 J7 e/ K5 g/ V
  1134.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')2 N& z! ^7 M* \* a
  1135.     {
    ; G( Q* P( ^) `$ |  B: ]: U" c
  1136.         var wlRadiusKey = getValue('wlRadiusKey');
    ) n* [$ H( K: F- a" {% \; C
  1137.         var wlRadiusIPAddr = getValue('wlRadiusIPAddr');
    2 [; p/ L# [. l" _- ^' U
  1138.         var wlRadiusPort = getValue('wlRadiusPort');1 j% t. ^$ w5 Y: y: ?0 j" h" O
  1139.         6 f2 F7 q7 ?) v- B
  1140.         if (wlRadiusIPAddr == '' || wlRadiusPort == '' || wlRadiusKey == '')
    " Z- \% }3 X) S9 j: R& ^1 ~
  1141.         {2 b( \& U0 m- v& L9 q' X7 J* M9 t
  1142.             AlertEx(cfg_wlancfgother_language['amp_empty_para']);
    ) W& o5 p* j! _( S( ?5 q
  1143.             return false;
      V3 g6 D7 ]5 F0 q' Z4 s
  1144.         }
    ) ^4 D* e+ @) j0 C0 ~0 n
  1145. 3 t$ c5 J- ?5 G- H0 C( E
  1146. if (isValidRaiusKey(wlRadiusKey) == false)
    # R% l2 w; }% `, I; V7 {
  1147. {
    8 x2 }" r% o- x( u2 z+ V6 c
  1148.     AlertEx(cfg_wlancfgdetail_language['amp_radius_keyinvalid']);1 {3 h) \" ~2 e6 Q9 ]
  1149.             return false;
    . F; V1 `4 i5 E: ~. L5 v: V
  1150. }/ `5 q( d! D2 m

  1151. 7 s. C# a8 ^1 x$ Q2 b' i5 n
  1152. 7 |+ R( e3 r  t8 g8 T4 d. B7 k9 d
  1153.         if (isAbcIpAddress(wlRadiusIPAddr) == false)4 j& h9 V% F9 n2 G( p
  1154.         {
    ) q7 R. a1 b2 R+ [
  1155.             AlertEx(cfg_wlancfgdetail_language['amp_srvip_invalid']);* o# {' P2 l" ~; B- l
  1156.             return false;
    . x, F  p; B6 M5 M1 Y) @" v- I: L9 [
  1157.         }
    ' P* f7 C6 m" F* e- z5 Z

  1158. * s' m6 H4 k/ A* i
  1159.         if (isValidRadiusPort(wlRadiusPort) == false)
    # z3 _5 Q  V( E" [/ b; r
  1160.         {
    : ]* U5 L7 p2 c3 ]* X/ I" Z4 t: g& f
  1161.             AlertEx(cfg_wlancfgdetail_language['amp_srvport_invalid']);
    9 ]2 d& c% E% b- m! d
  1162.             return false;
    " g% z5 M% Z" C+ v# L0 i3 R
  1163.         }
    4 D9 P2 X# \. ^; w) H" u0 d* ?  V$ c& U
  1164.         
    6 \% K' j' V! ]
  1165.         if (AuthMode == 'wpa')
    - e: q( C8 l% r
  1166.         {& _+ B  X5 P/ P  O, m7 R+ }  ]
  1167.             Form.addParameter('y.BeaconType','WPA');' B( ^# x" @! H! ?
  1168.             Form.addParameter('y.WPAAuthenticationMode','EAPAuthentication');
    ' I9 S2 \( ?: ]+ c4 J
  1169.             Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    2 f& a, g% _7 k
  1170.         }& e4 t2 x3 K$ b# C9 \$ p' y7 Y
  1171.         else if (AuthMode == 'wpa2'); r4 ~" i0 X: \  t
  1172.         {# N1 C* I3 g2 k2 k0 g( G0 w0 J
  1173.             Form.addParameter('y.BeaconType','11i');
    1 [' V+ s$ g+ [# {% I, c
  1174.             Form.addParameter('y.IEEE11iAuthenticationMode','EAPAuthentication');
    ; T9 b9 u( P/ b
  1175.             Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    ' [" k; f) q/ U3 o
  1176.         }
    ' w. \3 k  o+ i/ Y/ o
  1177. else* V6 O2 x6 a% |  ?1 P$ W7 z
  1178. {* f: i5 Z# `% n' h- ~
  1179.     Form.addParameter('y.BeaconType','WPAand11i');
    ( m# C  P3 f* i& r8 B
  1180.             Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','EAPAuthentication');, \$ \. o: {: b6 O
  1181.             Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));6 d! `8 B  ^4 m/ Y9 ?
  1182. }' i/ o9 j+ X# l  t3 m! @6 I7 |( l' Y
  1183.         
    9 R  C0 V2 Z9 M& c2 o, q5 u% ^
  1184.         if (wifiPasswordMask == '1')
    , A9 L# d3 ]2 }( R- }% b% E: o6 o
  1185.         {: Y( N/ [1 n  D" `, _
  1186.             if ( (wlRadiusKey != "********") || (radPsdModFlag == true) )
    - U5 ?/ f4 ^- a4 W
  1187.             {
    ! u5 n/ g& u/ z, A
  1188.                 Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);
    0 v% T) f+ Z3 v) I' b2 g* \, `
  1189.             }+ O6 E; g! N6 R% Z0 f
  1190.         }
    * @0 X4 H  q8 P3 j" M( y0 f4 O* @
  1191.         else, t: T& f; P# K$ `0 {( w! y" i% p' R' f
  1192.         {, e: m! b, O. i7 P
  1193.            Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);1 H, V* a" j' C: N( U
  1194.         }
    ) E9 b/ X$ [7 S+ l$ p* e

  1195. 5 e. I! A( ]; w0 n+ Z0 A4 L
  1196.         Form.addParameter('y.X_HW_RadiuServer',wlRadiusIPAddr);
    + X) r3 y  f2 v( D

  1197. 4 L3 c2 f/ P6 e+ u
  1198.         wlRadiusPort = parseInt(getValue('wlRadiusPort'),10);
    # c# L+ i% y1 s  @- h! F
  1199.         Form.addParameter('y.X_HW_RadiusPort',wlRadiusPort);
    # V- T6 Y/ f6 k. d7 S7 n
  1200.     }* r" K3 P4 M6 b$ x0 g& `
  1201.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk')0 Q9 t6 `# R( R9 |: P
  1202.     {
    7 s3 y, {5 A) `9 X
  1203.         var value = getValue('WlanPassword_password');$ j/ e' X) P" D% V7 {
  1204. var wapiIP = getValue('wapiIPAddr');
    ( @0 ?; w2 v0 E, y6 W# x
  1205. var wapiPort = getValue('wapiPort');8 l6 i+ Z# b5 y9 c$ f6 G6 J  z
  1206. 4 a, k) d: u' J4 P# y! u" c: k

  1207. 9 }" j1 j, C: Q) u7 ~1 Q
  1208. if(AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk')
    4 |9 c* @" c2 D# F$ ^
  1209. {
    ! G1 z  z. r& u* a. m7 J& h
  1210. * U: t! n+ n3 q
  1211. if (value == ''): t+ h* T1 u7 l5 F" ^1 I- R
  1212. {% e, q6 |# h& l3 X4 P/ D' F" ^
  1213. AlertEx(cfg_wlancfgother_language['amp_empty_para']);
    & y4 M* q" d; ^' x) q" v* G3 z9 |
  1214. return false;, O0 s. N3 _: \' p3 ]. ^) D- ?
  1215. }$ @, c' p+ i. L* T/ G

  1216. . M  }, C4 _2 W6 k
  1217. if (isValidWPAPskKey(value) == false)
    7 a4 x/ x7 H" z6 F7 R2 }: j
  1218. {& L3 ?0 {7 B! x( @: y4 F
  1219. AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);7 A* ^. @% j/ p) T7 J0 H* w: O
  1220. return false;4 N+ |# U  T3 S/ M; p1 k$ N( o8 W
  1221. }9 d  Z+ n7 b; @" G* C- @" L
  1222. }
    5 J5 y7 D" S5 v! S) f
  1223. 1 k+ Y7 A/ R* E
  1224.         if (AuthMode == 'wpa-psk')4 ]7 y( d9 X; g+ D1 }
  1225.         {) {' {# X0 o4 `4 m, l' ?
  1226.             Form.addParameter('y.BeaconType','WPA');/ J7 w) e! d6 m
  1227.             Form.addParameter('y.WPAAuthenticationMode','PSKAuthentication');
    * \9 F  L2 |# [& e5 e4 N4 R- P
  1228.             Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));( c' s# w2 w0 k" a- u
  1229.         }$ G  O' K/ C% f$ L5 W8 o
  1230.         else if (AuthMode == 'wpa2-psk')
    2 W. K0 o1 ]# @% g' K7 a( Z0 f
  1231.         {' i0 e! W( x7 p$ }4 |( l
  1232.             Form.addParameter('y.BeaconType','11i');
    & r4 B8 R  Q2 X/ l+ G6 m) a
  1233.             Form.addParameter('y.IEEE11iAuthenticationMode','PSKAuthentication');5 ^4 z$ q1 E  |: K3 E' e
  1234.             Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));' K9 W% |1 l" K6 m
  1235.         } 6 [- v! r" T, T) u
  1236. else if(AuthMode == 'wapi')' ^7 E# C/ h  B0 ^
  1237. {, @& V! B3 J9 I7 i: j! q8 x
  1238. if (isAbcIpAddress(wapiIP) == false)
    5 Q. H' ?; ?7 S9 B
  1239. {
    3 @: W; m% A; V8 C
  1240. AlertEx(cfg_wlancfgdetail_language['amp_wapisrvip_invalid']);& c# ~* w: c0 a) L* d
  1241. return false;
      I( y; }7 T2 p
  1242. }
      R/ ^) r2 H" L) Z4 s- ~1 M( I
  1243. ' i3 m- B2 D" ]" l7 W: j6 A
  1244. if (isValidRadiusPort(wapiPort) == false)8 Z4 f7 A9 x8 X$ Q/ K( @  K+ L
  1245. {" W8 I7 o% Z; {
  1246. AlertEx(cfg_wlancfgdetail_language['amp_wapisrvport_invalid']);9 B- {* A0 H* t) A8 |
  1247. return false;$ i; ]! F1 W  c
  1248. }- b, n. Y; p* q1 _- z+ d, z
  1249. Form.addParameter('y.BeaconType','X_HW_WAPI');
    # `% W+ H# u+ V
  1250. Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPICERT');7 c4 y5 r5 s) S# {
  1251. Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');
    " {3 A: z# u" _" U" j. i5 x
  1252. Form.addParameter('y.X_HW_WAPIServer',wapiIP);
    & ]) H$ I/ h3 z7 s) y
  1253. Form.addParameter('y.X_HW_WAPIPort',parseInt(getValue('wapiPort')),10);* V) b; K" x$ G* x! T* l3 F1 V' I
  1254. }
    2 U5 j* X  ]& m0 C
  1255. else if(AuthMode == 'wapi-psk')
    * I2 c/ K& Q8 B! f4 w$ G8 ]
  1256. {
    , J: D+ t6 H& M7 b
  1257. if (value == '')9 C$ n5 \; G% t% I* D
  1258. {( N+ \% @" m. ?4 a
  1259. AlertEx(cfg_wlancfgother_language['amp_empty_para']);
    : {3 i$ z8 A6 k- i
  1260. return false;
    + U; ?; P* O, r5 g& B* a) L! m) z% }! d
  1261. }
    / N, `' U4 P. I8 v0 M5 h) `
  1262. ( \$ |( B4 \6 q
  1263. if (isValidWPAPskKey(value) == false)/ Q6 E2 W5 g1 v( W5 \
  1264. {3 W; v5 c. S4 E' F  a
  1265. AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);
    $ o+ r  t* J6 [# W# a9 j! g
  1266. return false;
    # X5 }- Y+ X# [3 l3 E
  1267. }4 H$ S8 y' t2 H- e" V  r
  1268. Form.addParameter('y.BeaconType','X_HW_WAPI');0 U# R2 X' P$ f
  1269. Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPIPSK');
    8 w# ]4 l  E; q& M2 A$ e9 @5 k: G
  1270. Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');
    ; \$ _7 A- B* n) S$ N
  1271. }5 `: c+ b1 `$ N) w4 A2 s
  1272. else0 M' ~3 g& _+ j
  1273.         {3 M- d! J4 i9 w' F( _. ~
  1274.             Form.addParameter('y.BeaconType','WPAand11i');
    ! o9 o/ g$ {% o* l5 X% Z
  1275.             Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','PSKAuthentication');
    . m; j+ f! y) w
  1276.             Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    6 X. i! U0 D# G7 ]
  1277.         }
    " J. M6 D" H, f& t# R0 f" c0 S' M8 \
  1278. 3 |( w. d, D2 d. n
  1279.         if (wifiPasswordMask == '1')
    8 C4 d" |5 O( F+ b: m& @( A
  1280.         {  ?9 T4 h1 T4 C( S( ?
  1281.             if ( (value != "********") || (pskPsdModFlag == true) )1 E, R' A2 P) Y
  1282.             {7 _, N0 I5 j0 ]) W/ Q; B/ ]
  1283.                 Form.addParameter('k.PreSharedKey',value);3 S, i* k% M- B* T  @* w
  1284.             }
    - t' V7 _3 X9 P6 |+ S9 w+ N% e5 w
  1285.             
    ! u+ j5 N' x0 {( X
  1286.         }
    1 M( ?) D2 z( Z. |( V
  1287.         else
    ' Q2 V' W" [6 W6 E
  1288.         {
    : |9 Y% i1 n1 z; `# l; }% z1 Y2 `
  1289.             Form.addParameter('k.PreSharedKey',value);7 ?  s% C5 e0 q1 |9 Y0 i9 h  l2 P
  1290.         }
    0 x' G' O) j# O5 @8 P
  1291.     }: L: G6 H9 g& h% \; \9 \
  1292.     else
    9 m0 m0 R. [* m4 @5 H' v! d: n
  1293.     {
    ! {8 Q$ u  Z  T/ {0 a5 a9 v. e
  1294.     }
    5 x# a- I* Z+ M2 S
  1295. , u9 ]8 b6 |, P8 w
  1296.     return true;
    : `( G9 t8 s; a, @' i
  1297. }: d  Z* s: k/ A7 [
  1298. ! r3 x1 z% [6 R7 I. U  e
  1299. var guiCoverSsidNotifyFlag = 0;1 f  o  h; ]8 ^/ x2 e$ w6 E

  1300. 3 I4 x' \7 H: q7 p6 z3 v, m6 z
  1301. function setCoverSsidNotifyFlag(DBvalue, WebValue)5 }7 r, J4 s8 {. X. g" j: P
  1302. {
    5 M6 u0 G1 {( n
  1303.     if (DBvalue != WebValue)
    ) p% [3 I( t0 U9 y2 p% `( a
  1304.     {
    , ~4 f2 ~3 H( Y9 W* U4 @1 @
  1305.         guiCoverSsidNotifyFlag++;
    ' \/ G8 F" F; \0 E- S
  1306.     }1 {4 m2 U+ I0 P6 p
  1307. }: j8 E, y' t7 d5 H- h
  1308. % E& D7 }; U/ z7 e# L) C! D. E
  1309. function stExtendedWLC(domain, SSIDIndex)- F% ~2 o( `" u
  1310. {
    4 s% u& d, `6 j, z
  1311.     this.domain = domain;
    & w6 S' y/ Q" K. G
  1312.     this.SSIDIndex = SSIDIndex;
    0 y& ^6 b( e8 a$ L8 }7 W
  1313. }
    0 i( ^! k5 l! V

  1314. $ ]/ N  W3 L) ]6 j. t
  1315. var apExtendedWLC = new Array(null);3 X: Z; m$ l7 _( `6 O; }
  1316. : q7 V( w0 e" [4 s
  1317. function isWifiCoverSsidNotify()
    : N  o! f7 @- ?+ s+ C+ s0 r
  1318. {   
    * t6 j* n  L' u: V2 g
  1319.     if (guiCoverSsidNotifyFlag > 0)4 w4 x+ J. ?$ A) h. Y% Y
  1320.     {+ Z' [7 e6 J1 J" K. g! h
  1321.         return true;& F8 o. E& G# J2 O6 E# w* ^+ y
  1322.     }" w6 B/ G4 V, h1 A5 `$ ~! [
  1323.     return false;
    ; k9 e1 M  Q+ j; W% k0 t) X1 s6 T. B
  1324. }* E3 M8 v% u$ K/ z

  1325. 7 i7 B' o/ @' }) a$ P0 e
  1326. function isWifiCoverSsid(wlanInst)7 A9 ]' f( ?9 }2 e1 {& o
  1327. {
    ( t" z: w+ s. R9 l/ b: ^3 e9 u
  1328.     for (var j = 0; j < apExtendedWLC.length - 1; j++)
    , D% p6 L8 q8 }5 `5 t3 w3 j5 |
  1329.     {, B+ o* G) z: t( _& |, F, m) ~
  1330.         if (wlanInst == apExtendedWLC[j].SSIDIndex)
    $ P1 L9 S7 O( j, a  k$ b
  1331.         {
    5 _( x7 U1 q, f# W1 y2 e
  1332.             if (isWifiCoverSsidNotify())! k, R4 |. a! G- x3 ^. g6 X
  1333.             {  c1 w4 @7 k( h
  1334.                    return true;              g, `- V! o4 H. t; M. W( x' l
  1335.             }
    / a- ]4 K1 W3 u) f; D
  1336.         }
    0 S5 V$ L5 e* \; d% O6 f
  1337.     }
    % e' |+ ]6 l) f& h) a

  1338. / `: X  p6 C, B3 q  K
  1339.     return false: r& x8 D' }" d7 x
  1340. }- Z: d/ i0 Y- Z7 c" a7 n
  1341. 1 H* t, w! N% k
  1342. function AddParaForCover(Form). b3 r  m% P9 x' X3 D6 `  u' N
  1343. {+ |4 X4 L3 v! Y1 C
  1344.     var wlandomain = Wlan[ssidIdx].domain;0 {% o8 Z, |* m2 x/ `* t
  1345.     var length = wlandomain.length;% a6 o1 }" L  x& Y' J' j
  1346.     var wlanInstId = parseInt(wlandomain.charAt(length-1));) z$ W) s2 e. a* ^4 V
  1347.     var beaconType = "Basic";
    ! r, c0 i2 `' j0 k
  1348. 2 {9 s) S& e/ F% {! `* K
  1349.     Form.addParameter('w.SsidInst',wlanInstId);( k: G% X5 J! H# C" M/ j( O
  1350.     ) K  F' B2 q- S! ^5 L1 R$ U
  1351.     Form.addParameter('w.SSID',ltrim(getValue('WlanSsid_text')));
    5 _* [1 [3 I1 y" F5 N! x  F
  1352.     setCoverSsidNotifyFlag(Wlan[ssidIdx].ssid, ltrim(getValue('WlanSsid_text')));6 C6 {* I, X8 c" f& L$ }8 C
  1353.    
    * A: h+ {' o! M
  1354.     Form.addParameter('w.Enable',getCheckVal('wlEnable'));. a/ e0 o- p6 J* I- x* Q4 B
  1355. . ?- e" G* x5 `4 P/ z- }
  1356.     Form.addParameter('w.Standard',WlanWifi.mode);3 T; k" G4 s6 p5 T, H' W

  1357. 6 X! O) X) v! P% z7 m9 Q# \
  1358.     Form.addParameter('w.BasicAuthenticationMode','None');* j1 @1 {* k' T- q# m9 f8 f
  1359.     Form.addParameter('w.BasicEncryptionModes','WEPEncryption');5 l5 T3 y6 w+ {% X# t+ H
  1360.     Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');
    / c. c3 I3 T% A
  1361.     Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    ' L% f' W8 d! M; G9 o& X1 H' S) Z
  1362.     Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');* @3 m+ e# b$ i8 h
  1363.     Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    : T9 e; e9 E+ j0 Y4 J
  1364.     Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');0 F1 e! g  P. G% g8 q- g
  1365.     Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
    3 k5 k7 L) i) W6 v" |% ^7 x
  1366.    
    0 x: X( ^9 k5 Y# W) d% C: V
  1367.     var AuthMode = getSelectVal('WlanAuthMode_select');7 F& ]/ n4 w, i* [0 h( ]# T) p3 C/ Y# ]
  1368.     if (AuthMode == 'shared' || AuthMode == 'open')' _4 ^) f/ L4 Y' f8 i" j' K
  1369.     {    # Z* w3 h& ~( [/ ]6 r% D
  1370.         Form.addParameter('w.BeaconType','Basic');
    * x( W8 E8 G" z* L0 w8 S  ^  T7 B
  1371.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'Basic');        
    1 I2 H& X% `  y6 Z8 a* O
  1372.         : M# J1 G( p8 q: _
  1373.         Form.addParameter('w.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));4 \2 C7 e% M4 D
  1374.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicAuthenticationMode, getSelectVal('WlanWepPwd_select'));        2 ]. |: f: L! m7 z6 G8 D
  1375.         
    ! e+ E! G, C8 v
  1376.         Form.addParameter('w.BasicEncryptionModes','WEPEncryption');
    7 G7 D. X: U* p
  1377.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicEncryptionModes, 'WEPEncryption');8 u" K! Y  a% W( R" r1 a! U
  1378.     } 5 H; _. ]+ D* q2 O
  1379.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')
    0 k4 Q- _1 Y3 s2 y
  1380.     {* Z7 R7 J. B  r: ^
  1381.         if (AuthMode == 'wpa')1 r, y# T; L- }) }
  1382.         {" k6 J2 i  c; ^1 D. w
  1383.             Form.addParameter('w.BeaconType','WPA');9 k/ o! [/ F# r$ u
  1384.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA');            $ D2 M1 V; |! T/ p9 K9 A6 o
  1385.             2 B& ]* x3 t! b# g7 s! N
  1386.             beaconType = "WPA";
    . ~  T9 L; F* f% g* E
  1387.             Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');6 N! Y( C: d8 Y2 W: M1 C$ f
  1388.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'EAPAuthentication');
    ) i/ z& r' [% A5 m
  1389.             
    + ?9 @0 h. o1 ]. p
  1390.             Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
      O/ N% [8 x3 _$ E' |2 `
  1391.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
      c. a( U4 J4 |8 n+ K  C
  1392.         }
    % m0 x  S0 t, v9 r# [2 d1 R
  1393.         else if (AuthMode == 'wpa2')
    5 v, }# M/ i" ^( G. h' I! n: g
  1394.         {% e- z% e4 t# \+ V& y
  1395.             Form.addParameter('w.BeaconType','11i');
    , M: }8 a. R7 F% P
  1396.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');4 P3 Z" ?) e8 v# ?9 G3 f9 _: A
  1397.             ) L( Y0 C7 K/ L& ?& m
  1398.             beaconType = "11i";
    ' W$ C+ f1 @' u7 D
  1399.             Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');
      B/ I: d. Y8 s3 Y& |% h7 Y
  1400.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'EAPAuthentication');4 N/ o' p. ?' H7 X/ T2 Q8 c# o
  1401.             
    8 D) l: C" p5 N. ~
  1402.             Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));1 \- N, k, }; X7 F* G
  1403.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));' t$ h6 l$ W. k+ @5 \/ {2 W
  1404.         }
      q) |6 i% D/ U
  1405.         else& M) ?  s1 y/ G7 Q1 s
  1406.         {7 b( _( ^8 g; A) t
  1407.             Form.addParameter('w.BeaconType','WPAand11i');
    ' j+ o) J5 a* i5 n0 [
  1408.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');. _, l6 V# m" n) |2 Q' T2 g+ ^
  1409.             
    8 N- O. Q) Z; f  k5 {" Q
  1410.             beaconType = "WPAand11i";
    9 t( _2 }% ]0 ~" v
  1411.             Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');! i' t. w* B; {/ e0 s
  1412.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'EAPAuthentication');
    , m: v  v: ]- ^- w% z! J8 I
  1413.             , K# [/ p0 H+ a9 q) b6 t7 ]
  1414.             Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));6 i! ^% y# b) B# _  K" i+ {; Q4 J# h; G
  1415.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));* Z# Q# t8 Q7 A+ a1 N
  1416.         }
    % {% ~) n# `8 W1 D# G2 h( S
  1417.     }
    + O- z2 m' f& ^6 U0 F+ z% D! O
  1418.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk'): [5 V& Q" D2 M/ k$ {
  1419.     {
    0 a/ q8 W! R$ `! G( ?3 \
  1420.         if (AuthMode == 'wpa-psk')' d2 C, M8 F5 k5 h5 R( I, W1 Q
  1421.         {5 i. `3 w0 [  u1 g' f2 u
  1422.             Form.addParameter('w.BeaconType','WPA');, ~4 D  X+ j, v1 |# b" s
  1423.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA');
      q0 A% p  v. p+ v
  1424.             
    8 R0 o, @- M4 i
  1425.             beaconType = "WPA";: {% n/ C" e0 W: m' A
  1426.             Form.addParameter('w.WPAAuthenticationMode','PSKAuthentication');
    ! M+ m$ z" t' H, f" i; x2 O
  1427.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'PSKAuthentication');
    $ H5 p5 g! i# V' e/ i& X! y
  1428.             
    + L- Y& u* g' w" |, T9 j
  1429.             Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));8 B: h3 J+ c8 E! n$ Y0 Q2 A4 p
  1430.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
    4 `9 Z7 H% ]% G& P8 a! @, j
  1431.         }( Y! `6 u$ B7 O, g, f! O" d! V
  1432.         else if (AuthMode == 'wpa2-psk'); X( v. P' H4 E4 v9 Q9 S
  1433.         {( w  N  S4 g7 Y; c/ V% b' i
  1434.             Form.addParameter('w.BeaconType','11i');
    ! \! d9 E$ l; ]' H/ H3 Q4 M
  1435.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');
    5 D" S1 [! |2 T
  1436.             % \' x3 r5 ^) p7 W1 R/ x
  1437.             beaconType = "11i";
    - U$ g/ Y' C0 Y4 b# R1 P2 K) f
  1438.             Form.addParameter('w.IEEE11iAuthenticationMode','PSKAuthentication');
    # F/ |# P' `2 k0 B2 w+ K7 @- }
  1439.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'PSKAuthentication');
    4 k* y6 c) J! }5 i3 N
  1440.             
    : T; ~! u9 U) f7 X* I$ B/ f
  1441.             Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    ! @% [$ {  N. D3 H7 l
  1442.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));* N( Y+ Y% h1 K2 l) ^
  1443.         }
    ! j; S; R6 a% D7 t
  1444.         else if(AuthMode == 'wapi')5 ^$ z! b' u6 Q+ c" i- o( M
  1445.         {
    # P; C- b6 r. m. _0 S2 _
  1446.             Form.addParameter('w.BeaconType','X_HW_WAPI');
    - I) _! N7 N6 p; T0 L$ ^% Z
  1447.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');
    8 e3 z9 {; G7 G% C6 V" R" v
  1448.             
    7 J& n5 i# k8 l
  1449.             beaconType = "X_HW_WAPI";) _3 _2 h( r* Q* s( p
  1450.             # n' t9 N/ k3 r
  1451.         }( s  J* E! z/ |' X
  1452.         else if(AuthMode == 'wapi-psk')0 c/ U2 Z2 v9 c5 j" D. O' p0 s2 t
  1453.         {5 K' d! h, v6 y( T$ F
  1454.             Form.addParameter('w.BeaconType','X_HW_WAPI');
    2 U  a+ f1 _) x
  1455.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');
    1 [( A* N& S1 W/ p0 |9 S9 R% \
  1456.             
    # \- J8 F# h- I$ ~- ~) L0 y+ G
  1457.             beaconType = "X_HW_WAPI";7 f1 E' d" ?4 T" b7 o( q0 r
  1458.         }
    * b8 |6 o% ]3 v% I8 ?, H
  1459.         else
    / a  w/ ]$ E( L0 ^2 c  ]
  1460.         {2 [1 n4 n2 W; X" f4 p- r. b
  1461.             Form.addParameter('w.BeaconType','WPAand11i');
    6 P% P! g$ @- i% l3 V" A
  1462.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');# ^" w% f0 M0 s+ X8 }7 M4 n/ X
  1463.             ; a8 G1 y3 S3 w4 _0 c6 \
  1464.             beaconType = "WPAand11i";
    : [' K/ G$ _) [, K: c2 e& N
  1465.             Form.addParameter('w.MixAuthenticationMode','PSKAuthentication');
    1 S6 j, }) v9 P; _! F
  1466.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'PSKAuthentication');
    1 M6 Z  T7 }5 v7 y& K. z
  1467.             ! `0 J" L6 u9 y$ L, z% Y+ n/ a
  1468.             Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
    : o0 u$ @3 e) z; k& t9 s' U3 {' F
  1469.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));
    ' A6 Z0 e3 f0 D, L/ l6 f2 Q5 y
  1470.         }
    $ U- S9 U; ?9 t0 }2 ^
  1471.     }
    9 a2 G! z5 y9 ]* ~* D3 y* C8 [" H
  1472.     var KeyBit = getSelectVal('WlanKeyBit_select');    2 I* P4 [" I* ~' q9 [
  1473.     Form.addParameter('w.WEPEncryptionLevel',(KeyBit-24)+'-bit');& a( v% z; f1 Y& u  A1 d
  1474.     setCoverSsidNotifyFlag(Wlan[ssidIdx].EncypBit, (KeyBit-24)+'-bit');
    . b5 y0 K4 E0 `: q$ J
  1475.    
    & U: x0 ]7 {& W$ {7 ]- n1 J
  1476.     //var keyIndex = getSelectVal('wlKeyIndex');8 c1 z  n8 K1 M; v7 O% f; ~
  1477.     var keyIndex = 1;
    ; `) U- Y! ]) P' D* f+ L/ m  a' b
  1478.     Form.addParameter('w.WEPKeyIndex', keyIndex);            
    / V( [' A  b; m$ i" u" s! z
  1479.    
    & q( \6 d$ d5 [! y2 }
  1480.     var weppsdModifyFLag = false;4 ]8 R  @$ W+ a) t$ d
  1481.     var key;
    . o) s( I! _% Q5 N
  1482.     if (1 == keyIndex)8 K! c2 G2 k+ A& R" D* G3 A! ?
  1483.     {
    7 z& v3 t4 e" ~' x
  1484.         key = getValue('wlKeys1');
    5 I5 @3 v/ K6 C1 R% N& L4 x
  1485.         weppsdModifyFLag = wep1PsdModFlag;
    * S% H  E) s3 Y* R+ g7 ?; w
  1486.     }9 }& ~/ ?( o; U/ c7 h) w0 }
  1487.     else if (2 == keyIndex)3 W7 O  a  ?  O: N5 P1 H7 T
  1488.     {
    3 ^- h1 r/ S) c  v8 R, L/ V5 c) ]& D
  1489.         key = getValue('wlKeys2');8 |# ^. w! B  v5 Y9 o; h  \, u
  1490.         weppsdModifyFLag = wep2PsdModFlag;( s2 `  V- ~, \) |
  1491.     }3 U: f8 b6 \; E; r
  1492.     else if (3 == keyIndex)* C5 ~* W, {; l* u+ K' n$ M
  1493.     {6 c7 E6 X$ P6 A; Y( [- o% H( ^
  1494.         key = getValue('wlKeys3');
    / B2 \# T) H: j  b4 ~
  1495.         weppsdModifyFLag = wep3PsdModFlag;: e/ s- w: v9 y0 t
  1496.     }
    8 a- ~' C  X7 z* i/ J
  1497.     else  if (4 == keyIndex)
    : K% L+ h' \; m# l! Y. B
  1498.     {, b  I/ L1 E* j# \- Z, D
  1499.         key = getValue('wlKeys4');; E0 r# q$ `* O& A; @
  1500.         weppsdModifyFLag = wep4PsdModFlag;+ e7 b+ T3 c% `
  1501.     } 0 O8 _! {: N6 m- \; X* V0 |
  1502. 9 m) }6 u- E6 l. D4 |
  1503.     if ("Basic" != beaconType)1 T% A9 ^- l4 j( v- H- m* H6 R( @# L) z
  1504.     {
    ! l. b/ t1 L$ E. R3 T
  1505.         key = getValue('WlanPassword_password');5 ^$ d6 \* \% ]: J! B& S5 v7 J. E1 F% U
  1506.     }   
    1 P# t3 k" p" x3 h, V' H1 M
  1507.     / n+ u( W$ v3 V/ e
  1508.     if (wifiPasswordMask == '1')" D( Z- ~/ l, f( z7 n' _0 t, `) s" G: q
  1509.     {; L. [) t. ^# z8 K4 v+ u/ S
  1510.         if ("Basic" != beaconType) . r3 x  y) b0 `" _7 T' Z
  1511.         {
      e% H5 m( E: |! G0 U1 b( f& z2 I
  1512.             if ( (key != "********") || (pskPsdModFlag == true) )
    - A, u1 D# N  `) _! e2 u; J
  1513.             {
    , ?9 i5 k# w3 Y7 t; \
  1514.                 Form.addParameter('w.Key', key);
    0 }! u6 W. \. A3 A5 L, m: p0 o- H
  1515.             }  B2 L* {8 o, |9 j  q/ m4 m% V
  1516.         }# W0 d1 ?: k( `, t3 f1 r" O: N
  1517.         else
    ' D$ c( l2 V( [  b9 Z9 j
  1518.         {+ _. b" n2 n9 k. n
  1519.             if ('WEPEncryption' == getSelectVal('WlanPwdMode_select'))( C6 b) G; X7 k
  1520.             {0 R0 k3 V# P$ ?: T  `
  1521.                 if (KeyBit == '128')
    ! C. M  N9 C# q- G9 H6 R/ b$ O
  1522.                 {+ e7 _2 @( p& G% ]4 v: m5 D( z
  1523.                     if ( (key != "*************") || (weppsdModifyFLag == true) )
    ) i: r% L7 y' b0 O+ J9 v
  1524.                     {                        - |" x. [6 a6 P" A
  1525.                         Form.addParameter('w.Key', key);' X6 f4 F7 {7 I" _: M, z
  1526.                     }
    4 A$ N: m1 h) ~3 y" O
  1527.                 }; D5 U1 x1 E1 Q5 y& X
  1528.                 else  ?, t+ h" I4 B3 I$ h- }
  1529.                 {
    . y) G' I& r& Y) K1 ?! l' j) I
  1530.                     if ( (key != "*****") || (weppsdModifyFLag == true) )
    , i7 y" V. Q8 A
  1531.                     {; f9 @# \7 K) i) O
  1532.                         Form.addParameter('w.Key', key);( Q' x' `$ d9 q1 n5 v
  1533.                     }! N* S3 [  T" k6 A0 P5 D) }
  1534.                 }& E2 A- {3 z, {! s
  1535.             }% a$ j; u4 B. p. B
  1536.         }9 N& U+ h* s; N+ H6 s
  1537.     }7 \* i5 P% R8 v& K8 g( X3 N. |
  1538.     else
    & k1 D9 _! ^: b
  1539.     {1 B3 |# v' Z7 a- e% q
  1540.         Form.addParameter('w.Key', key);
    2 a  `! k+ W0 u" M% O  ?( [0 M
  1541.     }) m, N3 s( {6 p+ O! x& J
  1542.    
    - Z  g% Z4 \& G" |* e$ E% H) S$ t

  1543. # b7 Y9 f7 b' Q9 e/ j2 c
  1544.     if ("Basic" != beaconType)
    5 b& y  V2 F* ]% _* ~2 ?
  1545.     {$ d8 A% E& q; w8 X
  1546.         setCoverSsidNotifyFlag(wpaPskKey[ssidIdx].value, key);
    9 O9 M* r# r' q) e' K
  1547.     }
    ( [1 C3 ?' W$ J8 h
  1548.     else0 N% q7 B  `# z2 @$ m3 a3 n, b. A
  1549.     {
    ) m8 Y! W& O) b1 m5 _
  1550.         if (('WEPEncryption' == getSelectVal('WlanPwdMode_select')) && (1 <= keyIndex) && (keyIndex <= 4))
    % R# h' v) p8 G7 }/ k  P6 @5 R
  1551.         {
    " t% w1 v- l- r( |: f
  1552.             setCoverSsidNotifyFlag(Wlan[ssidIdx].KeyIndex, keyIndex);
    + k/ J  z& g( ~/ j5 ]. x$ S
  1553.             setCoverSsidNotifyFlag(g_keys[ssidIdx * 4 + (keyIndex - 1)].value, key);2 e5 J' v# p! F) S+ P; Y3 _
  1554.         }
    & q- z7 s1 j& O0 R1 J! d4 G+ _: M
  1555.     }7 ^/ v! _) x5 {0 ^# d" S1 k( A. w
  1556.     * W) c2 d4 A) X" u" q1 {
  1557.     return true;
    & N9 F% G, d4 h' Y/ p$ Q
  1558. }5 s9 l" ^9 w1 O5 l
  1559. ; s2 ~" C: [; A0 X) N% j0 C! ]
  1560. function SubmitForm()" y1 [0 I+ b8 J! P4 p
  1561. {
    * X6 {7 u- Q0 a8 m
  1562.     var Form = new webSubmitForm();2 B+ F9 q9 R0 v" ?5 l
  1563. " Q8 K* j; y* n: q9 l6 V6 p1 ~/ Z
  1564.     if (addParameter1(Form) == false)7 ^% E$ X1 B0 k! L* o" d- z
  1565.     {- e8 E9 `4 f$ a, Z
  1566. setDisable('Save_button',0);
    7 N( R3 ^& x. Z2 {" A( F
  1567.     setDisable('Cancel_button',0);
    * C7 Y0 Q+ O$ X+ h7 k. ~
  1568. return;
    ( N9 G4 R8 V5 R' w) {/ D- ]
  1569.     }7 n8 z% @2 ^" A* Z+ H2 a+ A5 T3 G' c
  1570.    
    6 z# o, e, y0 `$ T
  1571.     if (addParameter2(Form) == false)3 I- N2 i# ^! s  `  i- I
  1572.     {
    8 Y, T8 x. _9 r* Y' Z6 |4 @
  1573. setDisable('Save_button',0);
    8 i, {4 Z  W% b" `
  1574.     setDisable('Cancel_button',0);    * L4 B, A( f2 d. o% T$ J
  1575.         return;' ^& o5 F% I' }0 y
  1576.     }
    ( j8 O% |! c) N# G3 C4 h9 l; z
  1577.    
    # V8 @2 g% D& k9 c
  1578.     if (AddParaForCover(Form) == false)" k9 `+ k5 ^2 a7 e! S% e. e
  1579.     {
    * ?- \- u2 Y1 E/ x. ^% C. s3 o! [
  1580.     setDisable('Save_button',0);
    , H7 q/ I8 N4 L! Y0 t, F1 d
  1581.     setDisable('Cancel_button',0);     * A7 }. y- O/ ~( j2 ?7 i! R, [
  1582.         return;
    2 W- m1 I' O; x8 e+ R/ D8 A
  1583.     }' [+ `& G3 I8 S
  1584.     : d+ n. ]7 A7 w" [. P3 `3 v) Z
  1585.     var wlandomain = Wlan[ssidIdx].domain;
    8 n- c: e1 G8 _# |
  1586.     var AuthMode = getSelectVal('WlanAuthMode_select');
    8 M. B9 f% ?8 k5 [4 U

  1587. 3 ]+ G+ G- Y+ c
  1588.     if (isWifiCoverSsid(getWlanInstFromDomain(wlandomain)))
    , D+ C* P  r& T: e5 h. X5 x
  1589.     {& T+ [- y; y5 p" i3 o1 \  K
  1590.         if (false == ConfirmEx(cfg_wificover_basic_language['amp_wificover_ssid_change_notify'])) / V8 D7 V, j1 B5 U4 q- Y2 V6 ]
  1591.         {  U. l* e2 e: b% `$ \) d
  1592.             guiCoverSsidNotifyFlag = 0;) N1 n& o1 ~: l; H
  1593.             setDisable('Save_button',0);( S. E  U2 w' }
  1594.             setDisable('Cancel_button',0);           / C) W% r, K: N, b" C, F
  1595.             return;
    ! [. v2 f/ X6 a5 |
  1596.         }
    : c5 q2 F2 v) r9 B
  1597.     }      
    1 G& r& O# t8 n  @* q1 d; O; ?
  1598. % N) z8 {3 N- u/ Z+ ]' X0 g
  1599. / q/ Z& H* h1 I9 X
  1600. var url;
    4 L! a1 k( v6 L  M1 |( n8 b4 J
  1601. 5 y  l; S) v6 o& o
  1602. if (AuthMode == 'open')
    , r+ `5 M, l# O+ Y3 ?/ t
  1603. {. ~- x3 Q/ {$ I! T4 d4 A
  1604. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;) [5 c: e/ u- o. I: v7 v) |6 e
  1605. }! c7 A  K, H7 W3 X0 D  e1 ^
  1606.     else if (AuthMode == 'shared')( z9 ?9 c& Q" Y, ~5 ~! f
  1607.     {) W+ l; s7 a% O) ?: j
  1608.         url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
    " r' \' Q7 B) s, r* y
  1609.                     + '&k1=' + wlandomain + '.WEPKey.1'
      H6 c4 g5 y5 a  z9 F
  1610.                     + '&k2=' + wlandomain + '.WEPKey.2'& u& u7 s- d, I9 h' p+ T
  1611.                     + '&k3=' + wlandomain + '.WEPKey.3'
    ! _  U& h' J& H
  1612.                     + '&k4=' + wlandomain + '.WEPKey.4';) ^1 r7 T' n: S2 G
  1613.     }! W$ J# `7 b+ n/ Y7 f" A
  1614.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')! `# o/ q6 P  t# y$ ~( t
  1615.     {
    ( B6 G( a7 b3 x
  1616. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;4 x  L, S. h9 Q/ y5 d$ I
  1617.     }
    5 m0 [% X% j/ r! S% f
  1618.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk')
    " F2 |9 Y; d8 k5 V9 s0 G/ k' E* H
  1619.     {
    2 N- w- X' S% J( }
  1620.         url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
    ' S' S* g% o% A; Y
  1621.                     + '&k=' + wlandomain + '.PreSharedKey.1';
    # U& `' \* l3 J5 H1 q, K- g
  1622.     }
    ' X+ t( {/ e" t) b. W) \( |& F/ Q
  1623. else if(AuthMode == 'wapi' || AuthMode == 'wapi-psk')8 y8 O' n$ W  y" ?" y, ]( t; X# O6 n
  1624. {
    7 Z7 v& a: U3 Z& v& ~
  1625. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain" i: {% M% {0 q+ \
  1626.    +'&k=' + wlandomain + '.PreSharedKey.1';# |0 f: j8 @: c# d5 N7 u! [
  1627. }
    / V0 c6 M3 J# v
  1628.     else  ]* c6 q/ ?! f2 D# y& `/ m
  1629.     {
    4 h2 ?+ q' y( Z4 h1 f/ N6 K
  1630. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&x=InternetGatewayDevice.LANDevice.1'4 q/ U" x  c0 |
  1631.                     + '&y=' + wlandomain;% ]7 r9 J( W& d: I( G" |
  1632.     }
      b* z" t; a" ~8 @+ n* l, a

  1633. : V! e; q' o+ p. S' s3 `% y
  1634. url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';
    ( Q) e' `" }) V9 V4 Q# k
  1635. Form.setAction(url);
    ( o. Z1 d+ _% I+ E

  1636. ; s# G8 }) n% h% Y; q% E4 U
  1637.     setDisable('Save_button',1);
      B' a4 W4 {6 u
  1638.     setDisable('Cancel_button',1);
    " \! r. z" {7 t9 v
  1639. Form.addParameter('x.X_HW_Token', getValue('onttoken'));- K: |. a  v: Q
  1640.     Form.submit();* ^0 I& H5 Q. R& D) S- f5 p
  1641. }9 v1 h* ]8 @* t2 T+ z; s

  1642. # x: d' D- Y# E* ]2 r
  1643. function WlanBasic(enable)+ z, E% q: V, e. m4 P; k
  1644. {
    . U( e1 m/ _# J0 o$ T
  1645. setDisplay('wlanBasicCfg',1);4 p0 i1 E% H' v1 e) e
  1646. setCheck('WlanEnable_checkbox', enable);+ p! {$ x6 p0 a# f9 C) W
  1647.   i- f- y- G  j
  1648. if ((1 == enable) && (WlanArr[0] != null))) N) F. D% v5 i! J  m
  1649. {9 y; {9 @& Q" `8 y
  1650.     ssidIdx = 0;
    ( c( t. W% H0 A$ k+ E- M# X7 x

  1651. + G: J; {* @3 _( \1 j
  1652. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage) && (uiTotal5gNum > 0))
    % U; c5 D$ V7 Y" M6 i* r& Z, @
  1653. {
    + S/ a( s- Y1 O, \
  1654. FirstRecordFor5G();+ _5 r) i$ L) b( K  k
  1655. selectLine('record_' + RecordFor5G);! M4 x" i- h" |8 s4 K% v. c

  1656. ; q3 S" f, _' H6 l; y- ^
  1657. }
    - U. m# {' r: F4 u8 C% \6 N- m
  1658.         else if((1 == DoubleFreqFlag) && ("2G" == wlanpage) && ((uiTotal2gNum > 0)))4 X- Y! F, |3 [8 V0 V2 O# O
  1659.         {
    ! P2 o8 o7 S, o8 p3 C
  1660. FirstRecordFor2G();, O; ?( [+ F# C! s$ ?  z, L# g
  1661. selectLine('record_' + RecordFor2G);
    7 v2 ~& v) M9 l  _! s' I6 y/ M
  1662.         }
      J2 Q- Y: C* a( j; d  V
  1663. else if (uiTotalNum > 0)  q) E! N9 T9 P8 R+ m
  1664. {
    / q% A1 v' ^8 g
  1665. selectLine('record_0');
      w, e+ H: @; h$ }: T1 f
  1666. }; @/ v/ R8 B* R& g2 N+ q% P& M
  1667. 0 {# ?3 e+ a; ?+ b: E2 v
  1668.     setDisplay('wlanCfg',1);
    ( q5 m) p0 X: H; A9 |1 t
  1669.     var authMode = Wlan[ssidIdx].BeaconType;
    7 ~' q$ m" y1 H  j4 i' F
  1670. beaconTypeChange(authMode);
    ; H" J$ `; K) C5 Y7 B* s& n
  1671. }& j. U* |4 e/ U& c# M( {3 H
  1672. else1 M! G6 M& D: P$ \! ]
  1673. {
    # \2 o2 F& ~3 `6 g' X9 v
  1674.     setDisplay('wlanCfg',0);
    ; O* d* V7 k& a6 u! X* M% e
  1675. }
    * ]8 {! V$ q" O8 V2 q  X2 k
  1676. }$ A; ?" z, r4 N* S4 a: I/ p) N
  1677. ( \3 J$ T5 L% E
  1678. function BindPsdModifyEvent()
    + r( }+ v/ u4 {+ a
  1679. {
    # U! r1 S3 f( z: J
  1680.     $('#wlKeys1').bind("propertychange input", function(){   ~/ i0 R5 Y* J& g' K
  1681.         var KeyBit = getSelectVal('WlanKeyBit_select');
    : C  [2 B+ L  {# }
  1682.         if (KeyBit == '128')2 W5 W2 n1 e4 V, r0 Q# r
  1683.         {
    9 r0 D( n* `+ w) K+ g! w/ e
  1684.             if (getValue('wlKeys1') != "*************")
    ' x# Q  h1 J9 b6 b; U3 u% r- u7 T
  1685.             {% L" q; l( A& ]/ m" g+ _' B% c  P
  1686.                 wep1PsdModFlag = true;; D7 @; d3 C8 \2 |0 X0 R
  1687.             }            . ?+ D% Q9 C) b9 b. M) X* j; A
  1688.         }
    5 I7 _5 Z3 A. _7 S% D7 e
  1689.         else & ^7 D; R) K; |8 \8 o% t( [
  1690.         {
    * @0 |. o3 \7 A4 R- @9 n( d
  1691.             if(getValue('wlKeys1') != "*****") 7 v6 x* D  `" K9 k9 h6 P% W0 Z4 C
  1692.             {
    : H, {; K+ ]6 P5 P9 B* a4 d
  1693.                 wep1PsdModFlag = true;+ T# y; z. `5 H
  1694.             }
    6 g2 U' Z/ ^: _/ g6 Q) P. `; B
  1695.         }
    , e3 Q5 K: Y$ i3 K
  1696.     } );
    2 r! O7 Q3 c+ }. m
  1697. " I3 h7 W: I! I" W6 l
  1698.     $('#WlanPassword_password').bind("propertychange input", function(){
    % H9 k1 i! |7 ~' Y
  1699.         if(getValue('WlanPassword_password') != "********")
    $ }& X6 E$ b. V- z, H8 S
  1700.         {6 p/ M/ t! e$ L/ \* n
  1701.             pskPsdModFlag = true;
    9 e* C; I) D3 y4 }
  1702.         }
    2 _1 w( a; L6 W) Q% D' y" y5 H
  1703.     } );
    9 ^7 H" t. d* h
  1704. 3 @, E& y0 A8 |0 c
  1705.     $('#wlRadiusKey').bind("propertychange input", function(){
    $ v5 G& e; l, H; ~
  1706.         if(getValue('wlRadiusKey') != "********")   d4 Z) W, D2 E' ]7 t& o6 H
  1707.         {7 u1 u2 p: m0 T( `( ^( h6 X
  1708.             radPsdModFlag = true;6 S* w; C* f! r' l
  1709.         }
    - ?4 M# _; B# I* _- B0 p5 F# N
  1710.     } );
    1 G) D* X: |3 Q! ]0 M9 p
  1711. }
    $ `+ L0 c  ?5 B+ C+ B& f3 Q" O
  1712. 0 f) W' b0 d" N) h) O3 i3 A9 [/ L

  1713. / Y9 J) t" C& z* K
  1714. 8 e$ V: E6 Y' W2 A7 v  `
  1715. function LoadFrame()) m) v1 A3 J; N' I, l
  1716. {   
    - O6 c3 ^* o, r; s; _# M
  1717. var flag5G =0;
    $ ~- M: c! d. C
  1718. var flag2G =0;* G' _. ]) c9 E. G6 }

  1719. 1 y% i6 R/ r- i2 N- o' w
  1720. Total2gNum();
    : }5 r5 Q, x! T1 Z7 q, S1 M% c3 \
  1721. # a" d9 j0 }3 L
  1722. if (enbl == '')( s6 }6 r4 a; A+ Z0 f0 c7 ~% w
  1723.     {0 y# a/ c% u+ t$ e1 \! X  I% W0 E$ l
  1724.         setDisplay('wlanBasicCfg',0);+ C7 }4 u4 }5 e& P1 a( y* N3 A
  1725.     }8 a" m% M/ z7 q. K
  1726.     else
    ( Q; p: [- u! t' ^' b- X, m+ E2 G
  1727.     {- y+ V: A) k* U
  1728. setDisplay('ConfigForm',1);
    & l7 B  s% P7 q4 s
  1729.         if (1 == DoubleFreqFlag)0 |! g$ g) _' ]3 o: I
  1730. {
    3 G# F- X  x- D5 S1 d/ A
  1731.     FirstRecordFor5G();
    ) S+ x: i, K( b3 V2 r( k
  1732. $ ~: G& n7 L3 [9 V$ Q, A' Z4 y
  1733.             if ('2G' == wlanpage)9 J4 _+ @' `( J
  1734.             {
    : K6 q4 l: O" e$ q, d
  1735.                 WlanBasic(enbl2G);
    " o& t. Z* z$ L! J
  1736.             }( x8 h6 O; h# u; N. \2 E" k: q: l  \1 ?
  1737. " |0 X. u# E3 \; u& p
  1738.             if ('5G' == wlanpage)
    9 o8 ~+ {  w6 L) s" S+ k2 p1 a' y$ A. C
  1739.             {
    ) u* q* f+ X" k, e7 j
  1740.                 WlanBasic(enbl5G);
    3 D6 ?' V+ W& P" ~$ @1 O
  1741.             }
    8 C: h. [  f; D5 B4 Y: T0 E
  1742. }0 k  h. I6 p2 g2 y+ v+ h+ n
  1743. else  l3 \* K' q- r' j8 i4 e, E" Z/ K
  1744. {
    ( g$ f4 J# T, c0 v6 Z
  1745. WlanBasic(enbl);7 \- y$ F" @! G/ s
  1746. }
    , r, ^' g2 R4 z/ ]
  1747.     }
    4 K, }+ s5 `" J9 [

  1748. ( h4 c7 @% m/ v! @3 w; F0 F& ?; q: Y
  1749. if (1 == DoubleFreqFlag)% |/ |: g  @6 o5 F7 ?2 h
  1750. {
    5 X, f: F1 `% Q# y
  1751. if("2G" == wlanpage)4 J$ R  v( h& M. e5 w
  1752. {
    ' A2 t9 E( d( u# ~  d, G% w1 k" }
  1753. for(var j = 0; j < WlanMap.length; j++)2 H& R6 _* H+ l3 j0 F7 ]; n1 w- n3 l
  1754. {
    ) a! B, Q2 s! N2 A0 d0 ]4 P; C
  1755. if(WlanMap[j].portIndex < 4 )6 B7 P* i0 ]; C2 D- T5 r. x! k
  1756. {
    5 t! W( R# _; f3 H4 `. L( O
  1757. flag2G++% C: w' I7 u2 j$ ^# D. X
  1758. }
    - M! q$ V4 B' E# Z# a
  1759. }
    5 e' K, }1 _( l7 k5 z: B
  1760. if(flag2G > 0)
    4 q! I- n3 i) e/ X8 G
  1761. {
    ) n4 E2 E' @: I" {* ^2 M2 l" C
  1762. setDisplay('ssidDetail',1);. @' G0 i/ Y2 }. j
  1763. }0 g' N' t" N: q2 ~& y9 b" M7 l' O: `
  1764. else7 p3 S6 I) H2 b) M" }  @( M$ L
  1765. {# U2 K1 L) u8 l& d3 K6 }
  1766. setDisplay('ssidDetail',0);6 u/ L$ ]5 U$ o9 m0 m( ^) ]
  1767. }  `' w3 s' R# A3 I' }+ d
  1768. }
    4 P' B3 O. r7 z, T3 ?9 I
  1769. ) [- x& n& {! k7 t/ ]
  1770. if("5G" == wlanpage)9 c" v6 d, H4 @2 l  z/ G% V9 M: S
  1771. {$ W  D) s7 l5 O
  1772. for(var j = 0; j < WlanMap.length; j++)7 P; v  q1 ?, _" q8 n& Z
  1773. {  I+ N4 Z+ E+ _0 P: ]
  1774. if(WlanMap[j].portIndex >= 4 )8 o  D: [# _  R/ c* U' V
  1775. {
      O( c7 t3 _* ?8 g; r9 m% G
  1776. flag5G++
    ' ?) A9 G- U/ Q& Z% p# U
  1777. }9 Q% h3 D, ]9 x7 c& x7 t4 A
  1778. }" d/ B& k7 e4 d% e
  1779. if(flag5G > 0)
    ( y5 z/ w/ Z1 x8 W/ Q6 @7 V
  1780. {
    $ V- L+ P( b# O8 J
  1781. setDisplay('ssidDetail',1);
    - F, s9 ?: \! I: ]6 P; T- b' X9 d
  1782. }
    6 `: l" m# `* J
  1783. else
    : l% N6 p$ p$ s. K' ?& ~9 s' X7 H
  1784. {
    ) i; i1 l! D  v' U) _6 l
  1785. setDisplay('ssidDetail',0);+ J/ A* \8 `# R: J
  1786. }2 A6 F. D1 l9 J1 O1 e  B, [6 @
  1787. }  X& _1 a& v' ~# U$ F, q$ B
  1788. }
      N7 r1 Z. W5 U7 X, o* b3 m) H. v
  1789. else
    2 s& g7 c0 b+ ]: q4 @+ x3 s
  1790.     {
      G9 z2 n1 M5 l
  1791. if(0 == WlanMap.length)+ k+ Y% y( N* F
  1792. {
    7 u. e, c& F& u: T& ?+ g
  1793.         setDisplay('ssidDetail',0);1 I; j* S4 r4 Z5 A# d% X# J
  1794. }
    ; `+ q; ~" O( S# t4 r% s
  1795.     }6 J+ j. f4 \( @
  1796. + Q5 E& X3 F9 ?. C/ {
  1797.     addAuthModeOption();: `  [5 X9 c, M" i  g
  1798. 0 V% H; o$ _4 x& \
  1799. WlanKeyBit_selectChange();
    , Z7 N' H/ a6 Q: E; w7 [
  1800.   R0 I7 i2 d/ L# a
  1801. if (1 == '0')
    0 ]* V6 L8 d8 L& v
  1802. {0 f: L' O, w& x  G2 j
  1803. setDisable("WlanPwdMode_select",1);3 d# G4 Q1 Q: f2 a0 {- E% x
  1804. setDisable("WlanAuthMode_select",1);( T2 i+ i& s$ z3 ]2 Y
  1805. }# o5 U4 d. b+ X( z( u9 {1 y
  1806.   m! Y) r! X" m( O4 {+ X
  1807.     if (wifiPasswordMask == 1)1 b& K8 R6 o4 g0 Q4 j6 b9 s7 Q( M0 {/ b
  1808.     {0 x6 Z/ w/ g0 U3 g, a
  1809.         BindPsdModifyEvent();0 h1 G( ~7 r2 \$ u
  1810.         : \8 Y6 z+ [% X" c( p/ j
  1811.     setDisable('hidewlRadiusKey', 1);; L* t4 H8 ?: Z! q
  1812.     setDisable('hidewlKeys', 1);- a) H& x2 l5 z# J( W& `6 O
  1813.     setDisable('CheckoutPassword_button', 1);    & X8 L( H* ?# k# ]7 y: ?' I5 w1 `
  1814.     }! i& X1 B" O1 g7 P; P' _1 X* x* Z( A

  1815. ! |9 M! p4 S6 `. T  ]- a
  1816. var all = document.getElementsByTagName("td");/ x- I" S3 f8 p9 ]( Y0 u
  1817. for (var i = 0; i <all.length ; i++) ( y& c- X; ~$ t0 S" W& v
  1818. {
    6 s( n: g, ]1 q1 a" l6 e+ I4 G
  1819. var b = all[i];
    ! `" M, {' e  Y4 N
  1820. if(b.getAttribute("BindText") == null)
    - I8 l- ?( @+ i2 V, b
  1821. {. F; k/ D+ W1 N6 a% g1 Y; @; n6 q
  1822. continue;# G( z8 Q& I7 e
  1823. }6 q; e' Z, f+ O0 v& K  `
  1824. % {. O3 {6 n" [: C% |, [- w/ K
  1825. if (cfg_wlancfgbasic_language[b.getAttribute("BindText")]) {
    " h# d& P1 B5 b$ \1 Z, u9 X
  1826. b.innerHTML = cfg_wlancfgbasic_language[b.getAttribute("BindText")];; B8 s) P) L1 A0 q. w
  1827. } else if (cfg_wlancfgdetail_language[b.getAttribute("BindText")]) {5 S" |0 i/ V% D- }, x! X# {
  1828. b.innerHTML = cfg_wlancfgdetail_language[b.getAttribute("BindText")];
    5 v$ E3 x" ]  z! ?9 E  R/ @6 N  _
  1829. } else if (cfg_wlancfgadvance_language[b.getAttribute("BindText")]) {- Z3 b9 Q2 P5 A7 J$ F, F1 _
  1830. b.innerHTML = cfg_wlancfgadvance_language[b.getAttribute("BindText")];
    1 W7 W+ |' p2 f8 z3 S% l! u
  1831. } else if (cfg_wlancfgother_language[b.getAttribute("BindText")]) {
    4 V% _" s0 K; U. d: a& Q
  1832. b.innerHTML = cfg_wlancfgother_language[b.getAttribute("BindText")];
      V. v7 [1 C6 {/ x( M4 E
  1833. } else if (cfg_wlanzone_language[b.getAttribute("BindText")]) {9 G0 E* m% T% k' O
  1834. b.innerHTML = cfg_wlanzone_language[b.getAttribute("BindText")];3 j: @) V2 C7 G1 U  \! W
  1835. }9 }: _+ A& L! {, c! f# u; e1 _
  1836. }
    " A9 W' X" X. G0 [
  1837. 5 R: ^. U; V. F
  1838. if (g_keys[0] != null)
    1 k: p7 N% h* `$ E# ~
  1839.     {
    0 V' ?4 G+ T% T) ^3 a
  1840.         document.getElementById('wlKeys1').title = posswordComplexTitle;
    . I2 K8 A: B  A% u0 c
  1841.         document.getElementById('twlKeys1').title = posswordComplexTitle;  ( t  c. \8 _0 W+ C
  1842.     } ( \" y, T; p& E1 F& C$ z
  1843.     document.getElementById('WlanPassword_password').title = posswordComplexTitle;# p* S) s. o4 x/ d+ {
  1844.     document.getElementById('tWlanPassword_password').title = posswordComplexTitle;& q0 t' w, ^( G7 k* h* T( j1 B4 ?  K
  1845.     document.getElementById('wlRadiusKey').title = posswordComplexTitle;6 U4 Y# P$ _9 |+ ]( A
  1846.     document.getElementById('twlRadiusKey').title = posswordComplexTitle;8 a0 Z- D. M: J+ P
  1847. }, ^$ |; j+ w5 [$ y  ^; P
  1848. ; l7 U, C  M+ v; G2 m; W9 e# B
  1849. function ApplySubmit1()
    + H" y& ~# U7 g& F) Y& j- _
  1850. {  ]- \- V$ H. w! K, y" h: N! O$ x- q
  1851.     var Form = new webSubmitForm();   % ~5 W" u1 x( G% w; r& N
  1852. 8 J/ O& U' G) x$ C( P
  1853.     if (addParameter1(Form) == false)5 n% a$ U( J" u- b1 g; t5 m
  1854.     {
    / ?1 |( r' x) y/ M
  1855.         setDisable('Save_button',0);
    : O/ F! i0 ^/ S! ]2 J* S
  1856.         setDisable('Cancel_button',0);
    * I0 w9 m% @6 @1 ~
  1857.         return;% v6 v+ t/ L# O5 y
  1858.     }, L0 P" W6 e5 r& i
  1859.    
    & ^) A' C, ~3 N$ m! d: e+ R5 E
  1860. if (1 == DoubleFreqFlag)# H+ {! ^8 \* y
  1861. {
    % e% q0 K8 L6 m  Y
  1862. if ("2G" == wlanpage). Z5 V0 ^( l7 i- Q/ i
  1863. {# {8 _4 n* |3 W  Y) j% ^! G! M
  1864.   Form.addParameter('y.LowerLayers', node2G);
    6 D- k: }" j7 ?1 f4 J
  1865. Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
    4 _- ^8 ~' ^* N/ L
  1866.                + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');
    1 y& y* L5 f  o& x( q8 e# h) A7 E
  1867. }
    4 z; n- b- Z3 U5 X) H
  1868. else if ("5G" == wlanpage)1 J) B+ q4 G5 f9 E/ N' j
  1869. {
    0 d6 ^+ _+ ?4 t
  1870.   Form.addParameter('y.LowerLayers', node5G);
      K1 `8 v6 A& C( s% f# w
  1871. Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'. f# M0 Q: V4 D. J2 b  Q( }
  1872.                + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');8 |, f+ \) s% k
  1873. }( v5 l% Y, Z, ?6 T2 [7 [
  1874. else% r1 Z. e/ f6 i! Z$ u/ M- q0 _
  1875. {}% f: J! L3 V; F9 N+ r: G/ }9 ^+ r

  1876. 4 W# r3 B- z$ d* X  r7 j
  1877. }
    - V. o% F5 `! p! u8 d. o
  1878. else
    ; V* U# x8 v7 f* D
  1879. {9 ?$ n! p& \, I# c
  1880.         Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
    2 M9 V9 ~; T8 A
  1881.                        + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');; W9 Y: \. T6 [8 k- o9 O
  1882. }
    - c" Z8 S7 D& @" d  j8 @% ~. ?& [
  1883. & y# E0 f6 o" i( b& Y9 A; C& t3 o
  1884.     setDisable('Save_button',1);4 ?" G7 d) o% @7 t  f/ ^6 @
  1885.     setDisable('Cancel_button',1);: m" N$ ~: w; I* ], O+ @# c
  1886. Form.addParameter('x.X_HW_Token', getValue('onttoken'));
    & N: \1 Q3 H1 y/ B0 q# k( E9 \
  1887.     Form.submit();
    & M$ a7 A" ^0 f  z
  1888. }
    ; I. e* M& q" f9 V( L' ^

  1889. 9 ]5 _# f4 ~5 E7 t: W  }; S; S) s
  1890. function ApplySubmit2()
    ) R1 ?  I# ?' z, k5 S2 l
  1891. {
    1 u& Y- u' m! i2 L
  1892.     SubmitForm();
    ! v$ ]2 ]+ K% n% a, u
  1893. }
    + x! b- {$ }  `9 G4 ]
  1894. 3 `, j- D, N+ r" e/ [
  1895. function ApplySubmit()7 g  R' _1 l/ }, m% X* ?2 m" h
  1896. {# V! H+ r5 d, u1 y  a
  1897.     if (AddFlag == true)3 I* l) k# t( A. Z+ n8 x
  1898.     {  Z- O  j" ~5 z, g; ~
  1899.         setDisable('BtnAdd', 1);
    - U5 t4 i2 g* E% ^, r6 ~
  1900.         setDisable('BtnRemove', 1);
    - I( D' f7 E, Y& d- k+ {; o8 `- C
  1901.         setDisable('Save_button',1);. x- y. z3 c! P$ m# [% K8 B
  1902.         setDisable('Cancel_button',1);  ?7 E' K+ w) m' n$ B( [$ A

  1903. / @) f( B0 @, |; {0 E
  1904.         ApplySubmit1();4 e! N2 Y' F8 c) [6 [
  1905.     }
    ! S0 W0 z! t9 }6 e4 v% }- k, q" p
  1906.     else
    ( f$ K1 _$ F6 ?) c  y' Z6 G
  1907.     {
    0 O3 ~" \( ]) Y5 l
  1908.         ApplySubmit2();
    ( G. B# W8 ]9 w0 y  A
  1909.     }3 s7 |7 o4 Z% R9 N1 d0 i- H: r
  1910. }
    + d3 k8 E' e; m5 F

  1911. & n/ D! G. K1 ^# F9 }$ g
  1912. function EnableSubmit()
    ) \1 E  [. X- G% x, [# f2 Y
  1913. {1 U5 m& Z3 B% U/ s( n% ?
  1914.     setDisable('WlanEnable_checkbox', 1);9 [* I) L# K  D  A
  1915.     AddFlag = false;
    % U2 P9 r! B' [* _8 ^* [4 `# \
  1916.     var Form = new webSubmitForm();
    . k! f( |6 J" y  P
  1917.     var enable = getCheckVal('WlanEnable_checkbox');& i; j% u' H: ?
  1918. var url;( m' h$ d2 S3 o7 K
  1919. " K& R/ D8 U  O7 P$ `  z: R) D
  1920.     setDisable('Save_button', 1);7 b$ }: `$ S: w5 F1 R
  1921.     setDisable('Cancel_button', 1);% E* W) r( L1 z4 Y& r$ A6 M
  1922. . K% y+ ~4 L" e7 a1 o, j
  1923.     if (1 == DoubleFreqFlag). w& m' N; C2 h- z4 N: V, Y2 d. k
  1924.     {  o: R- a6 f+ {* z! \
  1925.         if ("2G" == wlanpage)
    2 k2 j. i/ V  ^8 k
  1926.         {; M. I. x( U+ _( ^* r' ]  e
  1927.         Form.addParameter('x.Enable',enable);
      D( H: ^) A3 S3 Y+ s! Y
  1928.     if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node2G)! q! h3 ]% U8 K- H% O) z' ~& ?
  1929.     {
    0 V: g' e; f9 h/ C# s, ~# H+ q
  1930. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1';
    : K, N: k2 Q, q6 f
  1931.     }6 n, |2 K* j( Q/ m) Q
  1932.     else: v2 r; W; X. m' K' u5 r" p$ O! C
  1933.     {
    # }  D7 n$ @( Z9 E3 N% V: V1 v  D
  1934. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';
    5 A: p2 r8 W. l! y/ K
  1935.     }2 V1 a, C) w, Z& W5 X
  1936.         }
    : C, Q* q- [* a' u4 l, d" N4 E1 ]( Y
  1937.         else if ("5G" == wlanpage)7 }; f# d- ^+ D1 k* \
  1938.         {
    8 \4 X0 c6 k7 i6 W( `5 b4 S7 Y* U
  1939.         Form.addParameter('x.Enable',enable);
    - o4 m5 l/ y: j; Y
  1940.       if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node5G)
    ; |' f4 K5 x' \" m
  1941.     {$ f# g9 K' ^% A' v/ e! E) l8 w
  1942. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1'; 9 f- |0 m, X3 G+ Z3 _& Q) f" @: Y
  1943.     }
    5 Z3 N* p- q! H& f
  1944.     else) i: A/ w' x. H- J" X
  1945.     {
    / q7 N" W, |3 N: i5 D5 S
  1946. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';
    4 t, b. J- @" o
  1947.     }5 I# W! t5 w2 ]' {
  1948.         }( `9 g4 Q" J) o8 w3 u+ Y1 [5 X
  1949. else' m9 @$ E7 ?. p' d6 @# c7 e$ ?6 Z& \
  1950. {1 |  T% U' E! k* b
  1951. " m" F0 x1 `, a7 h  K$ l
  1952. }1 V" }1 f* E$ a1 N2 |' g& y4 a
  1953. }
    2 ~% s: f+ H7 y! G: {
  1954.     else. z0 r$ \  b% v' O) i' p: S
  1955.     {/ L$ R) m+ W; r8 E7 D; A9 D
  1956.     Form.addParameter('x.X_HW_WlanEnable',enable);
    6 g. }" q7 x- j( G5 ?2 t
  1957. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1';0 D: Z# p6 r! \0 s4 J, {
  1958.     }
    7 o! s: `. Z2 e) p% P) H
  1959. 4 L  A& b' g# Q& Q! S7 K) k
  1960. url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';- ^, K* y  w# c( k
  1961. Form.setAction(url);5 E( ]6 X$ W8 N; s9 A5 Q; w
  1962. & o0 G7 p3 d# U" @, I. D
  1963. Form.addParameter('x.X_HW_Token', getValue('onttoken'));/ b+ M3 B1 @( M/ z/ w7 ~% y: Z. ~
  1964.     Form.submit();
    ' r. B7 I) S" J2 t, L; M
  1965. }7 L2 u! k; Q6 e& d9 C! z5 N

  1966. / @9 b/ |6 i! g) N# g
  1967. function showWlan(currentWlan)
    . A# C( U2 j5 x0 S
  1968. {
    0 s8 [7 U7 t+ C$ @- R' C- T1 j
  1969.     with (document.forms[0]), a/ |8 ^: u1 j
  1970.     {& j4 o& m/ g/ Z' X5 ]
  1971.         ShowSsidEnable(currentWlan);
    / L* p) w$ V# }; P$ g% P) J" Q! S& B" D
  1972.         setText('WlanSsid_text',currentWlan.ssid);
    / \* o9 z' q9 v9 K) D- t% ^% q7 Q
  1973.         if (ssidAccessAttr.indexOf('Subscriber') < 0)
    % b* Y1 y8 j: `. B
  1974.         {
      A1 W; s" g/ X* ^2 V( P
  1975.             setDisable('WlanSsid_text',1);
    * m" u9 c1 M( j: ]- W
  1976.         }) @0 s& n' [9 X( y2 v  U$ x+ ?; G

  1977. ) z) T6 o( G$ j$ _  F9 W" o( @$ I
  1978.         beaconTypeChange(currentWlan.BeaconType);
    % n1 w8 W' J; Q
  1979.     }" N! q# P; |; i# h9 w& i
  1980. }4 a" {: E$ d9 n* ]% C

  1981. * d# Y& F& x1 ?' ^+ \
  1982. function setControl(idIndex)' A1 R; p4 _# b, h4 `) [/ D- U
  1983. {   
    % L3 u0 P$ |7 m  v0 v7 M
  1984.     if (-1 == idIndex)/ `0 m/ t. _9 M
  1985.     {   * M  h( M2 c2 L( J* H- \/ E7 A7 ]# q
  1986.         if (1 == SingleFreqFlag)4 H+ n3 E* [$ d7 W; X- w" N5 X' C
  1987. {
    # C9 C( r1 |+ u% o1 K' X
  1988. if (Wlan.length >= maxSingleWLAN.MAX_ID)- S: v) R: c' Z$ O3 y$ ^
  1989. {1 r; I) [) I3 t" s& h
  1990. setDisplay('cfg_table', 0);
    7 @) \( L1 [5 Q5 _4 G, i
  1991. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
    5 a: B- _' m. l4 A! c
  1992. return;
      c. k. V3 C0 `4 V! a
  1993. }3 }# N$ \* A: ?
  1994. }
    4 O  Q! Q4 \+ u: E! t
  1995. else if (1 == DoubleFreqFlag)+ p6 Y" ~/ z, K: M' _
  1996. {* h! P5 O' S$ {! E
  1997. Total2gNum();
    ; x% Y8 k/ E0 H& T% u: j
  1998. ' _: L) x! E) u' T
  1999. if ("2G" == wlanpage)
    , i% e& ]( Z2 y0 z3 G$ U1 I
  2000. {
    . R  _" {# w% \
  2001. if ((uiTotal2gNum >= 4) || (uiTotalNum >= 8))5 p  h  I* _; h: D
  2002. {
    . P- A* b1 }7 F% b
  2003. setDisplay('cfg_table', 0);( O( w* Z1 x1 {  q+ l
  2004. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
    ' R1 @' l9 t- I6 q4 I
  2005. return;
    / P  d4 s, R/ {$ V$ w
  2006. }
    4 X5 J+ q+ p1 T9 j( g
  2007. }
    6 `5 L6 }1 }- U' I: B0 c
  2008. % ^# A0 D/ y( Q* C
  2009. else if("5G" == wlanpage)
    + U( i3 r- D3 Y
  2010. {
    ' b) v2 Y7 l  i
  2011. if ((uiTotal5gNum >= 4) || (uiTotalNum >= 8))
    & J& h6 [) h" E$ X( g
  2012. {: O( k& c, m; `
  2013. setDisplay('cfg_table', 0);% t$ W; m, `' Y: e% S
  2014. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
    ' a+ u" ?+ Y$ P. D6 ]$ [0 U
  2015. return;
    . t) y# n" u; D, E" ?
  2016. }
    " A& k  R* X/ k
  2017. }
    ( N3 v/ D+ G' i6 `: h2 c
  2018. }5 v8 B) b1 N5 L; y
  2019.    
    3 w* R, {8 g$ h/ w2 l, O
  2020.         ssidIdx = -1;( O/ \& i+ }. N  y' D9 ~
  2021.         AddFlag = true;
    8 l* J5 L4 T+ X- L4 N

  2022. " @8 e% y5 M6 h# C7 {, ~
  2023.         currentWlan = new stWlan('','','','',1,32,1,'','','','','','','','','','','','','','','');
    1 A6 F/ b6 X$ }/ i* c8 z! u; z

  2024. 5 M# P7 \7 I0 |6 _' k: {, L
  2025.         setDisplay('ssidDetail', 1);) a% {0 J8 B' O/ Q
  2026.         setDisplay('securityCfg',0);
    : z$ Q! P. e, ]4 {; R! k- u; x
  2027.     }* @' r/ \5 P& ~1 p
  2028.     else1 Y5 Z  |7 o8 U! I7 S- x# Q) h
  2029.     {
    $ k% w( ]  s6 G% |8 F
  2030.         setDisplay('cfg_table', 1);
    3 @* |+ `, m$ |0 g$ e0 D
  2031.         setDisplay('securityCfg',1);
    ! k+ h; P$ l* H0 e0 E1 W
  2032.         ssidIdx = parseInt(WlanMap[idIndex].index);
    9 r% W: [8 y, g  [6 Q
  2033.         AddFlag = false;' Z$ m4 o" O' w; e7 _
  2034. - r' K1 ~, ^$ V- p- X1 X7 c# q' [
  2035.         currentWlan = Wlan[ssidIdx];
    & q5 U( y- h0 i- f; R; o9 j! p
  2036.     }/ C$ V% u. O+ m: h

  2037. $ Z5 n. Z+ H, c5 M  z0 Z2 z, j; v
  2038.     showWlan(currentWlan);
    4 R/ X" C! O) e% ]6 }

  2039. $ j9 i4 s" A) ^' s
  2040.     setDisable('Save_button', 0);
    8 g9 X5 {: l. \
  2041.     setDisable('Cancel_button', 0);
    . W. {  G* F' A7 V1 p' z: d, ^

  2042. 3 O9 A0 H% L' e( Y( R% _
  2043. var curWlanInst = getWlanInstFromDomain(currentWlan.domain);' r/ Z: i3 r& y% i  d: C6 _
  2044. & H# _4 K. H+ j- f0 {
  2045. if ((1 == isSsidForIsp(curWlanInst)) && (1 == ShowISPSsidFlag))! |: j( X8 ]( h  u% i0 D
  2046. {
    % j* F2 |0 Z: Y# F5 ]
  2047. if ('CMCC' != CurrentBin.toUpperCase() )/ ^0 y% ~' F" H" F7 W: V9 y
  2048.         {2 K" F" R" E" p! I, F. f) h
  2049. setDisable('Save_button', 1);
    6 \& ~1 g. F7 R6 O
  2050.        setDisable('Cancel_button', 1);, Z( b. q1 A  a3 J' n1 D
  2051. }
    . i1 F( t+ ?- j4 R% E5 K6 R
  2052. }
    9 p$ p: U$ f, N7 A9 d

  2053. ( C8 E5 D, |9 u+ J

  2054. ! J4 O, P) F- c  x
  2055.     ClearPsdModFlag();: D$ f" g! Y6 P3 e1 Z
  2056. 5 w9 L5 k8 e4 r/ N0 J8 R# b" P; L4 ~+ y
  2057. if (1 == MngtJsCmcc && 1 != curWlanInst && 5 != curWlanInst): b* @% _3 M4 u) E$ a) d/ D* j1 B
  2058. {
    & f- W3 f. l9 g' M
  2059. setDisable('Save_button', 1);8 {; v  F2 d& Z) J8 V: g
  2060.        setDisable('Cancel_button', 1);  h" g2 j+ A# C% k8 A8 `
  2061. }
    0 ^  C) n) b9 F" j
  2062. }
    0 ]+ z/ l/ X  W. R* Y, u* f

  2063. ! X/ e; r# o3 j. V9 P8 j  c
  2064. function selectRemoveCnt(curCheck)' }& @8 g0 |% }4 X/ Y4 r
  2065. {" h2 h5 s- f4 U
  2066. }+ b& X. z) t0 g! b% k

  2067. : @) J3 F2 r" p# k4 \( e; t% g3 K
  2068. function Cancel_buttonValue()) F+ x% M  C/ z: y1 Y' x
  2069. {- e. D+ n1 [0 j* h7 F9 Q# q7 m
  2070. var temp1 =0;  M) a9 }# [: @/ I: G) X
  2071. var temp2 =0;
    7 |; `& z! ~! \$ x
  2072.     if (AddFlag == true)0 a$ A+ n5 ]( U3 ~: z
  2073.     {" r& U( ?: j+ `
  2074.         var tableRow = getElement("wlanInst");) Q# n/ E3 B2 ~! `3 C$ h9 Y
  2075. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))7 N% E# M5 z, E4 s. w6 s: o% Y
  2076. {& o7 B2 j, T0 `6 B9 A
  2077. FirstRecordFor5G();
    + F8 {# s# M+ d9 r/ V
  2078. selectLine('record_' + RecordFor5G);0 D7 D& P! x- F9 c1 N

  2079. 0 X8 q- F7 b! Z3 q% x8 n- |; ^
  2080. for(var i = 0; i < WlanMap.length; i++)
    2 P! y' F# t, I4 q2 e6 S4 S' Y
  2081. {+ B; ]: X& p. l! o1 {0 J
  2082. if(WlanMap[i].portIndex >3)
    5 V$ Q2 L7 m5 P( F* h3 C, m) ?
  2083. {& L- H0 h1 S$ I' _! n
  2084. temp1++;
    ; T: b* ^1 b: ?+ Z% K
  2085. }; J2 y6 z7 J, u' j8 ?$ a1 p
  2086. }
    , M5 q7 E, Q! U9 U
  2087. if(temp1==0)4 F# h: t: Y6 H" j0 b, a! [2 K
  2088. {
    * K- O% ?7 l5 J, l0 T8 c& f  Q
  2089. setDisplay('ssidDetail',0);
    , S+ X. Z0 w0 t0 M' s
  2090. }9 p0 u$ a8 D! u9 d8 R+ [& B/ n9 q; ^* p$ J
  2091. }. J8 g3 f8 D6 A' H* M' H
  2092. else if((1 == DoubleFreqFlag) && ("2G" == wlanpage))
    ! t: q9 n3 q9 |" \5 X7 K# V- l6 e; Z
  2093. {
    3 a+ p. W6 \% X
  2094. FirstRecordFor2G();
    , ]) j( \; p3 ^' c2 {
  2095. selectLine('record_' + RecordFor2G);$ |9 p& T* @! b% f
  2096. , I8 J, b/ X+ D5 H. H4 ~& p( n
  2097. for(var j = 0; j < WlanMap.length; j++). M+ ?# `7 x$ B
  2098. {
    6 U* ^: `& o! f6 Z
  2099. if(WlanMap[j].portIndex < 4)3 N! n8 x) H+ R, f& @: @
  2100. {: z4 [; n' H, G+ `& P+ n- k! c
  2101. temp2++;+ c9 V/ h- q7 k
  2102. }5 c! s( W& y$ C* K3 Q  r1 G, k, J
  2103. }1 _6 v7 J; R7 ?% D# r, m" {
  2104. if(temp2==0)# S" M; J# O) V5 D
  2105. {
    5 O4 G  ?8 U. K6 l% g& p( p  N
  2106. setDisplay('ssidDetail',0);
    # G9 M* Z: h; O+ U, `4 y
  2107. }0 y& u+ V! F( O5 ~( y9 w6 O. ]
  2108.            
    . U4 J! t) q* F4 ^3 |+ K
  2109.         }
    1 f# U) f. b5 L$ e4 G
  2110. else6 ?7 ^( ~. B/ Q
  2111. {
    ' U4 b5 J# g' `6 o# b2 f- O
  2112. selectLine('record_0');
    # m0 t; M  M; q* Y
  2113. }
    : ^  G7 H8 d' L- \, |' a: w. s5 \
  2114.         
    * s, A3 i7 [: d/ w
  2115.         tableRow.deleteRow(tableRow.rows.length-1);
    + U/ J. d) [' m9 I+ R" H' D
  2116.     }
    - ?5 t) p+ W, d1 @2 ]9 g
  2117.     else
    : M! L0 q4 h& `0 E0 c6 A
  2118.     {
    , M% B6 e& O# |1 H, J+ H1 e
  2119.         var currentWlan = Wlan[ssidIdx];
    " j. `% B, U6 c
  2120.         showWlan(currentWlan);+ H' N* u4 t+ P2 r% F# v7 [# }
  2121.     }
    + S8 q# V1 n3 s! W$ O5 l* n

  2122. # q. T. Q2 }% X# v- b2 v' U' P
  2123.     ClearPsdModFlag();
    : v5 L; }& l/ [3 |
  2124. }$ M( [  k! y( G
  2125. ' F2 a1 c  w) L- z4 L# @
  2126. var authmode = cfg_wlancfgdetail_language['amp_authmode_help'];- e8 L6 c4 @% E! `4 b" t; n
  2127. var encryption = cfg_wlancfgdetail_language['amp_encrypt_help'];
    6 s2 `9 A7 V0 ^4 M8 H: i' e
  2128. var ssid = cfg_wlancfgdetail_language['amp_ssid_help'];* F, y% @- s0 v8 L/ h; ?% J
  2129. var posswordComplexTitle = cfg_wlancfgdetail_language['amp_wlanpasswordcomplex_title'];
    6 F" Q5 s- V& r0 |4 R

  2130. - H2 }( I; P9 ]
  2131. </script>
复制代码
4 r4 v- H2 ^' F3 }/ K! |
6 ]; ?) L: ~" J- M# b4 \6 A
我这有台移不动HG8545M,JS里是这样的
发表于 2023-1-26 12:22:17 | 显示全部楼层
感谢大佬分享!666
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-6-20 03:42 , Processed in 0.054555 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表