<%@ 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="HrmAprslSpcTmplForm" action="HrmAppSpcGoalsBaseAction" type="wenrgise.hrms.webtier.form.HrmAprslSpcTmplForm">
<bean:define id="ParentForm" name="HrmAprslSpcTmplForm" 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.ApprslSpcTemp.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 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.ApprslSpcTemp.splTemplateName" /></td>
            <td>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="N" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov_dis.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" />
            </logic:equal>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="U" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="locked" readonly="true" /><enrgise:img src="../includes/images/lov_dis.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" />
            </logic:equal>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="Q" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="optional" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" onclick="ShowSplTemplateName();" />
            </logic:equal>
            </td>
         
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.templateName" /></td>
            <td><html:text  property="templateName"  maxlength="15" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTemplateName" name="HrmAprslSpcTmplForm" onclick="ShowTemplateName();" /></td>
           
           </tr>
            <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.classHdr" /></td>
            <td><html:text  property="classHdr" altKey="hrm.ApprslSpcTemp.classHdr" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butClassHdr" name="HrmAprslSpcTmplForm" onclick="ShowClassHdr();" />
            <html:text  property="classHdrDesc" titleKey="hrm.ApprslSpcTemp.classHdrDesc" maxlength="10" size="35" styleClass="locked" readonly="true" /></td>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.classDtl" /></td>
            <td><html:text  property="classDtl" altKey="hrm.ApprslSpcTemp.classDtl" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butClassDtl" name="HrmAprslSpcTmplForm" onclick="ShowClassDtl();" />
            <html:text  property="classDtlDesc" titleKey="hrm.ApprslSpcTemp.classDtlDesc" maxlength="10" size="35" styleClass="locked" readonly="true" /></td>
            
          </tr>
           <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.siteCode" /></td>
            <td><html:text  property="siteCode" altKey="hrm.ApprslSpcTemp.siteCode" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butSiteCode" name="HrmAprslSpcTmplForm" onclick="ShowSiteCode();" />
            <html:text  property="siteDesc" titleKey="hrm.ApprslSpcTemp.siteDesc" maxlength="10" size="35" styleClass="locked"  readonly="true"  /></td>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.deptCode" /></td>
            <td><html:text  property="deptCode" altKey="hrm.ApprslSpcTemp.deptCode" maxlength="15" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butDeptCode" name="HrmAprslSpcTmplForm" onclick="ShowDeptCode();" />
            <html:text  property="deptDesc" titleKey="hrm.ApprslSpcTemp.deptDesc" maxlength="10" size="35" styleClass="locked"  readonly="true" /></td>
            
          </tr>
          <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.empNo" /></td>
            <td ><html:text  property="empNo" altKey="hrm.ApprslSpcTemp.empNo" maxlength="25" size="23" styleClass="optional" onchange="doChangeHeader();" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butEmpNo" name="HrmAprslSpcTmplForm" onclick="ShowEmpNo();" />
            <html:text  property="empName" titleKey="hrm.ApprslSpcTemp.empName" maxlength="10" size="35" styleClass="locked"  readonly="true"  /></td>
             <td class=labelText><bean:message key="hrm.ApprslSpcTemp.stOrderNo" /></td>
            <td ><html:text  property="stOrderNo" altKey="hrm.ApprslSpcTemp.stOrderNo" maxlength="25" size="23" styleClass="required" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butStOrderNo" name="HrmAprslSpcTmplForm" onclick="ShowStOrderNo();" /></td>
          
          </tr>
          <tr>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.fromDate" /></td>
            <td ><html:text  property="fromDate"  altKey="hrm.ApprslSpcTemp.fromDate" maxlength="15" size="23" styleClass="optional" readonly="true" onchange="doChangeHeader();"  /><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="icon" name="HrmAprslSpcTmplForm" property="butFromDate" onclick="showCalendar('fromDate',this)" /></td>
            
          <td class=labelText><bean:message key="hrm.ApprslSpcTemp.toDate" /></td>
            <td ><html:text  property="toDate" altKey="hrm.ApprslSpcTemp.toDate"  maxlength="15" size="23"  styleClass="optional" readonly="true" onchange="doChangeHeader();"  /><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="icon" name="HrmAprslSpcTmplForm" property="butToDate" onclick="showCalendar('toDate',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>
            <TABLE cellSpacing=0 cellPadding=0 >
              <tr>
                   <enrgise:tab name="HrmAprslSpcTmplForm" property="butKPATab" styleClass="disTabText" disabledClass="lockedTab" src="../includes/images/formtab_lb.gif"  onclick="doGetTab('HrmAprslSpcTmpl','HrmAppSpcGoalsGetTabAction.do');"  ><bean:message key="hrm.ApprslSpcTemp.kpa" /></enrgise:tab>
                   <enrgise:tab name="HrmAprslSpcTmplForm" property="butGoalsTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif"><bean:message key="hrm.ApprslSpcTemp.goals" /></enrgise:tab>
                  <td><enrgise:tab name="HrmAprslSpcTmplForm" property="butEmpEligTab" styleClass="disTabText" disabledClass="lockedTab" src="../includes/images/formtab_lb.gif" onclick="doGetTab('HrmAprslSpcTmplEmpElig','HrmAppSpcGoalsGetTabAction.do');" ><bean:message key="hrm.ApprslSpcTemp.empElig" /></enrgise:tab></td>
                   <td width="71%">&nbsp;</td>
           </tr> 
              <!-- Detail table Container starts -->
              <TD colSpan=11>
              <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="20%"><bean:message key="hrm.HrmHrmAppraisalKPA.txtSrlNo" /></td>
                          <TD class=tableHeader width="20%"><bean:message key="hrm.ApprslSpcTemp.Section" /></td>
                          <TD class=tableHeader width="20%"><bean:message key="hrm.ApprslSpcTemp.parentSection" /></td>
                          <TD class=tableHeader width="30%"><bean:message key="hrm.ApprslSpcTemp.goalsDesc" /></td>
                          <TD class=tableHeader width="20%"><bean:message key="hrm.ApprslSpcTemp.txtMesr" /></td>
                          <TD class=tableHeader width="20%"><bean:message key="hrm.ApprslSpcTemp.txtWtg" /></td>
                        </tr> 
                        
                       <logic:iterate id="apprslspc" name="HrmAprslSpcTmplForm" property="arylstAprslSpcTempGoals" type="wenrgise.hrms.bean.HrmAprslSpcTmplGoalDtlBean" indexId="idx">
                                
                            <logic:notEqual name="apprslspc" property="status" value="D" >                                                        
                                <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslSpcTmplForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>                                  
                                 
                                  <td ><html:text property="txtSrlNo" name="apprslspc"  styleClass="required"  size="26" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                  <td ><html:text property="txtSection" name="apprslspc"  styleClass="optional" readonly="true" size="23" style="width:80%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' />
                                  <logic:notEqual property="status" name="apprslspc" value="N" >
                                  <img src="../includes/images/lov_dis.jpg" name="apprslspc"  styleClass="icon" height="15" align="center" property="butSectionLOV"  alt="<%=idx.toString()%>" />  
                                  </logic:notEqual>
                                  <logic:equal property="status" name="apprslspc" value="N" >
                                  <enrgise:img src="../includes/images/lov.jpg" name="HrmAprslSpcTmplForm"  styleClass="icon" height="15" align="center" property="butSectionLOV"  alt="<%=idx.toString()%>" onclick=" return ShowSection(this.alt);" />  
                                  </logic:equal>
                                  </td>
                                  <td ><html:text property="txtParentSection" name="apprslspc"  styleClass="locked" readonly="true" size="26" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /> </td>
                                  <td><enrgise:text property="txtGoalsDesc" name="apprslspc" disabledClass="locked"  styleClass="required" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>
                                 
                                 
                                    <td><enrgise:text property="txtMesr" name="apprslspc"  styleClass="required" disabledClass="locked"  style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>  
                                   <td><html:text property="txtWtg" name="apprslspc"  styleClass="optional" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>                         
                                  <html:hidden name="apprslspc" property="txtSectionId" />
                                  <html:hidden name="apprslspc" property="detailId" />
                                  <html:hidden name="apprslspc" property="itemChecked" />
                                  <html:hidden name="apprslspc" property="status" />
                                  
                               </tr>
                        </logic:notEqual>
                       
                        <logic:equal name="apprslspc" property="status" value="D" >
                                
                                  <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslSpcTmplForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>                                  
                                 
                                  <td ><html:text property="txtSrlNo" name="apprslspc" readonly="true" styleClass="locked"  size="26" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                                  <td ><html:text property="txtSection" name="apprslspc" readonly="true" styleClass="locked"  size="23" style="width:80%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov_dis.jpg" name="apprslspc"  styleClass="icon" height="15" align="center" property="butSectionLOV"  alt="<%=idx.toString()%>"  /> </td>
                                  <td ><html:text property="txtParentSection" name="apprslspc" readonly="true" styleClass="locked"  size="26" style="width:100%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /> </td>
                                  <td><html:text property="txtGoalsDesc" name="apprslspc" readonly="true" styleClass="locked" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>
                                 
                                 
                                    <td><html:text property="txtMesr" name="apprslspc" readonly="true" styleClass="locked" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>  
                                   <td><html:text property="txtWtg" name="apprslspc" readonly="true" styleClass="locked" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>                         
                                  <html:hidden name="apprslspc" property="txtSectionId" />
                                  <html:hidden name="apprslspc" property="detailId" />
                                  <html:hidden name="apprslspc" property="itemChecked" />
                                  <html:hidden name="apprslspc" 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="HrmAprslSpcTmplForm" property="screenName" value="HrmAprslSpcTmplGoals" />
<html:hidden name="HrmAprslSpcTmplForm" property="forwardedPage" />
<html:hidden name="HrmAprslSpcTmplForm" property="positionRequested"  />
<html:hidden name="HrmAprslSpcTmplForm" property="screenMode" />
<html:hidden name="HrmAprslSpcTmplForm" property="headerPrimaryKey"/> 


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

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

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

<html:hidden property="templateNameId" name="HrmAprslSpcTmplForm" />
<html:hidden property="classHdrId" name="HrmAprslSpcTmplForm" />
<html:hidden property="classDtlId" name="HrmAprslSpcTmplForm" />
<html:hidden property="siteId" name="HrmAprslSpcTmplForm" />
<html:hidden property="deptId" name="HrmAprslSpcTmplForm" />
<html:hidden property="empId" name="HrmAprslSpcTmplForm" />
<html:hidden property="stOrderId" name="HrmAprslSpcTmplForm" />
<html:hidden property="buttonName" name="HrmAprslSpcTmplForm"  />
<html:hidden property="employeeId" name="HrmAprslSpcTmplForm" />
<html:hidden property="employeeName" name="HrmAprslSpcTmplForm" />
<html:hidden property="empLoyeeNumber" name="HrmAprslSpcTmplForm" />

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

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

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


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


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

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

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

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

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

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

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

function doGetDetail()
{

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

  return "HrmAppSpcGoalsExitAction.do";
}
function doAddRow()
{
  return "HrmAppSpcGoalsAddRowAction.do"; 
}

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


function doPrevDetail()
{

  return "HrmAppSpcGoalsGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmAppSpcGoalsGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmAppSpcGoalsGetDetailPageAction.do"; 
}
/*function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAppSpcGoalsOnLoadAction.do"; 
  }
}*/

function ShowSplTemplateName()
{
        document.forms[0].lovKey.value = "AprslSplTempName" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.splTemplateName";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,splTemplateName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}

function ShowTemplateName()
{
        document.forms[0].lovKey.value = "AprslTempName" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.templateName";
        document.forms[0].txtDisplayFields.value = "templateNameId,templateName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}
function ShowClassHdr()
{
    document.forms[0].lovKey.value = "AprslSpcClsHdr" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.classHdr";
    document.forms[0].txtDisplayFields.value = "classHdrId,classHdr,classHdrDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowClassDtl()
{
       
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].classHdrId.value +" " ;
    document.forms[0].lovKey.value = "AprslSpcClsDtl" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.classDtl";
    document.forms[0].txtDisplayFields.value = "classDtlId,classDtl,classDtlDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;

}
function ShowSiteCode()
{
        document.forms[0].lovKey.value = "AprslSpcSiteCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.siteCode";
    document.forms[0].txtDisplayFields.value = "siteId,siteCode,siteDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowDeptCode()
{
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].siteId.value +" " ;
    document.forms[0].lovKey.value = "AprslSpcDeptCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.deptCode";
    document.forms[0].txtDisplayFields.value = "deptId,deptCode,deptDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowEmpNo()
{
    document.forms[0].lovKey.value = "AprslSpcEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.empNo";
    document.forms[0].txtDisplayFields.value = "empId,empNo,empName";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowStOrderNo()
{
    document.forms[0].lovKey.value = "AprslStartOrd" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.stOrderNo";
    document.forms[0].txtDisplayFields.value = "stOrderId,stOrderNo,fromDate,toDate";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}

function ShowSection(i)
{
        document.forms[0].lovKey.value = "AprslGoalSecCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.Section";
        document.forms[0].txtDisplayFields.value = "txtSectionId,txtSection,txtParentSection";
        document.forms[0].txtIndex.value = i;
        showLov('<html:rewrite page="/HRMS/JSP/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}

function doApprove()
{
    document.forms[0].buttonName.value="butApprove";
    document.forms[0].action="/enrgise/HrmAprslSpcTmplButtonAction.do";
    document.forms[0].submit();
}
function doReject()
{
    document.forms[0].buttonName.value="butReject";
    document.forms[0].action="/enrgise/HrmAprslSpcTmplButtonAction.do";
    document.forms[0].submit();
}

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

</script>