<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("DevResources"); %>

<HTML>
<HEAD>
   <TITLE><%= c.string("ProductName") %></TITLE>

   <jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/XmlScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/ValidateIntegerScripts_inc.jsp") %>' flush="true" />
   <jsp:include page='<%= c.getPath("dev/MVNetworkAddrScripts_inc.jsp") %>' flush="true" />

   <LINK rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
   <jsp:include page='<%= c.getPath("dev/PageScripts_inc.jsp") %>' flush="true" />
   <SCRIPT language="JavaScript">
      function onInit()
      {
         var form=document.forms[0];

         // init for Locked By Intruder
         var xStr="<%= c.toScript(c.var("eDir$target$Locked_By_Intruder")) %>";
         if(getValueFromXml(xStr) == 'true')
         {
         	form._eDir$target$Locked_By_Intruder.checked=true;
            form._eDir$target$Locked_By_Intruder.disabled=false;
         }
         else
         {
            form._eDir$target$Locked_By_Intruder.checked=false;
            form._eDir$target$Locked_By_Intruder.disabled=true;
         }

         initMooMode("_Locked_By_Intruder", xStr);

         initWidgetFromXml(form._Login_Intruder_Attempts, "<%= c.toScript(c.var("eDir$target$Login_Intruder_Attempts")) %>");
         initWidgetFromXml(form._Login_Intruder_Reset_Time, "<%= c.toScript(c.var("eDir$target$Login_Intruder_Reset_Time")) %>");
         msecs = parseInt(form._Login_Intruder_Reset_Time.value);
         if( msecs > 0 )
         {
            when = new Date(msecs);
            dateStr = when.toLocaleString();
            //dateStrLoc = dateStr.indexOf(",");
            //dateStr = dateStr.substring(dateStrLoc+2, dateStr.length);
            form._Login_Intruder_Reset_Time.value=dateStr;
         }

         // init for Login Intruder Address
         initWidgetFromXml(form._Login_Intruder_Address, "<%= c.toScript(c.var("eDir$target$Login_Intruder_Address")) %>");
         //MVNetLoadList(form._Login_Intruder_Address, "<%= c.toScript(c.var("eDir$target$Login_Intruder_Address")) %>" );
      }

      function isPageValid()
      {
         var form=document.forms[0];
         form.eDir$target$Locked_By_Intruder.value = toXmlString((form._eDir$target$Locked_By_Intruder.checked?'true':'false')<% if (c.var("Task.moo").equals("true")) { %>, form._Locked_By_Intruder_mode.value<% } %>);
          if((form._eDir$target$Locked_By_Intruder.disabled == false) && (form._eDir$target$Locked_By_Intruder.checked == false))
         {
            form.eDir$target$Login_Intruder_Attempts.value = toXmlString((0)<% if (c.var("Task.moo").equals("true")) { %>, form._Locked_By_Intruder_mode.value<% } %>);
            form.eDir$target$Login_Intruder_Reset_Time.value = toXmlString((0)<% if (c.var("Task.moo").equals("true")) { %>, form._Locked_By_Intruder_mode.value<% } %>);
         }
 
         return true;
      }
   </SCRIPT>
</HEAD>

<BODY onLoad="onInit();">
<FORM name="form" method=post action="webacc">
   <jsp:include page='<%= c.getPath("dev/Messagebar_inc.jsp") %>' flush="true" />
	<jsp:include page='<%= c.getPath("dev/BookVars_inc.jsp") %>' flush="true" />

   <!---- UI Created by UiHandlers ---->

   <TABLE class="mediumtext" border='0' bgcolor='#FFFFFF' cellpadding='0' cellspacing='0'>
      <!-- Locked By Intruder -->
      <TR>
         <TD align=left>
            <INPUT name='eDir$target$Locked_By_Intruder' type=hidden>
            <INPUT name='eDir$target$Login_Intruder_Attempts' type=hidden>
            <INPUT name='eDir$target$Login_Intruder_Reset_Time' type=hidden>
 
            <INPUT name='_eDir$target$Locked_By_Intruder' type=checkbox <% if (c.var("eDirRights$target$Locked_By_Intruder").equals("R") || c.var("eDirRights$target$Locked_By_Intruder").equals("NONE")) { %>DISABLED<% } %> >
            <%= c.var("Locked_By_IntruderDisplayName") %>
         </TD>
         <TD>
            <% if (c.var("Task.moo").equals("true")) {    c.set("ModeSelector.name", "_Locked_By_Intruder_mode"); %>&nbsp;&nbsp;<jsp:include page='<%= c.getPath("dev/ModeSelector_inc.jsp") %>' flush="true" /><% } %>
         </TD>
      </TR>
      <TR><TD height=8></TD></TR>

      <!-- Login Intruder Attempts -->
      <TR>
         <TD align=left nowrap>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= c.var("Login_Intruder_AttemptsDisplayName") %>:&nbsp;&nbsp;
         </TD>
         <TD>
            <INPUT type=text name=_Login_Intruder_Attempts size=<%= c.string("UI.numberboxSize") %> style="border:0;width:<%= c.string("UI.numberboxPixel") %>" READONLY>
         </TD>
         <TD valign=top></TD>
      </TR>
      <TR><TD height=8></TD></TR>

      <!-- Login Intruder Reset Time -->
      <TR>
         <TD align=left nowrap>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= c.var("Login_Intruder_Reset_TimeDisplayName") %>:&nbsp;&nbsp;
         </TD>
         <TD>
            <INPUT type=text name=_Login_Intruder_Reset_Time size=<%= c.string("UI.textboxSize") %> style="border:0;width:<%= c.string("UI.textboxPixel") %>" READONLY>
         </TD>
         <TD valign=top></TD>
      </TR>
      <TR><TD height=8></TD></TR>

      <!-- Login Intruder Address -->
      <TR>
         <TD align=left nowrap>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= c.var("Login_Intruder_AddressDisplayName") %>:&nbsp;&nbsp;
         </TD>
         <TD>
            <INPUT type=text name=_Login_Intruder_Address size=<%= c.string("UI.textboxSize") %> style="border:0;width:<%= c.string("UI.textboxPixel") %>" READONLY>
         </TD>
         <TD valign=top></TD>
      </TR>
   <TR><TD height=8></TD></TR>
   </TABLE>

</FORM>
</BODY>
</HTML>
