1<html>
2<head>
3<title></title>
4<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
6<meta HTTP-EQUIV="Expires" CONTENT="-1">
7<link rel="shortcut icon" href="images/favicon.png">
8<link rel="icon" href="images/favicon.png">
9<script type="text/javascript">
10
11var page_modified = 0;
12var restart_time = 0;
13var rc_support = '<% nvram_get("rc_support"); %>'; 
14var dsl_support = (rc_support.search("dsl") == -1) ? false : true;
15var tmo_support = (rc_support.search("tmo") == -1) ? false : true;
16var current_page = '<% get_parameter("current_page"); %>';
17var next_page = '<% get_parameter("next_page"); %>';
18var action_script = '<% get_parameter("action_script"); %>';
19var action_mode = '<% get_parameter("action_mode"); %>';
20var action_wait = '<% get_parameter("action_wait"); %>';
21var group_id = '<% get_parameter("group_id"); %>';
22var getflag = '<% get_parameter("flag"); %>';
23var lan_proto = '<% get_parameter("lan_proto"); %>';
24
25if(tmo_support)
26	var theUrl = "cellspot.router"; 
27else
28	var theUrl = "router.asus.com";
29
30function isMobile(){
31	/*if(!tmo_support)
32		return false;*/
33	
34	if(	navigator.userAgent.match(/iPhone/i) || 
35		navigator.userAgent.match(/iPod/i)    ||
36		navigator.userAgent.match(/iPad/i)    ||
37		(navigator.userAgent.match(/Android/i) && (navigator.userAgent.match(/Mobile/i) || navigator.userAgent.match(/Tablet/i))) ||
38		//(navigator.userAgent.match(/Android/i) && navigator.userAgent.match(/Mobile/i))||			//Android phone
39		(navigator.userAgent.match(/Opera/i) && (navigator.userAgent.match(/Mobi/i) || navigator.userAgent.match(/Mini/i))) ||		// Opera mobile or Opera Mini
40		navigator.userAgent.match(/IEMobile/i)	||		// IE Mobile
41		navigator.userAgent.match(/BlackBerry/i)		//BlackBerry
42	 ){
43		return true;
44	}
45	else{
46		return false;
47	}
48}
49	
50function started_validating(){
51}
52
53function done_validating(action){
54	parent.done_validating(action, group_id);
55}
56
57function started_committing(){
58}
59
60function done_committing(){
61	page_modified = 1;
62}
63
64function no_changes_and_no_committing(){
65}
66
67function invalid_variable_value(variable, bad_value, message){
68}
69
70function restart_needed_time(second){
71	restart_time = second;
72}
73
74function delay_redirect(next_url){
75	document.redirectForm.action = next_url;
76	document.redirectForm.target = "";
77	document.redirectForm.submit();
78}
79
80function top_delay_redirect(next_url){
81	document.redirectForm.action = next_url;
82	document.redirectForm.target = "_parent";
83	document.redirectForm.submit();
84}
85
86function qis_delay_redirect(next_url){
87	parent.parent.document.redirectForm.action = next_url;
88	parent.parent.document.redirectForm.target = "contentM";
89	parent.parent.document.redirectForm.submit();
90}
91
92function redirect(){
93	if(isMobile()){
94		parent.location.href = 'http://'+parent.document.form.lan_ipaddr.value+'/QIS_wizard_m.htm?flag=detect';
95	}
96	else{
97		parent.location.href = 'http://'+parent.document.form.lan_ipaddr.value+'/QIS_wizard.htm?flag=detect';
98	}	
99}
100
101function redirect_qis(){
102	parent.location.href = 'http://'+parent.document.form.lan_ipaddr.value+'/index.asp';
103}
104
105function hideLoading(){
106	parent.document.getElementById("loadingBlock").style.visibility = "hidden";
107}
108
109var makeRequest = {
110	_notSuccessCount: 0,
111	_notSupportXML: false,
112
113	start: function(url, callBackSuccess, callBackError){
114		var xmlHttp;
115		if(window.XMLHttpRequest)
116			xmlHttp = new XMLHttpRequest();
117		else if(window.ActiveXObject)
118			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
119		else{
120			makeRequest._notSupportXML = true;
121			alert("Your browser does not support XMLHTTP.");
122			return false;
123		}
124
125		xmlHttp.onreadystatechange = function(){
126			if(xmlHttp.readyState == 4){
127				if(xmlHttp.status == 200){
128					callBackSuccess(xmlHttp);
129				}
130				else{
131					makeRequest._notSuccessCount++;
132					callBackError();
133				}	
134	 		}
135		}
136
137		xmlHttp.open('GET', url, true);
138		xmlHttp.send(null);
139	}
140};
141
142function showWlHint(){
143	var isSwMode = function(mode){
144		var ui_sw_mode = "rt";
145		var sw_mode = '<% nvram_get("sw_mode"); %>';
146		var wlc_psta = '<% nvram_get("wlc_psta"); %>';
147		var wlc_express = '<% nvram_get("wlc_express"); %>';
148
149		if(sw_mode == '2' && wlc_express == '0') ui_sw_mode = "re"; // Repeater
150		else if(sw_mode == '3' && wlc_psta == '0') ui_sw_mode = "ap"; // AP
151		else if((sw_mode == '3' && wlc_psta == '1') || (sw_mode == '3' && wlc_psta == '3')) ui_sw_mode = "mb"; // MediaBridge
152		else if(sw_mode == '2' && wlc_express != '0') ui_sw_mode = "ew"; // Express Way
153		else if(sw_mode == '5') ui_sw_mode = 'hs'; // Hotspot
154		else ui_sw_mode = "rt"; // Router
155
156		return (ui_sw_mode == mode);
157	}
158
159	if(!isSwMode('rt') && !isSwMode('ap')) return false;
160
161	var wl_nband_title = (function(){
162		String.prototype.toArray = function(){
163			var ret = eval(this.toString());
164			if(Object.prototype.toString.apply(ret) === '[object Array]')
165				return ret;
166			return [];
167		}
168
169		var wl_nband_title = [];
170		var wl_nband_array = "<% wl_nband_info(); %>".toArray();
171		var band2g_count = 0;
172		var band5g_count = 0;
173		for (var j=0; j<wl_nband_array.length; j++) {
174			if(wl_nband_array[j] == '2'){
175				band2g_count++;
176				wl_nband_title.push("2.4 GHz-" + band2g_count);
177			}
178			else if(wl_nband_array[j] == '1'){
179				band5g_count++;
180				wl_nband_title.push("5 GHz-" + band5g_count);
181			}
182		}
183		if(wl_nband_title.indexOf("2.4 GHz-2") == -1) wl_nband_title[wl_nband_title.indexOf("2.4 GHz-1")] = "2.4 GHz";
184		if(wl_nband_title.indexOf("5 GHz-2") == -1) wl_nband_title[wl_nband_title.indexOf("5 GHz-1")] = "5 GHz";
185
186		return wl_nband_title;
187	})();
188
189	var genWlObj = (function(){
190		var wlObj = [];
191		var wlUnit = function(_band, _ssid, _key){
192			this.band = _band;
193			this.ssid = _ssid;
194			this.key = _key;
195		}
196
197		var ssid_nvram = [decodeURIComponent('<% nvram_char_to_ascii("", "wl0_ssid"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl1_ssid"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl2_ssid"); %>')];
198		var auth_nvram = [decodeURIComponent('<% nvram_char_to_ascii("", "wl0_auth_mode_x"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl1_auth_mode_x"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl2_auth_mode_x"); %>')];
199		var key_nvram = [decodeURIComponent('<% nvram_char_to_ascii("", "wl0_wpa_psk"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl1_wpa_psk"); %>'), decodeURIComponent('<% nvram_char_to_ascii("", "wl2_wpa_psk"); %>')];
200		var smart_connect_nvram = '<% nvram_get("smart_connect_x"); %>';
201
202		var ssid_param = [decodeURIComponent('<% get_ascii_parameter("wl0_ssid"); %>'), decodeURIComponent('<% get_ascii_parameter("wl1_ssid"); %>'), decodeURIComponent('<% get_ascii_parameter("wl2_ssid"); %>')];
203		var auth_param = [decodeURIComponent('<% get_ascii_parameter("wl0_auth_mode_x"); %>'), decodeURIComponent('<% get_ascii_parameter("wl1_auth_mode_x"); %>'), decodeURIComponent('<% get_ascii_parameter("wl2_auth_mode_x"); %>')];
204		var key_param = [decodeURIComponent('<% get_ascii_parameter("wl0_wpa_psk"); %>'), decodeURIComponent('<% get_ascii_parameter("wl1_wpa_psk"); %>'), decodeURIComponent('<% get_ascii_parameter("wl2_wpa_psk"); %>')];
205
206		var applyParam = {
207			unit: decodeURIComponent('<% get_ascii_parameter("wl_unit"); %>'),
208			ssid: decodeURIComponent('<% get_ascii_parameter("wl_ssid"); %>'),
209			auth: decodeURIComponent('<% get_ascii_parameter("wl_auth_mode_x"); %>'),
210			key: decodeURIComponent('<% get_ascii_parameter("wl_wpa_psk"); %>'),
211			smartConnect: decodeURIComponent('<% get_ascii_parameter("smart_connect_x"); %>')
212		}
213
214		// original profile
215		for(var i=0; i<wl_nband_title.length; i++){
216			wlObj.push(new wlUnit(wl_nband_title[i], ssid_nvram[i], (auth_nvram[i] == "open") ? "" : key_nvram[i]));
217		}
218
219		if(applyParam.ssid != ""){
220			// handle wl
221			wlObj[applyParam.unit].ssid = applyParam.ssid;
222			wlObj[applyParam.unit].key = (applyParam.auth == "open") ? "" : applyParam.key;				
223		}
224		else{
225			// handle wlX
226			for(var i=0; i<wlObj.length; i++){
227				if(ssid_param[i] != ""){
228					wlObj[i].ssid = ssid_param[i];
229					wlObj[i].key = (auth_param[i] == "open") ? "" : key_param[i];
230				}
231			}			
232		}
233
234		// handle smart connect
235		if(applyParam.smartConnect == ""){
236			if(smart_connect_nvram == 1){
237				// Tri band steering
238				wlObj.length = 1;
239				wlObj[0].band = "Tri-band Smart Connect";
240			}
241			else if(smart_connect_nvram == 2){
242				// 5GHz band steering
243				wlObj.length = 2;
244				wlObj[1].band = "5 GHz Smart Connect";
245			}
246		}
247		else if(applyParam.smartConnect == 1){
248			// Tri band steering
249			wlObj.length = 1;
250			wlObj[0].band = "Tri-band Smart Connect";
251		}
252		else if(applyParam.smartConnect == 2){
253			// 5GHz band steering
254			wlObj.length = 2;
255			wlObj[1].band = "5 GHz Smart Connect";
256		}
257
258		return wlObj;
259	})();
260
261	(function(wlObj){
262		if(wlObj.length == 0 || typeof wlObj == "undefined") return false;
263
264		var wlHintCss = "";
265		wlHintCss += "<style type='text/css'>"
266		// Desktop style sheet
267		wlHintCss += "#wlHint{";
268		wlHintCss += "font-family: Arial;";
269		wlHintCss += "background:url(/images/New_ui/login_bg.png) #283437 no-repeat;";
270		wlHintCss += "background-size: 1280px 1076px;";
271		wlHintCss += "z-index:9999;";
272		wlHintCss += "position:absolute;";
273		wlHintCss += "left:0;";
274		wlHintCss += "top:0;";
275		wlHintCss += "width:100%;";
276		wlHintCss += "height:100%;";
277		wlHintCss += "background-position: center 0%;";
278		wlHintCss += "margin: 0px;";
279		wlHintCss += "}.prod_madelName{";
280		wlHintCss += "font-size: 26pt;";
281		wlHintCss += "color:#fff;";
282		wlHintCss += "margin-top: 10px;";
283		wlHintCss += "}.nologin{";
284		wlHintCss += "word-break: break-all;";
285		wlHintCss += "margin:10px 0px 0px 78px;";
286		wlHintCss += "background-color:rgba(255,255,255,0.2);";
287		wlHintCss += "padding:20px;";
288		wlHintCss += "line-height:36px;";
289		wlHintCss += "border-radius: 5px;";
290		wlHintCss += "width: 480px;";
291		wlHintCss += "border: 0;";
292		wlHintCss += "color:#fff;";
293		wlHintCss += "color:#000\9;"; /* IE6 IE7 IE8 */
294		wlHintCss += "font-size:16pt;";
295		wlHintCss += "}.div_table{";
296		wlHintCss += "display:table;";
297		wlHintCss += "}.div_tr{";
298		wlHintCss += "display:table-row;";
299		wlHintCss += "}.div_td{";
300		wlHintCss += "display:table-cell;";
301		wlHintCss += "}.title_gap{";
302		wlHintCss += "margin:20px 0px 0px 78px;";
303		wlHintCss += "width: 480px;";
304		wlHintCss += "font-size: 16pt;";
305		wlHintCss += "color:#fff;";
306		wlHintCss += "}.main_field_gap{";
307		wlHintCss += "margin:100px auto 0;";
308		wlHintCss += "}b{color:#00BBFF;";
309		wlHintCss += "}.title_name{";
310		wlHintCss += "font-size: 40pt;";
311		wlHintCss += "color:#93d2d9;";
312		wlHintCss += "}.img_gap{";
313		wlHintCss += "padding-right:30px;";
314		wlHintCss += "vertical-align:middle;";
315		wlHintCss += "}.login_img{";
316		wlHintCss += "width:43px;";
317		wlHintCss += "height:43px;";
318		wlHintCss += "background-image: url('images/New_ui/icon_titleName.png');";
319		wlHintCss += "background-repeat: no-repeat;}";
320		// Mobile style sheet
321		wlHintCss += "@media screen and (max-width: 1000px){";
322		if(top.location.pathname.search("QIS") != -1){
323			wlHintCss += "#wlHint{background:url('/images/qis/pattern3-3_10_A15.png'),url('/images/qis/pattern3_05_4.png'),url('/images/qis/mainimage_img4.png') #1D1E1F no-repeat;";
324			wlHintCss += "background-size:auto;}b{color:#279FD9;}";
325		}
326		wlHintCss += ".prod_madelName{";
327		wlHintCss += "font-size: 13pt;";
328		wlHintCss += "}.nologin{";
329		wlHintCss += "margin-left:10px;";
330		wlHintCss += "padding:10px;";
331		wlHintCss += "line-height:18pt;";
332		wlHintCss += "width: 100%;";
333		wlHintCss += "font-size:14px;";
334		wlHintCss += "}.main_field_gap{";
335		wlHintCss += "width:82%;";
336		wlHintCss += "margin:10px 0 0 15px;";
337		wlHintCss += "}.title_name{";
338		wlHintCss += "font-size:20pt;";
339		wlHintCss += "margin-left:15px;";
340		wlHintCss += "}.login_img{";
341		wlHintCss += "background-size: 75%;";
342		wlHintCss += "}.img_gap{";
343		wlHintCss += "padding-right:0;";
344		wlHintCss += "vertical-align:middle;";
345		wlHintCss += "}.title_gap{";
346		wlHintCss += "margin:15px 0px 0px 15px;";
347		wlHintCss += "width: 100%;";
348		wlHintCss += "font-size: 12pt;";
349		wlHintCss += "}}";
350		wlHintCss += "</style>";
351
352		var wlHintJs = '<script>setInterval(function(){var a;if(window.XMLHttpRequest)a=new XMLHttpRequest;else{if(!window.ActiveXObject)return!1;a=new ActiveXObject("Microsoft.XMLHTTP")}a.onreadystatechange=function(){4==a.readyState&&200==a.status&&(top.location.href="/")},a.open("GET","/httpd_check.xml",!0),a.send(null)},3e3);<\x2Fscript>';
353
354		var wlHintHtml = '';
355		wlHintHtml += '<meta content="telephone=no" name="format-detection"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">';
356		wlHintHtml += '<div id="wlHint">';
357		wlHintHtml += '<div class="div_table main_field_gap">';
358		wlHintHtml += '<div class="div_tr">';
359		wlHintHtml += '<div class="prod_madelName"><div class="title_name"><div class="div_td img_gap"><div class="login_img"></div></div><div class="div_td"><#Web_Title2#></div></div></div>';
360		wlHintHtml += '<div id="login_filed">';
361		wlHintHtml += "<div class='p1 title_gap'><#DrSurf_sweet_advise1#></div>";
362		for(var i=0; i<wlObj.length; i++){
363			wlHintHtml += '<div class="p1 title_gap">'+ wlObj[i].band +'</div>';
364			wlHintHtml += '<div class="nologin">';
365			wlHintHtml += '<#QIS_finish_wireless_item1#>: <b>';
366			wlHintHtml += wlObj[i].ssid + '</b><br>';
367			wlHintHtml += '<#Network_key#>: <b>';
368			wlHintHtml += (wlObj[i].key == "") ? "Open System" : wlObj[i].key;
369			wlHintHtml += '</b></div>';
370		}
371		wlHintHtml += '</div></div></div></div>';
372
373		top.document.write(wlHintCss + wlHintJs + wlHintHtml);
374	})(genWlObj);
375}
376
377function initial(){
378	var isWLclient = function () {  //detect login client is by wireless or wired
379		<% login_state_hook(); %>
380		var wireless = [<% wl_auth_list(); %>];	// [[MAC, associated, authorized], ...]
381			
382		if(wireless.length > 0) {
383			for(var i = 0; i < wireless.length; i += 1) {
384				if(wireless[i][0].toUpperCase() == login_mac_str().toUpperCase()) {
385					return true;  //wireless
386				}
387			}
388		}
389
390		return false; //wired
391	};
392
393	var getXMLAndRedirect = function(){
394		if(makeRequest._notSupportXML){
395			if(getflag !== ""){
396				parent.location.href = "/QIS_wizard.htm?flag=finish";
397			}
398
399			if(current_page.length > 0){
400				parent.location.href = current_page;
401			}
402		}
403
404		makeRequest.start('/httpd_check.xml', function(xhr){
405			if(xhr.responseText.search("Main_Login.asp") !== -1) top.location.href = "/index.asp";
406
407			var httpds = xhr.responseXML.getElementsByTagName("httpd");
408			if (httpds !== null && httpds[0] !== null) {
409				if(parent.parent.document.getElementById("drword")) {
410					parent.parent.document.getElementById("drword").innerHTML = "<#DrSurf_sweet_advise2#><br/><br/>";
411				}
412				var redirectPage = current_page;
413				if(redirectPage.length > 0) {
414					if (getflag !== "") {
415						redirectPage = next_page + "?flag=" + getflag;
416					}
417
418					setTimeout(function(){
419						parent.location.href = redirectPage;
420					}, 1000);
421				}
422			}
423		}, getXMLAndRedirect);
424	};
425
426	if(getflag == "vpnClient" || getflag == "background" || action_script == "saveNvram"){
427		return false;
428	}
429	else if(getflag == "set_language"){
430		if(navigator.appName.indexOf("Microsoft") >= 0)
431			parent.parent.location.reload();
432		else
433			parent.parent.location.href = parent.parent.location.href.split('#')[0];
434	}
435	else if(next_page.indexOf("MobileQIS_Login") >= 0){
436	}
437	else if(next_page.indexOf("QIS_") >= 0){
438		if(dsl_support){
439			if(current_page.indexOf("QIS_annex_setting.htm") >= 0 || current_page.indexOf("QIS_detect.htm") >= 0){
440				var update_dsl_info = function(){
441					makeRequest.start('/start_dsl_autodet.asp', function(){}, update_dsl_info);
442				};
443				setTimeout(update_dsl_info, 700);
444			}
445			setTimeout("delay_redirect('"+next_page+"');", restart_time*1000);
446		}
447		else {
448			if(getflag.length > 0)
449				document.redirectForm.flag.value = getflag;
450			
451			if(getflag == "manual"){
452				if(rc_support.search("gobi") >= 0){
453					if(isMobile())
454						setTimeout("qis_delay_redirect('/qis_m/QIS_modem.htm');", restart_time*1000);
455					else
456						setTimeout("qis_delay_redirect('/qis/QIS_modem.htm');", restart_time*1000);
457				}	
458				else{
459					if(isMobile())
460						setTimeout("qis_delay_redirect('/qis_m/QIS_wireless.htm');", restart_time*1000);
461					else
462						setTimeout("qis_delay_redirect('/qis/QIS_wireless.htm');", restart_time*1000);
463				}	
464			}
465			else if(parent.document.getElementById("hidden_frame")){
466				if(getflag == "verify_detect_reboot"){
467					setTimeout("parent.parent.check_DUT();", restart_time*1000);
468					return;
469				}
470				else if(getflag == "dongle_mode"){
471					setTimeout("parent.detect3GConn();", restart_time*1000);
472					return;
473				}
474				else if(getflag == "no_wait"){	//for internet_type 
475					//no wait
476				
477				}
478				else if(getflag == "static"){
479					if(isMobile())
480						qis_delay_redirect('/qis_m/QIS_wireless.htm');
481					else
482						qis_delay_redirect('/qis/QIS_wireless.htm');		
483				}
484				else{
485				
486					if(isMobile())
487						setTimeout("qis_delay_redirect('/qis_m/QIS_verify_detect.htm');", restart_time*1000);
488					else
489						setTimeout("qis_delay_redirect('/qis/QIS_verify_detect.htm');", restart_time*1000);
490				}
491			}
492			else{
493				if(getflag == "auto_way_vpn"){
494					parent.showLoading(restart_time);
495					if(isMobile())
496						setTimeout("delay_redirect('/qis_m/QIS_verify_detect.htm');", restart_time*1000);
497					else
498						setTimeout("delay_redirect('/qis/QIS_verify_detect.htm');", restart_time*1000);
499					return;
500				}
501				else if(getflag == "detect"){
502					parent.showLoading(restart_time);
503					if(isMobile())
504						setTimeout("delay_redirect('/qis_m/QIS_detect.htm');", restart_time*1000);
505					else
506						setTimeout("delay_redirect('/qis/QIS_detect.htm');", restart_time*1000);
507					return;
508				}		
509				else if(getflag == "verify_detect"){
510					parent.showLoading(restart_time);
511					if(isMobile())
512						setTimeout("delay_redirect('/qis_m/QIS_verify_detect.htm');", restart_time*1000);
513					else
514						setTimeout("delay_redirect('/qis/QIS_verify_detect.htm');", restart_time*1000);
515					return;
516				}
517				else{			
518					parent.showLoading(restart_time, "waiting");
519					if(isWLclient()) {
520							setTimeout(getXMLAndRedirect, restart_time*1000);
521					}
522					else
523						setTimeout("top_delay_redirect('"+next_page+"');", restart_time*1000);
524				}
525			}
526		}
527	}
528	else if(current_page.indexOf("ParentalControl_") >= 0){
529		parent.showLoading(restart_time, "waiting");
530		setTimeout(getXMLAndRedirect, restart_time*1000);
531	}
532	else if(current_page.indexOf("AiProtection_") >= 0){
533		parent.showLoading(restart_time, "waiting");
534		setTimeout(getXMLAndRedirect, restart_time*1000);
535	}
536	else if(current_page.indexOf("Feedback") >= 0){
537		setTimeout("parent.redirect();", action_wait*1000);
538	}	
539	else if(getflag == "ddnscheck"){
540		setTimeout("parent.go_index_page();", 2000);
541	}
542	else if(getflag == "aidisk"){
543		parent.Webdav_status = (parent.Webdav_status == 1) ? 0 : 1;
544		parent.resultOfSwitchWebdavStatus();
545	}
546	else if(action_script.indexOf("aidisk_asusddns_register") >= 0){
547		setTimeout("parent.checkDDNSReturnCode();", 1000);
548	}
549	else if(action_script.indexOf("restart_ddns") >= 0) {
550  		setTimeout("parent.parent.checkDDNSReturnCode();", 1000);
551	}
552	else if(action_script.indexOf("start_webs_upgrade") >= 0) {
553  		setTimeout("parent.startDownloading();", 1000);
554	}
555	else if(action_script == "restart_cloudsync"){
556		parent.showLoading(restart_time, "waiting");
557		setTimeout("top_delay_redirect('"+current_page+"');", restart_time*1000); 
558	}
559	else if(action_script == "reboot"){
560		parent.stopFlag = 1;
561		parent.showLoading(restart_time);
562		if(!current_page.indexOf("Advanced_WAN_Content.asp"))
563			setTimeout("parent.parent.location.href='"+next_page+"';", (restart_time+2)*1000);
564	}else if(action_script == "start_sig_check"){	//check signature, do nothing
565		
566	}
567	else if(getflag == "liveUpdate"){
568		setTimeout("parent.detect_firmware();", 5000);
569	}	
570	else if(action_script == "start_diskscan"){
571		parent.show_loadingBar_field();
572	}
573	else if(action_script == "restart_diskmon"){
574		parent.document.getElementById('loadingIcon_apply').style.display = "none";
575	}
576	else if(getflag == "router_sync_ddns"){
577		parent.apply_sharelink();
578	}
579	else if(getflag == "apply_routersync"){
580		parent.show_block();
581	}
582	else if(page_modified == 1){
583		parent.showLoading(restart_time, "waiting");
584		if(current_page.length > 0){
585			if(action_script == "restart_wireless" && isWLclient()){
586				showWlHint();
587			}
588			else if(current_page.indexOf("clients.asp") >= 0){
589				document.redirectForm.flag.value = "Client";
590				setTimeout("top_delay_redirect('/');", restart_time*1000);
591			}
592			else if(current_page.indexOf("Advanced_OperationMode_Content.asp") >= 0){
593				parent.document.getElementById('drword').innerHTML = "<#LAN_IP_changed_suggedtion1#>"+parent.document.form.lan_ipaddr.value+"<#LAN_IP_changed_suggedtion2#><br/>";
594				setTimeout("hideLoading()	",20000);
595				setTimeout("parent.document.getElementById('Loading').style.display = 'none';",20000);
596				setTimeout("parent.dr_advise();",20000);
597				setTimeout("redirect()", restart_time*1000);
598			}
599			else if(current_page.indexOf("Advanced_LAN_Content.asp") >= 0){
600				if(lan_proto == "dhcp"){
601					parent.document.getElementById('drword').innerHTML = "<#Main_alert_proceeding_desc3#>.<#LANConfig_ChangedLANIP#>";
602				}
603				else{
604					parent.document.getElementById('drword').innerHTML = "<#LAN_IP_changed_suggedtion1#>"+parent.document.form.lan_ipaddr.value+"<#LAN_IP_changed_suggedtion2#><br/>";
605				}
606				setTimeout("hideLoading();",20000);
607				setTimeout("parent.dr_advise();",20000);
608				setTimeout("redirect_qis()",restart_time*1000);
609			}
610			else if(getflag == "nodetect"){
611				setTimeout("top_delay_redirect('"+current_page+"');", restart_time*1000);
612			}
613			else if(current_page.indexOf("Advanced_System_Content") >= 0){
614				if(getflag != ""){
615					setTimeout("parent.parent.location.href='"+getflag+"/"+current_page+"';", restart_time*1000);
616				}
617				else
618					setTimeout("parent.parent.location.href='"+current_page+"';", restart_time*1000);
619			}
620			else{
621				setTimeout(getXMLAndRedirect, restart_time*1000);
622			}
623		}
624	}
625	else{
626		if(current_page.length > 0){
627			setTimeout("top_delay_redirect('"+current_page+"');", restart_time*1000);
628		}
629		else if(next_page.length > 0){
630			setTimeout("delay_redirect('"+next_page+"');", restart_time*1000);
631		}
632	}
633}
634</script>
635</head>
636
637<body onload="initial();">
638<form method="post" name="redirectForm" action="" target="">
639<input type="hidden" name="flag" value="">
640<input type="hidden" name="prev_page" value="">
641</form>
642
643<% update_variables(); %>
644<% convert_asus_variables(); %>
645<% asus_nvram_commit(); %>
646<% notify_services(); %>
647
648</body>
649</html>
650