<%@ 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="HrmMediclaimMasterForm" action="HrmMediclaimMasterBaseAction" type="wenrgise.hrms.webtier.form.HrmMediclaimMasterForm">
<bean:define id="ParentForm" name="HrmMediclaimMasterForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />

<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message  key="hrm.HrmMediclaimMasterMainHeader" /></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 >
        <!--Inspection Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmMediclaimMasterSubHeader" /></TD>
            </TR>
            <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.HrmMediclaimMaster.claimCode" /></td>
                  <td><enrgise:text  property="claimCode" titleKey="hrm.HrmMediclaimMaster.claimCode" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader();" />
                  <td class="labelText"><bean:message  key="hrm.HrmMediclaimMaster.txtClass" /></td>
                  <td><enrgise:text property="txtClass" titleKey="hrm.HrmMediclaimMaster.txtClass" disabledClass="required" size="72" styleClass="required" onchange="doChangeHeader();" /><enrgise:img name="HrmMediclaimMasterForm"  height="16" align="center" src="../includes/images/lov.jpg" property="butTxtClass"  onclick="return ShowTxtClass()" /></td>
            </TR>
           
            <tr>               
               <td class="labelText"><bean:message key="hrm.HrmMediclaimMaster.cadre" /></td>
               <td><enrgise:text  property="cadre" titleKey="hrm.HrmMediclaimMaster.cadre" maxlength="8" size="26" name="HrmMediclaimMasterForm" styleClass="required" disabledClass="locked"  alt="N" onchange="doChangeHeader();" /><enrgise:img name="HrmMediclaimMasterForm"  height="16" align="center" src="../includes/images/lov.jpg" property="butCadre"  onclick="return ShowTxtCadre()" /></td>
               <td class="labelText"><bean:message key="hrm.HrmMediclaimMaster.allEmp" /></td>
               <td><enrgise:checkbox  property="allEmployeeApplicable" alt="A" formName="HrmMediclaimMasterForm" titleKey="hrm.HrmMediclaimMaster.allEmp" styleClass="optional" disabledClass="locked" onclick="doCheckInitialise(this,0);" onchange="doChangeHeader();"/></td>
           </tr>
           <tr>
           <td class="labelText"><bean:message key="hrm.HrmMediclaimMaster.dependents" /></td>
           <td><html:textarea  property="dependents"  name="HrmMediclaimMasterForm" alt="A" titleKey="hrm.HrmMediclaimMaster.dependents" cols="28" rows="2" styleClass="required" onchange="doChangeHeader();sc" /></td>
           </tr>
            <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>
            <!-- Tab Table Starts -->
            <TABLE cellSpacing=0 cellPadding=0 >
            <tr>                                             
                          <td bgcolor="#4682B4"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <td bgcolor="#4682B4" nowrap class=actTabText ><bean:message  key="hrm.HrmMediclaimMasterTableHeader" /><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="85%" 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 height=10>
              
            <!-- Detail table Container starts -->
              <TD colSpan=5>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:200px;width:1010px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0 id="HrmMediclaimMaster">
                     <TBODY>
                          <tr>                            
                            <TD class=tableHeader width="1%"><html:checkbox property="selectAll"  onclick="toggleCheckBox('checked')" /></TD>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.coverName" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.sumInsured" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.salaryUnit" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.premium" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.ageFrom" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.ageTo" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.aicContribution" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmMediclaimMaster.documentRequired" /></td>
                          </tr>
                         <logic:notEmpty name="HrmMediclaimMasterForm" property="arrHrmMediclaimMstDtl" >
                            <logic:iterate id="HrmMediclaimMaster" name="HrmMediclaimMasterForm" property="arrHrmMediclaimMstDtl" type="wenrgise.hrms.bean.HrmMediclaimMasterDtlBean" indexId="idx" >
                                <logic:notEqual name="HrmMediclaimMaster" property="status" value="D" >
                                            <tr>
                                              <TD align="center" width="1%"><html:hidden property="status"  name="HrmMediclaimMaster" />
                                              <html:hidden property="detailId"  name="HrmMediclaimMaster"  />
                                              <html:hidden property="itemChecked" name="HrmMediclaimMaster" />
                                              <html:checkbox property="checked"  name="HrmMediclaimMasterForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /></td>
                                              <TD class=tableText ><html:text property="coverName" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="sumInsured" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="salaryUnit" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="premium" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="ageFrom" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="ageTo" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="aicContribution" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="documentRequired" styleClass="required" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                            </tr>
                                </logic:notEqual>
                                 <logic:equal name="HrmMediclaimMaster" property="status" value="D"  >
                                           <tr>
                                            <TD align="center" width="1%"><html:hidden property="status"  name="HrmMediclaimMaster" />
                                              <html:hidden property="detailId"  name="HrmMediclaimMaster"  />
                                              <html:hidden property="itemChecked" name="HrmMediclaimMaster" />
                                              <html:checkbox property="checked"  name="HrmMediclaimMasterForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /></td>
                                              <TD class=tableText ><html:text property="coverName" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="sumInsured" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="salaryUnit" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="premium" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="ageFrom" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="ageTo" styleClass="deletedRow" maxlength="50" readonly="true" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="aicContribution" styleClass="deletedRow" readonly="true" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="documentRequired" styleClass="deletedRow" readonly="true" maxlength="50" name="HrmMediclaimMaster" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                          </tr>
                                  </logic:equal>         
                          </logic:iterate>
                        </logic:notEmpty>
                        
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td colspan="6">	
                <!--Buttons for Add Row and Save row-->
                   <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
               </tr>
        </TABLE>
      </td>
     </tr>
      <TR>
        <TD background="../includes/images/line_r.gif"><IMG src="../includes/images/pixel.gif" border=0></TD>
      </TR>
      
  </TABLE>
</td>
</tr>
              <!-- Tab Table Ends -->

      <!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td width=40% 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-->
    
</TBODY>
</TABLE>
<html:hidden name="HrmMediclaimMasterForm"  property="screenMode" />
<html:hidden name="HrmMediclaimMasterForm"  property="screenName" value="HrmMediclaimMaster" />
<html:hidden name="HrmMediclaimMasterForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmMediclaimMasterForm" />
<html:hidden property="lovKey" name="HrmMediclaimMasterForm"  />
<html:hidden property="txtSearchFields" name="HrmMediclaimMasterForm"  />
<html:hidden property="txtClassId" name="HrmMediclaimMasterForm"  />
<html:hidden property="txtCadreId" name="HrmMediclaimMasterForm"  />

<html:hidden property="txtDisplayFields" name="HrmMediclaimMasterForm"  />
<html:hidden property="txtIndex" name="HrmMediclaimMasterForm"  />
<html:hidden property="userPageRequested"  />
<html:hidden property="userPositionRequested" />
<html:hidden property="pageRequested" />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >
<html:hidden property="headerPrimaryKey" name="HrmMediclaimMasterForm" />
<html:hidden property="headerDataChanged" name="HrmMediclaimMasterForm" />
<html:hidden property="detailDataChanged" name="HrmMediclaimMasterForm" />
<html:hidden property="firstLoad" name="HrmMediclaimMasterForm"  />
<!-- Container Table Ends -->

</html:form>
</body>
</html:html>

<script>

function doCheckInitialise(elem, i)
{
  i=i*2;
  //alert(document.getElementsByName(elem.name).length +" " + elem.name+ " " + i);
  
  if(elem.checked){
    document.getElementsByName(elem.name)[i+1].value="on";
  }
  else{
    document.getElementsByName(elem.name)[i+1].value="off";
  }

  
}

function doChangeHeader()
{
 HrmMediclaimMasterForm.headerDataChanged.value="true";
}
function doQueryMode()
{

  return "HrmMediclaimMasterQueryModeAction.do";
}
function doExit()
{

  return "HrmMediclaimMasterExitAction.do";
}

function doInsertMode()
{

  return "HrmMediclaimMasterNewModeAction.do";
}


function doExecute()
{

  return "HrmMediclaimMasterGetHeaderAction.do";
}

function doSave()
{
   return "HrmMediclaimMasterSaveAction.do";
}

function doDelete()
{

  return "HrmMediclaimMasterDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmMediclaimMasterRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmMediclaimMasterGetDetailAction.do";
}

function doAddRow()
{

  return "HrmMediclaimMasterAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmMediclaimMasterDeleteRowAction.do";  
}

function doGetDetailTableName()
{
  return "HrmMediclaimMaster";
}

function doPrevDetail()
{

  return "HrmMediclaimMasterGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmMediclaimMasterGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmMediclaimMasterGetDetailPageAction.do"; 
}
function doOnLoad()
{  
  
    return  "HrmMediclaimMasterOnLoadAction.do"; 
 
}
function doGetInsertData()
{
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
function doValidate()
{
  return  "HrmMediclaimMasterValidateAction.do"; 
}
function ShowTxtClass()
{
        document.forms[0].lovKey.value = "HrmMediClaimClass" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtDisplayFields.value = "txtClassId,txtClass";
        document.forms[0].txtSearchFields.value = "hrm.HrmMediclaimMaster.txtClass";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />', 'HrmMediclaimMasterForm');
        return true;
       
}

function ShowTxtCadre()
{
        
        document.forms[0].lovKey.value = "HrmMediClaimCadre" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmMediclaimMaster.cadre";
        document.forms[0].txtDisplayFields.value = "txtCadreId,cadre"; 
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmMediclaimMasterForm');
        return true;
       
}

</script>
