<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html; charset=UTF-8"%>
<%@ page import="com.csc.library.entry.*" %>
<%@ page import="com.csc.library.utilities.*" %>
<jsp:useBean id="APSR001" scope="page" class="com.csc.library.system.Task" />
<html>
<%
   APSR001.setChannel(request ,response);
   ReportEntry screen=(ReportEntry)APSR001.process("ReportEntry",request.getParameter("__screen"));
   UProfile uf=screen.getUProfile();
   screen.process();
   ThaiUtilities th=new ThaiUtilities();
%>

<head>
<title>Report Condition</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
<script type='text/javascript' src='../JS/SCREEN.js'></script>

<script language='javascript'>setLang('<%=screen.getUProfile().get("lang")%>');</script>

<script src="../JS/VIEWCALENDAR.js"></script>
<script src="../JS/TRIM.js"></script>
<script>

function goSaveCon(){
	  conNo=prompt(MyCode[25],document.cscform.__conditionid.value);
	  if(conNo!=null && conNo !=""){
	  var isSave=checkbfSaveCondition(conNo);
	  document.cscform.__conditionid.value=conNo;	  
	      if(isSave){
					  bCon=confirm(MyCode[22]+document.cscform.__conditionid.value);
					  if (bCon==true)	{
							saveCondition();
					  }
	         } else{
					  bCon=confirm(MyCode[63]);
					  if (bCon==true)	{
							saveCondition();
					  }
		 }
	  }
 }


function saveCondition(){
				document.cscform.__cmd.value="savecon";
				document.cscform.submit();
}

function checkbfSaveCondition(conIndex){
       var conNo=eval("document.cscform.con"+conIndex);
	   if(conNo.value.length>0)
	        return false;
			else 
			  return true;	   
}

<!--
var myArray = new Array(50);
var j = "A";
var m = "A";
var n = "A";
var z =0;
var fl=0;
var orderArray = new Array(50);
var groupArray = new Array(50);
var filterArray = new Array(50);
var groupLength=0;
var orderLength=0;
var newpageIndex=1;
var view=0;

function goSubmit(){
  /*    bCon=confirm("Export  file");
	  if (bCon==true)	{
		document.cscform.__cmd.value="save";
		alert("Save : "+document.cscform.__cmd.value);
		document.cscform.submit();
	  }*/
	  with(document.cscform){ 
		   uprofile$lang.value=__language.value; 
		   action = "ASR003.jsp"; 
		   window.open("","save","left=150,top=150,width=500,height=200,toolbar=no,status=yes,scrollbars=yes"); 
		   target="save"; 
		   submit(); 
	} 
 }




function reportIndex(){
     with(document.cscform){
	  	submit;
	  }
 }

function changeHeader(){

     with(document.cscform){
        if(__language.value=='ENG'){
	  	   __reportHeader.value=engHeader.value;
	  	 }
	  	else{
	  	    __reportHeader.value=thaiHeader.value;
	  	 }

	  }
 }

function goPreview(){
	with(document.cscform){
if(view==0){	
		//var a="<%=screen.getReportPath()%>"+
		a="../servlet/reportservlet/"+
		"?uprofile$dbname=<%=uf.getDbName()%>"+
		"&com_tname=<%=th.ASCII2Unicode(uf.get("com_tname"))%>"+
		"&com_ename=<%=uf.get("com_ename")%>"+
		"&uprofile$companyid=<%=uf.get("companyid")%>"+
		"&uprofile$userid=<%=uf.getUserId()%>"+
		"&uprofile$lang="+__language.value+
		"&uprofile$appname=<%=uf.get("appname")%>"+
		"&uprofile$emp_level=<%=uf.get("emp_level")%>"+
		"&uprofile$schemaname=<%=uf.getSchemaName()%>"+
		"&uprofile$formatdate=<%=uf.get("formatdate")%>";
	
		for(var  z=0;z<elements.length;z++){
			if(elements[z].name!="con1" && elements[z].name!="con2" && elements[z].name!="con3" && 
			   elements[z].name!="con4" && elements[z].name!="con5" && elements[z].name!="con6" && 
			   elements[z].name!="con7" && elements[z].name!="con8" && elements[z].name!="con9" &&
			   elements[z].name!="con10" && elements[z].name!="__filter_opt" )
			{
				if(elements[z].name =="__filtercon" ){
		
					//edit by james 28/11/2006
					var condition = elements[z].value;
					
					if(Trim(condition) !="" || Trim(condition).length>0 ){
						if(Trim(__filter_opt.value) !="" || Trim(__filter_opt.value).length>0 ){
							condition += " AND " +__filter_opt.value;
						}
					}else{
						if(Trim(__filter_opt.value) !="" || Trim(__filter_opt.value).length>0 ){
							condition = __filter_opt.value;
						}
					}
				
					//alert(__filtercon.value);
					//alert(condition);
					
					a+="&"+elements[z].name+"="+condition;
					
				}else{
					if(elements[z].name !="uprofile$password")
					a+="&"+elements[z].name+"="+elements[z].value;
				}
	
		
			}
		}
	
	
		bCon=confirm(MyCode[10]);
		if (bCon==true)	{
			//location=a;
		//	alert(a);
		//	window.open(a);
				with(document.forms[0]){
					action = a;
					var temp =  target;
					target = "_blank";
					method="get";
					submit();
					target=temp;
					action="?";
			}
		}
		}else{
			alert(MyCode[0]);
		}		
	}
}

function goOption(){
with(document.cscform){
  window.open("<%=screen.getComponentPage("ASR002")%>.jsp?__screen="+__screen.value);
}
}


function insertOrderBy(){
	var i=0;
	var isdup=false;
	with(document.cscform){
		if(__orderby.value !=0){
			for(i=0;i<=orderLength;i++){
			//alert(__orderby.value+"  "+ orderArray[i]);
				if((__orderby.value==orderArray[i])||(","+__orderby.value==orderArray[i])){
					alert(orderby.value+"  "+ MyCode[11]);
				    isdup=true;
				}			}
			if(isdup==false){
				if(orderLength != 0)
					orderArray[orderLength++]=","+__orderby.value;
				else orderArray[orderLength++]=__orderby.value;
			}
			setOrderText();

		}
		orderby.options[0].selected= true;
 }
 }


function insertGroupBy(){
	var i=0;
	var isdup=false;
	with(document.cscform){
		if(__groupby.value !=0){
			for(i=0;i<=groupLength;i++){
				if(__groupby.value+" "==groupArray[i]){
					alert(groupby.value+"  "+ MyCode[11]);
				    isdup=true;
				}
			}
			if(isdup==false){
				groupArray[groupLength++]=__groupby.value+" ";
				setNewPage(__groupby.value,__groupby.value,false);
			}
			setGroupText();

		}
		groupby.options[0].selected= true;
 }
 }



function setOrderText(){
	with(document.cscform){
			b="";
			for( i=0;i<orderLength;i++){
			   b=b+orderArray[i];
			}
			__orderText.value=b;
	}
}

function setGroupText(){
	with(document.cscform){
			b="";
			for( i=0;i<groupLength;i++){
			   b=b+groupArray[i];
			}
			__groupText.value=b;
	}
}

function setNewPage(value,text,first){
	//alert(first);
	with(document.cscform){
		if(first==true){
			newpageIndex=1;
			__onnewpage.options.length=1;
		}
		__onnewpage.options[newpageIndex++]=new Option(text,value,false);
	}
}

function dellOrderBy(){
	with(document.cscform){
		for( i=0;i<orderLength;i++){
			orderArray[i]="  ";
		}
		orderLength=0;
		setOrderText();
	}
}


function dellGroupBy(){
	with(document.cscform){
		for( i=0;i<groupLength;i++){
			groupArray[i]="  ";
		}
		groupLength=0;
		setGroupText();
		__onnewpage.options.length=1;
		newpageIndex=1;
	}
}



function reduorder(){
	with(document.cscform){
		if(orderLength>0){
			orderArray[--orderLength]="  ";
			setOrderText();
		}
	}
}

function redugroup(){
	with(document.cscform){
		if(groupLength>0){
			groupArray[--groupLength]="  ";
			setGroupText();
		}
		if(newpageIndex>0){
			__onnewpage.options.length--;
			newpageIndex--;
		}

	}
}



if(document.layers)
     document.captureEvents(Event.KEYDOWN);
	document.onkeydown = key;
function first(){
	with(document.cscform){
		operator.disabled = true ;
		logic.disabled = true ;
		nval.disabled = true ;
		data.disabled = true ;
	}
}

function changeTable(tname,helpName){
	ed = document.getElementById("ptable");
    ed.setAttribute("src", "APSR001TABLE.jsp?taname=" +tname+"&__id="+"<%=request.getParameter("__id")%>"+"&__screen="+"<%=request.getParameter("__screen")%>");
	document.cscform.mainHelp.value=helpName;
	document.cscform.helpName.value=helpName;
}

function insertData(val,first){
	if(first==true){
		z=0;
		insertFilterData(val,true);
	}else insertFilterData(val,false);
	myArray[z] = val ;
	if (val != "") z++;
	b = "";
	for(var i=0; i<z; i++){
		b = b+myArray[i];
	}
	document.cscform.__data.value = b;
}

function insertFilterData(val,first){
	if(first==true){
		fl=0;
	}
	if(val=="AND " || val=="OR " || val=="AND" || val=="OR"){
	  val="*"+val+"*";
	}

	filterArray[fl] = val ;
	if (val != "") fl++;

	b = "";
	for(var i=0; i<fl; i++){
		b = b+filterArray[i];
	}
	document.cscform.__filtercon.value = b;
	//alert(document.cscform.__filtercon.value);
}




function insertField(){
	insertData(document.cscform.mem.value,false);
}
function insertOperator(){
	if(document.cscform.operator.value!=0){
		insertData(document.cscform.operator.value+" ",false);
		document.cscform.operator.options[0].selected= true;
		document.cscform.operator.disabled = true;
		document.cscform.nval.disabled = false;
		j =  "O";
		n="A";
		view=1;		
	}
}

function insertLogic(){
	if(document.cscform.logic.value!=0){
		insertData(document.cscform.logic.value+" ",false);
		document.cscform.logic.options[0].selected= true;
		document.cscform.logic.disabled  = true;
		j = "L";
		m="A";
		view=1;
	}
}

function getKeyCode(e){	
	var keynum;
	if (!e) {
		e = window.event;
	}
	if(window.event) {  
		// for IE, e.keyCode or window.event.keyCode can be used
		keynum = e.keyCode;
	} else if(e.which) {   
		// for  NS4, FF compatible
		keynum = e.which;
	} else if(e.charCode) {  
		//also NS 6+, Mozilla 0.9+
		keynum = e.charCode;
	}else{ 
		// no event, so pass through
		keynum = 0;
	}
	return keynum;
}

function key(e){
	var keyCode = getKeyCode(e);
	if(keyCode == 13){
		if(document.cscform.nval.disabled != true){
			if(document.cscform.nval.value==""){
							alert(MyCode[0]);
							return;
					}
			var cType = chType();
			if(cType=="Date"){
				with(document.cscform){
					var tmp_Date = nval.value.split("-");			
					if(tmp_Date[0].length<3)	
					insertData("'"+tmp_Date[2]+'-'+tmp_Date[1]+'-'+tmp_Date[0]+"' ",false);
				}
					
			}else
				insertData("'"+document.cscform.nval.value+"' ",false);
		document.cscform.nval.disabled = true;
		document.cscform.logic.disabled = false;
		j = "V";
		n="D";
		view=0;
		}
 	}
}
function deleteAll(){
	//v = z ;
	v = myArray.length;
	z = 0;
	fl=0;
	for(var i=0;i<v;i++){
		insertData("",false);
	}
	z = 0;
	fl=0;
	cscform.operator.disabled = true ;
	cscform.logic.disabled = true;
	cscform.nval.disabled = true;
	j="A";
	m="A";
	view=0;
}
function redu(){
	if (z > 0)
		z = z-1;
	if (fl > 0)
		fl=fl-1;
	insertData("",false);
	if (j=="O") {
		view=1;
		if (n=="D") 
			j="D";
	} else if (j=="V") {
		setView();
		if (n=="A") 
			j="O";
	} else if (j=="L") {
		setView();
		if (m=="D") 
			j="V";
	} else if (j=="D") {
		setView();
		if (m=="A") { 
			if (z>0) { 
				j="L";
			}
		}
	}
	if(j=="O"){
		document.cscform.operator.disabled = false;
		document.cscform.nval.disabled = true;
		document.cscform.logic.disabled = true;
		n="D";
	}else if(j=="L"){
		document.cscform.logic.disabled = false;
		document.cscform.nval.disabled = true;
		document.cscform.operator.disabled = true;
		m="D";
	}else if(j=="D"){
		document.cscform.logic.disabled = true;
		document.cscform.nval.disabled = true;
		document.cscform.operator.disabled = true;
		m="A";
	}else if(j=="V"){
		document.cscform.nval.disabled = false;
		document.cscform.logic.disabled = true;
		document.cscform.operator.disabled = true;
		n="A";
	}
}
function deleteStatement(){
	s = (z-3)/4;
	if(s==1){
		p=z;
		z= z-4;
		for(var i=z;i<p;i++){
			insertData("",false);
		}
	}
}



//For condition
function setCondition(conditionNo,conIndex){
var tmp = new Array(50);
var tmp1 = new Array(50);
var valueList="";
view=0;
with(document.cscform){
 __conditionid.value=conIndex;
 for(var z=0;z<elements.length;z++){
   if(elements[z].name == conditionNo){
   	valueList=elements[z].value;
   }else logic.disabled = false;
 }
 if(valueList==""){
 	alert(MyCode[21]);
 	deleteAll();
 	__condesc.value="";
 	__reportHeader.value="";
 	__language.value="Eng";
 	dellOrderBy();
 }else{
 	tmp=valueList.split("$");
 	for(var i=0;i<tmp.length;i++){
 		tmp1=tmp[i].split("#");
 		setElmCondition(tmp1[0],tmp1[1]);
 	}
}
}
}


function setElmCondition(conName,conValue){
var tmp=new Array(90);
var i=0;
var first=true;
with(document.cscform){
	if(conName=="condition_value"){
		insertData(conValue+" ",true);
		//__data.value=conValue;
		tmp=conValue.split(" ");
		for(i=0;i<tmp.length;i++){
			insertFilterData(tmp[i],first);
			first=false;
		}
	}
	else if(conName=="condition_desc")
		__condesc.value=conValue;
	else if(conName=="reportheader")
		__reportHeader.value=conValue;
	else if(conName=="groupby_value"){
		tmp=conValue.split(" ");
		first=true;
		groupLength=0;
		for(i=0;i<tmp.length;i++){
			groupArray[groupLength++]=tmp[i]+" ";
			setGroupText();
			setNewPage(tmp[i],tmp[i],first);
			first=false;
		}
	}else if(conName=="orderby_value"){
		tmp=conValue.split(",");
		first=true;
		orderLength=0;
		for(i=0;i<tmp.length;i++){
			if(orderLength != 0)
				orderArray[orderLength++]=","+tmp[i];
			else orderArray[orderLength++]=tmp[i];
			//orderArray[orderLength++]=tmp[i]+",";
			setOrderText();
			first=false;
		}
	}else if(conName=="newpageby_value")	{
		__onnewpage.value=conValue;
	}
	else if(conName=="report_language")
		__language.value=conValue;
	}
}


function goDeleteCon(){
	  conNo=prompt(MyCode[24],document.cscform.__conditionid.value);
	  if(conNo!=null && conNo !=""){
	  document.cscform.__conditionid.value=conNo;
      bCon=confirm(MyCode[23]+document.cscform.__conditionid.value);
	  if (bCon==true)	{
		document.cscform.__cmd.value="delcon";
		document.cscform.submit();
	  }
	  }
 }

 // Nuball Edit for HelpEntry Value 07-12-07
 function chType(){
	with(document.cscform){			
	
		var tmp_chk = mem.value.split(".");
		//var ed=	document.getElementById("ptable");
		if((typeof document.getElementById("ptable").contentDocument)=="undefined"){
			var tmp_field =window.ptable.cscform.__listtypefield.value.split("#");	
		}else{
			var tmp_field = document.getElementById("ptable").contentDocument.cscform.__listtypefield.value.split("#");		
		}
		for(i=0;i<tmp_field.length;i++){			
		
			var tmp_type = tmp_field[i].split(":");
			if(tmp_type[0]==tmp_chk[1]){
			
				return	tmp_type[1];				
			}
		}
		return "";

	}
}
function chonKeyup(input,data){
	var cType = chType();
	if(cType=="Float"){
			checkComma(input,2);
	}else{
		if(cType=="Double"){
			checkComma(input,2);
		}else{
			if(cType=="Integer"){
				
			}else{
				if(cType=="Date"){
					formatDate(input);
				}
			}
		}
	}				

}
function chonBlur(input,data){
	var cType = chType();
	trimValue(input);
	if(cType=="Float"){
			checkNumFloat(input,0,900000000);
	}else{
		if(cType=="Double"){
			checkNumFloat(input,0,900000000);
		}else{
			if(cType=="Integer"){
				checkNumInt(input,0,900000000);
			}else{
				if(cType=="Date"){
					chkInputDate(input);
				}
			}
		}
	}		

}
function chonFocus(input,data){
	var cType = chType();
	if(cType=="Float"){
			callDelComma(input);
	}else{
		if(cType=="Double"){
			callDelComma(input);
		}else{
			if(cType=="Integer"){
				callDelComma(input);
			}else{
				if(cType=="Date"){
					with(document.cscform){
					var tmp_Date = input.value.split("-");	
					
					if(tmp_Date[0].length>3)
						input.value=tmp_Date[2]+'-'+tmp_Date[1]+'-'+tmp_Date[0];			
					}
				}
			}
		}
	}
}
function chonKeyPress(input,data,e){
var ed=	document.getElementById("ptable");
	//alert("xxxxxxxx" +ed);
	
	var cType = chType();
//	alert(cType);
	if(cType=="Float"){
			checkWordNumber(data,e);
	}else{
		if(cType=="Double"){
			checkWordNumber(data,e);
		}else{
			if(cType=="Integer"){				
				chkInteger(e);
			}else{
				if(cType=="Date"){
					chkIntegerOfDate(data,e);
				}
			}
		}
	}
}

function clsValueSearch(){
	document.cscform.__valueSearch.value="";
}

function goHelp(){
	 var cType = chType();
	 var sCode = chSysCode();
     with(document.cscform){
		 if(sCode != ''){
			 	win = window.open("SYSHELP.jsp?__helpName="+sCode,"SYSHELP","left=350,top=250,width=400,height=350,toolbar=no,status=no,scrollbars=no");
				if(window.focus){win.focus();}
		 }else
	 	if(cType=='Date'){				
				viewCal('nval');
		}else{
			if(n=="A"){
				linkHelpReport_Return(helpName.value,"nval:"+helpParam.value);
			}else{
				alert(MyCode[28]); 
			}
		}
	 } 
 }
 function linkHelpReport_Return(help,input){
	with(document.cscform){
		var nInput = input;
		if(input.indexOf(":")>0){
			nInput=input.substring(0,input.indexOf(":"));
		}
		obj = eval("document.cscform."+nInput);
		if(obj.value==""){
			var param="PRR084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__langOn=false"+"&__checkVerify=off";
		}else{
			var param="PRR084.jsp?__helpName="+help+"&__helpReturn="+input+"&__pageCall="+__screen.value+"&__langOn=false"+"&__checkVerify=off"+"&__valueSearch="+obj.value;
		}
		if(help=='TAPSTRANHELP'){
			if(__screen.value == "APSR001"){
				param += "&__fixCon=astid='AP10'";
			}else if(__screen.value == "APSR002"){
				param += "&__fixCon=astid='AP30'";
			}
		}
		window.open(param,"Help","left=150,top=150,width=600,height=400,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
	}
}
function clsnval(){
	document.cscform.nval.value="";
}

function setView(){
		view--;		
		if(view<0)
			   view=2;
}
// Nuball Edit for Systemcode Value 18-03-09

 function chSysCode(){
	with(document.cscform){			
	
		var tmp_chk = mem.value.split(".");
		//var ed=	document.getElementById("ptable");
		if((typeof document.getElementById("ptable").contentDocument)=="undefined"){
			var tmp_field =window.ptable.cscform.__listsysfield.value.split("#");	
		}else{
			var tmp_field = document.getElementById("ptable").contentDocument.cscform.__listsysfield.value.split("#");		
		}
		for(i=0;i<tmp_field.length;i++){			
		
			var tmp_type = tmp_field[i].split(":");
			if(tmp_type[0]==tmp_chk[1]){
			
				return	tmp_type[1];				
			}
		}
		return "";

	}
}   
//-->
</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" action="APSR001.jsp">
<input type="hidden" name="__resultSet" value="">
<div align="center">
<table width="640">
	<tr>
		<td width="644" colspan="2" class="header">APSR001, 
          <%=screen.getTagReportHeaderValue()%>&nbsp;</td>
	</tr>
	<tr>
		<td>
		<table cellspacing="0">
			<tr>
				<td width="640" valign="top">
				<table width="98%" border="0" cellspacing="0" cellpadding="0"
					class="inner2">
					<tr valign="top">
						<td width="63%"><font color="#0066CC" size="1" face="microsoft Sans Serif">
						<%=screen.getLinkTable()%></font></td>
						<td width="37%" valign="middle">&nbsp;</td>
					</tr>
					<tr valign="top">

                    <td bgcolor="#CCCCCC">
<iframe name="ptable" id="ptable" width="100%" src="ASR001TABLE.jsp?taname=<%=screen.getMainTable()%>&__screen=<%=request.getParameter("__screen")%>">
                      </iframe></td>
						<td valign="middle">
						<table border="0" cellspacing="2" cellpadding="2" class="inner2">
							<tr>
								<td width="89%" valign="top"><select name="operator"
									id="operator" disabled onChange="javascript:insertOperator();clsnval();">
									<option value="0" selected><script language="javascript">swapLang('Condition');</script></option>
									<option value="&lt;">&lt;</option>
									<option value="&gt;">&gt;</option>
									<option value="=">=</option>
									<option value="!=">!=</option>
									<option value="&lt;=">&lt;=</option>
									<option value="&gt;=">&gt;=</option>
								</select></td>
							</tr>
							<tr>

								<td valign="top"><select name="logic" disabled id="logic"
									onChange="javascript:insertLogic()">
									<option value="0" selected><script language="javascript"> swapLang('Operator');</script></option>
									<option value="AND">AND</option>
									<option value="OR">OR</option>
								</select></td>
							</tr>
							<tr>
								<td valign="top"><font size="2" face="microsoft Sans Serif">
								<script language="javascript">swapLang('Value');</script> </font> <input name="nval" disabled type="text" id="nval" width="100" onClick="" onChange="" onMouseOver="" onMouseOut="" onKeyPress="javaScript:chonKeyPress(this,this.value,event);" onKeyUp="javaScript:chonKeyup(this,this.value);sysIsEdit();" dir="" onBlur="javaScript:chonBlur(this,this.value);" onFocus="javaScript:chonFocus(this,this.value);" >
									 <a href="javascript:goHelp();" onMouseOut="MM_swapImgRestore()"
									onMouseOver="MM_swapImage('Image15','','../IMAGES/BUTTON/SWAP/SEARCH_SWAP20.gif',1)"><img
									src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="Search"
									name="Image15" width="20" height="20" border="0"
									align="absmiddle"></a></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td>
				<table border="0" cellpadding="0" cellspacing="0" c lass="inner">
					<tr>
						<td width="62%"><font size="2" face="microsoft Sans Serif">
						<script language="javascript">swapLang('Condition');</script>
						: [ <a href="javascript:setCondition('con1','1');">1</a> ]
						[ <a href="javascript:setCondition('con2','2');">2</a> ]
						[<a href="javascript:setCondition('con3','3');"> 3</a>
						] [ <a href="javascript:setCondition('con4','4');">4</a> ]
						[ <a href="javascript:setCondition('con5','5');">5</a> ]
						[ <a href="javascript:setCondition('con6','6');">6</a>
						] [ <a href="javascript:setCondition('con7','7');">7</a> ]
						[ <a href="javascript:setCondition('con8','8');">8</a> ]
						[ <a href="javascript:setCondition('con9','9');">9</a>
						] [ <a href="javascript:setCondition('con10','10');">10</a> ] <a href="javascript:goSaveCon();"><script language="javascript">swapLang('Save');</script></a></font></td>
						<td width="38%">&nbsp;</td>
					</tr>
					<tr valign="top">
						<td><textarea name="__data" cols="60" class="normal" readonly="true"></textarea></td>

                    <td rowspan="4" valign="top" bgcolor="#CCCCCC">
                      <div align="center"><img src="../IMAGES/BUTTON/PRINT.gif" alt="Print"
							 border="0" onClick="goPreview()"><br>
						<br>
                        <img src="../IMAGES/BUTTON/EXPORT.gif" alt="Print"  border="0" onClick="goSubmit()"><br>
						<br>
						<img src="../IMAGES/BUTTON/OPTION.gif" alt="Option"  border="0" onClick="goOption()"></div>
					  </td>
					</tr>
					<tr>
						<td>
						<div align="left"><font size="2" face="microsoft Sans Serif">
						&nbsp;[ </font><font face="microsoft Sans Serif"><font
							face="microsoft Sans Serif"><font size="2"><a href="javascript:goDeleteCon();">
							<script language='javascript'>swapLang('Delete Condition');</script></a></font></font></font><font
							size="2" face="microsoft Sans Serif"> ][ <a href="#" onClick="javascript:deleteAll();"><script language="javascript">swapLang('Delete All');</script> </a>
						]  [ </font><font
							face="microsoft Sans Serif"><font face="microsoft Sans Serif"><font
							size="2">
							<a href="#" onClick="javascript:redu();">
							<script language="javascript">swapLang('Back');</script></a></font></font></font>
						<font size="2" face="microsoft Sans Serif">]</font></div>
						</td>
					</tr>
					<tr>
						<td><font size="2" face="microsoft Sans Serif"><script language='javascript'>swapLang('Description');</script></font></td>
					</tr>
					<tr>
						<td><input name="__condesc" type="text" id="desc" size="60"></td>
					</tr>
					<tr>
						<td>&nbsp;</td>
						<td align="center"><%=screen.getOptionRequire()%></td>
					</tr>
					<tr>
						<td colspan="2">
						<table width="99%" border="0" cellpadding="0" cellspacing="0"
							class="inner2">
							<tr>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
								<div align="right"><script language="javascript">swapLang('ReportHeader');</script>&nbsp;</div>
								</td>
								<td><input name="__reportHeader" type="text" id="desc4"
									size="60" value="<%=screen.getTagReportHeaderValue()%>"></td>
								<td>&nbsp;</td>
							</tr>

							<tr>
								<td width="17%">
								<div align="right"><script language='javascript'>swapLang('Order By');</script>&nbsp;</div>
								</td>
								<td width="60%"><%=screen.getTagOrderBy()%></td>
								<td width="23%"><font size="2" face="microsoft Sans Serif">
								&nbsp;[ </font><font face="microsoft Sans Serif"><font
									face="microsoft Sans Serif"><font size="2"><a href="#"
									onClick="javascript:reduorder();"><script language="javascript">swapLang('Delete');</script></a></font></font></font>
								<font size="2" face="microsoft Sans Serif">]&nbsp;[ <a href="#"
									onClick="javascript:dellOrderBy();"><script language="javascript">swapLang('Delete All');</script></a> ]</font></td>
							</tr>

							<tr>
								<td width="17%">
								<div align="right"><script language='javascript'>swapLang('Group By');</script>&nbsp;</div>
								</td>
								<td width="60%"><%=screen.getTagGroupBy()%></td>
								<td width="23%"><font size="2" face="microsoft Sans Serif">
								&nbsp;[ </font><font face="microsoft Sans Serif"><font
									face="microsoft Sans Serif"><font size="2"><a href="#"
									onClick="javascript:redugroup();"><script language="javascript">swapLang('Delete');</script></a></font></font></font>
								<font size="2" face="microsoft Sans Serif">]&nbsp;[ <a href="#"
									onClick="javascript:dellGroupBy();"><script language="javascript">swapLang('Delete All');</script></a> ]</font></td>
							</tr>


							<tr>
								<td>
								<div align="right">&nbsp;&nbsp;<script language="javascript">swapLang('Newpage By');</script>&nbsp;</div>
								</td>
								<td><select name="__onnewpage" id="select7">
									<option  selected>..</option>
								</select></td>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td height="20">
								<div align="right">&nbsp;&nbsp;<script language="javascript">swapLang('Language');</script>&nbsp;</div>
								</td>
								<td>
								<%=screen.getTagLanguage()%>
								</td>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>
								<div align="right">&nbsp;&nbsp;<script language="javascript">swapLang('Template');</script>&nbsp;</div>
								</td>
								<td><%=screen.getTagTemplate()%></td>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td colspan="2">&nbsp;</td>
								<td>&nbsp;</td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
	</tr>
	<tr>
		<td class="bottom"></td>
	</tr>
</table>
</div>
		<input type="hidden"name="mem" value=""> 
		<INPUT TYPE="hidden" NAME="__reportname" VALUE="<%=screen.getEngHeaderValue()%>"> 
		<INPUT TYPE="hidden" NAME="__screen" VALUE="<%=request.getParameter("__screen")%>"> 
		<input type="hidden" name="__cmd" value=""> 
		<input type="hidden" name="__filtercon"  value=""> 
		<input type="hidden" name="helpParam" value=""> 
		<script language="JavaScript" >getInputFormatDate();</script>
<input type="hidden" name="__calendar" value="">
		<input type="hidden" name="helpName" value="<%=screen.getMainHelp()%>"> 
		<input type="hidden" name="mainHelp" value="<%=screen.getMainHelp()%>"> 
		<input type="hidden" name="thaiHeader" value="<%=screen.getThaiHeaderValue()%>"> 
		<input type="hidden" name="engHeader" value="<%=screen.getEngHeaderValue()%>"> 
		<input type="hidden" name="__startPage" value="1"> 
		<input type="hidden" name="__conditionid" value=""> 
		<input type="hidden" name="__classname" value="ReportResultSet"> 

		<%=screen.getTagComponentHidden()%> 
		<%=screen.getTagFixFilterHidden()%> 
		<%=screen.getTagChildChkHidden()%> 

		<input type="hidden" name="uprofile$dbname" value="<%=uf.getDbName()%>"> 
		<input type="hidden" name="com_tname" value="<%=uf.get("com_tname")%>"> 
		<input type="hidden" name="com_ename" value="<%=uf.get("com_ename")%>"> 
		<input type="hidden" name="uprofile$employeeid" value="<%=uf.get("employeeid")%>"> 
		<input type="hidden" name="uprofile$companyid" value="<%=uf.get("companyid")%>"> 	
		<input type="hidden" name="uprofile$userid" value="<%=uf.getUserId()%>"> 
		<input type="hidden" name="uprofile$lang" value =""> 
		<input type="hidden" name="uprofile$schemaname" value="<%=uf.getSchemaName()%>"> 
		<INPUT TYPE="hidden" NAME="__mmxml" VALUE="<%=request.getParameter("__mmxml")%>"> 
		<INPUT TYPE="hidden" NAME="__expxml" VALUE="<%=request.getParameter("__expxml")%>"> 
		<input type="hidden" name="__export_type" value="EXPORT"> 
		<input type="hidden" name="__file_type" value=".pdf">
		<input type="hidden" name="__printname" value="<%=screen.getUProfile().get("fullname")%>">
		<input type="hidden" name="__positionname" value="<%=screen.getUProfile().get("positionname")%>">
		<!-- edit by james 27/11/2006 -->
		<input type="hidden" name="__filter_opt" value="">
		
		<%=screen.getConditionHidden(10)%>

















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