RECSCREEN.js 10.2 KB
Newer Older
Thitichaipun Wutthisak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363


function goAppDetail(){
	with(window.cscform){
				__help.value = "applicantid#'"+__applicantid.value+"',companyid#'"+__companyid.value+"'";	
				params = "__applicantid="+__applicantid.value+"&__companyid="+__companyid.value;
				page = "REQ206.jsp?"+params;
	//		window.open(page,"Candidate Detail","left=150,top=150,width=700,height=500,toolbar=no,status=yes,scrollbars=yes");
			window.open(page);
	}
}

function goAppDetail2(appid,comid){
	with(window.cscform){
			 page = "REQ206.jsp?__applicantid="+appid+
							"&__companyid="+comid;
	//		window.open(page,"Candidate Detail","left=150,top=150,width=700,height=500,toolbar=no,status=yes,scrollbars=yes");
			window.open(page);
	}
}

function closeWindows(){
	with(window.cscform){
			window.close();
	}
}

function chkBox(box,hid){
	if(box.checked){
		hid.value = "1";
	}else hid.value = "0";
}

function setValueBox(hid,box){
	if(hid.value=='1'){
			box.checked = true;
	}
}

function setAllBox(){	
	with(document.cscform){
			setValueBox(__comskill1,comskill1);
			setValueBox(__comskill2,comskill2);
			setValueBox(__comskill3,comskill3);
			setValueBox(__comskill4,comskill4);
			setValueBox(__comskill5,comskill5);
			setValueBox(__comskill6,comskill6);		
			setValueBox(__cust_detail1,cust_detail1);
			setValueBox(__cust_detail2,cust_detail2);
			setValueBox(__cust_detail3,cust_detail3);
			setValueBox(__news_yourself,news_yourself);
			setValueBox(__news_web,news_web);
			setValueBox(__news_branch,news_branch);
			setValueBox(__news_paper,news_paper);
			setValueBox(__news_jobfair,news_jobfair);
			setValueBox(__news_person,news_person);		
	}
}

function saveId(){
	var id = "";
	with(document.cscform){
			id = id1.value + id2.value + id3.value + id4.value + id5.value ;
			if(!chkId()){
				alert(MyCode[75]);
			}
			__id_people.value = id;
	}
}

function chkId(){
	with(document.cscform){
		if(!chklen(id1.value,1)){
			id1.focus();
			return false;
		}
		if(!chklen(id2.value,4)){
			id2.focus();
			return false;
		}
		if(!chklen(id3.value,5)){
			id3.focus();
			return false;
		}
		if(!chklen(id4.value,2)){
			id4.focus();
			return false;
		}
		if(!chklen(id5.value,1)){
			id5.focus();
			return false;
		}
	}
	return true;
}


function chklen(val,limit){
	if(val.length<limit) return false;
	else return true;
}

function setId_people(){
		with(document.cscform){
			id = __id_people.value;
			id1.value = id.substring(0,1);
			id2.value = id.substring(1,5);
			id3.value = id.substring(5,10);
			id4.value = id.substring(10,12);
			id5.value = id.substring(12,13);
		}
}

function moveCursor(len,curr,next){
		with(document.cscform){
			var val = curr.value;
			if(val.length == len){
				next.focus();
			}
		}
	}

function chkNullField(){

	with(document.cscform){
		// id_people 
		if(id1.value==''){
			alert(MyCode[0]);
			id1.focus();
			return false
		}
		else if(id2.value==''){
			alert(MyCode[0]);
			id2.focus();
			return false
		}
		else if(id3.value==''){
			alert(MyCode[0]);
			id3.focus();
			return false
		}
		else if(id4.value==''){
			alert(MyCode[0]);
			id4.focus();
			return false
		}
		else if(id5.value==''){
			alert(MyCode[0]);
			id5.focus();
			return false
		}

		// 
		else if(__MAPP_ADDR$EADDR$1.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EADDR$1.focus();
			return false
		}
		else if(__MAPP_ADDR$EADDR$2.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EADDR$2.focus();
			return false
		}
		// 
		else if(__MAPP_ADDR$EROAD$1.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EROAD$1.focus();
			return false
		}
		else if(__MAPP_ADDR$EROAD$2.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EROAD$2.focus();
			return false
		}  
		// Ӻ
		else if(__MAPP_ADDR$EDISTRICT$1.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EDISTRICT$1.focus();
			return false
		}
		else if(__MAPP_ADDR$EDISTRICT$2.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$EDISTRICT$2.focus();
			return false
		}
		//ѧѴ
		/*else if(__province1.value==''){
			alert(MyCode[0]);
			__province1.focus();
			return false
		}
		else if(__province2.value==''){
			alert(MyCode[0]);
			__province2.focus();
			return false
		}*/
		// ɳ	
		else if(__MAPP_ADDR$ZIPCODE$1.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$ZIPCODE$1.focus();
			return false
		}
		else if(__MAPP_ADDR$ZIPCODE$2.value==''){
			alert(MyCode[0]);
			__MAPP_ADDR$ZIPCODE$2.focus();
			return false
		}

		else if(__MAPP_FAMILY$FNAME$1.value==''){
			alert(MyCode[0]);
			__MAPP_FAMILY$FNAME$1.focus();
			return false
		}
		else if(__MAPP_FAMILY$FNAME$2.value==''){
			alert(MyCode[0]);
			__MAPP_FAMILY$FNAME$2.focus();
			return false
		}
		

	}
	return true;
}

//-- for web board --\\
function setID(){
	with(document.cscform){
		__requestid.value = window.parent.document.forms[0].__requestid.value;
		__applicantid.value = window.parent.document.forms[0].__applicantid.value;
	}
}
// for set topic label \\
function setInvDateTopic(){
	with(document.cscform){
		__topic.value = "Interview date : "+window.parent.document.forms[0].__interviewdate.value;
	}
}

//-- for  all text email --\\
// 1. Acknowledgement Letter (for Candidate - outside company)
function setMailMsg(){
	with(document.cscform){
			var msg="";
				msg = "Dear sir,\n\n"+
							"\t EASY BUY Public Company Limited, Human Resource Department would like to\n"+
							" invite you to attend an interview session in postion "+__position.value+" as you may see the details below.\n\n"+
							"\t"+__interviewdate.value+", "+__interviewtime.value+" at Ramaland Building ( Next to Robinson Silom) Floor 11,\n"+
							" Silom Road, Bangkok (BTS - Saladaeng Statio or MRTA - Silom Station)\n"+
							"\t All candidate must dress and groom properly, for any enquiry, please kindly contact Human Resource department\n"+
							" 02-6329800 ext. 1922 - 1926.\n\n"+
							"\nBest regards,\n\n"+
							"Human Resource Department\n\n"
				__textMailApp.value = msg;				
				}			
}

// 1. Acknowledgement Letter (for Manager - inside company)
function setMailAppointComm(){
	with(document.cscform){
			var msg="";
			msg = "Dear sir,\n\n"+
						"\t Human Resource Department would like to inform you about the interview arragement position \n"+
						__position.value+" as you may see the details below.\n\n"+
						__interviewdate.value+", "+__interviewtime.value+" at "+__interviewroom.value+" \n\n"+
						"\t for any enquiry, please kindly contact Human Resource department 02-6329800 ext. 1922 - 1926.\n\n"+
						"Best regards,\n\n"+
						"Human Resource Department\n\n";
						__textMailComm.value = msg;				
					}			
}

// email message for Result of Candidate (for Candidate - outside company)
function setMailResultCand(){
	with(document.cscform){
		var msg="";
		var result = __result.value;
		if(result=='1' || result=='3'){  // Pass or Pending
			msg = "Dear sir,\n"+
						"\t EASY BUY Public Company Limited, Human Resource Department, we are gratify to \n"+
						" inform that you have "+__resultmsg.value+" interview in the position "+__positionname.value+"., Please kindly check the detail\n"+
						" the details of confirmation below.\n"+
						"Position Name : "+__positionname.value+"\n"+
						"Start Date : "+__start_to_work.value+"\n"+
						"Working Place : "+__room.value+"\n"+
						"\t For any enquiry, please kindly contract Human Resource Department 02-6329800 ext. 1922 - 1926.\n\n"+
						"Best regards,\n"+
						"Human Resource Department\n\n"
		}
		else if(result=='2' || result=='4'){  // Not Pass or Blacklist
			msg = "Dear sir,\n"+
						"\t EASY BUY Public Company Limited, Human Resource Department, we are appreciated for your\n"+
						" presence on .............................. However your qualification has not match with our current job requirement.\n"+
						"We would like to thank you for your precious time and we wish you all success in the next coming future.\n\n"+
						"Thank You,\n"+
						"Human Resource Department\n\n";
		}
		__textMailApp.value = msg;	
	}
}

// email message for Result of Candidate (for Manager - inside company)
function setMailMsgComm(){
	with(document.cscform){
			var msg="";
			var result = __result.value;
			if(result=='1' || result=='3'){  // Pass or Pending
				msg = "Dear sir,\n"+
							"\t Please be confirmed for a new staff in the position "+__positionname.value+".,"+__candidatename.value+" He/She will start with us on\n"+
							__start_to_work.value+"\n"+
							"\t For any enquiry, please kindly contact Human Resource Department 02-6329800 ext. 1922 - 1926.\n"+
							"Best regards,\n"+
							"Human Resource Department\n\n";
			}
			__textMailComm.value = msg;			
	}
}

// shortlist candidates resume -- notification letter ( from HR to Line Manager)
function setMailSesumeToDept(){
	with(document.cscform){
		var msg="";
		msg = "Dear sir,\n"+
					"\tEnclosed herewith is the list of the candidates in position "+__position.value+".\n"+
					"\tPlease kindly screening for a shortlist and return to HR Dept. to make a further interview arrangement\n"+
					"Best regards,\n"+
					"Human Resource Department";
		__textMailApp.value = msg;
	}
}

//shortlist candidates resume -- notification letter ( from Manager to HR)
function setMailSesumeToHR(){
	with(document.cscform){
		var msg="";
		msg = "Dear Human Resource Department,\n"+
					"\tEnclosed herewith is the list of the candidates in position "+__position.value+",\n"+
					"which has been selected by us. Please kindly arrange the interview session following by a \n"+
					" schedule that has been given.\n"+
					"Best regards,\n";
					
		__textMailApp.value = msg;
	}
}

// Reschedule Letter ( to inform a candidate for interview re-arrangement/detail)
function setRecheMail(){
	with(document.cscform){
		var msg="";
		msg = "Dear "+__recreive.value+",\n"+
				"\t EASY BUY Public Company Limited, Human Resource Department would like to\n"+
				"postpone our interview session in position "+__position.value+". Please see the new\n"+
				"schedule below.\n"+
				"\t On "+__interviewdate.value+", "+__interviewtime.value+" at Ramaland Building\n"+
				"(Next to Robinson Silom) Floor 11, Silom Road, Bangkok(BTS-Saladaeng Station or MRTA-Silom Station)\n"+
				"\t All candidates must dress and groom properly, for any enquiry, please kindly contract\n"+
				"Human Resource department 02-6329800 ext.1922-1926.\n"+
				"Best regards,\n"+
				"Human Resource Department";
		__textMailComm.value = msg;
	}
}