<!---//



function Check_Input()
{
	var v1 = document.form1.fname.value;
	var v2 = document.form1.lname.value;
	var text = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+|\/{}[]<>,.?;:'ๆ ฿";
	var chOK;
	v1 = v1.toUpperCase();
	v2 = v2.toUpperCase();

	for (i=0; i<text.length; i++){
		sp = text.substring(i, i+1);
		if (v1.indexOf(sp) != -1) chOK = 0;
		if (v2.indexOf(sp) != -1) chOK = 1;
	}

	if (chOK == 0) {
		alert("กรุณาระบุ 'ชื่อ' เป็นภาษาไทย และห้ามมีช่องว่างครับ");
		document.form1.fname.focus();           
		return false;
	}
	else if (chOK == 1) {
		alert("กรุณาระบุ 'สกุล' เป็นภาษาไทย และห้ามมีช่องว่างครับ");
		document.form1.lname.focus();           
		return false;
	} 
	else 
		if (v1=="") {
			document.form1.fname.focus();
			return false;
		} 
		else if (v2=="") {
			document.form1.fname.focus();
			return false;
		}
		else
			return true;
}


//-->
