<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.utilities.CscCalendar,com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@page import="com.csc.library.utilities.CscTime"%>
<%@page import="com.csc.library.database.DataSet,java.util.HashMap"%>
<%@page import="com.csc.library.session.*"%>
<%@page import="com.csc.library.components.ListBox"%>
<jsp:useBean id="AS105" class="com.csc.library.system.Task" scope="page" />
<%
	AS105.setChannel(request, response);
	HelpEntry screen = (HelpEntry) AS105.process("HelpEntry", "AS105");
	CheckNull chk = new CheckNull();
	int maxline = Integer.parseInt(chk.chkNullString(request.getParameter("__maxline"),"5"));
	screen.setMaxLine(maxline);
	screen.process();
	ThaiUtilities thai = new ThaiUtilities();

%>
<html ng-app="myHR">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<link href="../CSS/bootstrap.css" rel="stylesheet"  type="text/css">
<link href="../CSS/bootstrap_csc_backend.css" rel="stylesheet"  type="text/css">
<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
<script type='text/javascript' src="../JS/bootstrap.js"></script>
<script type='text/javascript' src='../JS/SCREEN.js'></script>
<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script type='text/javascript' src='../JS/DATEINPUT.js'></script>
<script type='text/javascript' src='../JS/VIEWCALENDAR.js'></script>
<script src="../JS/angular-1.3.15/angular.js"></script>
<script type='text/JavaScript' SRC='../JS/ANGULAR/SCREEN_ANGULAR.js'></script>
<script language="javascript">getTitleName();</script>

<!--DWR INCLUDE-->
<script type='text/javascript' src='/hr/dwr/engine.js'></script>
<script type='text/javascript' src='/hr/dwr/util.js'></script>
<script type='text/javascript' src='/hr/dwr/interface/MultiSaveTapstran.js'></script>
<!--DWR INCLUDE-->

<STYLE type=text/css>
FONT.holiday {
	FONT-FAMILY: "MS Sans Serif", sans-serif, "Microsoft Sans Serif";
	font-size: 12px;
	color: #FF00FF;
	}
FONT.week {
	/*FONT-FAMILY: "MS Sans Serif", sans-serif, "Microsoft Sans Serif";*/
	font-size: 12px;
	color: #FFA700;
	}
FONT.absent {
	FONT-FAMILY: "MS Sans Serif", sans-serif, "Microsoft Sans Serif";
	font-size: 12px;
	color: #FF0000;
	}

TD.tdholiday{
FONT-FAMILY: "MS Sans Serif", sans-serif, "Microsoft Sans Serif";
	background-color: FF9999;
	font-size: 12px;
	color: #3366CC;
	height: 14px;
	border: 1px solid #CCCCCC;
}

TABLE.rockSizeTable{
	width: 1100px;
	cell-spacing:0;

}
A {
	text-decoration: underline;
}

.absent A.absent {
	color: #FF0000;
	text-decoration: underline;
}
.holiday A.holiday {
	color: #FF00FF;
	text-decoration: underline;
}
.week A.week {
	color: #FFA700;
	text-decoration: underline;
}

td.colorRow0{
	background-color:#FFFFFF;
	border:1px solid #CCCCCC;
	color:#3366CC;
	font-size:12px;
	height:14px;
}
td.colorRow1{
	background-color:#EFEFEF;
	border:1px solid #CCCCCC;
	color:#3366CC;
	font-size:12px;
	height:14px;
}
td.header_aga{
	-moz-background-clip:border;
	-moz-background-inline-policy:continuous;
	-moz-background-origin:padding;
	background:#BBBBBB none repeat scroll 0 0;
	border:1px solid #BBBBBB;
	font-size:12px;
	font-weight:bold;
}
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
var sw = new swaplang2();
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a && i<a.length && (x=a[i]) && x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0 && parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n]) && d.all) x=d.all[n]; for (i=0;!x && i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x && d.layers && i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x  &&  d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
function linkDetail(empid, dateid, time0id){
	with (document.cscform){
		location = "TAU122.jsp?__employeeid="+empid+"&__dateid="+dateid+"&__time0id="+time0id+"&__search=true"+getAllCondition()+"&__whereCuz="+__fixCon.value;
	}
}
function getAllCondition(){
	var strReturn="";
	with (document.cscform){
		strReturn="&__emp1="+__emp1.value;
		strReturn+="&__emp2="+__emp2.value;
		strReturn+="&__bbu1="+__bu1.value;
		strReturn+="&__bbu2="+__bu2.value;
		strReturn+="&__bbu3="+__bu3.value;
		strReturn+="&__bbu4="+__bu4.value;
		strReturn+="&__bbu5="+__bu5.value;
		strReturn+="&__date1="+__date1.value;
		strReturn+="&__date2="+__date2.value;
	}
	return strReturn;
}
function addNew(){
	with (document.cscform){
		empid='';
		dateid='';
		time0id='';
		action = "TAU122.jsp?__employeeid="+empid+"&__dateid="+dateid+",&__time0id="+time0id;
		submit();
	}
}

function linkHelp_Return(help,input,filter){
	with(document.cscform){
		if (__fixCon.value!="")//{
			__fixCon.value=__fixCon.value;
		var nInput = input;
		if(input.indexOf(":")>0){
			nInput=input.substring(0,input.indexOf(":"));
		}
		obj = eval("document.cscform."+nInput);
		if(obj.value==""){
				var param="PRU084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__fixCon="+filter+"&__checkVerify=off";
		}else{
				var param="PRU084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__fixCon="+filter+"&__checkVerify=off"+"&__valueSearch="+obj.value;
		}
		window.open(param,"Help","left=150,top=150,width=650,height=450,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
	}
}


function goHelp(helpName,inputName,filter){
	var helpReturn;
	var fixcon;
	if(inputName.indexOf("__emp")>-1){
		helpReturn = inputName+":employeeid"
	}else if(inputName=="__apsid"){
		helpReturn = inputName+":apsid,"+inputName+"_desc:edesc";
	}else if(inputName.indexOf("__apsapprove1$")>-1 || inputName.indexOf("__apsapprove2$")>-1 || inputName.indexOf("__apsapprove3$")>-1){
		helpReturn = inputName+":employeeid,"+inputName+"_desc:fullname";
	}
	fixcon="";
	linkHelp_Return(helpName,helpReturn,fixcon);
}

function goHelpBu(helpName,inputName,filter){
	var helpReturn;
	var fixcon;
	if(inputName=="__bu1"){
		helpReturn = inputName+":bu1id,"+inputName+"_desc:edesc";
	}else	if(inputName=="__bu2"){
		helpReturn = inputName+":bu2id,"+inputName+"_desc:edesc";
	}else	if(inputName=="__bu3"){
		helpReturn = inputName+":bu3id,"+inputName+"_desc:edesc";
	}else	if(inputName=="__bu4"){
		helpReturn = inputName+":bu4id,"+inputName+"_desc:edesc";
	}else	if(inputName=="__bu5"){
		helpReturn = inputName+":bu5id,"+inputName+"_desc:edesc";
	}
	fixcon="";
	linkHelp_Return(helpName,helpReturn,fixcon);
}

function setSubmit(){
	var altEmp="Please Insert Employee 1 Less Employee 2";
	with(document.cscform){
		if(__language.value=="tha") altEmp="รหัสพนักงานช่องที่ 1 ต้องน้อยกว่าหรือเท่ากับรหัสพนักงานช่องที่ 2";
		if(__emp1.value <= __emp2.value){
			setFilter();
		}else alert(MyCode[101]);
	}
}

function initSubmit(){
	setSubmit();
}

function setFilter(){
	with(document.cscform){
		__cmd.value="search";
		var temp = __fixCon.value;
		var sqlApsyear="";
		var sqlAps="";
		var sqlEmp="";
		var sqlBu1="";
		var sqlBu2="";
		var sqlBu3="";
		var sqlBu4="";
		var sqlBu5="";

		if (__apsid.value.length>0){
			sqlAps = " apsid='"+__apsid.value+"' ";
		}else{ 
			__apsid_desc.value="";
		}
		
		if (__apsyear.value.length>0){
			sqlApsyear = " apsyear='"+__apsyear.value+"' ";
		}

		if (__emp1.value.length>0 && __emp2.value.length>0){
			sqlEmp = " (apsassessy between '"+__emp1.value+"' and '"+__emp2.value+"') ";
		}else if (__emp1.value.length>0 && __emp2.value.length==0){
			sqlEmp = " apsassessy='"+__emp1.value+"' ";
		}else if (__emp2.value.length>0 && __emp1.value.length==0){
			sqlEmp = " apsassessy='"+__emp2.value+"' ";
		}

		if (__bu1.value.length>0)
			sqlBu1 = " bu1='"+__bu1.value+"' ";
		else __bu1_desc.value="";

		if (__bu2.value.length>0)
			sqlBu2 = " bu2='"+__bu2.value+"' ";
		else __bu2_desc.value="";

		if (__bu3.value.length>0)
			sqlBu3 = " bu3='"+__bu3.value+"' ";
		else __bu3_desc.value="";

		if (__bu4.value.length>0)
			sqlBu4 = " bu4='"+__bu4.value+"' ";
		else __bu4_desc.value="";

		if (__bu5.value.length>0)
			sqlBu5 = " bu5='"+__bu5.value+"' ";
		else __bu5_desc.value="";

		var setFixcon = new Array(sqlApsyear,sqlAps,sqlEmp,sqlBu1,sqlBu2,sqlBu3,sqlBu4,sqlBu5);
		__fixCon.value = "";

		for(i=0; i<setFixcon.length; i++){
			if(setFixcon[i] != ""){
				__fixCon.value += setFixcon[i] + " and ";
			}
		}
		__fixCon.value = __fixCon.value.substring(0,__fixCon.value.length-5);

		submit();
	}
}

function clearData(objname1, objname2){
	with(document.cscform){
		eval(objname1).value = "";
		eval(objname2).value = "";
	}
}

function saveData(){
	with(document.cscform){
		var jsonData = setJsonData();
		MultiSaveTapstran.saveRecord(jsonData, function(data){
			alert(data);
		});
	}
}

function setJsonData(){
	with(document.cscform){
		var jsonData = '[';
		var comma = ',';
		for(var i=1 ; i<=maxline ; i++){
			if(i==maxline){
				comma = '';
			}
			jsonData += '{"apsyear":"'+eval("__apsyear$"+i).value+'",';
			jsonData += '"sequence":"'+eval("__sequence$"+i).value+'",';
			jsonData += '"apsid":"'+eval("__apsid$"+i).value+'",';
			jsonData += '"apsassessy":"'+eval("__apsassessy$"+i).value+'",';
			jsonData += '"apsapprove1":"'+eval("__apsapprove1$"+i).value+'",';
			jsonData += '"apsapprove2":"'+eval("__apsapprove2$"+i).value+'",';
		//	jsonData += '"apsapprove3":"'+eval("__apsapprove3$"+i).value+'",';
			jsonData += '"apsstate":"'+eval("__apsstate$"+i).value+'"}';
			jsonData += comma;
		}
		jsonData += ']';
		return jsonData;
	}
}

function clearFilter(){
	with(document.cscform){
		__apsyear.value = "";
		__apsid.value = "";
		__apsid_desc.value = "";
		__emp1.value = "";
		__emp2.value = "";
		__bu1.value = "";
		__bu1_desc.value = "";
		__bu2.value = "";
		__bu2_desc.value = "";
		__bu3.value = "";
		__bu3_desc.value = "";
		__bu4.value = "";
		__bu4_desc.value = "";
		__bu5.value = "";
		__bu5_desc.value = "";
		__valueSearch.value = "";
	}
}

</script>
</head>

<body leftmargin="0" topmargin="0" onLoad="MM_preloadImages('../IMAGES/BUTTON/SEARCH.gif')">
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" action="AS105.jsp" ng-controller="Swaplang as sw">

<!----------BEGIN CSC INITIAL ZONE ------------------------>
<%=screen.InitialVariable()%>
<!----------END CSC INITIAL ZONE -------------------------->

<input type="hidden" name="__screen" value="AS105">
<input type="hidden" name="__cmd" value="search">
<input type="hidden" name="__help" value="">
<input type="hidden" name="__goPage" value="">
<input type="hidden" name="__calendar">
<input type="hidden" name="__employeeid" value="">
<input type="hidden" name="__dateid" value="">
<input type="hidden" name="__time0id" value="">
<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>">
<input type="hidden" name="__orderBy" value="<%=request.getParameter("__orderBy")%>">
<input type="hidden" name="__helpReturn" value="<%=request.getParameter("__helpReturn")%>">
<input type="hidden" name="__helpName" value="<%=request.getParameter("__helpName")%>">
<input type="hidden" name="__pageCall" value="<%=request.getParameter("__screen")%>">
<input type="hidden" name="__fixCon" value="<%=request.getParameter("__fixCon")%>">
<input type="hidden" name="__jsonData" size="200" value="">
<script language="javascript">getInputFormatDate();</script>

	<%
		String emp1="",emp2="",apsyear="",apsid="",bu1="",bu2="",bu3="",bu4="",bu5="",apsid_desc="",bu1_desc="",bu2_desc="",bu3_desc="",bu4_desc="",bu5_desc="";
		if (request.getParameter("__emp1")!=null) emp1=request.getParameter("__emp1");
		if (request.getParameter("__emp2")!=null) emp2=request.getParameter("__emp2");
		if (request.getParameter("__apsyear")!=null) apsyear=request.getParameter("__apsyear");
		if (request.getParameter("__apsid")!=null) apsid=request.getParameter("__apsid");
		if (request.getParameter("__bu1")!=null) bu1=request.getParameter("__bu1");
		if (request.getParameter("__bu2")!=null) bu2=request.getParameter("__bu2");
		if (request.getParameter("__bu3")!=null) bu3=request.getParameter("__bu3");
		if (request.getParameter("__bu4")!=null) bu4=request.getParameter("__bu4");
		if (request.getParameter("__bu5")!=null) bu5=request.getParameter("__bu5");
		if (request.getParameter("__apsid_desc")!=null) apsid_desc=request.getParameter("__apsid_desc");
		if (request.getParameter("__bu1_desc")!=null) bu1_desc=request.getParameter("__bu1_desc");
		if (request.getParameter("__bu2_desc")!=null) bu2_desc=request.getParameter("__bu2_desc");
		if (request.getParameter("__bu3_desc")!=null) bu3_desc=request.getParameter("__bu3_desc");
		if (request.getParameter("__bu4_desc")!=null) bu4_desc=request.getParameter("__bu4_desc");
		if (request.getParameter("__bu5_desc")!=null) bu5_desc=request.getParameter("__bu5_desc");
	%>
	<br>
	<table height="" align="center" cellpadding="0" cellspacing="0"  border="1" class="largest">
		<tr bgcolor="#3366CC">
			<td  height="20" class="header" colspan="4">AS105, <script language="javascript">sw.write('SW003599');</script>&nbsp;</td>
  		</tr>
		<tr>
			<td class="blankspace" colspan="4"></td>
		</tr>
		<tr>
			<td align="right"><strong><%=screen.getLabel("apsyear")%>&nbsp;</strong></td>
			<td colspan="3"><input type="text" name="__apsyear" size="15" value="<%=apsyear%>"></td>
		</tr>
		<tr>
			<td align="right"><strong><%=screen.getLabel("apsid")%>&nbsp;</strong></td>
			<td colspan="3"><input type="text" name="__apsid" size="15" value="<%=apsid%>">
				<a href="javascript:goHelp('TAPSTRAN0HELP','__apsid','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image2"  border="0" align="absmiddle"></a>
				<input name="__apsid_desc" type="text" id="__apsid_desc" value="<%=thai.ASCII2Unicode(apsid_desc)%>" size="50" readonly=""> 
			</td>
		</tr>
		<tr>
			<td align="right"><strong><%=screen.getLabel("apsassessy")%>&nbsp;</strong></td>
			<td colspan="3"><input type="text" name="__emp1" size="15" value="<%=emp1%>">
				<a href="javascript:goHelp('MEMPLOYEEHELP','__emp1','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image2"  border="0" align="absmiddle"></a> &nbsp;&nbsp;-&nbsp;&nbsp;
				<input type="text" name="__emp2" size="15" value="<%=emp2%>">
				<a href="javascript:goHelp('MEMPLOYEEHELP','__emp2','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image3','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="Image3"  border="0" align="absmiddle"></a></td>
		</tr>
		<tr>
			<td align="right"><%=screen.getLabel("memployee","bu1")%>&nbsp;</td>
			<td colspan="3"><input type="text" name="__bu1" size="15" value="<%=bu1%>">
			<a href="javascript:goHelpBu('MBU1HELP','__bu1','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu1','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu1"  border="0" align="absmiddle"></a>
			<input name="__bu1_desc" type="text" value="<%=thai.ASCII2Unicode(bu1_desc)%>" size="50" readonly="">        </td>
		</tr>
		<tr>
			<td align="right"><%=screen.getLabel("memployee","bu2")%>&nbsp; </td>
			<td colspan="3"><input type="text" name="__bu2" size="15" value="<%=bu2%>">
			<a href="javascript:goHelpBu('MBU2HELP','__bu2','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu2','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu2"  border="0" align="absmiddle"></a>
			<input name="__bu2_desc" type="text" id="__bu2_desc" value="<%=thai.ASCII2Unicode(bu2_desc)%>" size="50" readonly="">      </td>
		</tr>
		<tr>
			<td align="right"><%=screen.getLabel("memployee","bu3")%>&nbsp;</td>
			<td colspan="3"><input type="text" name="__bu3" size="15" value="<%=bu3%>">
				<a href="javascript:goHelpBu('MBU3HELP','__bu3','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu3','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu3"  border="0" align="absmiddle"></a>
				<input name="__bu3_desc" type="text" value="<%=thai.ASCII2Unicode(bu3_desc)%>" size="50" readonly="">        </td>
		</tr>
		<tr>
			<td align="right"><%=screen.getLabel("memployee","bu4")%>&nbsp;</td>
			<td colspan="3"><input type="text" name="__bu4" size="15" value="<%=bu4%>">
				<a href="javascript:goHelpBu('MBU4HELP','__bu4','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu4','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu4"  border="0" align="absmiddle"></a>
				<input name="__bu4_desc" type="text" value="<%=thai.ASCII2Unicode(bu4_desc)%>" size="50" readonly="">        </td>
		</tr>
		<tr>
			<td align="right"><%=screen.getLabel("memployee","bu5")%>&nbsp;</td>
			<td colspan="3"><input type="text" name="__bu5" size="15" value="<%=bu5%>">
				<a href="javascript:goHelpBu('MBU5HELP','__bu5','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu5','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu5"  border="0" align="absmiddle"></a>
				<input name="__bu5_desc" type="text" value="<%=thai.ASCII2Unicode(bu5_desc)%>" size="50" readonly="">        </td>
		</tr>
		<tr>
			<td><div align="right"><script language="javascript">sw.write('SW000004');</script>&nbsp;</div></td>
			<td><%=screen.getTagOrder()%></td>
			<td><div align="right"><script language="javascript">sw.write('SW000005');</script>&nbsp;</div></td>
			<td><%=screen.getTagSearchBy()%></td>
		</tr>
		<tr>
			<td><div align="right"><script language="javascript">sw.write('SW000006');</script>&nbsp;</div></td>
			<td><%=screen.getTagConSearch()%></td>
			<td><div align="right"><script language="javascript">sw.write('SW000007');</script>&nbsp;</div></td>
			<td><%=screen.getTagValueSearch()%> <a href="javascript:search();"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" width="20" height="20" border="0" align="middle"></a></td>
		</tr>
		<tr>
			<td colspan="4"><div align="center">
				<button type="button" class="btn btn-primary width100" swlang code="SW003537" onClick="setSubmit();">SEARCH</button>&nbsp;&nbsp;
				<button type="button" class="btn btn-primary width100" swlang code="SW013047" onClick="clearFilter();">CLEAR</button>
			</div></td>
		</tr>
		<tr>
			<td class="blankspace" colspan="4"></td>
		</tr>
		<%
			String cmd = request.getParameter("__cmd");
			String goPage = request.getParameter("__goPage");
			if((cmd != null && cmd.equals("search")) || (goPage != null && !goPage.equals(""))){
		%>
		<tr>
			<td colspan="4"><div align="right">
				<select name="__maxline">
					<option value="5" <%=(maxline==5?"selected":"")%>>5</option>
					<option value="10" <%=(maxline==10?"selected":"")%>>10</option>
					<option value="25" <%=(maxline==25?"selected":"")%>>25</option>
					<option value="50" <%=(maxline==50?"selected":"")%>>50</option>
					<option value="100" <%=(maxline==100?"selected":"")%>>100</option>
				</select>
				<%=screen.getPageTag()%>
			</div></td>
		</tr>
		<tr>
			<td class="blankspace" colspan="4"></td>
		</tr>
		<tr>
		<td colspan="4"><table height="" align="center" cellpadding="0" cellspacing="0" class="largest">
  			<tr >
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsyear")%></strong></div></td>
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("sequence")%></strong></div></td>
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsid")%></strong></div></td>
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsassessy")%></strong></div></td>
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsapprove1")%></strong></div></td>
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsapprove2")%></strong></div></td>
				<!-- <td class="header_aga"><div align="center"><strong><%//=screen.getLabel("apsapprove3")%></strong></div></td> -->
				<td class="header_aga"><div align="center"><strong><%=screen.getLabel("apsstate")%></strong></div></td>
  			</tr>
    		<%
				int i=0;
				while(screen.nextRec()){
					if(screen.checkLinePage()){
						i++;
			%>
    		<tr>
				<td><div align="center">
					<input type="text" name="__apsyear$<%=i%>" size="3" value="<%=screen.getDataLabel("apsyear")%>" class="disabled" readonly>
				</div></td>
				<td><div align="center">
					<input type="text" name="__sequence$<%=i%>" size="1" value="<%=screen.getDataLabel("sequence")%>" class="disabled" readonly>
				</div></td>
				<td><div align="center">
					<input type="text" name="__apsid$<%=i%>" size="10" value="<%=screen.getDataLabel("apsid")%>" class="disabled" readonly>
				</div></td>
				<td><div align="center">
					<input type="text" name="__apsassessy$<%=i%>" size="8" value="<%=screen.getDataLabel("apsassessy")%>" class="disabled" readonly>
					<input type="text" name="__apsassessydesc$<%=i%>" size="20" value="<%=screen.getDataLabel("memployee","fullname")%>" class="disabled" readonly>
				</div></td>
				<td><div align="center">
					<input type="text" name="__apsapprove1$<%=i%>" size="8" value="<%=screen.getDataLabel("apsapprove1")%>">
					<a href="javascript:goHelp('MEMPLOYEEHELP','__apsapprove1$<%=i%>','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu5','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu5"  border="0" align="absmiddle"></a>
					<a href="javascript:clearData('__apsapprove1$<%=i%>','__apsapprove1$<%=i%>_desc');" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('__apsapprove1del','','../IMAGES/BUTTON/SWAP/DEL_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/DEL20.gif" alt="SEARCH" width="20" height="20" border="0" align="absmiddle"></a>
					<input type="text" name="__apsapprove1$<%=i%>_desc" size="20" value="<%=screen.getDataLabel("v1memployee","fullname")%>" class="disabled" readonly>
				</div></td>
				<td><div align="center">
					<input type="text" name="__apsapprove2$<%=i%>" size="8" value="<%=screen.getDataLabel("apsapprove2")%>">
					<a href="javascript:goHelp('MEMPLOYEEHELP','__apsapprove2$<%=i%>','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu5','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu5"  border="0" align="absmiddle"></a>
					<a href="javascript:clearData('__apsapprove2$<%=i%>','__apsapprove2$<%=i%>_desc');" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('__apsapprove2del','','../IMAGES/BUTTON/SWAP/DEL_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/DEL20.gif" alt="SEARCH" width="20" height="20" border="0" align="absmiddle"></a>
					<input type="text" name="__apsapprove2$<%=i%>_desc" size="20" value="<%=screen.getDataLabel("v2memployee","fullname")%>" class="disabled" readonly>
				</div></td>
				<!-- <td><div align="center">
					<input type="text" name="__apsapprove3$<%//=i%>" size="8" value="<%//=screen.getDataLabel("apsapprove3")%>">
					<a href="javascript:goHelp('MEMPLOYEEHELP','__apsapprove3$<%//=i%>','')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('imgBu5','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Help" name="imgBu5"  border="0" align="absmiddle"></a>
					<input type="text" name="__apsapprove3$<%//=i%>_desc" size="20" value="<%//=screen.getDataLabel("v3memployee","fullname")%>" class="disabled" readonly>
				</div></td> -->
				<td><div align="center">
				<%
					ListBox state = new ListBox();
					state.setUProfile(screen.getUProfile());
					state.setTable("TAPSSTATEHELP","STATEID","STATEID|TDESC","APSID='"+screen.getDataLabel("apsid")+"'","STATEID","");
					state.setName("apsstate$"+i);
					state.setSizel("1");
					state.setChecked(screen.getDataLabel("APSSTATE"));
				//	state.setonChange("chkChange();");
					state.ini();
				%>
				<%=state.getInput()%>
				</div></td>
  			</tr>
			<%
					}
					if(screen.outLinePage()){
						break;
					}
				}
			%>
  			</table></td>
	</tr>
	<script language="JavaScript" type="text/JavaScript">
		var maxline = <%=i%>;
	</script>
	<tr>
      <td class="blankspace" colspan="4"></td>
    </tr>
	<tr>
		<td class="blankspace" colspan="4"><div align="center"><button type="button" class="btn btn-primary width100" swlang code="SW000117" onClick="saveData();">SAVE</button></div></td></tr>
	<%}%>
	<tr>
      <td class="blankspace" colspan="4"></td>
    </tr>
  </table>
</form>
<br>
</body>
</html>
