

function check_type_number() {
		t_c=event.keyCode
			if ((t_c != 9) && (t_c != 8) && (t_c != 190) && (t_c < 46 || t_c > 57) && (t_c != 110) && (t_c < 96 || t_c > 105) ) {
			event.returnValue = false;
			alert("กรุณากรอกข้อมูลเป็นตัวเลขด้วยค่ะ...!" + event.keyCode);
			}
		}


function Conf(object)
{
	if (confirm("ยืนยันการลบข้อมูล") ==true)
	{
		return true;
	}
	return false;
}

function CheckEng()
{  
	if((window.event.keyCode >=49 && window.event.keyCode <=57) || (window.event.keyCode >=64 && window.event.keyCode <=90) || (window.event.keyCode >=97 && window.event.keyCode <=122) || (window.event.keyCode==32) || (window.event.keyCode==46) || (window.event.keyCode==33) || (window.event.keyCode==37))   /* 64=@  */
	{
		return true;
	}else{
		event.returnValue = false;
		alert("กรุณากรอก ข้อมูลเป็นภาษาอังกฤษและตัวเลข เท่านั้นค่ะ");
		return false;
	}
}

function addcars_check() {

		if (cars_Form.cars_licens.value=="")
		{  
			alert("กรุณากรอก หมายเลขทะเบียน ด้วยค่ะ !");
			cars_Form.cars_licens.focus();
			return  false;
		}
		if (cars_Form.cars_seat.value=="")
		{  
			alert("กรุณากรอก จำนวนที่นั่ง ด้วยค่ะ !");
			cars_Form.cars_seat.focus();
			return  false;
		}
		if (cars_Form.cars_type.value=="")
		{  
			alert("กรุณาเลือก ประเภทรถ ด้วยค่ะ !");
			cars_Form.cars_type.focus(); 
			return  false;
		}		
		if (cars_Form.cars_bran.value=="")
		{  
			alert("กรุณาเลือก ยี่ห้อ ด้วยค่ะ !");
			cars_Form.cars_bran.focus();
			return  false;
		}
		/*
		if (cars_Form.cars_price.value=="")
		{  
			alert("กรุณากรอก ราคา ด้วยค่ะ !");
			cars_Form.cars_price.focus(); 
			return  false;
		}
		if (cars_Form.cars_color.value=="")
		{  
			alert("กรุณาเลือก สีของรถ ด้วยค่ะ !");
			cars_Form.cars_color.focus(); 
			return  false;
		}
		*/
		if (cars_Form.cars_motor.value=="")
		{  
			alert("กรุณาเลือก ประเภทเชื้อเพลิง ด้วยค่ะ !");
			cars_Form.cars_motor.focus(); 
			return  false;
		}	
		/*
		if (cars_Form.cars_gear.value=="")
		{  
			alert("กรุณาเลือก ประเภทเกียร์ ด้วยค่ะ !");
			cars_Form.cars_gear.focus(); 
			return  false;
		}
		if (cars_Form.cars_drive.value=="")
		{  
			alert("กรุณาเลือก ประเภทเพลาขับ ด้วยค่ะ !");
			cars_Form.cars_drive.focus(); 
			return  false;
		}
		if (cars_Form.cars_cc.value=="")
		{  
			alert("กรุณากรอก ขนาดเครื่องยนต์ ด้วยค่ะ !");
			cars_Form.cars_cc.focus(); 
			return  false;
		}			                          
		if (cars_Form.rddate.value=="" || cars_Form.rmdate.value=="" || cars_Form.rydate.value=="")
		{  
			alert("กรุณากรอก วันที่จดทะเบียน ด้วยค่ะ !");
			cars_Form.rddate.focus(); 
			return  false;
		}
		if (cars_Form.ddate.value=="" || cars_Form.mdate.value=="" || cars_Form.ydate.value=="")
		{  
			alert("กรุณากรอก วันที่เป็นกรรมสิทธ์ของมหาวิทยาลัย ด้วยค่ะ !");
			cars_Form.ddate.focus(); 
			return  false;
		} 
		*/
}


function addrepair_check() {

		if (repair_Form.rep_item.value=="")
		{  
			alert("กรุณาเลือก รายการซ่อม ด้วยค่ะ !");
			repair_Form.rep_item.focus();
			return  false;
		}
		if (repair_Form.rep_stdate.value=="")
		{  
			alert("กรุณาเลือก วันที่ส่งซ่อม ด้วยค่ะ !");
			repair_Form.rep_stdate.focus();
			return  false;
		}
}

function addbill_check() {

		if (addbill_form.month_bill.value=="")
		{  
			alert("กรุณา เลือกเดือน ด้วยค่ะ !");
			addbill_form.month_bill.focus();
			return  false;
		}
		if (addbill_form.year_bill.value=="")
		{  
			alert("กรุณา เลือกปี ด้วยค่ะ !");
			addbill_form.year_bill.focus();
			return  false;
		}
}


function roomservice_check() {

		if (roomservice_form.service_id.value=="")
		{  
			alert("กรุณา เลือกบริการเสริม ด้วยค่ะ !");
			roomservice_form.service_id.focus();
			return  false;
		}
}

function checkin_check() {

		if (checkin_form.checkin_date.value=="")
		{  
			alert("กรุณา เลือกวันที่เข้าพัก ด้วยค่ะ !");
			checkin_form.checkin_date.focus();
			return  false;
		}
		if (checkin_form.member_id.value=="")
		{  
			alert("กรุณา เลือกผู้เข้าพัก ด้วยค่ะ !");
			checkin_form.member_id.focus();
			return  false;
		}
	}

	function reserv_check() {

		if (reserv_form.stmonth.value=="")
		{  
			alert("กรุณา เลือกเดือนที่จอง ด้วยค่ะ !");
			reserv_form.stmonth.focus();
			return  false;
		}
		if (reserv_form.styear.value=="")
		{  
			alert("กรุณา เลือกปีที่จอง ด้วยค่ะ !");
			reserv_form.styear.focus();
			return  false;
		}
		if (reserv_form.member_id.value=="")
		{  
			alert("กรุณา เลือกผู้ที่จอง ด้วยค่ะ !");
			reserv_form.member_id.focus();
			return  false;
		}
	}
