<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<jsp:useBean id="AS05_22" class="com.csc.library.system.Task" scope="page" />
<%
AS05_22.setChannel(request,response);
UIManager screen = (UIManager) AS05_22.process("MultiEntry","AS05_22");
MultiLine multi = screen.getMultiLine("TASTRAN");
%>
<html>
<head>
<title></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">getInputFormatDate();</script>
<script language="JavaScript" type="text/JavaScript">
<!--
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_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_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 showHelp(page){
	window.open(page,"Help","left=150,top=150,width=700,height=500,toolbar=no,status=no,scrollbars=yes");
}

function showHelp1(page,asid){
  var asrdetail;
  with(document.cscform){
     for(i=0;i<elements.length;i++){
			asrdetail=eval("__TASTRAN\$ASRDETAIL\$"+asid+".value");	
			break;
	 }
	 }
    page=page+"?_asid="+asid+"&_asrdetail="+asrdetail;
	window.open(page,"Help","left=150,top=150,width=700,height=250,toolbar=no,status=yes,scrollbars=yes");
}

function linkChild(page){
	with(document.cscform){
		 window.open(__childMulti.value+".jsp?__gorec="+__gorec.value+"&__ack=add&__headMulti="+__headMulti.value+"&__RecNo="+__maxrec.value+"&__employeeid="+window.document.forms[0].__employeeid.value);
	}
}

function saveChild(){
	with(document.cscform){
		__cmd.value="addChild";
		__ack.value="edit";
		action="AS05_22.jsp";
			submit();
	}
	}

function editChildMulti(record){
	with(document.cscform){
		__gorec.value=record;
		__cmd.value=""; // edit
	     var page=__childMulti.value+".jsp?__cmd=&__gorec="+record+
		     "&__ack=edit"+
			 "&__headMulti="+__headMulti.value+	     		     
	    	 "&__companyid="+__companyid.value+
			 "&__help="+__help.value;
			 alert(page);
		window.open(page,"Help","left=150,top=150,width=700,height=250,toolbar=no,status=yes,scrollbars=yes");			
	}
}

function getInputFormatDate(){
		document.write("<input type='hidden' name='__dateformat' value='DD-MM-YYYY'>");
}

//-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="javascript">initToolTips();</script>
<form name="cscform" method="post" >


<!----------BEGIN CSC INITIAL ZONE ------------------------>

<%=screen.InitialVariable()%>

<!----------END CSC INITIAL ZONE -------------------------->

<input name="__cmd" type="hidden" value="">
	<input type="hidden" name="__calendar">
	<input type="hidden" name="__language" value="<%=screen.getUProfile().get("lang")%>'">
	<input type="hidden" name="__notNull" value='<%=screen.getRequire()%>'>
	<input type="hidden" name="__screen" value="AS05_22">
	<input type="hidden" name="__gorec" value="">
	<input type="hidden" name="__ack" value="">
	<input type="hidden" name="__multiTable" value="TAPSTRAN2">
  <input type="hidden"  name="__childMulti" value="AS05_7">
  <input name="__headMulti" type="hidden" value="AS05_22">
   <input type="hidden" name="__maxrec" value="<%=screen.getTable("TASTRAN").recCount()%>">
	<input type="hidden" name="__helpReturn" value="">
	<input type="hidden" name="__help" value="<%=request.getParameter("__help")%>">
	<input name="__companyid" type="hidden" value="<%=screen.getUProfile().get("companyid")%>">
	<input name="__employeeid" type="hidden" value="<%=screen.getUProfile().getUserName()%>">
	<input name="__fixCon" type="hidden" value="">
	<input type="hidden" name="__cmdchild" value="">
    <input type="hidden" name="__apsid" value="<%=request.getParameter("__apsid")%>">
    <input type="hidden" name="__apsassessor" value="<%=request.getParameter("__apsassessor")%>">
    <input type="hidden" name="__apsassessy" value="<%=request.getParameter("__apsassessy")%>">
  <br>
  <div align="center">
    <table  cellpadding="0"  cellspacing="0">
      <tr > 
        <td   class="header">AS05_22,
          <script language="javascript">swapLang('Save score');</script> 
          &nbsp;</td></tr>
      <tr >
        <td>&nbsp;</td>
      </tr>
      <tr > 
        <td  colspan="2"> <div align="center"> 
            <table class="largest" border="1" cellspacing="1" cellpadding="1">
              <tr> 
                <td><table border="0" align="center" cellpadding="3" cellspacing="1" class="maxsize">
                    <tr valign="baseline"> 
                      <td width="19%" nowrap><font size="2" color="#1D95E2"><strong> 
                        </strong> 
                        <script language="javascript">swapLang('Docno');</script>
                        <strong> </strong></font></td>
                      
                    <td colspan="3"><font size="2"><%=screen.getDataLabel("apsid")%></font></td>
                    </tr>
                    <tr valign="baseline"> 
                      <td width="19%" nowrap><font size="2" color="#1D95E2"> 
                        <script language="javascript">swapLang('Title');</script>
                        </font></td>
                      
                    <td colspan="3"><font class="normal"><%=screen.getDataLabel("tapstran0","tdesc")%></font></td>
                    </tr>
                    <tr valign="baseline"> 
                      <td nowrap><font size="2" color="#1D95E2">
                        <script language="javascript">swapLang('Uniform');</script>
                        </font></td>
                      <td colspan="3"><font class="normal"><%=screen.getDataLabel("masform","asfid")%>&nbsp;&nbsp;<%=screen.getDataLabel("masform","tdesc")%>
                        </font></td>
                    </tr>
                    <tr valign="baseline"> 
                      <td width="19%" nowrap><font size="2" color="#1D95E2"> 
                        <script language="javascript">swapLang('assessy');</script>
                        </font></td>
                      
                    <td colspan="3"><font size="2"><%=screen.getDataLabel("masfactor","empprefixname")%><%=screen.getDataLabel("apsassessy")%><%=screen.getDataLabel("masfactor","emptfname")%>&nbsp;&nbsp;<%=screen.getDataLabel("masfactor","emptlname")%>&nbsp;&nbsp;<%=screen.getDataLabel("masfactor","empposname")%></font></td>
                    </tr>
                    <tr valign="baseline"> 
                      <td width="19%" nowrap><font size="2" color="#1D95E2"> 
                        <script language="javascript">swapLang('start date');</script>
                        </font></td>
                      
                    <td width="10%" nowrap> <font class="normal">&nbsp; </font><font size="2"><%=screen.getDataLabel("tapstran0","apsstartdate")%></font></td>
                      <td width="11%" nowrap><font size="2" color="#1D95E2"> 
                        <script language="javascript">swapLang('end date');</script>
                        </font></td>
                      
                    <td width="60%" nowrap> <font class="normal">&nbsp; </font><font size="2"><%=screen.getDataLabel("tapstran0","apsenddate")%></font></td>
                    </tr>
                  </table></td>
              </tr>
            </table>
            <br>
            <div align="right"><a href="javascript:showHelp('AS05_3.html');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','../IMAGES/BUTTON/SWAP/HELP_SWAP20.gif',1)"><img SRC="../IMAGES/BUTTON/MAIN/HELP20.gif" alt="รายละเอียดการพิจารณาหัวข้อประเมินผล" name="Image41" width="20" height="20" border="0" align="absmiddle" id="Image41"></a><a href="javascript:showHelp('AS05_5.html');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image43','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img SRC="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="รายละเอียดผู้ถูกประเมิน" name="Image43" width="20" height="20" border="0" align="absmiddle" id="Image43"></a><a href="javascript:showHelp('AS05_4.html');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image42','','../IMAGES/BUTTON/SWAP/COPY_SWAP20.gif',1)"><img SRC="../IMAGES/BUTTON/MAIN/COPY20.gif" alt="สรุปคะแนนประเมินผล" name="Image42" width="20" height="20" border="0" align="absmiddle" id="Image42"></a>&nbsp;&nbsp; 
            </div>
            <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="largest">
              <tr> 
                <td width="5%" nowrap bgcolor="#CCCCCC" class="title1"><div align="center"><font size="2" color="#1D95E2"> 
                    <script language="javascript">swapLang('Select');</script>
                    </font></div></td>
                <td width="10%" nowrap bgcolor="#CCCCCC" class="title1"> <div align="center"><font size="2" color="#1D95E2"> 
                    <script language="javascript">swapLang('Code');</script>
                    </font></div></td>
                <td width="64%" nowrap bgcolor="#CCCCCC" class="title1"> <div align="center"><font size="2" color="#1D95E2"> 
                    <script language="javascript">swapLang('Title of Assessment');</script>
                    </font></div></td>
                <td width="10%"  nowrap bgcolor="#CCCCCC" class="title1"> <div align="center"><font size="2" color="#1D95E2"> 
                    <script language="javascript">swapLang('Score');</script>
                    </font></div></td>
                <td width="11%" nowrap bgcolor="#CCCCCC" class="title1"> <div align="center"><font size="2" color="#1D95E2"> 
                    <script language="javascript">swapLang('Reason');</script>
                    </font></div></td>
              </tr>
			  <%
			       String asgroup="";
			      for(int i=1;!multi.eof();multi.next(),i++){
				  if(!asgroup.equals(multi.getData("MASGROUP","ASGID"))){
				  			asgroup= multi.getData("MASGROUP","ASGID");
			  %>
              <tr bgcolor="#FFFFFF"> 
                <td colspan="12" nowrap> <div align="left"><font size="2"><%= multi.getData("MASGROUP","ASGDESC")%></font></div></td>
              </tr>
			  <%}%>
              <tr bgcolor="#E1E1E1"> 
                <td width="5%"><div align="center"> 
                    <input name="asrstatus" type="checkbox" value="checkbox" checked><input type="hidden" name="__TASTRAN$ASRSTATUS$<%= multi.getData("TASTRAN","ASID")%>">
                  </div></td>
                <td> <div align="center"><%= multi.getData("TASTRAN","ASID")%></div></td>
                <td  bgcolor="#E1E1E1" ><font size="2"> <%= multi.getData("MASSESS","ASDESC")%></font></td>
                <td align="center" ><%= multi.getInput("TASTRAN","ASRSCORE")%>
				<input type="text" name="__TASTRAN$ASRDETAIL$<%= multi.getData("TASTRAN","ASID")%>" value="<%= multi.getData("TASTRAN","ASRDETAIL")%>"> 
				<%= multi.getInput("TASTRAN","ASRMAXSCORE")%>
				<%= multi.getInput("TASTRAN","ASRWEIGHT")%>
				</td>
                <td valign="baseline" > <div align="center"> 
                    <input type="button" name="Button" value="..." onclick="editChildMulti('<%=i%>');">
                  </div></td>
              </tr>
			  <%}%>
			  <%= screen.getDataLabel("MAS","ASDESC")%>
            </table>
            <div align="center"><br>
              <a href='javascript:saveChild();'><img SRC="../IMAGES/BUTTON/SAVE.gif" name="Image4" border="0" align="absmiddle"></a>&nbsp; 
              <img SRC="../IMAGES/BUTTON/CLEAR.gif" name="Image44" border="0" align="absmiddle" id="Image44"> 
              &nbsp; <a href="AS05_22.html"><img SRC="../IMAGES/BUTTON/CANCEL.gif" alt="Search" name="Image44" border="0" align="absmiddle" id="Image44"></a><br>
              <br>
            </div>
          </div></td>
      </tr>
      <tr bordercolor="0069B3"> 
        <td  class="bottom"></td>
      </tr>
    </table>
    <br>
    <br>
  </div>


<!----------BEGIN CSC ENDING ZONE ------------------------>

<%=screen.endJSP()%>

<!----------END CSC ENDING ZONE -------------------------->

</form>
</body>
</html>
