<%@ 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="HrmAttWorkGroupShiftForm" action="HrmAttWorkGroupShiftBaseAction" type="wenrgise.hrms.webtier.form.HrmAttWorkGroupShiftForm">
<bean:define id="ParentForm" name="HrmAttWorkGroupShiftForm" 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="hrmWgrShift.title" /></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="hrmWgrShiftSubHeader.title" /></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.HrmAttWorkGroupShift.wrkGrpCode" /></td>
                                    <td colspan="5"><html:text  property="workGroupCode"  titleKey="hrm.HrmAttWorkGroupShift.wrkGrpCode" maxlength="20" size="23" readonly="true" styleClass="required"  onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon"  property="butWrkGrpCode" name="HrmAttWorkGroupShiftForm"  onclick="return ShowWrkGrpCode()" />
                                    <enrgise:text property="workGroupDescription" name="HrmAttWorkGroupShiftForm" altKey="hrm.HrmAttWorkGroupShift.workGroupDescription" maxlength="40" size="70" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();"   /></td>
                                 
            </TR>
            
             
             <TR> 
                  <td class=labelText><bean:message key="hrm.HrmAttWorkGroupShift.siteCode" /></td>
                                    <td ><html:text  property="siteCode"  titleKey="hrm.HrmAttWorkGroupShift.siteCode" maxlength="20" size="23"  styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon"  property="butSiteCode" name="HrmAttWorkGroupShiftForm"  onclick="return ShowSiteCode()" />
                                    <enrgise:text property="siteDescription" name="HrmAttWorkGroupShiftForm" altKey="hrm.HrmAttWorkGroupShift.siteDescription" maxlength="40" size="70" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();"   /></td>
                                 
            </TR>
            
            
             <tr>
                <td class=labelText><bean:message key="hrm.HrmAttWorkGroupShift.startDate" /></td>
                <td ><enrgise:text  property="startDate" titleKey="hrm.HrmAttWorkGroupShift.startDate" maxlength="15" alt="D" size="23"  styleClass="optional" disabledClass="locked"  onchange="doChangeHeader();" /><enrgise:img name="HrmAttWorkGroupShiftForm" width="15" height="19" align="top" src="../includes/images/cal.gif" property="butstartDate"  onclick="showCalendar('startDate',this)" /></td>
                <td class=labelText><bean:message key="hrm.HrmAttWorkGroupShift.endDate" /></td>
                <td ><enrgise:text  property="endDate" titleKey="hrm.HrmAttWorkGroupShift.endDate" maxlength="15" alt="D" size="23"  styleClass="optional" disabledClass="locked"  onchange="doChangeHeader();" /><enrgise:img name="HrmAttWorkGroupShiftForm" width="15" height="19" align="top" src="../includes/images/cal.gif" property="butendDate"   onclick="showCalendar('endDate',this)" /></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>
            <!-- 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="hrmTCMTabHeader.title" /><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>
                <td bgcolor="#4682B4" ></td>
                <enrgise:tab name="HrmAttWorkGroupShiftForm" property="butWrkGrpShiftTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif" ><bean:message key="hrmWgrShiftTabHeader.title" /></enrgise:tab>
                <td width="82%"> </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: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><bean:message key="hrm.HrmAttWorkGroupShift.shiftBeginDate" /></td>
                            <TD class=tableHeader><bean:message  key="hrm.HrmAttWorkGroupShift.shiftEndDate" /></td>
                            <TD class=tableHeader><bean:message key="hrm.HrmAttWorkGroupShift.shiftCode" /></td>
                         </tr>
                         <logic:notEmpty name="HrmAttWorkGroupShiftForm" property="arrHrmAttWrkGrpShift" >
                            
                            <logic:iterate id="HrmAttWGS" name="HrmAttWorkGroupShiftForm" property="arrHrmAttWrkGrpShift" type="wenrgise.hrms.bean.HrmAttWorkGroupShiftDtlBean" indexId="idx" >
                               <logic:notEqual name="HrmAttWGS" property="status" value="D" >
                                   <tr class='<bean:write name="HrmAttWorkGroupShiftForm" property="listRowClass"/>'  >
                                      <td><html:checkbox property="checked" value="check" name="HrmAttWorkGroupShiftForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" />    
                                      <html:hidden property="itemChecked" name="HrmAttWGS" /><html:hidden property="status" name="HrmAttWGS" /><html:hidden property="detailId"  name="HrmAttWGS" /><html:hidden property="shiftId"  name="HrmAttWGS" /></td>            
                                      <TD class=tableText ><enrgise:text property="shiftBeginDate" name="HrmAttWGS" formName="HrmAttWorkGroupShiftForm" style="width:95%" styleClass="required" disabledClass="required" titleKey="hrm.HrmAttWorkGroupShift.shiftBeginDate" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img width="16" height="19" align="top" styleClass="icon" src="../includes/images/cal.gif" property="butshiftBeginDate" name="HrmAttWorkGroupShiftForm" alt="<%=idx.toString()%>"  onclick="showCalendar('shiftBeginDate',this)" /></td>              
                                      <TD class=tableText ><enrgise:text property="shiftEndDate" name="HrmAttWGS" formName="HrmAttWorkGroupShiftForm" style="width:95%" styleClass="optional" disabledClass="locked" titleKey="hrm.HrmAttWorkGroupShift.shiftEndDate" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img width="16" height="19" align="top" styleClass="icon" src="../includes/images/cal.gif" property="butshiftEndDate" name="HrmAttWorkGroupShiftForm" alt="<%=idx.toString()%>"   onclick="showCalendar('shiftEndDate',this)" /></td>              
                                      <TD class=tableText ><enrgise:text property="shiftCode" maxlength="20" size="15" titleKey="hrm.HrmAttWorkGroupShift.shiftCode"  name="HrmAttWGS" formName="HrmAttWorkGroupShiftForm" style="width:90%" styleClass="required" disabledClass="required" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img src="../includes/images/lov.jpg" height="15" align="center" styleClass="icon" name="HrmAttWorkGroupShiftForm" property="butshiftCode"  alt="<%=idx.toString()%>"    onclick="return ShowShiftCode(this.alt)"  /></td>
                                     
                                     
                                     
           
                              </logic:notEqual>
                              <logic:equal name="HrmAttWGS" property="status" value="D"  >
                                    <tr class='<bean:write name="HrmAttWorkGroupShiftForm" property="listRowClass"/>'  >
                                        <td><html:checkbox property="checked" value="check" disabled="true" name="HrmAttWorkGroupShiftForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" />    
                                        <html:hidden property="itemChecked" name="HrmAttWGS" /><html:hidden property="status" name="HrmAttWGS" /><html:hidden property="detailId"  name="HrmAttWGS" /><html:hidden property="shiftId"  name="HrmAttWGS" /></td>            
                                         <TD class=tableText ><enrgise:text property="shiftBeginDate" name="HrmAttWGS" style="width:95%" formName="HrmAttWorkGroupShiftForm" styleClass="deletedRow" disabledClass="locked" titleKey="hrm.HrmAttWorkGroupShift.shiftBeginDate" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" /><enrgise:img width="16" height="19" align="top" styleClass="icon" src="../includes/images/cal.gif" property="butshiftBeginDate" name="HrmAttWorkGroupShiftForm"    alt="<%=idx.toString()%>" onclick="showCalendar('shiftBeginDate',this)" /></td>              
                                         <TD class=tableText ><enrgise:text property="shiftEndDate" name="HrmAttWGS" style="width:95%" formName="HrmAttWorkGroupShiftForm" styleClass="deletedRow" disabledClass="locked" titleKey="hrm.HrmAttWorkGroupShift.shiftEndDate" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" /><enrgise:img width="16" height="19" align="top" styleClass="icon" src="../includes/images/cal.gif" property="butshiftEndDate" name="HrmAttWorkGroupShiftForm"  alt="<%=idx.toString()%>" onclick="showCalendar('shiftEndDate',this)" /></td>              
                                         <TD class=tableText ><enrgise:text property="shiftCode" size="15" titleKey="hrm.HrmAttWorkGroupShift.shiftCode" name="HrmAttWGS" style="width:90%" formName="HrmAttWorkGroupShiftForm" styleClass="deletedRow" disabledClass="locked" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" /><enrgise:img src="../includes/images/lov.jpg" height="15" align="center" styleClass="icon" name="HrmAttWorkGroupShiftForm" property="butshiftCode"  alt="<%=idx.toString()%>"  onclick="return ShowShiftCode(this.alt)" /></td>
                               
                                  </tr>
                              </logic:equal>
                          </logic:iterate>
                        </logic:notEmpty>
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                <!--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>
</div>
<!-- Container Table Ends -->
<html:hidden name="HrmAttWorkGroupShiftForm"  property="screenMode" />
<html:hidden name="HrmAttWorkGroupShiftForm"  property="screenName" value="HrmAttWorkGroupShift" />
<html:hidden name="HrmAttWorkGroupShiftForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmAttWorkGroupShiftForm" />

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

<html:hidden property="lovKey" name="HrmAttWorkGroupShiftForm"  />
<html:hidden property="txtSearchFields" name="HrmAttWorkGroupShiftForm"  />
<html:hidden property="txtDisplayFields" name="HrmAttWorkGroupShiftForm"  />
<html:hidden property="headerDataChanged" name="HrmAttWorkGroupShiftForm" />
<html:hidden property="detailDataChanged" name="HrmAttWorkGroupShiftForm" />

<html:hidden property="txtIndex" name="HrmAttWorkGroupShiftForm"  />
<html:hidden property="workGroupId" name="HrmAttWorkGroupShiftForm" />
<html:hidden property="siteId" name="HrmAttWorkGroupShiftForm" />
<html:hidden property="firstLoad" name="HrmAttWorkGroupShiftForm"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

</html:form>
</body>
</html:html>
<SCRIPT>
/*function doChangeHeader()
{

 if(document.forms[0].screenMode.value="Q")
 {

 document.forms[0].headerDataChanged.value="false";
 }
 else
 {

 document.forms[0].headerDataChanged.value="true";
 }
 
}*/
function doQueryMode()
{

  return "HrmAttWorkGroupShiftQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmAttWorkGroupShiftNewModeAction.do";
}

function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAttWorkGroupShiftOnLoadAction.do"; 
  }
}
function doExecute()
{

  return "HrmAttWorkGroupShiftGetHeaderAction.do";
}

function doSave()
{
  document.forms[0].screenMode.value = 'U';
  document.forms[0].headerDataChanged.value="true";
  document.forms[0].detailDataChanged.value="true";
  return "HrmAttWorkGroupShiftSaveAction.do";
  
}

function doValidate()
{
  return "HrmAttWorkGroupShiftValidateAction.do";
  
}

function doOnChangeLov(lovName)
{
  if(lovName == 'WrkGroupCodeHrmAttWorkGroupShiftN')
  {
    doBaseValidate();
  } 
  if(lovName == 'WrkGroupCodeHrmAttWorkGroupShiftQ')
  {
    doBaseValidate();
  } 
  
  if(lovName == 'SiteCodeHrmAttWorkGroupShiftN')
  {
    doBaseValidate();
  } 
  if(lovName == 'SiteCodeHrmAttWorkGroupShiftQ')
  {
    doBaseValidate();
  }
      
}



function doDelete()
{

  return "HrmAttWorkGroupShiftDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmAttWorkGroupShiftRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmAttWorkGroupShiftGetDetailAction.do";
}

function doAddRow()
{

  return "HrmAttWorkGroupShiftAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "HrmAttWGS";
}

function doPrevDetail()
{

  return "HrmAttWorkGroupShiftGetDetailPageAction.do";  
}

function doNextDetail()
{

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

  return "HrmAttWorkGroupShiftExitAction.do";
}

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


function ShowWrkGrpCode()
{
        document.forms[0].lovKey.value = "WrkGroupCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAttWorkGroupShift.wrkGrpCode,hrm.HrmAttWorkGroupShift.workGroupDescription";
        document.forms[0].txtDisplayFields.value = "workGroupId,workGroupCode,workGroupDescription";
        document.forms[0].queryParam.value="siteId="+document.forms[0].siteId.value ;
        document.forms[0].txtIndex.value ="";
        document.forms[0].multipleFlag.value="false";
      
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAttWorkGroupShiftForm');
        return true;
        
       
}




function ShowSiteCode()
{
        document.forms[0].lovKey.value = "SiteCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAttWorkGroupShift.siteCode,hrm.HrmAttWorkGroupShift.siteDescription";
        document.forms[0].txtDisplayFields.value = "siteId,siteCode,siteDescription";
        document.forms[0].multipleFlag.value="false";
      
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAttWorkGroupShiftForm');
        return true;
        
       
}

function ShowShiftCode()
{
        document.forms[0].lovKey.value = "ShiftCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAttWorkGroupShift.shiftCode";
        document.forms[0].txtDisplayFields.value = "shiftId,shiftCode";
        document.forms[0].multipleFlag.value="false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAttWorkGroupShiftForm');
        return true;
        
       
}


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


</script>
              
 