function checkfield(loginform)
{
	ok=true
	if(loginform.name.value=="")
	{
		alert("Please Enter Your Name.")
		loginform.name.focus()
		ok=false
	}
	else if(loginform.tour_plan.value=="")
	{
		alert("Please Enter Tour Plan.")
		loginform.tour_plan.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.contact_no.value=="")
	{
		alert("Please Enter Contact Number.")
		loginform.contact_no.focus()
		ok=false
	}
	else if (loginform.country.value == "")
	{
		alert("Please specify Intended Month & Year of Visit.");
		loginform.country.focus();
		ok=false
	}
	else if (loginform.date_of_travel.value == "")
	{
		alert("Please specify Date of travel.");
		loginform.date_of_travel.focus();
		ok=false
	}
	else if (loginform.code.value == "")
	{
		alert("Please specify Validation Code.");
		loginform.code.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;
}
