1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml">
3<html xmlns:v>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
7<meta HTTP-EQUIV="Expires" CONTENT="-1">
8<title>ASUS Wireless Router <#Web_Title#> - <#menu5_1_1#></title>
9<link rel="stylesheet" type="text/css" href="index_style.css"> 
10<link rel="stylesheet" type="text/css" href="form_style.css">
11<link rel="stylesheet" type="text/css" href="usp_style.css">
12<link href="other.css"  rel="stylesheet" type="text/css">
13
14<script type="text/javascript" src="/state.js"></script>
15<script type="text/javascript" src="/help.js"></script>
16<script type="text/javascript" src="/general.js"></script>
17<script type="text/javascript" src="/popup.js"></script>
18<script type="text/javascript" src="/md5.js"></script>
19<script type="text/javascript" src="/detect.js"></script>
20<script>
21wan_route_x = '<% nvram_get_x("IPConnection", "wan_route_x"); %>';
22wan_nat_x = '<% nvram_get_x("IPConnection", "wan_nat_x"); %>';
23wan_proto = '<% nvram_get_x("Layer3Forwarding",  "wan_proto"); %>';
24
25<% login_state_hook(); %>
26var wireless = [<% wl_auth_list(); %>];	// [[MAC, associated, authorized], ...]
27
28var wl_wpa_psk_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_wpa_psk"); %>';
29var wl_key1_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_key1"); %>';
30var wl_key2_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_key2"); %>';
31var wl_key3_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_key3"); %>';
32var wl_key4_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_key4"); %>';
33var wl_phrase_x_org = '<% nvram_char_to_ascii("WLANConfig11b", "wl_phrase_x"); %>';
34
35function initial(){
36	show_banner(1);
37	show_menu(5,1,1);
38	show_footer();
39	
40	enable_auto_hint(0, 11);
41	
42	load_body();
43	
44	document.form.wl_wpa_psk.value = decodeURIComponent(wl_wpa_psk_org);
45	document.form.wl_key1.value = decodeURIComponent(wl_key1_org);
46	document.form.wl_key2.value = decodeURIComponent(wl_key2_org);
47	document.form.wl_key3.value = decodeURIComponent(wl_key3_org);
48	document.form.wl_key4.value = decodeURIComponent(wl_key4_org);
49	document.form.wl_phrase_x.value = decodeURIComponent(wl_phrase_x_org);
50	
51	if(document.form.wl_wpa_psk.value.length <= 0)
52		document.form.wl_wpa_psk.value = "Please type Password";
53}
54
55function applyRule(){
56	var auth_mode = document.form.wl_auth_mode.value;
57	
58	if(validForm()){
59		showLoading();
60		
61		document.form.action_mode.value = " Apply ";
62		document.form.current_page.value = "";
63		document.form.next_page.value = "/as.asp";
64		document.form.wsc_config_state.value = "1";
65		
66		if((auth_mode == "shared" || auth_mode == "wpa" || auth_mode == "wpa2" || auth_mode == "radius")
67				&& document.form.wsc_mode.value == "enabled")
68			document.form.wsc_mode.value = "disabled";
69		
70		if(auth_mode == "wpa" || auth_mode == "wpa2" || auth_mode == "radius")
71			document.form.next_page.value = "/Advanced_WSecurity_Content.asp";
72		
73		inputCtrl(document.form.wl_crypto, 1);
74		inputCtrl(document.form.wl_wpa_psk, 1);
75		inputCtrl(document.form.wl_wep_x, 1);
76		inputCtrl(document.form.wl_key, 1);
77		inputCtrl(document.form.wl_key1, 1);
78		inputCtrl(document.form.wl_key2, 1);
79		inputCtrl(document.form.wl_key3, 1);
80		inputCtrl(document.form.wl_key4, 1);
81		inputCtrl(document.form.wl_phrase_x, 1);
82		inputCtrl(document.form.wl_wpa_gtk_rekey, 1);
83		
84		document.form.submit();
85	}
86}
87
88function validForm(){
89	var auth_mode = document.form.wl_auth_mode.value;
90	
91	if(!validate_string_ssid(document.form.wl_ssid))
92		return false;
93	document.form.wl_ssid2.value = encodeURIComponent(document.form.wl_ssid.value);
94	
95	if(document.form.wl_wep_x.value != "0")
96		if(!validate_wlphrase('WLANConfig11b', 'wl_phrase_x', document.form.wl_phrase_x))
97			return false;	
98	if(auth_mode == "psk"){ //2008.08.04 lock modified
99		if(!validate_psk(document.form.wl_wpa_psk))
100			return false;
101		
102		if(!validate_range(document.form.wl_wpa_gtk_rekey, 0, 86400))
103			return false;
104	}
105	else if(auth_mode == "wpa" || auth_mode == "wpa2"){
106		if(!validate_range(document.form.wl_wpa_gtk_rekey, 0, 86400))
107			return false;
108	}
109	else{
110		var cur_wep_key = eval('document.form.wl_key'+document.form.wl_key.value);		
111		if(auth_mode != "radius" && !validate_wlkey(cur_wep_key))
112			return false;
113	}	
114	return true;
115}
116
117function done_validating(action){
118	refreshpage();
119}
120
121function change_key_des(){
122	var objs = getElementsByName_iefix("span", "key_des");
123	var wep_type = document.form.wl_wep_x.value;
124	var str = "";
125	
126	if(wep_type == "1")
127		str = "(<#WLANConfig11b_WEPKey_itemtype1#>)";
128	else if(wep_type == "2")
129		str = "(<#WLANConfig11b_WEPKey_itemtype2#>)";
130	
131	for(var i = 0; i < objs.length; ++i)
132		showtext(objs[i], str);
133}
134
135function validate_wlphrase(s, v, obj){
136	if(!validate_string(obj)){
137		is_wlphrase(s, v, obj);
138		return(false);
139	}
140	
141	return true;
142}
143</script>
144</head>
145
146<body onload="initial();" onunLoad="disable_auto_hint(0, 11);return unload_body();">
147<div id="TopBanner"></div>
148
149<div id="Loading" class="popup_bg"></div>
150<div id="hiddenMask" class="popup_bg">
151	<table cellpadding="5" cellspacing="0" id="dr_sweet_advise" class="dr_sweet_advise" align="center">
152		<tr>
153		<td>
154			<div class="drword" id="drword"><#Main_alert_proceeding_desc4#> <#Main_alert_proceeding_desc1#>...
155				<br/>
156				<br/>
157		    </div>
158		  <div class="drImg"><img src="images/DrsurfImg.gif"></div>
159			<div style="height:70px; "></div>
160		</td>
161		</tr>
162	</table>
163<!--[if lte IE 6.5]><iframe class="hackiframe"></iframe><![endif]-->
164</div>
165
166<iframe name="hidden_frame" id="hidden_frame" width="0" height="0" frameborder="0"></iframe>
167<form method="post" name="form" action="/start_apply2.htm" target="hidden_frame">
168<input type="hidden" name="productid" value="<% nvram_get_f("general.log","productid"); %>">
169<input type="hidden" name="wan_route_x" value="<% nvram_get_x("IPConnection","wan_route_x"); %>">
170<input type="hidden" name="wan_nat_x" value="<% nvram_get_x("IPConnection","wan_nat_x"); %>">
171
172<input type="hidden" name="current_page" value="Advanced_Wireless_Content.asp">
173<input type="hidden" name="next_page" value="Advanced_Wireless_Content.asp">
174<input type="hidden" name="next_host" value="">
175<input type="hidden" name="sid_list" value="WLANConfig11b;">
176<input type="hidden" name="group_id" value="">
177<input type="hidden" name="modified" value="0">
178<input type="hidden" name="action_mode" value="">
179<input type="hidden" name="action_script" value="">
180<input type="hidden" name="preferred_lang" id="preferred_lang" value="<% nvram_get_x("LANGUAGE", "preferred_lang"); %>">
181<input type="hidden" name="firmver" value="<% nvram_get_x("",  "firmver"); %>">
182
183<input type="hidden" name="wsc_mode" value="<% nvram_get_x("WLANConfig11b", "wsc_mode"); %>">
184<input type="hidden" name="wsc_config_state" value="<% nvram_get_x("WLANConfig11b", "wsc_config_state"); %>">
185
186<input type="hidden" name="wl_ssid2" value="<% nvram_get_x("WLANConfig11b","wl_ssid2"); %>">
187<input type="hidden" name="wl_wpa_mode" value="<% nvram_get_x("WLANConfig11b","wl_wpa_mode"); %>">
188
189<input type="hidden" maxlength="15" size="15" name="x_RegulatoryDomain" value="<% nvram_get_x("Regulatory","x_RegulatoryDomain"); %>" readonly="1">
190<input type="hidden" name="wl_gmode_protection_x" value="<% nvram_get_x("WLANConfig11b","wl_gmode_protection_x"); %>">
191
192<table class="content" align="center" cellpadding="0" cellspacing="0">
193  <tr>
194	<td width="23">&nbsp;</td>
195	
196	<!--=====Beginning of Main Menu=====-->
197	<td valign="top" width="202">
198	  <div id="mainMenu"></div>
199	  <div id="subMenu"></div>
200	</td>
201	
202	<td height="430" valign="top">
203	  <div id="tabMenu" class="submenuBlock"></div><br>
204
205<!--===================================Beginning of Main Content===========================================-->
206<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
207  <tr>
208	<td align="left" valign="top" >
209	  <table width="98%" border="0" cellpadding="5" cellspacing="0" class="FormTitle">
210		<thead>
211		<tr>
212		  <td><#menu5_1#> - <#menu5_1_1#></td>
213		</tr>
214		</thead>	
215		
216		<tbody>
217		<tr>
218		  <td bgcolor="#FFFFFF">
219			<table width="100%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable">
220			  <tr>
221					<th width="50%"><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 1);"><#WLANConfig11b_SSID_itemname#></a></th>
222					<td><input type="text" maxlength="32" class="input"  size="32" name="wl_ssid" value="" onkeypress="return is_string(this)"></td>
223			  </tr>
224			  
225				<tr>
226					<th><a class="hintstyle"  href="javascript:void(0);" onClick="openHint(0, 2);"><#WLANConfig11b_x_BlockBCSSID_itemname#></a></th>
227					<td>
228						<input type="radio" value="1" name="wl_closed" class="input" onClick="return change_common_radio(this, 'WLANConfig11b', 'wl_closed', '1')" <% nvram_match_x("WLANConfig11b", "wl_closed", "1", "checked"); %>>Yes
229						<input type="radio" value="0" name="wl_closed" class="input" onClick="return change_common_radio(this, 'WLANConfig11b', 'wl_closed', '0')" <% nvram_match_x("WLANConfig11b", "wl_closed", "0", "checked"); %>>No
230					</td>
231				</tr>
232			  
233			  <tr>
234				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 3);"><#WLANConfig11b_Channel_itemname#></a></th>
235				<td>
236				  <select name="wl_channel" class="input" onChange="return change_common(this, 'WLANConfig11b', 'wl_channel')">
237					<% select_channel("WLANConfig11b"); %>
238				  </select>
239				</td>
240			  </tr>
241			  
242			  <tr>
243				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 4);"><#WLANConfig11b_x_Mode11g_itemname#></a></th>
244				<td>
245				  <select name="wl_gmode" class="input" onChange="return change_common(this, 'WLANConfig11b', 'wl_gmode')">
246					<option value="1" <% nvram_match_x("WLANConfig11b","wl_gmode", "1","selected"); %>>Auto</option>
247					<option value="4" <% nvram_match_x("WLANConfig11b","wl_gmode", "4","selected"); %>>54G Only</option>
248					<option value="0" <% nvram_match_x("WLANConfig11b","wl_gmode", "0","selected"); %>>802.11B Only</option>
249				  </select>
250				  <input type="checkbox" style="margin-left:30" name="wl_gmode_check" value="" onClick="return change_common_radio(this, 'WLANConfig11b', 'wl_gmode', '1')">54g Protection</input>
251				</td>
252			  </tr>
253			  
254			  <tr>
255				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 5);"><#WLANConfig11b_AuthenticationMethod_itemname#></a></th>
256				<td>
257				  <select name="wl_auth_mode" class="input" onChange="return change_common(this, 'WLANConfig11b', 'wl_auth_mode');">
258					<option value="open" <% nvram_match_x("WLANConfig11b", "wl_auth_mode", "open", "selected"); %>>Open System</option>
259					<option value="shared" <% nvram_match_x("WLANConfig11b", "wl_auth_mode", "shared", "selected"); %>>Shared Key</option>
260					<option value="psk" <% nvram_double_match_x("WLANConfig11b", "wl_auth_mode", "psk", "WLANConfig11b", "wl_wpa_mode", "1", "selected"); %>>WPA-Personal</option>
261					<option value="psk" <% nvram_double_match_x("WLANConfig11b", "wl_auth_mode", "psk", "WLANConfig11b", "wl_wpa_mode", "2", "selected"); %>>WPA2-Personal</option>
262					<option value="psk" <% nvram_double_match_x("WLANConfig11b", "wl_auth_mode", "psk", "WLANConfig11b", "wl_wpa_mode", "0", "selected"); %>>WPA-Auto-Personal</option>
263					<option value="wpa" <% nvram_double_match_x("WLANConfig11b", "wl_auth_mode", "wpa", "WLANConfig11b", "wl_wpa_mode", "3", "selected"); %>>WPA-Enterprise</option>
264					<option value="wpa2" <% nvram_match_x("WLANConfig11b", "wl_auth_mode", "wpa2", "selected"); %>>WPA2-Enterprise</option>
265					<option value="wpa" <% nvram_double_match_x("WLANConfig11b", "wl_auth_mode", "wpa", "WLANConfig11b", "wl_wpa_mode", "4", "selected"); %>>WPA-Auto-Enterprise</option>
266					<option value="radius" <% nvram_match_x("WLANConfig11b", "wl_auth_mode", "radius", "selected"); %>>Radius with 802.1x</option>
267				  </select>
268				</td>
269			  </tr>
270			  
271			  <tr>
272				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 6);"><#WLANConfig11b_WPAType_itemname#></a></th>
273				<td>
274				  <select name="wl_crypto" class="input" onChange="return change_common(this, 'WLANConfig11b', 'wl_crypto')">
275					<option value="tkip" <% nvram_match_x("WLANConfig11b","wl_crypto", "tkip","selected"); %>>TKIP</option>
276					<option value="aes" <% nvram_match_x("WLANConfig11b","wl_crypto", "aes","selected"); %>>AES</option>
277					<option value="tkip+aes" <% nvram_match_x("WLANConfig11b","wl_crypto", "tkip+aes","selected"); %>>TKIP+AES</option>
278				  </select>
279				</td>
280			  </tr>
281			  
282			  <tr>
283				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 7);"><#WLANConfig11b_x_PSKKey_itemname#></a></th>
284				<td>
285				  <input type="text" name="wl_wpa_psk" maxlength="64" class="input" size="32" value="">
286				</td>
287			  </tr>
288			  		  
289			  <tr>
290				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 9);"><#WLANConfig11b_WEPType_itemname#></a></th>
291				<td>
292				  <select name="wl_wep_x" class="input" onChange="return change_common(this, 'WLANConfig11b', 'wl_wep_x');">
293					<option value="0" <% nvram_match_x("WLANConfig11b", "wl_wep_x", "0", "selected"); %>>None</option>
294					<option value="1" <% nvram_match_x("WLANConfig11b", "wl_wep_x", "1", "selected"); %>>WEP-64bits</option>
295					<option value="2" <% nvram_match_x("WLANConfig11b", "wl_wep_x", "2", "selected"); %>>WEP-128bits</option>
296				  </select>
297				  <br>
298				  <span name="key_des"></span>
299				</td>
300			  </tr>
301			  
302			  <tr>
303				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 10);"><#WLANConfig11b_WEPDefaultKey_itemname#></a></th>
304				<td>
305				  <select name="wl_key" class="input"  onChange="return change_common(this, 'WLANConfig11b', 'wl_key');">
306					<option value="1" <% nvram_match_x("WLANConfig11b","wl_key", "1","selected"); %>>1</option>
307					<option value="2" <% nvram_match_x("WLANConfig11b","wl_key", "2","selected"); %>>2</option>
308					<option value="3" <% nvram_match_x("WLANConfig11b","wl_key", "3","selected"); %>>3</option>
309					<option value="4" <% nvram_match_x("WLANConfig11b","wl_key", "4","selected"); %>>4</option>
310				  </select>
311				</td>
312			  </tr>
313			  
314			  <tr>
315				<th><#WLANConfig11b_WEPKey1_itemname#></th>
316				<td><input type="text" name="wl_key1" id="wl_key1" maxlength="32" class="input" size="34" value="" onKeyUp="return change_wlkey(this, 'WLANConfig11b');"></td>
317			  </tr>
318			  
319			  <tr>
320				<th><#WLANConfig11b_WEPKey2_itemname#></th>
321				<td><input type="text" name="wl_key2" id="wl_key2" maxlength="32" class="input" size="34" value="" onKeyUp="return change_wlkey(this, 'WLANConfig11b');"></td>
322			  </tr>
323			  
324			  <tr>
325				<th><#WLANConfig11b_WEPKey3_itemname#></th>
326				<td><input type="text" name="wl_key3" id="wl_key3" maxlength="32" class="input" size="34" value="" onKeyUp="return change_wlkey(this, 'WLANConfig11b');"></td>
327			  </tr>
328			  
329			  <tr>
330				<th><#WLANConfig11b_WEPKey4_itemname#></th>
331				<td><input type="text" name="wl_key4" id="wl_key4" maxlength="32" class="input" size="34" value="" onKeyUp="return change_wlkey(this, 'WLANConfig11b');"></td>
332			  </tr>
333
334			  <tr>
335				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 8);"><#WLANConfig11b_x_Phrase_itemname#></a></th>
336				<td>
337				  <input type="text" name="wl_phrase_x" maxlength="64" class="input" size="32" value="" onKeyUp="return is_wlphrase('WLANConfig11b', 'wl_phrase_x', this);" autocomplete="off">
338				</td>
339			  </tr>
340			  
341			  <tr>
342				<th><a class="hintstyle" href="javascript:void(0);" onClick="openHint(0, 11);"><#WLANConfig11b_x_Rekey_itemname#></a></th>
343				<td><input type="text" maxlength="5" size="5" name="wl_wpa_gtk_rekey" class="input"  value="<% nvram_get_x("WLANConfig11b", "wl_wpa_gtk_rekey"); %>"></td>
344			  </tr>
345			  
346			  <tr align="right">
347				<td colspan="2">
348				   <input type="button" id="applyButton" class="button" value="<#CTL_apply#>" onclick="applyRule();"></td>
349			  </tr>
350			</table>
351		  </td>
352		</tr>
353		</tbody>
354	  </table>
355	</td>
356</form>
357
358	<!--==============Beginning of hint content=============-->
359	<td id="help_td" style="width:15px;" valign="top">
360<form name="hint_form"></form>
361	  <div id="helpicon" onClick="openHint(0, 0);" title="<#Help_button_default_hint#>">
362		<img src="images/help.gif">
363	  </div>
364	  
365	  <div id="hintofPM" style="display:none;">
366		<table width="100%" cellpadding="0" cellspacing="1" class="Help" bgcolor="#999999">
367		  <thead>
368		  <tr>
369			<td>
370			  <div id="helpname" class="AiHintTitle"></div>
371			  <a href="javascript:closeHint();"><img src="images/button-close.gif" class="closebutton" /></a>
372			</td>
373		  </tr>
374		  </thead>
375		  
376		  <tbody>
377		  <tr>
378			<td valign="top">
379			  <div id="hint_body" class="hint_body2"></div>
380			  <iframe id="statusframe" name="statusframe" class="statusframe" src="" frameborder="0"></iframe>
381			</td>
382		  </tr>
383		  </tbody>
384		</table>
385	  </div>
386	</td>
387	<!--==============Ending of hint content=============-->
388  </tr>
389</table>
390<!--===================================Ending of Main Content===========================================-->
391
392	</td>
393	
394	<td width="10" align="center" valign="top"></td>
395  </tr>
396</table>
397
398<div id="footer"></div>
399</body>
400</html>
401