<%@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.entry.*,com.csc.library.database.*,com.csc.library.session.*,com.csc.library.report.ReportUDF"  %>
<jsp:useBean id="AS20SAVE" class="com.csc.library.system.Task" scope="page"/>
<%
AS20SAVE.setChannel(request,response);
UIManager screen = (UIManager) AS20SAVE.process("SingleEntry","AS20SAVE");
screen.referLangOff();
CheckNull chk =new CheckNull();
%>
<jsp:useBean id="AS20" class="com.csc.library.system.Task" scope="page" />
<%AS20.setChannel(request, response);%>
<%HelpEntry screen1 = (HelpEntry) AS20.process("HelpEntry","AS20");%>
<%
screen1.getInquiry().setFilter("apshistory <> '1'");
screen1.process();

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<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  language="JavaScript" src="../JS/APSSCREEN.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" type="text/JavaScript">
<!--

function clearApsid(){
	document.cscform.__apsid.value = "";
}

function GoSave() {
	clearApsid();
     beforeSave();
	 with(document.cscform){
		if(__apsid.value.length>0){
			__confirm.value = "0";
			confirmSave();
		 }
	 }
}
function GoDelete(){ }
function GoSearch(){ }
function GoUpdate(){ }

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_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_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 beforeSave(){
		with(document.cscform){
				setMycheckbox();
		}
}

function setMycheckbox(){
			with(document.cscform){
          if(checkTypeOf(__box)){
					if(checkLength(__box)){
							   for(i=0;i<__box.length;i++){
                                                 if(__box[i].checked){
												        __apsid.value+=__box[i].value;
												 }
										}
							   }else{
											 if(__box.checked){
													__apsid.value+=__box.value;
											 }
							   }
			}else{
						 if(__box.checked){
						        __apsid.value+=__box.value;
						 }
  			    }
		}
}

function setEvenclick(obj){
		with(document.cscform){
		        if(obj.checked){
							setkSelectAll(__box,"__box");
			}else{
			           setkDisselectAll(__box,"__box");
			}
		}
}

function goNextpage(apsid,tdesc){
		with(document.cscform){
					__fixCon.value="apsid='"+apsid+"' ";
					__apsid.value=apsid;
					__tdesc.value=tdesc;
					action="AS21.jsp";
                    submit();
		}
}

//-->
</script>

</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  <form name="cscform" method="post">
 

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

<%=screen.InitialVariable()%>

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

  <input type="hidden"name="__screen"  value="AS20">
  <!--input type="hidden" name="__help" value="<=request.getParameter("__help")%>"-->
  <input type="hidden" name="__cmd"  value="">
  <input type="hidden" name="__language" value ="<%=screen.getUProfile().get("lang")%>"> 
  <input type="hidden" name="__fixCon" value="">
  <input name="__notNull" type="hidden" value="<%=screen.getRequire()%>">
  <input name="__companyid" type="hidden" value="<%=screen.getUProfile().get("companyid")%>">
  <input type="hidden" name="__apsid" value="">
    <input type="hidden" name="__tdesc" value=" ">
  <input type="hidden" name="__transflag" value="1">
   <script language="JavaScript">document.write(Icons());</script>
 <br>
  <div align="center">
    <table width="591"  cellpadding="0"  cellspacing="0">
      <tr >
        <td  class="header">AS22,<script language="javascript">swapLang('Transfer doc');</script>
          &nbsp;</td>
      </tr>
      <tr >
        <td  colspan="2">
          <div align="center"><br>
            <table width="517" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#666666" class="largest">
              <tr>
                <td class="title1" width="5%"><input type="checkbox" name="checkbox" value="checkbox" onClick="setEvenclick(this);"></td>
                <td width="15%" class="title1"><div align="center">
                    <script language="javascript">swapLang('Docno');</script>
                  </div></td>
                <td class="title1" width="65%"><div align="center">
                    <script language="javascript">swapLang('Description');</script>
                  </div></td>
                <td class="title1" width="15%"><div align="center">
                    <script language="javascript">swapLang('Date_Expire');</script>
                  </div></td>
              </tr>
              <%
			  			while(screen1.nextRec()){
			  %>
              <tr>
                <td><div align="center">
                    <input type="checkbox" name="__box" value="<%=screen1.getString("apsid")%>,">
                  </div></td>
                <td><div align="center"><a href="javascript:goNextpage('<%=screen1.getString("apsid")%>','<%=screen1.getString("tdesc")%>')"><%=screen1.getString("apsid")%></a></div></td>
                <td><%=screen1.getString("tdesc")%></td>
                <td nowrap><div align="center"><%=screen1.getDateLabel("apsenddate")%></div></td>
              </tr>
              <%
			  }
			  %>
            </table>
            <br>
          </div></td>
      </tr>
      <tr bordercolor="0069B3">
        <td  class="bottom"></td>
      </tr>
    </table>
  </div>


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

<%=screen.endJSP()%>

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

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