<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 language="javascript">
<!-- hide


var seltState = '<%ejGetSelt(seltState)%>';
var maxSeltT;
var maxSeltF;
var maxSeltPsd;
var CID;
var line;

function frmLoad() {
  document.seltTestForm.action = 'seltcfgc.cmd?';
  with ( document.forms[0] ) {
      maxSeltT.value = '<%ejGetSelt(seltMaxT)%>';
      maxSeltF.value = '<%ejGetSelt(seltMaxF)%>';
      maxSeltPsd.value = '<%ejGetSelt(seltMaxPsd)%>';
      CID.value = '<%ejGetSelt(seltCid)%>';
      line.value = '<%ejGetSelt(seltLine)%>';
  }
}

function applyClick() {
  var idx;

  with ( document.forms[0] ) {
    if ( CID.value == '' ) {
      alert('CID should not be empty.');
      return;
    }
    if ( CID.value.length != 10) {
      alert('CID must be 10 characters long.');
      return;
    }
    if ( (maxSeltT.value < 1) || (maxSeltT.value > 127)) {
      alert('Measurement duration must be from 1 to 127 seconds.');
      return;
    }
    var psd = (parseFloat(maxSeltPsd.value) * 10)/10;
    if ((psd > -60.0) || (psd < -140.0)) {
      alert('PSD must be from -60.0 to -140.0.');
      return;
    }
  }
  document.seltTestForm.submit();
}
// done hiding -->
</script>
  </head>
  <body onLoad='frmLoad()'>
    <blockquote>
      <form name="seltTestForm" method="post"'>
        <b>Invoke SELT Test<br>
        </b>
        <br>
        Enter parameters below to invoke SELT Test.  Only one test can
        be run at one time.<br>
        <br>
        <br>Current SELT State is <b><%ejGetSelt(seltState)%></b><br>
        <table border="0" cellpadding="0" cellspacing="0">
               <tr>
                  <td width="240">Measurement Duration in seconds (1..127):</td>
                  <td><input type='text' name='maxSeltT' size="30" maxlength="8"></td>
               </tr>
               <tr>
                  <td width="240">Max SELT PSD (-140.0..-60.0):</td>
                  <td><input type='text' name='maxSeltPsd' size="30" maxlength="7"></td>
               </tr>
               <tr>
                  <td width="240">Max SELT F:</td>
                  <td><input type='text' name='maxSeltF' size="30" maxlength="10"></td>
               </tr>
               <tr>
                  <td>CID:</td>
                  <td><input type='text' name='CID' size="20" maxlength="10"></td>
               </tr>
               <tr>
                  <td width="240">Line Number to perform test on (0 or 1):</td>
                  <td><input type='text' name='line' size="30" maxlength="1"></td>
               </tr>
          </table>
        <br>
        <br>
        <br>
        <center>
          <input type='button' value='Invoke' onclick="applyClick()">
        </center>
      </form>
    </blockquote>
  </body>
</html>
