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<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="stylesheet" type="text/css" href="/form_style.css"> 8<script type="text/javascript" src="/qis/QISMobilePlugin.js"></script> 9<script type="text/JavaScript" src="/state.js"></script> 10<script type="text/JavaScript" src="/alttxt.js"></script> 11<script type="text/JavaScript" src="/general.js"></script> 12<script type="text/JavaScript" src="/help.js"></script> 13<script type="text/JavaScript" src="/validator.js"></script> 14<script type="text/JavaScript"> 15<% wanlink(); %> 16 17<% login_state_hook(); %> 18 19var now_flag = '<% get_parameter("flag"); %>'; 20var original_wan_proto = wanlink_type(); 21var DHCPClient = '<% nvram_get("wan0_dhcpenable_x"); %>'; 22var from_page = '<% get_parameter("prev_page"); %>'; 23var original_switch_wantag = '<% nvram_get("switch_wantag"); %>'; 24 25<% wan_get_parameter(); %> 26 27function QKInternet_load_body(){ 28 parent.document.title = "<#Web_Title#> - <#QKSet_ISP_head#>"; 29 30 if(parent.ISMOBILE){ 31 parent.set_step("internet_type"); 32 hideObjs(); 33 document.getElementById("QISmain").style.display = "none"; 34 document.getElementById("QISmain_m").style.display = ""; 35 displayLANIPCtrl(); 36 displayDNSCtrl(); 37 38 if(now_flag == "auto_way_vpn" && from_page == "start_apply.htm") 39 now_flag = "auto_way"; 40 41 get_value_from_parent(); 42 get_value_from_parent_m(); 43 44 if(now_flag == "auto_way_static"){ 45 blocking_m("showip_m", true); 46 blocking_m("dns_sec_m", true); 47 blocking_m("showserver_m", false); 48 blocking_m("showhwaddr_m", true); 49 } 50 else if(now_flag == "auto_way"){ 51 blocking_m("showip_m", true); 52 blocking_m("dns_sec_m", true); 53 blocking_m("showserver_m", true); 54 // blocking_m("vpn_enable_block", true); 55 blocking_m("showhwaddr_m", false); 56 } 57 else if(document.form.wan_proto.value == "pptp" || document.form.wan_proto.value == "l2tp"){ 58 blocking_m("showip_m", true); 59 blocking_m("dns_sec_m", true); 60 blocking_m("showserver_m", true); 61 // blocking_m("heartbeat_server", true); 62 blocking_m("showhwaddr_m", false); 63 64 document.form.prev_page.value = "QIS_internet_account.htm"; 65 parent.set_step("internet_account"); 66 } 67 else if(document.form.wan_proto.value == "static"){ 68 blocking_m("dhcp_info_radio_m", false); 69 blocking_m("showip_m", true); 70 blocking_m("WANIPDiv", true); 71 blocking_m("dns_info_radio_m", false); 72 blocking_m("dns_sec_m", true); 73 blocking_m("DNSDiv", true); 74 blocking_m("showserver_m", false); 75 blocking_m("showhwaddr_m", true); 76 77 document.getElementById("dns_info_title_m").innerHTML = "<#PPPConnection_x_WANDNSServer_itemname#>"; 78 document.form.wan_dnsenable_x[0].checked = 0; 79 document.form.wan_dnsenable_x[1].checked = 1; 80 document.form.prev_page.value = "QIS_internet_type.htm"; 81 parent.set_step("internet_type"); 82 } 83 else{ // wan_proto == dhcp 84 blocking_m("showip_m", false); 85 blocking_m("dns_sec_m", true); 86 blocking_m("showserver_m", false); 87 blocking_m("showhwaddr_m", false); 88 89 document.form.prev_page.value = "QIS_internet_isp.htm"; 90 parent.set_step("internet_isp"); 91 } 92 93 set_default_state(); 94 if(confirm_vpn_enable()){ 95 document.form.vpn_enable[0].checked = 1; 96 document.form.vpn_enable[1].checked = 0; 97 } 98 else{ 99 document.form.vpn_enable[0].checked = 0; 100 document.form.vpn_enable[1].checked = 1; 101 } 102 } 103 else{ 104 parent.set_step("t2"); 105 hideLinkTag(); 106 flash_button(); 107 108 if(now_flag.length <= 0) 109 showtext(document.getElementById("page_title"), "<#QKSet_ISP_desc#>"); 110 else if(DHCPClient == "1") 111 showtext(document.getElementById("page_title"), "<#QKSet_ISP_desc3#>"); 112 else // if(DHCPClient == "0") 113 showtext(document.getElementById("page_title"), "<#QKSet_ISP_desc2#>"); 114 115 if(now_flag == "auto_way_vpn" && from_page == "start_apply.htm") 116 now_flag = "auto_way"; 117 118 get_value_from_parent(); 119 120 if(now_flag == "auto_way_static"){ 121 blocking("showip", true); 122 blocking("dns_sec", true); 123 blocking("showserver", false); 124 blocking("showhwaddr", true); 125 } 126 else if(now_flag == "auto_way"){ 127 blocking("showip", true); 128 blocking("dns_sec", true); 129 blocking("showserver", true); 130 blocking("vpn_enable_block", true); 131 blocking("showhwaddr", false); 132 } 133 else if(document.form.wan_proto.value == "pptp" 134 || document.form.wan_proto.value == "l2tp"){ 135 blocking("showip", true); 136 blocking("dns_sec", true); 137 blocking("showserver", true); 138 blocking("heartbeat_server", true); 139 inputCtrl(document.form.wan_heartbeat_x, 1); 140 blocking("showhwaddr", false); 141 document.form.prev_page.value = "QIS_internet_account.htm"; 142 } 143 else if(document.form.wan_proto.value == "static"){ 144 document.getElementById("dhcp_info_radio").style.display = "none"; 145 blocking("showip", true); 146 document.getElementById("dns_info_title").innerHTML = "<#PPPConnection_x_WANDNSServer_itemname#>"; 147 document.getElementById("dns_info_radio").style.display = "none"; 148 blocking("dns_sec", true); 149 blocking("showserver", false); 150 blocking("showhwaddr", true); 151 document.form.prev_page.value = "QIS_internet_type.htm"; 152 document.form.wan_dnsenable_x[0].checked = 0; 153 document.form.wan_dnsenable_x[1].checked = 1; 154 } 155 else{ // wan_proto == dhcp 156 blocking("showip", false); 157 blocking("dns_sec", true); 158 blocking("showserver", false); 159 blocking("showhwaddr", false); 160 document.form.prev_page.value = "QIS_internet_isp.htm"; 161 } 162 163 set_default_state(); 164 show_prev_button(); 165 166 if(confirm_vpn_enable()){ 167 document.form.vpn_enable[0].checked = 1; 168 document.form.vpn_enable[1].checked = 0; 169 } 170 else{ 171 document.form.vpn_enable[0].checked = 0; 172 document.form.vpn_enable[1].checked = 1; 173 } 174 show_next_button(); 175 176 if(navigator.platform == 'iPad' || navigator.platform == 'iPhone' || navigator.platform == 'iPod'){ 177 document.getElementsByClassName("IPaddr_qis")[0].style.width = "180px"; 178 document.getElementsByClassName("IPaddr_qis")[1].style.width = "180px"; 179 document.getElementsByClassName("IPaddr_qis")[2].style.width = "180px"; 180 document.getElementsByClassName("IPaddr_qis")[3].style.width = "180px"; 181 document.getElementsByClassName("IPaddr_qis")[4].style.width = "180px"; 182 } 183 184 document.getElementById("nextButton").focus(); 185 } 186} 187 188function blocking_m(obj_id, show){ 189 var state = show?'block':'none'; 190 191 if(document.getElementById) 192 document.getElementById(obj_id).style.display = state; 193 else if(document.layers) 194 document.layers[obj_id].display = state; 195 else if(document.all) 196 document.all[obj_id].style.display = state; 197} 198 199 200function get_value_from_parent(){ 201 document.form.wan_proto.value = parent.document.QKform.wan_proto.value; 202 203 document.form.wan_pppoe_username.value = parent.document.QKform.wan_pppoe_username.value; 204 document.form.wan_pppoe_passwd.value = parent.document.QKform.wan_pppoe_passwd.value; 205 206 document.form.wan_hostname.value = parent.document.QKform.wan_hostname.value; 207 document.form.wan_hwaddr_x.value = parent.document.QKform.wan_hwaddr_x.value; 208 document.form.wan_hwaddr_x_m.value = parent.document.QKform.wan_hwaddr_x.value; 209 210 211 212 document.form.lan_ipaddr.value = parent.document.QKform.lan_ipaddr.value; 213 document.form.lan_netmask.value = parent.document.QKform.lan_netmask.value; 214 215 document.form.wan_ipaddr_x.value = parent.document.QKform.wan_ipaddr_x.value; 216 document.form.wan_netmask_x.value = parent.document.QKform.wan_netmask_x.value; 217 document.form.wan_gateway_x.value = parent.document.QKform.wan_gateway_x.value; 218 219 document.form.wan_dns1_x.value = parent.document.QKform.wan_dns1_x.value; 220 document.form.wan_dns2_x.value = parent.document.QKform.wan_dns2_x.value; 221 if(parent.document.QKform.vpn_enable.value.length > 0){ 222 if(parent.document.QKform.vpn_enable.value == 1){ 223 document.form.vpn_enable[0].checked = 1; 224 document.form.vpn_enable[1].checked = 0; 225 } 226 else{ 227 document.form.vpn_enable[0].checked = 0; 228 document.form.vpn_enable[1].checked = 1; 229 } 230 } 231 document.form.wan_heartbeat_x.value = parent.document.QKform.wan_heartbeat_x.value; 232 233} 234 235function get_value_from_parent_m(){ 236 document.form.wan_hwaddr_x_m.value = parent.document.QKform.wan_hwaddr_x.value; 237 document.form.wan_ipaddr_x_m.value = parent.document.QKform.wan_ipaddr_x.value; 238 document.form.wan_netmask_x_m.value = parent.document.QKform.wan_netmask_x.value; 239 document.form.wan_gateway_x_m.value = parent.document.QKform.wan_gateway_x.value; 240 document.form.wan_dns1_x_m.value = parent.document.QKform.wan_dns1_x.value; 241 document.form.wan_dns2_x_m.value = parent.document.QKform.wan_dns2_x.value; 242 document.form.wan_heartbeat_x_m.value = parent.document.QKform.wan_heartbeat_x.value; 243} 244 245function set_value_to_parent(){ 246 parent.document.QKform.wan_proto.value = document.form.wan_proto.value; 247 parent.document.QKform.wan_ipaddr_x.value = document.form.wan_ipaddr_x.value; 248 parent.document.QKform.wan_netmask_x.value = document.form.wan_netmask_x.value; 249 parent.document.QKform.wan_gateway_x.value = document.form.wan_gateway_x.value; 250 parent.document.QKform.wan_dns1_x.value = document.form.wan_dns1_x.value; 251 parent.document.QKform.wan_dns2_x.value = document.form.wan_dns2_x.value; 252 253 if(document.form.wan_dhcpenable_x[0].checked == 1) 254 parent.document.QKform.wan_dhcpenable_x.value = 0; 255 else 256 parent.document.QKform.wan_dhcpenable_x.value = 1; 257 258 if(document.form.wan_dnsenable_x[0].checked == 1) 259 parent.document.QKform.wan_dnsenable_x.value = 1; 260 else 261 parent.document.QKform.wan_dnsenable_x.value = 0; 262 263 if(document.form.vpn_enable[0].checked == 1) 264 parent.document.QKform.vpn_enable.value = 1; 265 else 266 parent.document.QKform.vpn_enable.value = 0; 267} 268 269function set_default_state(){ 270 var parent_DHCPenable = parseInt(parent.document.QKform.wan_dhcpenable_x.value); 271 var parent_DNSenable = parseInt(parent.document.QKform.wan_dnsenable_x.value); 272 var wan_proto = document.form.wan_proto.value; 273 274 if(now_flag == "auto_way"){ 275 if(from_page == "/qis/QIS_detect.htm"){ 276 document.form.wan_dhcpenable_x[0].checked = 0; 277 document.form.wan_dhcpenable_x[1].checked = 1; 278 279 document.form.wan_dnsenable_x[0].checked = 1; 280 document.form.wan_dnsenable_x[1].checked = 0; 281 } 282 else{ 283 if(parent.document.QKform.wan_dhcpenable_x.value == 1){ 284 document.form.wan_dhcpenable_x[0].checked = 0; 285 document.form.wan_dhcpenable_x[1].checked = 1; 286 } 287 else{ 288 document.form.wan_dhcpenable_x[0].checked = 1; 289 document.form.wan_dhcpenable_x[1].checked = 0; 290 } 291 292 if(parent.document.QKform.wan_dnsenable_x.value == 1){ 293 document.form.wan_dnsenable_x[0].checked = 1; 294 document.form.wan_dnsenable_x[1].checked = 0; 295 } 296 else{ 297 document.form.wan_dnsenable_x[0].checked = 0; 298 document.form.wan_dnsenable_x[1].checked = 1; 299 } 300 } 301 } 302 else if(wan_proto == "static" || (now_flag == "auto_way_static" && from_page.indexOf("QIS_detect.htm") >= 0) 303 ){ 304 document.form.wan_dhcpenable_x[0].checked = 1; 305 document.form.wan_dhcpenable_x[1].checked = 0; 306 } 307 else if(wan_proto == "pppoe"){ 308 document.form.wan_dhcpenable_x[0].checked = 0; 309 document.form.wan_dhcpenable_x[1].checked = 1; 310 311 document.form.wan_dnsenable_x[0].checked = 1; 312 document.form.wan_dnsenable_x[1].checked = 0; 313 } 314 else if(wan_proto == "pptp" || 315 wan_proto == "l2tp"){ 316 if(wan_proto != original_wan_proto){ 317 document.form.wan_dhcpenable_x[0].checked = 1; //lock 318 document.form.wan_dhcpenable_x[1].checked = 0; 319 } 320 else{ 321 document.form.wan_dhcpenable_x[0].checked = !parent_DHCPenable; 322 document.form.wan_dhcpenable_x[1].checked = parent_DHCPenable; 323 document.form.wan_dnsenable_x[0].checked = parent_DNSenable; 324 document.form.wan_dnsenable_x[1].checked = !parent_DNSenable; 325 } 326 } 327 else{ 328 document.form.wan_dhcpenable_x[0].checked = 0; 329 document.form.wan_dhcpenable_x[1].checked = 1; 330 331 if(wan_proto != original_wan_proto){ 332 document.form.wan_dnsenable_x[0].checked = 1; 333 document.form.wan_dnsenable_x[1].checked = 0; 334 show_dnsenable(document.form.wan_dnsenable_x[0].checked); 335 } 336 else{ 337 document.form.wan_dnsenable_x[0].checked = parent_DNSenable; 338 document.form.wan_dnsenable_x[1].checked = !parent_DNSenable; 339 show_dnsenable(document.form.wan_dnsenable_x[0].checked); 340 } 341 } 342 343 if(wan_proto != "dhcp" && wan_proto != "static"){ 344 show_dhcpenable(!document.form.wan_dhcpenable_x[0].checked); 345 show_dnsenable(document.form.wan_dnsenable_x[0].checked); 346 } 347} 348 349function confirm_vpn_enable(){ 350 var str = ""; 351 352 if(now_flag != "auto_way") 353 return false; 354if(document.form.vpn_enable[0].checked) 355 return true; 356if(document.form.vpn_enable[1].checked) 357 return false; 358 359 if(DHCPClient == "1") 360 str += "<#QKSet_ISP_desc3#>"; 361 else 362 str += "<#QKSet_ISP_desc2#>"; 363 str += "\n\n<#QIS_internet_vpn_confirm#>"; 364 365 if(confirm(str)) 366 return true; 367 else 368 return false; 369} 370 371function show_dhcpenable(flag){ 372 if(flag == "1" || flag == true){ 373 inputCtrl(document.form.wan_ipaddr_x, 0); 374 inputCtrl(document.form.wan_netmask_x, 0); 375 inputCtrl(document.form.wan_gateway_x, 0); 376 377 inputCtrl(document.form.wan_dnsenable_x[0], 1); 378 inputCtrl(document.form.wan_dnsenable_x[1], 1); 379 document.form.wan_dhcpenable_x[1].focus(); 380 } 381 else{ 382 inputCtrl(document.form.wan_ipaddr_x, 1); 383 inputCtrl(document.form.wan_netmask_x, 1); 384 inputCtrl(document.form.wan_gateway_x, 1); 385 386 document.form.wan_dnsenable_x[0].checked = 0; 387 document.form.wan_dnsenable_x[1].checked = 1; 388 inputCtrl(document.form.wan_dnsenable_x[0], 0); 389 inputCtrl(document.form.wan_dnsenable_x[1], 0); 390 document.form.wan_dhcpenable_x[0].focus(); 391 show_dnsenable(0); 392 } 393 394 if(now_flag == "auto_way_static" 395 || now_flag == "auto_way") 396 show_next_button(); 397} 398 399function show_dnsenable(flag){ 400 if(flag == "1" || flag == true){ 401 document.form.wan_dnsenable_x[0].focus(); 402 inputCtrl(document.form.wan_dns1_x, 0); 403 inputCtrl(document.form.wan_dns2_x, 0); 404 } 405 else{ 406 document.form.wan_dnsenable_x[1].focus(); 407 inputCtrl(document.form.wan_dns1_x, 1); 408 inputCtrl(document.form.wan_dns2_x, 1); 409 } 410} 411 412function show_next_button(){ 413 if(now_flag.length <= 0){ // manual setting. 414 document.getElementById("nextButton").onclick = submitForm; 415 } 416 else if(document.form.vpn_enable[0].checked){ 417 document.getElementById("nextButton").onclick = gotoVPNtype; 418 } 419 else if(document.form.wan_dhcpenable_x[0].checked){ 420 document.form.wan_proto.value = "static"; 421 document.getElementById("nextButton").onclick = submitForm; 422 } 423 else{ 424 document.form.wan_proto.value = "dhcp"; 425 document.getElementById("nextButton").onclick = gotoMACclone; 426 } 427} 428 429function show_prev_button(){ 430 if(now_flag == "auto_way_static" 431 || now_flag == "auto_way") 432 document.getElementById("prevButton").style.display = "none"; 433 else 434 document.getElementById("prevButton").style.display = ""; 435} 436 437function gotoVPNtype(){ 438 remove_red_field(); 439 440 if(!validate_ip()) 441 return; 442 if(!validate_dns()) 443 return; 444 445 set_value_to_parent(); 446 447 parent.document.QKform.prev_page.value = "/qis/QIS_internet_ip.htm"; 448 document.form.action = "/qis/QIS_internet_vpn.htm"; 449 document.form.flag.value = "auto_way"; 450 451 document.form.submit(); 452} 453 454function gotoMACclone(){ 455 remove_red_field(); 456 457 if(!validate_dns()) 458 return; 459 460 set_value_to_parent(); 461 462 parent.document.QKform.prev_page.value = "/qis/QIS_internet_ip.htm"; 463 document.form.action = "/qis/QIS_internet_isp.htm"; 464 document.form.flag.value = "auto_way"; 465 466 document.form.submit(); 467} 468 469// test if WAN IP & Gateway & DNS IP is a valid IP 470// DNS IP allows to input nothing 471function valid_IP(obj_name, obj_flag){ 472 // A : 1.0.0.0~126.255.255.255 473 // B : 127.0.0.0~127.255.255.255 (forbidden) 474 // C : 128.0.0.0~255.255.255.254 475 var A_class_start = inet_network("1.0.0.0"); 476 var A_class_end = inet_network("126.255.255.255"); 477 var B_class_start = inet_network("127.0.0.0"); 478 var B_class_end = inet_network("127.255.255.255"); 479 var C_class_start = inet_network("128.0.0.0"); 480 var C_class_end = inet_network("255.255.255.255"); 481 482 var ip_obj = obj_name; 483 var ip_num = inet_network(ip_obj.value); 484 485 if(obj_flag == "DNS" && ip_num == -1){ //DNS allows to input nothing 486 return true; 487 } 488 489 if(obj_flag == "GW" && ip_num == -1){ //GW allows to input nothing 490 return true; 491 } 492 493 if(ip_num > A_class_start && ip_num < A_class_end) 494 return true; 495 else if(ip_num > B_class_start && ip_num < B_class_end){ 496 alert(ip_obj.value+" <#JS_validip#>"); 497 ip_obj.focus(); 498 ip_obj.select(); 499 return false; 500 } 501 else if(ip_num > C_class_start && ip_num < C_class_end) 502 return true; 503 else{ 504 alert(ip_obj.value+" <#JS_validip#>"); 505 ip_obj.focus(); 506 ip_obj.select(); 507 return false; 508 } 509} 510 511// test if WAN IP & Gateway & DNS IP is a valid IP 512// DNS IP allows to input nothing 513function valid_IP(obj_name, obj_flag){ 514 // A : 1.0.0.0~126.255.255.255 515 // B : 127.0.0.0~127.255.255.255 (forbidden) 516 // C : 128.0.0.0~255.255.255.254 517 var A_class_start = inet_network("1.0.0.0"); 518 var A_class_end = inet_network("126.255.255.255"); 519 var B_class_start = inet_network("127.0.0.0"); 520 var B_class_end = inet_network("127.255.255.255"); 521 var C_class_start = inet_network("128.0.0.0"); 522 var C_class_end = inet_network("255.255.255.255"); 523 524 var ip_obj = obj_name; 525 var ip_num = inet_network(ip_obj.value); 526 527 if(obj_flag == "DNS" && ip_num == -1){ //DNS allows to input nothing 528 return true; 529 } 530 531 if(obj_flag == "GW" && ip_num == -1){ //GW allows to input nothing 532 return true; 533 } 534 535 if(ip_num > A_class_start && ip_num < A_class_end) 536 return true; 537 else if(ip_num > B_class_start && ip_num < B_class_end){ 538 alert(ip_obj.value+" <#JS_validip#>"); 539 ip_obj.focus(); 540 ip_obj.select(); 541 return false; 542 } 543 else if(ip_num > C_class_start && ip_num < C_class_end) 544 return true; 545 else{ 546 alert(ip_obj.value+" <#JS_validip#>"); 547 ip_obj.focus(); 548 ip_obj.select(); 549 return false; 550 } 551} 552 553function validate_ip(){ 554 if(document.form.wan_dhcpenable_x != null && document.form.wan_dhcpenable_x[0].checked){ 555 if(!valid_IP(document.form.wan_ipaddr_x, "")) return false; //WAN IP 556 if(!valid_IP(document.form.wan_gateway_x, "GW"))return false; //Gateway IP 557 558 if(document.form.wan_gateway_x.value == document.form.wan_ipaddr_x.value){ 559 alert("<#IPConnection_warning_WANIPEQUALGatewayIP#>"); 560 document.form.wan_ipaddr_x.focus(); 561 document.form.wan_ipaddr_x.select(); 562 return false; 563 } 564var default_netmask = ""; 565 var wrong_netmask = 0; 566 var netmask_obj = document.form.wan_netmask_x; 567 var netmask_num = inet_network(netmask_obj.value); 568 569 if(netmask_num==0){ 570 var netmask_reverse_num = 0; //Viz 2011.07 : Let netmask 0.0.0.0 pass 571 }else{ 572 var netmask_reverse_num = ~netmask_num; 573 } 574 575 if(netmask_num < 0) wrong_netmask = 1; 576 577 var test_num = netmask_reverse_num; 578 while(test_num != 0){ 579 if((test_num+1)%2 == 0) 580 test_num = (test_num+1)/2-1; 581 else{ 582 wrong_netmask = 1; 583 break; 584 } 585 } 586 if(wrong_netmask == 1){ 587 alert(netmask_obj.value+" <#JS_validip#>"); 588 netmask_obj.value = default_netmask; 589 netmask_obj.focus(); 590 netmask_obj.select(); 591 return false; 592 }// end netmask check 593 } 594 595 596 return true; 597} 598 599function validate_dns(){ 600 if(document.form.wan_dnsenable_x != null && !document.form.wan_dnsenable_x[0].checked){ 601 if(document.form.wan_dns1_x.value.length <= 0 && document.form.wan_dns2_x.value.length <= 0){ 602 document.form.wan_dns1_x.focus(); 603 document.form.wan_dns1_x.select(); 604 alert("<#JS_fieldblank#>"); 605 document.getElementById("wan_dns1_x_div").style.border = "2px solid #CE1E1E"; 606 return false; 607 } 608 else{ 609 if(document.form.wan_dns1_x.value.length > 0 610 && !validator.ipAddrFinalQIS(document.form.wan_dns1_x, "wan_dns1_x")){ 611 return false; 612 } 613 else if(document.form.wan_dns2_x.value.length > 0 614 && !validator.ipAddrFinalQIS(document.form.wan_dns2_x, "wan_dns2_x")){ 615 return false; 616 } 617 } 618 } 619 620 return true; 621} 622 623function remove_red_field(){ 624 document.getElementById("wan_ipaddr_x_div").style.border = "2px inset #F4F4F4"; 625 document.getElementById("wan_netmask_x_div").style.border = "2px inset #F4F4F4"; 626 document.getElementById("wan_gateway_x_div").style.border = "2px inset #F4F4F4"; 627 document.getElementById("wan_dns1_x_div").style.border = "2px inset #F4F4F4"; 628 document.getElementById("wan_dns2_x_div").style.border = "2px inset #F4F4F4"; 629} 630 631function showMAC(){ 632 var tempMAC = ""; 633 document.form.wan_hwaddr_x.value = login_mac_str(); 634 document.form.wan_hwaddr_x.focus(); 635} 636 637function simplyMAC(fullMAC){ 638 var ptr; 639 var tempMAC; 640 var pos1, pos2; 641 642 ptr = fullMAC; 643 tempMAC = ""; 644 pos1 = pos2 = 0; 645 646 for(var i = 0; i < 5; ++i){ 647 pos2 = pos1+ptr.indexOf(":"); 648 649 tempMAC += fullMAC.substring(pos1, pos2); 650 651 pos1 = pos2+1; 652 ptr = fullMAC.substring(pos1); 653 } 654 655 tempMAC += fullMAC.substring(pos1); 656 657 return tempMAC; 658} 659 660function simple_showLoading(){ 661 document.getElementById("loadingIcon").style.display = ""; 662}function validForm(){ 663 if(!validate_ip()){ 664 changeiuiBackground(0); 665 return false; 666 } 667 if(!validate_dns()){ 668 changeiuiBackground(0); 669 return false; 670 } 671 if(!check_macaddr(document.form.wan_hwaddr_x,check_hwaddr_flag(document.form.wan_hwaddr_x))){ 672 document.form.wan_hwaddr_x.select(); 673 document.form.wan_hwaddr_x.focus(); 674 changeiuiBackground(0); 675 return false; 676 } 677 678 if((now_flag != "auto_way_static" && now_flag != "auto_way") 679 && (document.form.wan_proto.value == "pptp" || document.form.wan_proto.value == "l2tp")){ 680 if(document.form.wan_heartbeat_x.value.length <= 0){ 681 alert("<#QIS_internet_vpn_alert#>"); 682 document.form.wan_heartbeat_x.focus(); 683 document.form.wan_heartbeat_x.select(); 684 changeiuiBackground(0); 685 return false; 686 } 687 688 if(!validator.string(document.form.wan_heartbeat_x)){ 689 changeiuiBackground(0); 690 return false; 691 } 692 } 693 694 return true; 695} 696 697function submitForm(){ 698 if(parent.ISMOBILE){ 699 document.form.wan_ipaddr_x.value = document.form.wan_ipaddr_x_m.value; 700 document.form.wan_netmask_x.value = document.form.wan_netmask_x_m.value; 701 document.form.wan_gateway_x.value = document.form.wan_gateway_x_m.value; 702 document.form.wan_dns1_x.value = document.form.wan_dns1_x_m.value; 703 document.form.wan_dns2_x.value = document.form.wan_dns2_x_m.value; 704 document.form.wan_heartbeat_x.value = document.form.wan_heartbeat_x_m.value; 705 document.form.wan_hwaddr_x.value = document.form.wan_hwaddr_x_m.value; 706 707 if(document.form.wan_proto.value == "static"){ 708 document.form.wan_dns1_x.disabled = false; 709 document.form.wan_dns2_x.disabled = false; 710 } 711 } 712 713 remove_red_field(); 714 if(validForm() == true){ 715 simple_showLoading(); 716 document.form.wan_dhcpenable_x[0].disabled = 0; 717 document.form.wan_dhcpenable_x[1].disabled = 0; 718 document.form.wan_ipaddr_x.disabled = 0; 719 document.form.wan_netmask_x.disabled = 0; 720 document.form.wan_gateway_x.disabled = 0; 721 document.form.wan_dhcpenable_x.disabled = 0; 722 document.form.wan_dhcpenable_x.disabled = 0; 723 document.form.wan_dnsenable_x[0].disabled = 0; 724 document.form.wan_dnsenable_x[1].disabled = 0; 725 if((now_flag != "auto_way_static" && now_flag != "auto_way") 726 && (document.form.wan_proto.value == "pptp" || document.form.wan_proto.value == "l2tp")){ 727 document.form.wan_heartbeat_x.disabled = 0; 728 } 729 else 730 document.form.wan_heartbeat_x.disabled = 1; 731 732 // uinfi 733 document.form.switch_wantag.value = parent.document.QKform.switch_wantag.value; 734 document.form.switch_wan0tagid.value = parent.document.QKform.switch_wan0tagid.value; 735 document.form.switch_wan0prio.value = parent.document.QKform.switch_wan0prio.value; 736 document.form.switch_wan1tagid.value = parent.document.QKform.switch_wan1tagid.value; 737 document.form.switch_wan1prio.value = parent.document.QKform.switch_wan1prio.value; 738 document.form.switch_wan2tagid.value = parent.document.QKform.switch_wan2tagid.value; 739 document.form.switch_wan2prio.value = parent.document.QKform.switch_wan2prio.value; 740 document.form.switch_stb_x.value = parent.document.QKform.switch_stb_x.value; 741 document.form.mr_enable_x.value = parent.document.QKform.mr_enable_x.value; 742 document.form.emf_enable.value = parent.document.QKform.emf_enable.value; 743 document.form.ttl_inc_enable.value = parent.document.QKform.ttl_inc_enable.value; 744 document.form.flag.value = "verify_detect"; 745 if(original_switch_wantag != document.form.switch_wantag.value){ 746 /* 747 document.form.action_script.value = "reboot"; 748 document.form.flag.value = "verify_detect_reboot"; 749 document.form.action_wait.value = "<% get_default_reboot_time(); %>"; 750 document.getElementById("loadHint").style.display = ""; 751 document.getElementById("nextButton").style.display = "none"; 752 document.getElementById("prevButton").style.display = "none";*/ 753 var reboot_time = eval("<% get_default_reboot_time(); %> + 10"); 754 document.form.action_script.value = "saveNvram"; 755 document.form.action_wait.value = "0"; 756 parent.sysReboot = true; 757 758 if(reboot_time > parent.rebootTime) 759 parent.rebootTime = reboot_time; 760 761 762 } 763 764 document.getElementById("x_Setting").disabled = false; 765 document.form.x_Setting.value = '<% nvram_get("x_Setting"); %>'; 766 document.form.sw_mode.value = 1; 767 document.form.action = "/start_apply.htm"; 768 if(parent.flag_manual) document.form.flag.value = "manual"; 769 770 document.form.submit(); 771 if(original_switch_wantag != document.form.switch_wantag.value) 772 setTimeout(function(){ 773 location.href = "/qis/QIS_wireless.htm"; 774 }, 500); 775 return true; 776 } 777 else 778 return false; 779} 780 781function check_macaddr(obj,flag){ //control hint of input mac address 782 783 if(flag == 1){ 784 var childsel=document.createElement("div"); 785 childsel.setAttribute("id","check_mac"); 786 childsel.style.color="#FFCC00"; 787 obj.parentNode.appendChild(childsel); 788 document.getElementById("check_mac").innerHTML="<#LANHostConfig_ManualDHCPMacaddr_itemdesc#>"; 789 document.getElementById("check_mac").style.display = ""; 790 return false; 791 }else if(flag == 2){ 792 var childsel=document.createElement("div"); 793 childsel.setAttribute("id","check_mac"); 794 childsel.style.color="#FFCC00"; 795 obj.parentNode.appendChild(childsel); 796 document.getElementById("check_mac").innerHTML="<#IPConnection_x_illegal_mac#>"; 797 document.getElementById("check_mac").style.display = ""; 798 return false; 799 }else{ 800 document.getElementById("check_mac") ? document.getElementById("check_mac").style.display="none" : true; 801 return true; 802 } 803} 804 805function clean_input(obj){ 806 if(obj.value == "0.0.0.0"){ 807 obj.focus(); 808 obj.select(); 809 } 810} 811 812function submitenter(myfield,e) 813{ 814 var keycode; 815 if (window.event) keycode = window.event.keyCode; 816 else if (e) keycode = e.which; 817 else return true; 818 819 if (keycode == 13){ 820 submitForm(); 821 return false; 822 } 823 else 824 return true; 825} 826 827// for mobile 828function displayLANIPCtrl(){ 829 if(document.getElementById("toggleWANIP").getAttribute("toggled") == "true"){ // DHCP 830 document.getElementById("WANIPDiv").style.display = "none"; 831 document.form.wan_dhcpenable_x[0].checked = 0; // static 832 document.form.wan_dhcpenable_x[1].checked = 1; // DHCP 833 document.getElementById("dns_info_radio_m").style.display = ""; 834 document.getElementById("toggleDNS").setAttribute("toggled", true); 835 document.getElementById("DNSDiv").style.display = "none"; 836 document.form.wan_ipaddr_x.disabled = true; 837 document.form.wan_netmask_x.disabled = true; 838 document.form.wan_gateway_x.disabled = true; 839 } 840 else{ 841 document.form.wan_dhcpenable_x[0].checked = 1; // static 842 document.form.wan_dhcpenable_x[1].checked = 0; // DHCP 843 document.form.wan_dnsenable_x[0].checked = 0; // Automatic 844 document.form.wan_dnsenable_x[1].checked = 1; // static 845 document.getElementById("WANIPDiv").style.display = ""; 846 document.getElementById("dns_info_radio_m").style.display = "none"; 847 document.getElementById("toggleDNS").setAttribute("toggled", false); 848 document.getElementById("DNSDiv").style.display = ""; 849 document.form.wan_ipaddr_x.disabled = false; 850 document.form.wan_netmask_x.disabled = false; 851 document.form.wan_gateway_x.disabled = false; 852 } 853 854 displayDNSCtrl(); 855} 856 857function displayDNSCtrl(){ 858 if(document.getElementById("toggleDNS").getAttribute("toggled") == "true"){ // Automatic 859 document.getElementById("DNSDiv").style.display = "none"; 860 document.form.wan_dnsenable_x[0].checked = 1; 861 document.form.wan_dnsenable_x[1].checked = 0; 862 document.form.wan_dns1_x.disabled = true; 863 document.form.wan_dns2_x.disabled = true; 864 } 865 else{ 866 document.getElementById("DNSDiv").style.display = ""; 867 document.form.wan_dnsenable_x[0].checked = 0; 868 document.form.wan_dnsenable_x[1].checked = 1; 869 document.form.wan_dns1_x.disabled = false; 870 document.form.wan_dns2_x.disabled = false; 871 } 872} 873</script> 874</head> 875 876<body onLoad="QKInternet_load_body();" onunload="" onKeyPress="submitenter(this,event)"> 877<div id="navtxt" class="navtext" style="position:absolute; top:50px; left:-100px; visibility:hidden; font-family:Arial, Verdana"></div> 878<iframe name="hidden_frame" id="hidden_frame" src="" width="0" height="0" frameborder="0"></iframe> 879<form method="post" name="form" target="hidden_frame" onsubmit="return submitForm();"> 880<input type="hidden" name="productid" value="<% nvram_get("productid"); %>"> 881<input type="hidden" name="prev_page" value="QIS_internet_type.htm"> 882<input type="hidden" name="current_page" value="/qis/QIS_internet_ip.htm"> 883<input type="hidden" name="next_page" value="/QIS_wizard.htm"> 884<input type="hidden" name="flag" value=""> 885<input type="hidden" name="action_mode" value="apply"> 886<input type="hidden" name="action_script" value="restart_wan_if"> 887<input type="hidden" name="action_wait" value="3"> 888<input type="hidden" name="preferred_lang" value="<% nvram_get("preferred_lang"); %>"> 889 890<input type="hidden" name="wan_proto" value=""> 891<input type="hidden" name="wan_pppoe_username" value=""> 892<input type="hidden" name="wan_pppoe_passwd" value=""> 893<input type="hidden" name="wan_hostname" value=""> 894 895 896<input type="hidden" name="lan_ipaddr" value=""> 897<input type="hidden" name="lan_netmask" value=""> 898<input type="hidden" name="x_Setting" id="x_Setting" value="" disabled> 899<input type="hidden" name="wan_unit" value="0"> 900<input type="hidden" name="sw_mode" value=""> 901<!-- unifi --> 902<input type="hidden" name="switch_wantag" value=""> 903<input type="hidden" name="switch_wan0tagid" value=""> 904<input type="hidden" name="switch_wan0prio" value=""> 905<input type="hidden" name="switch_wan1tagid" value=""> 906<input type="hidden" name="switch_wan1prio" value=""> 907<input type="hidden" name="switch_wan2tagid" value=""> 908<input type="hidden" name="switch_wan2prio" value=""> 909<input type="hidden" name="switch_stb_x" value=""> 910<input type="hidden" name="mr_enable_x" value=""> 911<input type="hidden" name="emf_enable" value=""> 912<input type="hidden" name="ttl_inc_enable" value=""> 913<div class="QISmain" id="QISmain"> 914 <div> 915 <table width="730px"> 916 <tr> 917 <td align="left"> 918 <div class="description_down" id="page_title"></div> 919 </td> 920 <!--td align="right"> 921 <img style="cursor:pointer;" onclick="parent.gotoIndex();" align="right" title="Go to Home" src="/images/backtohome.png" onMouseOver="this.src='/images/backtohomeclick.png'" onMouseOut="this.src='/images/backtohome.png'"> 922 </td--> 923 </tr> 924 </table> 925 </div> 926 <div style="margin:5px;"><img style="width: 720px; *width: 710px; height: 2px;" src="/images/New_ui/export/line_export.png"></div> 927<div id="showip" style="display:none"> 928<fieldset> 929<legend> 930 <#Layer3Forwarding_x_UseStaticIP_itemname#> 931 <span id="dhcp_info_radio"> 932 <input type="radio" name="wan_dhcpenable_x" class="input" value="0" tabindex="1" onclick="show_dhcpenable(this.value);"><#checkbox_Yes#> 933 <input type="radio" name="wan_dhcpenable_x" class="input" value="1" tabindex="2" onclick="show_dhcpenable(this.value);"><#checkbox_No#> 934 </span> 935</legend> 936 <table id="tblsetting_2" class="QISform" width="400" border="0" align="center" cellpadding="3" cellspacing="0"> 937 <tr> 938 <th width="190"> 939 <span onmouseout="return nd();" onclick="overlib('<#IPConnection_ExternalIPAddress_itemdesc#>');" style="cursor:help;"><#IPConnection_ExternalIPAddress_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 940 </th> 941 <td class="QISformtd"> 942 <input type="text" name="wan_ipaddr_x" value="<% nvram_get("wan_ipaddr_x"); %>" tabindex="3" onClick="clean_input(this)" onkeypress="return validator.isIPAddr(this, event);" size="36" maxlength="15" class="input_20_table" autocorrect="off" autocapitalize="off"/> 943 <!--input type="hidden" id="wan_ipaddr_x" name="wan_ipaddr_x" value="" maxlength="15" onkeypress="return validator.isIPAddr(this, event);" title="WAN IP"--> 944 <div class="IPaddr_qis" id="wan_ipaddr_x_div" style="display:none;"> 945 <input maxlength="3" name="wan_ipaddr_x1"; onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" 946 onpaste="return !clipboardData.getData('text').match(/\D/)" ndragenter="return false" autocomplete="off" />. 947 <input maxlength="3" id="wan_ipaddr2" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" 948 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 949 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" 950 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 951 <input maxlength="3" name="wan_ipaddr_x4"; onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" 952 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" /> 953 </div> 954 </td> 955 </tr> 956 957 <tr> 958 <th width="190"> 959 <span onmouseout="return nd();" onclick="overlib('<#IPConnection_x_ExternalSubnetMask_itemdesc#>');" style="cursor:help;"><#IPConnection_x_ExternalSubnetMask_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 960 </th> 961 <td class="QISformtd"> 962 <input type="text" name="wan_netmask_x" value="<% nvram_get("wan_netmask_x"); %>" tabindex="4" onClick="clean_input(this)" onkeypress="return validator.isIPAddr(this, event);" size="36" maxlength="15" class="input_20_table" autocorrect="off" autocapitalize="off"/> 963 <!--input type="hidden" id="wan_netmask_x" name="wan_netmask_x" value="" maxlength="15" title="WAN Subnet Mask"--> 964 <div class="IPaddr_qis" id="wan_netmask_x_div" style="display:none;"> 965 <input maxlength="3" name="wan_netmask_x1" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 966 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 967 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 968 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 969 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 970 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 971 <input maxlength="3" name="wan_netmask_x4" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 972 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" /> 973 </div> 974 </td> 975 </tr> 976 977 <tr> 978 <th> 979 <span onmouseout="return nd();" onclick="overlib('<#IPConnection_x_ExternalGateway_itemdesc#>');" style="cursor:help;"><#IPConnection_x_ExternalGateway_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 980 </th> 981 <td class="QISformtd"> 982 <input type="text" name="wan_gateway_x" value="<% nvram_get("wan_gateway_x"); %>" tabindex="5" onClick="clean_input(this)" onkeypress="return validator.isIPAddr(this, event);" size="36" maxlength="15" class="input_20_table" autocorrect="off" autocapitalize="off"/> 983 <!--input type="hidden" id="wan_gateway_x" name="wan_gateway_x" value="" maxlength="15" onkeypress="return validator.isIPAddr(this, event);" class="input"--> 984 <div class="IPaddr_qis" id="wan_gateway_x_div" style="display:none;"> 985 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 986 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 987 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 988 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 989 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 990 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 991 <input maxlength="3" name="wan_gateway_x4" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 992 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" /> 993 </div> 994 </td> 995 </tr> 996 </table> 997</fieldset> 998</div> 999 1000 <div id="dns_sec" style="display:none"> 1001 <fieldset> 1002 <legend> 1003 <span id="dns_info_title"><#IPConnection_x_DNSServerEnable_itemname#></span> 1004 <span id="dns_info_radio"> 1005 <input type="radio" name="wan_dnsenable_x" value="1" onclick="show_dnsenable(this.value);" tabindex="6" class="input"><#checkbox_Yes#> 1006 <input type="radio" name="wan_dnsenable_x" value="0" onclick="show_dnsenable(this.value);" tabindex="7" class="input"><#checkbox_No#> 1007 </span> 1008 </legend> 1009 <table id="tblsetting_4" class="QISform" width="400" border=0 align="center" cellpadding="5" cellspacing="0"> 1010 <tr> 1011 <th width="190"> 1012 <span onmouseout="return nd();" onclick="overlib('<#IPConnection_x_DNSServer1_itemdesc#>');" style="cursor:help;"><#IPConnection_x_DNSServer1_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 1013 </th> 1014 <td class="QISformtd"> 1015 <input type="text" name="wan_dns1_x" value="<% nvram_get("wan_dns1_x"); %>" tabindex="8" onkeypress="return validator.isIPAddr(this, event);" size="36" maxlength="15" class="input_20_table" autocorrect="off" autocapitalize="off"/> 1016 <!--input type="hidden" id="wan_dns1_x" name="wan_dns1_x" value="" onkeypress="return validator.isIPAddr(this, event);" maxlength="15"--> 1017 <div class="IPaddr_qis" id="wan_dns1_x_div" style="display:none;"> 1018 <input maxlength="3" name="wan_dns1_x1" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1019 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1020 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1021 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1022 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1023 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1024 <input maxlength="3" name="wan_dns1_x4" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1025 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" /> 1026 </div> 1027 </td> 1028 </tr> 1029 1030 <tr> 1031 <th width="190"> 1032 <span onmouseout="return nd();" onclick="overlib('<#IPConnection_x_DNSServer2_itemdesc#>');" style="cursor:help;"><#IPConnection_x_DNSServer2_itemname#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 1033 </th> 1034 <td class="QISformtd"> 1035 <input type="text" name="wan_dns2_x" value="<% nvram_get("wan_dns2_x"); %>" tabindex="9" onkeypress="return validator.isIPAddr(this, event);" size="36" maxlength="15" class="input_20_table" autocorrect="off" autocapitalize="off"/> 1036 <!--input type="hidden" id="wan_dns2_x" name="wan_dns2_x" value="" maxlength="15" onkeypress="return validator.isIPAddr(this, event);" --> 1037 <div class="IPaddr_qis" id="wan_dns2_x_div" style="display:none;"> 1038 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1039 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1040 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1041 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1042 <input maxlength="3" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1043 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" />. 1044 <input maxlength="3" name="wan_dns2_x4" onkeypress="return validator.checkIP(this,event);" onkeyup="return validator.checkWord(this,event);" onblur="validator.validateIP(this);" 1045 onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="return false" autocomplete="off" /> 1046 </div> 1047 </td> 1048 </tr> 1049 1050 </table> 1051 </fieldset> 1052 </div> 1053 1054<div id="showserver" style="width:730px; display:none"> 1055 <fieldset id="ifVPNfield"> 1056 <table id="heartbeat_server" class="QISform" width="400" border=0 align="center" cellpadding="5" cellspacing="0" style="display:none;"> 1057 <tr> 1058 <th width="190"> 1059 <span onmouseout="return nd();" onclick="overlib('<#BOP_isp_heart_desc2#>');" style="cursor:help;"><#BOP_isp_heart_item#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 1060 </th> 1061 <td class="QISformtd"> <!-- ASUS 2009.12 for maxlen --> 1062 <input type="text" name="wan_heartbeat_x" value="" tabindex="10" size="36" maxlength="64" title="<#BOP_isp_heart_item#>" class="input_32_table" disabled autocorrect="off" autocapitalize="off"> 1063 </td> 1064 </tr> 1065 </table> 1066 <table id="vpn_enable_block" class="QISform" width="400" border=0 align="center" cellpadding="5" cellspacing="0" style="display:none;"> 1067 <tr> 1068 <th width="190"> 1069 <span onmouseout="return nd();" onclick="overlib('<#BOP_isp_heart_desc2#>');" style="cursor:help;"><#QIS_if_vpn_existed#><img align="right" style="cursor:pointer;margin-top:-14px\9;" src="/images/New_ui/helpicon.png"></span> 1070 </th> 1071 <td class="QISformtd"> 1072 <!-- wan_heartbeat_x --> 1073 <input type="radio" name="vpn_enable" value="1" tabindex="11" onclick="show_next_button();" class="input"><#checkbox_Yes#> 1074 <input type="radio" name="vpn_enable" value="0" tabindex="12" onclick="show_next_button();" class="input"><#checkbox_No#> 1075 </td> 1076 </tr> 1077 </table> 1078 </fieldset> 1079</div> 1080 1081<div id="showhwaddr" style="width:730px; display:none;"> 1082 <fieldset id="ifVPNfield"> 1083 <table id="heartbeat_server" class="QISform" width="400" border=0 align="center" cellpadding="5" cellspacing="0"> 1084 <tr> 1085 <th width="190"> 1086 <div onmouseout="return nd();" onclick="overlib('<#PPPConnection_x_MacAddressForISP_itemdesc#>', FIXX, 285, FIXY,50);" style="white-space:normal;cursor:help;"><#BOP_isp_mac_item#><img align="right" style="cursor:pointer;margin-top:-14px \9;" src="/images/New_ui/helpicon.png"></div> 1087 </th> 1088 <td class="QISformtd"> 1089 <input type="text" name="wan_hwaddr_x" tabindex="13" onkeypress="return validator.isHWAddr(this,event);" style="height:25px;" class="input_20_table" size="36" maxlength="17" value="" autocorrect="off" autocapitalize="off"> 1090 <input type="button" class="button_gen_long" tabindex="14" onclick="showMAC();" value="<#BOP_isp_MACclone#>"> 1091 </td> 1092 </tr> 1093 </table> 1094 </fieldset> 1095</div> 1096 <div class="apply_gen" style="margin-top:30px"> 1097 <input type="button" id="prevButton" value="<#CTL_prev#>" tabindex="16" onclick="gotoprev(document.form);" class="button_gen"> 1098 <input type="submit" id="nextButton" value="<#CTL_next#>" tabindex="15" class="button_gen"> 1099 <span id="loadHint" style="display:none"><#SAVE_note#></span> 1100 <img id="loadingIcon" style="display:none;" src="/images/InternetScan.gif"></span> 1101 </div> 1102</div> 1103 1104<div style="display:none;" id="QISmain_m"> 1105 <div id="showip_m"> 1106 <span class="itemTitle"><#Layer3Forwarding_x_UseStaticIP_itemname#></span> 1107 <fieldset> 1108 <div id="dhcp_info_radio_m"> 1109 <div class="row"> 1110 <label>Automatic</label> 1111 <div id="toggleWANIP" class="toggle" onclick="displayLANIPCtrl();" toggled="true"> 1112 <span class="thumb"></span> 1113 <span class="toggleOn"><#checkbox_Yes#></span> 1114 <span class="toggleOff"><#checkbox_No#></span> 1115 </div> 1116 </div> 1117 </div> 1118 1119 <div id="WANIPDiv"> 1120 <div class="row"> 1121 <label><#IPConnection_ExternalIPAddress_itemname#></label> 1122 <input type="text" name="wan_ipaddr_x_m" placeholder="" maxlength="15" value="" autocorrect="off" autocapitalize="off"/> 1123 </div> 1124 <div class="row"> 1125 <label><#IPConnection_x_ExternalSubnetMask_itemname#></label> 1126 <input type="text" name="wan_netmask_x_m" placeholder="" maxlength="15" value="" autocorrect="off" autocapitalize="off"/> 1127 </div> 1128 <div class="row_end"> 1129 <label><#IPConnection_x_ExternalGateway_itemname#></label> 1130 <input type="text" name="wan_gateway_x_m" placeholder="" maxlength="15" value="" autocorrect="off" autocapitalize="off"/> 1131 </div> 1132 </div> 1133 </fieldset> 1134 <br /> 1135 </div> 1136 1137 <div id="dns_sec_m" style="display:none"> 1138 <span class="itemTitle" id="dns_info_title_m"><#IPConnection_x_DNSServerEnable_itemname#></span> 1139 <fieldset> 1140 <div class="row" id="dns_info_radio_m"> 1141 <label>Automatic</label> 1142 <div id="toggleDNS" class="toggle" onclick="displayDNSCtrl();" toggled="true"> 1143 <span class="thumb"></span> 1144 <span class="toggleOn"><#checkbox_Yes#></span> 1145 <span class="toggleOff"><#checkbox_No#></span> 1146 </div> 1147 </div> 1148 1149 <div id="DNSDiv"> 1150 <div class="row"> 1151 <label><#IPConnection_x_DNSServer1_itemname#></label> 1152 <input type="text" name="wan_dns1_x_m" placeholder="" maxlength="15" value="" autocorrect="off" autocapitalize="off"/> 1153 </div> 1154 <div class="row_end"> 1155 <label><#IPConnection_x_DNSServer2_itemname#></label> 1156 <input type="text" name="wan_dns2_x_m" placeholder="" maxlength="15" value="" autocorrect="off" autocapitalize="off"/> 1157 </div> 1158 </div> 1159 </fieldset> 1160 <br /> 1161 </div> 1162 1163 <div id="showserver_m" style="display:none"> 1164 <fieldset> 1165 <div class="row_end"> 1166 <label><#BOP_isp_heart_item#></label> 1167 <input type="text" name="wan_heartbeat_x_m" onkeypress="" placeholder="" maxlength="64" value="" autocorrect="off" autocapitalize="off"/> 1168 </div> 1169 </fieldset> 1170 <br /> 1171 </div> 1172 1173 <div id="showhwaddr_m" style="display:none"> 1174 <fieldset> 1175 <div class="row_end"> 1176 <label><#BOP_isp_mac_item#></label> 1177 <input type="text" name="wan_hwaddr_x_m" onkeypress="return validator.isHWAddr(this,event);" placeholder="" maxlength="17" value="" autocorrect="off" autocapitalize="off"/> 1178 </div> 1179 </fieldset> 1180 <br /> 1181 </div> 1182 1183 <fieldset class="theFieldset" id="theFieldset"> 1184 <div class="row_end"> 1185 <a id="loadingIcon_iui" class="iuiA" onclick="changeiuiBackground(1);submitForm();"><#CTL_next#></a> 1186 </div> 1187 </fieldset> 1188</div> 1189 1190</form> 1191</body> 1192