<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>

<html:html>
<html:base />
<head>
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
</head>

<BODY  onkeydown="hotKeys(event);" scroll=auto>

<html:form name="HrmGenEligRuleQueryForm" action="/HrmGenEligRuleQueryBaseAction" type="wenrgise.hrms.webtier.form.HrmGenEligRuleQueryForm">
<bean:define id="ParentForm" name="HrmGenEligRuleQueryForm" toScope="request" />

<jsp:include page="GenMenu.jsp" flush="true" />
<bean:define id="left" name="ParentForm" property="positionRequested" />
<bean:define id="right" name="ParentForm" property="totalCount" />
<table cellSpacing=0 bgColor=#bdd0ef>
<tr height=27>
  <td colSpan=11></td>
</tr>
  <TR > 
     <TD ><enrgise:img name="ParentForm" property="butQuery" onmouseover='this.src="../includes/images/query_act.jpg"' onmouseout='this.src="../includes/images/query.jpg"' alt="Query (Ctrl+Q)" src="../includes/images/query.jpg" onclick="doBaseQueryMode()" /><img  property="butInsert" src="../includes/images/insert_dis.jpg" /></TD>
    <TD width="2%"></TD>
    <TD ><img property="butExecute"  alt="Execute (Ctrl+U)" src="../includes/images/execute_dis.jpg"  /><enrgise:img name="ParentForm" property="butSave" onmouseover='this.src="../includes/images/save_act.jpg"' onmouseout='this.src="../includes/images/save.jpg"' alt="Save (Ctrl+S)" src="../includes/images/save.jpg" onclick="doBaseSave()" />
    <enrgise:img name="ParentForm" property="butDelete" alt="Delete (Ctrl+D)" src="../includes/images/delete_dis.jpg"  /><img  property="butRefresh" onmouseover='this.src="../includes/images/refresh_act.jpg"' onmouseout='this.src="../includes/images/refresh.jpg"' alt="Refresh (Ctrl+R)"  src="../includes/images/refresh.jpg" onclick="doBaseRefresh()" />
    <enrgise:img name="ParentForm" property="butPrint" onmouseover='this.src="../includes/images/print_act.jpg"' onmouseout='this.src="../includes/images/print.jpg"' alt="Print (Ctrl+P)"  src="../includes/images/print.jpg" /></TD>
    <TD width="2%" bgColor=#bdd0ef></TD>
  <TD><enrgise:img name="ParentForm" property="butExit" onmouseover='this.src="../includes/images/exit_act.jpg"' onmouseout='this.src="../includes/images/exit.jpg"' alt="Exit (Alt+X)"  src="../includes/images/exit.jpg"   onclick="doBaseExit()" />
    <enrgise:img name="ParentForm" property="butHelp" onmouseover='this.src="../includes/images/help_act.jpg"' onmouseout='this.src="../includes/images/help.jpg"' alt="Help (Ctrl+?)" src="../includes/images/help.jpg" onclick="doBaseHelp()" /></TD>
    <TD width="50%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butPrevHeader" src='../includes/images/butn_prev.jpg' onmouseover='this.src="../includes/images/butn_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_prev.jpg"' alt="Butn_prev (Ctrl+<)" onclick="doBasePrevHeader()" /></td>
    <td class=dtlNavText><bean:write  name="left" /> of 
    <bean:write name="right" /></td>
    <td align=right><enrgise:img name="ParentForm" property="butNextHeader" src="../includes/images/butn_next.jpg" onmouseover='this.src="../includes/images/butn_next_act.jpg"' onmouseout='this.src="../includes/images/butn_next.jpg"' alt="Butn_next (Ctrl+>)" onclick="doBaseNextHeader()" /></td>
    <td align=right><html:text property="newPositionRequested" size="1" onkeydown="isInteger(event)" title=" " alt="N" /></td>
    <td ><enrgise:img name="ParentForm" property="butJumpHeader" alt="Go (Ctrl+G)" src="../includes/images/go.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpHeader()" /></td>
    <td > </td>
</TR>
</TABLE>
<table>
<tr>
  <td colspan="11" class="userText"></td>
</tr>
<enrgise:checkSession/>
</TABLE>


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmGenEligRuleQuery.mainHeader" /></TD>
    </TR>
</TABLE>
<!--//  Display Errors -->
<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>
<!--//  Display Errors --> 

<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!-- Header Starts -->
            
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmGenEligRuleQuery.docType" /></td>
                <td><enrgise:select property="docType" alt="docType" styleClass="required" disabledClass="locked" name="HrmGenEligRuleQueryForm" onchange="doBaseValidate()" >
                      <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                      <enrgise:option value="V" ><bean:message key="hrm.HrmGenEligRuleQuery.leave" /></enrgise:option>
                      <enrgise:option value="L" ><bean:message key="hrm.HrmGenEligRuleQuery.loan" /></enrgise:option>
                      <enrgise:option value="A" ><bean:message key="hrm.HrmGenEligRuleQuery.advances" /></enrgise:option>
                      <enrgise:option value="C" ><bean:message key="hrm.HrmGenEligRuleQuery.claims" /></enrgise:option>
                      <!--<enrgise:option value="E" ><bean:message key="hrm.HrmGenEligRuleQuery.earningDeduction" /></enrgise:option>
                      <enrgise:option value="S" ><bean:message key="hrm.HrmGenEligRuleQuery.separation" /></enrgise:option>-->
                      </enrgise:select></td> 
            </tr>
            <tr height="10">
                <td colspan="6"></td> 
            </tr>
      </table>
  
       
  <table cellspacing=0 cellpadding=0 border=0>
         <!-- Detail Information Row starts -->
 	 <TR>
       <TD colspan=6>
        <!--  Details Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
          <tr>
                <td bgcolor="#4682B4" width="10"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                <td bgcolor="#4682B4" nowrap class=actTabText >Eligibility<img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>                              
                <TD width="100%" background="../includes/images/line_t.gif">&nbsp;</TD>
                <TD background="../includes/images/line_t.gif"><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
          </tr>                  
    
            <TR >
 <!-- Detail table Container starts -->
              <TD colspan=11>
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                   <TR>
                     <TD >
                       <DIV id=divDtlTable style="height:280px" >
  			<!-- Detail table starts -->
                        <TABLE cellSpacing=0 cellPadding=0>
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><input type="checkbox" name="selectAll"  onclick="toggleCheckBox('checked')" ></TD>
                              <TD class=tableHeader width="20%"><bean:message key="hrm.HrmGenEligRuleQuery.docCode" /></td>
                              <TD class=tableHeader width="78%"><bean:message  key="hrm.HrmGenEligRuleQuery.eligSql" /></td>
                                 </tr>
                       
                        <logic:iterate id="oDetailBean" name="HrmGenEligRuleQueryForm" property="arylstGenEligRuleQuery" type="wenrgise.hrms.bean.HrmGenEligRuleQueryDtlBean" indexId="idx" >
                                <logic:notEqual name="oDetailBean" property="status" value="D" >
                                <tr>
                                 <td width="1%"><html:hidden property="status"  name="oDetailBean" /><html:hidden property="detailId"  name="oDetailBean"  /><html:hidden property="itemChecked" name="oDetailBean" /><html:checkbox property="checked"  name="HrmGenEligRuleQueryForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" onchange="doChangeDetail(this.alt);" /></td>
                                  <TD class=tableText ><html:text property="txtdocCode" name="oDetailBean" maxlength="15" styleClass="required" readonly="true" style="width:100%" /></td>   
                                  <TD class=tableText ><html:text property="txteligSql" name="oDetailBean" styleClass="required" readonly="true" style="width:100%"  /></td>   
                                </tr>
                               </logic:notEqual>
                                <logic:equal name="oDetailBean" property="status" value="D"  >
                                <tr>
                                  <td width="1%"><html:hidden property="status"  name="oDetailBean" /><html:hidden property="detailId"  name="oDetailBean"  /><html:hidden property="itemChecked" name="oDetailBean" /><html:checkbox property="checked" value="check" disabled="true" name="HrmGenEligRuleQueryForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" onchange="doChangeDetail(this.alt);" /></td>
                                  <TD class=tableText ><html:text property="txtdocCode" name="oDetailBean" maxlength="10" styleClass="deletedRow" readonly="true"  style="width:100%" alt="<%=idx.toString()%>" /></td>   
                                   <TD class=tableText ><html:text property="txteligSql" name="oDetailBean"  styleClass="deletedRow" readonly="true"  style="width:100%" alt="<%=idx.toString()%>"  /></td>   
                                </tr>
                                </logic:equal>
                         </logic:iterate>
                          </TBODY>
                    </TABLE>
                  </DIV>
                </TD>
              </TR>                     
  
  <!-- Get details starts -->
                      <tr>
                <td>	
                <!--Buttons for Add Row and Save row-->
                  <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
               </tr>
                        
                          </tbody>
                        </TABLE>
                    </tr>
                  </TBODY>
                </TABLE>
              </td>
            </tr>
        </TABLE>
     </td>
	 </tr>
                <!-- Tab Table Ends -->

<!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td width=45% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                      
                        <td  bgColor=#4682b4></td>
                        <td bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                   </TR>
                   </table>
            </td>
          </tr>
 
<!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->

<html:hidden property="screenName" name="HrmGenEligRuleQueryForm" value="HrmGenEligRuleQuery" />
<html:hidden name="HrmGenEligRuleQueryForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmGenEligRuleQueryForm" />
<html:hidden property="screenMode" name="HrmGenEligRuleQueryForm" />

<html:hidden property="userPageRequested" name="HrmGenEligRuleQueryForm" />
<html:hidden property="userPositionRequested" name="HrmGenEligRuleQueryForm" />
<html:hidden property="pageRequested" name="HrmGenEligRuleQueryForm" />
<html:hidden property="headerDataChanged" name="HrmGenEligRuleQueryForm" />
<html:hidden property="detailDataChanged" name="HrmGenEligRuleQueryForm" />
<html:hidden property="headerPrimaryKey" name="HrmGenEligRuleQueryForm" />
<html:hidden property="firstLoad" name="HrmGenEligRuleQueryForm" />


<!------ addded for LOV ----->


<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >



</html:form>
</body>
</html:html>
       
<script language="javascript">

function doChangeHeader()
{

 if(HrmGenEligRuleQueryForm.screenMode.value!="Q")
 {

 HrmGenEligRuleQueryForm.headerDataChanged.value="false";
 }
}


function doQueryMode()
{
 
  return "HrmGenEligRuleQueryQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmGenEligRuleQueryNewModeAction.do";
}

function doValidate()
{

  return "HrmGenEligRuleQueryValidateAction.do";
}

function doExecute()
{
 
  return "HrmGenEligRuleQueryGetHeaderAction.do";
}

function doSave()
{

  return "HrmGenEligRuleQuerySaveAction.do";
  
}

function doDelete()
{

  return "HrmGenEligRuleQueryDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmGenEligRuleQueryRefreshAction.do";
  
}

function doPrevHeader()
{
  return "HrmGenEligRuleQueryGetNextHeaderAction.do"; 
}

function doNextHeader()
{
  return "HrmGenEligRuleQueryGetNextHeaderAction.do"; 
}

function doJumpHeader()
{
  return "HrmGenEligRuleQueryFirstGetNextHeaderAction.do"; 
}

function doGetDetail()
{
  return "HrmGenEligRuleQueryGetDetailAction.do";
}

function doAddRow()
{

  return "HrmGenEligRuleQueryAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmGenEligRuleQueryDeleteRowAction.do";  
}
function doExit()
{
 return "HrmGenEligRuleQueryExitAction.do";  
}
function doGetDetailTableName()
{
  return "HrmGenEligRuleQueryBatch";
}

function doPrevDetail()
{

  return "HrmGenEligRuleQueryGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmGenEligRuleQueryGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmGenEligRuleQueryGetDetailPageAction.do"; 
}


function doGetInsertData()
{}
function doOnLoad()
{
  if(HrmGenEligRuleQueryForm.firstLoad.value!="false")
  {
    return  "HrmGenEligRuleQueryOnLoadAction.do"; 
  }
  
}
function setCheckedValues(val)
{
document.forms[0].txtIndex.value=val;
document.forms[0].transId.value=document.getElementsByName("txtTransId")[val].value;
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
<!---- Added For LOV ---->

function doGetInsertData()
{}


</script>    