• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt/router/www/sysdep/RT-AC1200G/www/qis/
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<head>                                     
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<link rel="stylesheet" type="text/css" href="/form_style.css">
9<script type="text/javascript" src="QISMobilePlugin.js"></script>
10<script type="text/javascript" src="../help.js"></script>
11<script type="text/JavaScript" src="../state.js"></script>
12<script type="text/javascript" src="../general.js"></script>
13<script type="text/javascript" src="../alttxt.js"></script>
14<script type="text/javascript" src="../validator.js"></script>
15<style>
16.image_field{
17	height:250px;
18	background:url('../images/New_ui/new_qis/ISP-card.png') no-repeat;
19	background-size:90%;
20	background-position: 50% 25%;
21}
22
23.iptvTable{
24	width:360px;
25	margin-left:-7px;
26}
27
28.iptvTable th{
29	text-align:right;
30	width:160px;
31	color:#6CF;
32}
33
34.iptvTable td{
35	text-align:left;
36}
37
38</style>
39<script>
40<% login_state_hook(); %>
41var now_flag = '<% get_parameter("flag"); %>';
42<% wan_get_parameter(); %>
43var original_switch_wantag = '<% nvram_get("switch_wantag"); %>';
44var is_TW_sku = (ttc.search("TW") == -1) ? false : true;
45
46function QKaccount_load_body(){
47	document.getElementById("vpn_client_desc").onmouseover = function(){overHint(50);}
48	document.getElementById("vpn_client_desc").onmouseout = function(){nd();}
49	parent.document.title = "<#Web_Title#> - <#QKSet_account_webtitle#>";
50	if(parent.ISMOBILE){
51		parent.set_step("internet_type");
52		hideObjs();
53		document.getElementById("QISmain").style.display = "none";
54		document.getElementById("QISmain_m").style.display = "";		
55	}
56	else{
57		parent.set_step("t2");
58		hideLinkTag();
59		flash_button();
60		//	document.getElementById("descritpion_tail1").innerHTML = "<#qis_pppoe_desc2#>";
61		if(is_TW_sku)		
62			document.getElementById("isp_TW_desc").style.display = "";
63		if(now_flag != "auto_way_pppoe")
64			show_prev_button();					
65		document.getElementById("nextButton").focus();
66	}
67	
68	get_value_from_parent();
69	if(!document.getElementById('vpn_client_check').checked)
70		document.form.wan_proto.value = "pppoe";
71
72	if( parent.based_modelid != "RT-AC3200" &&
73		parent.based_modelid != "RT-AC87U" && 
74		parent.based_modelid != "RT-AC68U" &&
75		parent.based_modelid != "RT-AC66U" &&
76		parent.based_modelid != "RT-AC51U" &&
77		parent.based_modelid != "RT-N66U" &&
78		parent.based_modelid != "RT-N18U"
79	){	// MODELDEP: RT-AC3200, RT-AC87U, RT-AC68U, RT-AC66U, RT-AC51U, RT-N66U, RT-N18U
80		document.getElementById('meoOption').outerHTML = "";
81		document.getElementById('vodafoneOption').outerHTML = "";
82	}
83	
84	if( parent.based_modelid != "RT-AC5300" &&
85		parent.based_modelid != "RT-AC3200" &&
86		parent.based_modelid != "RT-AC3100" &&
87		parent.based_modelid != "RT-AC88U" &&
88		parent.based_modelid != "RT-AC87U" && 
89		parent.based_modelid != "RT-AC68U" &&
90		parent.based_modelid != "RT-AC66U" &&
91		parent.based_modelid != "RT-AC56U" &&
92		//based_modelid != "RT-AC51U" &&
93		parent.based_modelid != "RT-N66U" &&
94		parent.based_modelid != "RT-N18U"
95        ){      
96		document.getElementById('movistarOption').outerHTML = "";
97	}
98
99	if(parent.based_modelid == "RT-AC5300R"){ //MODELDEP: RT-AC5300R : TRUNK ports
100		document.getElementById("voip_lan").innerHTML = "LAN4";	//P3
101		document.getElementById("iptv_lan").innerHTML = "LAN8"; //P4
102		document.getElementById("voip_port3").innerHTML = "VoIP (LAN port 4):"; //P3
103		document.getElementById("iptv_port4").innerHTML = "IPTV (LAN port 8):"; //P4
104	}
105	else if(parent.based_modelid == "RT-AC53"){
106		document.getElementById("voip_lan").innerHTML = "LAN1";
107		document.getElementById("iptv_lan").innerHTML = "LAN2";
108		document.getElementById("voip_port3").innerHTML = "VoIP (LAN port 1):";
109		document.getElementById("iptv_port4").innerHTML = "IPTV (LAN port 2):";
110	}
111}
112
113function get_value_from_parent(){
114	if(now_flag == "auto_way")
115		document.form.flag.value = now_flag;
116	
117	if(now_flag == "auto_way_pppoe")
118		document.form.wan_proto.value = "pppoe";
119	else
120		document.form.wan_proto.value = parent.document.QKform.wan_proto.value;
121	
122	document.form.wan_hwaddr_x.value = parent.document.QKform.wan_hwaddr_x.value;
123	document.form.wan_pppoe_username.value = parent.document.QKform.wan_pppoe_username.value;
124	document.form.wan_pppoe_passwd.value = parent.document.QKform.wan_pppoe_passwd.value;
125	
126	
127	
128	document.form.wan_ipaddr_x.value = parent.document.QKform.wan_ipaddr_x.value;
129	document.form.wan_netmask_x.value = parent.document.QKform.wan_netmask_x.value;
130	document.form.wan_gateway_x.value = parent.document.QKform.wan_gateway_x.value;
131	
132	document.form.wan_dns1_x.value = parent.document.QKform.wan_dns1_x.value;
133	document.form.wan_dns2_x.value = parent.document.QKform.wan_dns2_x.value;
134	
135	document.form.wan_heartbeat_x.value = parent.document.QKform.wan_heartbeat_x.value;
136	
137	if(now_flag == "auto_way"){
138		document.form.wan_dhcpenable_x.value = parent.document.QKform.wan_dhcpenable_x.value;
139		document.form.wan_dnsenable_x.value = parent.document.QKform.wan_dnsenable_x.value;
140	}
141}
142
143function show_prev_button(){
144	if(now_flag == "auto_way"){
145		document.form.prev_page.value = parent.document.QKform.prev_page.value;
146		parent.document.QKform.prev_page.value = "/qis/QIS_internet_ip.htm";
147	}
148	else if(parent.document.getElementById("flag").value == "pppoe"){
149		document.getElementById("prevButton").value = '<#menu5#>';
150		
151		document.form.prev_page.value = "/Advanced_WAN_Content.asp";
152	}
153}
154
155function submitForm(o, s){
156	if(parent.ISMOBILE){
157		document.form.wan_pppoe_username.value = document.form.wan_pppoe_username_m.value;
158		document.form.wan_pppoe_passwd.value = document.form.wan_pppoe_passwd_m.value;
159		document.form.wan_hwaddr_x.value = document.form.wan_hwaddr_x_m.value;
160	}
161
162	if(document.form.wan_pppoe_username.value.length == 0){
163		alert("<#QKSet_account_nameblank#>");
164		document.form.wan_pppoe_username.select();
165		document.form.wan_pppoe_username.focus();
166		changeiuiBackground(0);
167		return false;
168	}
169	if(!validator.string(document.form.wan_pppoe_username)){
170		document.form.wan_pppoe_username.select();
171		document.form.wan_pppoe_username.focus();
172		changeiuiBackground(0);
173		return false;
174	}
175	
176	if(!validator.string(document.form.wan_pppoe_passwd)){
177		document.form.wan_pppoe_passwd.select();
178		document.form.wan_pppoe_passwd.focus();
179		changeiuiBackground(0);
180		return false;
181	}
182
183	if(!check_macaddr(document.form.wan_hwaddr_x,check_hwaddr_flag(document.form.wan_hwaddr_x))){
184		document.form.wan_hwaddr_x.select();
185		document.form.wan_hwaddr_x.focus();
186		return false;
187	}
188
189	if(now_flag == "auto_way"){
190		//parent.showLoading();
191		simple_showLoading();
192		
193		document.form.wan_ipaddr_x.disabled = false;
194		document.form.wan_netmask_x.disabled = false;
195		document.form.wan_gateway_x.disabled = false;
196		document.form.wan_dns1_x.disabled = false;
197		document.form.wan_dns2_x.disabled = false;
198		document.form.wan_heartbeat_x.disabled = false;
199		
200		document.getElementById("x_Setting").disabled = false;
201		document.form.x_Setting.value = '<% nvram_get("x_Setting"); %>';		
202		document.form.sw_mode.value = parent.document.QKform.sw_mode.value;
203		
204		if(parent.flag_manual)
205			document.form.flag.value = "manual";
206		else
207			document.form.flag.value = "verify_detect";
208
209		document.form.next_page.value = "/QIS_wizard.htm";	
210		document.form.submit();
211	}
212	else if(document.form.wan_proto.value == 'pppoe' || document.form.wan_proto.value == ''){
213		//parent.showLoading();
214		simple_showLoading();
215
216		// uinfi
217		var original_switch_wantag = '<% nvram_get("switch_wantag"); %>';
218		set_ISP_profile();
219		if(original_switch_wantag != document.form.switch_wantag.value){
220			/*
221			document.form.action_script.value	= "reboot";
222			document.form.action_wait.value	= eval("<% get_default_reboot_time(); %> + 10");
223			document.getElementById("loadHint").style.display = "";
224			document.getElementById("nextButton").style.display = "none";
225			document.getElementById("prevButton").style.display = "none";
226			*/
227			var reboot_time = eval("<% get_default_reboot_time(); %> + 10");
228			document.form.action_script.value = "saveNvram";
229			document.form.action_wait.value = "0";
230			parent.sysReboot = true;
231			
232			if(reboot_time > parent.rebootTime)
233				parent.rebootTime = reboot_time;
234		}
235		
236		document.getElementById("x_Setting").disabled = false;
237		document.form.x_Setting.value = '<% nvram_get("x_Setting"); %>';
238		document.form.sw_mode.value = parent.document.QKform.sw_mode.value;
239
240		if(parent.flag_manual)
241			document.form.flag.value = "manual";
242		else
243			document.form.flag.value = "verify_detect";
244
245		document.form.next_page.value = "/QIS_wizard.htm";
246		document.form.submit();
247		if(original_switch_wantag != document.form.switch_wantag.value)
248			setTimeout(function(){
249				location.href = "/qis/QIS_wireless.htm";
250			}, 500);
251	}
252	else if(document.form.wan_proto.value == 'pptp'|| document.form.wan_proto.value == 'l2tp'){
253		document.form.next_page.value = "QIS_internet_ip.htm";
254
255		parent.document.QKform.wan_hwaddr_x.value = document.form.wan_hwaddr_x.value;
256		parent.document.QKform.wan_pppoe_username.value = document.form.wan_pppoe_username.value;
257		parent.document.QKform.wan_pppoe_passwd.value = document.form.wan_pppoe_passwd.value;
258		parent.document.QKform.wan_proto.value = document.form.wan_proto.value;
259		location.href = document.form.next_page.value;
260		return false;	//do not submit form
261	}
262	else{
263		changeiuiBackground(0);
264		alert("System error!");	// no translate.
265	}
266}
267
268function simple_showLoading(){
269	document.getElementById("loadingIcon").style.display = "";
270}
271
272function submitenter(myfield,e)
273{	
274	var keycode;
275	if (window.event) keycode = window.event.keyCode;
276	else if (e) keycode = e.which;
277	else return true;
278
279	if (keycode == 13){
280		submitForm();
281   	return false;
282  }
283	else
284   	return true;
285}
286/* password item show or not */
287function pass_checked(obj){
288	switchType(obj, document.form.show_pass_1.checked, true);
289}
290
291function showMAC(){
292	var macToggle = document.form.macToggle.checked;
293	if(macToggle){
294		document.form.wan_hwaddr_x.value = login_mac_str();
295		document.form.wan_hwaddr_x.focus();
296	}
297	else{
298		document.form.wan_hwaddr_x.value = "";
299	}
300}
301
302function showMAC_m(){
303	if(document.getElementById("toggleDNS").getAttribute("toggled") == "true"){	
304		document.form.wan_hwaddr_x_m.value = login_mac_str();
305		document.form.wan_hwaddr_x.value = login_mac_str();
306	}
307	else{
308		document.form.wan_hwaddr_x_m.value = "";
309	}
310}
311
312function check_macaddr(obj,flag){ //control hint of input mac address
313	if(flag == 1){
314		var childsel=document.createElement("div");
315		childsel.setAttribute("id","check_mac");
316		childsel.style.color="#FFCC00";
317		obj.parentNode.appendChild(childsel);
318		document.getElementById("check_mac").innerHTML="<#LANHostConfig_ManualDHCPMacaddr_itemdesc#>";		
319		return false;
320	}else if(flag == 2){
321		var childsel=document.createElement("div");
322		childsel.setAttribute("id","check_mac");
323		childsel.style.color="#FFCC00";
324		obj.parentNode.appendChild(childsel);
325		document.getElementById("check_mac").innerHTML="<#IPConnection_x_illegal_mac#>";
326		return false;
327	}else{
328		document.getElementById("check_mac") ? document.getElementById("check_mac").style.display="none" : true;
329		return true;
330	}
331}
332
333function enable_vpn_client(obj){
334	if(obj.checked){
335		document.form.vpn_option.style.display = "";
336		document.form.vpn_option.disabled = "";
337		document.form.wan_proto.value = document.form.vpn_option.value;
338	}
339	else{
340		document.form.vpn_option.style.display = "none";
341		document.form.vpn_option.disabled = "disabled";
342		document.form.wan_proto.value = "pppoe";
343	}
344	//vpn_option
345}
346
347function change_vpn_type(obj){
348	document.form.wan_proto.value = obj.value;
349}
350
351function ISP_Profile_Selection(isp){
352	if(isp == "none"){
353		document.getElementById("port_settings").style.display = "none";
354		document.getElementById("manual_settings").style.display = "none";
355		document.form.switch_wantag.value = "none";
356		document.getElementById("iptv_configuration").style.display = "none";
357	}
358  	else if(isp == "unifi_home"){
359  		document.getElementById("port_settings").style.display = "";
360  		document.getElementById("wan_iptv_line").style.display = "";
361		document.getElementById("wan_iptv_x").style.display = "";
362		document.getElementById("wan_voip_line").style.display = "none";
363		document.getElementById("wan_voip_x").style.display = "none";
364		document.getElementById("manual_settings").style.display = "none";
365		document.form.switch_wantag.value = "unifi_home";
366		document.getElementById("iptv_configuration").style.display = "none";
367	}
368	else if(isp == "unifi_biz"){
369		document.getElementById("port_settings").style.display = "none";
370		document.getElementById("manual_settings").style.display = "none";
371		document.form.switch_wantag.value = "unifi_biz";
372		document.getElementById("iptv_configuration").style.display = "none";
373	}
374	else if(isp == "singtel_mio"){
375		document.getElementById("port_settings").style.display = "";
376		document.getElementById("wan_iptv_line").style.display = "";
377		document.getElementById("wan_iptv_x").style.display = "";
378		document.getElementById("wan_voip_line").style.display = "";
379		document.getElementById("wan_voip_x").style.display = "";
380		document.getElementById("manual_settings").style.display = "none";
381		document.form.switch_wantag.value = "singtel_mio";
382		document.getElementById("iptv_configuration").style.display = "none";
383	}
384	else if(isp == "singtel_others"){
385		document.getElementById("port_settings").style.display = "";
386		document.getElementById("wan_iptv_line").style.display = "";
387		document.getElementById("wan_iptv_x").style.display = "";
388		document.getElementById("wan_voip_line").style.display = "none";
389		document.getElementById("wan_voip_x").style.display = "none";
390		document.getElementById("manual_settings").style.display = "none";
391		document.form.switch_wantag.value = "singtel_others";
392		document.getElementById("iptv_configuration").style.display = "none";
393	}
394	else if(isp == "m1_fiber"){
395		document.getElementById("port_settings").style.display = "";
396		document.getElementById("wan_iptv_line").style.display = "none";
397		document.getElementById("wan_iptv_x").style.display = "none";
398		document.getElementById("wan_voip_line").style.display = "";
399		document.getElementById("wan_voip_x").style.display = "";
400		document.getElementById("manual_settings").style.display = "none";
401		document.form.switch_wantag.value = "m1_fiber";
402		document.getElementById("iptv_configuration").style.display = "none";
403	}
404	else if(isp == "maxis_fiber"){
405		document.getElementById("port_settings").style.display = "";
406		document.getElementById("wan_iptv_line").style.display = "none";
407		document.getElementById("wan_iptv_x").style.display = "none";
408		document.getElementById("wan_voip_line").style.display = "";
409		document.getElementById("wan_voip_x").style.display = "";
410		document.getElementById("manual_settings").style.display = "none";
411		document.form.switch_wantag.value = "maxis_fiber";
412		document.getElementById("iptv_configuration").style.display = "none";
413	}
414	else if(isp == "maxis_fiber_sp"){
415		document.getElementById("port_settings").style.display = "";
416		document.getElementById("wan_iptv_line").style.display = "none";
417		document.getElementById("wan_iptv_x").style.display = "none";
418		document.getElementById("wan_voip_line").style.display = "";
419		document.getElementById("wan_voip_x").style.display = "";
420		document.getElementById("manual_settings").style.display = "none";
421		document.form.switch_wantag.value = "maxis_fiber_sp";
422		document.getElementById("iptv_configuration").style.display = "none";
423	}
424	else if(isp == "movistar"){
425		document.getElementById("port_settings").style.display = "none";
426		document.getElementById("manual_settings").style.display = "none";
427		document.form.switch_wantag.value = "movistar";
428		document.getElementById("iptv_configuration").style.display = "";
429		change_auth(document.form.wan10_auth_x.value);
430	}
431	else if(isp == "meo"){
432		document.getElementById("port_settings").style.display = "";
433		document.getElementById("wan_iptv_line").style.display = "";
434		document.getElementById("wan_iptv_x").style.display = "";
435		document.getElementById("wan_voip_line").style.display = "none";
436		document.getElementById("wan_voip_x").style.display = "none";
437		document.getElementById("manual_settings").style.display = "none";
438		document.form.switch_wantag.value = "meo";
439		document.getElementById("iptv_configuration").style.display = "none";
440	}	
441	else if(isp == "vodafone"){
442		document.getElementById("port_settings").style.display = "";
443		document.getElementById("wan_iptv_line").style.display = "";
444		document.getElementById("wan_iptv_x").style.display = "";
445		document.getElementById("wan_voip_line").style.display = "";
446		document.getElementById("wan_voip_x").style.display = "";
447		document.getElementById("manual_settings").style.display = "none";
448		document.form.switch_wantag.value = "vodafone";
449		document.getElementById("iptv_configuration").style.display = "none";
450	}	
451	else if(isp == "manual"){
452		document.getElementById("port_settings").style.display = "";
453		document.getElementById("wan_iptv_line").style.display = "";
454		document.getElementById("wan_iptv_x").style.display = "";
455		document.getElementById("wan_voip_line").style.display = "";
456		document.getElementById("wan_voip_x").style.display = "";
457		document.getElementById("manual_settings").style.display = "";
458		document.form.switch_wantag.value = "manual";
459		document.getElementById("iptv_configuration").style.display = "none";
460	}
461
462	if(isp == "vodafone" || isp == "meo")
463		document.getElementById("iptv_title").innerHTML = "Bridge Port: ";
464	else
465		document.getElementById("iptv_title").innerHTML = "IPTV STB Port: ";
466
467	if(isp == "vodafone")
468		document.getElementById("voip_title").innerHTML = "IPTV STB Port: ";
469	else
470		document.getElementById("voip_title").innerHTML = "VoIP Port: ";
471
472}
473
474function set_ISP_profile(){
475    if(document.form.switch_wantag.value == "unifi_home") {
476		document.form.switch_stb_x.value = "4";
477        document.form.switch_wan0tagid.value = "500";
478        document.form.switch_wan0prio.value = "0";
479        document.form.switch_wan1tagid.value = "600";
480        document.form.switch_wan1prio.value = "0";
481        document.form.switch_wan2tagid.value = "0";
482        document.form.switch_wan2prio.value = "0";
483    }
484    else if(document.form.switch_wantag.value == "unifi_biz") {
485		document.form.switch_stb_x.value = "0";
486        document.form.switch_wan0tagid.value = "500";
487        document.form.switch_wan0prio.value = "0";
488        document.form.switch_wan1tagid.value = "0";
489        document.form.switch_wan1prio.value = "0";
490        document.form.switch_wan2tagid.value = "0";
491        document.form.switch_wan2prio.value = "0";
492    }
493    else if(document.form.switch_wantag.value == "singtel_mio") {
494		document.form.switch_stb_x.value = "6";
495	    document.form.switch_wan0tagid.value = "10";
496	    document.form.switch_wan0prio.value = "0";
497	    document.form.switch_wan1tagid.value = "20";
498	    document.form.switch_wan1prio.value = "4";
499	    document.form.switch_wan2tagid.value = "30";
500	    document.form.switch_wan2prio.value = "4";
501    }
502    else if(document.form.switch_wantag.value == "singtel_others") {
503		document.form.switch_stb_x.value = "4";
504		document.form.switch_wan0tagid.value = "10";
505		document.form.switch_wan0prio.value = "0";
506		document.form.switch_wan1tagid.value = "20";
507		document.form.switch_wan1prio.value = "4";
508		document.form.switch_wan2tagid.value = "0";
509		document.form.switch_wan2prio.value = "0";
510    }
511    else if(document.form.switch_wantag.value == "m1_fiber") {
512        document.form.switch_stb_x.value = "3";
513        document.form.switch_wan0tagid.value = "1103";
514        document.form.switch_wan0prio.value = "1";
515        document.form.switch_wan1tagid.value = "0";
516        document.form.switch_wan1prio.value = "0";
517        document.form.switch_wan2tagid.value = "1107";
518        document.form.switch_wan2prio.value = "1";
519    }
520    else if(document.form.switch_wantag.value == "maxis_fiber") {
521        document.form.switch_stb_x.value = "3";
522        document.form.switch_wan0tagid.value = "621";
523        document.form.switch_wan0prio.value = "0";
524        document.form.switch_wan1tagid.value = "0";
525        document.form.switch_wan1prio.value = "0";
526        document.form.switch_wan2tagid.value = "821";
527        document.form.switch_wan2prio.value = "0";
528    }
529    else if(document.form.switch_wantag.value == "maxis_fiber_sp") {
530        document.form.switch_stb_x.value = "3";
531        document.form.switch_wan0tagid.value = "11";
532        document.form.switch_wan0prio.value = "0";
533        document.form.switch_wan1tagid.value = "0";
534        document.form.switch_wan1prio.value = "0";
535        document.form.switch_wan2tagid.value = "14";
536        document.form.switch_wan2prio.value = "0";
537    }
538    else if(document.form.switch_wantag.value == "movistar") {
539        document.form.switch_stb_x.value = "8";
540        document.form.switch_wan0tagid.value = "6";
541        document.form.switch_wan0prio.value = "0";
542        document.form.switch_wan1tagid.value = "2";
543        document.form.switch_wan1prio.value = "0";
544        document.form.switch_wan2tagid.value = "3";
545        document.form.switch_wan2prio.value = "0";
546        document.form.wan10_proto.value = "static";
547        document.form.wan11_proto.value = "dhcp";
548    }
549    else if(document.form.switch_wantag.value == "meo") {
550        document.form.switch_stb_x.value = "4";
551        document.form.switch_wan0tagid.value = "12";
552        document.form.switch_wan0prio.value = "0";
553        document.form.switch_wan1tagid.value = "12";
554        document.form.switch_wan1prio.value = "0";
555        document.form.switch_wan2tagid.value = "";
556        document.form.switch_wan2prio.value = "0";
557    }    
558    else if(document.form.switch_wantag.value == "vodafone") {
559        document.form.switch_stb_x.value = "3";
560        document.form.switch_wan0tagid.value = "100";
561        document.form.switch_wan0prio.value = "1";
562        document.form.switch_wan1tagid.value = "";
563        document.form.switch_wan1prio.value = "0";
564        document.form.switch_wan2tagid.value = "105";
565        document.form.switch_wan2prio.value = "1";
566    }      
567}
568
569function enable_ISP_special(){
570	if(document.form.specialisp.checked){
571		ISP_Profile_Selection(original_switch_wantag);
572		document.getElementById('image_field').style.display = "none";
573		document.getElementById("isp_card_desc").style.display = "none";
574		document.getElementById('special_ISP_field').style.display = "";
575	}
576	else{
577		document.getElementById('image_field').style.display = "";
578		document.getElementById("isp_card_desc").style.display = "";
579		document.getElementById('special_ISP_field').style.display = "none";
580	}
581}
582
583function change_auth(auth_mode){
584	if(auth_mode == "8021x-md5"){
585		document.getElementById("tr_pppoe_username").style.display = "";
586		document.getElementById("tr_pppoe_password").style.display = "";
587	}
588	else{
589		document.getElementById("tr_pppoe_username").style.display = "none";
590		document.getElementById("tr_pppoe_password").style.display = "none";
591	}
592}
593
594/* password item show or not */
595function pass_checked_iptv(obj){
596	switchType(obj, document.form.show_pass_iptv.checked, true);
597}
598
599</script>                                          
600</head>   
601
602<body onLoad="QKaccount_load_body();" onunLoad="" onKeyPress="submitenter(this,event)">
603<div id="navtxt" class="navtext" style="position:absolute; top:50px; left:-100px; visibility:hidden; font-family:Arial, Verdana"></div>
604<iframe name="hidden_frame" id="hidden_frame" width="0" height="0" frameborder="0"></iframe>
605<form method="post" name="form" action="/start_apply.htm" target="hidden_frame" onsubmit="return submitForm();" autocomplete="off">
606<input type="hidden" name="prev_page" value="QIS_internet_type.htm">
607<input type="hidden" name="current_page" value="QIS_internet_account.htm">
608<input type="hidden" name="next_page" value="">
609<input type="hidden" name="flag" value="">
610<input type="hidden" name="action_mode" value="apply">
611<input type="hidden" name="action_script" value="restart_wan_if">
612<input type="hidden" name="action_wait" value="5">
613<input type="hidden" name="preferred_lang" value="<% nvram_get("preferred_lang"); %>">
614<input type="hidden" name="wan_proto" value="">
615
616
617<input type="hidden" name="wan_dhcpenable_x" value="1">
618<input type="hidden" name="wan_ipaddr_x" value="" disabled>
619<input type="hidden" name="wan_netmask_x" value="" disabled>
620<input type="hidden" name="wan_gateway_x" value="" disabled>
621<input type="hidden" name="wan_dnsenable_x" value="1">
622<input type="hidden" name="wan_dns1_x" value="" disabled>
623<input type="hidden" name="wan_dns2_x" value="" disabled>
624<input type="hidden" name="wan_heartbeat_x" value="" disabled>
625<input type="hidden" name="wan_unit" value="0">
626<input type="hidden" name="x_Setting" id="x_Setting" value="" disabled>
627<input type="hidden" name="sw_mode" value="">
628<input type="hidden" name="switch_wan2prio" value="<% nvram_get("switch_wan2prio"); %>"-->
629<input type="hidden" name="switch_stb_x" value="<% nvram_get("switch_stb_x"); %>">
630<input type="hidden" name="wan10_proto" value="<% nvram_get("wan10_proto"); %>">
631<input type="hidden" name="wan11_proto" value="<% nvram_get("wan11_proto"); %>">
632
633<div class="QISmain" id="QISmain">
634	<div>
635		<table width="100%">
636			<tr>
637				<td align="left">
638					<div class="description_down"><#PPPConnection_UserName_sectionname#></div>
639				</td>
640			</tr>
641		</table>
642	</div>
643	<div style="margin:5px;" id="splitLine"><img style="width: 720px; *width: 710px; height: 2px;" src="../images/New_ui/export/line_export.png"></div>
644</div>		
645<br/>
646<div>
647	<table>
648		<tr>
649		<td style="width:380px;">
650		<div style="font-size:14px;margin:0 0 10px 10px;"><#QIS_username_password#></div>
651		<table id="tblsetting_1" class="QISform" style="width:380px;" border="0" align="center" cellpadding="5" cellspacing="0">
652		<tr>
653			<th width="180"><span onmouseout="return nd();" onclick="openHint(7, 27);" style="cursor:help;"><#PPPConnection_UserName_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="../images/New_ui/helpicon.png"></span></th>
654			<td class="QISformtd">
655				<input type="text" name="wan_pppoe_username" maxlength="64" value="" tabindex="1" onkeypress="return validator.isString(this, event);" class="input_18_table" size="36" autocapitalization="off" autocomplete="off"/>
656			</td>
657		</tr>
658
659		<tr>
660			<th width="180"><span onmouseout="return nd();" onclick="openHint(7, 27);" style="cursor:help;"><#PPPConnection_Password_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="../images/New_ui/helpicon.png"></span></th>
661			<td class="QISformtd">
662			<input type="password" id="wan_pppoe_passwd" name="wan_pppoe_passwd" maxlength="64" value="" tabindex="2" onkeypress="return validator.isString(this, event);" class="input_18_table" size="36" autocomplete="off" autocorrect="off" autocapitalize="off"/>	  
663			</td>
664		</tr>
665		<tr>
666			<th></th>
667			<td>
668				<input type="checkbox" name="show_pass_1" onclick="pass_checked(document.form.wan_pppoe_passwd);"><#QIS_show_pass#>
669			</td>
670		</tr>
671		<br>
672
673		<tr>
674			<th width="185">
675				<span onmouseout="return nd();" onclick="overlib('<#PPPConnection_x_MacAddressForISP_itemdesc#>', FIXX, 270, FIXY, 30);" style="cursor:help;">
676					<#BOP_isp_mac_item#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png">
677				</span>
678			</th>
679			<td class="QISformtd">
680				<input type="text" name="wan_hwaddr_x" tabindex="2" onkeypress="return validator.isHWAddr(this,event);" class="input_18_table" maxlength="17" value="" autocorrect="off" autocapitalize="off"/>
681				<br>
682			</td>
683		</tr>
684		<tr>
685			<th></th>
686			<td>
687				<!--input type="button" class="button_gen_long" tabindex="3" onclick="showMAC();" value="<#BOP_isp_MACclone#>"-->
688				<input type="checkbox" name="macToggle" onclick="showMAC();"><#BOP_isp_MACclone#>
689			</td>
690		</tr>
691		<tr>
692			<th colspan="2">
693				<input id="vpn_client_check" type="checkbox" onclick="enable_vpn_client(this)">
694				<span id="vpn_client_desc" style="cursor:pointer;"><#QIS_vpn_enable#><span>
695				<select class="input_option" name="vpn_option" style="display:none;margin-left:5px" onChange="change_vpn_type(this)" disabled>
696					<option value="pptp">PPTP</option>
697					<option value="l2tp">L2TP</option>		
698				</select>
699			</th>
700		</tr>
701		<tr id="specialISP_tr">
702			<th colspan="2">
703				<input type="checkbox" id="specialisp" name="specialisp" onclick="enable_ISP_special();">
704				<span class="QISGeneralFont" style="margin-left:0px;font-style:normal;color:#6CF;font-size:14px;font-weight:bolder;"><#PPPConnection_x_HostNameForISP_sectionname#></span>
705			</th>
706		</tr>
707
708		<tr>
709			<td colspan=2>
710				<div class="apply_gen" style="margin-top:10px">
711					<input type="button" id="prevButton" value="<#CTL_prev#>" tabindex="4" onclick="gotoprev(document.form);" class="button_gen" align="center">
712					<input type="submit" id="nextButton" value="<#CTL_next#>" tabindex="3" class="button_gen" align="center">
713					<span id="loadHint" style="display:none"><#SAVE_note#></span>
714					<img id="loadingIcon" style="display:none;" src="../images/InternetScan.gif"></span>
715				</div>
716			
717			</td>
718		</tr>
719	</table>
720	</td>
721
722	<td style="width:365px;height:400px;background:#444F52;border-radius:10px;">
723		<div id="image_field" class="image_field" ></div>
724		<div id="isp_card_desc" style="padding:0 15px 15px 20px;line-height:15px;"><#QIS_SmartConn_ISPDesc2#></div>
725		<div id="isp_TW_desc" style="padding:0 15px 15px 15px;line-height:15px;display:none;"><#QIS_SmartConn_ISPDesc_TW#></div>
726		<div id="special_ISP_field" style="margin-top:-100px;display:none;">		
727			<div style="line-height:25px;height:250px;">
728				<div id="select_profile">
729					<table class="iptvTable">
730					<tr>
731						<th><#Select_ISPfile#>:</th>
732						<td><select name="switch_wantag" class="input_option" onChange="ISP_Profile_Selection(this.value)">
733							<option value="none" <% nvram_match( "switch_wantag", "none", "selected"); %>><#wl_securitylevel_0#></option>
734							<option value="unifi_home" <% nvram_match( "switch_wantag", "unifi_home", "selected"); %>>Unifi-Home</option>
735							<option value="unifi_biz" <% nvram_match( "switch_wantag", "unifi_biz", "selected"); %>>Unifi-Business</option>
736							<option value="singtel_mio" <% nvram_match( "switch_wantag", "singtel_mio", "selected"); %>>Singtel-MIO</option>
737							<option value="singtel_others" <% nvram_match( "switch_wantag", "singtel_others", "selected"); %>>Singtel-Others</option>
738							<option value="m1_fiber" <% nvram_match("switch_wantag", "m1_fiber", "selected"); %>>M1-Fiber</option>
739							<option value="maxis_fiber" <% nvram_match("switch_wantag", "maxis_fiber", "selected"); %>>Maxis-Fiber</option>
740							<option value="maxis_fiber_sp" <% nvram_match("switch_wantag", "maxis_fiber_sp", "selected"); %>>Maxis-Fiber-Special</option>
741							<option id="movistarOption" value="movistar" <% nvram_match("switch_wantag", "movistar", "selected"); %>>Movistar Triple VLAN</option>
742							<option id="meoOption" value="meo" <% nvram_match("switch_wantag", "meo", "selected"); %>>Meo</option>
743							<option id="vodafoneOption" value="vodafone" <% nvram_match("switch_wantag", "vodafone", "selected"); %>>Vodafone</option>
744							<option value="manual" <% nvram_match( "switch_wantag", "manual", "selected"); %>><#Manual_Setting_btn#></option>
745						</select></td>
746					</tr>
747					</table>
748				</div>
749
750				<div id="port_settings">
751				<table class="iptvTable">
752					<tr id="wan_voip_line"><td colspan="2"><div style="margin: 5px 5px 5px 10px;" id="splitLine"><img style="width: 350px; *width: 340px; height: 2px;" src="../images/New_ui/export/line_export.png"></div></td></tr>
753					<tr id="wan_voip_x">
754						<th><span id="voip_title">VoIP Port: </span></th>
755						<td>LAN3</td>
756					</tr>
757					<tr id="wan_iptv_line"><td colspan="2"><div style="margin: 5px 5px 5px 10px;" id="splitLine"><img style="width: 350px; *width: 340px; height: 2px;" src="../images/New_ui/export/line_export.png"></div></td></tr>
758					<tr id="wan_iptv_x">
759						<th><span id="iptv_title">IPTV STB Port: </span></th>
760						<td>LAN4</td>
761					</tr>
762				</table>
763				</div>
764
765				<div id="manual_settings">
766					<table class="iptvTable">
767						<tr><td colspan="2"><div style="margin: 5px 5px 5px 10px;" id="splitLine"><img style="width: 350px; *width: 340px; height: 2px;" src="../images/New_ui/export/line_export.png"></div></td></tr>
768						<tr>
769							<th><#Internet#>:</th>
770							<td>
771								VID:<input type="text" name="switch_wan0tagid" class="input_6_table" maxlength="4" value="<% nvram_get( "switch_wan0tagid"); %>" autocorrect="off" autocapitalize="off">
772								&nbsp;PRIO:<input type="text" name="switch_wan0prio" class="input_6_table" maxlength="1" value="<% nvram_get( "switch_wan0prio"); %>" autocorrect="off" autocapitalize="off">
773							</td>
774						</tr>
775						<tr>
776							<th>IPTV (LAN port 4):</th>
777							<td>
778								VID:<input type="text" name="switch_wan1tagid" class="input_6_table" maxlength="4" value="<% nvram_get( "switch_wan1tagid"); %>" autocorrect="off" autocapitalize="off">
779								&nbsp;PRIO:<input type="text" name="switch_wan1prio" class="input_6_table" maxlength="1" value="<% nvram_get( "switch_wan1prio"); %>" autocorrect="off" autocapitalize="off">
780							</td>
781						</tr>
782						<tr>
783							<th>VoIP (LAN port 3):</th>
784							<td>
785								VID:<input type="text" name="switch_wan2tagid" class="input_6_table" maxlength="4" value="<% nvram_get( "switch_wan2tagid"); %>" autocorrect="off" autocapitalize="off">
786								&nbsp;PRIO:<input type="text" name="switch_wan2prio" class="input_6_table" maxlength="1" value="<% nvram_get( "switch_wan2prio"); %>" autocorrect="off" autocapitalize="off">
787							</td>
788						</tr>
789					</table>
790				</div>
791
792				<div id="iptv_configuration">
793					<div style="margin: 5px 5px 5px 7px;" id="splitLine"><img style="width: 350px; *width: 340px; height: 2px;" src="../images/New_ui/export/line_export.png"></div>
794					<table class="iptvTable">
795						<tr>
796							<th>VoIP Port: </th>
797							<td>LAN3</td>
798						</tr>
799						<tr><td colspan="2"><div style="margin: 5px 5px 5px 11px;" id="splitLine"><img style="width: 350px; *width: 340px; height: 2px;" src="../images/New_ui/export/line_export.png"></div></td></tr>
800						<tr>
801							<th>IPTV STB Port: </th>
802							<td>LAN4</td>
803						</tr>			
804						<tr>
805							<th><#Layer3Forwarding_x_ConnectionType_itemname#>: </th>
806							<td><#BOP_ctype_title5#></td>
807						</tr>
808						<tr>
809							<th><#IPConnection_ExternalIPAddress_itemname#>: </th>
810							<td><input type="text" name="wan10_ipaddr_x" maxlength="15" class="input_15_table" value="<% nvram_get("wan10_ipaddr_x"); %>" onKeyPress="return validator.isIPAddr(this, event);" autocorrect="off" autocapitalize="off"></td>					
811						</tr>
812						<tr>
813							<th><#IPConnection_x_ExternalSubnetMask_itemname#>: </th>
814							<td><input type="text" name="wan10_netmask_x" maxlength="15" class="input_15_table" value="<% nvram_get("wan10_netmask_x"); %>" onKeyPress="return validator.isIPAddr(this, event);" autocorrect="off" autocapitalize="off"></td>					
815						</tr>
816						<tr>
817							<th><#IPConnection_x_ExternalGateway_itemname#>: </th>
818							<td><input type="text" name="wan10_gateway_x" maxlength="15" class="input_15_table" value="<% nvram_get("wan10_gateway_x"); %>" onKeyPress="return validator.isIPAddr(this, event);" autocorrect="off" autocapitalize="off"></td>					
819						</tr>
820						<tr>
821							<th><#IPConnection_x_DNSServer1_itemname#>: </th>
822							<td><input type="text" name="wan10_dns1_x" maxlength="15" class="input_15_table" value="<% nvram_get("wan10_dns1_x"); %>" onKeyPress="return validator.isIPAddr(this, event);" autocorrect="off" autocapitalize="off"></td>					
823						</tr>
824						<tr>
825							<th><#IPConnection_x_DNSServer2_itemname#>: </th>
826							<td><input type="text" name="wan10_dns2_x" maxlength="15" class="input_15_table" value="<% nvram_get("wan10_dns2_x"); %>" onKeyPress="return validator.isIPAddr(this, event);" autocorrect="off" autocapitalize="off"></td>
827						</tr>
828		            	<tr>
829							<th style="color:#6CF;"><#PPPConnection_Authentication_itemname#>: </th>
830							<td style="text-align:left;">
831							    <select style="margin-left:2px;" class="input_option" name="wan10_auth_x" onChange="change_auth(this.value);">
832								    <option value="" <% nvram_match("wan10_auth_x", "", "selected"); %>><#wl_securitylevel_0#></option>
833								    <option value="8021x-md5" <% nvram_match("wan10_auth_x", "8021x-md5", "selected"); %>>802.1x MD5</option>
834								</select>
835							</td>
836						</tr>
837		            	<tr id="tr_pppoe_username" style="display:none;">
838		             	 	<th style="color:#6CF;"><#PPPConnection_UserName_itemname#>: </th>
839		              		<td style="text-align:left;"><input type="text" maxlength="64" class="input_15_table" name="wan10_pppoe_username" value="<% nvram_get("wan10_pppoe_username"); %>" onkeypress="return validator.isString(this, event)"></td>
840		            	</tr>
841		            	<tr id="tr_pppoe_password" style="display:none;">
842		              		<th style="color:#6CF;"><div style="margin-top:-25px;"><#PPPConnection_Password_itemname#>: </div></th>
843		              		<td style="text-align:left;"><input type="password" autocapitalization="off" maxlength="64" class="input_15_table" id="wan10_pppoe_passwd" name="wan10_pppoe_passwd" value="<% nvram_get("wan10_pppoe_passwd"); %>">
844							<div style="margin-top:1px;"><input type="checkbox" name="show_pass_iptv" onclick="pass_checked_iptv(document.form.wan10_pppoe_passwd);"><#QIS_show_pass#></div>
845							</td>
846		            	</tr>
847					</table>
848				</div>
849			</div>
850		</div>
851	</td>
852	</tr>
853	</table>
854</div>
855<div id="QISmain_m" style="display:none;">
856	<div class="itemTitle"><#qis_pppoe_desc1#></div>
857	<fieldset>
858		<div id="DNSDiv">
859			<div class="row">
860				<label><#PPPConnection_UserName_itemname#></label>
861				<input type="text" name="wan_pppoe_username_m" placeholder="" maxlength="64" value="" autocapitalization="off" autocomplete="off"/>
862			</div>
863			<div class="row">
864				<label><#PPPConnection_Password_itemname#></label>
865				<input name="wan_pppoe_passwd_m" type="text" placeholder="" maxlength="64" autocapitalization="off" autocomplete="off">
866			</div>
867			<div class="row">
868				<label><#BOP_isp_MACclone#></label>
869				<div id="toggleDNS" class="toggle" onclick="showMAC_m();" toggled="false">
870					<span class="thumb"></span>
871					<span class="toggleOn"><#checkbox_Yes#></span>
872					<span class="toggleOff"><#checkbox_No#></span>
873				</div>
874			</div>
875
876			<div class="row_end">
877				<label><#BOP_isp_mac_item#></label>
878				<input name="wan_hwaddr_x_m" type="text" placeholder="" onkeypress="return validator.isHWAddr(this,event);" autocapitalization="off" maxlength="17">
879			</div>
880		</div>
881	</fieldset>
882	<br />
883	<div><#qis_pppoe_desc2#></div>
884	<br />
885	<fieldset class="theFieldset" id="theFieldset">
886		<div class="row_end">
887			<a id="loadingIcon_iui" class="iuiA" onclick="changeiuiBackground(1);submitForm();"><#CTL_next#></a>
888		</div>
889	</fieldset>
890</div>
891
892</form> 
893</body>
894</html>
895