
function checkfield(loginform)
{
	ok=true
	if(loginform.name.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name.focus()
		ok=false
	}
	else if(loginform.country.value=="")
	{
		alert("Please Enter Country Name.")
		loginform.country.focus()
		ok=false
	}
	//else if(loginform.phone.value=="")
	//{
	//	alert("Please Enter Phone.")
	//	loginform.phone.focus()
	//	ok=false
	//}
		else if (loginform.email.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform.email.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform.email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform.email.focus();
		ok=false
	}
	else if(loginform.check_in_date.value=="")
	{
		alert("Please Enter Check in Date.")
		loginform.check_in_date.focus()
		ok=false
	}
	//else if(loginform.check_out_date.value=="")
	//{
	//	alert("Please Enter Check out Date.")
	//	loginform.check_out_date.focus()
	//	ok=false
	
	//}
	//else if(loginform.single.value=="")
	//{
	//	alert("Please Select Single Room.")
	//	loginform.single.focus()
	//	ok=false
	
	//}
	//else if(loginform.double.value=="")
	//{
	//	alert("Please Select Double Room.")
	//	loginform.double.focus()
	//	ok=false
	
	//}
	//else if(loginform.adults.value=="")
	//{
	//	alert("Please Enter Number of Adults.")
	//	loginform.adults.focus()
	//	ok=false
	
	//}
	//else if(loginform.room_category.value=="")
	//{
	//	alert("Please Enter Room Category.")
	//	loginform.room_category.focus()
	//	ok=false
	
	//}
	else if (loginform.specific_requirements.value == "")
	{
		alert("Please specify requirements.");
		loginform.specific_requirements.focus();
		ok=false
	}
	return ok
}
function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
	var pindex = theStr.indexOf(".",index);
	if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}


		function ValidateNum(input,event){
			var keyCode = event.which ? event.which : event.keyCode;
			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57){
				return true;
			}
			return false;
		}
