<%@ 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" />
</HEAD>

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

<html:form name="HrmAprslStartRuleForm" action="HrmAprslStartRuleBaseAction" type="wenrgise.hrms.webtier.form.HrmAprslStartRuleForm">
<bean:define id="ParentForm" name="HrmAprslStartRuleForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader ><bean:message  key="hrm.HrmAprslStartRule.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 >
        <!--Master Information Starts -->
         <TR>
            <TD class=subHeader colspan=6><bean:message key="hrm.HrmAprslStartRule.appraisalRule" /></TD>
         </TR>
         <TR>
            <TD  bgColor=#4682b4 colspan=6><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
         </TR>
         <tr>
            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.aprslStartOrderNo" /></td>
            <td colspan=2 ><html:text  property="txtAprslStOrdNo"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtAprslStOrdNo" name="HrmAprslStartRuleForm" onclick="ShowStartOrder();" /></td>
         
            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.employeeNo" /></td>
            <td colspan=2 ><html:text  property="txtEmpNum"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtEmpNum" name="HrmAprslStartRuleForm" onclick="ShowEmployee();" /><html:text  property="txtEmpName" altKey="hrm.HrmAprslStartRule.employeeName" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td>
         </tr>
         
         <tr>

            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.workGroupCode" /></td>
            <td colspan=2 ><html:text  property="txtWrkGrpCode"  maxlength="15" size="23" styleClass="locked" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtWrkGrpCode" name="HrmAprslStartRuleForm" onclick="ShowWrkGrp();" /><html:text  property="txtWrkGrpDesc" altKey="hrm.HrmAprslStartRule.workGroupDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td>
            
            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.siteCode" /></td>
            <td colspan=2 ><html:text  property="txtSiteCode"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtSiteCode" name="HrmAprslStartRuleForm" onclick="ShowSiteCode();" /><html:text  property="txtSiteDesc" altKey="hrm.HrmAprslStartRule.siteCodeDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 
            
         </tr>
         
         
          
         <tr>
           
            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.classHeaderCode" /></td>
            <td colspan=2 ><html:text  property="txtClsHdr"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtClsHdr" name="HrmAprslStartRuleForm" onclick="ShowClsHdr();" /><html:text  property="txtClsHdrDesc" altKey="hrm.HrmAprslStartRule.classHeaderDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 

         
            <td class=labelText><bean:message key="hrm.HrmAprslStartRule.classDetailCode" /></td>
            <td colspan=2 ><html:text  property="txtClsDtl"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTxtClsDtl" name="HrmAprslStartRuleForm" onclick="ShowClsDtl();" /><html:text  property="txtClsDtlDesc" altKey="hrm.HrmAprslStartRule.classDetailDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></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>
            <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.HrmAprslStartRule.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%"><html:checkbox property="selectAll" onclick="toggleCheckBox('checked')" /></TD>
                                     <TD class=tableHeader width="35%"><bean:message  key="hrm.HrmAprslStartRule.employeeNo" /></td>
                          <TD class=tableHeader width="55%"><bean:message key="hrm.HrmAprslStartRule.employeeName" /></td>                          
          
                        </tr> 
                        
                       <logic:iterate id="ApprisalInfo" name="HrmAprslStartRuleForm" property="arylstAprslStarRule" type="wenrgise.hrms.bean.HrmAprslStartRuleDtlBean" indexId="idx">
                                
                            <logic:notEqual name="ApprisalInfo" property="status" value="D" >                                                        
                                <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslStartRuleForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>
                                  <td><html:text property="txtEmplNo" name="ApprisalInfo" alt="<%=idx.toString()%>" styleClass="required"   style="width:90%" size="26" onchange='<%="doChangeDetail("+idx.toString()+");"%>'  readonly="true"  /> 
                                  <img src="../includes/images/lov_dis.jpg" height="16" align="center" alt="<%=idx.toString()%>" property="buttxtEmplNo" name="HrmAprslStartRuleForm" /></td>
                                  <td ><html:text property="txtEmplName" name="ApprisalInfo" alt="<%=idx.toString()%>" styleClass="locked"  style="width:100%" size="26"  onchange='<%="doChangeDetail("+idx.toString()+")"%>'  readonly="true" /> </td>
                                  <html:hidden name="ApprisalInfo" property="dtlEmplNo" />
                                  <html:hidden name="ApprisalInfo" property="detailId" />
                                  <html:hidden name="ApprisalInfo" property="itemChecked" />
                                  <html:hidden name="ApprisalInfo" property="status" />

               
                                </tr>
                        </logic:notEqual>
                       
                        <logic:equal name="ApprisalInfo" property="status" value="D" >
                                
                                 <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslStartRuleForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>
                                  <td><html:text property="txtEmplNo" name="ApprisalInfo" alt="<%=idx.toString()%>" styleClass="locked"   style="width:90%" size="26" readonly="true"  /> <enrgise:img src="../includes/images/lov_dis.jpg" height="16" align="center" property="buttxtEmplNo" name="HrmAprslStartRuleForm"  /></td>
                                  <td ><html:text property="txtEmplName" name="ApprisalInfo" alt="<%=idx.toString()%>" styleClass="locked"  style="width:100%" size="26"   readonly="true"  /> </td>
                                  <html:hidden name="ApprisalInfo" property="dtlEmplNo" />
                                  <html:hidden name="ApprisalInfo" property="detailId" />
                                  <html:hidden name="ApprisalInfo" property="itemChecked" />
                                  <html:hidden name="ApprisalInfo" property="status" />
               
               
                                </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>

<!-- Container Table Ends -->
<html:hidden name="HrmAprslStartRuleForm" property="screenName" value="HrmAprslStartRule" />
<html:hidden name="HrmAprslStartRuleForm" property="forwardedPage" />
<html:hidden name="HrmAprslStartRuleForm" property="positionRequested"  />
<html:hidden name="HrmAprslStartRuleForm" property="screenMode" />
<html:hidden name="HrmAprslStartRuleForm" property="headerPrimaryKey"/> 

<html:hidden property="hdnAprslStOrdNo" name="HrmAprslStartRuleForm"  />
<html:hidden property="hdnEmpNum" name="HrmAprslStartRuleForm"  />
<html:hidden property="hdnWrkGrpCode" name="HrmAprslStartRuleForm"  />
<html:hidden property="hdnSiteCode" name="HrmAprslStartRuleForm"  />
<html:hidden property="hdnClsHdrID" name="HrmAprslStartRuleForm"  />
<html:hidden property="hdnClsDtlID" name="HrmAprslStartRuleForm"  />

<html:hidden property="lovKey" name="HrmAprslStartRuleForm"  />
<html:hidden property="txtSearchFields" name="HrmAprslStartRuleForm"  />
<html:hidden property="txtDisplayFields" name="HrmAprslStartRuleForm"  />
<html:hidden property="txtIndex" name="HrmAprslStartRuleForm"  />

<html:hidden property="detailDataChanged" name="HrmAprslStartRuleForm"  />
<html:hidden property="headerDataChanged" name="HrmAprslStartRuleForm"  />
<html:hidden property="firstLoad" name="HrmAprslStartRuleForm"  />

<html:hidden property="userPageRequested" name="HrmAprslStartRuleForm" />
<html:hidden property="userPositionRequested" name="HrmAprslStartRuleForm" />
<html:hidden property="pageRequested" name="HrmAprslStartRuleForm" />


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

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

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


function doInsertMode()
{
  return "HrmAprslStartRuleNewModeAction.do";
}


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

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

function doDelete()
{
  return "HrmAprslStartRuleDeleteAction.do";
  
}

function doRefresh()
{
  return "HrmAprslStartRuleRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmAprslStartRuleGetDetailAction.do";
}

function doAddRow()
{
  return "HrmAprslStartRuleAddRowAction.do"; 
}

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


function doPrevDetail()
{

  return "HrmAprslStartRuleGetDetailPageAction.do";  
}

function doNextDetail()
{

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

  return "HrmAprslStartRuleExitAction.do";
}
function doJumpDetail()
{
  return  "HrmAprslStartRuleGetDetailPageAction.do"; 
}
/*function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAprslStartRuleOnLoadAction.do"; 
  }
}*/
function ShowStartOrder()
{ 
    document.forms[0].lovKey.value = "AprslStRuleStOrd" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.aprslStartOrderNo";
    document.forms[0].txtDisplayFields.value = "hdnAprslStOrdNo,txtAprslStOrdNo";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowEmployee()
{
    document.forms[0].lovKey.value = "AprslStRuleEmpl" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.employeeNo";
    document.forms[0].txtDisplayFields.value = "hdnEmpNum,txtEmpNum,txtEmpName";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowWrkGrp()
{
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].hdnSiteCode.value +" " ;
    document.forms[0].lovKey.value = "AprslStRuleWrkGrp" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.workGroupCode";
    document.forms[0].txtDisplayFields.value = "hdnWrkGrpCode,txtWrkGrpCode,txtWrkGrpDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowSiteCode()
{
    document.forms[0].lovKey.value = "AprslStRuleSiteCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.siteCode";
    document.forms[0].txtDisplayFields.value = "hdnSiteCode,txtSiteCode,txtSiteDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowClsHdr()
{
    document.forms[0].lovKey.value = "AprslStRuleClsHdr" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.classHeaderCode";
    document.forms[0].txtDisplayFields.value = "hdnClsHdrID,txtClsHdr,txtClsHdrDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowClsDtl()
{
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].hdnClsHdrID.value +" " ;
    document.forms[0].lovKey.value = "AprslStRuleClsDtl" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.classDetailCode";
    document.forms[0].txtDisplayFields.value = "hdnClsDtlID,txtClsDtl,txtClsDtlDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

function ShowEmployeeCode(i)
{
    doChangeDetail(i);
    document.forms[0].lovKey.value = "AprslStRuleEmpl" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmAprslStartRule.employeeNo";
    document.forms[0].txtDisplayFields.value = "dtlEmplNo,txtEmplNo,txtEmplName";
    document.forms[0].multipleFlag.value = "false";
    document.forms[0].txtIndex.value=i;  
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslStartRuleForm');
    return true;
}

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

</script>