<html>
   <head>
      <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
      <link rel="stylesheet" href='stylemain.css' type='text/css'>
      <link rel="stylesheet" href='colors.css' type='text/css'>
      <script language="javascript" src="util.js"></script>
      <script type="text/javascript" src="lang/b28n.js"></script>
      <script language="javascript"><%ejGetOther(forbidHTMLCode)%></script>
      <script language="javascript">
<!-- hide

setLanguage('<%ejGet(webUILanguage)%>');

function initTranslation() {
	var idArray = new Array("diag8021agTitle", "diag8021agTips", "diag8021agMD", "diag8021agDestMac", "diag8021agVlan", 
      "diag8021agType", "diag8021agTips1", "diag8021agLBM", "diag8021agMEPs", "diag8021agLTM", 
      "diag8021agbtnMD", "diag8021agbtnLB", "diag8021agbtnLT");
	setAllIdValue(idArray);
}

function btnApply(testname) {
   var loc = 'diag8021ag.cgi?test8021ag=' + testname;

   with ( document.forms[0] ) {

      idx = mdLevel.selectedIndex;
      val = mdLevel.options[idx].value;
      loc += '&mdLevel8021ag=' + val;

      if( testname != 'mdl' ) {
         if (isValidMacAddress(destMac.value) == false ) {
            alert(_("diag8021agAlert") + destMac.value + _("diag8021agAlert1"));
            return;
         }
         loc += '&macAddr8021ag=' + destMac.value;

         vlanid = parseInt(vlanId.value);
         if ( vlanid < 0 || vlanid > 4095 ) {
            alert(_("diag8021agAlert2") + vlanid + _("diag8021agAlert3"));
            return;
         }
         loc += '&vlanId8021ag=' + vlanid;
      }
   }

   loc += '&sessionKey=<%ejGetOther(sessionKey)%>';
   var code = 'location="' + loc + '"';
   eval(code);
}
      
function frmLoad() {
   var mdlvl = <%ejGet(mdLevel8021ag)%>;
   setSelect(document.forms[0].mdLevel, mdlvl);
   initTranslation();
}

// done hiding -->
   </script>
   </head>
   <body onLoad='frmLoad()'>
      <blockquote>
         <form>
            <b id="diag8021agTitle">802.1ag Connectivity Fault Management</b><br>
            <P id="diag8021agTips">This diagnostic is only used for VDSL PTM mode.</P> <br>

            <table border="0" cellpadding="0" cellspacing="0">
            <tr> 
              <td width="200" id="diag8021agMD">Maintenance Domain (MD) Level: </td>
              <td><select size="1" name="mdLevel">
                  <option value="0"> 0 
                  <option value="1"> 1 
                  <option value="2" selected> 2 
                  <option value="3"> 3 
                  <option value="4"> 4 
                  <option value="5"> 5 
                  <option value="6"> 6 
                  <option value="7"> 7
                  </option>
                </select> </td>
            </tr>
            <tr>
               <td width="200" id="diag8021agDestMac">Destination MAC Address:</td>
               <td><input type='text' name="destMac" value="<%ejGet(macAddr8021ag)%>"></td>
            </tr>
            <tr>
               <td width="200" id="diag8021agVlan">802.1Q VLAN ID: [0-4095]</td>
               <td><input type="text" size="4" name="vlanId" value="<%ejGet(vlanId8021ag)%>"></td>
            </tr>
            </table> <br>
               <TABLE border="1" cellspacing="0" cellpadding="3">
                  <TBODY>
                     <TR>
                        <TD class='hd' width="190" id="diag8021agType">VDSL Traffic Type:</TD>
                        <TD width="50"><%ejGetOther(trafficType, 0)%>&nbsp;</TD>
                     </TR>
                     <TR>
                  </TBODY></TABLE>
            <P><B id="diag8021agTips1">Test the connection to another Maintenance End Point (MEP)</B></P>
               <TABLE border="1" cellspacing="0" cellpadding="3">
                  <TBODY>
                     <TR>
                        <TD class='hd' width="190" id="diag8021agLBM">Loopback Message (LBM):</TD>
                        <TD width="50"><B><%ejGetOther(diag8021ag, lbresult)%></B>&nbsp;</TD>
                     </TR>
                     <TR>
                  </TBODY></TABLE>
            <P><B id="diag8021agMEPs">Find Maintenance End Points (MEPs)</B></P>
               <TABLE border="1" cellspacing="0" cellpadding="3">
                  <TBODY>
                     <TR>
                        <TD class='hd' width="190" id="diag8021agLTM">Linktrace Message (LTM):</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr1)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr2)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr3)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr4)%>&nbsp;</TD>
                     </TR>
                     <TR>
                        <TD class='hd' width="190"></TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr5)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr6)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr7)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr8)%>&nbsp;</TD>
                     </TR>
                     <TR>
                        <TD class='hd' width="190"></TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr9)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr10)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr11)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr12)%>&nbsp;</TD>
                     </TR>
                     <TR>
                        <TD class='hd' width="190"></TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr13)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr14)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr15)%>&nbsp;</TD>
                        <TD width="120"><%ejGetOther(diag8021ag, ltaddr16)%>&nbsp;</TD>
                     </TR>
                  </TBODY></TABLE>
            <CENTER>
            <br><br> <br>
                  <input type='button' name="mdl" onClick='btnApply(this.name)' value='Set MD Level' id="diag8021agbtnMD">
                  <input type='button' name="lbm" onClick='btnApply(this.name)' value='Send Loopback' id="diag8021agbtnLB">
                  <input type='button' name="ltm" onClick='btnApply(this.name)' value='Send Linktrace' id="diag8021agbtnLT">
            </CENTER>
         </form>
      </blockquote>
   </body>
</html>

