// JavaScript Document
var isPost = false;
function validateForm(objForm) {
	if  ( isPost ) {
		alert("You have press the SUBMIT button already");
		return false;
	} else if ( IsEmpty(objForm.gname.value)) {
		Warning(objForm.gname , "Please specify Guest name");
		return false;
	} else if ( IsEmpty(objForm.name.value)) {
		Warning(objForm.name , "Please specify Name");
		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.type_room.value)) {
		Warning(objForm.type_room , "Please specify Types of Rooms");
		return false;
	} else if ( IsEmpty(objForm.room.value)) {
		Warning(objForm.room , "Please specify Number of rooms");
		return false;
	} else if ( IsEmpty(objForm.person.value)) {
		Warning(objForm.person , "Please specify Number of persons");
		return false;
	} else if ( IsEmpty(objForm.datein.value)) {
		Warning(objForm.datein , "Please specify Date of check in");
		return false;
	} else if ( IsEmpty(objForm.dateout.value)) {
		Warning(objForm.dateout , "Please specify Date of check out");
		return false;
	} else if ( IsEmpty(objForm.card_name.value)) {
		Warning(objForm.card_name , "Please specify Credit Card Holder Name");
		return false;
	} else if ( IsEmpty(objForm.card_type.value)) {
		Warning(objForm.card_type , "Please specify Credit Card Type");
		return false;
	} else if ( IsEmpty(objForm.card_no.value)) {
		Warning(objForm.card_no , "Please specify Credit Card Number");
		return false;
	} else if ( IsEmpty(objForm.card_expi.value)) {
		Warning(objForm.card_expi , "Please specify Credit Card Expiration Date");
		return false;
	} else if ( IsEmpty(objForm.password.value)) {
		Warning(objForm.password , "Please specify Verify code");
		return false;
	} else {
		isPost = true;
		objForm.btnSubmit.disabled = true;
		return true;
	}
}	