<%@ 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  action="HrmExpScoreBaseAction" name="HrmPrmExperienceScoreForm" type="wenrgise.hrms.webtier.form.HrmPrmExperienceScoreForm">
<bean:define id="ParentForm" name="HrmPrmExperienceScoreForm" 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.HrmExperienceScore.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 >
        <!--KPA Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmExperienceScore.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.HrmPrmKPARating.gradeCode" /></td>
                  <td colspan=2 ><html:text  property="gradeCode"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butGrade" name="HrmPrmExperienceScoreForm" onclick="ShowGrade();" /><html:text  property="gradeDesc" altKey="hrm.HrmPrmKPARating.gradeDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 
            </TR>
            <TR> 
                  <td class=labelText><bean:message key="hrm.HrmPrmKPARating.desigCode" /></td>
                  <td  ><html:text  property="desigCode"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butDesig" name="HrmPrmExperienceScoreForm" onclick="ShowDesignation();" /><html:text  property="desigDesc" altKey="hrm.HrmPrmKPARating.desigDesc" 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>
            <!-- 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.HrmExperienceScore.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%"><html:checkbox property="selectAll" onclick="toggleCheckBox('checked')" /></TD>
                               <TD class=tableHeader width="5%"><bean:message key="hrm.HrmExperienceScore.txtMinExp" /></td>   
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmExperienceScore.txtMaxExp" /></td>                                
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmExperienceScore.txtAccBasis" /></td>                                
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmExperienceScore.txtMonthsExp" /></td>                                
                                <TD class=tableHeader width="5%"><bean:message key="hrm.HrmExperienceScore.txtPointsAwarded" /></td>                                
                          </tr> 
                         <logic:iterate id="HrmPrmExpSc" name="HrmPrmExperienceScoreForm" property="aryLstDtlBean" type="wenrgise.hrms.bean.HrmPrmExperienceDtlBean" indexId="idx" >
                        
                         <logic:notEqual name="HrmPrmExpSc" property="status" value="D">
                         <tr>
                              <TD class=tableText width="1%"><html:checkbox property="checked" value="check"  onclick='<%="boxClicked("+idx.toString()+")"%>' />
                              <html:hidden property="status"  name="HrmPrmExpSc" />
                              <html:hidden property="detailId"  name="HrmPrmExpSc" />
                              <html:hidden property="itemChecked" name="HrmPrmExpSc" /></TD>
                              <TD class=tableText ><html:text name="HrmPrmExpSc" property="startField"  styleClass="required" onkeydown="isInteger(event)" readonly="true"  maxlength="3" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:text name="HrmPrmExpSc" property="endField" styleClass="required" onkeydown="isInteger(event)"  maxlength="3" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:select name="HrmPrmExpSc" property="txtAccBasis" styleClass="required" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+");doBaseValidate();"%>'  >
                                                     <html:option value="" ><bean:message key="hrm.pleaseSelect" /></html:option>
                                                     <html:option value="M" ><bean:message key="hrm.HrmExperienceScore.M" /></html:option>
                                                     <html:option value="F" ><bean:message key="hrm.HrmExperienceScore.F" /></html:option>
                                                   </html:select></td>
                             <logic:equal property="txtAccBasis" value="" name="HrmPrmExpSc" >
                                        <TD class=tableText ><html:text name="HrmPrmExpSc" property="txtMonthsExp" styleClass="optional" readonly="true" onkeydown="isInteger(event)" maxlength="3" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                             </logic:equal>
                             <logic:equal property="txtAccBasis" value="M" name="HrmPrmExpSc" >
                                        <TD class=tableText ><html:text name="HrmPrmExpSc" property="txtMonthsExp" styleClass="required" onkeydown="isInteger(event)" maxlength="3" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                             </logic:equal>
                             <logic:equal property="txtAccBasis" value="F" name="HrmPrmExpSc" >
                                        <TD class=tableText ><html:text name="HrmPrmExpSc" property="txtMonthsExp" styleClass="optional" readonly="true" onkeydown="isInteger(event)" maxlength="3" style="width:100%" value="" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                             </logic:equal>
                                <TD class=tableText ><html:text name="HrmPrmExpSc" property="txtPointsAwarded" styleClass="required" onkeydown="isFloat(event)" maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                          </tr>
                           </logic:notEqual>
                           <logic:equal name="HrmPrmExpSc" property="status" value="D">
                         <tr>
                               <TD class=tableText width="1%"><html:checkbox property="checked" value="check"  onclick='<%="boxClicked("+idx.toString()+")"%>' />
                              <html:hidden property="status"  name="HrmPrmExpSc" />
                              <html:hidden property="detailId"  name="HrmPrmExpSc" />
                              <html:hidden property="itemChecked" name="HrmPrmExpSc" /></TD>
                              <TD class=tableText ><html:text name="HrmPrmExpSc" property="startField" readonly="true" styleClass="deletedRow"  onkeydown="isFloat(event)" maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:text name="HrmPrmExpSc" property="endField" readonly="true" styleClass="deletedRow" onkeydown="isFloat(event)"  maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:select name="HrmPrmExpSc" property="txtAccBasis"  styleClass="deletedRow" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+")"%>'>
                                                     <html:option value="" ></html:option>
                                                     <html:option value="M" ><bean:message key="hrm.HrmExperienceScore.M" /></html:option>
                                                     <html:option value="F" ><bean:message key="hrm.HrmExperienceScore.F" /></html:option>
                                                   </html:select></td>
                               <TD class=tableText ><html:text name="HrmPrmExpSc" readonly="true" property="txtMonthsExp" styleClass="deletedRow" onkeydown="isFloat(event)" maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                <TD class=tableText ><html:text name="HrmPrmExpSc" readonly="true" property="txtPointsAwarded" styleClass="deletedRow" onkeydown="isFloat(event)" maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></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>

<!-- Container Table Ends -->
<html:hidden name="HrmPrmExperienceScoreForm" property="screenName" value="HrmPrmExperienceScore" />
<html:hidden name="HrmPrmExperienceScoreForm" property="forwardedPage" />
<html:hidden name="HrmPrmExperienceScoreForm" property="positionRequested"  />
<html:hidden name="HrmPrmExperienceScoreForm" property="screenMode"  />
<html:hidden name="HrmPrmExperienceScoreForm" property="firstLoad"  />
<html:hidden property="headerPrimaryKey" name="HrmPrmExperienceScoreForm"  />
<html:hidden property="designationId" name="HrmPrmExperienceScoreForm"  />

<html:hidden property="txtSearchFields" name="HrmPrmExperienceScoreForm"  />
<html:hidden property="txtDisplayFields" name="HrmPrmExperienceScoreForm"  />
<html:hidden property="txtIndex" name="HrmPrmExperienceScoreForm"  />
<html:hidden property="userPageRequested" />
<html:hidden property="userPositionRequested"  />
<html:hidden property="pageRequested" />
<html:hidden property="lovKey" name="HrmPrmExperienceScoreForm"  />
<html:hidden property="detailDataChanged" name="HrmPrmExperienceScoreForm" />
<html:hidden property="headerDataChanged" name="HrmPrmExperienceScoreForm" value="false"/> 
<html:hidden property="addIncrValue" name="HrmPrmExperienceScoreForm" value="1" />
<!-- Hidden fields for Header LOV -->
</html:form>
</body>
</html:html>
<script>
function doQueryMode()
{

  return "HrmPrmExpScQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmPrmExpScNewModeAction.do";
}


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

function doSave()
{

  return "HrmPrmExpScSaveAction.do";
  
}

function doDelete()
{

  return "HrmPrmExpScDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmPrmExpScRefreshAction.do";
  
}

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

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

function doJumpHeader()
{
  return "HrmPrmExpScGetNextHeaderAction.do"; 
}
function doExit()
{
  return "HrmPrmESExitAction.do"; 
}

function doGetDetail()
{

  return "HrmPrmExpScGetDetailAction.do";
}

function doAddRow()
{

  return "HrmPrmExpScAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

  return "HrmPrmExpScGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmPrmExpScGetDetailPageAction.do";
}

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


function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmExpScOnLoadAction.do"; 
  }
}

function ShowGrade()
{
        document.forms[0].lovKey.value = "PrmExpScrGrade" + "HrmPrmExperienceScoreForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmPrmKPARating.gradeCode,hrm.HrmPrmKPARating.gradeDesc";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,gradeCode,gradeDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmExperienceScoreForm');
        return true;
}

function ShowDesignation()
{
        document.forms[0].lovKey.value = "PrmExpScrDesig" + "HrmPrmExperienceScoreForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmPrmKPARating.desigCode,hrm.HrmPrmKPARating.desigDesc";
        document.forms[0].txtDisplayFields.value = "designationId,desigCode,desigDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmExperienceScoreForm');
        return true;
}

function doValidate()
{
 return "HrmPrmESValidateAction.do"; 
}
function doOnChangeLov(lovName)
{
if(lovName=="PrmExpScrGradeHrmPrmExperienceScoreFormQ")
{
 doBaseValidate();
}
}
</script>