<%@ 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" />
  <meta http-equiv=pragma content=no-cache>
</head>
<BODY scroll=auto>
<html:form  action="HrmOrgScaleMstBaseAction" name="HrmOrgScaleMstForm" type="wenrgise.hrms.webtier.form.HrmOrgScaleMstForm">
<bean:define id="ParentForm" name="HrmOrgScaleMstForm" 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()" /><enrgise:img name="ParentForm" property="butInsert" onmouseover='this.src="../includes/images/insert_act.jpg"' onmouseout='this.src="../includes/images/insert.jpg"' alt="Insert (Alt+N)" src="../includes/images/insert.jpg"  onclick="doBaseInsertMode()"/></TD>
    <TD width="2%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butExecute" onmouseover='this.src="../includes/images/execute_act.jpg"' onmouseout='this.src="../includes/images/execute.jpg"' alt="Execute (Ctrl+U)" src="../includes/images/execute.jpg" onclick="doBaseExecute()" /><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()" /><enrgise:img name="ParentForm" 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><enrgise:text property="newPositionRequested" size="1"  maxlength="3" onkeydown="isInteger(event)" title="wenrgise.common.jumpDetail" alt="N" disabledClass="locked" styleClass="optional" /></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>


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


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader ><bean:message  key="hrm.HrmScaleMaster.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 >
        <!--Inspection Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmScaleMaster.header" /></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.HrmScaleMaster.scaleCode" /></td>
                  <td><enrgise:text  property="scaleCode" titleKey="hrm.HrmScaleMaster.scaleCode" maxlength="10" size="23" alt="N" styleClass="required" disabledClass="required" name="HrmOrgScaleMstForm" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butScaleCode" name="HrmOrgScaleMstForm" onclick="return ShowScaleCode()"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmScaleMaster.desc" /> </td>
                  <td colspan="3"><enrgise:text  property="desc"  titleKey="hrm.HrmScaleMaster.desc" maxlength="20" size="55" alt="AN" styleClass="optional" disabledClass="locked" name="HrmOrgScaleMstForm" onchange="doChangeHeader();" /></td>
            </TR>
          
            <TR> 
                  <td class="labelText"><bean:message key="hrm.HrmScaleMaster.revision" /> </td>
                  <td><enrgise:text  property="revision"  titleKey="hrm.HrmScaleMaster.revision" maxlength="6" size="26" styleClass="optional" disabledClass="locked" name="HrmOrgScaleMstForm" onkeypress="isNumber(event)" />&nbsp;&nbsp;<bean:message key="hrm.HrmScaleMaster.yyyymm" /> </td></td>
                  <!--<td class="labelText"><bean:message key="hrm.HrmScaleMaster.grade" /></td>
                  <td><enrgise:text  property="grade" titleKey="hrm.HrmScaleMaster.grade" maxlength="10" size="23" alt="N" styleClass="required" disabledClass="required" name="HrmOrgScaleMstForm" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butGrade" name="HrmOrgScaleMstForm" onclick="return ShowGrade()"  /></td>
                  <td colspan="2"></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" width="10"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <td bgcolor="#4682B4" nowrap class=actTabText><bean:message key="hrm.HrmScaleMaster.detail" /><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=6>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:200px">
                    <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.HrmScaleMaster.txtStartBasic" /></td>
                          <td class=tableHeader ><bean:message  key="hrm.HrmScaleMaster.txtIncrement" /></td>
                          <td class=tableHeader ><bean:message  key="hrm.HrmScaleMaster.txtEndBasic" /></td>
                       </tr> 
                       <logic:notEmpty name="HrmOrgScaleMstForm" property="arrHrmScaleDtl" >
                            <logic:iterate id="HrmScale" name="HrmOrgScaleMstForm" property="arrHrmScaleDtl" type="wenrgise.hrms.bean.HrmOrgScaleMstDtlBean" indexId="idx" >
                                  <logic:notEqual name="HrmScale" property="status" value="D" >
                                <tr class='<bean:write name="HrmOrgScaleMstForm" property="listRowClass" />'  >
                                  <td width="1%"><html:hidden property="status"  name="HrmScale" /><html:hidden property="detailId"  name="HrmScale"  /><html:hidden property="itemChecked" name="HrmScale" /><html:checkbox property="checked"  name="HrmOrgScaleMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" onchange="doChangeDetail(this.alt);" /></td>
                                  <TD class=tableText ><enrgise:text property="txtStartBasic" name="HrmScale" maxlength="8" styleClass="required" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onkeypress="isInteger(event);"   onchange="doChangeDetail(this.alt)" /></td>   
                                  <TD class=tableText><enrgise:text property="txtIncrement" name="HrmScale" maxlength="8" styleClass="required" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onkeypress="isInteger(event);"  onchange="doChangeDetail(this.alt)" /></td>                                
                                  <TD class=tableText ><enrgise:text property="txtEndBasic" name="HrmScale" maxlength="8" styleClass="required" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onkeypress="isInteger(event);"  onchange="doChangeDetail(this.alt)" /></td>   
                                </tr>
                               </logic:notEqual>
                                <logic:equal name="HrmScale" property="status" value="D"  >
                                 <tr class='<bean:write name="HrmOrgScaleMstForm" property="listRowClass" />'  >
                                  <td width="1%"><html:hidden property="status"  name="HrmScale" /><html:hidden property="detailId"  name="HrmScale"  /><html:hidden property="itemChecked" name="HrmScale" /><html:checkbox property="checked" value="check" disabled="true" name="HrmOrgScaleMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" onchange="doChangeDetail(this.alt);" /></td>
                                  <TD class=tableText ><enrgise:text property="txtStartBasic" name="HrmScale" maxlength="10" styleClass="deletedRow" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt)" /></td>   
                                  <TD class=tableText><enrgise:text property="txtIncrement" name="HrmScale" maxlength="10" styleClass="deletedRow" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt)" /></td>                                
                                  <TD class=tableText ><enrgise:text property="txtEndBasic" name="HrmScale" maxlength="10" styleClass="deletedRow" disabledClass="locked" formName="HrmOrgScaleMstForm" style="width:100%" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt)" /></td>   
                                </tr>
                                </logic:equal>
                          </logic:iterate>
                        </logic:notEmpty>
                      </TBODY>
                     </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		        </tr>
        </TABLE>
      </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="HrmOrgScaleMstForm"  property="screenMode" />
<html:hidden name="HrmOrgScaleMstForm"  property="screenName" value="HrmOrgScaleMst" />
<html:hidden name="HrmOrgScaleMstForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmOrgScaleMstForm" />
<html:hidden property="txtIndex" name="HrmOrgScaleMstForm"  />
<html:hidden property="gradeId" name="HrmOrgScaleMstForm"  />


<html:hidden property="hierarchyLevel" name="HrmOrgScaleMstForm"  />
<html:hidden property="scaleId" name="HrmOrgScaleMstForm"  />
<html:hidden property="userPageRequested"  />
<html:hidden property="userPositionRequested" />
<html:hidden property="pageRequested" />

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

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

<!-- Container Table Ends -->

</html:form>
</body>
</html:html>
<script>
function doChangeHeader()
{
 document.forms[0].headerDataChanged.value="true";
}


function doQueryMode()
{

  return "HrmOrgScaleMstQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmOrgScaleMstNewModeAction.do";
}


function doExecute()
{

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

  return "HrmOrgScaleMstRefreshAction.do";
}

function doSave()
{

  return "HrmOrgScaleMstSaveAction.do";
  
}

function doDelete()
{

  return "HrmOrgScaleMstDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmOrgScaleMstRefreshAction.do";
  
}

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

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

function doJumpHeader()
{
  return "HrmOrgScaleMstGetNextHeaderAction.do"; 
}
function doExit()
{
  return "HrmOrgScaleMstExitAction.do"; 
}

function doGetDetail()
{

  return "HrmOrgScaleMstGetDetailAction.do";
}

function doAddRow()
{

  return "HrmOrgScaleMstAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

  return "HrmOrgScaleMstGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmOrgScaleMstGetDetailPageAction.do";
}

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


function doGetInsertData()
{}
function ShowScaleCode()
{
        document.forms[0].lovKey.value = "ScaleCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmScaleMaster.scaleCode";
        document.forms[0].txtDisplayFields.value = "scaleId,scaleCode,desc";
        document.forms[0].multipleFlag.value="false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmOrgScaleMstForm');
        return true;
}

function ShowGrade()
{
        document.forms[0].lovKey.value = "GradeCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmScaleMaster.scaleCode";
        document.forms[0].txtDisplayFields.value = "gradeId,grade";
        document.forms[0].multipleFlag.value="false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmOrgScaleMstForm');
        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>
