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<link rel="stylesheet" type="text/css" href="qis_style.css"> 9<script type="text/javascript" src="/state.js"></script> 10<script type="text/javascript" src="/general.js"></script> 11<script type="text/javascript"> 12 13var country_code = ""; 14var selected_country = ""; 15var ISP_List = [ <% get_isp_list("/www/ISP_PTM_List.txt"); %> ]; 16var ISP_List_IPTV = [ <% get_isp_list("/www/ISP_PTM_List_IPTV.txt"); %> ]; 17var ru_idx_start = 0; 18var x_Setting = "<% nvram_get("x_Setting"); %>"; 19var w_Setting = "<% nvram_get("w_Setting"); %>"; 20var dslx_ginp = "<% nvram_get("dslx_ginp"); %>"; 21 22function setIptvNumPvc() { 23 var pvc_cnt = 0; 24 var tmp = document.form.dsltmp_cfg_iptv_idx.value; 25 var dsltmp_cfg_iptv_pvclist_value = ""; 26 if (tmp != "") { 27 for(var i = 0; i < ISP_List_IPTV.length; i++){ 28 if (ISP_List_IPTV[i][0] == tmp) { 29 pvc_cnt++; 30 dsltmp_cfg_iptv_pvclist_value += 31 "<" + ISP_List_IPTV[i][1] 32 + ">" + ISP_List_IPTV[i][2] 33 + ">" + ISP_List_IPTV[i][3] 34 + ">" + ISP_List_IPTV[i][4] 35 + ">" + ISP_List_IPTV[i][5] 36 } 37 } 38 document.form.dsltmp_cfg_iptv_enable.value = "1"; 39 document.form.dsltmp_cfg_iptv_num_pvc.value = pvc_cnt.toString(); 40 document.form.dsltmp_cfg_iptv_pvclist.value = dsltmp_cfg_iptv_pvclist_value; 41 } 42} 43 44function showCountryList(o){ 45 var code = ""; 46 var showed_country = ""; 47 code +="<select name='country' class='input_option' tabindex='1' onchange='showAllList(this.value);'>"; 48 code +="<option value='default'><#Select_menu_default#></option>"; 49 for(var i = 0; i < ISP_List.length; i++){ 50 if(showed_country != ISP_List[i][1]){ 51 code +="<option value='"+ISP_List[i][1]; 52 if(o == ISP_List[i][1]){ 53 code +="' selected='selected'"; 54 } 55 code +="'>"+ISP_List[i][2]+"</option>"; 56 showed_country = ISP_List[i][1]; 57 } 58 } 59 60 code +="<option value='NO'><#Not_Listed#></option>"; 61 code +="</select>"; 62 63 document.getElementById("CountryList").innerHTML = code; 64} 65 66function showCityList(o){ 67 var code = ""; 68 var showedCity = ""; 69 code +="<select name='city' class='input_option' tabindex='2' onchange='showRussiaISPList(this.value);'>"; 70 for(var i = 0; i < ISP_List.length; i++){ 71 if((showedCity != ISP_List[i][3]) && (o == ISP_List[i][1])){ 72 code +="<option value='"+ISP_List[i][3]+"'>"+ISP_List[i][3]+"</option>"; 73 showedCity = ISP_List[i][3]; 74 } 75 } 76 code +="</select>"; 77 78 document.getElementById("CityList").innerHTML = code; 79} 80 81function showNomoISPList(country){ 82 var code = ""; 83 var showed_isp = ""; 84 var first_element = 0; 85 86 code +="<select id='ISP' name='ISP' onChange='ShowPVC(this.value); showNomoISPServiceByIdx(this.value);' tabindex='3' class='input_option'>"; 87 for(var i = 0; i < ISP_List.length; i++){ 88 if(country == ISP_List[i][1]){ 89 if(showed_isp == ISP_List[i][4]){ //same isp internet setting with additional service 90 continue; 91 } 92 else { 93 showed_isp = ISP_List[i][4]; 94 } 95 if (first_element==0) { 96 first_element=1; 97 ShowPVC(i); 98 code +="<option value='"+ISP_List[i][0]+"' selected='selected'>"+ISP_List[i][4]+"</option>"; 99 } 100 else { 101 code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][4]+"</option>"; 102 } 103 } 104 } 105 code +="<option value='NO'><#Not_Listed#></option>"; 106 code +="</select>"; 107 document.getElementById("ISPList").innerHTML = code; 108} 109 110function showNomoISPServiceByIdx(idx) { 111 document.getElementById("Service_tr").style.display="none"; 112 113 var code = ""; 114 var first_element = 0; 115 var sel_idx = 0; 116 117 code +="<select id='ISPSVC' name='ISPSVC' onChange='ChgSVC(this.value);' class='input_option'>"; 118 for(var i = idx; i < ISP_List.length; i++){ 119 if(ISP_List[idx][4] != ISP_List[i][4]) //only show this isp 120 break; 121 if(ISP_List[i][5] == "") 122 continue; 123 124 if (first_element == 0) { 125 first_element = 1; 126 sel_idx = i; 127 code +="<option value='"+ISP_List[i][0]+"' selected='selected'>"+ISP_List[i][5]+"</option>"; 128 } 129 else { 130 code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][5]+"</option>"; 131 } 132 } 133 code +="</select>"; 134 code +="<span id='STBPortMsg'> Please connect the IPTV STB to LAN Port 1</span>"; /* untranslated */ 135 136 if(first_element != 0) { 137 document.getElementById("Service_tr").style.display=""; 138 document.getElementById("Service").innerHTML = code; 139 ChgSVC(sel_idx); 140 } 141} 142 143function showRussiaISPList(o){ 144 ISPlocatedCity = o; 145 hidePVCInfo(1); 146 var code = ""; 147 var First_ISP= ""; 148 var showed_ISP = ""; 149 code +="<select id='ISP' name='ISP' class='input_option' tabindex='3' onChange='ShowPVC(this.value); showRussiaISPServiceByIdx(ISPlocatedCity, this.value)'>"; 150 var first_element = 0; 151 for(var i = ru_idx_start; i < ISP_List.length; i++){ 152 if((showed_ISP != ISP_List[i][4]) && (o == ISP_List[i][3])){ 153 if (first_element==0) { 154 first_element=1; 155 ShowPVC(i); 156 code +="<option value='"+ISP_List[i][0]+"' selected='selected'>"+ISP_List[i][4]+"</option>"; 157 } 158 else { 159 code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][4]+"</option>"; 160 } 161 162 if(First_ISP == "") 163 First_ISP = ISP_List[i][4]; 164 showed_ISP = ISP_List[i][4]; 165 } 166 } 167 code +="<option value='NO'><#Not_Listed#></option>"; 168 code +="</select>"; 169 document.getElementById("ISPList").innerHTML = code; 170 171 showRussiaISPService(ISPlocatedCity, First_ISP); 172} 173 174function showRussiaISPServiceByIdx(c, idx){ 175 if (idx=="NO"){ 176 document.getElementById("Service_tr").style.display="none"; 177 } 178 else{ 179 var isp_str = ""; 180 for(var i = ru_idx_start; i < ISP_List.length; i++){ 181 if((idx == ISP_List[i][0])){ 182 isp_str = ISP_List[i][4]; 183 } 184 } 185 document.getElementById("Service_tr").style.display=""; 186 var code = ""; 187 code +="<select id='ISPSVC' name='ISPSVC' class='input_option' tabindex='4' onChange='ChgSVC(this.value);'>"; 188 var first_element = 0; 189 var sel_idx = 0; 190 for(var i = ru_idx_start; i < ISP_List.length; i++){ 191 if((c == ISP_List[i][3]) && (isp_str == ISP_List[i][4])){ 192 if (first_element == 0) 193 { 194 first_element = 1; 195 sel_idx = i; 196 } 197 code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][5]+"</option>"; 198 } 199 } 200 code +="</select>"; 201 code +="<span id='STBPortMsg'> Please connect the IPTV STB to LAN Port 1</span>"; /* untranslated */ 202 document.getElementById("Service").innerHTML = code; 203 ChgSVC(sel_idx); 204 } 205} 206 207function showRussiaISPService(c, o){ 208//alert("City: "+c+", ISP: "+o); 209 if (o=="NO") { 210 document.getElementById("Service_tr").style.display="none"; 211 } 212 else { 213 document.getElementById("Service_tr").style.display=""; 214 var code = ""; 215 code +="<select id='ISPSVC' name='ISPSVC' class='input_option' tabindex='4' onChange='ChgSVC(this.value);'>"; 216 var first_element = 0; 217 var sel_idx = 0; 218 for(var i = ru_idx_start; i < ISP_List.length; i++){ 219 if((c == ISP_List[i][3]) && (o == ISP_List[i][4])){ 220 if (first_element == 0) 221 { 222 first_element = 1; 223 sel_idx = i; 224 } 225 code +="<option value='"+ISP_List[i][0]+"'>"+ISP_List[i][5]+"</option>"; 226 } 227 } 228 code +="</select>"; 229 code +="<span id='STBPortMsg'> Please connect the IPTV STB to LAN Port 1</span>"; /* untranslated */ 230 document.getElementById("Service").innerHTML = code; 231 ChgSVC(sel_idx); 232 } 233} 234 235function showAllList(o){ 236 var i; 237 selected_country = o; 238 239 if(0){//if(o == "Russia"){ //Do not use since no country information in PTM list currently 240 document.getElementById("City_tr").style.display=""; 241 document.getElementById("Service_tr").style.display=""; 242 hideCityList(0); 243 showCityList(o); 244 if (ru_idx_start == 0) { 245 for(i=0; i< ISP_List.length; i++) { 246 if(ISP_List[i][1]=="Russia") 247 break; 248 } 249 ru_idx_start = i; 250 } 251 showRussiaISPList(ISP_List[ru_idx_start][3]); 252 showRussiaISPService(ISP_List[ru_idx_start][3], ISP_List[ru_idx_start][4]); 253 hidePVCInfo(1); 254 } 255 else{ 256 document.getElementById("City_tr").style.display="none"; 257 document.getElementById("Service_tr").style.display="none"; 258 hideCityList(1); 259 showNomoISPList(o); 260 for(i=0; i< ISP_List.length; i++) { 261 if(ISP_List[i][1] == o) { 262 showNomoISPServiceByIdx(i); 263 break; 264 } 265 } 266 } 267 if (o=="NO") 268 hidePVCInfo(0); 269 else 270 hidePVCInfo(1); 271} 272 273function hideCityList(hide) { 274 var status = 'visible'; 275 276 if ( hide == 1 ) 277 status = 'hidden'; 278 279 if (document.getElementById) // DOM3 = IE5, NS6 280 document.getElementById("CityList").style.visibility = status; 281 else { 282 if (document.layers) { // Netscape 4 283 } else // IE 4 284 document.all.CityList.style.visibility = status; 285 } 286} 287 288function hidePVCInfo(hide) { 289 var status = ''; 290 291 if ( hide == 1 ) { 292 status = 'none'; 293 } 294 295 if (document.getElementById) { // DOM3 = IE5, NS6 296 document.getElementById('vccInfo').style.display = status; 297 } 298 else { 299 if (document.layers) { // Netscape 4 300 if ( hide == 1 ) { 301 //document.form.user_vpi.value = ""; 302 //document.form.user_vci.value = ""; 303 document.form.user_prctl.value = 0; 304 //document.form.user_encap.value = 0; 305 document.form.user_vlanid.value = ""; 306 } 307 } 308 else { // IE 4 309 document.all.vccInfo.style.display = status; 310 } 311 } 312} 313 314function hidewarn(hide) { 315 var status = 'visible'; 316 317 if ( hide == 1 ) 318 status = 'hidden'; 319 320 if (document.getElementById) // DOM3 = IE5, NS6 321 document.getElementById('warnning').style.visibility = status; 322 else { 323 if (document.layers) { // Netscape 4 324 } else // IE 4 325 document.all.warning.style.visibility = status; 326 } 327} 328 329 330function ShowPVC(idx) { 331 if ( idx=='NO' ) 332 hidePVCInfo(0); 333 else 334 hidePVCInfo(1); 335} 336 337function ChgSVC(idx) { 338 if(ISP_List[idx][13] != "") { //iptv idx 339 if(ISP_List[idx][5] == "VDSL+MOD") 340 document.getElementById("STBPortMsg").innerHTML = "Please connect the MOD(STB) to LAN Port 1"; 341 showhide("STBPortMsg", 1); 342 } 343 else { 344 showhide("STBPortMsg", 0); 345 } 346} 347 348function QIS_manual_setting_load_body() { 349 parent.set_step("t2"); 350 hidePVCInfo(1); 351 if(country_code=="") 352 country_code = "default"; 353 showCountryList(country_code); 354 showAllList(country_code); 355} 356 357 358function QKfinish_load_body(){ 359 parent.document.title = "<#Web_Title#> - <#QKSet_all_title#>"; 360} 361 362function submit_detect(){ 363 document.form.current_page.value = "/qis/QIS_detect.htm"; 364 document.form.next_page.value = "/qis/QIS_detect.htm"; 365 document.form.action_script.value = "restart_dsl_autodet"; 366 document.form.submit(); 367} 368 369function btnNext() { 370 var connection_type = 0; 371 if(document.form.country.value=='default'){ 372 alert("<#JS_fieldblank#>"); 373 document.form.country.focus(); 374 return false; 375 } 376 else if ( document.form.country.value=='NO'|| document.form.ISP.value=='NO' ){ 377 var tmp_vlanid = document.form.dslx_vid.value; 378 if ( isNaN(tmp_vlanid) == true ) { 379 alert('<#WANVLANIDText#> "' + tmp_vlanid + '" <#Manual_Setting_JS_invalid#>'); 380 document.form.dslx_vid.focus(); 381 return false; 382 } 383 connection_type = document.form.user_prctl.value; 384 document.form.dsltmp_cfg_prctl.value = document.form.user_prctl.value; 385 if(tmp_vlanid.length > 0) 386 document.form.dsltmp_cfg_dot1q.value = 1; 387 document.form.dsltmp_cfg_vid.value = document.form.dslx_vid.value; 388 document.form.dsltmp_cfg_iptv_idx.value = ""; 389 document.form.dsltmp_cfg_ispname.value = ""; 390 document.form.dsltmp_cfg_country.value = ""; 391 } 392 else { 393 var isp_idx = 0 394 if(0) { //if (selected_country == "Russia") { //Do not use since no country information in PTM list currently 395 isp_idx = document.getElementById("ISPSVC").value; 396 } 397 else { 398 isp_idx = document.getElementById("ISP").value; 399 if(ISP_List[isp_idx][5] != "") 400 isp_idx = document.getElementById("ISPSVC").value; 401 } 402 connection_type = ISP_List[isp_idx][8]; 403 document.form.dsltmp_cfg_country.value = ISP_List[isp_idx][1]; 404 document.form.dsltmp_cfg_ispname.value = ISP_List[isp_idx][4]; 405 document.form.dsltmp_cfg_prctl.value = ISP_List[isp_idx][8]; 406 document.form.dsltmp_cfg_vid.value = ISP_List[isp_idx][10]; 407 if(document.form.dsltmp_cfg_vid.value != "") 408 document.form.dsltmp_cfg_dot1q.value = 1; 409 document.form.dsltmp_cfg_iptv_rmvlan.value = ISP_List[isp_idx][11]; 410 document.form.dsltmp_cfg_iptv_mr.value = ISP_List[isp_idx][12]; 411 document.form.dsltmp_cfg_iptv_idx.value = ISP_List[isp_idx][13]; 412 } 413 414 setIptvNumPvc(); 415 416 //Specific setting 417 if( dslx_ginp != "1" && 418 ( 419 document.form.country.value=='Australia' 420 || document.form.country.value=='United Kingdom' 421 || document.form.country.value=='Germany' 422 ) 423 ){ 424 document.form.dsltmp_cfg_ginp.value = "1"; 425 parent.restartDSLSetting = true; 426 } 427 if( document.form.dsltmp_cfg_country.value=='Thailand' 428 && document.form.dsltmp_cfg_ispname.value=='3BB 15M/1.5M' 429 ){ 430 document.form.dsltmp_cfg_th3bb.value = "1"; //flag 431 document.form.dsltmp_transmode.value = "atm"; 432 document.form.dsltmp_cfg_modulation.value = "4"; 433 document.form.dsltmp_cfg_annex.value = "3"; 434 document.form.dsl_unit.value = "0"; 435 document.form.dsltmp_cfg_vpi.value = ISP_List[isp_idx][6]; 436 document.form.dsltmp_cfg_vci.value = ISP_List[isp_idx][7]; 437 document.form.dsltmp_cfg_encap.value = ISP_List[isp_idx][9]; 438 } 439 if( document.form.country.value == 'Germany' 440 && document.form.dsltmp_cfg_vdslprofile.value == "0" 441 ){ 442 document.form.dsltmp_cfg_de17a.value = "1"; 443 document.form.dsltmp_cfg_vdslprofile.value = "1"; 444 } 445 446 if (connection_type==0) //PPPoE 447 { 448 document.form.next_page.value = "/qis/QIS_ppp_cfg_tmp.htm"; 449 document.form.submit(); 450 } 451 else if (connection_type==2) //Automatic IP 452 { 453 document.form.next_page.value = "/qis/QIS_mer_cfg_tmp.htm"; 454 document.form.submit(); 455 } 456 else if (connection_type==3) //BRIDGE 457 { 458 document.form.next_page.value = "/qis/QIS_bridge_cfg_tmp.htm"; 459 document.form.submit(); 460 } 461 else if (connection_type==4) //Static IP 462 { 463 document.form.next_page.value = "/qis/QIS_ipoa_cfg_tmp.htm"; 464 document.form.submit(); 465 } 466 else 467 { 468 alert("<#Connectiontype_unknown#>"); 469 return; 470 } 471} 472 473</script> 474</head> 475 476<body onLoad="QIS_manual_setting_load_body();" > 477<form method="post" name="form" action="/start_apply.htm" target=""> 478<input type="hidden" name="prev_page" value=""> 479<input type="hidden" name="current_page" value="/qis/QIS_PTM_manual_setting.htm"> 480<input type="hidden" name="next_page" value="/qis/QIS_detect.htm"> 481<input type="hidden" name="action_mode" value="apply"> 482<input type="hidden" name="action_script" value=""> 483<input type="hidden" name="action_wait" value=""> 484<input type="hidden" name="dsltmp_cfg_country" value=""> 485<input type="hidden" name="dsltmp_cfg_ispname" value=""> 486<input type="hidden" name="dsltmp_cfg_vpi" value=""> 487<input type="hidden" name="dsltmp_cfg_vci" value=""> 488<input type="hidden" name="dsltmp_cfg_prctl" value=""> 489<input type="hidden" name="dsltmp_cfg_encap" value=""> 490<input type="hidden" name="dsltmp_cfg_dot1q" value="0"> 491<input type="hidden" name="dsltmp_cfg_vid" value=""> 492<input type="hidden" name="dsltmp_cfg_iptv_rmvlan" value=""> 493<input type="hidden" name="dsltmp_cfg_iptv_mr" value=""> 494<input type="hidden" name="dsltmp_cfg_iptv_idx" value=""> 495<input type="hidden" name="dsltmp_cfg_iptv_num_pvc" value=""> 496<input type="hidden" name="dsltmp_cfg_iptv_pvclist" value=""> 497<input type="hidden" name="dsltmp_cfg_iptv_enable" value="0"> 498<input type="hidden" name="dsltmp_transmode" value="ptm"> 499<input type="hidden" name="dsl_unit" value="8"> 500<input type="hidden" name="dsltmp_cfg_ginp" value="<% nvram_get("dslx_ginp"); %>"> 501<input type="hidden" name="dsltmp_cfg_th3bb" value="0"> 502<input type="hidden" name="dsltmp_cfg_modulation" value=""> 503<input type="hidden" name="dsltmp_cfg_annex" value=""> 504<input type="hidden" name="dsltmp_cfg_de17a" value="0"> 505<input type="hidden" name="dsltmp_cfg_vdslprofile" value="<% nvram_get("dslx_vdsl_profile"); %>"> 506<div class="QISmain"> 507 <!-- 508 <div class="formfonttitle" style="padding:0 0 0 10;" id="FailReason"><#Manual_Setting_Title#></div> 509 <div style="margin-left:5px;margin-top:10px;margin-bottom:10px"><img style="width: 700px; height: 2px;" src="/images/New_ui/export/line_export.png"></div> 510 --> 511 <div class="formfonttitle" style="padding:6 0 0 10;"> 512 <div> 513 <table width="730px"> 514 <tr> 515 <td align="left"> 516 <span class="description_down"><#Manual_Setting_Title#></span> 517 </td> 518 </tr> 519 </table> 520 </div> 521 <div style="margin:5px;"><img style="width: 720px; *width: 710px; height: 2px;" src="/images/New_ui/export/line_export.png"></div> 522 </div> 523 <br/> 524 <table width="80%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable"> 525 <thead> 526 <tr> 527 <td colspan="2"><#Manual_Setting_Title#></td> 528 </tr> 529 </thead> 530 <tbody> 531 <tr> 532 <td colspan="2"> 533 <#Manual_Setting_desc1#><br/> 534 <span id='warnning'> 535 <b></b> 536 </span> 537 </td> 538 </tr> 539 <tr> 540 <th width="40%"><#Manual_Setting_contry#></th> 541 <td> 542 <div id="CountryList"></div> 543 </td> 544 </tr> 545 <tr id="City_tr"> 546 <th width="40%"><#Manual_Setting_city#></th> 547 <td> 548 <div id="CityList"></div> 549 </td> 550 </tr> 551 <tr id="ISP_tr"> 552 <th width="40%"><#HSDPAConfig_ISP_itemname#>:</th> 553 <td> 554 <div id="ISPList"></div> 555 </td> 556 </tr> 557 <tr id="Service_tr"> 558 <th width="40%"><#qis_service#>:</th> 559 <td> 560 <div id="Service"></div> 561 </td> 562 </tr> 563 </tbody> 564 </table> 565<div id='vccInfo'> 566<table width="80%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#6b8fa3" class="FormTable"> 567 <tbody> 568 <tr> 569 <td colspan="2"><#Manual_Setting_desc_ptm#></td> 570 </tr> 571 <tr> 572 <th><#Layer3Forwarding_x_ConnectionType_itemname#>:</th> 573 <td> 574 <select name="user_prctl" class="input_option" tabindex="5"> 575 <option value = 2><#BOP_ctype_title1#></option> 576 <option value = 4><#BOP_ctype_title5#></option> 577 <option value = 0>PPPoE</option> 578 <option value = 3>BRIDGE</option> 579 </select> 580 </td> 581 </tr> 582 <tr> 583 <th><#WANVLANIDText#>:</th> 584 <td><input type='text' name='dslx_vid' tabindex="6" maxlength="5" class="input_6_table"></td> 585 </tr> 586 </tbody> 587</table> 588</div> 589 590 <div class="apply_gen" style="margin-top:10px"> 591 <span id="bottom_btn1"><input type="button" value="<#CTL_Detect_Again#>" tabindex="8" onclick="submit_detect();" class="button_gen" ></span> 592 <input type="button" value="<#CTL_next#>" tabindex="7" onclick="btnNext();" class="button_gen"> 593 </div> 594 595</div> 596</form> 597</body> 598</html> 599