function validateForm(){
	var str = "";
	if (!IsNotEmpty(document.iForm.FirstName)){
		str += "  First Name :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.LastName)){
		str += "  Last Name :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.City)){
		str += "  City :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.Phone)){
		str += "  Phone :: Field must not be empty. \n";
	}
	if (!IsValidEmail(document.iForm.Email)){
		str += "  E-mail :: The email address is not valid.";
	}
	if (str.length > 0){
		str = "The following Fields are not valid: \n"+str;
		alert(str);
		return false;	
	}
	return true;
}

function validateRoomForm(){
	var str = "";
	if (!IsNotEmpty(document.iForm.FirstName)){
		str += "  First Name :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.LastName)){
		str += "  Last Name :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.City)){
		str += "  City :: Field must not be empty. \n";
	}
	if (!IsNotEmpty(document.iForm.Phone)){
		str += "  Phone :: Field must not be empty. \n";
	}
	if (!IsNumeric(document.iForm.Adults)){
		str += "  Adults :: The Field must contain a valid number. \n";
	}
	if (!IsNumeric(document.iForm.Children)){
		str += "  Children :: The Field must contain a valid number. \n";
	}
	if (!IsValidEmail(document.iForm.Email)){
		str += "  E-mail :: The email address is not valid.";
	}
	if (str.length > 0){
		str = "The following Fields are not valid: \n"+str;
		alert(str);
		return false;	
	}
	return true;
}
//
function IsNotEmpty(txt){
	return (txt.value.length > 0) ? true : false;
}
function IsNumeric(txt){
	return (!isNaN(parseInt(txt.value))) ? true : false;
}
function IsValidEmail(txt){
	if(txt.value !=""){ 
		var goodEmail = txt.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if (goodEmail){
			return true;
		} else {
			return false;
		}
	}
}