<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*,com.csc.library.report.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*,com.csc.library.report.ReportUDF"  %>
<jsp:useBean id="AS004_4_M" class="com.csc.library.system.Task" scope="page"/>
<%
	AS004_4_M.setChannel(request,response);
	UIManager screen = (UIManager) AS004_4_M.process("ProcessEntry","Process");
	CheckNull chk = new CheckNull();
	if(chk.chkNullString(request.getParameter("__cmd")).equals("process")){
			screen.process();
	}
%>

<jsp:useBean id="ASP714" class="com.csc.library.system.Task" scope="page"/>
<%
	ASP714.setChannel(request,response);
	UIManager screens = (UIManager) ASP714.process("SingleEntry","ASP714");
	screens.referLangOff();

	String sequence = StaticConfig.getConfigCompany(screen.getUProfile(),"SEQUENCE_360");
	String appyear = StaticConfig.getConfigCompany(screen.getUProfile(),"YEAR_360");

	DbInquiry inq = new InitialInquiry(screen.getUProfile()).getDbInquiry("TAPSTRAN0");
	inq.setFilter(" ACTIVE_STATUS = '1' and ASTID = 'AP40' and APSYEAR = '"+appyear+"' and sequence ='"+sequence+"'");
	inq.refresh();
	inq.next();

	int recdoc = inq.recCount();
%>
<html>
<head>
<title>Appraisal</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">

<script  language="JavaScript" src="../JS/SCREEN.js"></script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script language='javascript' src='../JS/HOTKEY.js'></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="javascript" src='../JS/DATEINPUT.js'></script>
<script language="javascript" src='../JS/VIEWCALENDAR.js'></script>
<script language="javascript" src='../JS/jquery-2.1.3.min.js'></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>

<script language="javascript">

function GoSave(){
	var recdoc = <%=recdoc%>;
	if($("select[name='__astid']").val() == "AP40"){
		if(recdoc >= 1){
			alert("มีเอกสารการประเมินของปีและรอบนี้อยู่แล้ว");
		}else{
			setFormlist();
			confirmSave();
		}
	}else{
		setFormlist();
		confirmSave();
	}
}
function GoDelete(){ edelete(); }
function GoSearch(){search();}
function GoUpdate(){update();}
function checkCF(){ checkConfirm(); }
function addOption(objOption) {
	addToOption(objOption,getMyoption()) ;
}
function getMyoption(){
	return document.forms[0].__asformlist;
}
function addToOption(objOption,destList){
    var lengthAll=parseInt(objOption.length)+parseInt(destList.options.length);
	newDestList = new Array( lengthAll );
	for( var i = destList.options.length - 1; i >= 0; i-- ){
		if ( destList.options[i] != null  ){
		   destList.options[i] = null;
		}
	}
	var clen=0;
	for( len = 0; len <destList.options.length; len++ ){
		if ( destList.options[ len ] != null ){
			newDestList[ len ] = new Option( destList.options[ len ].text, destList.options[ len ].value, destList.options[ len ].defaultSelected, destList.options[ len ].selected );
			clen++;
		}
	}
	for ( var j = 0 ; j < objOption.length; j++ ){
		if ( objOption[ j ] != null ){
			newDestList[ clen ] = objOption[ j ];
			clen++;
		}
	}
	newDestList.sort( compareOptionValues );
	writeToOption(newDestList,destList);
}
function compareOptionValues(a, b){
  var sA = parseInt( a.value, 36 );
  var sB = parseInt( b.value, 36 );
  return sA - sB;
}
function writeToOption(newDestList,destList){
	for ( var j = 0; j < newDestList.length; j++ ){
		if ( newDestList[ j ] != null ){
			destList.options[ j ] =new Option(newDestList[ j ].text,newDestList[ j ].value);
		}
	}
}
function delOption(){
	with(document.cscform){
		for(i=__asformlist.options.length;i>0;i--){
			if(__asformlist.options[i-1].selected){
				__asformlist.options[i-1]=null;
			}
		}
	}
}
function goHelp(helpName,inputName){
	with(document.cscform){
		var helpReturn;
		var temp="";
		if(inputName=="__apsreference" ){
			helpReturn=inputName+":apsid";
		}else if(inputName=="__astid" ){
			helpReturn=inputName+":astid,MASTYPE@TDESC";
		}else	if(inputName=="__condition$GRP$1" || inputName=="__condition$GRP$2"){
			helpReturn=inputName+":GROUPID";
		}else	if(inputName=="__condition$EMP$1" || inputName=="__condition$EMP$2"){
			temp = __fixCon.value;
			__fixCon.value="status not in ('X','Y','U')";
			helpReturn=inputName+":EMPLOYEEID";
		}else	if(inputName=="__condition$BU1$1"  || inputName=="__condition$BU1$2"){
			helpReturn=inputName+":BU1ID";
		}else	if(inputName=="__condition$BU2$1"  || inputName=="__condition$BU2$2"){
			helpReturn=inputName+":BU2ID";
		}else	if(inputName=="__condition$BU3$1"  || inputName=="__condition$BU3$2"){
			helpReturn=inputName+":BU3ID";
		}else if(inputName=="__condition$BU4$1"  || inputName=="__condition$BU4$2"){
			helpReturn=inputName+":BU4ID";
		}else	if(inputName=="__condition$POS$1" || inputName=="__condition$POS$2"){
			helpReturn=inputName+":POSITIONID";
		}else	if(inputName=="__condition$JOB$1"  || inputName=="__condition$JOB$2"){
			helpReturn=inputName+":JOBCODEID";
		}else	if(inputName=="__condition$BRANCH$1" || inputName=="__condition$BRANCH$2"){
			helpReturn=inputName+":BRANCHID";
		}else	if(inputName=="__condition$SAL$1" || inputName=="__condition$SAL$2")	{
			helpReturn=inputName+":CODEID";
		}else	if(inputName=="__condition$GROUPGRADE"){
			helpReturn=inputName+":GGID";
		}else if(inputName=="__condition$ASTYPE"){
			helpReturn=inputName+":ASTID,astypedesc:tdesc";
		}else	if(inputName=="__condition$PL$1"  || inputName=="__condition$PL$2"){
			helpReturn=inputName+":PLID";
		}
		linkHelp_Return(helpName,helpReturn);
		__fixCon.value=temp;
	}
}
function showHelp(page){
	window.open(page,"Help","left=150,top=150,width=700,height=500,toolbar=no,status=no,scrollbars=yes");
}
function process() {
	setFormlist();
	with(document.cscform){
		__condition$DOCNO.value = __apsid.value;
		__condition$TDESC.value = __tdesc.value;
		__condition$EDESC.value = __edesc.value;
		__condition$ASD$1.value = __apsstartdate.value;
		__condition$ASD$2.value = __apsenddate.value;
		__condition$ASP$1.value = __apsperiodstart.value;
		__condition$ASP$2.value = __apsperiodend.value;
		__condition$ASTYPE.value = __astid.value;
		__condition$FORMS.value = __form.value;
		__condition$CONFIRM_STAT.value = (__confirm_stat[0].checked)?__confirm_stat[0].value:__confirm_stat[1].value;


		if(__apsid.value=='' ){
			alert(MyCode[0]);
			__apsid.select();
		}else if(__tdesc.value=='' ){
			alert(MyCode[0]);
			__tdesc.select();
		}else if(__apsstartdate.value=='' ){
			alert(MyCode[0]);
			__apsstartdate.select();
		}else if(__apsenddate.value=='' ){
			alert(MyCode[0]);
			__apsenddate.select();
		}else if(__apsperiodstart.value=='' ){
			alert(MyCode[0]);
			__apsperiodstart.select();
		}else if(__apsperiodend.value=='' ){
			alert(MyCode[0]);
			__apsperiodend.select();
		}else if(__astid.value=='' ){
			alert(MyCode[0]);
			__astid.select();
		}else{
			bCon=confirm(MyCode[167]);
			if (bCon==true)	{
				if(__condition$ASTYPE.value == "AP10" || __condition$ASTYPE.value == "AP30"){
					__prclass.value = "GenApprisalTransaction";
					__cmd .value = "process";
					submit();
				}else if(__condition$ASTYPE.value == "RC10"){
					__prclass.value = "GenApprisalRecruit";
					__cmd .value = "process";
					submit();
				}else {
					alert("ไม่สามารถสร้างแบบประเมินได้");
				}
			}
		}
	}
}

EngCode[167]= " Confirm Process Move To History ";
ThaiCode[167]= "  ยืนยันการสร้างการประเมิน ";

function setFormlist(){
	var tmp="";
    with(document.cscform){
		for ( var j = 0 ; j < __asformlist.length; j++ ){
			tmp+=__asformlist.options[j].value+",";
    	}
		__form.value=tmp;
	}
}

	function setyearandseq(){
		var year,seq ="";
		if($("select[name='__astid']").val() == "AP40"){ /* 360 SENA */
			year = "<%=StaticConfig.getConfigCompany(screen.getUProfile(),"YEAR_360")%>";
			seq = "<%=StaticConfig.getConfigCompany(screen.getUProfile(),"SEQUENCE_360")%>";
			$("input[name='__apsyear'],input[name='__sequence']").attr("readonly","readonly");
			//if($("input[name='__apsid']").val()==""){
				$("input[name='__apsyear']").val(year);
				$("input[name='__sequence']").val(seq);
			//}
			$(".seq").show();
		}else if($("select[name='__astid']").val() == "AP10"){ /* ประเมินประจำปี SENA */
			year = "<%=StaticConfig.getConfigCompany(screen.getUProfile(),"YEAR_UPPER")%>";
			seq = "<%=StaticConfig.getConfigCompany(screen.getUProfile(),"SEQUENCE_UPPER")%>";
			$("input[name='__apsyear'],input[name='__sequence']").attr("readonly","readonly");
			//if($("input[name='__apsid']").val()==""){
				$("input[name='__apsyear']").val(year);
				$("input[name='__sequence']").val(seq);
			//}
			$(".seq").show();
		}else{
			$("input[name='__apsyear'],input[name='__sequence']").removeAttr("readonly");
			//$("input[name='__apsyear']").val("");
			$("input[name='__sequence']").val("1");
			$(".seq").hide();
		}
	}
	$(document).ready(function(){
		setyearandseq();
		$("select[name='__astid']").on("change",function(){
			setyearandseq();
		});
	});
</script>
<style>
	.seq{
		display:none;
	}
</style>

</head>
<body leftmargin="0" topmargin="0" >
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="AS004_4_M.jsp">
<!----------BEGIN CSC INITIAL ZONE ------------------------>
<%=screens.InitialVariable()%>
<!----------END CSC INITIAL ZONE -------------------------->

<input type="hidden"	name="__screen" value="AS004_4_M">
<input type="hidden" 	name="__calendar" value="">
<input type="hidden"	name="__help" value="">
<input type="hidden" 	name="__user" value="<%=screen.getUProfile().getUserId()%>">
<input type="hidden" 	name="__tname" value="สร้างรายการประเมิน">
<input type="hidden" 	name="__ename" value="Create Assess">
<input type="hidden" 	name="__ptype" value="">
<input type="hidden" 	name="__prclass"	value="GenApprisalTransaction">
<input type="hidden"	name="__sysisedit" value="">
<input type="hidden"	name="__cmd" value="">
<input type="hidden"	name="__fixCon" value="">
<input type="hidden"	name="__language" value ="<%=screen.getUProfile().get("lang")%>">
<input type="hidden"	name="__companyid"	value="<%=screen.getUProfile().get("companyid")%>">
<input type="hidden"	name="__condition$process_type" value="clear">
<input type="hidden"	name="__condition$gradeyear" value="">

<input type="hidden"	name="__condition$DOCNO" value="">
<input type="hidden"	name="__condition$ASSESSMENTID" value="">
<input type="hidden"	name="__condition$TDESC" value="">
<input type="hidden"	name="__condition$EDESC" value="">
<input type="hidden"	name="__condition$ASD$1" value="">
<input type="hidden"	name="__condition$ASD$2" value="">
<input type="hidden"	name="__condition$ASP$1" value="">
<input type="hidden"	name="__condition$ASP$2" value="">
<input type="hidden"	name="__condition$ASTYPE" value="">
<input type="hidden"	name="__condition$FORMS" value="">
<input type="hidden"	name="__condition$CONFIRM_STAT" value="">

<input type="hidden" name="__notNull" value="<%=screens.getRequire()%>">
<input type="hidden" name="__form" value="<%=screens.getDataLabel("form")%>">

<input type="hidden" name="issave" value="">
<SCRIPT LANGUAGE="JavaScript">getInputFormatDate();</SCRIPT>
<script language="JavaScript">document.write(Icons());</script>
<br>
<div align="center">
<!-- ตารางกำหนดผู้ประเมิน -->
<table  cellpadding="0"  cellspacing="0" class="inner">
	<tr >
		<td  class="header">AS004_4_M ,<script language="javascript">swapLang('จัดการข้อมูลเอกสารประเมินผล');</script></td>
    </tr>
    <tr >
		<td align="center">
		<table   class="maxsize" cellpadding="0" cellspacing="0" border="1">
              <tr>
					<td colspan="2"  class="blankspace"></td>
              </tr>
              <tr>
					<td  class="columnlabel"><%=screens.getLabel("apsid")%>&nbsp;</td>
					<td ><%=screens.getInput("apsid")%> </td>
              </tr>
			  <tr>
					<td  class="columnlabel"><%=screens.getLabel("apsreference")%>&nbsp;</td>
					<td ><%=screens.getInput("apsreference")%><A href="javascript: goHelp('HAPSTRAN0HELP','__apsreference');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__assessmentid_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__assessmentid_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
              </tr>
			  <tr>
					<td  class="columnlabel"><%=screens.getLabel("apsyear")%>&nbsp;</td>
					<td>
						<%=screens.getInput("apsyear")%>
						<span class="seq">
							<%=screens.getLabel("Sequence")%>
							<%=screens.getInput("Sequence")%>
						</span>
					</td>
              </tr>
              <tr>
					<td  class="columnlabel"><%=screens.getLabel("tdesc")%>&nbsp;</td>
					<td > <%=screens.getInput("tdesc")%></td>
              </tr>
			  <tr>
					<td  class="columnlabel"><%=screens.getLabel("edesc")%>&nbsp;</td>
					<td > <%=screens.getInput("edesc")%> </td>
              </tr>
			  <tr>
					<td  class="columnlabel"><script language="javascript">swapLang("Apprisal Date");</script>&nbsp;</td>
					<td ><%=screens.getInput("apsstartdate")%><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="calendar" name="Image1" border="0" align="absmiddle" id="Image1" onClick="viewCal('__apsstartdate')"></a>-<%=screens.getInput("apsenddate")%><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="calendar" name="Image2" border="0" align="absmiddle" id="Image2" onClick="viewCal('__apsenddate')"></a></td>
              </tr>
			  <tr>
					<td  class="columnlabel"><script language="javascript">swapLang("Apprisal Period");</script>&nbsp;</td>
					<td ><%=screens.getInput("apsperiodstart")%><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="calendar" name="Image3" border="0" align="absmiddle" id="Image3" onClick="viewCal('__apsperiodstart')"></a>-<%=screens.getInput("apsperiodend")%><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="calendar" name="Image4" border="0" align="absmiddle" id="Image4" onClick="viewCal('__apsperiodend')"></a></td>
              </tr>
			   <tr>
					<td  class="columnlabel"><%=screens.getLabel("astid")%>&nbsp;</td>
					<td ><%=screens.getInput("astid")%></td>
              </tr>
			  <tr>
					<td class="columnlabel"><script language="javascript">swapLang("Form");</script>&nbsp;</td>
					<td><select name="__asformlist" style="width:350px" size="5"></select>
					<a href="javascript:showHelp('AS09HELP2.jsp');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image421','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img SRC="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="รายการกลุ่มหัวข้อประเมินผล" name="Image421" border="0" align="absmiddle" id="Image42"></a>
					<a href="javascript:delOption();" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image422','','../IMAGES/BUTTON/SWAP/DEL_SWAP20.gif',1)"><img SRC="../IMAGES/BUTTON/MAIN/DEL20.gif" alt="รายการกลุ่มหัวข้อประเมินผล" name="Image422" border="0" align="absmiddle" id="Image42"></a></td>
			  </tr>
			   <tr style="display:none">
					<td  class="columnlabel"><%=screens.getLabel("confirm_stat")%>&nbsp;</td>
					<td ><%=screens.getInput("confirm_stat")%></td>
              </tr>
			  <tr>
					<td  class="columnlabel"><%=screens.getLabel("active_status")%>&nbsp;</td>
					<td ><%=screens.getInput("active_status")%></td>
              </tr>
			  <tr >
                <td colspan="2" class="blankspace"></td>
              </tr>
			 <script language="javascript">
				<%
					String form[] = screens.getDataLabel("form").split(",");
				%>
					var   newDatalist  = new Array(<%=form.length%>);
				<%
					DataSet ds_type = new DataSet();
					for(int i=0;i<form.length;++i){
						ds_type.setInfo("select tdesc,edesc from masform where asfid = '"+form[i]+"'",(String)screens.getUProfile().get("dbname"),"masform");
						ds_type.initConnection(screens.getUProfile());
						if(ds_type.next()){
				%>
							newDatalist[<%=i%>] = new Option( '<%=form[i]%>'+"            "+'<%=ds_type.getString("tdesc")%>', '<%=form[i]%>') ;
				<%
						}
					}
					ds_type.closeConnection();
				%>
					this.addOption(newDatalist);
		     </script>
		</table>
		<table class="maxsize" cellpadding="0" cellspacing="0" border="1">
		  <tr style="display:none">
				<td colspan="2" class="blankspace"></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel" width="20%"><script language="javascript">swapLang("Employee ID");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$EMP$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('รหัสพนักงานเริ่มต้น')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="รหัสพนักงานเริ่มต้น"  > <A href="javascript: goHelp('MEMPLOYEEHELP_APS','__condition$EMP$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__emp1_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__emp1_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$EMP$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('รหัสพนักงานสิ้นสุด')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="รหัสพนักงานสิ้นสุด"  > <A href="javascript: goHelp('MEMPLOYEEHELP_APS','__condition$EMP$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__emp2_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__emp2_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Employee Group Code");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$GRP$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('กลุ่มพนักงานเริ่มต้น')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkNotThaiChaOnly();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="กลุ่มพนักงานเริ่มต้น"  > <A href="javascript: goHelp('MGROUPHELP','__condition$GRP$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__grp1_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__grp1_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$GRP$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('กลุ่มพนักงานสิ้นสุด')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="กลุ่มพนักงานสิ้นสุด"  > <A href="javascript: goHelp('MGROUPHELP','__condition$GRP$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__grp2_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__grp2_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Begin work date");</script>&nbsp;</td>
            <td><input type="text" name="__condition$STARTDATE$1" size="10" maxlength="8" onKeyup = "formatDate(this)" onBlur = "chkInputDate2(this,__condition$STARTDATE$2)" onKeypress = "chkIntegerOfDate(this.value)" onMouseOver="toolTip('วันเริ่มต้น')" onMouseOut="toolTip()">
              <a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image31','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__condition$STARTDATE$1');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image31" width="20" height="20" border="0" align="absmiddle"></a>&nbsp;-
              <input type="text" name="__condition$STARTDATE$2" size="10" maxlength="8" onKeyup = "formatDate(this)" onBlur = "chkInputDate2(__condition$STARTDATE$1,this)" onKeypress = "chkIntegerOfDate(this.value)" onMouseOver="toolTip('วันสิ้นสุด')" onMouseOut="toolTip()">&nbsp;<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image32','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" onClick="viewCal('__condition$STARTDATE$2');"><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image32" width="20" height="20" border="0" align="absmiddle"></a></td>
          </tr>
		  <%
			DbInquiry memployee = new InitialInquiry(screens.getUProfile()).getDbInquiry("memployee");
			memployee.setColumn("employeeid,companyid,bu1,bu2,bu3,bu4,bu5");
			memployee.refresh();

			DbRecord mbu = memployee.getCurrentDbRecord();
		  %>
          <tr style="display:none">
            <td nowrap class="columnlabel"><%=mbu.getField("bu1").getDescription()%>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$BU1$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('สาย')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="สาย"  > <A href="javascript: goHelp('MBU1HELP','__condition$BU1$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu11_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu11_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$BU1$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('สาย')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="สาย"  > <A href="javascript: goHelp('MBU1HELP','__condition$BU1$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu12_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu12_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><%=mbu.getField("bu2").getDescription()%>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$BU2$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ฝ่าย')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ฝ่าย"  > <A href="javascript: goHelp('MBU2HELP','__condition$BU2$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu21_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu21_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$BU2$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ฝ่าย')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ฝ่าย"  > <A href="javascript: goHelp('MBU2HELP','__condition$BU2$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu22_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu22_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><%=mbu.getField("bu3").getDescription()%>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$BU3$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('งาน')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="งาน"  > <A href="javascript: goHelp('MBU3HELP','__condition$BU3$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu31_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu31_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$BU3$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('งาน')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="งาน"  > <A href="javascript: goHelp('MBU3HELP','__condition$BU3$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu32_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu32_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
		  <tr style="display:none">
            <td nowrap class="columnlabel"><%=mbu.getField("bu4").getDescription()%>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$BU4$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="งาน"  > <A href="javascript: goHelp('MBU4HELP','__condition$BU4$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu41_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu41_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$BU4$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('งาน')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="งาน"  > <A href="javascript: goHelp('MBU4HELP','__condition$BU4$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__bu42_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__bu42_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Position");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$POS$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ตำแหน่ง')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ตำแหน่ง"  > <A href="javascript: goHelp('MPOSITIONHELP','__condition$POS$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__pos1_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__pos1_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$POS$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ตำแหน่ง')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ตำแหน่ง"  > <A href="javascript: goHelp('MPOSITIONHELP','__condition$POS$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__pos2_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__pos2_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Job Description");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$JOB$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ลักษณะงาน')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ลักษณะงาน"  > <A href="javascript: goHelp('MJOBCODEHELP','__condition$JOB$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__job1_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__job1_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$JOB$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('ลักษณะงาน')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="ลักษณะงาน"  > <A href="javascript: goHelp('MJOBCODEHELP','__condition$JOB$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__job2_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__job2_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
          <tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Branch");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$BRANCH$1' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('บริษัท')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="บริษัท"  > <A href="javascript: goHelp('MBRANCHHELP','__condition$BRANCH$1');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__branch1_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__branch1_image" width="20" height="20" border="0" align="absmiddle"  ></a>&nbsp;-&nbsp;<INPUT TYPE='Text' Name='__condition$BRANCH$2' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('บริษัท')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="บริษัท"  > <A href="javascript: goHelp('MBRANCHHELP','__condition$BRANCH$2');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__branch2_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__branch2_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr>
		  <input type="hidden" name="__condition$GROUPGRADE" value="">
          <!--tr>
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Group Grade");</script>&nbsp;</td>
            <td><INPUT TYPE='Text' Name='__condition$GROUPGRADE' SIZE='10' MAXLENGTH='15' VALUE=''  onClick="" onChange="" onMouseOver="toolTip('กลุ่มเกรด')" onMouseOut="toolTip()" onKeyPress="chkSpecialStr();chkInteger();" onKeyUp="sysIsEdit();" dir="" onBlur="trimValue(this);" onFocus="this.select();" class="" alt="กลุ่มเกรด"  > <A href="javascript: goHelp('MGROUPGRADEHELP','__condition$GROUPGRADE');"  onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('__groupgrade_image','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__groupgrade_image" width="20" height="20" border="0" align="absmiddle"  ></a></td>
          </tr-->
		<tr style="display:none">
				<td class="blankspace" colspan="2"></td>
		</tr>
		<tr style="display:none">
            <td nowrap class="columnlabel"><script language="javascript">swapLang("Delete old data");</script>?</td>
            <td><%
						ReportUDF rf=new ReportUDF();
				  		String gstatus[]=rf.getSystemCode("OVERRIDE",screen.getUProfile().get("lang"));
						String keyvalue[];
						for(int n=0;n<gstatus.length;n++){	keyvalue=gstatus[n].split(",");
							out.print("<input type=\"radio\" name=\"__condition$OVERRIDE\" "+((n==1)?"checked":"")+" id=\"radio\" value=\""+keyvalue[0]+"\">"+keyvalue[1]);
						}
				  %>
			</td>
          </tr>
        </table>
		</td>
    </tr>
    <tr >
    	<td class="blankspace"></td>
    </tr>
    <tr style="display:none">
    	<td align="center"><a href="javascript:process();"><img src="../IMAGES/BUTTON/PROCESS.gif" border="0"></a></td>
    </tr>
    <tr >
    	<td class="blankspace"></td>
    </tr>
    <tr bordercolor="0069B3">
    	<td  class="bottom"></td>
    </tr>
</table>
<!-- สิ้นสุดตารางกำหนดผู้ประเมิน -->
</div>
<!----------BEGIN CSC ENDING ZONE ------------------------>
<%=screens.endJSP()%>
<!----------END CSC ENDING ZONE -------------------------->
</form>
</body>
</html>
