<html>
   <head>
      <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
      <link rel="stylesheet" href='stylemain.css' type='text/css'>
          <script language="javascript" src="portName.js"></script>
         <link rel="stylesheet" href='colors.css' type='text/css'>
   </head>
   <body>
      <blockquote>
         <form>
            <b><%ejGetOther(diagInfo, serviceName)%> Diagnostics</b><br>
            <P>Your modem is capable of testing your WAN connection. The individual tests are 
               listed below. If a test displays a fail status, click &quot;Test&quot; 
               at the bottom of this page to make sure the fail status is 
               consistent. If the test continues to fail, click &quot;Help&quot; and follow 
               the troubleshooting procedures.
            </P>
            <P><B>Test the connection to your local network</B>
               <TABLE border="1" cellspacing="0" cellpadding="3">
                  <TBODY>
 <script language="javascript">
//    var DeviceProject = "<%ejGetOther(sysInfo,DeviceProject)%>";
    var DeviceProject = "2";
<!-- hide                     
    <%ejGet(enetDiag)%>                                                      

   if ('<%ejGet(enblUsb)%>' == '1') {
      document.writeln("<TR><TD class='hd'>Test your USB Connection: </TD>");
      document.writeln("<TD><B><%ejGetOther(diagnostic, 13)%></B>&nbsp;</TD>");
      document.writeln("<TD><A href='hlpusbconn.html'>Help</A></TD> </TR>");
   }

   if ('<%ejGet(enblWireless)%>' == '1') {
      var Wireless_info = "<%ejGetOther(diagnostic, 17)%>";
      if(DeviceProject == '2')
      {
         var ws = Wireless_info.split(" ");
         document.writeln("<TR><TD class='hd'>Test your Wi-Fi Connection (2.4GHz): </TD>");
         if(ws[0]=="1")
            document.writeln("<TD><B><font color='green'>PASS</font></B>&nbsp;</TD>");
         else
            document.writeln("<TD><B><font color='#ff9900'>DISABLED</font></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpwlconn.html'>Help</A></TD></TR>");
         document.writeln("<TR><TD class='hd'>Test your Wi-Fi Connection (5GHz): </TD>");
         if(ws[1]=="1")
            document.writeln("<TD><B><font color='green'>PASS</font></B>&nbsp;</TD>");
         else
            document.writeln("<TD><B><font color='#ff9900'>DISABLED</font></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpwlconn.html'>Help</A></TD></TR>");
      }
      else
      {
         document.writeln("<TR><TD class='hd'>Test your Wi-Fi Connection: </TD>");
         document.writeln("<TD><B>" + Wireless_info + "</B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpwlconn.html'>Help</A></TD></TR>");
      }
   }

   if(DeviceProject == '2'){
      var diagType = '<%ejGet(diagType)%>';

      document.writeln("<TR><TD class='hd' width='250'>Test xDSL Synchronization:</TD>");
      document.writeln("<TD width='50'><B><%ejGetOther(diagnostic, 2)%></B>&nbsp;</TD>");
      document.writeln("<TD><A href='hlpadslsync.html'>Help</A></TD></TR>");
   }


   document.writeln("               </TBODY></TABLE>");

   if ('<%ejGet(enblDsl)%>' == '1' && DeviceProject != '2') {
      document.writeln("            <P><b>Test the connection to your DSL service provider</b>");
      document.writeln("               <TABLE border='1' cellspacing='0' cellpadding='3'>");
      document.writeln("                  <TBODY>");

      var diagType = '<%ejGet(diagType)%>';

      document.writeln("<TR><TD class='hd' width='250'>Test xDSL Synchronization:</TD>");
      document.writeln("<TD width='50'><B><%ejGetOther(diagnostic, 2)%></B>&nbsp;</TD>");
      document.writeln("<TD><A href='hlpadslsync.html'>Help</A></TD></TR>");

      if (diagType == 'f4') {
         document.writeln("<TR><TD class='hd'>Test ATM OAM F4 segment ping: </TD>");
         document.writeln("<TD><B><%ejGetOther(diagnostic, 15)%></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpatmseg.html'>Help</A></TD></TR>");
         document.writeln("<TR><TD class='hd'>Test ATM OAM F4 end-to-end ping: </TD>");
         document.writeln("<TD><B><%ejGetOther(diagnostic, 16)%></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpatmetoe.html'>Help</A></TD></TR>");
      }
      else {
         document.writeln("<TR><TD class='hd'>Test ATM OAM F5 segment ping: </TD>");
         document.writeln("<TD><B><%ejGetOther(diagnostic, 3)%></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpatmseg.html'>Help</A></TD></TR>");
         document.writeln("<TR><TD class='hd'>Test ATM OAM F5 end-to-end ping: </TD>");
         document.writeln("<TD><B><%ejGetOther(diagnostic, 4)%></B>&nbsp;</TD>");
         document.writeln("<TD><A href='hlpatmetoe.html'>Help</A></TD></TR>");
      }

      document.writeln("               </TBODY></TABLE>");
   }
// done hiding -->
</script>
            <CENTER>
            <br><br>
<script language="javascript">
<!-- hide
var diagPrev = '<%ejGetOther(diagInfo, diagPrev)%>';
var diagNext = '<%ejGetOther(diagInfo, diagNext)%>';
var sessionKey='<%ejGetOther(sessionKey)%>';
var DeviceProject = "<%ejGetOther(sysInfo,DeviceProject)%>";
var GO_PREV = 0;
var GO_NEXT = 1;

function btnGo(where) {
   var loc = 'diag.cgi?diagCurr=';
    
   if ( where == GO_PREV )
      loc += diagPrev;
   else
      loc += diagNext;
      
   loc += '&sessionKey=' + sessionKey;
   var code = 'location="' + loc + '"';
   eval(code);
}

function btnTest(type) {
   var loc = 'diag.cgi?';

   loc += 'diagType=' + type;

   loc += '&sessionKey=' + sessionKey;
   var code = 'location="' + loc + '"';
   eval(code);
}

if ( diagPrev != '' )
   document.writeln("                  <input type='button' onClick='btnGo(GO_PREV)' value='Previous Connection'>");
if ( diagNext != '' )
   document.writeln("                  <input type='button' onClick='btnGo(GO_NEXT)' value='Next Connection'>");

document.writeln("            <br>");
document.writeln("                  <input type='button' onClick=\"btnTest('f5')\" value='Test'>");
if ('<%ejGet(enblDsl)%>' == '1' && DeviceProject != '2')
   document.writeln("                  <input type='button' onClick=\"btnTest('f4')\" value='Test With OAM F4'>");
// done hiding -->
</script>
            </CENTER>
         </form>
      </blockquote>
   </body>
</html>
