14a52e947c9c3b28aae43b7f7b997f808eb8a6e1
[bcm963xx.git] / userapps / broadcom / cfm / html / vpivci.html
1 <html>\r
2    <head>\r
3 \r
4       <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=<%ejGetKW(CHAR_set)%>">\r
5       <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>\r
6       <link rel="stylesheet" href='stylemain.css' type='text/css'>\r
7          <link rel="stylesheet" href='colors.css' type='text/css'>\r
8             <script language="javascript">\r
9 <!-- hide\r
10 \r
11 //var auto = '<%ejGet(enblAutoScan)%>';\r
12 var vpi = '<%ejGet(atmVpi)%>';\r
13 var vci = '<%ejGet(atmVci)%>';\r
14 var mem = '<%ejGetOther(memInfo, checkAutoScanMemory)%>';\r
15 var countrycode = '<%ejGetWl(wlCountry)%>';\r
16 var prtcl = '<%ejGetOther(sysInfo, noBrPrtcl)%>';\r
17 \r
18 function isp_list(input_country) {\r
19     var i = 0, ctr = 0;\r
20 \r
21     var country_isp = new Array(45);\r
22         country_isp[0] = new Array("AU", "All ISP", "CONF22");\r
23         country_isp[1] = new Array("CN", "0/32", "CONF61"); //2006.8.31 Yau add\r
24         country_isp[2] = new Array("CN", "0/33", "CONF62");\r
25         country_isp[3] = new Array("CN", "0/35", "CONF63");\r
26         country_isp[4] = new Array("CN", "0/40", "CONF64");\r
27         country_isp[5] = new Array("CN", "0/67", "CONF65");\r
28         country_isp[6] = new Array("CN", "0/80", "CONF66");\r
29         country_isp[7] = new Array("CN", "0/100", "CONF67");\r
30         country_isp[8] = new Array("CN", "0/200", "CONF68");\r
31         country_isp[9] = new Array("CN", "1/33", "CONF69");\r
32         country_isp[10] = new Array("CN", "1/35", "CONF70");\r
33         country_isp[11] = new Array("CN", "8/32", "CONF71");\r
34         country_isp[12] = new Array("CN", "8/35", "CONF72");\r
35         country_isp[13] = new Array("CN", "8/81", "CONF73");\r
36         country_isp[14] = new Array("CN", "8/88", "CONF74"); //End of add\r
37         country_isp[15] = new Array("ID", "All ISP", "CONF51");\r
38         country_isp[16] = new Array("IS", "All ISP", "CONF50");\r
39         country_isp[17] = new Array("IT", "Aruba", "CONF25");\r
40         country_isp[18] = new Array("IT", "Nextra", "CONF3");\r
41         country_isp[19] = new Array("IT", "MC-link", "CONF3");\r
42         country_isp[20] = new Array("IT", "Telecom Italia", "CONF24");\r
43         country_isp[21] = new Array("IT", "Telvia", "CONF25");\r
44         country_isp[22] = new Array("IT", "Tiscali", "CONF3");\r
45         country_isp[23] = new Array("IT", "Wind", "CONF3");\r
46         country_isp[24] = new Array("IT", "BISnet", "CONF11");\r
47         country_isp[25] = new Array("IT", "BISnet IP Dynamico", "CONF3");\r
48         country_isp[26] = new Array("IT", "Not List", "NO");\r
49         country_isp[27] = new Array("NL", "Cybercity", "CONF17");\r
50         country_isp[28] = new Array("NL", "Tiscali World-Online", "CONF17");\r
51         country_isp[29] = new Array("NL", "Not List", "NO");\r
52         country_isp[30] = new Array("NZ", "Telecom New Zealand", "CONF30");\r
53         country_isp[31] = new Array("NZ", "Not List", "NO");\r
54         country_isp[32] = new Array("RS", "Stream", "CONF52");\r
55         country_isp[33] = new Array("RS", "Combellga", "CONF33");\r
56         country_isp[34] = new Array("RS", "Not List", "NO");    \r
57         country_isp[35] = new Array("SG", "SingNet Broadband", "CONF15");\r
58         country_isp[36] = new Array("SG", "Not List", "NO");    \r
59         country_isp[37] = new Array("TR", "Turk Telekom (PPPoE)", "CONF37");\r
60         country_isp[38] = new Array("TR", "Turk Telekom (PPPoA)", "CONF4");\r
61         country_isp[39] = new Array("TR", "Not List", "NO");\r
62         country_isp[40] = new Array("UA", "Other Users for Home (PPPoA default)", "CONF18");\r
63         country_isp[41] = new Array("UA", "Business One for Office (PPPoA)", "CONF19");\r
64         country_isp[42] = new Array("UA", "Not List", "NO");\r
65         country_isp[43] = new Array("GB", "All ISP", "CONF9");\r
66         country_isp[44] = new Array("NO", "Not List", "NO");\r
67 \r
68         with( document.forms[0] ) {\r
69             for(;i<45;i++) {\r
70                 if(input_country==country_isp[i][0]) {\r
71                     isp.options[ctr] = new Option(country_isp[i][1], country_isp[i][2]);\r
72                     ctr++;\r
73                 }\r
74             }\r
75             isp.length = ctr;\r
76 \r
77             if( input_country=="NO" ) \r
78                 hideInfo(0);\r
79             else if( ctr ==0 ) {\r
80                 isp.options[0] = new Option("Not List", "NO");\r
81                 hideInfo(0);\r
82             }\r
83             else\r
84                 hideInfo(1);\r
85         }\r
86 }\r
87 \r
88 function hideInfo(hide) {\r
89    var status = 'visible';\r
90 \r
91 //VPI/VCI \r
92    if ( hide == 1 )\r
93       status = 'hidden';\r
94 \r
95    if (document.getElementById)  // DOM3 = IE5, NS6\r
96       document.getElementById('vccInfo').style.visibility = status;\r
97    else {\r
98       if (document.layers) { // Netscape 4\r
99          with ( document.forms[0] ) {\r
100             if ( hide == 1 ) {\r
101                atmVpi.value = '';\r
102                atmVci.value = '';\r
103             } else {\r
104                atmVpi.value = vpi;\r
105                atmVci.value = vci;\r
106             }\r
107          }\r
108       } else  // IE 4\r
109          document.all.vccInfo.style.visibility = status;\r
110    }\r
111 }\r
112 \r
113 function hidewarn(hide) {\r
114    var status = 'visible';\r
115                                                                                                                                               \r
116    if ( hide == 1 )\r
117       status = 'hidden';\r
118                                                                                                                                               \r
119    if (document.getElementById)  // DOM3 = IE5, NS6\r
120       document.getElementById('warning').style.visibility = status;\r
121    else {\r
122       if (document.layers) { // Netscape 4\r
123       } else  // IE 4\r
124          document.all.warning.style.visibility = status;\r
125    }\r
126 }\r
127 \r
128 function ShowPVC(show) {\r
129    if ( show=='NO' )\r
130       hideInfo(0);\r
131    else\r
132       hideInfo(1);\r
133 }\r
134 \r
135 function frmLoad() {\r
136    with ( document.forms[0] ) {\r
137       atmVpi.value = vpi;\r
138       atmVci.value = vci;\r
139       //if ( auto == '1' ) { // 2006.2.8 Yau del\r
140       //   enblAutoScan.checked = true;\r
141       //   hideInfo(1);\r
142         // 2006.1.16 Yau add\r
143         //enblAsusDB.checked = true; //2006.2.8 Yau add\r
144         hideInfo(1);\r
145 \r
146         if ( prtcl == 'Not Applicable' )\r
147                 hidewarn(1);\r
148 \r
149         if(countrycode == 'AU')\r
150                 country.selectedIndex = 0;\r
151         else if(countrycode == 'CN')\r
152                 country.selectedIndex = 1;\r
153         else if(countrycode == 'ID')\r
154                 country.selectedIndex = 2;\r
155         else if(countrycode == 'IS')\r
156                 country.selectedIndex = 3;\r
157         else if(countrycode == 'IT')\r
158                 country.selectedIndex = 4;\r
159         else if(countrycode == 'NL')\r
160                 country.selectedIndex = 5;\r
161         else if(countrycode == 'NZ')\r
162                 country.selectedIndex = 6;\r
163         else if(countrycode == 'RU')\r
164                 country.selectedIndex = 7;\r
165         else if(countrycode == 'SG')\r
166                 country.selectedIndex = 8;\r
167         else if(countrycode == 'TR')\r
168                 country.selectedIndex = 9;\r
169         else if(countrycode == 'UA')\r
170                 country.selectedIndex = 10;\r
171         else if(countrycode == 'GB')\r
172                 country.selectedIndex = 11;\r
173         else\r
174                 country.selectedIndex = 12;\r
175 \r
176 \r
177         isp_list(countrycode);\r
178 \r
179       //} else {\r
180       //   enblAutoScan.checked = false;\r
181       //   hideInfo(0);\r
182       //}\r
183    }\r
184 }\r
185 \r
186 function btnNext() {\r
187    var loc = '';\r
188 \r
189    with ( document.forms[0] ) {\r
190       //if ( enblAutoScan.checked == true ) {\r
191       if ( country.value!='NO' && isp.value!='NO' ) {\r
192             //2006.1.16 Yau add\r
193             loc = 'ntwkprtcl.cgi?';\r
194             loc += 'enblAutoScan=0';\r
195             loc += '&isp=' + isp.value;\r
196       }\r
197       else {\r
198          if ( isNaN(parseInt(atmVpi.value)) == true ) {\r
199             msg = 'VPI "' + atmVpi.value + '" <%ejGetKW(vpci_JS_invalid)%>';\r
200             alert(msg);\r
201             return;\r
202          }\r
203          if ( isNaN(parseInt(atmVci.value)) == true ) {\r
204             msg = 'VCI "' + atmVci.value + '" <%ejGetKW(vpci_JS_invalid)%>';\r
205             alert(msg);\r
206             return;\r
207          }\r
208          vpi = parseInt(atmVpi.value);\r
209          if ( vpi < 0 || vpi > 255 ) {\r
210             msg = 'VPI "' + atmVpi.value + '" <%ejGetKW(vpci_JS_outrange)%> [0-255].';\r
211             alert(msg);\r
212             return;\r
213          }\r
214          vci = parseInt(atmVci.value);\r
215          if ( vci < 32 || vci > 65535 ) {\r
216             msg = 'VCI "' + atmVci.value + '" <%ejGetKW(vpci_JS_outrange)%> [32-65535].';\r
217             alert(msg);\r
218             return;\r
219          }\r
220          // if system is run out of PVCs then display error message\r
221          if ( mem == '1' ) {\r
222             loc = 'quicksetuperr.cgi?';\r
223             loc += 'enblAutoScan=0';\r
224          } \r
225          else {\r
226             loc = 'ntwkprtcl.cgi?';\r
227             loc += 'enblAutoScan=0';\r
228             loc += '&atmVpi=' + atmVpi.value;\r
229             loc += '&atmVci=' + atmVci.value;\r
230          }\r
231       }\r
232    }\r
233    loc += '&quickSetup=1&serviceId=0';\r
234 \r
235    var code = 'location.assign("' + loc + '")';\r
236 \r
237    eval(code);\r
238 }\r
239 \r
240 // done hiding -->\r
241 </script>\r
242    </head>\r
243    <body onLoad='frmLoad()'>\r
244       <blockquote>\r
245          <form>\r
246             <b><%ejGetKW(vpci_title)%></b>\r
247             <br><br>\r
248             <%ejGetKW(vpci_disc1)%><br><br>\r
249             <div id='warning'>\r
250                 <b>Noice:</b> There is a wan setting in your router. If you want to add a new one, please follow the web page steps to add.\r
251                 If you want to modify the previous setting, please go to "Advanced Setup" -> "WAN" page.\r
252             </div>\r
253             <br>\r
254             <b><%ejGetKW(vpci_atmcfg)%></b>\r
255             <br><br>\r
256             <%ejGetKW(vpci_disc2)%>\r
257             <br>\r
258             <div id='isp'>\r
259                 <table width="600" border="0" cellpadding="0" cellspacing="0">\r
260                 <td width="100"><%ejGetKW(vpci_contry)%></td>\r
261                 <td><select name="country" onChange="isp_list(this.value)">\r
262                         <option value="AU">AUSTRALIA</option>\r
263                         <option value="CN">CHINA</option>\r
264                         <option value="ID">INDONECIA</option>\r
265                         <option value="IS">ISRAEL</option>\r
266                         <option value="IT">ITALY</option>\r
267                         <option value="NL">NETHERLANDS</option>\r
268                         <option value="NZ">NEW ZEALAND</option>\r
269                         <option value="RS">RUSSIA</option>\r
270                         <option value="SG">SINGAPROE</option>\r
271                         <option value="TR">TURKEY</option>\r
272                         <option value="UA">UAE</option>\r
273                         <option value="GB">UK</option>\r
274                         <option value="NO">Not List</option>\r
275                     </select>\r
276                 </td>\r
277                 </tr>\r
278                 <tr>\r
279                 <td width="100">\r
280                 <script language="javascript">\r
281                 <!-- hide\r
282                         if(countrycode=='CN')\r
283                                 msg = 'PVC Setting:';\r
284                         else\r
285                                 msg = 'ISP:';\r
286                         document.writeln(msg);\r
287                 // done hiding -->\r
288                 </script>\r
289                 </td>\r
290                 <td><select name="isp" onChange="ShowPVC(this.value)">\r
291                     </select>\r
292                 </td>\r
293                 </tr>\r
294                 </table>\r
295             </div>\r
296             <br>\r
297 \r
298             <div id='vccInfo'>\r
299                <%ejGetKW(vpci_disc3)%>\r
300                <br>\r
301                <table border="0" cellpadding="4" cellspacing="0">\r
302                   <tr>\r
303                      <td>VPI: [0-255]</td>\r
304                      <td><input type='text' name='atmVpi' size='4'></td>\r
305                   </tr>\r
306                   <tr>\r
307                      <td>VCI: [32-65535]</td>\r
308                      <td><input type='text' name='atmVci' size='4'></td>\r
309                   </tr>\r
310                </table>\r
311 \r
312             </div>\r
313 \r
314             <br>\r
315             <center>\r
316                <input type='button' onClick='btnNext()' value='Next'>\r
317             </center>\r
318          </form>\r
319       </blockquote>\r
320    </body>\r
321 </html>\r