<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
function initTranslation() {
	var idArray = new Array("ippCfgTitle", "ippCfgTips","ippCfgPrinterName","ippCfgEnable", "ippCfgMakeAndModel", "buttonApplySave");
	setAllIdValue(idArray);
}
function btnApply() {
  var loc = 'ippcfg.cmd?action=savapply&ippEnabled=';

  with( document.forms[0] ) {
    if( ippEnabled.checked ) {

      loc += '1';
      if ( (ippMake.value.length == 0)  ||  (ippMake.value.length > 80) ) {
        alert(_("ippCfgAlert"));
        return;
      }
      loc += '&ippMake='+ippMake.value;
      
      if ( (ippName.value.length == 0) || (ippName.value.length > 80) ) {
        alert(_("ippCfgAlert"));
        return;
      }
      loc += '&ippName='+ippName.value;
    }
    else {
      loc += '0';
    }
  }
  loc += '&sessionKey=<%ejGetOther(sessionKey)%>';
  var code = 'location="' + loc + '"';
  eval(code);
}

function ippEnblChange() {
  if( document.forms[0].ippEnabled.checked )
    hideIppConfig(0);
  else
    hideIppConfig(1);
}

function hideIppConfig(hide) {
  var status = '';
                                                                                
  if(hide)
    status = 'none';
                                                                                
  if( document.getElementById )
    document.getElementById('ippConfig').style.display = status;
  else
    if(!document.layers)
      document.all.ippConfig.style.display = status;
}


function frmLoad() {
  var i = 0;
  var enable = "<%ejGetOther(sysInfo, ippEnabled)%>";

  with (document.forms[0]) {
    ippMake.value = "<%ejGetOther(sysInfo, ippMake)%>";
    ippName.value = "<%ejGetOther(sysInfo, ippName)%>";
    if (enable == "1" ) {
      ippEnabled.checked = true;
    } else {
      ippEnabled.checked = false;
    }
  }
  ippEnblChange();
  initTranslation();
}

// done hiding -->
    </script>
  </head>
  <body onLoad='frmLoad()'>
    <blockquote>
      <form>
        <b id='ippCfgTitle'>Print Server settings</b><br><br>
        <span id='ippCfgTips'>This page allows you to enable / disable printer support.</span>
        <br><br>
        <input type='checkbox' name='ippEnabled' onClick='ippEnblChange()'> <span id='ippCfgEnable'>Enable on-board print server.</span>
        <br><br>
        <div id="ippConfig">
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width='150' id='ippCfgPrinterName'>Printer name</td>
              <td><input type='text' name='ippName'></td>
            </tr>
            <tr>
              <td width='150' id='ippCfgMakeAndModel'>Make and model</td>
              <td><input type='text' name='ippMake'></td>
            </tr>
            <tr>
            <script language="Javascript">
            var ip_pname =  '<%ejGetOther(sysInfo, ippName)%>';
            var ip_pMake =  '<%ejGetOther(sysInfo, ippMake)%>';
            var ip_address = '<%ejGet(ethIpAddress)%>';
            if(ip_pMake == '')
            {
                document.write("<td colspan=2>http://"+ ip_address+":631/printers" + "</td>"); 	 
            }
            else
            {
                document.write("<td colspan=2>http://" + ip_address+":631/printers" + "/" + ip_pname+"</td>");
            }
            </script> 
            </tr>
          </table>
        </div>
        <br><br>
        <center>
        <input type="button" value="Apply/Save" onClick='btnApply()' id='buttonApplySave'>
        </center>
      </form>
    </blockquote>
  </body>
</html>
