找回密码
 注册

QQ登录

只需一步,快速开始

查看: 9467|回复: 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名称格式修改的限制。
; ~. d2 U" O; q( h/ O

6 i2 @. _+ r1 B; Y& m" K

本帖子中包含更多资源

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

×
发表于 2020-10-5 23:43:56 | 显示全部楼层
  1. <script language="JavaScript" type="text/javascript">5 k3 H, a: I, P, M( b2 p
  2. . l  @; ?- j. D- D, {& Y  y
  3. var WapiFlag = '0';
    , I! I0 r/ }: G4 {
  4. var aWiFiCustFlag = '0';0 e/ h+ |/ v) U+ m9 \+ @
  5. var aWiFiSSID2GInst = '';
    ! j' G0 q4 n, v. ^2 S2 w
  6. var wifiPasswordMask='1';! ], D$ c  }* K8 S5 g
  7. var CfgMode ='HUBCMCC_RMS';4 w, n8 F- k- f7 b$ U0 H; Q
  8. var CurrentBin = 'CMCC';- C! \0 L% y4 {9 ]! R' U0 f6 Z" Z# P
  9. var curUserType='0';+ w2 ~* i: @1 }
  10. var MngtJsCmcc = '0';
    9 E' a+ P2 [, U; F) L7 y( ]
  11. var TianyiFlag = '0';) A4 w3 U3 ~& Y; ?
  12. var wep1password;
    7 x6 m4 b- {7 Q/ A$ t
  13. var wpapskpassword;& L' }1 j9 l4 N/ d2 s
  14. var radiuspassword;4 E+ p# ]/ a- D' h  i( h, j
  15. var wep1PsdModFlag = false;4 r0 @6 v7 @0 ^4 Y. E
  16. var pskPsdModFlag = false;( q  T+ P8 n: L- v
  17. var radPsdModFlag = false;; q: m/ |- s% o. V; `

  18. / m; I8 ?/ o. z+ o4 `, T
  19. var g_flags = new Array();
    4 c+ `- P1 i! q( B
  20. g_flags[0] = 0;; k5 r1 ~/ y+ s. z, _$ }9 W
  21. g_flags[1] = 0;$ ~' l( N4 b" D5 r1 `
  22. g_flags[2] = 0;2 D) y- P$ I; l# C$ R1 Q# X
  23. var desc_show = "点击显示密码";
    ) r$ a7 G5 f9 p3 ^' X$ U
  24. var desc_hide = "点击隐藏密码";
    % T$ M& X' ?( @# D# P/ f

  25. * e. @0 S% J7 y9 d+ k0 `
  26. function GetLanguageDesc(Name)' i( N# w6 o3 X! n$ c( F+ a
  27. {
    9 R) ^! ?% ]- S) ^
  28.     return cfg_wlancfgdetail_language[Name];
    ) s" I1 C" o- h3 D1 a
  29. }
    0 q( `! M. t$ D+ I4 c
  30. - k. A& b% I, v  q# a8 ?; e3 f
  31. var wlanpage;
    * s  p  B' x& K* ~8 P4 H
  32. if (location.href.indexOf("e8cWlanBasic.asp?") > 0)
    ; O- x- b5 g8 j7 x
  33. {
    # c+ _8 f3 C5 |' |4 h
  34. wlanpage = location.href.split("?")[1];
    1 K! @% V7 d5 h, e- N( g
  35. top.WlanBasicPage = wlanpage;: B. [$ N- u9 O5 b+ q7 R% j' r
  36. }
    ( }/ ?) f  r% ]4 ]
  37. % \' ?5 k- B. O1 U) b& n2 e2 C
  38. wlanpage = top.WlanBasicPage;
    6 `' d2 P3 Q' G4 O

  39. ) D( B4 ~( O6 @. {5 M

  40. : }( L6 O4 v* K$ j# \3 s1 [+ z" B
  41. function ShowOrHideText(flag, checkBoxId, passwordId, textId, value)
    . q1 s, ~% K+ J% z, R/ t4 |, l
  42. {0 l0 p& n5 g1 g( z8 {
  43.     if (1 == g_flags[flag])
    / {9 R) I( M5 q' z0 v
  44.     {
    % i- h2 y$ r* O" f
  45. getElById(checkBoxId).innerHTML = desc_show;! c2 c3 z: g. U. F8 D
  46.         setDisplay(passwordId, 1);" N+ g' {6 o2 d; f
  47.         setDisplay(textId, 0);
    & G/ I/ h; f' Y* g& {+ s
  48. g_flags[flag] = 0;
    % @- o% @- H) m$ n
  49.     }
    8 e* N7 M6 p# A( W8 u, v8 W
  50.     else
    / O2 L  S: a8 O3 B/ l- Q
  51.     {# [; n4 w! \7 A3 f
  52. getElById(checkBoxId).innerHTML = desc_hide;
    , K4 H1 f' t  l+ o8 B
  53.         setDisplay(passwordId, 0);
    5 j3 T. a) G8 y. ^
  54.         setDisplay(textId, 1);
    ; k9 f0 ^* K1 E' H1 l
  55. g_flags[flag] = 1;4 d3 X1 j4 \& f# g4 B! m
  56.     }/ I# f' l& Z/ b
  57. }0 `- T6 P% Z2 y% K

  58. 6 ^+ x/ `: T6 p; `' e9 D# I
  59. function stWlan(domain,name,enable,ssid,BeaconType,BasicEncryptionModes,BasicAuthenticationMode,* D6 |) \& ]$ E. B0 q, o& H
  60.                 KeyIndex,EncryptionLevel,WPAEncryptionModes,WPAAuthenticationMode,IEEE11iEncryptionModes,IEEE11iAuthenticationMode,: ?. G# v" Q1 G" r  x& l. W' R0 c7 i8 C
  61.                 X_HW_WPAand11iEncryptionModes,X_HW_WPAand11iAuthenticationMode,RadiusServer,RadiusPort,RadiusKey,X_HW_ServiceEnable, LowerLayers,
    5 c4 n1 p% l- ]& e* e- L
  62. X_HW_WAPIEncryptionModes,X_HW_WAPIAuthenticationMode,X_HW_WAPIServer,X_HW_WAPIPort)# E; B4 t3 s3 a0 {' t7 a- p
  63. {
    * m4 Z& g2 q$ v" c: H3 d
  64.     this.domain = domain;
    . x& j9 `+ c% x! r' l1 ^+ b) r5 K
  65.     this.name = name;0 E7 V, Y) d) K$ R# i
  66.     this.enable = enable;& F5 B9 W& \& d9 A& c
  67.     this.ssid = ssid;
    4 p, s- ~! t8 s5 w* \. X( }) U
  68.     this.BeaconType = BeaconType;
    1 G% p4 S$ c$ M  O
  69.     this.BasicEncryptionModes = BasicEncryptionModes;* n3 Y) R& N0 \- I2 }2 p' a0 h; g
  70.     this.BasicAuthenticationMode = BasicAuthenticationMode;
    , F1 C  \+ a& F2 C/ Z$ p. T
  71.     this.KeyIndex = KeyIndex;6 a9 @" E, I; S3 G, ]2 Y: U
  72.     this.EncypBit = EncryptionLevel;% q; Q, m( ^2 y0 f4 [6 F8 {
  73.     this.WPAEncryptionModes = WPAEncryptionModes;- [, i, S4 Y0 m7 |+ \. u1 K/ ^
  74.     this.WPAAuthenticationMode = WPAAuthenticationMode;
    ! l! V: B; ^* J4 I( ]
  75.     this.IEEE11iEncryptionModes = IEEE11iEncryptionModes;
    1 [9 x3 Z- B( f
  76.     this.IEEE11iAuthenticationMode = IEEE11iAuthenticationMode;
    % Y: A  w8 c$ A! \3 c
  77.     this.X_HW_WPAand11iEncryptionModes = X_HW_WPAand11iEncryptionModes;0 V( B' U! a! V' z
  78.     this.X_HW_WPAand11iAuthenticationMode = X_HW_WPAand11iAuthenticationMode;' U9 l+ e* {6 d/ q) l0 n$ B8 v
  79.     this.RadiusServer = RadiusServer;
    # Z3 Y7 x& N( R9 M
  80.     this.RadiusPort = RadiusPort;1 z6 y, t6 Q- M
  81.     this.RadiusKey = RadiusKey;* [: M; E/ W, y4 X- O. ~
  82. this.X_HW_ServiceEnable = X_HW_ServiceEnable;6 ?& I3 z$ W6 {- l$ R8 q6 O
  83. this.LowerLayers = LowerLayers;
    ! J4 k/ q' F& }& s; F4 Z7 I1 ^
  84. this.X_HW_WAPIEncryptionModes = X_HW_WAPIEncryptionModes;  o$ t5 I9 J; B' J4 s9 y/ a7 x7 P
  85. this.X_HW_WAPIAuthenticationMode = X_HW_WAPIAuthenticationMode;+ H, X& ?7 x$ y" h- X0 \( k
  86. this.X_HW_WAPIServer = X_HW_WAPIServer;4 k7 _- I: r6 ]5 \$ a9 H9 t. O
  87. this.X_HW_WAPIPort = X_HW_WAPIPort;
      a- Y/ J! Q5 m4 U, ~8 S- }
  88. }0 h! k9 e9 A  ]; s: g
  89. . E$ H$ q. f: r! Z% G/ J

  90. 1 i$ A! `# {6 E: A/ s( J
  91. function stWEPKey(domain, value)
    1 G2 ]) L# k+ b9 Q7 O' x+ ~
  92. {
      K' r2 Y1 E7 E6 S/ A2 a. g
  93.     this.domain = domain;8 z+ g3 z) G" y5 h
  94.     this.value = value;
    ; o5 c/ E! M/ _5 m6 c) m& E1 `
  95. }
    , O; ^# p5 o5 t7 v7 a/ f, r
  96. " B- P. }& v3 J
  97. function stPreSharedKey(domain, value)
    ' u) @0 o, p" R  E
  98. {
    0 z! ~4 Z! U: r
  99.     this.domain = domain;
    * z. p+ J2 R6 ^) s% j" a% f
  100.     this.value = value;6 s" M0 A- H: ?
  101. }
    ( J; x0 p: \$ m

  102. ) Y4 y+ N3 Z. f, q+ Q3 a. H: D" N
  103. function stMaxWLAN(idx, lang)
    1 c, ^) `6 @. N: A- h3 _
  104. {
    9 r. N4 w/ c) C2 R& i: n: k, L2 V! R; L
  105.     this.MAX_ID = idx;
    9 |$ a9 M* Q  ^% z% H
  106.     this.MAX_ID_LANG = lang;0 u$ t9 {0 {* e, V* h
  107. }
      z# R7 \* a: @6 a
  108. 2 `& y# m, H' B" E9 `0 T
  109. function stIndexMapping(index,portIndex)
    5 Z* ^+ I* L2 h! P1 x
  110. {& ~# \& ^* U1 |7 d: H' ]8 T/ o
  111.     this.index = index;( w/ L  W+ `( s8 D. n
  112.     this.portIndex = portIndex;
    7 }5 E1 P" ?& M0 u+ i( p& Q$ k
  113. }
    . N7 q+ N/ w. l: n

  114. 9 a) I% s; e: G3 @1 N' [; B5 x
  115. function stWlanWifi(domain,name,enable,ssid,mode,channel,power,Country,AutoChannelEnable,channelWidth)
    9 S2 L: G, l. e- n$ l
  116. {
    ! C8 I" I; C! n/ X% E4 `
  117.     this.domain = domain;, ^& u# s' U5 I; b5 h
  118.     this.name = name;
    2 P0 \) u6 ^8 h9 X* n+ N
  119.     this.enable = enable;$ @( l, I' q' }
  120.     this.ssid = ssid;* e  {. P' v1 y& z( c; v
  121.     this.mode = mode;! ?* o7 O. {/ F+ H
  122.     this.channel = channel;( H) ]5 j* a5 D! T! F
  123.     this.power = power;
    2 j5 e7 h1 @3 q
  124.     this.RegulatoryDomain = Country;
    8 p: q, X4 N: C' G) f
  125.     this.AutoChannelEnable = AutoChannelEnable;# [! `5 @: n7 m" d' q
  126.     this.channelWidth = channelWidth;: c2 D8 ?' Y0 w/ P; }; j0 k
  127. }
    ( Y' W( L% o7 V+ w+ ^4 U
  128. * X& d( S6 V6 \" i

  129. , [, L" H% A6 f+ m/ W. w4 b
  130. var WlanWifiArr = new Array(new stWlanWifi("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1","ath0","1","CMCC\x2dSheenHome","11bgn","0","80","CN","1","1"),null);, D0 `/ M. w8 A
  131. var WlanWifi = WlanWifiArr[0];: x( G9 e4 M0 u$ l5 K5 U: B* y
  132. if (null == WlanWifi)
    - |% L- ~* ~- q% e$ t5 R2 F
  133. {
    ) @0 Q  ^8 r" v. c
  134. WlanWifi = new stWlanWifi("","","","","11n","","","","","");
    1 N7 f' u3 B5 O
  135. }& G7 e4 {) Q& Q8 W; \- b
  136. ! ^( _8 M$ M/ I
  137. var enbl = '1';
    , U1 |% G; Z) n  [0 l
  138. ) ?5 f. v1 a- r: Y' d1 X
  139. var Wlan = new Array();6 \3 Y- O' m& }$ A' c
  140. 0 f) ~3 d8 ~$ Y9 V  u0 d5 K
  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);
    4 w+ l0 k' t) M9 r' r
  142. 7 i) ~# J4 I$ n7 p* E
  143. var wlanArrLen = WlanArr.length - 1;; e9 X. E3 B, n+ M* ^' p2 p. L
  144. , G5 }% }6 Q; f
  145. for (i=0; i < wlanArrLen; i++)5 ~8 T, l* g1 z4 G% @: w# k
  146. {( ]4 N7 M* X# e
  147.     Wlan[i] = new stWlan();' H) ?# s$ M4 h6 T3 c) R. B
  148.     Wlan[i] = WlanArr[i];- _% m, i, `! ?, J, H( X0 p
  149. }' t0 x/ \2 ?% q! v8 P
  150. , N% b3 h! v, @9 g& M% _" m) _
  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);
    4 E* Q$ v5 V$ j$ p: G
  152. if (null != g_keys)
    & Q# |, w: t* ~  g8 \- T) ^& y
  153. {# \9 I6 K6 _7 O* |; N
  154. wep1password = g_keys[0];! T% G) I) R+ t& J5 T5 G7 m
  155. }: u- K( [' ^$ u) \
  156. 7 s( f# o: X9 V* K2 ?% Q! i
  157. var wpaPskKey = new Array(new stPreSharedKey("InternetGatewayDevice\x2eLANDevice\x2e1\x2eWLANConfiguration\x2e1\x2ePreSharedKey\x2e1","\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a"),null);
    ( a$ w7 r- X+ \' i& q" T+ S
  158. 0 E5 s' C) \8 T. S$ C
  159. var wlanMac = '78\x3a58\x3a60\x3aD4\x3aD3\x3a44';
    + p3 i' ~# \  d; O: s# l4 L7 x9 _

  160. 6 f6 e# A: j/ {6 ]* V" C% x* e2 G
  161. var ssidIdx = -1;
    ; u. ?# W" H6 a; Q$ F5 |1 i
  162. var ssidAccessAttr = 'Subscriber';
    + w+ n; q. P6 j! _/ I, R
  163. var AddFlag = true;
    . Z% `1 n/ Z7 u- i/ r
  164. var currentWlan = new stWlan();
    ( ~5 U" W" b# ^& M& x
  165. var maxSingleWLAN     = new stMaxWLAN(4,'four');/ K- B1 E8 I. ^) @
  166. var maxDoubleWLAN     = new stMaxWLAN(8,'eight');
    # I8 o3 K2 F" n" P
  167. " N  a& Z. \7 W
  168. function getWlanPortNumber(name)
    % j/ {0 w& O  |  r( _
  169. {9 Q3 A$ ?. V" |+ r5 I2 |" y7 k' C
  170.     var length = name.length;
    ' F# d) o, y/ [: l' K  @; B
  171.     var number;
    * `* n' z& y5 ^7 Z# d
  172.     var str = parseInt(name.charAt(length-1));& I! d& T) s4 D7 o6 s7 r
  173.     return str;" T% w! X! O) @7 t9 Q+ ]: U: A4 F- Z
  174. }  Y, W' }! k& b& d; B! ~
  175. & c- e/ P7 T$ `. L) }
  176. var uiFirstRecordFor5G = 0;
    6 O. Y/ N: P2 a) H: L9 b) g
  177. var RecordFor5G = 0;; c9 \" S3 G& f3 O4 c
  178. var flag5Ghide = 0;0 I$ @% c  b- P9 ]
  179. function FirstRecordFor5G()
    % c- `- \  l. B+ M5 w1 w4 N
  180. {0 A" L( ]9 N( s! p% s
  181. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))
    - _- Q' d! Z% h( s
  182. {
    ' l4 F  O) }& U
  183. for (var loop = 0; loop < WlanMap.length; loop++)$ |& s4 @1 @% C" A
  184. {$ G7 w0 ^" x8 [7 h$ I
  185. if (WlanMap[loop].portIndex > 3)
    ( _9 E  B1 U0 s- V- R+ A5 {" Q
  186. {
    1 C! |$ L2 F- @0 P
  187. uiFirstRecordFor5G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));1 L1 d0 V+ ]5 @; T
  188. WlanWifi = WlanWifiArr[uiFirstRecordFor5G];' d! S) J0 P: E5 n5 x- T8 W$ m/ R
  189. RecordFor5G = loop;
    0 j: \* j5 u  D; a
  190. break;* Y0 l. E+ }: w4 Z0 w& o( y) w
  191. }. R8 J; M& u1 @
  192. }
    ( A0 t/ W7 d3 f; Q
  193. }
    9 M' s2 R% M% I6 K
  194. }; z& V# G5 n4 g6 s+ N
  195.   z$ u& o" y! ^
  196. var uiFirstRecordFor2G = 0;4 B4 T- y6 T  W' m0 k
  197. var RecordFor2G = 0;
    , A+ g; E+ [! \8 O' I: }& i
  198. function FirstRecordFor2G()
    ' V0 F2 r3 o7 N- x$ ^/ J
  199. {9 N6 \  X9 _; E. m
  200. if ((1 == DoubleFreqFlag) && ("2G" == wlanpage))
    ! f1 R' o7 l# O0 [
  201. {$ T! N9 X7 t6 R9 R
  202. for (var loop = 0; loop < WlanMap.length; loop++)
    9 @- w# h- Q$ x$ h6 W/ x
  203. {1 D9 x" T. D; U7 [, m
  204. if (WlanMap[loop].portIndex < 4)$ v" [% d7 \6 k. \" o; _* u
  205. {
    6 e& U+ H4 K& }4 i# `1 ]& i( w
  206. uiFirstRecordFor2G = parseInt(getIndexFromPort(WlanMap[loop].portIndex));
    9 h1 T8 Q( l) x" s, f
  207. WlanWifi = WlanWifiArr[uiFirstRecordFor2G];$ \: ?$ t! Y" {: t8 W7 M
  208. RecordFor2G = loop;
    - |9 {- m0 j# A; R3 M2 ?/ I
  209. break;
    - S7 [9 X; T0 i1 u8 F
  210. }
    # D/ F! ]9 j! t/ Y  E
  211. }. p4 `3 X* G2 _* a% H
  212. }
    % K& o' v) y. ^( v6 r
  213. }, @2 p' R1 L' H; m, }

  214. 4 i3 a+ P7 T% F( |' J1 j* C
  215. var uiTotal2gNum = 0;
    + C" m( @& W! K! T( X1 d' u
  216. var uiTotal5gNum = 0;. `7 K3 T2 r$ O/ G5 l# |: B
  217. var uiTotalNum = 0;7 s" |; _' |8 j5 C2 h$ ~
  218. function Total2gNum()
    3 O. ]4 t* Z  f9 ~( f1 a  y
  219. {1 b7 g: a+ H8 u! n2 J
  220. uiTotal2gNum = 0;  Q; \4 g" ]$ r, D: k* |, l) o
  221. uiTotal5gNum = 0;
    ! _- y* R. Z% U  }% w6 g& L: H
  222. uiTotalNum = Wlan.length;
    # ], k- Q6 v' |" l4 P( n/ V0 j
  223. 4 u/ J& G, j+ h& L- n) b
  224. for (var loop = 0; loop < Wlan.length; loop++)
    - a2 K4 \3 W* I- W7 C
  225. {$ K! M7 s' v$ ~
  226. if ('' == Wlan[loop].name)
    " }" @: U! ^" |7 r9 i) l
  227. {
    2 E/ `0 r3 f  Y/ i" E# g# j# M
  228. continue;
    8 y5 z- u# F- u4 z8 @( y
  229. }
    ' d6 q6 ^2 E/ D* P# C
  230. # o7 ^! _& o/ v4 k
  231. if (getWlanPortNumber(Wlan[loop].name) > 3)
    5 i& t. m- t; c6 Y' c
  232. {7 b5 Q/ I% t* b/ A. O& f1 F
  233. uiTotal5gNum++;5 s% g7 w# O! A  O; `  D" J
  234. }& [" E7 f+ t7 I! D. O9 }- O
  235. else
    4 x0 j/ s7 b: |! c1 E- [
  236. {8 W, s4 f. n$ {2 M* r% ^0 ~
  237. uiTotal2gNum++;
    " b$ H7 M" B& n3 |% V8 ?4 M* u9 p
  238. }
    9 x/ L- `; K7 M
  239. }
    6 e7 z5 |4 _6 n3 [5 N+ a( i1 Y3 G
  240. }" w7 `- R* |- p4 A- ?0 o' a$ m7 Z9 l
  241. var ShowISPSsidFlag = '0';
      C0 @: l5 r0 Z6 f2 h" a# n
  242. & t/ T) k9 a" [/ ~/ O  E
  243. var WlanMap = new Array();
    , X! K7 ^7 E/ z; F* @. V
  244. var j = 0;
    ! g, }; v, j6 c+ n
  245. for (var i = 0; i < Wlan.length; i++)4 h! l/ Q; `7 r
  246. {
    7 ]7 _! c/ o9 P
  247.     var index = getWlanPortNumber(Wlan[i].name);
    : f; A! r& S4 x0 o4 b# T9 |
  248.     var wlanInst = getWlanInstFromDomain(Wlan[i].domain);3 q- M* @, W" K* p% M' Z! n: |, D
  249. ( o3 R" F  M, G) [' b+ [" ~
  250.     if ((isSsidForIsp(wlanInst) == 1) && (1 != ShowISPSsidFlag)): l8 o0 A4 j- E0 R8 I0 L
  251.     {
    $ f7 J! o6 _9 Y: H7 \
  252.      continue;4 Y- G; {0 f  q0 ?4 B4 Z1 N4 R
  253.     }
    1 J0 p% G& t3 g/ _: V6 E. q
  254.     else
    + P$ ?/ W6 Q. Y% K2 z+ w# u+ c
  255.     {7 m; s, M0 S& [: H& G8 t/ H/ y
  256.    WlanMap[j] = new stIndexMapping(i,index);
    1 j" {; S) J6 T1 W0 E7 a
  257.    j++;
    - H  |2 e0 u% K$ {4 k+ z1 q0 V, k
  258.     }
    & b: m- C2 q1 Z9 K+ M
  259. }
    + b( a: P5 B& R3 B
  260. ; t. N/ q, [8 |+ i1 q* Z0 @
  261. if (WlanMap.length >= 2)
    6 n* z, F0 r1 h
  262. {5 F% P( s7 J6 ~
  263.     for (var i = 0; i < WlanMap.length-1; i++)! W8 q5 W5 Q( ]6 n' E% N: |$ y& y
  264.     {/ L, a& T8 P# n% |8 R( d5 S4 l
  265.         for( var j =0; j < WlanMap.length-i-1; j++)
      O) h, Q9 T! \) Y# ~, P* @
  266.         {
    9 e6 w- @+ @! Z8 x$ c* I
  267.             if (WlanMap[j+1].portIndex < WlanMap[j].portIndex)
    ( S( x; [3 F) G2 s( y
  268.             {" |- f, D: X5 m. X% U* J
  269.                 var middle = WlanMap[j+1];
    & c! ^4 R+ d! B
  270.                 WlanMap[j+1] = WlanMap[j];
    . U; Q& r1 W+ N, a/ s( z1 \
  271.                 WlanMap[j] = middle;
    : }4 K) J7 [7 D
  272.             }
    4 I; ^' k( q7 S! c' M$ K; M; N2 S8 h
  273.         }
    ! B9 \2 R  r- u3 V
  274.     }; N5 x8 X( G0 M- c+ b: H6 n) C; w
  275. }
    . T5 Q  Y+ O! h* [

  276. 2 A  b/ u6 K  f2 r
  277. function getIndexFromPort(index)+ |3 I; Z9 q" F; A  k* u) B
  278. {( G' o! _) r# M" d! I% r" [1 B
  279.     for (var i = 0; i < WlanMap.length; i++)  Z8 ^5 ~) z* W" y( I/ b, ^
  280.     {
    ) \# c. N: e3 R2 `* P" ?
  281.         if (index == WlanMap[i].portIndex)
    ( r; @. m4 X" L1 g7 H8 X1 k
  282.         {5 _% R# Y' @! Y- W3 ^9 [
  283.             return WlanMap[i].index;6 h  }: o7 T( ?- R* `
  284.         }4 c* |4 f8 N9 T( y5 r7 x4 z
  285.     }1 [, {0 m2 v/ d3 z( e# n0 H9 T. _
  286. }6 e' D* o5 I9 J0 D) o% Q8 l5 ?7 J$ l
  287. 5 {& {) D7 y% E8 h
  288. function getPortFromIndex(index)
    " n0 [- Z# x) N  E0 }& ?  t8 ]
  289. {& ]5 h4 F* r4 C, m) H, O$ e
  290.     for (var i = 0; i < WlanMap.length; i++), d$ }+ ?2 ]) i4 \8 A
  291.     {
    ( V, L  I) v0 J$ `' ?
  292.         if (index == WlanMap[i].index)+ p9 t0 G# y2 L; C# v* o
  293.         {1 N! d; L# ], c! a0 R5 D' }. l( U
  294.             return WlanMap[i].portIndex;$ T/ m- {$ X) q. d) v. |8 L7 W' I9 g
  295.         }
    . k7 ^7 A% R" ?9 H3 y8 c" z, i
  296.     }
    % W" p3 B- I# S- X8 R& u
  297. } . x# _$ v5 q( Z( q9 l

  298. 1 O; V( p( s/ Q
  299. function getEncryLevel(encrylevel)8 B, {9 |3 K2 L8 z0 s3 a, ]
  300. {
    / M9 G8 L: a& d$ l( h( E* r
  301.     var level = '';& o% {( D4 P# Q2 n" t
  302.     for (var i = 0; i < encrylevel.length; i++)8 J9 y: S, `3 r* Z
  303.     {
    , ?$ z7 ~" G  z
  304.         if (encrylevel.charAt(i) != '-')
    3 R( N- |; O2 l/ Z1 Y4 U
  305.         {( D$ H" C9 _4 k9 D5 {* Q4 t
  306.             level += encrylevel.charAt(i);
    ( G4 x$ A. Y5 `3 h, H
  307.         }3 d4 Y7 O: R9 C, ^$ L1 s
  308.         else0 L8 G" [& M8 j' R5 w- j* H
  309.         {
    * ?# f6 n  B* I  n! }
  310.             break;3 Z& z& `, E5 ]: R2 V- c
  311.         }. m4 E  W- d. [
  312.     }5 F% H" n$ V+ Z' g: t/ P/ x. N
  313.     return level;
    + T% `+ y2 |. W# N, k
  314. }
    1 e  I2 f& Y  }, S; C$ I3 l0 F

  315. 3 V1 K( V8 g' g% d
  316. var auth_none = "NONE";
    - c. @7 C# i: |7 L
  317. var auth_wep = "WEP";  W- c: m  M, ?8 A/ y" _
  318. var auth_wpa_psk = "WPA-PSK";
    4 x' W$ D1 x* @$ x; H; v( q
  319. var auth_wpa2_psk = "WPA2-PSK";
    ! {7 |, C0 u! h
  320. var auth_wpawpa2_psk = "WPA-PSK/WPA2-PSK";. q8 b7 k3 d, d3 H; X
  321. var auth_wpa = cfg_wlancfgdetail_language['amp_auth_wpa'];
    ' v  n9 }1 f% X
  322. var auth_wpa2 = cfg_wlancfgdetail_language['amp_auth_wpa2'];
    $ O7 R. s" o1 q
  323. var auth_wpawpa2 = cfg_wlancfgdetail_language['amp_auth_wpawpa2'];
    ) \0 G% u$ {. T% l

  324. : H& e4 s' z) N9 Z& b9 v
  325. var encrypt_none = "NONE";
    % d- d' B+ l2 }9 X
  326. var encrypt_open = "OPEN";
    7 S6 a9 t0 {. G6 _5 \0 o
  327. var encrypt_share = "SHARE";% o7 x+ r% G1 O1 l& s+ @, L  H
  328. var encrypt_both = "OPEN+SHARE";5 p: w. l$ |1 F+ v  J# H7 t- T9 \( Q
  329. var encrypt_tkip = "TKIP";
    7 Z3 n3 I% s6 B% S. m8 w
  330. var encrypt_aes = "AES";$ A3 `+ P& e! J6 _5 J- E" C
  331. var encrypt_tkipaes = "TKIP+AES";1 a$ s6 X9 X$ V2 M
  332. 0 R# G1 I1 h$ @: T7 z" m* B
  333. function addAuthModeOption(); P* Z% O/ P! h4 R. G2 f
  334. {0 x$ t( C7 {, E. J9 }6 ]
  335.     var len = document.forms[0].WlanAuthMode_select.options.length;   
    + y3 E) a) Y( u' ]- _. l9 C
  336.     var authMode = getSelectVal('WlanAuthMode_select');
    2 t* E: x# `: F- Y  S
  337.     var mode = WlanWifi.mode; , j# c# m  Y' ^
  338.    
    ( g6 G; ?6 Z4 P" @* }6 M9 G1 X
  339.     for (i = 0; i < len; i++)
    ! A2 Z( Q  S: f# e+ S
  340.     {
    + N, G% v$ ?( ^2 L! r  x! l# p& g
  341.         document.forms[0].WlanAuthMode_select.remove(0);
    ) _& u/ J0 _, J# g" e  `
  342.     }
    4 Z7 o. d3 G0 t' U
  343. ( d" `% V5 F8 M' ^: `
  344.     if (mode == "11n")8 R9 k4 B+ {% H) @8 E- A2 a' V
  345.     {% C; a9 S8 F8 v7 C' n
  346. document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");
    5 I; T, ^: ~" J( @9 _6 s
  347. document.forms[0].WlanAuthMode_select[1] = new Option(auth_wpa_psk, "wpa-psk");
    " `/ y5 |" t  V* K' @
  348. document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa2_psk, "wpa2-psk");
    ! S8 t% Y  ?' m( i
  349. document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");
    3 @# U4 D4 F' w7 L" C
  350. document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpa, "wpa");
    ' j) T  D: K$ e
  351. document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa2, "wpa2");
    # J3 b7 Q2 q: T3 D( j* R# l
  352. document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpawpa2, "wpa/wpa2");
    - f0 F' m% t! ^9 w( j+ v
  353.     }
    - x1 d% y7 u$ V7 K" i& A
  354.     else
    # _" l" V4 J6 I( G; o
  355.     {
    ( Q7 g- W+ L8 k. ^% O# S6 j
  356. document.forms[0].WlanAuthMode_select[0] = new Option(auth_none, "open");
    % r5 z3 o& D: A
  357.         document.forms[0].WlanAuthMode_select[1] = new Option(auth_wep, "shared");$ d% ]1 S- L: z2 d
  358. document.forms[0].WlanAuthMode_select[2] = new Option(auth_wpa_psk, "wpa-psk");
    * H/ y3 `  W$ W6 I
  359. document.forms[0].WlanAuthMode_select[3] = new Option(auth_wpa2_psk, "wpa2-psk");
    ' P$ Q: H. ~  H; R- C
  360. document.forms[0].WlanAuthMode_select[4] = new Option(auth_wpawpa2_psk, "wpa/wpa2-psk");
    3 i6 i/ J0 G" _9 O. t
  361. document.forms[0].WlanAuthMode_select[5] = new Option(auth_wpa, "wpa");; X" B" _* D  F" L: Q( o7 |" F4 T5 S
  362. document.forms[0].WlanAuthMode_select[6] = new Option(auth_wpa2, "wpa2");2 a( k( a! Y& o% Q5 K" S3 ]$ P1 D
  363. document.forms[0].WlanAuthMode_select[7] = new Option(auth_wpawpa2, "wpa/wpa2");
    ' d* C! F# {) f8 a' Z. \( m
  364. if(1 == WapiFlag)& b2 X6 |; X0 m7 i4 _* e! i# q4 v
  365. {
    ; z* X8 X& s' P6 D
  366. document.forms[0].WlanAuthMode_select[8] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi_psk'], "wapi-psk");8 E6 ~1 S: B. `1 G" ?/ ~/ Z" V  U
  367. document.forms[0].WlanAuthMode_select[9] = new Option(cfg_wlancfgdetail_language['amp_auth_wapi'], "wapi");
    1 L' _  |8 w% u+ _' ^, P
  368. }
      A8 }- l# l1 ?- F$ x1 _) E2 P
  369.     }
    ( Q9 j7 R; @$ }0 y6 H* q
  370.     . l5 A( X* j/ z7 y
  371.     setSelect('WlanAuthMode_select',authMode);
    ! J& M3 A- Y$ M
  372. }$ P5 l+ D8 K4 P6 o7 j+ L

  373. 7 `' B$ u, i0 ]) P! U. e4 X6 f
  374. function addWapiEncryMethodOption()
    ! K) x0 \# r& O7 w8 l
  375. {
    . g& G' t3 v5 X" k7 k1 s, L
  376. var len = document.forms[0].WlanPwdMode_select.options.length;
    7 h9 |2 @/ l; L) _
  377. for (i = 0; i < len; i++)
    / T4 h, J. h. e
  378.     {
    / K* r1 ~# V0 `4 R9 _$ W6 m
  379.         document.forms[0].WlanPwdMode_select.remove(0);
    + N8 m% V3 K0 U
  380.     }
    4 @7 x& P; _3 z* }; `8 _
  381. document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_sms4'], "SMS4");
    : i/ i' ~! ^* |3 T! d

  382. 9 t' Y* v2 R# M
  383. }
    / P$ X5 e# i, W( r$ A* k8 ^

  384. . `* X( b; {, ^# T( r+ q
  385. function addEncryMethodOption(type1,type2)
    . N* j4 I! D# h% F. l
  386. {
    6 b8 _& W% c/ g4 D( n
  387.     var len = document.forms[0].WlanPwdMode_select.options.length;7 M0 B+ b% o4 ?: b' ^1 b
  388.     var mode = WlanWifi.mode;
    * b8 c+ d. K: w) [5 V8 W" h
  389.    
    # _+ \$ `/ Y7 n2 Y* V. ^4 R
  390.     for (i = 0; i < len; i++)
    9 {; r8 b  Q2 c# _
  391.     {( `! l5 n* F. M8 B$ E4 n4 @- e4 g
  392.         document.forms[0].WlanPwdMode_select.remove(0);
    : k  W4 l1 r  S* t7 A7 `( z2 p( u9 ^
  393.     }
    / T( d- ]8 F: C

  394. ) a6 [* J- A& c8 O6 Y+ R' X, }
  395.     if ((type1 == 0) && (type2 == 0))" C9 A) G9 U8 f' @
  396.     {
    ; ^2 T2 N8 U7 p2 Z9 _% O8 E/ {2 Z8 i
  397.     }4 }  K" Z  y3 o4 \3 z7 y7 \
  398.     else if ((type1 == 0) && (type2 == 1))
    1 @1 K% S; }. l& Z3 h
  399.     {2 d; @, N. Z; |4 K5 f8 z8 L- \& s
  400.     }
    ' y$ F% C: [4 b8 b: l2 i9 j; B
  401.     else' D6 ^* Q, [+ f
  402.     {
    # p2 k) L: {7 L- a
  403.         if (mode == "11n")
    ) n/ O1 o; a' \5 w& ]
  404.         {) i2 P- Y8 e! y/ q
  405.             document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");   
    % N5 {" C: f: k: z, d* B- y
  406.         }9 E' j& _. f3 L& _* ?
  407.         else
    " g0 L; R/ q0 S$ k
  408.         {
    $ f7 _/ ?- t5 F% |$ A" H# T: ^
  409. document.forms[0].WlanPwdMode_select[0] = new Option(cfg_wlancfgdetail_language['amp_encrypt_aes'], "AESEncryption");( |: x" i/ W9 x& z
  410. document.forms[0].WlanPwdMode_select[1] = new Option(cfg_wlancfgdetail_language['amp_encrypt_tkip'], "TKIPEncryption");
    & H* \+ w$ S! V) G; n
  411. document.forms[0].WlanPwdMode_select[2] = new Option(encrypt_tkipaes, "TKIPandAESEncryption");
    8 `6 B, w6 ^1 M* N. ?! I
  412.         }. f. u' w1 p) B4 a6 X1 n1 I
  413.     }
      M2 L% ?2 q8 r) e2 x" q6 z
  414. }9 q4 K4 P+ E) K# [" f

  415. ( X; _* e( u% t( Z2 H+ x
  416. function GetWepEncrypt(BasicAuthenticationMode)
    * C# _% _. M0 L1 }( V
  417. {
    1 o  A4 Z% A$ U
  418. if ((BasicAuthenticationMode == 'None') ||(BasicAuthenticationMode == 'OpenSystem'))8 S/ K. S- V- |2 e! q8 f
  419. {4 t$ Q$ I5 a6 v5 _2 }+ \4 @- R( M
  420. return 'OpenSystem';2 G& i0 w' Z0 g' Z5 U% l9 F
  421. }* p/ M) h' L6 U) Y5 r! j
  422. else if ((BasicAuthenticationMode == 'SharedAuthentication') ||(BasicAuthenticationMode == 'SharedKey'))
    9 K+ c) A1 \  F# v( t
  423. {
    ( f9 J5 C7 A; n( i4 N3 A
  424. return 'SharedKey';. I- c5 B$ E4 U
  425. }% K  `* |$ Z% Q3 o
  426. else
    . M6 C- G2 Z. Q* R6 e  }
  427. {
    8 b- Y3 e) X, i. x/ w
  428. return 'Both';) j0 n; ]8 i) o" b0 s. C& P
  429. }& m5 J0 f/ x# y! W9 {" }
  430. }
    7 H! Z: {; C8 ?: j

  431. ! M0 p9 s5 T) d" `1 X7 c
  432. function ClearPsdModFlag()3 b" @+ H; V. ~1 |/ P, U
  433. {
    ; k' V0 r( J- \! D* c2 R
  434.     wep1PsdModFlag = false;
    - M; e1 _' M  c) `
  435.     pskPsdModFlag = false;
    . F3 q; z* h% \0 P3 L9 j* a
  436.     radPsdModFlag = false;5 j) b! J, }* J8 ^4 V' e
  437. }2 i7 E' u- n% f" R3 Z

  438. $ x( i/ c) N+ p# F# C( R( |
  439. function authModeChange()
    7 \# [( I# t. K$ k6 J  z/ e( A6 p
  440. {   * M; o9 l" M# W" E2 H
  441. ClearPsdModFlag();( @$ K$ f5 r1 t% R4 ~3 |  R' c
  442. & e9 L# g. Y& t$ k* J5 u* p0 Q
  443.     setDisplay("wlEncryMethod",0);. d3 S5 W% @; C7 {$ N* q1 A0 K4 y
  444. setDisplay("wlEncryWep",0);
    ; v! u. y+ O, F1 n1 V. H8 Y  c
  445.     setDisplay("keyInfo", 0);1 K6 X; R  k/ b3 e8 ^. b) c1 T
  446.     setDisplay("wlRadius", 0);
    1 ?  w' {. O  T6 b% T
  447.     setDisplay("wpaPreShareKey", 0);
    9 G; W% R% h' r; \0 {& M+ p
  448.     setDisable("WlanPwdMode_select",0);
    . F# D; ]8 k. ~  g
  449. setDisplay('wlWapi',0);5 h3 n7 n: Y! f6 I* ?  W" s
  450. 3 H9 q, F8 N  {$ B  }
  451.     var authMode = getSelectVal('WlanAuthMode_select');      . [. h! ~% V5 l. d% h6 f( _

  452. ; w1 O# C* b  g
  453.     switch (authMode)
    ! N$ k; _/ M+ z! n. V+ Q7 I
  454.     {  `% P! J4 T; e4 o
  455.         case 'open':
    8 d  g. p( l" e* C3 F2 L% [; V0 i
  456.             break;& T  ?* U9 s% W% g9 G
  457. 2 c/ ?5 z9 l5 A7 z- B5 d3 ~
  458.         case 'shared':
    8 r+ Q1 g9 x2 B; U8 H
  459.             var level = getEncryLevel(Wlan[ssidIdx].EncypBit);1 o# `1 M6 z) [! x4 G  I( J  W
  460.             var mode = WlanWifi.mode;              ' }% Q4 }3 z; u: v' n  `
  461.             
    # j! e; y! j! a- _
  462.             if (mode == "11n")
    / S7 h, n# O$ ^6 e3 U
  463.             {
    " s+ P1 C' q5 p; F
  464.             }
    1 p; c: H& U! I+ @' h4 G2 A5 w
  465.             else7 U" H8 Q% v; N  |4 N, b  h
  466.             {: D( x2 w% \4 V( u) D
  467. setDisplay("wlEncryWep",1);
    - [3 ]7 E9 W1 E& G$ {2 y
  468.                 setDisplay('keyInfo', 1);
    . N' r  `0 J' Z4 @0 _
  469.                 if (AddFlag == false)( P( g! Y- X; t5 Q6 P5 [
  470.                 {
    $ f, y: p. h# ~3 x4 [3 L5 ]9 H
  471. setSelect('WlanWepPwd_select', GetWepEncrypt(Wlan[ssidIdx].BasicAuthenticationMode));+ \5 q6 C6 s0 o
  472.                     setSelect('WlanKeyBit_select', parseInt(level)+24);/ H( m4 t0 M1 d2 y- C# C
  473.                     setText('wlKeys1',g_keys[ssidIdx * 4].value);
    4 {7 @( F- V8 V: R# p- ]" N0 g# y
  474.                     wep1password = g_keys[ssidIdx * 4].value; 5 U5 b. x+ z$ ?' J5 o: b5 U
  475.                     setText('twlKeys1',g_keys[ssidIdx * 4].value);$ q5 E  H5 s- i3 E$ y+ Y- t
  476.                 }
    ) i, R, g3 a/ }' Y% w9 G
  477.                 else1 Y- a& ?) m, Q5 x! c
  478.                 {# Z4 ?- k& e" k1 b! s/ L
  479. setSelect('WlanWepPwd_select', 'Both');
    + s0 u9 `) L. M$ j! l" k) l1 P
  480.                     setSelect('WlanKeyBit_select', 128);
      ~1 ]- z: e# R1 Q1 |: w; e
  481.                     setText('wlKeys1','');  h) ~" o5 K9 L1 e
  482.                     wep1password = ''; setText('twlKeys1','');9 s- [6 A$ d* V
  483.                 }
    - b9 K3 Z+ I) `* A/ D! t# p  h2 F
  484.             }      0 l7 Q0 ^2 y1 k8 Y6 |" Z
  485.             break;
    1 V, V' L$ W5 r/ v- i2 e" M) s8 G
  486. 3 A1 r1 `1 x9 B* Z# ^" A
  487.         case 'wpa':2 B- B/ Y% R& `; L' q1 a
  488.         case 'wpa2':* W8 ]9 K) m' C" T1 g4 Z$ x
  489.     case 'wpa/wpa2':
    3 T  y% M3 G$ T3 d* G
  490. setDisplay('wlEncryMethod',1);: l7 P. u) U  \! O
  491. addEncryMethodOption(1,0);
    % o# M" C9 }8 l1 c/ u7 B
  492.             setDisplay('wlRadius', 1);* ?1 t6 w( _" n% S/ _% N
  493.             if (AddFlag == false)
    5 }% E) q  Z( a
  494.             {
    * k* R4 a7 Y: y+ Z! M: H; C" I
  495.                 if (authMode == 'wpa')1 }7 [' R( j5 u( k( R0 t
  496.                 {
    ) W0 I/ v6 x  y& g
  497.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);# f# q: \. m- |9 O' v7 \* j
  498.                 }
    * W7 l( r! [2 a* _' V" R' Y
  499.                 else if (authMode == 'wpa2')
    % T3 I/ n. U8 r6 Q* \4 `: k
  500.                 {
    % o$ o' Z) Q9 t' S
  501.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);
      u8 A8 p) s( M+ U5 h
  502.                 }; r- f6 d& E+ y$ w/ p0 M  q
  503. else) y- H' B8 s/ M0 j. G
  504. {
    & \% H8 S% j- P5 n
  505.     setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);
    ) R; D& n$ |# h% g' J
  506. }2 D3 c! I7 H3 B1 `
  507.                 setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    + I! `* ?4 v% q! M6 R/ ^# {
  508.                 setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);% w& g0 T7 X' k2 y9 y( b8 f& K
  509.                 setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);. f9 F1 K. w0 Y3 I/ n9 ?3 E" k& r
  510. radiuspassword = Wlan[ssidIdx].RadiusKey; & ?; u# _6 j2 t/ _* C; m2 B
  511. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);
    ' z/ ?( P+ p) s
  512.             }4 S' e* B' E) V) _9 r0 c  n
  513.             else
    ' h4 u& B6 q5 V2 C7 j; i+ T! @
  514.             {0 N+ R+ ^) M2 I2 e& `- X- f
  515.                 setText('wlRadiusIPAddr','');/ M2 x9 B; Q( L% V& A& S. T
  516.                 setText('wlRadiusPort','');
    8 j; d4 b$ }3 p
  517.                 setText('wlRadiusKey','');
      Q) g5 Y, C9 U: O
  518. radiuspassword = '';
    4 q: N$ J$ T3 x: H
  519. setText('twlRadiusKey','');- G. n2 \& y7 b, H; D9 k5 v$ R
  520.             }$ m  ^. ]0 T% H
  521.             break;7 q8 m! H$ d7 F0 a4 g' }  @
  522. . |! A" V8 F- ~7 b- K
  523.         case 'wpa-psk':6 B0 @; d/ D' F( {
  524.         case 'wpa2-psk':7 n( ~! |7 I! Z- J5 P" X0 b
  525.     case 'wpa/wpa2-psk':5 Q/ @, V& d& K/ ^' p6 N
  526. setDisplay('wlEncryMethod',1);
    5 c1 m. A. c( r* [3 L& m2 l1 H% S
  527. addEncryMethodOption(1,0);, i- s; s3 }0 L+ N& n: U
  528. , a$ _& B% s8 w# I
  529.             setDisplay('wpaPreShareKey', 1);7 k8 w; P5 k; N: w/ C/ R0 V
  530.             if (AddFlag == false)
    " F/ d7 p# F7 ?3 ]$ J4 G0 j
  531.             {
    ' ~* ^+ g2 f# Y- a. v* d
  532.                 if (authMode == 'wpa-psk')9 N9 \# {) Y. B# Q5 M
  533.                 {
    . E" I  ]; V3 k: v2 o( D
  534.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);
    0 r' D. A6 S+ p3 B4 {0 s: @5 O
  535.                 }$ m$ W  o: L! t! g+ R$ g
  536. else if (authMode == 'wpa2-psk')) `$ n  T2 Y' P, c
  537.                 {
    ) W  `2 U8 }% E
  538.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);" x; C! T8 R" R7 O- I1 S1 E0 J
  539.                 }0 K1 W# k. ^) r( f- Y) c/ J/ ]) o
  540.                 else
    : ~7 V( Y" w. m1 G9 z% f& S- Z2 `
  541.                 {
      y! |) C5 Y6 f( [
  542.                     setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);7 @# O- K: K) I& }4 k% `! u9 o, a
  543.                 }  c3 |5 Y7 T( @" }  e8 N
  544.                 setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    ) B, ?* a8 t, |7 @- B$ z% D
  545. wpapskpassword = wpaPskKey[ssidIdx].value;
    8 W$ J  k9 F7 k& j$ T2 f& g4 L
  546. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    0 C# ]) E2 X% d4 ?$ Z
  547.             }
    6 t9 V# E* y- U* U: B0 j* s
  548.             else- a" c9 b& s2 \" W3 c) i# [
  549.             {7 ?  P2 X* p6 q, C! q
  550.                 setText('WlanPassword_password','');
    , [  M( X* ~' S8 X" Q
  551. wpapskpassword = '';3 r. a% O3 r% {* h
  552. setText('tWlanPassword_password','');( _0 i: r* ~2 w; _- `
  553.             }! }; W7 P, {7 l3 d0 e
  554.             break;9 _) @1 t2 I% n
  555. case 'wapi-psk':9 l9 o4 n/ h0 i5 e. G
  556. setDisplay('wlEncryMethod',1);            
    : J8 g- f0 t7 n/ ~' Z
  557.             addWapiEncryMethodOption();  
      C% h/ E6 b9 l3 M" L
  558. document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
    $ G; Z8 \2 W5 b* U2 S
  559. setDisable('WlanPwdMode_select',1);
    ! `% {1 J* V& d+ C3 x- ?
  560. setDisplay("wpaPreShareKey", 1);+ x. }8 I% c* V" z* }+ U+ D
  561. setText('WlanPassword_password',wpaPskKey[ssidIdx].value);8 ]( y% C# \7 l( a  P
  562. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);7 `( ?; }9 z  ?! d$ _+ u, V
  563. wpapskpassword = wpaPskKey[ssidIdx].value;
    . N5 k+ O7 @, z" Q9 w0 K- a, N
  564. if(AddFlag == false)- B# U& ?# q6 L' Q
  565. {" O: G2 ?0 }0 ?6 C# k- ], F
  566. 9 y0 [2 a) p% ~' x" Z
  567. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);
    ' h  ]7 ~# T" ~
  568. }
    6 k+ ^$ A' G6 A, ^; u7 t: A9 [) `
  569. break;0 t4 O( m& n+ m. T1 O6 E6 P6 e
  570. case 'wapi':
    , h/ J" k: b! I5 k% }) V+ I' A$ {
  571. setDisplay('wlEncryMethod',1);            
    + B2 X( m2 T) L/ c; y' ~
  572.             addWapiEncryMethodOption();  
    % W4 y! \: z; W8 {3 ]1 R5 V
  573. setDisable('WlanPwdMode_select',1);: x/ i9 A- e* h; K
  574. setDisplay('wlWapi',1); 5 T3 e: K# [5 x1 Y7 a' ?( h1 l; X
  575. setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
    5 G, w; j+ L$ ]" U2 Z
  576. setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
    1 p2 w& `5 H+ s/ ~$ ]
  577. if(AddFlag == false)
    + Y( O2 F+ k3 b: ]9 ]1 R" P2 C6 h2 ~
  578. {* B/ j0 {) P8 p
  579. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);
    % I$ G# ]. |- [2 X% s
  580. }9 O6 Z4 [2 }1 Z$ s0 ?, d! |1 W/ u
  581. break;/ y; f! L& H+ k0 u. W5 k! T3 X0 w
  582.         default:
    ; @5 |: J! s; H
  583.             break;
      E5 n; N9 z5 V# }5 C3 t6 A" ~9 e
  584.     }
    1 b( l2 t0 ~8 k: I0 M
  585. } ; @0 V) D) m3 `0 c5 N6 ]
  586. . h* ]; a% h) j0 e7 `9 W
  587. function isValidKey(val, size)
    1 ^2 f6 t, ?% h/ f
  588. {
    ; }' p6 _: v* t. Z
  589.     var ret = false;+ o4 V/ ?8 u. I, H; a
  590.     var len = val.length;7 ]2 W/ c. r" z* d' x
  591.     var dbSize = size * 2;
    % @: I! d; x5 n7 c% Z/ \0 \  y
  592. % I6 J) H( k7 I. R2 @
  593.      
    , l+ L. Z9 P. ?
  594.       if (isValidAscii(val) != '')
    # N9 G: R) d) S' q
  595.      {
    * Y$ H7 y; P$ f/ ?  X9 f! f
  596.         return false;
    , K; a# d* z& X, h4 `. Z& o7 Y4 t
  597.      }0 o. g4 \# |% m; q0 ~
  598. 4 m* H1 m2 V( j9 V! U
  599.     if ( len == size )( ]2 U1 k  b" j+ x, s* B7 g( t/ V
  600.        ret = true;
    , u0 Q  I2 O' |/ g- U
  601.     else if ( len == dbSize )
    & M3 b( W, l9 B1 U+ [8 w: C! d
  602.     {5 x! H. R  f4 l9 ^' }( P( L
  603.        for ( i = 0; i < dbSize; i++ )
    ) N6 r; t5 z# c/ E+ u( y
  604.           if ( isHexaDigit(val.charAt(i)) == false )4 r# T/ j( g$ L; I3 i% d
  605.              break;$ ?$ ~  a, Q) M+ k5 P
  606.        if ( i == dbSize )
    : k  Q2 M1 f: f7 {. ^6 s
  607.           ret = true;0 t4 {, \# k. E" n  [& I
  608.     }  l9 k2 k1 p& L3 o1 |' I% I
  609.     else  |& B2 ~2 V' x4 u9 f( w0 k7 l
  610.       ret = false;
    ) V5 x% a' S6 l* k8 Q" }

  611. 5 K! I* O( C3 w; E2 ~
  612.    return ret;
    % n) e: }( N1 O- Z
  613. }
    ' Z5 y9 T; `9 }3 T/ T( \9 _

  614. $ c0 @1 ]9 S1 u; C4 S
  615. function displaywepkey()+ D, m) {: e; j
  616. {   + V) d! G6 G3 Z2 F2 k
  617.     if (AddFlag == false)$ |0 ~* `' e* Q9 u3 e. @* c: Q0 _
  618.     {2 u3 M; h4 s, R7 t+ R4 C8 B
  619.         setText('wlKeys1',g_keys[ssidIdx * 4].value);, {, [5 A- V! H
  620. wep1password = g_keys[ssidIdx * 4].value;
    ! w6 q2 l2 v! @5 w& d; n
  621. setText('twlKeys1',g_keys[ssidIdx * 4].value);
    + p  H  W) ^3 Q" b7 r
  622.     }6 U7 c" m; S. r
  623.     else9 Y0 n$ Q* I7 e3 m
  624.     {: D8 F* F* o2 W3 {  E$ {/ d
  625.         setText('wlKeys1','');- r& b; |* s  R! t. ]) c+ e! i
  626. wep1password = '';
    , o) I8 Y& @0 L1 R3 a  s: I- {7 I; Y5 j
  627. setText('twlKeys1', '');
    # ?7 x! h+ P$ A5 C  e* x: K' [
  628.     }, L- M+ h3 t& y# ]) B( D3 i) N
  629. }8 @% x; u* M8 _, @- [$ B# V- @

  630. : f# ?  F& D5 y& _
  631. function beaconTypeChange(mode)
    " {# `* U( s1 N5 [" l' j
  632. {
    4 x/ g* c8 P7 \1 z$ y5 i$ ?
  633.     setDisplay('wlEncryMethod',0);
    9 o" B( T' F& D) y
  634. setDisplay("wlEncryWep",0);
    % a4 U8 u4 g( X" `' v
  635.     setDisplay('keyInfo', 0);
    4 O) P' h4 Z% f3 p
  636.     setDisplay('wlRadius', 0);; o' u0 J0 c) M: R, q* F% `
  637.     setDisplay('wpaPreShareKey', 0);
    6 H* f9 Z- K0 y2 ^* v
  638. setDisplay('wlWapi',0);
    0 F3 l* H1 F8 p1 {- f0 [# z# T4 D6 g
  639.    
    7 I5 Q# r/ G! U" O# _0 M  f
  640.     if (mode == 'Basic')  ~; w7 y* v7 ]- G) @- T
  641.     {! f4 j1 q+ N' {
  642.         var BasicAuthenticationMode = Wlan[ssidIdx].BasicAuthenticationMode;$ r2 h; ?* S0 C4 e2 G* V8 {$ ]4 Y
  643.         var BasicEncryptionModes = Wlan[ssidIdx].BasicEncryptionModes;/ z$ P$ Y6 ?2 g; h7 l
  644.         if (BasicEncryptionModes == 'None')
    / S0 C7 u% F* V( W
  645.     {- k  G6 J! N% D6 m0 Y
  646.             setSelect('WlanAuthMode_select','open');6 f" ^% T6 G5 o% R: C
  647.         }2 b8 }) o. K+ o6 ~0 l0 ]7 w
  648.         else
    % N9 U7 e) j/ j* k
  649.         {5 P- t) k' o9 \9 u* X0 F
  650.             var level = getEncryLevel(Wlan[ssidIdx].EncypBit);
    1 n; r" Y7 L' ?5 o
  651. setDisplay("wlEncryWep",1);
    8 u# Y  Z( @$ M8 v: m4 I3 b. R  U4 j; N
  652.             setDisplay('keyInfo', 1);
      y" p# {% N1 H9 Z' b
  653.             setSelect('WlanAuthMode_select','shared');8 w9 C4 L. k& `( g7 Y8 y- \. W
  654.             setSelect('WlanWepPwd_select',GetWepEncrypt(BasicAuthenticationMode));/ R% Z1 g) `, Z
  655.             setSelect('WlanKeyBit_select', parseInt(level)+24);( C1 K+ u$ {0 j( Z6 {
  656. WlanKeyBit_selectChange();
    " J" a$ _( ]9 C2 A
  657.             displaywepkey();
    ; Y8 {3 u# N$ S6 p
  658.         }4 M8 j7 N2 Q2 R2 p- k, [
  659.     }$ C& k( \; s' Y- @- I) }
  660. else if (mode == 'WPA')( y) w7 B$ @( m+ [
  661. {: U8 L8 O8 w% g2 U8 x
  662.     if (Wlan[ssidIdx].WPAAuthenticationMode == 'EAPAuthentication')$ X4 Y6 g( {1 U1 n3 ]' x
  663.         {& K0 h0 d4 k8 ^$ s: j
  664.             setDisplay("wlEncryMethod",1);5 r- Q/ _9 a# b( w! ]& A- e7 _' e/ e
  665. addEncryMethodOption(1,0);
    8 `1 {& T/ T- a4 S* g
  666.             setDisplay("wlRadius", 1);, Z1 W- E6 N6 ^4 I
  667.             setSelect('WlanAuthMode_select','wpa');7 ~. r$ \" s# r
  668.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);+ x; k7 x8 {; n/ I
  669.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    * l  B" B* O( t9 d
  670.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);
    , Z5 |' c. V4 [( Z7 A' U2 v
  671.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);) `, a* e- d( c1 t
  672. radiuspassword = Wlan[ssidIdx].RadiusKey;
    ( F4 }/ N# q' Z: x% A
  673. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);% G! _0 I3 h& V' E3 X+ r% T5 W
  674.         }) H- D3 a! P  h5 M6 _& @' H0 u: T
  675.         else
    5 p  k) t$ |9 O) N. P) `0 {9 A
  676.         {
    : [! A7 T4 P3 ^( R4 w* L) v
  677.             setDisplay("wlEncryMethod",1);
    & a4 L" ~; ?% U9 t4 K6 H
  678. addEncryMethodOption(1,1);  u5 }! F1 ]; g& j5 {0 ]/ U8 y. Z
  679.             setDisplay("wpaPreShareKey", 1);
    5 {- F- M  O, G9 m9 M; y+ c% l% C
  680.             setSelect('WlanAuthMode_select','wpa-psk');
    0 _" z. t9 N. r$ Z1 C5 C5 _
  681.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].WPAEncryptionModes);) k2 Q8 j6 @8 `' _; x2 G/ b5 K
  682.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    2 V. ^- s  E) h4 K4 e) L' X/ }
  683. wpapskpassword = wpaPskKey[ssidIdx].value;
    / ^5 |" w, ^% L# Q' `6 Q
  684. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);0 N) [8 C$ F# b/ H
  685.         }" h4 q; a, }& s5 r" p, H
  686. }
    $ V5 l) H6 y: c; F) p
  687. else if ((mode == '11i') || (mode == 'WPA2') )
    + |" k' B7 N2 `* j$ c/ j
  688.     {
    $ r* G2 c. _! _, g) u- E
  689.         if (Wlan[ssidIdx].IEEE11iAuthenticationMode == 'EAPAuthentication'): Y& C) U2 b+ m4 a' q7 v6 k
  690.         {
    # ^2 a. V) W1 s& B5 p8 ?
  691.             setDisplay("wlEncryMethod",1);
    ' x8 q7 j( V9 n- F" S
  692. addEncryMethodOption(1,0);# \$ P" Z9 Y* I- B0 k
  693.             setDisplay("wlRadius", 1);
    9 m# b+ r7 _3 ]) p& u% y
  694.             setSelect('WlanAuthMode_select','wpa2');( g& G6 ]2 M; ~+ p$ M4 z1 w
  695.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);0 q5 k7 ]3 r! n  }
  696.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    ) V  d. j6 }( ?$ G2 ]4 Q
  697.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);! J+ D7 L. k9 `& t
  698.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);
    * [% R! T- K6 u
  699. radiuspassword = Wlan[ssidIdx].RadiusKey;
    7 J# @; P, A1 _2 S
  700. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);
    ) |, H' Y) A' G9 w: ?* k: R" ?, |
  701.         }7 j, ~9 c9 q# H5 b
  702.         else7 Q' W4 V" C! |' R. ^) F1 I
  703.         {
    + \, Q3 c2 r9 c# e! Q
  704.             setDisplay("wlEncryMethod",1);
    3 a3 u  d( D* E2 l) m
  705. addEncryMethodOption(1,2);: P3 v$ Y/ h( J
  706.             setDisplay("wpaPreShareKey", 1);% W3 G% C. d6 g2 M, s2 V
  707.             setSelect('WlanAuthMode_select','wpa2-psk');
    5 ^% b. h% l1 e8 c
  708.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].IEEE11iEncryptionModes);
    & M0 D: K' R" U, ~( e! i6 c
  709.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value); % r( ]" e0 J) }) C, w8 `7 L* `
  710. wpapskpassword = wpaPskKey[ssidIdx].value;   x& F, l$ s: ~( |3 E
  711. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);2 N3 e7 I. v) s* Y9 ^, _
  712.         }# e4 b6 _5 A& N/ f1 w; d
  713. }9 U! G: ]2 _& ]4 b3 f+ A1 z
  714. else if ((mode == 'WPAand11i')|| (mode == 'WPA/WPA2'))7 G: _( N! |$ U% f: ~
  715.     {, ?$ o, Z$ i8 |  [: y! o& z; m
  716.         if (Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode == 'EAPAuthentication')
    8 q, T- _" c( o" X8 y
  717.         {
    ) Q& r6 N6 u2 K5 R
  718.             setDisplay("wlEncryMethod",1);
    / W3 \& x' X: n1 R/ _, }4 e/ `
  719. addEncryMethodOption(1,0);( e$ V$ G& W5 y4 a6 m$ f2 E3 ]9 V2 h
  720.             setDisplay("wlRadius", 1);
    2 {2 E4 d. m, T: }# H( t
  721.             setSelect('WlanAuthMode_select','wpa/wpa2');+ u3 p4 z) X! N0 w& H( E' e7 K+ Y
  722.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);! I$ F. C6 a% Q$ l
  723.             setText('wlRadiusIPAddr',Wlan[ssidIdx].RadiusServer);
    . n3 x% C& C% C/ p
  724.             setText('wlRadiusPort',Wlan[ssidIdx].RadiusPort);
    % `( Y3 P/ _0 @. T* A/ W
  725.             setText('wlRadiusKey',Wlan[ssidIdx].RadiusKey);* o5 F% u0 V. e4 S8 `% |) ]
  726. radiuspassword = Wlan[ssidIdx].RadiusKey; ' e( a+ K; y. C# Z$ Q3 d+ A, {
  727. setText('twlRadiusKey',Wlan[ssidIdx].RadiusKey);
    , ~5 |1 u0 X1 W* R# d$ e! f
  728.         }  k3 k7 O$ \: e+ P
  729.         else
    + i" X7 _: c; U! j# _5 m$ D& r
  730.         {
    , t' N/ l9 V* w; {6 ?: k9 G
  731.             setDisplay("wlEncryMethod",1);
    5 V- a" `6 w7 a/ p
  732. addEncryMethodOption(0,2);
    * y# Q+ F/ ^$ W$ }' l
  733.             setDisplay("wpaPreShareKey", 1);  C/ o% O) e0 M0 \4 m$ i5 S: X" v
  734.             setSelect('WlanAuthMode_select','wpa/wpa2-psk');  T$ `/ M1 N! ^* A" X' p
  735.             setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes);
    + E  p  b) M  g: h, m, Z0 K5 @. s$ q8 Q
  736.             setText('WlanPassword_password',wpaPskKey[ssidIdx].value);
    5 D$ R( B( ?( H
  737. wpapskpassword = wpaPskKey[ssidIdx].value; 0 y/ o# n: p  R# t. g
  738. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    5 T1 s# N* y+ `8 X3 e4 v
  739.         }
    * `8 U2 v. Z3 P0 q+ n1 {- L
  740. }- y0 Y5 a- f/ l! N: T2 I2 \" z
  741. else if(mode == 'X_HW_WAPI')
    8 b% e  H: B* W( w" N* R0 d
  742. {
    4 L4 z8 f# |& c5 Z; k8 @. m# \) i% M
  743. if(Wlan[ssidIdx].X_HW_WAPIAuthenticationMode == 'WAPIPSK')
    & k; P7 n( Z- K* o1 X9 K$ }2 {
  744. {9 \( r" T9 {* n- D4 P0 U4 H6 {
  745. setSelect('WlanAuthMode_select','wapi-psk');5 j! q" c3 [/ U3 B! i
  746. setDisplay('wlEncryMethod',1);             ! T$ g3 Z; y+ f# `( p
  747.             addWapiEncryMethodOption();  6 G+ `! f1 n8 a, h2 s
  748. - f8 _5 ^, _$ C1 b1 C' g
  749. setDisable('WlanPwdMode_select',1);
    + r- {% z. M, S1 C, w
  750. setDisplay("wpaPreShareKey", 1);
    9 B" s1 ]  P7 D+ n7 r, W
  751. document.getElementById('wpa_psk').innerHTML = GetLanguageDesc("amp_wapi_psk");
    $ m. a; t! V8 [" A- p1 a! _. A( [
  752. setText('WlanPassword_password',wpaPskKey[ssidIdx].value);( z% D# {3 m" m: M) j$ M
  753. setText('tWlanPassword_password',wpaPskKey[ssidIdx].value);
    1 G3 E( l) U- N: a  s+ S7 R
  754. wpapskpassword = wpaPskKey[ssidIdx].value;
    - B* N, S# W9 m: t9 Z
  755. 0 H: d8 \0 Z7 D4 q$ L% t
  756. ' N8 l$ D% k- Q5 s
  757. 5 A6 @" Z" \- M& A6 V
  758. setSelect('WlanPwdMode_select',Wlan[ssidIdx].X_HW_WAPIEncryptionModes);: O) }* Z- T' Y4 R  O6 M2 s+ ~( @1 R
  759. }: T2 }4 J3 c# h8 z- x0 B% s
  760. else& S  n7 D3 ^& u* _# Q
  761. {# \; U+ a6 `5 x! a: p$ ^
  762. setSelect('WlanAuthMode_select','wapi');
    6 k! R; {: j. \
  763. setDisplay('wlEncryMethod',1);             . t( N& [, }0 I3 }" a! C: V/ T) `2 z4 Q
  764.             addWapiEncryMethodOption();  
    : H  z; q% ~" U9 G3 E9 w3 I
  765. setDisable('WlanPwdMode_select',1);
    1 r' }5 j! l" t! M' N
  766. setDisplay('wlWapi',1);
    ! c! u% I, f% I+ P# x
  767. setText('wapiIPAddr',Wlan[ssidIdx].X_HW_WAPIServer);
    5 F5 }& T! ?6 {1 G: c! M' S
  768. setText('wapiPort',Wlan[ssidIdx].X_HW_WAPIPort);
    7 V" _6 ], |8 }8 S4 ?
  769. }3 `8 g& q1 I9 a% s/ n
  770. }
    , z6 F" i! W0 d8 X# |
  771.     else( x! a4 ]! ~2 J1 l0 `% y
  772.     {1 O  \3 o5 k9 z9 U2 |+ k3 T
  773.         setSelect('WlanAuthMode_select','open');
    . Z2 Y' O! z6 {& o' X; d/ \
  774.     }
    0 c5 m) c9 V2 Y( W/ c' `
  775. }
    0 N4 G8 \, d1 Y4 b! \) }* _

  776. 9 W# x! @/ P+ Q8 K* F
  777. function WlanKeyBit_selectChange()
    2 V! M4 N$ E# m4 M  Z1 B
  778. {4 t" G$ C+ N$ q* d* w# J2 C
  779. var desc;
    * C( W# N" ]0 `& d/ W
  780. ; U2 r+ |# V6 o4 z6 r7 g
  781.     if (getSelectVal('WlanKeyBit_select') == 128)
    : I' v6 S! a6 ]- y; H4 e7 v! \4 w8 [
  782. {, ^; a( j: a$ l" V. e  z7 E  d
  783. desc = "128位无线网络密钥需输入13个ASCII字符或26个十六进制数";. t: a7 Q% A- F3 |9 k' w. n
  784. }2 Q$ K7 i2 C( a/ A
  785. else/ O. d& d5 x( _* w6 p( \
  786. {+ E8 D8 s: J8 k$ Q& o# O: i
  787. desc = "64位无线网络密钥需输入5个ASCII字符或10个十六进制数";! @* r) N5 M, K  \
  788. }4 X: S% F/ H8 I8 O
  789. + k. R4 N) @1 c8 v+ t
  790. getElById("Title_wlan_key_tips_lable").innerHTML = desc;
    1 y% R, y$ w( b- t5 x
  791. }: k. ]7 ^) B  G1 A" P" F" v
  792. 3 ?( a4 _" e, B
  793. function onMethodChange(isSelected)
    2 J7 @# [4 @$ ~) d
  794. {   + G  ~' ?' M: W# I
  795. var authMode = getSelectVal('WlanAuthMode_select');
    5 d) S8 P/ N! |2 q6 [: T
  796. if (authMode == 'open')1 P. g. Z9 x/ J+ v# b: A
  797. {: K4 W; T4 H, l. ^
  798.     var var2 = getSelectVal('WlanPwdMode_select');
    6 o+ ~- ?% f  [$ T& G2 S" T
  799. " r5 h2 Z/ r+ v% d3 |- N5 D
  800.     if (var2 == 'None')
    5 v, y2 \2 x: n# f1 n# D3 U
  801.         {
    3 l4 ?) O4 o6 x" P' }/ @/ j! V- \
  802.             setDisplay('keyInfo', 0);
    # E& U0 T8 o& j( k
  803.         }
    & E: t" h( p4 p. b& Y  y6 {
  804.         else! c" l9 e, U! X3 F3 i% ?* \
  805.         {
    1 ~& F2 K3 Z. q7 N$ x5 G
  806.             if (AddFlag == false)2 w" `$ @: v+ Z9 N3 a) v
  807.             {
    5 _# z3 z- S% }5 d' }) D
  808.                 var level = getEncryLevel(Wlan[ssidIdx].EncypBit);
    - U6 e6 H( }/ m2 l& \9 _3 y! s
  809.                 setDisplay('keyInfo', 1);
    ' s/ _5 k7 m9 D! |2 K
  810.                 setSelect('WlanKeyBit_select', parseInt(level)+24);
    1 h! U& i3 x7 j" p/ j, E4 O4 g* I# G

  811. 6 G8 u. F* m8 A
  812.                 setText('wlKeys1',g_keys[ssidIdx * 4].value);1 ~% ]9 E. o2 b6 V
  813. wep1password = g_keys[ssidIdx * 4].value; , u& a* s8 i; \8 m: s. V  G
  814. setText('twlKeys1',g_keys[ssidIdx * 4].value);; {8 e8 O" K, E* A: j
  815.             }* r! r+ i4 t$ g- F# a2 j( |
  816.             else
    ! f  I' ]: c  @) p
  817.             {/ i0 i! C( [  H6 o- w
  818.                 setDisplay('keyInfo', 1);" G" ?! L8 F( p, d; C
  819.                 setSelect('WlanKeyBit_select', 128);, l6 V  @6 u2 E) M4 x# t$ i) [

  820. 3 U- P6 c0 V2 x1 N/ o) o
  821.                 setText('wlKeys1','');
    2 o$ S* B, ?/ w; Q2 M
  822. wep1password = ''; 5 f2 F$ W# k, Z& `" E# C) p( \
  823. setText('twlKeys1','');; f' k' [* s8 k) g
  824.             }
    8 q" _( ^- v8 H" H  d
  825.         }
    - @4 M+ i7 ?7 o3 j! ~
  826. }
    ! `! [/ k& g0 B
  827.     else
    $ P4 q% o2 t1 }) F* y& l
  828.     {
    0 l' z( p: U* K
  829.         setDisplay('keyInfo', 0);
    6 M- `/ g, e* ]8 l- q/ T5 S
  830.     }
    & _6 b$ v  u( b6 b
  831. }
    0 O/ [6 O/ |: ?5 ?6 Y7 D. S

  832. ) w' q; {6 m# |- T: E6 I
  833. function onWepChange()2 h1 a4 j0 j2 @) U+ V
  834. {
    * `2 ^- I( |! y, R/ \4 I, p
  835. 3 Y' Z* N' P5 ]/ Z7 s
  836. }
    * W4 N7 f# I5 F0 _  \

  837. 8 U& }) B( u( v% c
  838. function SsidEnable()
    - c: t2 p+ n$ c& A; J: w: F5 y7 G2 F
  839. {
    " J; {% _& o5 R: P) G8 F# C0 R/ L/ ~
  840.     if (true == AddFlag)
    0 j$ q! n. n& C" d- ^, D
  841.     {  Z" X5 G5 T6 D# Y  K
  842.         return;8 U* K9 ^! J, |! |; d0 U
  843.     }
    * C2 o' S# T; R, C# X4 Z* ~, p1 P

  844. ) a6 _7 l( U9 s: C& u& n# _- M
  845. if (Wlan[ssidIdx].X_HW_ServiceEnable == 1)
    ' b0 T7 a2 z( W" v9 D
  846.     {
    ( U! w0 j7 o9 [* _3 c! Z3 Q1 C
  847.     }! W/ D- j' z' k, n8 a' W  `
  848.     else
    9 _; S- ^+ T! ]# D3 }: t# r
  849.     {
    ! T1 }+ g; v% v  P0 _2 x1 ?7 S
  850.         AlertEx(cfg_wlancfgother_language['amp_ssid_state']);
      F" A* m6 ]0 G. X7 L# G" Q
  851.         setCheck('wlEnable', 0);9 |# N2 M( Y5 Q7 S! ?; p) b4 X
  852.     }
    % a5 f# l9 U4 H$ D1 ?3 J
  853. ( L1 c3 I7 Y" Y
  854. return;
    0 j2 M' H6 d# _* h5 b) P- s3 _
  855. }( X' }$ s& T% |  a
  856. 8 h. x# A9 m9 N  i
  857. function ShowSsidEnable(currentWlan)( j  \; |/ b9 A- \1 K
  858. {- z! Z+ @' A2 s6 _. Z% w- j
  859. if (currentWlan.X_HW_ServiceEnable == 1)
    7 i/ q% M5 d1 I1 s" a% m
  860.     {0 R& j3 Q7 Q. n  n, V5 G. D
  861.     setCheck('wlEnable', currentWlan.enable);
    ) u/ @1 M, ~: k7 o5 J# @
  862.     }
    5 i: C, H# y/ ]2 J9 z
  863.     else5 r! ~2 y; Y9 f6 [" S8 H
  864.     {
    1 Z* c0 j7 }; e; T- ?5 x! J" \
  865.         setCheck('wlEnable', 0);- P: X) Q# B2 a. [4 t9 \
  866.     }
    * M' P8 {9 ?+ P# x3 ]# @2 \8 w
  867. . M' K* Z) p9 x1 z( ]8 R' o" T
  868. return;* t5 g4 x1 N8 z
  869. }
    ( F  }. Z8 [! W. F1 {. c+ Z+ M

  870. / v$ T9 ]( F" Z3 M* t4 S9 Q- L
  871. function ltrim(str)
    4 u8 m/ o* P! u8 k4 U1 w& X6 g6 L2 A
  872. {
    4 `9 {( `* {% t; R
  873. return str.replace(/(^\s*)/g,""); 7 H7 x$ e* a/ }  b6 l
  874. }: X8 F7 S$ v6 U9 `6 ^
  875. ( n; }: j9 `/ w
  876. function IsCharandNum(str)1 I: v# R3 m/ A; \% }/ q+ ?5 P6 q
  877. {
    3 F7 O/ e6 J) `: p5 ], Q
  878.     var prefix='';
    , H/ d# c( q2 a+ ^9 Z$ ~( ?5 X* P
  879. var postfix = '-5G';
    / I1 ?  Q1 K& G
  880. var endPos = str.length;
    4 p3 Z3 G1 e" @$ z5 C8 D4 A
  881. var ErrorNote = "SSID-1 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串。";
    3 r, n+ _, }0 i2 b

  882. 0 Y/ u& q' |- D2 P
  883. if (0 == getWlanPortNumber(currentWlan.name)), m% p' Q9 ^7 W5 b  C$ M: r. [7 b. P# J
  884. {# I/ W' M9 e: \. a
  885. prefix = "CMCC-";
    6 F& A3 T0 a# e% e/ S5 y
  886. }7 ~) c0 r& o3 Z! J1 S
  887. - g5 d5 V( e- R$ T: a
  888. if ((1 == DoubleFreqFlag) && (4 == getWlanPortNumber(currentWlan.name)))- C0 K8 N) ]) [  U2 p8 l
  889. {
      d3 M; G1 t( T4 T, `$ L. B
  890. prefix = "CMCC-";
    2 ]3 ~5 i0 M2 ^, u

  891. ! j9 O3 L, N  a9 W
  892. endPos = str.length - postfix.length;7 n+ b4 s+ T. v. R1 X' N
  893. if (endPos != str.lastIndexOf(postfix))* q: p, l* u9 J0 }; b" h
  894. {; r, E$ @' |+ ], [  y
  895. endPos = str.length;
    / I7 d6 l) Y% V) d( f0 N
  896. }
    ' Q5 ~' a- v' |: [( ^2 _1 B  }

  897. . R9 O4 k. c+ @6 M- B
  898. ErrorNote = "SSID-5 “CMCC-”前缀后面只允许输入由0-9、a-z、A-Z等组成的字符串,并且允许以“-5G”结尾。";  K7 u( b) y0 |$ _  d' v' d
  899. }1 {" D% D, T# }: Q# `# d

  900. 6 @+ F7 K/ b/ q
  901. for( var i = prefix.length; i < endPos; i++ )
    + b# _) L1 B: N0 n- K/ |. F
  902. {
    8 D- ?+ g. z) ^6 `
  903. if(str.charAt(i) < '0' || str.charAt(i) > '9'). N8 J5 B! y3 q. v# a& J8 E
  904. {1 b, v3 C6 ~- V0 W+ K6 T2 F7 \% K
  905. if(str.charAt(i) < 'a' || str.charAt(i) > 'z')' C" r7 T! N) ?' B- W2 {& Y* J
  906. {6 q. o* C1 @; Q5 V- a
  907. if(str.charAt(i) < 'A' || str.charAt(i) > 'Z')( O/ Q- @- T0 g7 Q- z' c! D' p( d
  908. {
      ^  V- K4 H: B, T: d
  909. AlertEx(ErrorNote);
    ! E$ r4 q$ k5 I3 Q6 x- M9 _6 W
  910. return false;, Q1 n0 W; _4 x- l
  911. }
    - V) {; s' q2 ]& s8 ~( J; ?- R; I
  912. }
    7 N  Q; x: X# f* _% z; q2 I
  913. }# k8 r9 ?) j7 _/ `
  914. }- w% T4 M4 I+ A7 ?1 y7 R# ^

  915. 8 m  n/ z+ u  j
  916. return true;8 n  x$ {5 r3 |# k( L+ q9 C7 o
  917. }$ q+ w. ?# L% i
  918. / U' c, U# Q! ]3 ]( ~: P
  919. function addParameter1(Form)
    - {6 B# m% ^$ X9 x
  920. {   
    3 y, B* `: q, S. v7 ?+ z
  921.     Form.addParameter('y.Enable',getCheckVal('wlEnable'));
    ! Z* J9 a* V/ c# U2 A) L& _( j4 ^
  922.     var ssid;
    5 G' M, b+ b- [6 A& ^
  923.     ssid = ltrim(getValue('WlanSsid_text'));
    9 f9 s* P( e1 X7 N( |/ y" M9 l
  924. if (ssid == '')4 Q1 k4 p" ?0 X% t! T
  925.     {
    * ?" o+ i! T9 w9 Y
  926.         AlertEx(cfg_wlancfgother_language['amp_empty_ssid']);4 k% ~0 }# `; C; s: S7 I4 s2 |
  927.         return false;6 `& ^+ l1 y1 g9 V0 s
  928.     }
    # P4 ~7 t8 G+ ^* x+ R" ~1 ^- f
  929. ) s2 c. l3 D; ^, P
  930.     if (ssid.length > 32)
    + a! }, U$ n/ @) Z( ~% X' b
  931.     {# x% J4 W& `4 g' q, O
  932.         AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_too_loog']);
    9 j- t* y& C8 m8 o
  933.         return false;
    1 \' T' m3 \( L( P! N* r6 g9 t
  934.     }
    2 N1 g$ ?0 ^9 P
  935. . W9 z1 |8 p6 E$ C
  936.     if (isValidAscii(ssid) != '')) P' W2 U' A& D$ G1 w
  937.     {8 Y( O8 Z' Z7 K. P% D
  938.         AlertEx(cfg_wlancfgother_language['amp_ssid_check1'] + ssid + cfg_wlancfgother_language['amp_ssid_invalid'] + isValidAscii(ssid));
    & w" _& @) d4 Q) Z
  939.         return false;# s* H5 c! f. y( X- {
  940.     }1 p0 |! U% V" K1 }/ B7 A- [

  941. ' Q! x7 k& x6 B/ g- w
  942.     for (i = 0; i < Wlan.length; i++)
    8 q# d! f' n" D( X; l8 O4 @
  943.     {* s2 J. {( l' j# z& [2 i
  944.         if ((getWlanPortNumber(Wlan[i].name) > 3) && ((1 == DoubleFreqFlag) && ("2G" == wlanpage)) )3 J! j9 y" {" i1 |* s# x
  945.         {3 l0 }9 \$ M1 k9 K4 S
  946.             continue;
    ; I5 f, W8 C& N" I. J
  947.         }7 k( W0 c7 Q3 k: x% G) k
  948.         
    * i& l7 @; I' [
  949.         if ((getWlanPortNumber(Wlan[i].name) <= 3) && ((1 == DoubleFreqFlag) && ("5G" == wlanpage)) )
    ) |  R! Z" Q0 ~  B5 f( y" \
  950.         {
    & H* R' a9 G) L" E# a' K
  951.             continue;, {8 |( Q3 v) Y
  952.         }
      O$ L  e% z1 t( @% @
  953.         ; a, {1 b* A" y3 `' ]2 C, _: l
  954.         if (ssidIdx != i)2 Q3 B2 W4 W+ I8 P5 L2 Q" M: `
  955.         {
    ! T& i7 j3 `6 a, {
  956.             if (Wlan[i].ssid == ssid); f9 H% l; r; E  |: Q
  957.             {1 |2 A  P9 K6 Q& M; o% j
  958.                 AlertEx(cfg_wlancfgother_language['amp_ssid_exist']);! u. u- v$ {+ m$ \- Z8 T! b" K6 S
  959.                 return false;
    " n8 i8 L% Q( t1 E* b
  960.             }
    / Q+ _% P; y- M4 s- C. I+ u
  961.         }; d& x% ?! ^+ }
  962.         else
    # c" `7 [# p' i+ n- y7 m2 n
  963.         {# v8 A9 [9 O! K! {+ k- _
  964.             continue;
    6 A3 H0 m- ~  U  l+ O4 f. I
  965.         }
    2 g7 O; e+ U0 ?
  966.     }
    2 N$ |1 d) p2 A8 w0 U' {
  967.    
    4 ?( ~4 W. n+ X7 b1 X6 D/ q6 n3 v+ |
  968. if ('E8C' == CurrentBin.toUpperCase() && '0' == TianyiFlag)% F$ x5 B! P7 q8 ~' N# u
  969. {
    9 ]2 h) `2 [9 C5 V# d+ L: B+ [7 {  ^
  970. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) ). J: F- r- f9 V6 B/ Y7 t, k( }; Q
  971. {+ b% W3 e2 T1 E+ d
  972. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet']);
    6 o' O: B: j9 {. H. A' A/ `
  973. return false;
    0 H: {+ q" F$ h
  974. }
      N: K, a8 f' C

  975. " P7 C$ v; l9 X' ]  f
  976. if (1 == DoubleFreqFlag)
    . L* V+ l3 D9 `6 [& q# G
  977. {: ]9 ?; i5 o+ b0 s+ m7 L6 Q
  978. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("ChinaNet-")) )
    0 r7 {& Z7 A+ Y* N" ?4 {# ~
  979. {9 @" {' H8 y4 [" u& s0 I
  980. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_chinanet_5G']);
    * t3 K5 G9 O# G
  981. return false;3 q2 g; T+ O: m. U# g4 _
  982. }
    % |. n( n& b/ x* `
  983. }
    ! P1 r4 y7 e0 @0 W% Q
  984. }
    9 d. O6 M/ r# v( G% w  c

  985. 6 f! n; K( R2 w% w- K
  986. if ('CMCC' == CurrentBin.toUpperCase() && MngtJsCmcc != 1)
    ) I% o6 P/ e( G5 Y, q
  987. {
    . A1 i  d& j9 z7 N# ?; g
  988. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) )
    3 f# d" X5 r4 R' `& c' `* f6 I: {
  989. {) C+ Y+ j' \# [& |8 P( _* [2 D4 e
  990. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc']);( O+ r, L' r2 d8 Q
  991. return false;$ {; O/ i8 N) q/ v
  992. }
    : \' F" v6 |+ g

  993. & r9 G: d- M: }% m; t1 j, A8 M3 r
  994. if (1 == DoubleFreqFlag)
    : d" {+ c" x+ X5 @
  995. {
    1 x5 C# a; o7 n. m, b
  996. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("CMCC-")) )
    . [0 [7 W' ?0 G& r4 P: L/ ]
  997. {
    . b% C, C% B. K. B2 y( C% Z) G0 V6 U
  998. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_cmcc_5G']);
    3 C% n! w; C8 j( U  H7 u6 v
  999. return false;/ D+ I  H; g' @: l4 g+ ~& j5 ?# W
  1000. }
    * q5 V0 T" z* `3 P
  1001. }5 c" f9 j: [& P. s
  1002. } 5 [4 o  {: e" |7 }  u- {
  1003. # I9 _2 M+ c1 Q, U0 F& L
  1004. if ('SHXCNCATV' == CfgMode.toUpperCase())
    ) U$ |7 m+ S# w7 `$ g
  1005. {
    ; Q/ p  o' M* G- [0 H
  1006. if((0 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) )
    % |* ]8 o  T- \: I1 b
  1007. {5 v% a! ~+ f9 ]
  1008. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv']);
    $ V" E9 q2 V8 n( y
  1009. return false;
    5 N8 ~6 F0 t6 P
  1010. }
    0 d! K. i9 G; \3 i6 ]; V+ J
  1011. , r, D3 o3 ?# u) m# y/ i
  1012. if (1 == DoubleFreqFlag)
    ' \% B4 N8 n: U$ E  V
  1013. {
    ; O+ `- F$ C% D$ u7 g/ w( V
  1014. if((4 == getWlanPortNumber(currentWlan.name)) && (0 != ssid.indexOf("sxbctvnet-")) ), [, c! t0 G4 J5 T" x* r
  1015. {! l+ _% X6 i" {% H( H
  1016. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_shxcncatv_5G']);% E" n/ o3 c4 A' r; x
  1017. return false;8 J: Q% [" C' L
  1018. }
    - k& Q$ b3 Q$ U. r! [6 ?1 g$ r& h
  1019. }
    1 }7 e) `0 B3 w5 x
  1020. }
    / V* O; U/ F/ J

  1021.   a, V3 }1 f3 u
  1022. if (('1' == aWiFiCustFlag) && (aWiFiSSID2GInst == getWlanInstFromDomain(currentWlan.domain)))
    $ V8 V6 f+ i3 Y& L1 N4 t
  1023. {
    8 D- I2 P  ^5 ]* P8 x
  1024. if ((ssid != 'aWiFi') && (0 != ssid.indexOf("aWiFi-")))
    : J( @, f8 |8 x# z% N
  1025. {  P6 ~+ `1 i2 f2 u; }8 _
  1026. AlertEx(cfg_wlancfgother_language['amp_ssid_must_be_awifi']);$ L( ~  o! J+ H9 R4 j
  1027. return false;( l6 {3 X* F1 h! ]
  1028. }8 Q3 R4 U! {" m0 @  I9 g( ~
  1029. if (ssid == 'aWiFi-')& L! L, r. Y+ i$ @3 Z" p7 F7 M
  1030. {  V2 i* D) X( v6 t2 P
  1031. ssid = 'aWiFi';
    $ z# e) G: K% `: h  F& E  a
  1032. }4 x% J$ L& R& F) \$ w' h" W1 v. I
  1033. }
    9 [* u0 j3 q! F, p. d, ^

  1034. 8 }* H+ C" M1 f2 \7 f* s
  1035.     Form.addParameter('y.SSID',ssid);
    : @& j; }+ j$ o! C
  1036. }
    3 o; |3 A# X" g# ]8 O

  1037. + H$ y* U0 Z. v/ I
  1038. function addParameter2(Form)
    9 S8 l9 B/ J1 l# _' S7 j# D
  1039. { + Y- k) r& I3 K  v& K' k
  1040.     var url = '';
    + t1 ^4 v8 T! j0 z5 J$ o* c+ e, S
  1041.     var temp = '';
    / ^2 B1 X' m) ?& B5 r0 y
  1042. 4 J  Y+ Y- E" Q: A, F
  1043.     var AuthMode = getSelectVal('WlanAuthMode_select');1 h& a2 B7 D1 V0 D6 G7 D$ [2 v
  1044. 5 W; J% w/ p) \
  1045. if (AuthMode == 'open')# y: K# S( ]- J6 B9 S# p& e
  1046. {$ S- W4 }" z- g/ {
  1047. Form.addParameter('y.BeaconType','None');, i/ T* j. i6 Z( e( L+ u! v5 g
  1048. Form.addParameter('y.BasicAuthenticationMode','OpenSystem');
    - B1 r- \/ @/ z- C1 n
  1049. Form.addParameter('y.BasicEncryptionModes','None');
    - S- X5 r/ ~0 b5 k& G5 w+ X
  1050. }' @: Q4 k5 R5 C; L' C
  1051.     else if (AuthMode == 'shared')& ?) Y% f. G2 X9 R: U" H
  1052.     {8 T! L0 ]& c2 x6 V/ r0 b, t1 O
  1053.         var KeyBit = getSelectVal('WlanKeyBit_select');' Z9 K0 m8 l* `7 b' Q+ p7 Y1 S; \
  1054. var index = 1;' M/ f0 s0 p8 i% @0 U! C4 N0 N
  1055. var wlKeys1 = getValue('wlKeys1');4 t4 f; i$ ?! F3 L% u* H
  1056. var val;
    2 M- q% l$ |6 G4 F8 i
  1057. var i;0 K& o; Y! i  z$ n5 Z7 A$ p% j
  1058. var vKey = 0;
    # P, B6 N- k! }$ ?$ S' }
  1059. var KeyDesc;
    7 y; b* B3 a1 C* [. K- W
  1060. 9 d: x  S/ q! H" M' u* M+ S4 M9 B
  1061. for (vKey = 0; vKey < 1; vKey++)* E; f9 S+ }2 g9 ^& h+ C* |
  1062. {
    ( P5 Z9 }+ }# N$ Y
  1063.    if (vKey == 0)
    7 m' S& Y  k% e6 p/ t$ E4 a
  1064.    {  R9 p9 |: @8 j, x
  1065.    val = wlKeys1;- v( }, Y) A' p1 v
  1066.    KeyDesc = cfg_wlancfgdetail_language['amp_encrypt_key1'];5 q+ ^* g% V# h4 }
  1067.    }
    ) I9 Y& k- U& G4 L! q" E+ v8 }
  1068. . r' J8 ]( r2 P! _( J5 b
  1069.    if ( val != '' && val != null): m: {$ W' i. j. \: y7 c
  1070.    {   
    7 @) E) V2 {7 L6 c$ q
  1071.    if ( KeyBit == '128' ): F9 w0 m% f  u! t7 D
  1072.    {& `6 T5 \  B( }0 T
  1073.    if (isValidKey(val, 13) == false )
    - P: B, ^5 U$ H; a+ X
  1074.    {
    2 I0 V: {+ U5 t
  1075.    AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid1']);( P+ \+ q6 r# P& h% @: S
  1076.    return false;$ o/ a: e8 n5 j! z
  1077.    }
    * b8 a  h2 s5 ?2 n' T+ `$ o6 Q/ W
  1078.    }; u% R& y9 `3 E6 V0 Z4 ]( }
  1079.    else4 z* h/ U% P# @# l2 a/ y# Q
  1080.    {" n+ ]8 p3 Q/ v, n* V; b
  1081.    if (isValidKey(val, 5) == false )
    - S# W4 e( w  p; t3 V
  1082.    {
    4 E8 U# `7 N. L4 H/ D
  1083.    AlertEx(cfg_wlancfgdetail_language['amp_key_check1'] + val + cfg_wlancfgdetail_language['amp_key_invalid2']);7 o2 ?2 T4 f9 a- R3 q# K
  1084.    return false;: ~6 b$ [+ T) u) U9 N  }) Z
  1085.    }# `0 G2 y8 x) e& q" d
  1086.    }
    $ T6 Q% ^( F6 t% _  n) s: r# J
  1087.    
    1 ?! o/ H. o& a8 t$ n
  1088.    }# b& \/ M5 V: t0 i
  1089.    else
    4 H' T$ I" R2 d9 g
  1090.    {8 o5 Y2 N. o% s# l) p8 ^
  1091.    AlertEx(cfg_wlancfgdetail_language['amp_key_invalid3']);
    ( K: g9 ?' Z6 c1 P; h( \. W
  1092.    return false;
    , U. l7 V9 o" c  c
  1093.    }" L. P9 t1 f: ]6 e% D
  1094. }
    . [. ~: g4 V" r
  1095. Form.addParameter('y.WEPEncryptionLevel',(KeyBit-24)+'-bit');
    " e& N9 ^* K1 ?: ~
  1096. Form.addParameter('y.WEPKeyIndex',index);  j1 x6 Y+ |* W! l, w

  1097. ! }# B  I( _1 h) @
  1098.         if (wifiPasswordMask == '1')
    . J, C5 x6 X6 t% H9 v) j2 C
  1099.         {4 j3 i4 G6 l9 ~% M
  1100.             if (KeyBit == '128')
    % K) }0 B3 |/ C! J. {5 x* A$ \
  1101.             {
    1 G% ~+ P7 x& M
  1102.                 if ( (wlKeys1 != "*************") || (wep1PsdModFlag == true) )
    / p1 a& Y$ K$ I5 D3 q) @
  1103.                 {0 `6 v2 X: T8 f, R
  1104.                     Form.addParameter('k1.WEPKey', wlKeys1);4 N! T' e2 H* L
  1105.                     Form.addParameter('k2.WEPKey', wlKeys1);
    ! `4 B4 u6 y, C2 |0 p- d
  1106.                     Form.addParameter('k3.WEPKey', wlKeys1);
    2 J- R4 n& O; d/ X# x& N. @: U
  1107.                     Form.addParameter('k4.WEPKey', wlKeys1);  
    # m+ l2 B3 j0 o* O- R
  1108.                 }
    7 @& ]4 T* |9 H3 s5 E$ ]$ w! u
  1109.             }! I7 f1 C3 @8 v, w2 A/ _3 {" |/ r
  1110.             else" |2 X9 O, ?* u1 `
  1111.             {
    , R+ O# }% D  R3 _0 {; Y! M
  1112.                 if ( (wlKeys1 != "*****") || (wep1PsdModFlag == true) )
    ' q# h' H4 o, u8 T$ X+ t( q) w2 s
  1113.                 {
    2 S6 w' Q$ `* v: ]
  1114.                     Form.addParameter('k1.WEPKey', wlKeys1);% }' P- n. d6 t$ U$ l
  1115.                     Form.addParameter('k2.WEPKey', wlKeys1);
    4 q3 d3 Q: h* s
  1116.                     Form.addParameter('k3.WEPKey', wlKeys1);
    ; j' z) Q( C, J! P! n
  1117.                     Form.addParameter('k4.WEPKey', wlKeys1);
    0 e8 K0 }  ~& h$ t3 a7 n# Z3 L
  1118.                 }
    : _0 R6 P4 s& }
  1119.             }! a! E( g- d3 V' }) L$ J
  1120.         }
    4 _: p% C/ Q  a) B# U8 L: W
  1121.         else
    5 `- t5 O' j8 y; k4 b" r2 J( s
  1122.         {/ S0 v, Q0 S$ E% Y+ ~& r
  1123.             Form.addParameter('k1.WEPKey', wlKeys1);
    ) H% V/ T: n* K- y) k" M
  1124.             Form.addParameter('k2.WEPKey', wlKeys1);: [  ^3 _5 J( v# v8 s9 ?, Q% o
  1125.             Form.addParameter('k3.WEPKey', wlKeys1);. ~% R  U4 {% [! ~
  1126.             Form.addParameter('k4.WEPKey', wlKeys1);  / I& h) R# H* N% \, i( a+ S1 v
  1127.         }5 @5 T* T7 ]# u2 {
  1128. 4 T# E0 j0 h; D' c. X- R
  1129.         4 n2 `2 o* D: s1 W4 ^8 K) l
  1130.         Form.addParameter('y.BeaconType','Basic');7 U) `( e& v8 }( y' [
  1131. Form.addParameter('y.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));  I3 Q8 X) x: n5 ~
  1132.         Form.addParameter('y.BasicEncryptionModes','WEPEncryption');
    0 k* Y2 f4 C7 N* l0 M$ @) k7 y) A
  1133.     }
    + z7 q& y' ?- S  N
  1134.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')  F) W" |0 X: H; s4 Y- Q: B( ?
  1135.     {
    5 {* u+ j4 i- }2 ]% V- w8 Q
  1136.         var wlRadiusKey = getValue('wlRadiusKey');
    ( p, T# g* f  ^9 e% y7 Z7 K
  1137.         var wlRadiusIPAddr = getValue('wlRadiusIPAddr');2 S' t  }/ A% m6 E- u
  1138.         var wlRadiusPort = getValue('wlRadiusPort');; ?1 A  d6 u. G" Y
  1139.         4 B- M& O  E7 \& j4 t
  1140.         if (wlRadiusIPAddr == '' || wlRadiusPort == '' || wlRadiusKey == '')
    8 N8 Y8 |6 p& {! z
  1141.         {
    - h3 d+ ]0 s/ b! s7 @+ o' P0 K$ S
  1142.             AlertEx(cfg_wlancfgother_language['amp_empty_para']);  v7 R6 k! f  o' }
  1143.             return false;3 c4 C- f& L& D. C: V9 L
  1144.         }
    5 `7 x/ x+ S, q! U& j

  1145. ) G& s" Z/ |3 H' z6 K5 [$ U
  1146. if (isValidRaiusKey(wlRadiusKey) == false)
    ; _" j1 t. ?' s- C+ `2 e
  1147. {8 r. H$ }. n$ @
  1148.     AlertEx(cfg_wlancfgdetail_language['amp_radius_keyinvalid']);
    7 I3 Q- X1 b  V, {7 l* Z2 V) R4 v  Z6 y
  1149.             return false;5 m; _. \& J3 ~8 F) ~9 {+ z
  1150. }: _1 R" d- ~3 |) m
  1151. & l7 ]; A2 |7 ]# G* e0 t5 k' _' ~
  1152. 8 L) o. m# c" o7 P: M
  1153.         if (isAbcIpAddress(wlRadiusIPAddr) == false)# z2 q& r( d$ U9 s( H
  1154.         {8 i7 W5 E/ R! ?5 K
  1155.             AlertEx(cfg_wlancfgdetail_language['amp_srvip_invalid']);# {" T6 W$ j& U( ?3 @* T. G
  1156.             return false;
      g, B/ l, F. X/ {0 F
  1157.         }
    ' \1 m1 s: Z6 l

  1158. . ]! _8 @% q2 T+ Y# _" `9 ?: o
  1159.         if (isValidRadiusPort(wlRadiusPort) == false)" S6 O& g# r! ^9 L! y
  1160.         {- V/ y; F6 o: v, S# u! s) K+ \
  1161.             AlertEx(cfg_wlancfgdetail_language['amp_srvport_invalid']);# u6 @4 G% E. y) Z/ m; o( d
  1162.             return false;( h3 e% M9 Q1 h& C3 X/ q" i
  1163.         }4 H' N- E' `  t: Y; V2 a' n
  1164.         
    ( ^1 s$ c1 f& G) A6 f# _1 P5 W
  1165.         if (AuthMode == 'wpa')* A, K' _) X; U5 }1 }
  1166.         {4 A  t  G: W& E! B. V: e, ?) U) X
  1167.             Form.addParameter('y.BeaconType','WPA');* p4 }- Y6 J3 M+ W0 I9 q
  1168.             Form.addParameter('y.WPAAuthenticationMode','EAPAuthentication');
    9 C5 }! s0 f' x! A6 o: x1 A  V
  1169.             Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));. ]. A2 a. ]+ @; q& D
  1170.         }+ N7 H/ E1 [) ?% X
  1171.         else if (AuthMode == 'wpa2')
    / w- a, ?3 l0 ?0 q: Q
  1172.         {- \0 F8 m0 y! z3 b4 p' }
  1173.             Form.addParameter('y.BeaconType','11i');, @4 G/ A7 B8 C4 K
  1174.             Form.addParameter('y.IEEE11iAuthenticationMode','EAPAuthentication');
    6 y+ T, r: m5 L. e3 ]) V, i# V
  1175.             Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    % K( S0 |: O2 B9 i0 ?0 I# J
  1176.         }
    % S2 ^# u, d5 n+ t+ X: X- K
  1177. else
    ' p7 h0 Y) z# i7 p
  1178. {) E" t. Q% K9 h; ]" O4 d$ A
  1179.     Form.addParameter('y.BeaconType','WPAand11i');
    . i0 r* h- ]$ @$ ?% [9 m
  1180.             Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','EAPAuthentication');; z! l+ S! Y: Y' F: E+ N2 D
  1181.             Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));; d2 d& y" g  z. U
  1182. }7 R8 O2 i: i6 }
  1183.         9 R7 c9 U8 K6 R2 x5 T
  1184.         if (wifiPasswordMask == '1')5 B! T% V4 Z% B2 V2 r/ [+ {' m
  1185.         {
    9 S2 k% e0 ^' ?# i) {
  1186.             if ( (wlRadiusKey != "********") || (radPsdModFlag == true) )
    0 N; Q# m4 b1 u, l
  1187.             {
    % u4 j2 ]" p$ k+ q
  1188.                 Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);3 h7 F9 v3 ~! U  O" _/ d. \
  1189.             }: F& E2 m7 X8 V* p
  1190.         }
    4 c- }! p" g5 b- f, r2 C& Q* v
  1191.         else
    2 w! x4 E' K4 [( S* y
  1192.         {* m7 @, V( A+ p1 Y# |+ Y
  1193.            Form.addParameter('y.X_HW_RadiusKey',wlRadiusKey);! W& i/ [4 d' N1 H( D& D
  1194.         }
    - P5 @, J! V: l$ [, P
  1195. ) z* q8 l0 I. [& Z8 r
  1196.         Form.addParameter('y.X_HW_RadiuServer',wlRadiusIPAddr);5 q7 n( i0 M$ A, c$ Y
  1197. 3 K* E5 I3 [6 i. h+ d2 J
  1198.         wlRadiusPort = parseInt(getValue('wlRadiusPort'),10);
    7 A8 V- G2 F5 q) ]
  1199.         Form.addParameter('y.X_HW_RadiusPort',wlRadiusPort);6 h0 {. J, [7 o! G3 I4 ^4 w0 w
  1200.     }6 N( U' y0 u$ e
  1201.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk')  i5 a, Z+ \* Y# T
  1202.     {. n; A8 o0 v) r2 e' B& y) k
  1203.         var value = getValue('WlanPassword_password');. n$ I" V+ a% R# ~
  1204. var wapiIP = getValue('wapiIPAddr');
    / |8 V3 V* e" B$ l
  1205. var wapiPort = getValue('wapiPort');
    ; {7 X1 X) [# q, O8 g

  1206. ! _& s$ X; V7 C0 l# C# ^+ p

  1207. * O2 f/ C7 h/ F3 n+ {
  1208. if(AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk')
    ' s% C$ e& k& i% |$ B9 b
  1209. {
    9 V  i* B' D! H. J& T

  1210. 4 p% d. {7 r+ A  I1 }7 P7 p
  1211. if (value == '')
    - x7 s" w! U2 i6 G4 f4 A+ W/ G
  1212. {
    ' `# P; X  ~1 v$ R5 T5 _* @  I
  1213. AlertEx(cfg_wlancfgother_language['amp_empty_para']);
    2 N" ?. g7 q- T
  1214. return false;
    & w; s8 M  j$ g# |- M  @
  1215. }
    . C3 j, B+ q  F  h# I
  1216. : L  m( }2 E: s. e- g3 b* p
  1217. if (isValidWPAPskKey(value) == false)2 c, \, d" E1 O! F- Y
  1218. {
    , R  t) B/ U0 G3 s/ n
  1219. AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);$ |: _8 x: Z% Q! H' ]
  1220. return false;/ a# d) ]9 \5 P% {
  1221. }
      Y. N$ i- d+ ?" a7 x
  1222. }
    5 A# l( K4 H/ V8 ~) p

  1223. - w8 j  |8 Y# H1 `
  1224.         if (AuthMode == 'wpa-psk')5 Z) f6 F' d4 F
  1225.         {; ^) e' w! J+ L+ C. v6 [' Y4 d
  1226.             Form.addParameter('y.BeaconType','WPA');
    2 a2 M. A4 X7 z- b* d/ ^+ J
  1227.             Form.addParameter('y.WPAAuthenticationMode','PSKAuthentication');
    / `- U3 i8 n8 P# g
  1228.             Form.addParameter('y.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    . T3 O2 x& i6 J6 s  \4 p# e" H
  1229.         }
    6 }9 m, k$ L0 {! k' `$ H& }
  1230.         else if (AuthMode == 'wpa2-psk')/ k* d$ @' O; b% S" }
  1231.         {+ N0 C7 J' e  Y; Z( ]
  1232.             Form.addParameter('y.BeaconType','11i');
    , I, m! a) w6 ~9 f* i
  1233.             Form.addParameter('y.IEEE11iAuthenticationMode','PSKAuthentication');: P* O. r" Q' q2 k4 {8 v
  1234.             Form.addParameter('y.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));8 e* r0 _* [" N- L( d
  1235.         }
    ' \% e- T* |7 T+ j
  1236. else if(AuthMode == 'wapi')4 \; B: V6 j8 m
  1237. {
    ! f( c' z% ^& Z2 ^: G% d: j
  1238. if (isAbcIpAddress(wapiIP) == false)
    3 s" o! D; `* F. }/ m
  1239. {
    / {$ E- p* B3 l% e6 G& H4 v- E
  1240. AlertEx(cfg_wlancfgdetail_language['amp_wapisrvip_invalid']);
      O. F- C& g9 E# d
  1241. return false;
      B3 Z$ f& U' l. h% `8 X
  1242. }- ]# Q. Q6 @" n" k  \( p
  1243. 6 p2 N6 v2 k) H. g  c" c8 v
  1244. if (isValidRadiusPort(wapiPort) == false)
    8 [( r( V* ^* t( Z* p
  1245. {3 [) D1 f/ A; D7 K
  1246. AlertEx(cfg_wlancfgdetail_language['amp_wapisrvport_invalid']);
    ! S( O# k& l' H7 c0 Y$ r
  1247. return false;9 n8 @% `- a, j- T3 j# w
  1248. }
    . [2 x; r& X; }8 b# S' b- l
  1249. Form.addParameter('y.BeaconType','X_HW_WAPI');
    . j! P) M4 y* f3 a) C/ ]# P
  1250. Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPICERT');9 t- ~3 z: d8 M& |# {
  1251. Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');0 s- p( y- a  T! X. ^
  1252. Form.addParameter('y.X_HW_WAPIServer',wapiIP);
      ^4 N# w7 U! v: g* d7 e
  1253. Form.addParameter('y.X_HW_WAPIPort',parseInt(getValue('wapiPort')),10);3 V( {% ^7 Z$ w
  1254. }- ^& b( U/ d- ]& r3 _, o; V) t4 {
  1255. else if(AuthMode == 'wapi-psk')
    ; v8 u5 `- v' v$ ^
  1256. {, R6 J" s  h3 ?  P: U
  1257. if (value == '')
    ' C: H- f! x! C
  1258. {, I9 e" w. E& K. z5 F% w2 u
  1259. AlertEx(cfg_wlancfgother_language['amp_empty_para']);
    & _* i+ }; y2 _; y0 D8 t
  1260. return false;# m2 Y& F+ W( M2 Q' m3 [  g- h9 q
  1261. }
    , ]$ v- [3 |- P6 R0 n

  1262. * ], V# e6 t" {+ m3 f8 h
  1263. if (isValidWPAPskKey(value) == false)
    : w& P4 B, i5 w4 I  H4 y; j
  1264. {
    2 a1 p2 }) o# x  p# s2 h0 ^
  1265. AlertEx(cfg_wlancfgdetail_language['amp_wpskey_invalid']);
    9 m1 q$ }3 V6 J) f
  1266. return false;
    . _& c9 f* a* Q/ m9 K8 }8 v6 T' n
  1267. }
    & Q: f0 `( t8 W
  1268. Form.addParameter('y.BeaconType','X_HW_WAPI');
    0 n. b; Z+ H! w% j9 C% n3 ~
  1269. Form.addParameter('y.X_HW_WAPIAuthenticationMode','WAPIPSK');
    5 P0 c% r: n/ F$ L/ R3 G) L
  1270. Form.addParameter('y.X_HW_WAPIEncryptionModes','SMS4');
    . z! I) L1 G' h9 M
  1271. }* s7 y$ m- m' B. B6 H+ g9 i4 G
  1272. else
    # k* l8 s# j. Y$ j3 B# [/ I
  1273.         {
    9 Y% }9 U9 }! H; ^
  1274.             Form.addParameter('y.BeaconType','WPAand11i');$ z0 j5 L% }% G4 H7 G; _+ p
  1275.             Form.addParameter('y.X_HW_WPAand11iAuthenticationMode','PSKAuthentication');
    6 i0 d8 V: L1 t9 m6 |& s) ~
  1276.             Form.addParameter('y.X_HW_WPAand11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    3 d2 L" u# b( d8 I+ W
  1277.         }3 I) g0 G$ o! A2 k5 {- \
  1278. - J& s/ Z6 {; x5 @* Q  y
  1279.         if (wifiPasswordMask == '1')2 J% D! D+ B3 b9 h5 Q# l" ~% i0 e
  1280.         {  q- F) y. s4 i4 `3 j
  1281.             if ( (value != "********") || (pskPsdModFlag == true) )
    : C# a& s  F/ \" \4 I
  1282.             {
    5 ?2 @) y! k1 J& P( o
  1283.                 Form.addParameter('k.PreSharedKey',value);# ^6 ~# |3 e% n' I+ N5 ~2 i5 p; ?+ C
  1284.             }
    0 |4 f0 H: U" j- L9 `6 Z
  1285.              7 L4 F& Y1 j2 R2 O  w
  1286.         }) F  c: n5 A( o& P7 B3 b" K" C
  1287.         else* J' l# n6 [) d
  1288.         {
    ( @4 ?- q. Q6 G  e
  1289.             Form.addParameter('k.PreSharedKey',value);( D( K. P' f( o$ q, e6 x+ f
  1290.         }! ]; s- K  e/ f3 E% P. P) g# d
  1291.     }% D3 O: F% `* Z: r
  1292.     else
    , i# f; B1 Q- p) F$ g
  1293.     {5 h3 d5 W& F$ Y6 K2 J5 m4 o
  1294.     }
    % W, @( R* Y" J

  1295. , |. Z( v' h! ?3 Y
  1296.     return true;
    ' R' T% p5 Y, D5 w5 L
  1297. }
    0 a4 P+ a4 O/ p' {  D1 {
  1298. 3 \" i$ u( N% z8 w6 f0 d# c. ~
  1299. var guiCoverSsidNotifyFlag = 0;8 n" [* m' O3 G/ {2 [

  1300. $ M. B% Q8 v: h% Y* D8 E1 O
  1301. function setCoverSsidNotifyFlag(DBvalue, WebValue)) I0 p5 m" F$ W* N; M
  1302. {, W' r7 L" O, V% X% O% p7 {
  1303.     if (DBvalue != WebValue)( I% c! }/ _  i4 q1 S, a3 L
  1304.     {
    : E& y7 p% L7 ~
  1305.         guiCoverSsidNotifyFlag++;. _. j0 j# N; s+ {$ T( y, N
  1306.     }/ G% V, u: n" H% a. r( s# `$ R1 \
  1307. }
    * r3 T. i3 I# @
  1308. / P! W! S& P4 T1 k3 I; H
  1309. function stExtendedWLC(domain, SSIDIndex)
    - C  E/ M1 ^) U5 g2 P
  1310. {
    : _* Z6 J+ p, w6 C! @
  1311.     this.domain = domain;
    ' q  c  o6 a' G, Y  y# N
  1312.     this.SSIDIndex = SSIDIndex;. H; ]' T* B- q5 j* O/ w* f3 j
  1313. }
    2 f! w' j% V) T: ?/ ?! u3 ~

  1314. 1 B8 e0 J) i9 l/ h
  1315. var apExtendedWLC = new Array(null);$ \- R- ^, H; w, Z
  1316. ! a7 w. m# T4 ?" u: R  Q
  1317. function isWifiCoverSsidNotify()% W) \- b" z: |' {5 v
  1318. {   
    0 L1 q/ x3 u! g
  1319.     if (guiCoverSsidNotifyFlag > 0)
    * X2 |1 f7 Y- t4 h4 R5 L4 I' e
  1320.     {, f0 K$ m. z+ c$ v7 N
  1321.         return true;
    ! M! |  K2 P2 @8 T: d
  1322.     }( f/ ~1 X$ [; m$ ]. M# W
  1323.     return false;
    0 `6 i% _1 m6 K5 h+ F( R! L
  1324. }. w0 N# k+ s3 _9 n6 u
  1325. : F, v  D% g: r! A& k
  1326. function isWifiCoverSsid(wlanInst)3 u( m  q! R3 F+ m
  1327. {  ]5 E* t5 f7 i/ z5 _
  1328.     for (var j = 0; j < apExtendedWLC.length - 1; j++)
    9 {% @8 ?: }. i( v/ n- ~# L
  1329.     {
    8 J( B" v& \, t4 |: J. \
  1330.         if (wlanInst == apExtendedWLC[j].SSIDIndex): n+ ?" w. J5 Q( d6 G2 ]
  1331.         {
    * l% |/ x3 z/ i* Z; h
  1332.             if (isWifiCoverSsidNotify())* k/ o) e' ?% }# \9 m- x
  1333.             {1 Q! j! W- v6 ^6 \  z& l* `) o. A
  1334.                    return true;            
    ! M9 u4 r2 G, U4 j8 b5 d
  1335.             }+ [3 O/ |6 I0 g1 i8 `' @; ?" @- q
  1336.         }
    " F5 o7 ?+ K2 k
  1337.     }
    * {+ ~7 j" g9 e8 ?

  1338. 9 _; D7 d* A( S7 |+ |; `
  1339.     return false0 d3 t% m! W1 f5 m2 L
  1340. }
    ! x) s' q" z9 h5 W( w' ~+ y
  1341. ( g$ Z. O$ \+ ]3 W1 @0 t% N
  1342. function AddParaForCover(Form)
    % L. U+ M1 G2 }7 g3 I
  1343. {
    - X  }5 o; |- h. D3 c# t
  1344.     var wlandomain = Wlan[ssidIdx].domain;& @0 {# V; Q  `, M. D
  1345.     var length = wlandomain.length;
    : V9 V% U- z9 T3 w
  1346.     var wlanInstId = parseInt(wlandomain.charAt(length-1));
    , Q9 F. Y( V- N
  1347.     var beaconType = "Basic";
    3 X' n4 z6 f/ k* n: ~
  1348. % v! N, f4 ], e( G0 o5 ]
  1349.     Form.addParameter('w.SsidInst',wlanInstId);9 V. a# w0 j9 b# P- y" A4 v+ K3 D
  1350.     ' i$ U3 L) ^# \4 R# o9 ]3 \
  1351.     Form.addParameter('w.SSID',ltrim(getValue('WlanSsid_text')));& s0 a4 m5 }% ]* N; `' R
  1352.     setCoverSsidNotifyFlag(Wlan[ssidIdx].ssid, ltrim(getValue('WlanSsid_text')));4 V# l9 }; h; P+ e
  1353.    
    ) @/ i+ Z3 x. R
  1354.     Form.addParameter('w.Enable',getCheckVal('wlEnable'));
    5 e$ `! t# J4 T& ~: `3 V: Y

  1355. 5 C0 O# m5 H# A1 A/ I# {( ^
  1356.     Form.addParameter('w.Standard',WlanWifi.mode);
    / V/ M. I! R+ p- c* ]( q. k" d) m5 S
  1357. 5 J# w! Q+ Q0 q5 H' }1 q
  1358.     Form.addParameter('w.BasicAuthenticationMode','None');
    & Q2 X6 P, `6 \. N4 d
  1359.     Form.addParameter('w.BasicEncryptionModes','WEPEncryption');3 `0 h7 N) l+ J0 V- o1 f( {
  1360.     Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');7 B. J" o( U8 b  H+ m
  1361.     Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    4 c2 U/ R- |3 K3 k3 J$ ?/ r2 V
  1362.     Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');
    # d5 w1 G7 T, U4 i! R
  1363.     Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));$ y/ f' K' A' _- |
  1364.     Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');$ Z6 l9 d8 C! ~% F2 Y
  1365.     Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
    + F% T, h3 \& b7 U5 y
  1366.    
    " t- d: J6 Z6 M9 c+ y& }! [& T
  1367.     var AuthMode = getSelectVal('WlanAuthMode_select');
    ! P- u9 A+ S; c  A# b( j; Q
  1368.     if (AuthMode == 'shared' || AuthMode == 'open')5 S5 d& c8 `2 W! W: g! C7 z
  1369.     {   
    ! n4 w4 b* L0 Z5 p; h* \$ O  m0 _
  1370.         Form.addParameter('w.BeaconType','Basic');. c7 @+ n' N( A8 ~% M+ h3 q
  1371.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'Basic');        
    : N' L6 Z+ q0 ~/ o9 q
  1372.         & w1 j1 i$ m% a3 m$ A
  1373.         Form.addParameter('w.BasicAuthenticationMode',getSelectVal('WlanWepPwd_select'));* P5 _  e% J/ n7 Q6 \7 r. p' f9 Q
  1374.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicAuthenticationMode, getSelectVal('WlanWepPwd_select'));        
      I) a! W9 o3 u; X' g
  1375.         
    + k$ ]; ~& E- f% \1 V3 Z) j" L' b8 N
  1376.         Form.addParameter('w.BasicEncryptionModes','WEPEncryption');& L0 a) T0 b3 w+ W- `2 w: w
  1377.         setCoverSsidNotifyFlag(Wlan[ssidIdx].BasicEncryptionModes, 'WEPEncryption');8 Z6 y( [0 P8 D7 C- A  c  A# s
  1378.     }
    & e- o, N9 W+ C- P
  1379.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')
    " K/ H- d. W, z
  1380.     {
    8 G# ~& B. e, T* ~  |. ]# X0 }  r
  1381.         if (AuthMode == 'wpa')
    2 h$ d, A% F( [/ `) v) s, D
  1382.         {/ n! Y; N$ n1 W% W) o3 L
  1383.             Form.addParameter('w.BeaconType','WPA');! t% q+ }& \/ {) s  y
  1384.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA');            
    # [# U9 t6 f; L
  1385.             
    . a# w4 N- {( U1 h
  1386.             beaconType = "WPA";
    % y5 j2 P  n4 t" h5 t( R9 R1 Y
  1387.             Form.addParameter('w.WPAAuthenticationMode','EAPAuthentication');1 r9 j+ ?& x2 H2 J( N" \9 G
  1388.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'EAPAuthentication');
    " s+ e) b- q3 M( z4 q$ d
  1389.             
    # S9 f5 L6 X5 G" e9 \4 n
  1390.             Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    & M2 Q6 j0 z+ ]6 t. h# _9 r
  1391.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
    + s. A1 D7 Y3 M' \, \
  1392.         }
      m. C# ^( f) m+ o# ^/ H- z& R( o
  1393.         else if (AuthMode == 'wpa2')" K' G2 }$ r  \+ A3 X5 V3 k, ?, o
  1394.         {
    ; m, b# h. t1 R9 ]1 q! V
  1395.             Form.addParameter('w.BeaconType','11i');
    2 N6 k3 e9 o6 ^; p
  1396.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');
    9 e; e# n5 l4 Y* r
  1397.             
    6 F/ N3 j- E5 ]
  1398.             beaconType = "11i";/ x; u( k8 P/ N) X6 J
  1399.             Form.addParameter('w.IEEE11iAuthenticationMode','EAPAuthentication');( Q# `2 {, y8 b" [
  1400.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'EAPAuthentication');5 ~& ~$ B5 J# J
  1401.             # \$ y: r) I7 d4 l+ E! I0 U# i- L8 _
  1402.             Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    5 Y3 h. s1 a. }' M* k3 Z
  1403.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));
    1 B8 c$ T0 x  G3 j) S
  1404.         }
    2 w( }% N# h7 U% \
  1405.         else
    ( _+ {8 g! Q) m8 g" H/ d+ n
  1406.         {
      v/ w0 O7 e) M& ]: _1 o1 O- N
  1407.             Form.addParameter('w.BeaconType','WPAand11i');1 W9 u' `, v' w/ ^
  1408.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');8 {& P0 a. x! P+ [6 u! x
  1409.             9 q( Q! `, k7 P; R  z
  1410.             beaconType = "WPAand11i";
    * O3 r1 m! H" d8 j3 Q+ i0 f/ R
  1411.             Form.addParameter('w.MixAuthenticationMode','EAPAuthentication');
    5 e  V: V" A5 S2 m  p% z  a( a* q
  1412.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'EAPAuthentication');+ x8 `/ K( x7 U! M1 i- M+ s. e
  1413.             & \+ H- J, L+ ]* U0 W) u+ t) G
  1414.             Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));
    * o* K, y% r& i* a/ q: L5 s) a% q
  1415.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));
    / {5 b$ w' {0 w/ e
  1416.         }0 R" ?1 J" M$ F+ Z
  1417.     }
    2 x( @' O: `4 K4 T+ R/ r4 `8 o, f
  1418.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'|| AuthMode == 'wapi'|| AuthMode == 'wapi-psk')' e5 w# s$ C( D
  1419.     {
    0 ?; U3 [% x: L- i" w
  1420.         if (AuthMode == 'wpa-psk')
    5 O; g) k2 r. V7 {( c( t& V
  1421.         {# g8 G% d7 S5 S& m  @- ]
  1422.             Form.addParameter('w.BeaconType','WPA');
    . ?6 U, P! l$ e" ?" L5 u
  1423.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPA');; Q5 ^2 c/ v2 a4 ^8 @/ g
  1424.             7 X9 `. R1 Y9 k7 A
  1425.             beaconType = "WPA";
    ; [: ]% [' n1 z0 X, g) Q- c
  1426.             Form.addParameter('w.WPAAuthenticationMode','PSKAuthentication');
    " P, W/ v: }$ i
  1427.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAAuthenticationMode, 'PSKAuthentication');# X5 H' p$ ?- `; K5 K
  1428.             / V, G  ^( }. T+ Z7 ~- B5 M: t1 l
  1429.             Form.addParameter('w.WPAEncryptionModes',getSelectVal('WlanPwdMode_select'));
    8 Q" b% _9 i$ Z* B( H. x( P3 T# F
  1430.             setCoverSsidNotifyFlag(Wlan[ssidIdx].WPAEncryptionModes, getSelectVal('WlanPwdMode_select'));
    , T/ \; j+ p3 g3 e$ P6 y' e
  1431.         }: O8 ?6 B3 D7 i) l# z
  1432.         else if (AuthMode == 'wpa2-psk')
    8 p1 `7 q; h+ A
  1433.         {
    8 v  ?+ G5 G1 `3 Z7 H9 B) a
  1434.             Form.addParameter('w.BeaconType','11i');) V/ }/ i2 e$ s& k, K' O0 a: F7 S' U
  1435.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, '11i');
    ( k5 x  Q# y- {5 \+ K1 `
  1436.             1 u2 }/ d( z8 {. w$ S
  1437.             beaconType = "11i";3 }; y2 F7 D$ x9 x; f
  1438.             Form.addParameter('w.IEEE11iAuthenticationMode','PSKAuthentication');0 F7 T6 |% I/ E/ b  H8 x) P
  1439.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iAuthenticationMode, 'PSKAuthentication');, j: C3 \$ ^. D/ O) c$ `3 }
  1440.             
    / v! H5 c1 n8 z  r
  1441.             Form.addParameter('w.IEEE11iEncryptionModes',getSelectVal('WlanPwdMode_select'));
    7 Z& O' `1 B' C3 o$ L" I6 `
  1442.             setCoverSsidNotifyFlag(Wlan[ssidIdx].IEEE11iEncryptionModes, getSelectVal('WlanPwdMode_select'));9 G3 K$ y  v! L9 |- e; h9 B
  1443.         }
    * D! ?3 }2 F- e" ~, L
  1444.         else if(AuthMode == 'wapi')
    8 F( P  w) F) t' @/ M; E
  1445.         {
    7 D7 @6 d$ ~1 g% h
  1446.             Form.addParameter('w.BeaconType','X_HW_WAPI');* O- K9 `4 D/ n
  1447.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');
    5 z; R! v1 u' B) P2 n$ y& B1 I2 n
  1448.             
    $ N; ^' I: c! f5 g# J9 F
  1449.             beaconType = "X_HW_WAPI";
    0 {+ p% A+ ~# @0 z- i4 O
  1450.             
    , g3 |2 f" ^  E5 x0 D
  1451.         }4 e, r( N( f6 `- e3 }( S
  1452.         else if(AuthMode == 'wapi-psk')+ L2 \0 w; `, M
  1453.         {
    3 Z! {7 k+ L: |. t
  1454.             Form.addParameter('w.BeaconType','X_HW_WAPI');
    / m7 k) o- P0 h1 }0 |+ |4 U6 j+ s
  1455.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'X_HW_WAPI');* }. \* G( {, t. B3 N4 H
  1456.             $ M4 q' t7 z4 x$ N
  1457.             beaconType = "X_HW_WAPI";
    ) @0 o  B; u1 g# t! N# u0 q
  1458.         }# t( n- U9 U: o  U
  1459.         else8 v9 C3 u7 A( P/ A
  1460.         {7 ^# s  D) D8 f% b0 ?
  1461.             Form.addParameter('w.BeaconType','WPAand11i');
      t  ^9 l* ~& R  C; w
  1462.             setCoverSsidNotifyFlag(Wlan[ssidIdx].BeaconType, 'WPAand11i');
    2 Z4 F5 V9 w1 Z
  1463.             ! f6 I  Q1 n7 V  n$ I4 Y
  1464.             beaconType = "WPAand11i";
    : u  O  a1 A2 K" d* H& ~0 g) e
  1465.             Form.addParameter('w.MixAuthenticationMode','PSKAuthentication');
    2 C! X1 ]: K8 ~& ?+ @5 d8 l
  1466.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iAuthenticationMode, 'PSKAuthentication');$ [! \( P( U( U+ K. d
  1467.             
    6 Z0 X4 \  q$ V5 X- H. ?
  1468.             Form.addParameter('w.MixEncryptionModes',getSelectVal('WlanPwdMode_select'));, k9 A0 L3 `. m' ^
  1469.             setCoverSsidNotifyFlag(Wlan[ssidIdx].X_HW_WPAand11iEncryptionModes, getSelectVal('WlanPwdMode_select'));  {5 G7 |  a( J" `
  1470.         }
    5 J8 n3 @. G1 V8 V3 C9 N
  1471.     }5 S/ v+ Q& x1 I: g- }5 x( `. |
  1472.     var KeyBit = getSelectVal('WlanKeyBit_select');   
    # c; M! e6 D5 u- a  ~+ Q% p
  1473.     Form.addParameter('w.WEPEncryptionLevel',(KeyBit-24)+'-bit');
    * s8 d( F9 \- _. s
  1474.     setCoverSsidNotifyFlag(Wlan[ssidIdx].EncypBit, (KeyBit-24)+'-bit');1 o) b6 u* a2 [9 J8 g# J
  1475.    
    # e9 _: ?' ^% P" x% x
  1476.     //var keyIndex = getSelectVal('wlKeyIndex');7 v( w* y9 K& x% z
  1477.     var keyIndex = 1;# E, d% Y5 m$ k) _/ m# r
  1478.     Form.addParameter('w.WEPKeyIndex', keyIndex);            4 {$ G- O* a# y; e8 U6 {% `
  1479.    
    ! B" F, ^0 G) L0 \; x
  1480.     var weppsdModifyFLag = false;
    1 \3 N% W2 M  z0 I" i8 Z
  1481.     var key;
    0 v  W! ]# p5 q8 n8 w. |
  1482.     if (1 == keyIndex)
    : |5 `' f+ w. o) A& m# _. d1 z
  1483.     {
    / g& I( q$ i% O3 A
  1484.         key = getValue('wlKeys1');, G- h8 E0 X( E, k9 D+ `
  1485.         weppsdModifyFLag = wep1PsdModFlag;) b5 b1 O1 P8 x# h. }0 y9 K# W. s
  1486.     }
    2 r$ Y/ W. O6 Q/ n
  1487.     else if (2 == keyIndex)
    + x, _3 Q% R1 x( I/ w& z* L
  1488.     {
    ( E2 {& x4 A/ U( B/ E
  1489.         key = getValue('wlKeys2');# ]7 }0 O; m+ e" K. q$ E
  1490.         weppsdModifyFLag = wep2PsdModFlag;- }: A0 E3 d/ g- L3 {  ?$ \1 t1 {
  1491.     }& m+ g! k5 A, h( t4 W
  1492.     else if (3 == keyIndex). |7 L1 H2 z0 v& S/ {/ }7 A
  1493.     {$ K* F3 F: _9 @7 e
  1494.         key = getValue('wlKeys3');; K6 ]" L, u: M3 F  w
  1495.         weppsdModifyFLag = wep3PsdModFlag;# E, k5 s2 G. i$ @2 R/ O
  1496.     }
    + B, e  f% O0 N/ W8 q! j5 W
  1497.     else  if (4 == keyIndex)3 D# A. ]% t# R
  1498.     {
    6 N3 X  ]) {+ p/ E
  1499.         key = getValue('wlKeys4');
    ' Q& I' \/ m: `7 C. i6 z
  1500.         weppsdModifyFLag = wep4PsdModFlag;/ k7 J- ]4 S+ j) J! x0 h
  1501.     }
    3 R9 v, q6 B0 j, J, c3 o8 q5 l: G
  1502. 1 Y; a3 r+ m; I
  1503.     if ("Basic" != beaconType)! x. e4 r8 D& [' u/ k* l# s
  1504.     {
    5 o! ]: g; t: \
  1505.         key = getValue('WlanPassword_password');
    $ g7 ]" g8 v3 `4 x; a
  1506.     }    " q9 j7 v& P' P! Z! b. w5 Z
  1507.    
    # _/ Z* f. p' k( s6 d
  1508.     if (wifiPasswordMask == '1')
    * B$ \# q+ j4 W" A
  1509.     {
    + r6 ~# ?9 K& `$ Y+ d
  1510.         if ("Basic" != beaconType) + p$ V1 u$ x; r% L
  1511.         {$ L' V9 C" n, s, K
  1512.             if ( (key != "********") || (pskPsdModFlag == true) )
    ) D( a7 w) p4 g! M! Y# _' K9 V
  1513.             {
    # h/ @+ E4 y' r7 t2 _
  1514.                 Form.addParameter('w.Key', key);% A4 }% N* f- X6 A3 ]% L4 _4 h
  1515.             }
    3 d7 V: P8 Q- L: N% o
  1516.         }
    3 @! J: ~) \0 R0 u! [+ x( Z. |) w
  1517.         else
    ' H1 j1 L/ ?% \7 \* k
  1518.         {
    2 |% b8 O# @1 k) K3 R: n1 z1 B
  1519.             if ('WEPEncryption' == getSelectVal('WlanPwdMode_select'))
      I+ J& _4 s1 B5 x0 h+ O0 ?
  1520.             {
    # F3 o; @' W2 I$ Q) T0 `3 @/ M
  1521.                 if (KeyBit == '128')
      L4 E+ \/ e( i: x5 S0 b
  1522.                 {
    : L7 N7 v+ c8 R; c$ B
  1523.                     if ( (key != "*************") || (weppsdModifyFLag == true) )0 j9 l: t  ?5 a7 X
  1524.                     {                        
    : P: f$ T* {, k4 Y1 _0 i" Q* j8 y) w
  1525.                         Form.addParameter('w.Key', key);0 R& I9 ~4 l8 V1 n& y$ |
  1526.                     }
    , y8 F. f; I$ r
  1527.                 }
    7 P$ B( ?5 f+ c% V9 ?
  1528.                 else
    % u3 F+ T5 q) _3 F$ O& o
  1529.                 {
    8 |# I! p* ]+ K
  1530.                     if ( (key != "*****") || (weppsdModifyFLag == true) )
    : {( A  I1 f8 s: k* r  N( [1 U
  1531.                     {8 V" K" e& e3 r
  1532.                         Form.addParameter('w.Key', key);
    . C5 c& X+ U9 k
  1533.                     }9 I" x- e1 ^. b  o3 }! }6 Y: V
  1534.                 }7 I) S3 Z. g# @, j% T
  1535.             }! E) s) Z+ w$ N. ]- ~6 l3 a3 Q# E0 m
  1536.         }
    : O1 K/ E3 J0 z5 Q# @! O4 h; W
  1537.     }: ~' P' f! N$ }- T4 Q3 B
  1538.     else- `2 m( a1 N7 X$ S8 L
  1539.     {: ^( m9 Y& _! A/ G" G9 ^& X
  1540.         Form.addParameter('w.Key', key);
    / _& W% M8 e* V* d. R! T' M
  1541.     }$ i1 y+ j' y3 E9 _1 L7 p; ^, g
  1542.    
    4 l' U3 i1 z: O& k+ d) C: T

  1543. % ]( k% ]8 w9 y' j8 c
  1544.     if ("Basic" != beaconType): c8 n- _6 V- V2 Q  V; ?' }
  1545.     {
    - \. R0 _; [! Z5 n& l
  1546.         setCoverSsidNotifyFlag(wpaPskKey[ssidIdx].value, key);
    1 U$ L; f6 m, |. l
  1547.     }# l/ ?" v, K, s' r
  1548.     else
    ( ^2 G/ D$ m) v8 c
  1549.     {
    - l4 v( L; ~0 y) M' y! M  ?
  1550.         if (('WEPEncryption' == getSelectVal('WlanPwdMode_select')) && (1 <= keyIndex) && (keyIndex <= 4))
    9 R; o6 {" ^  z- N" H3 D! I
  1551.         {
    & `/ G& t$ j# X+ W  F+ H
  1552.             setCoverSsidNotifyFlag(Wlan[ssidIdx].KeyIndex, keyIndex);& u; A# a' O4 [5 f( X
  1553.             setCoverSsidNotifyFlag(g_keys[ssidIdx * 4 + (keyIndex - 1)].value, key);
    2 f* T5 T: f. K8 }/ X, i
  1554.         }. m6 c7 E! ^7 T( h: k
  1555.     }
    ; T+ g9 m8 v$ Y1 z  s
  1556.     , R2 r( f- ^6 g# O
  1557.     return true;5 z; V2 v# f* H- g; _" d
  1558. }+ M1 \6 S, v3 O$ @7 A1 N

  1559.   K1 V3 H6 r3 f8 s* `
  1560. function SubmitForm(). }% y- n7 I2 Y/ s2 X' g
  1561. {
    & ]0 i3 c$ y% l8 R" W9 X* [
  1562.     var Form = new webSubmitForm();
    , X! t; @) e2 B" ?; H4 m  }
  1563. . @$ c* C) `) _: M! \+ m
  1564.     if (addParameter1(Form) == false)8 N$ O8 u- u( F  _3 e/ K
  1565.     {
    2 H: l; ?" v6 X) v; c
  1566. setDisable('Save_button',0);
    . p  ]2 L' C2 O7 n
  1567.     setDisable('Cancel_button',0);6 _( _* y5 B0 w9 e1 B! q
  1568. return;/ |! m$ F  y, Y, ^7 I4 t
  1569.     }
    $ x: {, H( j3 F% Y2 |. m  G
  1570.     6 \# ~1 x. z4 I8 }, N
  1571.     if (addParameter2(Form) == false)
    + v$ J' N  [" P6 K
  1572.     {4 O2 g0 K4 y7 W4 E" ~- q2 E  `3 ]4 T" @
  1573. setDisable('Save_button',0);# Y: P( ~8 y9 y) D, j, d
  1574.     setDisable('Cancel_button',0);   
    0 x- B0 \( H. W4 i  z
  1575.         return;
    , @* K$ G2 K. O, W& Z
  1576.     }
    ; n* A2 y3 k; k5 S7 N/ T
  1577.     , s! X6 c  a9 b  Y0 n( o
  1578.     if (AddParaForCover(Form) == false)
    + s9 J4 p$ ^/ ~% z
  1579.     {
    1 W- }; y$ z$ C! Y
  1580.     setDisable('Save_button',0);
    3 o, L. s* \: X& H
  1581.     setDisable('Cancel_button',0);     
    3 [, I: r0 s1 l
  1582.         return;
    0 p- \8 u9 s; ?+ |* w
  1583.     }; `2 `9 i! p+ ?  @6 M1 C. F
  1584.     0 w1 }9 f8 m5 ?4 e4 `8 K' u/ s
  1585.     var wlandomain = Wlan[ssidIdx].domain;4 t3 H' @: d' Z
  1586.     var AuthMode = getSelectVal('WlanAuthMode_select');4 i4 v- b0 f3 A

  1587. 9 s' p+ ^. i0 h2 {' i+ F  g" g
  1588.     if (isWifiCoverSsid(getWlanInstFromDomain(wlandomain)))$ `# q$ _3 Y7 w: e* ^
  1589.     {
    1 \, S& c$ i4 ?  L) S
  1590.         if (false == ConfirmEx(cfg_wificover_basic_language['amp_wificover_ssid_change_notify']))
    6 s6 a* \4 Y! \# V8 {- a2 v
  1591.         {& u" I3 Y3 M( o' W2 B' F- e
  1592.             guiCoverSsidNotifyFlag = 0;  w, X1 A2 |  }0 i# L& S
  1593.             setDisable('Save_button',0);- }: |) N1 c" x; a- o
  1594.             setDisable('Cancel_button',0);           
    ) N- Y! W- g* t7 x9 M, _  C
  1595.             return;, Y' Z0 n, |7 E4 j
  1596.         }* x2 U- B% ]" Y. ]# r$ x& A2 ]7 O
  1597.     }      2 {# P1 G0 {' n8 M
  1598. * p9 V0 }$ ^7 j% w
  1599. 2 T7 l& r4 `/ F) U
  1600. var url;) f9 n7 y" g- p. @& ~0 M
  1601. 8 w1 T( Z6 K+ f) m  a
  1602. if (AuthMode == 'open')) w) o, N2 e7 }1 O  h+ B- e) u  v) W
  1603. {# E* Z, G. K2 i& m4 s
  1604. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;
    # ~1 g3 R" j% c: p7 {% `7 `- Z
  1605. }
    ) k( m, s+ Q- R7 j6 r6 A
  1606.     else if (AuthMode == 'shared')
    . U% \' L  }8 Q8 M4 Z: Y
  1607.     {1 }  h( a4 u; Y3 y6 P8 Y3 X3 f6 ~
  1608.         url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
    * s1 v1 s1 b- r
  1609.                     + '&k1=' + wlandomain + '.WEPKey.1', ^  \+ l7 z0 L7 \% G' w5 i  v' K
  1610.                     + '&k2=' + wlandomain + '.WEPKey.2'% A. ?6 n! b: q3 B
  1611.                     + '&k3=' + wlandomain + '.WEPKey.3'
    2 @& _* Y4 U" W0 H0 ^" r
  1612.                     + '&k4=' + wlandomain + '.WEPKey.4';! ?/ P1 i/ u! E: m) m* q
  1613.     }# A) w& Z* ~3 T3 \: f
  1614.     else if (AuthMode == 'wpa' || AuthMode == 'wpa2' || AuthMode == 'wpa/wpa2')) k  _3 t2 L3 y0 \: U, B
  1615.     {" b1 R% w, d/ k3 t
  1616. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain;, l6 b$ d1 U" W1 o8 H; i! Y4 t
  1617.     }
    0 J- b; T7 w. B8 x4 ?( W
  1618.     else if (AuthMode == 'wpa-psk' || AuthMode == 'wpa2-psk' || AuthMode == 'wpa/wpa2-psk'), J5 ~$ r. N) P, n/ d2 u
  1619.     {
    : P7 Y8 L8 b/ |" {- N
  1620.         url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain
    / D* E* A0 T( v+ q! d
  1621.                     + '&k=' + wlandomain + '.PreSharedKey.1';
    , z* f" N. i& e( O) y3 c7 f
  1622.     }
    " n* c5 R7 E0 V
  1623. else if(AuthMode == 'wapi' || AuthMode == 'wapi-psk'); i9 @8 Z2 F% t
  1624. {! p- i- _" U" E& e1 o/ H. m1 x
  1625. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&y=' + wlandomain% X+ B9 M- y5 Y0 q' J
  1626.    +'&k=' + wlandomain + '.PreSharedKey.1';8 Q: F8 s( p  D# K6 X
  1627. }/ W, I5 Z) [7 D8 @- y. ~  b: O
  1628.     else  u# N; S+ Z7 v5 @
  1629.     {& k' Y. }+ G! U$ c8 d% ^
  1630. url = 'set.cgi?w=InternetGatewayDevice.X_HW_DEBUG.AMP.WifiCoverSetWlanBasic&x=InternetGatewayDevice.LANDevice.1'! H( z# K. t0 V$ l' v- p0 g
  1631.                     + '&y=' + wlandomain;, V0 d- w' w1 F; \) m7 L
  1632.     }
    , X6 P# E% x; E& ^; o
  1633. % H" Z) b3 }8 V3 P+ U! F
  1634. url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';# C. O- m/ z! i4 W" Y
  1635. Form.setAction(url);
    $ u( @! S. }: V+ X3 X

  1636. 0 T4 a1 @2 y! y( z# @, s' L# V4 p
  1637.     setDisable('Save_button',1);$ I5 g( k! D) T( F7 A2 ~9 `1 K
  1638.     setDisable('Cancel_button',1);! l; c5 U: j9 q2 H  ~7 \
  1639. Form.addParameter('x.X_HW_Token', getValue('onttoken'));+ |& _4 G9 B* m. G1 G# n
  1640.     Form.submit();; L! s7 X8 X/ d  A7 v2 {
  1641. }  ^/ A$ N/ \' t0 e0 j4 i9 y8 H

  1642. ; m5 \- Y6 }/ u3 B% Q' F5 x/ |
  1643. function WlanBasic(enable)
    7 k( ^$ v5 T9 g& ]2 R5 P1 R
  1644. {
      |. t9 U4 p9 I& E# T  {7 Y
  1645. setDisplay('wlanBasicCfg',1);5 n, e7 G: Q) E6 x# W/ L
  1646. setCheck('WlanEnable_checkbox', enable);$ ^2 d# X: o1 l! F: }8 J7 {
  1647. % [; ?" l4 Z; _, L  p- y+ A+ l+ Q
  1648. if ((1 == enable) && (WlanArr[0] != null))
    + n+ v  }/ a* Y9 T4 K
  1649. {5 W9 ?' M' S# X# m
  1650.     ssidIdx = 0;5 [2 Z0 J& s7 Y; B; i! u

  1651. , T: F# |2 t; ]; Z& {
  1652. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage) && (uiTotal5gNum > 0))
    $ b. p, ~. s9 M
  1653. {: _  ?! O1 X! O$ v5 b" Q0 F
  1654. FirstRecordFor5G();: c9 ]: N0 T7 e7 m
  1655. selectLine('record_' + RecordFor5G);( @! z2 ~' B1 K' Z$ W; p! g* h
  1656. , D* I) K4 f% I$ c+ b. J) j1 g; g
  1657. }* s, W9 @7 D7 _
  1658.         else if((1 == DoubleFreqFlag) && ("2G" == wlanpage) && ((uiTotal2gNum > 0)))/ Z' h/ Z& k$ y% W' |$ [1 \
  1659.         {
    2 n3 \$ C; e, n7 y- D
  1660. FirstRecordFor2G();2 L* L7 l% u7 N* V& s4 x* ]
  1661. selectLine('record_' + RecordFor2G);
    / V# ]; y' v+ ?
  1662.         }. C. A4 P6 [0 f- g8 y! t- S+ h& V
  1663. else if (uiTotalNum > 0)
    ! j3 |9 N7 m2 f5 z1 m
  1664. {
    ; B. N) Z6 z8 J9 ?9 Y$ k
  1665. selectLine('record_0');8 T4 h3 f7 k4 p* X/ l- Y; e" Q- G: k
  1666. }
    - K' z+ A0 Z8 B: J- B

  1667. % {+ N  m  b4 m& z3 P4 w
  1668.     setDisplay('wlanCfg',1);- M" z6 O8 C- Q9 S
  1669.     var authMode = Wlan[ssidIdx].BeaconType;1 `" `% e, A7 A. j/ p6 T
  1670. beaconTypeChange(authMode); - H. u2 d' P9 i- T2 @9 a; f/ V
  1671. }
    4 b3 P; f; `. o( }# c; Q) a6 \
  1672. else  n) H/ z- p+ m- Y1 a2 R
  1673. {, C  g: x5 Q& `) P1 i3 u- ]
  1674.     setDisplay('wlanCfg',0);
    # B6 c4 W% ~. s+ X+ T& C
  1675. }4 r/ q$ u" t" t
  1676. }, @/ i0 q8 k5 M2 f0 w( D

  1677. 5 r# G# T* Z- m3 T6 e4 G( Y
  1678. function BindPsdModifyEvent()
    $ n/ t( d; S  w" q" L) w
  1679. {# ^% X1 I# }8 @$ z7 [% V
  1680.     $('#wlKeys1').bind("propertychange input", function(){ 3 T( n/ I' M$ Q1 t2 T. N
  1681.         var KeyBit = getSelectVal('WlanKeyBit_select');& M$ X( v7 L& J$ l1 y6 N9 @
  1682.         if (KeyBit == '128')
    2 w! H( P" m! U! W" g7 o
  1683.         {. [2 Z0 Y% X: {3 E, J& t
  1684.             if (getValue('wlKeys1') != "*************")
    0 M# E! t4 p/ B, r- w6 \: ]
  1685.             {
    1 F$ O0 h+ b! h/ B1 x/ t7 A( D
  1686.                 wep1PsdModFlag = true;; h% f9 J( Q. n' s/ w8 V* T' P
  1687.             }            
    - ^$ m4 q8 i5 f, I
  1688.         }( }% f/ \7 G! {- L! Z; s3 {) x
  1689.         else : o& |0 |3 Z0 F* H! |* s+ m
  1690.         {
    / C/ q$ H$ O6 e: Q8 H! E
  1691.             if(getValue('wlKeys1') != "*****") * m2 }# u5 f: M5 a' w1 a( B
  1692.             {" Z3 V' U& f3 ?& Q* F$ S# I' ~
  1693.                 wep1PsdModFlag = true;
    + z2 f, f9 H5 W- ?7 \, O
  1694.             }+ Y/ Y1 [; f/ D1 W) {: @
  1695.         }
    8 ]4 ?! c6 L6 z- S$ M
  1696.     } );
    3 Z: f6 _1 q) T

  1697. + @, x2 B% {# H& h1 S
  1698.     $('#WlanPassword_password').bind("propertychange input", function(){ ) i! ]: t0 x4 R% W- h/ @& N
  1699.         if(getValue('WlanPassword_password') != "********") 9 O& |4 n) x  j, a! I/ n2 f" |
  1700.         {
    8 f9 H0 Y) U! P3 N7 r0 g
  1701.             pskPsdModFlag = true;
    ; a% [- F& U) m* G& X, ~
  1702.         }
    * q+ o- K6 w6 l2 P
  1703.     } );( A0 D4 _8 r) l0 \' b

  1704. 5 `& y, _# m' J& d  S
  1705.     $('#wlRadiusKey').bind("propertychange input", function(){ : X0 p0 K& m9 D- q9 ?, {2 F9 T5 g
  1706.         if(getValue('wlRadiusKey') != "********")
    + l6 F5 a* S! l9 m0 M2 c
  1707.         {+ l& n5 L. a$ e% w9 e; o) P% K2 w  X, }3 w
  1708.             radPsdModFlag = true;
    : p2 r. ?8 |& ?1 K" y8 n
  1709.         }
    - O, D! P, O( j# `8 B: q& A9 U* y
  1710.     } );1 F5 q' _2 D2 {
  1711. }
    & D! L9 H$ {8 b$ _& N( S: W  u

  1712. : J: P& W, H; A' ~( f: N
  1713. 7 M0 c5 ~: u% z- |' M
  1714. 0 f+ Y+ Z7 U1 ~0 P( q  z9 L
  1715. function LoadFrame()
    8 Q/ \; O3 r6 o0 H) q$ G
  1716. {   
    : E8 P4 r$ B  w
  1717. var flag5G =0;
    2 g! A+ \" a! Y6 y$ X: Q& h7 U
  1718. var flag2G =0;
    / [2 O. r; S- z

  1719. + f( a: l1 N  |
  1720. Total2gNum();
    $ X* t2 {1 L- r3 W) Z* k+ ^. h
  1721. 6 t. h4 l& y+ _: ?: i% H: D
  1722. if (enbl == ''); B- x4 v$ t/ G, A
  1723.     {/ H  S  c. Q# m. `& \+ a
  1724.         setDisplay('wlanBasicCfg',0);+ W; N+ F4 @, J3 O
  1725.     }( p8 z$ E" B: G/ f/ h
  1726.     else1 k) {6 k& k9 c& Y' ?* S! c4 S, Q/ N
  1727.     {
    3 V6 E1 v$ ]) F3 h
  1728. setDisplay('ConfigForm',1);
    - G2 Y" m, k8 h% v. y: v6 S/ p
  1729.         if (1 == DoubleFreqFlag)
    ( G# s4 g/ C3 c7 Z3 S: |' A* y
  1730. {6 ]6 w( s1 U; ~3 w* [2 E! X# l* m
  1731.     FirstRecordFor5G();- B6 J! ?+ Z- F; S4 g1 `

  1732. 2 c  U! a, k8 h# V0 [
  1733.             if ('2G' == wlanpage)
    / W; I2 O2 Q* X
  1734.             {
    ) _1 c. {4 k3 ~0 k8 Q
  1735.                 WlanBasic(enbl2G);
    9 @! V+ E; T5 K8 }( i. s  N& w
  1736.             }( {  Z; A7 l: w. f

  1737. 7 \5 _& g- u; C2 t
  1738.             if ('5G' == wlanpage)
    & f: [# _$ G6 M9 n
  1739.             {# F# h2 L9 S8 U: a% B
  1740.                 WlanBasic(enbl5G);" h* V$ ^; M# Y  u( O8 w! @( A
  1741.             }
    * v& x: h: l9 V" ]& {
  1742. }
    4 N8 c4 W( Z3 y& z+ s3 }$ ^+ Z
  1743. else
    . ?  j% o: s5 q
  1744. {
    , k" m! C" R+ p
  1745. WlanBasic(enbl);- z6 ?1 w4 p+ f' z
  1746. }
    & p5 Y5 ~1 y5 N
  1747.     }
    6 O6 P; \+ }2 B' A+ S4 H
  1748. , F( a5 M  O9 k+ o
  1749. if (1 == DoubleFreqFlag)2 p2 g0 t$ e+ F% P2 N
  1750. {
    ( J3 ?2 {+ y5 w) p: L
  1751. if("2G" == wlanpage)2 @/ J6 b" t3 I* _
  1752. {# Z/ `* k. X$ e' J4 t* C
  1753. for(var j = 0; j < WlanMap.length; j++)% F/ G0 L5 G/ Y$ z) P6 N5 x% |4 l* Z
  1754. {
    # Q6 P) Q# c3 B! a
  1755. if(WlanMap[j].portIndex < 4 )
    - E, r, B0 U0 p5 r: W5 ~
  1756. {
    ( c  p1 W, [6 K! K6 R
  1757. flag2G+++ H2 |2 m. x+ v% W. ]
  1758. }
    4 q9 ^% L  P3 Q! ~
  1759. }" ]# n  V1 P9 B% `
  1760. if(flag2G > 0)6 V4 Z+ B7 ]. K
  1761. {7 L9 B) n% Y1 X( T# K4 H
  1762. setDisplay('ssidDetail',1);
    , p5 x8 C- e0 P& M) ^
  1763. }4 Y9 e" H8 U1 z$ T- G& k
  1764. else
    ) ?! V" R5 \! b
  1765. {, ]. x5 h- k8 n4 E7 U! t3 \3 X8 P* p
  1766. setDisplay('ssidDetail',0);
    2 w) M' E3 `! M
  1767. }2 c$ K0 t$ R/ u+ b% d* j
  1768. }3 t  v% k) u) v+ c3 a. a* P# S

  1769.   d. ~- b5 p2 ?4 R' Z7 Q
  1770. if("5G" == wlanpage)
    4 o  c: Z# h1 Y! u# R9 V
  1771. {
    ( g+ b! M( [4 W
  1772. for(var j = 0; j < WlanMap.length; j++)
    ! x+ w* `: ?7 E" d  U8 {+ z4 ]5 C
  1773. {6 v4 p0 f1 v) A9 J* q7 b
  1774. if(WlanMap[j].portIndex >= 4 )3 |" t0 B. _" R# @3 Y
  1775. {" a4 c% a; G" C' K% k
  1776. flag5G++' P( o7 ?; ?5 G
  1777. }* J7 z6 C- f$ h) B
  1778. }( I0 G, J& Y5 J. |, n
  1779. if(flag5G > 0)
    ( K3 k5 D4 c4 B# u8 x
  1780. {; X$ x! {% e0 ^  @9 K5 k: W0 J
  1781. setDisplay('ssidDetail',1);
    2 m4 F9 m/ c3 N' l0 @
  1782. }5 }' e' @" q% e9 t
  1783. else
    : L% I/ R/ e0 d* q/ n% q. C
  1784. {
    0 j7 K( Y% U0 K- y
  1785. setDisplay('ssidDetail',0);) T, v# P0 w# w+ s! t
  1786. }) `, y4 l/ I+ `; J1 v5 O, A$ r
  1787. }
    7 L; `4 L. ?; ~6 }$ F% s" z
  1788. }3 ^6 z( O: U7 G0 e: Q, r1 l
  1789. else
    4 y- g. y9 W  U- N. d  D
  1790.     {
    : V* h! a' j8 W/ [6 f
  1791. if(0 == WlanMap.length)$ v6 c1 p, f* d9 C. X
  1792. {
    9 i, O8 A+ [+ a0 Z, n7 H! O" e
  1793.         setDisplay('ssidDetail',0);0 a( s5 Y% |- p, j5 @( e8 t
  1794. }/ N9 Z8 L: y/ t
  1795.     }
    7 \  [. z) Y. R- K& B( d( ]

  1796. 2 ]' P! k8 E4 z9 s3 i6 X/ a1 \
  1797.     addAuthModeOption();
    4 Y' Q  o3 H" h1 v2 P2 q$ O" W; L( {% b

  1798. & `6 h0 _% }$ ]
  1799. WlanKeyBit_selectChange();6 e5 F: Q- q: U1 N

  1800. + a+ X. n9 _) z) _( d
  1801. if (1 == '0')
    1 I1 H4 e! ]: u9 Y
  1802. {+ b, P; y" J6 v2 U
  1803. setDisable("WlanPwdMode_select",1);5 \+ y5 ^8 z2 T3 A% l, z
  1804. setDisable("WlanAuthMode_select",1);
    5 {2 o, j0 T4 c. v/ L6 {8 `* @
  1805. }3 Z/ p% H! d2 v  Y8 u

  1806. . e% e9 R6 @* m  F' X3 @9 q
  1807.     if (wifiPasswordMask == 1)) j, b" ^1 A4 T
  1808.     {4 }1 g8 F: u# _) d# C6 r
  1809.         BindPsdModifyEvent();) l3 S& s/ P- b( z! v
  1810.         
    $ `6 }- T+ ?8 [8 z% b6 z$ {
  1811.     setDisable('hidewlRadiusKey', 1);
    % {# B. F. W$ o% R
  1812.     setDisable('hidewlKeys', 1);
    ) p2 e. e1 w; z5 D% J: a1 h9 z
  1813.     setDisable('CheckoutPassword_button', 1);   
    ' {! H  r4 k  [% k. E# b/ @, j
  1814.     }4 o: q7 h# [2 D, w& x& w# f

  1815. # B: A& ^* Q0 A" M
  1816. var all = document.getElementsByTagName("td");# R* R2 M  y% _, J# v
  1817. for (var i = 0; i <all.length ; i++) # n7 M5 I) b( h. M2 {; L
  1818. {
    2 x) l" _- Y+ _; _' }/ F- V
  1819. var b = all[i];) x3 u  Z: m9 u. _* N
  1820. if(b.getAttribute("BindText") == null)
    : h9 t# p$ v8 R, v5 I
  1821. {
    7 |+ c: p1 J- j" ?
  1822. continue;
    . i8 g3 C  q- n' S
  1823. }8 p  [* B' U% s7 n: [/ G7 d
  1824. / \% ^6 J& `% M+ B
  1825. if (cfg_wlancfgbasic_language[b.getAttribute("BindText")]) {
    - I7 r* W: r3 y$ _9 r  T' O
  1826. b.innerHTML = cfg_wlancfgbasic_language[b.getAttribute("BindText")];2 M& ?- n# F% s2 Z% n; K: ~
  1827. } else if (cfg_wlancfgdetail_language[b.getAttribute("BindText")]) {
    : d  R! Z5 _  d1 r
  1828. b.innerHTML = cfg_wlancfgdetail_language[b.getAttribute("BindText")];. a) L/ l; C# G. y1 D% [  x6 i
  1829. } else if (cfg_wlancfgadvance_language[b.getAttribute("BindText")]) {1 g7 R. c3 G5 T
  1830. b.innerHTML = cfg_wlancfgadvance_language[b.getAttribute("BindText")];
    & n3 h6 r9 V6 t! h3 I5 E9 _9 u
  1831. } else if (cfg_wlancfgother_language[b.getAttribute("BindText")]) {
    , W1 r* s7 r" _$ M+ U8 a7 u
  1832. b.innerHTML = cfg_wlancfgother_language[b.getAttribute("BindText")];
    + D( z3 z% z2 G. h
  1833. } else if (cfg_wlanzone_language[b.getAttribute("BindText")]) {
    / P4 |8 ^) P2 m* t+ E
  1834. b.innerHTML = cfg_wlanzone_language[b.getAttribute("BindText")];7 C, U! V" [+ T/ M
  1835. }
    % S1 m' `- T! J8 Z6 J. u
  1836. }
    / U- Q; Y$ X0 p7 ^2 f+ ]  D
  1837. , z" I4 n8 W7 V2 a3 O- h0 H6 s' L
  1838. if (g_keys[0] != null)
    & a0 M: x) a8 M2 O0 A3 N6 i. I0 k
  1839.     {
    6 I4 n( Y/ r: C; f* A6 E
  1840.         document.getElementById('wlKeys1').title = posswordComplexTitle;
    + Q9 {. a; m8 t4 W: S; K/ t
  1841.         document.getElementById('twlKeys1').title = posswordComplexTitle;  6 M! f6 B+ B* z% h; ~4 W6 K" [
  1842.     }
    4 T* R; U0 j6 a
  1843.     document.getElementById('WlanPassword_password').title = posswordComplexTitle;
    9 X! ]+ i+ a8 T& w+ e( U
  1844.     document.getElementById('tWlanPassword_password').title = posswordComplexTitle;) Z* v! G! U- U9 C& u: ?
  1845.     document.getElementById('wlRadiusKey').title = posswordComplexTitle;; o9 M& |% P) y  J' Z4 O
  1846.     document.getElementById('twlRadiusKey').title = posswordComplexTitle;* X  T0 m" x3 o* k" U  U3 G
  1847. }
    $ a7 H0 ]7 d' a8 C; t  h" s; Y
  1848. # Y  _! P+ y8 x/ k/ k3 V! \: ~
  1849. function ApplySubmit1()
    # q9 n& L# U9 }8 {7 x. }- R
  1850. {/ W/ n/ x( Z$ g- G, |
  1851.     var Form = new webSubmitForm();   
    . K% Y$ W8 _) m

  1852. 3 k3 ?$ V5 o1 i
  1853.     if (addParameter1(Form) == false)- ~# ]2 _9 R/ u) }
  1854.     {- v& `5 s0 Z/ P1 I; U' v; ^
  1855.         setDisable('Save_button',0);1 W( Q: F# b5 Z: U" V
  1856.         setDisable('Cancel_button',0);
    . a$ e' `; \4 A: D
  1857.         return;7 [: f0 I; f: Q0 X
  1858.     }
    ! Z7 Y3 `7 O7 L7 F
  1859.    
    5 z. K3 T. J6 i$ g
  1860. if (1 == DoubleFreqFlag)
    ! A: S$ ~7 O$ ^5 b) [
  1861. {
    ) ~) i/ M7 a$ K* K8 C
  1862. if ("2G" == wlanpage)
      w# _, F' T8 B5 L6 w  h: i* B+ Q
  1863. {8 C& }. ]' J7 z+ g5 @# z6 `  Q
  1864.   Form.addParameter('y.LowerLayers', node2G);2 j$ h$ \( }: c" m
  1865. Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
    1 k: {: Y5 d0 S
  1866.                + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');  P) d! L9 [% q" j
  1867. }
    4 [0 W+ x9 v  X) P. }" p- K) F
  1868. else if ("5G" == wlanpage)
    : c. r- F4 O& m2 J/ d, F4 r
  1869. {4 ^4 `7 ^! P: Y
  1870.   Form.addParameter('y.LowerLayers', node5G);
    & h1 V1 L/ A& D5 N1 k
  1871. Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration'
    ' `6 I' z9 `2 @) A# i6 I) l
  1872.                + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');5 s+ {3 ?2 S2 u. p  v
  1873. }
    $ U! I6 |: ]9 b# q2 e2 Y
  1874. else. s: F0 T: h4 w
  1875. {}! e; t& t5 f! J% S, _) w! w2 y
  1876. 8 P4 G0 x, B: M5 @  j
  1877. }
    ( F) `! m' i4 B7 ^- |
  1878. else; s! l7 {+ }" h0 H% i
  1879. {0 q+ s, J! ]6 D0 B, L, e: H
  1880.         Form.setAction('add.cgi?y=InternetGatewayDevice.LANDevice.1.WLANConfiguration' - g. L5 f! h7 _( i! i. j
  1881.                        + '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp');
    / a; M* A1 p0 x9 K  K
  1882. }
    + m6 l% k0 o/ _/ w) ?4 e  N, Y
  1883. # X3 c6 X$ h) W% L2 t+ d( J, ]3 X! e
  1884.     setDisable('Save_button',1);; z. j5 Q5 H6 ?' T& |6 e, O; a- Q
  1885.     setDisable('Cancel_button',1);8 h2 y; z0 ?- J; V& L& P
  1886. Form.addParameter('x.X_HW_Token', getValue('onttoken'));
    : M5 g+ k. C6 r5 L" @0 O
  1887.     Form.submit();0 l. R! q: n" V6 ?
  1888. }. I3 u2 @& m8 D- }: M3 b* t
  1889. , x7 L/ ?- K& |; Q
  1890. function ApplySubmit2()0 L# L8 I9 x# C2 Y
  1891. {
    ! T! O9 X4 V6 \2 q* Z
  1892.     SubmitForm();
    - X2 L+ W5 o- G
  1893. }0 q" |1 {5 R$ W( K8 O0 \
  1894. 1 h: Q. B) K6 G9 X$ Z
  1895. function ApplySubmit()
    % w6 L6 l/ M' m' |- v) ~
  1896. {9 R- l/ `/ o6 g; S" n" @
  1897.     if (AddFlag == true)
    6 [  l  q* y8 o' R, m
  1898.     {9 a/ J$ D3 h9 @" u1 `2 o2 c
  1899.         setDisable('BtnAdd', 1);
    7 i+ A; h# S3 w0 w8 g# G
  1900.         setDisable('BtnRemove', 1);& i& e  X9 q" d) ]  \
  1901.         setDisable('Save_button',1);
    7 [: {9 {/ q/ J
  1902.         setDisable('Cancel_button',1);
    + d, v: W6 X; i6 b$ T9 H: v! n5 w
  1903. 0 f! I4 {, r8 g; E/ b
  1904.         ApplySubmit1();: ?1 }$ `" F8 H" x/ ]8 m
  1905.     }: m' q3 A$ R% Z8 e1 P1 R4 o& ^# ?4 V
  1906.     else
    1 O/ w- C  N0 g7 ^' g; Z4 u; G
  1907.     {" f# r, H3 R0 f( o) F+ U
  1908.         ApplySubmit2();
    $ X9 K7 |0 G  a0 [: Y
  1909.     }
    ' W9 i5 i1 L# K9 N% C' _
  1910. }
    , I* }* a( n9 W* |, O
  1911. . p: i8 t8 g- t9 b" g
  1912. function EnableSubmit(). A! L0 b& H2 Y9 |6 g( j
  1913. {1 W+ D6 w, J! Z( q+ O  ~$ n
  1914.     setDisable('WlanEnable_checkbox', 1);
    ' T$ c5 E, b2 [+ `7 z! \3 B
  1915.     AddFlag = false;5 _  k9 {/ v+ N( T  f
  1916.     var Form = new webSubmitForm();, }! X" G  _0 }; U- G
  1917.     var enable = getCheckVal('WlanEnable_checkbox');6 S: o" q2 v( g6 o
  1918. var url;/ m# b% O* W' J2 @5 X

  1919.   M. y% j9 i/ v% Z: v# L" X
  1920.     setDisable('Save_button', 1);% k" I7 l) R* T. H; ?1 s
  1921.     setDisable('Cancel_button', 1);" X; ^& s9 o1 M# w' m# e( o
  1922. " X3 C+ ?' [. J5 w
  1923.     if (1 == DoubleFreqFlag)
    % H- M( l, w9 G3 d0 P/ n
  1924.     {
    8 z0 B) P$ u, ^% e
  1925.         if ("2G" == wlanpage)
    % N6 G9 k  l, M
  1926.         {
    " w& C1 F6 u9 [  f& ^; z- X7 a  \
  1927.         Form.addParameter('x.Enable',enable);3 V9 H6 b, t& \. l, l5 |" F' `
  1928.     if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node2G)
    3 i6 }2 k. i; M& H
  1929.     {
    + d/ M# S  }6 K- ?% v+ p7 d
  1930. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1'; " Y& E/ S- G& P  V# K
  1931.     }5 s' g7 e* }% s
  1932.     else
    / `5 }! a( [! n  U. P+ h" e
  1933.     {2 A) Y! `$ d( s+ T
  1934. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';
    ( b7 _5 _, c4 ~
  1935.     }; h2 N3 H& d, b9 {& i
  1936.         }: s) _- P& I6 q7 D4 }* ^
  1937.         else if ("5G" == wlanpage)
    + v5 B1 ]& I0 X) a. w2 `
  1938.         {$ H  x' [/ \" b8 o- h
  1939.         Form.addParameter('x.Enable',enable);. V$ |% c! ~; h
  1940.       if ('InternetGatewayDevice.LANDevice.1.WiFi.Radio.1' == node5G)
    3 ~2 x8 N2 P& [4 W% k' ~
  1941.     {# L, J: M+ j% F( z
  1942. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.1';
    4 L! B0 x: k0 `8 ^. t/ U, q8 Y# k
  1943.     }$ U7 c$ d' j% E: l
  1944.     else( f3 O, O: R$ y" O& J
  1945.     {' d9 _2 ?3 @/ J, v
  1946. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1.WiFi.Radio.2';" C/ Y( ~/ E# x8 `
  1947.     }
      L* l2 w- U# O8 S2 S3 Q  V- u1 V
  1948.         }
    ! D* s' Y4 @: r  A1 g) a2 m, X- j  R
  1949. else
    ! q% u/ k3 q6 e- b# {& V: q
  1950. {
    & u% m+ O$ W; `& ^* Y

  1951. $ c" P5 [5 D7 v9 v2 H: d
  1952. }
    ) Y$ }" |# D  {, I3 A
  1953. }, ?% ^/ v( o7 P0 B2 q8 V
  1954.     else
    * N0 J1 V( e- `  r4 F- d
  1955.     {
    $ r, N$ e1 |; z
  1956.     Form.addParameter('x.X_HW_WlanEnable',enable);
    5 e& x- U1 q& m/ e
  1957. url = 'set.cgi?x=InternetGatewayDevice.LANDevice.1';
    9 n/ R6 D3 }9 h$ X
  1958.     }
    * w, _% c4 i7 H0 {' _% b

  1959. + G) w/ |# w/ C1 x
  1960. url += '&RequestFile=html/amp/wlanbasic/e8cWlanBasic.asp';
    : D; h7 T  {* H: n# u  [  C
  1961. Form.setAction(url);
    9 G' L. M8 O6 e- P! _4 y4 s
  1962. ; I" k0 ], _$ e; N1 s* m
  1963. Form.addParameter('x.X_HW_Token', getValue('onttoken'));
    ! P- e8 B" g6 o' O
  1964.     Form.submit();
    - d$ q. g- C7 @0 G
  1965. }# W4 y$ ]2 T' x0 i: i/ P6 L

  1966. 9 C9 K; ]0 W/ Z* o+ F0 P# q0 b
  1967. function showWlan(currentWlan)
    * K/ G6 d2 |+ u1 N- k
  1968. {
    $ C0 J3 {' y8 W) g0 o
  1969.     with (document.forms[0])
    9 L. ?! w3 h' F/ x: X) ]! k
  1970.     {
    2 L. G) l9 A2 [: Y
  1971.         ShowSsidEnable(currentWlan);( H3 q, L; ]; ^: s0 Q& b/ [
  1972.         setText('WlanSsid_text',currentWlan.ssid);, E6 q+ t! P* {; Z
  1973.         if (ssidAccessAttr.indexOf('Subscriber') < 0)
    : b" |! n, R. S& [0 E1 H
  1974.         {
    ; W$ z6 v, a8 B' E2 q
  1975.             setDisable('WlanSsid_text',1);- z: K, q+ C8 j& ~8 H" T
  1976.         }! t; L! y* g- B5 I) X( M

  1977. . `* ~. q! l3 e# J4 Q3 ~) J4 L6 L
  1978.         beaconTypeChange(currentWlan.BeaconType);5 S8 Q1 a. r9 h# z
  1979.     }% O4 m5 Q5 P  {3 K- r1 f4 @5 r* V8 H7 g
  1980. }
    % C5 W. E7 Q: a
  1981. 4 m9 N8 {. j4 u, d( M; X
  1982. function setControl(idIndex)' Z( e8 u: \9 J) D& [
  1983. {     V7 X' t4 j* j0 O& Y! H( R
  1984.     if (-1 == idIndex)# ?9 ]5 P  {! ~7 J
  1985.     {   
    + U. D% K. K* x( @3 r/ K
  1986.         if (1 == SingleFreqFlag)
    1 c) M- `2 y6 K9 U
  1987. {+ V6 v9 A4 L% l1 B8 c
  1988. if (Wlan.length >= maxSingleWLAN.MAX_ID)  N6 M& L: L7 J& K: G' m! b
  1989. {
    6 h' o! J2 G% I$ z/ S2 a6 x2 H2 N. x
  1990. setDisplay('cfg_table', 0);7 ~- s# }+ b1 q" ^, Z- T
  1991. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);/ M: s# l1 U  n
  1992. return;
    4 n3 ]0 N# D2 x* ~, i
  1993. }
    $ O# P$ t1 X$ u1 {( Y+ S. _1 D
  1994. }0 B2 v0 q3 J" _/ o+ h" k8 K: f  [
  1995. else if (1 == DoubleFreqFlag)
    , Q, B8 Y7 v$ a# q4 Q- _+ c* {3 I
  1996. {
    2 E5 Z$ {0 c4 g
  1997. Total2gNum();
    ' I' ]- c; b1 `! [

  1998. , F9 Z8 q# l6 l% a8 M
  1999. if ("2G" == wlanpage)
    - `, K& b2 o- ^- y+ |! N2 e
  2000. {
    ! N2 L+ F3 q( `5 G' M6 E0 x
  2001. if ((uiTotal2gNum >= 4) || (uiTotalNum >= 8)), X  a4 \) C& h' l( m3 X+ P  G
  2002. {( W6 {+ O% T$ }6 o4 f6 d
  2003. setDisplay('cfg_table', 0);
    5 X- Y' T, O% ?' j& u6 a
  2004. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
    : J  r: Q) X( D$ ?; n' w& w" t5 I
  2005. return;& ^0 Z: K5 B. c; b8 h# a
  2006. }. Y2 l: v$ {2 o, M
  2007. }
    . c2 G4 w! M7 {& w2 v8 p" w

  2008. - H: R. U4 g& _# I! ^
  2009. else if("5G" == wlanpage)
    4 q" [; x' y3 C( V% c
  2010. {9 m# J% @; X3 G; M! E. D$ e
  2011. if ((uiTotal5gNum >= 4) || (uiTotalNum >= 8))
    , P0 G1 t1 Y5 ?( x) M* i7 ~
  2012. {
    9 |2 P1 |- W' m4 g) k
  2013. setDisplay('cfg_table', 0);
    # {: u) _  T7 f% h5 x1 N
  2014. AlertEx(cfg_wlancfgother_language['amp_ssid_4max']);
    * u# _% @$ L' p' U7 h, w
  2015. return;
    ) i, o8 A/ D, m
  2016. }
    0 N0 p$ w  u% u% `) S/ R
  2017. }
    * q3 l+ ^& p( R7 [1 _7 e' F' ~) U
  2018. }5 ^& Z% N1 G$ R, n& Q
  2019.    
    6 x( w" @/ W: S* K% V6 B" h
  2020.         ssidIdx = -1;
    7 B* V# w' m- V- e0 I7 I/ n
  2021.         AddFlag = true;
    # [( y& J( ^) N
  2022. ; _9 g3 L# \$ \- C
  2023.         currentWlan = new stWlan('','','','',1,32,1,'','','','','','','','','','','','','','','');% ^5 ~5 c) H  _# s& A

  2024. 2 f; h6 U2 }9 d7 P
  2025.         setDisplay('ssidDetail', 1);' d+ @. l, J$ _1 \1 ~) r' [
  2026.         setDisplay('securityCfg',0);2 L/ u# s$ t$ h
  2027.     }
    8 _* b: [: L3 v
  2028.     else7 \" u0 k/ ~5 D
  2029.     {) R* U% g2 {. ~$ \/ n  g
  2030.         setDisplay('cfg_table', 1);! \# P) a/ ~5 c; G- M' Y6 `3 e2 D+ O
  2031.         setDisplay('securityCfg',1);
    % w2 Y% `& n5 d2 f
  2032.         ssidIdx = parseInt(WlanMap[idIndex].index);/ g9 Y  Y+ ?2 k$ M# w  O  \
  2033.         AddFlag = false;
    " C) ?( q7 e% J, Z) M
  2034.   Y! [! K) R) `9 Z* O% S3 S% n
  2035.         currentWlan = Wlan[ssidIdx];
    : K, Z5 ^# Q: W3 |0 Z& \6 h* a
  2036.     }
    % L1 t+ x% S5 g( I/ {

  2037. 0 Z# z; w8 b- t/ h
  2038.     showWlan(currentWlan);
    3 }4 O" k" e4 i, ]

  2039. + Q7 I* W0 t6 j5 J
  2040.     setDisable('Save_button', 0);
    ( G# d) `0 C9 ^( D- X: {
  2041.     setDisable('Cancel_button', 0);0 s8 |% i( @8 w

  2042. , L# `: |% L/ f3 M
  2043. var curWlanInst = getWlanInstFromDomain(currentWlan.domain);# z8 ]: z1 [8 L. P7 R, _
  2044. 4 n1 H) [5 r/ ]- E! g, v0 \  T
  2045. if ((1 == isSsidForIsp(curWlanInst)) && (1 == ShowISPSsidFlag)), ]' T) U; U. Q% J
  2046. {: n* G" g+ K8 W! H# i: R( a
  2047. if ('CMCC' != CurrentBin.toUpperCase() )* x1 U2 [% P( g3 w9 e  }
  2048.         {
    6 z+ y+ C" H7 V+ }3 M& |
  2049. setDisable('Save_button', 1);
    9 Q3 I* ?) X2 ~; u6 h
  2050.        setDisable('Cancel_button', 1);
      N! h: E! a& w1 i
  2051. }
    5 U1 t/ o; o# K% W9 f) P- |. q" f
  2052. }
    ' Q" `$ E' `' R  r# o) ]' N

  2053. ) k5 m, T0 t0 q
  2054. % y( v- z5 n1 d+ |1 R
  2055.     ClearPsdModFlag();  g- Y: H$ s) d8 f% Q
  2056. / |! W9 y: D! N  c
  2057. if (1 == MngtJsCmcc && 1 != curWlanInst && 5 != curWlanInst)9 Q3 W0 y7 U( e8 W) \- i/ t
  2058. {% ?' E2 Y  y$ T% N, M  T
  2059. setDisable('Save_button', 1);
    * Z% M3 v# A8 A
  2060.        setDisable('Cancel_button', 1);
    3 {1 [/ a! O7 s
  2061. }) S- r+ J9 D- y' N+ O7 K1 k8 o
  2062. }& L' U" a7 T5 t: }

  2063. / P/ |+ K) Z! Q+ x
  2064. function selectRemoveCnt(curCheck)" g3 E9 r1 H5 W; G7 m4 e) K5 |' s- W3 B
  2065. {1 D0 x: w$ o5 n3 e
  2066. }( u. O: M# K, F& c1 Q

  2067. , r! x3 J* w1 S  v1 I2 |5 z5 ~. b. K
  2068. function Cancel_buttonValue()
    . ^* Y9 S2 h! c& F6 l( I
  2069. {
    ' @1 v+ N. z# K% }% P, @
  2070. var temp1 =0;
    - _) p( k+ D; }$ W/ H5 S; f
  2071. var temp2 =0;
    : ]9 Y: N! X# }$ S( |
  2072.     if (AddFlag == true)7 x/ W$ W$ B8 W, \4 O
  2073.     {
    ; @5 z+ {( C$ d. J7 ?; J
  2074.         var tableRow = getElement("wlanInst");7 x/ x5 ?2 q, c' u' R
  2075. if ((1 == DoubleFreqFlag) && ("5G" == wlanpage))
    2 _; W8 E& \- f2 G2 B2 y
  2076. {" ?5 g. m8 u: q$ Y7 w
  2077. FirstRecordFor5G();
    $ q( Z) s% \3 {' A
  2078. selectLine('record_' + RecordFor5G);2 h% l* l; E! h

  2079. + X' I- p/ A9 A% U
  2080. for(var i = 0; i < WlanMap.length; i++)
    ! W" }' I0 Q" D+ d4 T# G/ G
  2081. {
    0 [* m) q+ X5 \/ v' L& b
  2082. if(WlanMap[i].portIndex >3)
    7 ?0 S3 U' T9 u' E! A3 B
  2083. {, U( R8 a& E% H
  2084. temp1++;
    1 [4 l9 H/ B( T0 C& F- L
  2085. }
    0 M* {2 s4 ^+ R! C( l6 q# R
  2086. }; @% n5 i) P: D+ G9 ?" \
  2087. if(temp1==0)3 `3 f6 D$ e5 k+ v9 a* V3 |
  2088. {
    9 \2 Y& p% C, k8 N5 o
  2089. setDisplay('ssidDetail',0);
    ' j) I! b+ x) O; |# V- w+ E4 l
  2090. }
    2 u! `! X% b* I8 _
  2091. }1 k& X# ^5 u0 s6 `, ]& D
  2092. else if((1 == DoubleFreqFlag) && ("2G" == wlanpage)); P9 u4 s1 A9 q% z0 K% B
  2093. {
    * c5 C7 Q$ c& Q
  2094. FirstRecordFor2G();& A4 k& M9 `% B5 ]5 ^
  2095. selectLine('record_' + RecordFor2G);
    + ]/ z" ]5 \2 H6 Y! d: l

  2096. / @5 o+ V, I( F; G
  2097. for(var j = 0; j < WlanMap.length; j++)$ J8 _' d0 T3 v
  2098. {
    * u$ T4 Q3 O+ t+ M; X! h3 E
  2099. if(WlanMap[j].portIndex < 4)
    9 v5 X  U" }7 h: M. S& v( |" }
  2100. {  G6 m# _8 a+ _4 C' Y
  2101. temp2++;
    , T. j5 p  ~6 r2 u$ J
  2102. }
    & J! E! W+ r, a5 g
  2103. }; V8 @3 q- `& P, M  Y$ B
  2104. if(temp2==0)
    9 U/ ]$ ]- k6 r8 z- W- w. W
  2105. {7 s( K+ F1 K- S# C* d( s. m; D
  2106. setDisplay('ssidDetail',0);) _& a/ O  L  E& R8 F- X9 w
  2107. }
    $ p/ t. @  }. Y- N
  2108.            ; U! x) d: F# T- o
  2109.         }
    2 G1 K2 w0 U9 W+ l6 i
  2110. else" H4 Q7 U- V1 {9 B2 p) h/ Q
  2111. {
    6 p9 T& S* \- n
  2112. selectLine('record_0');1 }# m& i1 H# @$ D% U
  2113. }
    6 l( M. a8 s5 [- k
  2114.         
    ( Q4 q# \5 m( I6 X8 r  L: J0 c
  2115.         tableRow.deleteRow(tableRow.rows.length-1);
    1 V) B: a! n9 u( l
  2116.     }
    % _1 s& u  A1 Q# ^/ J1 W& [1 G
  2117.     else
    0 _% q  S1 s6 ~, `& h3 }; @& c! V
  2118.     {
    0 m2 Q& G% `" X, D- d1 w
  2119.         var currentWlan = Wlan[ssidIdx];
    " ^( g* [2 b$ m/ ^  e9 q$ I  C
  2120.         showWlan(currentWlan);
    7 `( q% J+ S" f
  2121.     }% ^# c) W0 W3 o5 Q7 j- [8 C/ ]6 {
  2122. 2 g) m% c$ L: a1 u- `0 q
  2123.     ClearPsdModFlag();
      [4 r  W  M- ^& _) D
  2124. }3 o3 v: q0 M( H( x1 D$ ~

  2125. ! _7 I$ d% g$ Z3 X9 N
  2126. var authmode = cfg_wlancfgdetail_language['amp_authmode_help'];  v8 D2 n) K% @  }0 Z- m0 ^
  2127. var encryption = cfg_wlancfgdetail_language['amp_encrypt_help'];+ ]% p4 c$ R" x1 n
  2128. var ssid = cfg_wlancfgdetail_language['amp_ssid_help'];( ^* `- _8 e; {$ ]+ g( B9 G
  2129. var posswordComplexTitle = cfg_wlancfgdetail_language['amp_wlanpasswordcomplex_title'];
    3 Y# B  z7 t& c$ O- \1 J3 D# ~# n

  2130. 5 B' V$ {3 L) J/ }
  2131. </script>
复制代码
) m& \2 x- Q% Y' Q- y  I: p7 m
# X+ c2 f1 r* Y' f; u
我这有台移不动HG8545M,JS里是这样的
发表于 2023-1-26 12:22:17 | 显示全部楼层
感谢大佬分享!666
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-5 20:56 , Processed in 0.059645 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

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