<%@ 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>
<HEAD>
    <html:base />
    <TITLE><bean:message key="hrm.title" /></TITLE>
	  <jsp:include page="GenIncludes.jsp" flush="true" />
    <meta http-equiv=pragma content=no-cache>
</HEAD>

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

<html:form name="HrmOrgRelationMstForm" action="HrmOrgRelationMstBaseAction" type="wenrgise.hrms.webtier.form.HrmOrgRelationMstForm">
<bean:define id="ParentForm" name="HrmOrgRelationMstForm" 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" 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" onmouseover='this.src="../includes/images/delete_act.jpg"' onmouseout='this.src="../includes/images/delete.jpg"' alt="Delete (Ctrl+D)" src="../includes/images/delete.jpg" onclick="doBaseDelete()" /><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"  onclick="doBaseExit()" onmouseover='this.src="../includes/images/exit_act.jpg"' onmouseout='this.src="../includes/images/exit.jpg"' alt="Exit (Alt+X)"  src="../includes/images/exit.jpg" /><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" /></TD>
    <TD width="50%"></TD>
    <TD ><img property="butPrevHeader" src="../includes/images/butn_prev_dis.jpg" /></td>
    <td class=dtlNavText><bean:write  name="left" /> of 
    <bean:write name="right" /></td>
    <td align=right><img property="butNextHeader" src="../includes/images/butn_next_dis.jpg"  /></td>
    <td align=right><html:text property="newPositionRequested" size="1" onkeydown="isInteger(event)" title=" " alt="N" /></td>
    <td ><img property="butJumpHeader" alt="Go (Ctrl+G)" src="../includes/images/go.jpg"  /></td>
    <td > </td>
</TR>
</TABLE>
<table>
<tr>
  <td colspan="11" class="userText"></td>
</tr>
<enrgise:checkSession/>
</TABLE>

<html:hidden property="detailDataChanged" name="HrmOrgRelationMstForm" />


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader ><bean:message  key="hrm.HrmRelationMaster.heading" /></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 border=0>
          <!-- Detail Information Row starts -->
          <TR>
            <TD colspan=6>
            <TABLE cellSpacing=0 cellPadding=0 >
              <TR>
                <TD width=10 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=actTabText noWrap bgColor=#4682b4><bean:message key="hrm.HrmRelationMaster.detail" /><IMG height=1 src="../includes/images/pixel.gif" width=10 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>
              <!-- Detail table Container starts -->
              <TD colSpan=6>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:250px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0>
                     <TBODY>
                        <tr>
                          <TD class=tableHeader width="1%"><input type="checkbox" name="selectAll"  onclick="toggleCheckBox('checked')"  /></td>
                          <td class=tableHeader><bean:message key="hrm.HrmRelationMaster.txtRelationCode" /></td>
                          <TD class=tableHeader><bean:message  key="hrm.HrmRelationMaster.txtRelationName" /></td>
                          <TD class=tableHeader><bean:message  key="hrm.HrmRelationMaster.txtOccurence" /></td>
                          
            
                       </tr> 
                       
                            <logic:iterate id="HrmRelation" name="HrmOrgRelationMstForm" property="arrHrmRelationDtl" type="wenrgise.hrms.bean.HrmOrgRelationMstDtlBean"  indexId="idx"  >
                               <logic:notEqual name="HrmRelation" property="status" value="D" >
                                 <tr>
                                     <td><html:checkbox property="checked" name="HrmOrgRelationMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt); " />    
                                     <html:hidden property="itemChecked" name="HrmRelation" /><html:hidden property="status" name="HrmRelation" /><html:hidden property="detailId"  name="HrmRelation" /></td>            
                                     <td ><enrgise:text property="txtRelationCode" name="HrmRelation" styleClass="required" disabledClass="locked" maxlength="2" style="width:100%" titleKey="hrm.HrmRelationMaster.txtRelationCode" alt="P" onkeypress="isInteger(event);"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                     <td ><enrgise:text property="txtRelationName" name="HrmRelation" styleClass="required" disabledClass="locked"  style="width:100%" titleKey="hrm.HrmRelationMaster.txtRelationName" alt="P"  onkeypress="isName(event);" maxlength="20" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                     <td ><enrgise:text property="txtOccurence" name="HrmRelation" styleClass="required" disabledClass="locked"  style="width:100%" titleKey="hrm.HrmRelationMaster.txtOccurence" alt="N" onkeypress="isInteger(event);" maxlength="1"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                 </tr>
                              </logic:notEqual>
                              <logic:equal name="HrmRelation" property="status" value="D"  >
                                   <tr>
                                     <td width="1%"><html:checkbox property="checked" value="check" disabled="true" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"  />
                                     <html:hidden property="itemChecked" name="HrmRelation" /><html:hidden property="status" name="HrmRelation" /><html:hidden property="detailId"  name="HrmRelation" /></td>            
                                     <td ><enrgise:text  property="txtRelationCode" name="HrmRelation"  size="6" styleClass="deletedRow" disabledClass="locked"  style="width:100%"  alt="<%=idx.toString()%>"   onkeypress="isInteger(event);" onchange="doChangeDetail(this.alt);" /></td>
                                     <td ><enrgise:text  property="txtRelationName" name="HrmRelation"  size="6" styleClass="deletedRow" disabledClass="locked"  style="width:100%"  alt="<%=idx.toString()%>"  onkeypress="isName(event);"  onchange="doChangeDetail(this.alt);" /></td>
                                     <td ><enrgise:text  property="txtOccurence" name="HrmRelation"  size="6" styleClass="deletedRow" disabledClass="locked"  style="width:100%" alt="<%=idx.toString()%>" onkeypress="isInteger(event);"  onchange="doChangeDetail(this.alt);" /></td>
                                 </tr>
                              </logic:equal>
                              </logic:iterate>                        
                        
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
               <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="HrmOrgRelationMstForm"  property="screenMode" />
<html:hidden name="HrmOrgRelationMstForm"  property="screenName" value="HrmOrgRelationMst" />
<html:hidden name="HrmOrgRelationMstForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmOrgRelationMstForm" />

<html:hidden property="userPageRequested" name="HrmOrgRelationMstForm" />
<html:hidden property="userPositionRequested" name="HrmOrgRelationMstForm" />
<html:hidden property="pageRequested" name="HrmOrgRelationMstForm" />
<html:hidden property="txtIndex" name="HrmOrgRelationMstForm"  />
<html:hidden property="headerPrimaryKey" name="HrmOrgRelationMstForm" />

<!-- Container Table Ends -->

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

function doInsertMode()
{

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

  return "HrmOrgRelationMstQueryModeAction.do";   //Dummy
}

function doSave()
{

  return "HrmOrgRelationMstSaveAction.do";
  
}

function doDelete()
{

  return "HrmOrgRelationMstDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmOrgRelationMstRefreshAction.do";
  
}


function doGetDetail()
{
document.forms[0].screenMode.value="U";
  return "HrmOrgRelationMstGetDetailAction.do";
}

function doAddRow()
{
document.forms[0].screenMode.value="U";
document.forms[0].headerPrimaryKey.value="Enrgise";
  return "HrmOrgRelationMstAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

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

  return "HrmOrgRelationMstExitAction.do";  
}
function doNextDetail()
{

  return "HrmOrgRelationMstGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmOrgRelationMstGetDetailPageAction.do"; 
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}

</script>             
              
              
              
              
              
              
              
              
                 
              
                  
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
   