// JavaScript Document
var isPost = false;
function validateForm(objForm) {
	if  ( isPost ) {
		alert("You have press the SUBMIT button already");
		return false;
	} else if ( IsEmpty(objForm.name.value)) {
		Warning(objForm.name , "Please specify your Booking Name");
		return false;
	} else if ( IsEmpty(objForm.nameg1.value)) {
		Warning(objForm.nameg1 , "Please specify your Name of Guest 1");
		return false;
	} else if ( IsEmpty(objForm.nameg2.value)) {
		Warning(objForm.nameg2 , "Please specify your Name of Guest 2");
		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.city.value)) {
		Warning(objForm.city , "Please specify your City");
		return false;
	} else if ( IsEmpty(objForm.phone.value)) {
		Warning(objForm.phone , "Please specify your Phone");
		return false;
	} else if ( IsEmpty(objForm.num_persons.value)) {
		Warning(objForm.num_persons , "Please specify your Number of Persons");
		return false;
	} else if ( IsEmpty(objForm.num_rooms.value)) {
		Warning(objForm.num_rooms , "Please specify your Number of Rooms");
		return false;
	} else if ( IsEmpty(objForm.password.value)) {
		Warning(objForm.password , "Please specify Verify code");
		return false;
	}  /*else if ( IsEmpty(objForm.digit.value)) {
		Warning(objForm.digit , "Please specify your Digit");
		return false;
	}*/ else {
		isPost = true;
		objForm.btnSubmit.disabled = true;
		return true;
	}
}	