3 <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
4 <link rel=stylesheet href='stylemain.css' type='text/css'>
5 <link rel=stylesheet href='colors.css' type='text/css'>
6 <script language="javascript">
9 function displayDiag(diagPrev, diagCurr, diagNext) {
11 // diagCurr should have format "protocol/vpi/vci/conId"
12 var params = diagCurr.split('/');
14 switch ( params[0] ) {
16 loc = 'diagpppoe.cgi';
19 loc = 'diagpppoa.cgi';
37 loc += '?diagPrev=' + diagPrev + '&diagCurr=' + diagCurr + '&diagNext=' + diagNext;
39 var code = 'location="' + loc + '"';
45 var interfaceInfo = '<%ejGetOther(diagInfo, diag)%>';
46 var interfaces = interfaceInfo.split('|');
47 var diagCurr = '<%ejGetOther(diagInfo, diagCurr)%>';
51 if ( interfaceInfo != '' ) {
52 if ( diagCurr == '' ) {
53 // if there is no current WAN info then
54 // display first available WAN connection
55 diagCurr = interfaces[0];
56 // assign next position info
57 if ( interfaces.length > 1 )
58 diagNext = interfaces[1];
60 // diagCurr and interfaces[i] should have format "protocol/vpi/vci/conId"
61 var currParams = diagCurr.split('/');
62 // find the current position
63 for ( i = 0; i < interfaces.length; i++ ) {
64 var params = interfaces[i].split('/');
65 if ( currParams[0] == params[0] &&
66 currParams[1] == params[1] &&
67 currParams[2] == params[2] &&
68 currParams[3] == params[3] )
71 // assign previous position info
73 diagPrev = interfaces[i - 1];
74 // assign current position info
75 diagCurr = interfaces[i];
76 // assign next position info
77 if ( i + 1 < interfaces.length )
78 diagNext = interfaces[i + 1];
80 // display current position info
81 displayDiag(diagPrev, diagCurr, diagNext);
83 // if there is no wan connection then
84 // display lan diagnostics page
85 eval('location="diaglan.html"');
92 <body onLoad='frmLoad()'>