<%@ page import="com.csc.library.entry.*,com.csc.library.utilities.*,com.csc.library.session.*"  contentType="text/html;charset=UTF-8"%>
<%@page import="com.csc.library.components.*"%>
<jsp:useBean id="REC315" scope="page" class="com.csc.library.system.Task"/>
<jsp:useBean id="REC315HELP" scope="page" class="com.csc.library.system.Task"/>
<jsp:useBean id="RCR011_CPN" scope="page" class="com.csc.library.system.Task"/>
<%
		REC315.setChannel(request ,response);
		REC315HELP.setChannel(request ,response);
		UIManager screen=(UIManager) REC315.process("SingleEntry","MAPPLICANTHELP");
		HelpEntry screen2=(HelpEntry) REC315HELP.process("HelpEntry","REQUESTHELP");
		CheckNull chk=new CheckNull();

		String filter_r = "";

		String applicantid = chk.chkNullString(request.getParameter("applicantid"));
		String requestid = chk.chkNullString(request.getParameter("requestid"));
		
		if(!requestid.equals("")){
			 filter_r="requestid = '"+requestid+"'";
		}

		filter_r="requestid = '"+requestid+"'";
		screen2.getInquiry().setFilter(filter_r);
		screen2.process();
		screen2.nextRec();

		CscCalendar currentDate =  new CscCalendar();
		InitialEnvironment en = new InitialEnvironment("GLOBAL");
		String email = "";
		email = en.getValue("mailauth-username");

		String reportPath="",dbName="",comTname="",comEname="",companyid="",userId=""
		,app_name="",schemaName="",password="",userlevel="",format_date="";

		if(request.getParameter("__cmd")==null && !chk.chkNullString(request.getParameter("__cmd")).equals("save")){		
			RCR011_CPN.setChannel(request ,response);	 
			ReportEntry screen1=(ReportEntry) RCR011_CPN.process("ReportEntry", "RCR001");
			UProfile uf=screen1.getUProfile();
			screen1.process();	
			ThaiUtilities th=new ThaiUtilities();

			reportPath=screen1.getReportPath();
			dbName=uf.getDbName();
			comTname=th.ASCII2Unicode(uf.get("com_tname"));
			comEname=uf.get("com_ename");
			companyid=uf.get("companyid");
			userId=uf.getUserId();
			app_name=uf.get("appname");
			schemaName=uf.getSchemaName();
		//	password=uf.getPassword();
			userlevel=uf.getLevel();
			format_date=uf.get("formatdate");
		}
	//	out.print(screen.getUProfile().toString());

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<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 type='text/javascript' src='../JS/RECSCREEN.js'></script>
<script language='javascript' src='../JS/HOTKEY.js'></script>
<script language='javascript' src='../JS/EMPLOYEE.js'></script>
<script language="javascript">setLang('<%=screen.getUProfile().get("lang")%>');</script>
<script language="javascript">getTitleName();</script>
<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
<script src="../JS/VIEWCALENDAR.js"></script>
<script type='text/javascript' src='/hr/dwr/interface/SearchDWR.js'></script>
<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/SystemCode.js"></script>
<script type="text/javascript" src="/hr/dwr/interface/CscCalendar.js"></script>

<script language="JavaScript">


function GoSave() {
	 with(document.cscform){
		if(__transferstatus[0].checked==true){
			if(__employeeid.value==""){
				alert(swap2String("Please insert Employee ID"));
				getLatestEmpid();
				return;
			}
		}
		bCon=confirm(MyCode[1]);
		if (bCon==true)	{
			__confirm.value="s";
			__cmd.value = "save";
			submit();	
			setTimeout("window.opener.document.cscform.__cmd.value = 'ack';",1500);
			setTimeout("window.opener.document.cscform.submit();",2000);
			//window.close();
		}
	}
}

function enable(){
	with(document.cscform){
		if(__transferstatus[0].checked==true){
			reason.disabled=true;
			reason.value="";
			__employeeid.disabled=false;	
			__employeeid.focus();	
		}
		if(__transferstatus[1].checked==true){
			__employeeid.disabled=true;
			__employeeid.value="";
			reason.disabled=false;			
			reason.focus();	
		}
	}
}

var init = null;
var idTemp="";
var isSave=false;

function initialization(empid,save) {
	idTemp=empid;
	isSave= save;
  if(init) clearTimeout(init);
  init = setTimeout("chkEmpid()", 1000);
}

function chkEmpid(){
	SearchDWR.searchAll(new Array("Memployee","fname,efname","employeeid='"+idTemp+"'",""),showExist);
}
function getLatestEmpid(){
	SearchDWR.searchAll(new Array("Memployee","employeeid,fname","","employeeid desc"),setId);
}

function goView(appid){
//	var  pam="REC201V.jsp?__help=__applicantid$"+appid+";&__cmd=search";
	var	 pam="REC201.jsp?__help=__applicantid$"+appid+";&__cmd=search&__setpage=view";
	window.open(pam,"Help");
}

var showExist = function(data){
	if(data.length>0){
		if(getLang()=="tha")
			dwr.util.setValue("fullname",swap2String("ID alreadey exist")+" ("+data[0][0]+")");
		else
			dwr.util.setValue("fullname",swap2String("ID alreadey exist")+" ("+data[0][1]+")");
	}
	else{
		getLatestEmpid();
		//dwr.util.setValue("fullname","");
		if(isSave)GoSave();
	}
}
var setId = function(data){
	if(data.length>0){
		
		dwr.util.setValue("fullname",swap2String("Latest ID is")+" "+data[0][0]+" "+data[0][1]);
	}
	else{
		dwr.util.setValue("fullname","");
	}
}

function sendmail(){
		with(document.cscform){
	var pam="";
	var to ="roxy@hotmail.com";
	var from = "";
	var time="08.30";
	var subject = "เรียน คุณ"+__aname.value+" กรุณาเตรียมเอกสารไฟล์ที่แนบ (ดังต่อไปนี้) เพื่อเซ็นสัญญากับทางบริษัท";
	pam="REC604.jsp?&__mail_to="+to+"&__mail_from="+__from.value+"&subject="+subject+"&aname="+__aname.value+"&position=&date="+__date.value+"&time="+time+"&place=&room=&type=tran";
				window.open(pam,"","left=150,top=150,width=800,height=500,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
		}
}
function sendinternalmail(){
				with(document.cscform){
	var pam="";
	var to ="";
	var from = "";
	var time="08.30";
	var subject = "Internal Mail";
	pam="REC604.jsp?&__mail_to="+to+"&__mail_from="+from+"&subject="+subject+"&aname="+__aname.value+"&position=&date="+__date.value+"&time="+time+"&place=&room=&type=internal";
				window.open(pam,"","left=150,top=150,width=800,height=500,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
		}
}
function setFormatDatePayroll(Obj,pattern){
	if(pattern=="DDMMYYYY"){
		var dateArr = Obj.value.split("-");
			if(dateArr[0].length==4){
				Obj.value = dateArr[2]+"-"+dateArr[1]+"-"+dateArr[0];
			}
	}
	
}

function getFormatDatePayroll(Obj,pattern){
	if(pattern=="YYYYMMDD"){
		var dateArr = Obj.value.split("-");
			if(dateArr[0].length==2){
				return dateArr[2]+"-"+dateArr[1]+"-"+dateArr[0];
			}
	}
}
function BforPreviw(){
	with(document.cscform){
	var msg ="";
	var appid1 = __applicantid.value;
if(__print[0].checked==true){
		if(__president_name.value == ""){
				alert(MyCode[0]);
				__president_name.focus();
		}else if(__president_position.value == ""){
			alert(MyCode[0]);
				__president_position.focus();
		}else if(__head_name.value == ""){
			alert(MyCode[0]);
				__head_name.focus();
		}else if(__head_position.value == ""){
		alert(MyCode[0]);
				__head_position.focus();
		}else if(__salary.value == ""){
			alert(MyCode[0]);
				__salary.focus();
		}else if(__non_compet.value == ""){
			alert(MyCode[0]);
				__non_compet.focus();
		}else{
				goPreview(appid1);	
 		}
	}else{
				goPreview(appid1);	
		}
	}
}
function goPreview(appid){
	with(document.cscform){
		var com_ename				= __com_ename.value;
		var com_tname				= __com_tname.value;
		var applicantid				= __applicantid.value;
		var print						= __print.value;
		var print_lang					= __print_lang.value;
		var president_name		= __president_name.value;
		var president_position		= __president_position.value;
		var head_name				= __head_name.value;
		var head_position			= __head_position.value;
		var start_date				= __start_date.value;
		var prodate					= __prodate.value;
		var pro_every					= __pro_every.value;
		var salary						= __salary.value;
		var cola							= __cola.value;
		var non_compet				= __non_compet.value;
		var branch_tdesc			= __branch_tdesc.value;
		var branch_edesc			= __branch_edesc.value;
		var probation					= __probation.value;
		var chk_cola					= __chk_cola.value;

		var tmp = "";

		if(__print[0].checked==true){
			if(probation=="1" && chk_cola=="1"){
				if(__print_lang[0].checked==true){
					tmp="RCR017_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR017_E";
				}
			}else if(probation=="1" && chk_cola=="0"){
				if(__print_lang[0].checked==true){
					tmp="RCR019_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR019_E";
				}
			}else if(probation=="0" && chk_cola=="1"){
				if(__print_lang[0].checked==true){
					tmp="RCR020_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR020_E";
				}
			}else if(probation=="0" && chk_cola=="0"){
				if(__print_lang[0].checked==true){
					tmp="RCR021_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR021_E";
				}
			}
		}else if(__print[1].checked==true){
			if(__print_lang[0].checked==true){
				tmp="RCR016_T";
			}else if(__print_lang[1].checked==true){
				tmp="RCR016_E";
			}
		}
		//alert("Page : "+tmp);
	/*		if(__print[0].checked==true){
				if(__print_lang[0].checked==true){
					tmp="RCR017_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR017_E";
				}
			}else if(__print[1].checked==true){
				if(__print_lang[0].checked==true){
					tmp="RCR016_T";
				}else if(__print_lang[1].checked==true){
					tmp="RCR016_E";
				}
			}
	*/

	//	 alert("tmp = "+tmp);
	//	 alert("start_date = "+start_date);
		
		if(tmp!=""){
                   		
				var path = "<%=reportPath%>";
				var a=path.substring(0,path.length)+
				"?uprofile$dbname=<%=dbName%>"+
				"&com_tname=<%=comTname%>"+
				"&com_ename=<%=comEname%>"+
				"&uprofile$companyid=<%=companyid%>"+
				"&uprofile$userid=<%=userId%>"+
				"&uprofile$lang=THA"+
				"&uprofile$appname=<%=app_name%>"+
				"&uprofile$schemaname=<%=schemaName%>"+
				"&uprofile$emp_level=<%=userlevel%>"+
				"&uprofile$formatdate=<%=format_date%>"+
				"&__filtercon=mapplicant.applicantid = '"+applicantid+"' "+
				"&__screen=RCR011_CPN"+
				"&__REPORT_XML=MAPPLICANTHELP"+
				"&__reportname=Job Application Form"+
				"&helpParam=applicantid"+
				"&helpName=MAPPLICANTHELP"+
				"&mainHelp=MAPPLICANTHELP"+
				"&thaiHeader=สัญญาจ้างงาน"+
				"&engHeader=Job Application Form"+
				"&__startPage=1"+
				"&__com_tname="+com_tname+
				"&__com_ename="+com_ename+
				"&__president_name="+president_name+
				"&__president_position="+president_position+
				"&__head_name="+head_name+
				"&__head_position="+head_position+
				"&__start_date="+start_date+
				"&__prodate="+prodate+
				"&__pro_every="+pro_every+
				"&__salary="+salary+
				"&__cola="+cola+
				"&__non_compet="+non_compet+
				"&__branch_edesc="+branch_edesc+
				"&__branch_tdesc="+branch_tdesc+
				"&__conditionid="+
				"&__classname=ReportResultSet"+
				"&__mmxml="+
				"&__expxml="+
				"&__export_type=EXPORT"+
				"&__file_type=.pdf"+
				"&mem=mapplicant.applicantid"+
				"&__template="+tmp+".jasper$"+
				"&__cmd="+
				"&__orderText="+
				"&__language=THA"+
				"&__groupText="+
				"&__reportHeader=สัญญาจ้างงาน";
		    //alert(a);
			window.open(a);
			//setTimeout("goPreview2()",5000);
		   }else{
			   alert("กรุณาเลือกเงื่อนไข");
		   }
	}
}
function reset(){
	with(document.cscform){
			window.close();
	}
	}

function waitingtransfer(){
			window.opener.document.cscform.submit();
			window.close();
}
function chkChange(value){
	 with(document.cscform){
		if(value == "0"){
			document.getElementById("chkProbation").style.display = "";
			__probation.value = "1";
		}else if(value == "1"){
			document.getElementById("chkProbation").style.display = "none";
			__probation.value = "0";
		}
	
	}
}
function chkChange2(value){
	 with(document.cscform){
		if(value == "0"){
			document.getElementById("chkSalary").style.display = "";
			__chk_cola.value = "1";
		}else if(value == "1"){
			document.getElementById("chkSalary").style.display = "none";
			__chk_cola.value = "0";
		}
	
	}
}
function chkDefaultValue(){
			with(document.cscform){
			var president ="";
			var position ="";
			if(__president_name.value ==""){
			if(__language.value=="tha"){
					if(__branch.value=="001" || __branch.value=="002" ){
					__president_name.value ="กฤติยา วีรบุรุษ";
					}else if(__branch.value=="003"){
					__president_name.value ="ยุทธพล  ลาภละมูล";
					}else if(__branch.value=="004"){
					__president_name.value ="ชาญศักดิ์  ธนเตชา";
					
					}
			}else{
					if(__branch.value=="001" || __branch.value=="002" ){
						__president_name.value ="Mr.Krittiya  Veeraburus";
					}else if(__branch.value=="003"){
						__president_name.value ="Mr.Yuthapol Laplamool";
					}else if(__branch.value=="004"){
					__president_name.value ="Mr.Charnsak Thanataecha";
					}
				}
			}

			if(__president_position.value ==""){
				if(__language.value=="tha"){
					if(__branch.value=="001" || __branch.value=="002" ){
					__president_position.value ="กรรมการผู้จัดการใหญ่";
					}else if(__branch.value=="003" || __branch.value=="004"){
					__president_position.value ="กรรมการผู้จัดการ";
					}
			}else{
					if(__branch.value=="001" || __branch.value=="002" ){
					__president_position.value ="President";
				
					}else if(__branch.value=="003" || __branch.value=="004"){
				
					__president_position.value ="Managing Director";
					}
				}
			}
}
}

function chkLang(value){
	with(document.cscform){
		
	//	alert(value);
	if(value =="T"){
		if(__branch.value=="001" || __branch.value=="002" ){
					__president_name.value ="กฤติยา วีรบุรุษ";
					__president_position.value ="กรรมการผู้จัดการใหญ่";
					}else if(__branch.value=="003"){
					__president_name.value ="ยุทธพล  ลาภละมูล";
					__president_position.value ="กรรมการผู้จัดการ";
					}else if(__branch.value=="004"){
					__president_name.value ="ชาญศักดิ์  ธนเตชา";
					__president_position.value ="กรรมการผู้จัดการ";
					}
					__head_name.value ="ไพรัช ธนาชัยแสง";
					__head_position.value ="ผู้อำนวยการ-รักษาการหัวหน้าฝ่ายทรัพยากรบุคคลธุรกิจตลาดทุน";
	}else if(value=="E"){
		if(__branch.value=="001" || __branch.value=="002" ){
						__president_name.value ="Mr.Krittiya  Veeraburus";
							__president_position.value ="President";
					}else if(__branch.value=="003"){
						__president_name.value ="Mr.Yuthapol Laplamool";
						__president_position.value ="Managing Director";
					}else if(__branch.value=="004"){
					__president_name.value ="Mr.Charnsak Thanataecha";
					__president_position.value ="Managing Director";
					
					}
					__head_name.value ="Pirat Thanachaisang";
					__head_position.value ="VP-Active Head of Human Resource";
		}
	}
}
</script>
<style type="text/css">
<!--
span#fullname {
	color: #FF0000;
}
-->
</style>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="chkDefaultValue();">
 <form name="cscform" method="post" action="REC315_PHATRA.jsp">
	 

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

<%=screen.InitialVariable()%>

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

	  <input type="hidden"name="__screen"  value="REC315_PHATRA"> 
	  <input type="hidden" name="__help"  size="50" value="">
	  <input name="__fixCon" type="hidden" value="">
	  <input type="hidden" name="__cmd"  value="">
	  <!-- <input type="hidden" name="__confirm"  value=""> -->
	  <input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>"> 
	  <input type="hidden" name="__empfullname" value="<%=screen.getUProfile().get("fullname")%>">
	  <input type="hidden" name="__com_tname" value="<%=screen.getUProfile().get("com_tname")%>">
	  <input type="hidden" name="__com_ename" value="<%=screen.getUProfile().get("com_ename")%>">
	  <input type="hidden" name="__referPage" value="">
	  <input type="hidden" name="__notNull" value="">
   	 <input type="hidden" name="__calendar">        
   	 <input type="hidden" name="__from" value="<%=email%>">        
   	 <input type="hidden" name="__date" value="<%=currentDate.getDD() + " " +currentDate.getThaiLongMonth() + " " + currentDate.getYear()%>">        
    <input type="hidden" name="__language"	value ="<%=screen.getUProfile().get("lang")%>">
    <input type="hidden" name="__aname"	value ="<%//=screen2.getDataLabel("MAPPLICANT","FNAME")+" " + screen2.getDataLabel("MAPPLICANT","LNAME")%>">
	<input type="hidden" name="__applicantid" value="<%=request.getParameter("applicantid")%>">
	<input type="hidden" name="__requestid" value="<%=request.getParameter("requestid")%>">
	<input type="hidden" name="__emp_type" value="<%=screen2.getDataLabel("EMP_TYPE")%>">
	<input type="hidden" name="__branch_tdesc" value="<%=screen2.getDataLabel("MBRANCH","TDESC")%>">
	<input type="hidden" name="__branch_edesc" value="<%=screen2.getDataLabel("MBRANCH","EDESC")%>">
	<input type="hidden" name="__probation" value="1">
	<input type="hidden" name="__chk_cola" value="1">
	<input type="hidden" name="__branch" value="<%=screen2.getDataLabel("branch")%>">

      <script language="javascript">
			getInputFormatDate();
			searchApplicantid('<%=request.getParameter("applicantid")%>');	  
	  </script>  

	 <% if(request.getParameter("__cmd")!=null && request.getParameter("__cmd").equals("save") ){%>
		<div class="complete" id="msgstatus" align="center">
		<p>
				<img src="../WELFARE/IMAGES/WAITING.gif" ><br>
				Waiting......
		</p>
		</div>
		<script language="javascript">setTimeout(waitingtransfer,5000);</script>
<%}else{%>

	 <div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>

	 <div class="centered"> <br>

		<table width="100%"  align="center" cellpadding="0" cellspacing="0">
		  <tr class="header"> 
			<td  class="header" align="right">REC315_PHATRA, 
			  <script language="javascript">swapLang('Option Report');</script></td>
		  </tr>
		
		  <tr > 
			<td colspan="2"> 
			  <div align="center"> 
				<center>
				  <table  cellspacing="0" cellpadding="0"  width="100%">
					<tr>
						<td align="left" nowrap class="columnlabel" colspan="2"><div nowrap align="left"><input type="radio" name="__print" value="1" checked>&nbsp;<script language="javascript">swapLang('Employment Agreement');</script></div></td>
					</tr>
					<tr>
						<td><div align="right"nowrap><script language="javascript">swapLang('Name of an authorized person');</script>(President)&nbsp;*</div></td>
						<td >&nbsp;<input type="text" name="__president_name" value="<%=chk.chkNullString(request.getParameter("__president_name"))%>" size="50"/></td>
					</tr>
					<tr>
						<td><div align="right"><script language="javascript">swapLang('Position of an authorized person');</script>&nbsp;*</div></td>
						<td>&nbsp;<input type="text" name="__president_position" value="<%=chk.chkNullString(request.getParameter("__president_name"))%>" size="50"/></td>
					</tr>
					<tr>
						<td><div  align="right" nowrap><script language="javascript">swapLang('Name of an authorized person');</script>(Head of HR)&nbsp;*</div></td>
						<td >&nbsp;<% if((screen.getUProfile().get("lang")).equals("tha")){ 
												%><input type="text" name="__head_name" value="<%=chk.chkNullString(request.getParameter("__authorize_name"),"ไพรัช ธนาชัยแสง")%>" size="50"/><%}else{%>
												<input type="text" name="__head_name" value="<%=chk.chkNullString(request.getParameter("__authorize_name"),"Pirat Thanachaisang")%>" size="50"/>
												<%}%>
												</td>
					</tr>
					<tr>
						<td align="right" nowrap><div nowrap><script language="javascript">swapLang('Position of an authorized person');</script>&nbsp;*</div></td>
						<td>&nbsp;<% if((screen.getUProfile().get("lang")).equals("tha")){%><input type="text" name="__head_position" value="<%=chk.chkNullString(request.getParameter("__authorize_position"),"ผู้อำนวยการ-รักษาการหัวหน้าฝ่ายทรัพยากรบุคคลธุรกิจตลาดทุน")%>" size="50"/><%}else{%>
						<input type="text" name="__head_position" value="<%=chk.chkNullString(request.getParameter("__authorize_position"),"VP-Active Head of Human Resource")%>" size="50"/>
						<%}%></td>
					</tr>
					<tr>
                      <td align="right" nowrap ><script language="javascript">swapLang('Start Date');</script>&nbsp;*</td>
                      <td nowrap class="columnData">&nbsp;<input type="text" name="__start_date"  onKeyPress="chkIntegerOfDate(this.value);" onKeyUp="sysIsEdit();formatDate(this);" dir="" onBlur="chkInputDate(this);" onFocus="this.select();"  value="<%=new CscCalendar().getDDMMYYYY()%>" size="10"><a href="javascript:viewCal('__start_date')" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('999','','../IMAGES/BUTTON/SWAP/CALENDAR_SWAP20.gif',1)" ><img src="../IMAGES/BUTTON/MAIN/CALENDAR20.gif" alt="Calendar" name="Image19" width="20" height="20" border="0" align="absmiddle"></a></td>
                    </tr>
					<tr>
						<td align="right" nowrap ><script language="javascript">swapLang('Period of probation');</script>&nbsp;*</td>
						<td>
						<%if((screen.getUProfile().get("lang")).equals("tha")){%>
						<input type="radio" name="__chkProbation" value="0" onclick="chkChange('0');" checked>&nbsp; มี&nbsp;<input type="radio" name="__chkProbation" value="1" onclick="chkChange('1');">&nbsp;ไม่มี
						<%}else{%>
						<input type="radio" name="__chkProbation" value="0" onclick="chkChange('0');" checked>&nbsp;Yes&nbsp;<input type="radio" name="__chkProbation" value="1" onclick="chkChange('1');">&nbsp; No
						<%}%>
						<br>
						<div id="chkProbation">&nbsp;<input type="text" name="__prodate" value="<%=chk.chkNullString(request.getParameter("__prodate"),"3")%>" size="10" onkeypress="chkInteger()"/>
							<select name="__pro_every">
								<option value="D"><script language="javascript">swapLang('Day');</script></option>
								<option value="M" selected><script language="javascript">swapLang('Month');</script></option>
							</select>
						</div>
						</td>
					</tr>
					
					
					<tr>
						<td align="right" nowrap><script language="javascript">swapLang('COLA');</script>&nbsp;*</td>
						<td>
						<%if((screen.getUProfile().get("lang")).equals("tha")){%>
						<input type="radio" name="__chkCola" value="0" onclick="chkChange2('0');" checked>&nbsp; มี&nbsp;<input type="radio" name="__chkCola" value="1" onclick="chkChange2('1');">&nbsp;ไม่มี
						<%}else{%>
						<input type="radio" name="__chkCola" value="0" onclick="chkChange2('0');" checked>&nbsp;Yes&nbsp;<input type="radio" name="__chkCola" value="1" onclick="chkChange2('1');">&nbsp; No
						<%}%><br>
						<div id="chkSalary">
						&nbsp;<input type="text" name="__cola" value="<%=chk.chkNullString(request.getParameter("__cola"),"1,500.00")%>" onkeypress="chkSpecialStr(event); checkWordNumber(this.value);" onfocus="callDelComma(this);" onblur="checkNumFloat(this,0.00,999999.99, 2);" size="10"/>&nbsp;<script language="javascript">swapLang('Baht');</script>
						</div></td>
					</tr>

					<tr>
						<td align="right" nowrap><script language="javascript">swapLang('Salary');</script>&nbsp;*</td>
						<td>&nbsp;<input type="text" name="__salary" value="<%=chk.chkNullString(request.getParameter("__salary"),"")%>" onkeypress="chkSpecialStr(event); checkWordNumber(this.value);" onfocus="callDelComma(this);" onblur="checkNumFloat(this,0.00,999999.99, 2);" size="10"/>&nbsp;<script language="javascript">swapLang('Baht');</script></td>
					</tr>

					<tr>
						<td align="right" nowrap ><script language="javascript">swapLang('Non Competing Recurring');</script>&nbsp;*</td>
						<td>&nbsp;<input type="text" name="__non_compet" value="<%=chk.chkNullString(request.getParameter("__non_compet"))%>" size="10" onkeypress="chkInteger()"/>&nbsp;<script language="javascript">swapLang('Month');</script></td>
					</tr>
					<tr>
						<td align="left" nowrap class="columnlabel" colspan="2"><div nowrap align="left"><input type="radio" name="__print" value="2">&nbsp;<script language="javascript">swapLang('Additional Terms and conditions attached to the Employment Agreement');</script></div></td>
					</tr>
					<tr>
						<td align="right" nowrap><script language="javascript">swapLang('Language Type');</script>&nbsp;*</td>
						<td>&nbsp;<input type="radio" name="__print_lang" value="T" checked onclick="chkLang('T');">&nbsp;<script language="javascript">swapLang('Thai');</script>&nbsp;&nbsp;&nbsp;
						<input type="radio" name="__print_lang" value="E" onclick="chkLang('E');">&nbsp;<script language="javascript">swapLang('Eng');</script></td>
					</tr>
					<tr>
						<td align="left" nowrap class="columnlabel"></td>
					</tr>
					<tr>
						<td align="right" nowrap class="columnlabel">&nbsp;</td>
						<td nowrap class="columnData">&nbsp;&nbsp;<a href="javascript:BforPreviw();"><img src="../IMAGES/BUTTON/PRINT.gif" width="73" height="23" border="0"></a>&nbsp;&nbsp;<a href="javascript:reset();"><img src="../IMAGES/BUTTON/CLOSE.gif" width="73" height="23" border="0"></a></td>
                    </tr>
                    <tr>
                      <td  colspan="4" height="400"><div align="center"></div></td>
                    </tr>
                  </table>
			    </center>
			  </div></td>
		  </tr>
		  <tr bordercolor="0069B3">
		  <td  class="bottom"></td>
		</tr>
		</table>
	</div><script language="javascript">getLatestEmpid();</script>

	<script language="javascript">//alert(__confirm.value);</script>
	<script language="javascript">
	if(document.cscform.__confirm.value=="2"){
		window.close();
		}
    </script>

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

<%=screen.endJSP()%>

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

<%}%>

</FORM>
</body>
</html>