// JavaScript Document
var isPost = false;
function validateForm(objForm) {
	if  ( isPost ) {
		alert("You have press the SUBMIT button already");
		return false;
	} else if ( IsEmpty(objForm.hotel_name.value)) {
		Warning(objForm.hotel_name , "กรุณาใส่ชื่อโรงแรม / Please Fill Your Hotel Name");
		return false;
	} else if ( IsEmpty(objForm.addr.value)) {
		Warning(objForm.addr , "กรุณาใส่ที่อยู่ / Please Fill Your Address");
		return false;
	} else if ( IsEmpty(objForm.loc.value)) {
		Warning(objForm.loc , "กรุณาเลือกสถานที่ตั้ง/ Please select Location");
		return false;
	} else if ( IsEmpty(objForm.email.value)) {
		Warning(objForm.email ,"Please specify your Email Address");
		return false;
	} else if ( ! IsEmail(objForm.email.value)) {
		Warning(objForm.email ,"Please specify your Email Address in the right format");
		return false;
	} else if ( IsEmpty(objForm.desc.value)) {
		Warning(objForm.desc , "กรุณาใส่รายละเอียด / Please Fill Your Description");
		return false;
	} else if ( IsEmpty(objForm.contact.value)) {
		Warning(objForm.contact , "กรุณาใส่ชื่อผู้ติดต่อ / Please Fill Your Contact name");
		return false;
	}  else if ( IsEmpty(objForm.contact_tel.value)) {
		Warning(objForm.contact_tel , "กรุณาใส่เบอร์ติดต่อ/ Please Fill Your Contact Number");
		return false;
	}  else if ( IsEmpty(objForm.password.value)) {
		Warning(objForm.password , "Please specify your Visual verification");
		return false;
	}  else {
		isPost = true;
		objForm.btnSubmit.disabled = true;
		return true;
	}
}				
