<%@ 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="HrmTestScoreBaseAction" name="HrmPrmTestScoreForm" type="wenrgise.hrms.webtier.form.HrmPrmTestScoreForm">
<bean:define id="ParentForm" name="HrmPrmTestScoreForm" 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.HrmTestScore.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.HrmTestScore.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="HrmPrmTestScoreForm" 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="optional" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butDesig" name="HrmPrmTestScoreForm" onclick="ShowDesignation();" /><html:text  property="desigDesc" altKey="hrm.HrmPrmKPARating.desigDesc" maxlength="255" size="40" styleClass="locked" onchange="doChangeHeader();" readonly="true" /></td> 
                  
                  
                  <td class="labelText"><bean:message key="hrm.HrmTestScore.examType"  /></td>
                  <td><html:select property="examType" styleClass="required"  onchange="doChangeHeader()" > 
                      <html:option value="" ><bean:message key="hrm.pleaseSelect" /></html:option>
                      <html:option value="W" ><bean:message key="hrm.HrmTestScore.written" /></html:option>
                      <html:option value="I" ><bean:message key="hrm.HrmTestScore.interview" /></html:option>
                      <html:option value="G" ><bean:message key="hrm.HrmTestScore.groupDiscussion" /></html:option>
                      
                      </html:select></td>
            </TR>
            
            <TR> 
                  <td class="labelText"><bean:message key="hrm.HrmTestScore.examDesc" /> </td>
                  <td><enrgise:text  property="examDesc"  altKey="hrm.HrmTestScore.examDesc" maxlength="60" size="26" styleClass="required" disabledClass="locked" onchange="doChangeHeader()" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmTestScore.maxScore" /></td>
                  <td><enrgise:text  property="maxScore" altKey="hrm.HrmTestScore.maxScore" maxlength="6" size="26" styleClass="required" disabledClass="locked" onkeydown="isFloat(event)" onchange="doChangeHeader()" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmTestScore.maxPoints" /></td>
                  <td><enrgise:text  property="maxPoints" altKey="hrm.HrmTestScore.maxPoints" maxlength="6" size="26" styleClass="required" disabledClass="locked" onkeydown="isFloat(event)" onchange="doChangeHeader()" /></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.HrmTestScore.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.HrmTestScore.txtScoreForm" /></td>   
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmTestScore.txtScoreTo" /></td>                                
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmTestScore.txtPoints" /></td>                                
                          </tr> 
                         <logic:iterate id="HrmPrmTC" name="HrmPrmTestScoreForm" property="aryLstPrmTestScore" type="wenrgise.hrms.bean.HrmPrmTestScoreDtlBean" indexId="idx" >
                        
                         <logic:notEqual name="HrmPrmTC" 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="HrmPrmTC" />
                              <html:hidden property="detailId"  name="HrmPrmTC" />
                              <html:hidden property="itemChecked" name="HrmPrmTC" /></TD>
                              <TD class=tableText ><html:text name="HrmPrmTC" property="startField" readonly="true" styleClass="required" onkeydown="isFloat(event)" maxlength="6" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:text name="HrmPrmTC" 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:text name="HrmPrmTC" property="txtPoints" 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="HrmPrmTC" 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="HrmPrmTC" />
                              <html:hidden property="detailId"  name="HrmPrmTC" />
                              <html:hidden property="itemChecked" name="HrmPrmTC" /></TD>
                              <TD class=tableText ><html:text name="HrmPrmTC" property="startField" styleClass="deletedRow" readonly="true" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:text name="HrmPrmTC" property="endField" styleClass="deletedRow" readonly="true" style="width:100%" size="14" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                              <TD class=tableText ><html:text name="HrmPrmTC" property="txtPoints" styleClass="deletedRow" readonly="true" 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 -->
<!-- Container Table Ends -->
<!-- These four hidden fields must be present in pages where there is a detail part -->
<html:hidden name="HrmPrmTestScoreForm" property="screenName" value="HrmPrmTestScore" />
<html:hidden name="HrmPrmTestScoreForm" property="forwardedPage" />
<html:hidden name="HrmPrmTestScoreForm" property="positionRequested"  />
<html:hidden name="HrmPrmTestScoreForm" property="screenMode"  />
<html:hidden name="HrmPrmTestScoreForm" property="firstLoad"  />
<html:hidden name="HrmPrmTestScoreForm" property="gradeId"  />
<html:hidden name="HrmPrmTestScoreForm" property="designationId"  />
<html:hidden property="headerPrimaryKey" name="HrmPrmTestScoreForm"  />
<html:hidden property="txtSearchFields" name="HrmPrmTestScoreForm"  />
<html:hidden property="txtDisplayFields" name="HrmPrmTestScoreForm"  />
<html:hidden property="txtIndex" name="HrmPrmTestScoreForm"  />
<html:hidden property="userPageRequested" />
<html:hidden property="userPositionRequested"  />
<html:hidden property="pageRequested" />
<html:hidden property="lovKey" name="HrmPrmTestScoreForm"  />
<html:hidden property="detailDataChanged" name="HrmPrmTestScoreForm" />
<html:hidden property="headerDataChanged" name="HrmPrmTestScoreForm" />
<html:hidden property="addIncrValue" name="HrmPrmTestScoreForm" value="0.01" />
<input type="hidden" name="queryParam" >


</html:form>
</body>
</html:html>
<script>
function doQueryMode()
{

  return "HrmPrmTCQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmPrmTCNewModeAction.do";
}


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

function doSave()
{

  return "HrmPrmTCSaveAction.do";
  
}

function doDelete()
{

  return "HrmPrmTCDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmPrmTCRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmPrmTCGetDetailAction.do";
}

function doAddRow()
{

  return "HrmPrmTCAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

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

  return "HrmPrmTCExitAction.do";  
}

function doNextDetail()
{

  return "HrmPrmTCGetDetailPageAction.do";
}

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


function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
function ShowGrade()
{
        document.forms[0].lovKey.value = "PrmTestScrGrade" + "HrmPrmTestScoreForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmPrmKPARating.gradeCode,hrm.HrmPrmKPARating.gradeDesc";
        document.forms[0].txtDisplayFields.value = "gradeId,gradeCode,gradeDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmTestScoreForm');
        return true;
}

function ShowDesignation()
{
        document.forms[0].lovKey.value = "PrmTestScrDesig" + "HrmPrmTestScoreForm" + 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" />','HrmPrmKPARatingForm');
        return true;
}


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

</script>