<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"><%ejGetOther(forbidHTMLCode)%></script>
<script language="javascript">
<!-- hide

function standbyEnblChange() {
  if( document.forms[0].chkStandbyEnable.checked )
    hideStandbyConfig(0);
  else
    hideStandbyConfig(1);
}

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

function frmLoad() {
  var standby = '';
  standby = '<%ejGetOther(standby)%>';
  var enable = parseInt("<%ejGet(pmStandbyEnable)%>");

  with (document.forms[0]) {
    if (enable == 1 ) {
      chkStandbyEnable.checked = true;
    } else {
      chkStandbyEnable.checked = false;
    }
  }

  document.forms[0].selectStandbyHour.selectedIndex = parseInt('<%ejGet(pmStandbyHour)%>');
  document.forms[0].selectStandbyMinutes.selectedIndex = parseInt('<%ejGet(pmStandbyMinutes)%>');
  document.forms[0].selectWakeupHour.selectedIndex = parseInt('<%ejGet(pmWakeupHour)%>');
  document.forms[0].selectWakeupMinutes.selectedIndex = parseInt('<%ejGet(pmWakeupMinutes)%>');

  standbyEnblChange();
}

function btnApply() {
   var loc = 'standby.cmd?';

   with ( document.forms[0] ) {
      if ( chkStandbyEnable.checked == true )
        loc += '&PmStandbyEnable=1';
      else
        loc += '&PmStandbyEnable=0';

      loc += '&PmStandbyHour='    + selectStandbyHour.selectedIndex;
      loc += '&PmStandbyMinutes=' + selectStandbyMinutes.selectedIndex;
      loc += '&PmWakeupHour='     + selectWakeupHour.selectedIndex;
      loc += '&PmWakeupMinutes='  + selectWakeupMinutes.selectedIndex;
   }

   loc += '&sessionKey=<%ejGetOther(sessionKey)%>';
   var code = 'location="' + loc + '"';
   eval(code);
}

function btnDemo() {
   var loc = 'demostby.cmd?';

   loc += '&sessionKey=<%ejGetOther(sessionKey)%>';
   var code = 'location="' + loc + '"';
   eval(code);
}

// done hiding -->
</script>
</head>

<body onLoad='frmLoad()'>
    <blockquote>
      <form>
        <b>Standby Configuration</b><br>
        <br>
        This page allows to put the system in standby during a configured period of time. Enable this feature, select a Standby Time and Wake Up Time, and press the apply button to turn it on. 
        <br><br>
        <input type='checkbox' name='chkStandbyEnable' onClick='standbyEnblChange()'> Enable Standby
        (Currently:&nbsp;
          <script language="javascript">
          <!-- hide 
          {
            PmStandbyStatusString = '<%ejGet(pmStandbyStatusString)%>';
            document.writeln(PmStandbyStatusString);
          }
          // done hiding -->
          </script>
        )
        <br><br>
        <div id="standbyConfig">
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
               <td width='100'>Standby Time</td>
               <td width='50'>
                  <select name='selectStandbyHour' id='selectStandbyHour'>
                     <option value="0">0</option>
                     <option value="1">1</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="6">6</option>
                     <option value="7">7</option>
                     <option value="8">8</option>
                     <option value="9">9</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                   </select>:
                </td>
               <td>
                  <select name='selectStandbyMinutes' id='selectStandbyMinutes'>
                     <option value="0">00</option>
                     <option value="1">01</option>
                     <option value="2">02</option>
                     <option value="3">03</option>
                     <option value="4">04</option>
                     <option value="5">05</option>
                     <option value="6">06</option>
                     <option value="7">07</option>
                     <option value="8">08</option>
                     <option value="9">09</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                     <option value="24">24</option>
                     <option value="25">25</option>
                     <option value="26">26</option>
                     <option value="27">27</option>
                     <option value="28">28</option>
                     <option value="29">29</option>
                     <option value="30">30</option>
                     <option value="31">31</option>
                     <option value="32">32</option>
                     <option value="33">33</option>
                     <option value="34">34</option>
                     <option value="35">35</option>
                     <option value="36">36</option>
                     <option value="37">37</option>
                     <option value="38">38</option>
                     <option value="39">39</option>
                     <option value="40">40</option>
                     <option value="41">41</option>
                     <option value="42">42</option>
                     <option value="43">43</option>
                     <option value="44">44</option>
                     <option value="45">45</option>
                     <option value="46">46</option>
                     <option value="47">47</option>
                     <option value="48">48</option>
                     <option value="49">49</option>
                     <option value="50">50</option>
                     <option value="51">51</option>
                     <option value="52">52</option>
                     <option value="53">53</option>
                     <option value="54">54</option>
                     <option value="55">55</option>
                     <option value="56">56</option>
                     <option value="57">57</option>
                     <option value="58">58</option>
                     <option value="59">59</option>
                   </select>
                </td>
            </tr>
            <tr>
               <td width='100'>Wake Up Time</td>
               <td width='50'>
                  <select name='selectWakeupHour' id='selectWakeupHour'>
                     <option value="0">0</option>
                     <option value="1">1</option>
                     <option value="2">2</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="6">6</option>
                     <option value="7">7</option>
                     <option value="8">8</option>
                     <option value="9">9</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                   </select>:
                </td>
               <td>
                  <select name='selectWakeupMinutes' id='selectWakeupMinutes'>
                     <option value="0">00</option>
                     <option value="1">01</option>
                     <option value="2">02</option>
                     <option value="3">03</option>
                     <option value="4">04</option>
                     <option value="5">05</option>
                     <option value="6">06</option>
                     <option value="7">07</option>
                     <option value="8">08</option>
                     <option value="9">09</option>
                     <option value="10">10</option>
                     <option value="11">11</option>
                     <option value="12">12</option>
                     <option value="13">13</option>
                     <option value="14">14</option>
                     <option value="15">15</option>
                     <option value="16">16</option>
                     <option value="17">17</option>
                     <option value="18">18</option>
                     <option value="19">19</option>
                     <option value="20">20</option>
                     <option value="21">21</option>
                     <option value="22">22</option>
                     <option value="23">23</option>
                     <option value="24">24</option>
                     <option value="25">25</option>
                     <option value="26">26</option>
                     <option value="27">27</option>
                     <option value="28">28</option>
                     <option value="29">29</option>
                     <option value="30">30</option>
                     <option value="31">31</option>
                     <option value="32">32</option>
                     <option value="33">33</option>
                     <option value="34">34</option>
                     <option value="35">35</option>
                     <option value="36">36</option>
                     <option value="37">37</option>
                     <option value="38">38</option>
                     <option value="39">39</option>
                     <option value="40">40</option>
                     <option value="41">41</option>
                     <option value="42">42</option>
                     <option value="43">43</option>
                     <option value="44">44</option>
                     <option value="45">45</option>
                     <option value="46">46</option>
                     <option value="47">47</option>
                     <option value="48">48</option>
                     <option value="49">49</option>
                     <option value="50">50</option>
                     <option value="51">51</option>
                     <option value="52">52</option>
                     <option value="53">53</option>
                     <option value="54">54</option>
                     <option value="55">55</option>
                     <option value="56">56</option>
                     <option value="57">57</option>
                     <option value="58">58</option>
                     <option value="59">59</option>
                   </select>
                </td>
            </tr>
          </table>
        </div>
        <br><br>
        <center>
        <input type="button" value="Apply/Save" onClick='btnApply()'>&nbsp;&nbsp;
        <input type="button" value="30 Seconds Demo" onClick='btnDemo()'>
        </center>
      </form>
    </blockquote>
</body>
</html>


