function checkfield1(loginform1)
{
	ok=true
   	//var chek=document.getElementById("validatecode").value;
	if(loginform1.name.value=="")
	{
		alert("Please Enter Your  Name.")
		loginform1.name.focus()
		ok=false
	}
		
	else if(loginform1.country.value=="")
	{
		alert("Please Enter Country Name.")
		loginform1.country.focus()
		ok=false
	}
	else if(loginform1.phone.value=="")
	{
		alert("Please Enter Phone Number or contact number.")
		loginform1.phone.focus()
		ok=false
	}
	else if (loginform1.email.value == "")
	{
		alert("Please enter a value for the email field.");
		loginform1.email.focus();
		ok=false
	}
	else if (!isEmailAddr(loginform1.email.value))
	{
		alert("Please enter a complete email address in the form: yourname@yourdomain.com");
		loginform1.email.focus();
		ok=false
	}
	
	else if(loginform1.intended_month_year_of_visit.value=="")
	{
		alert("Please Enter Month Of Visit.")
		loginform1.intended_month_year_of_visit.focus()
		ok=false
	}
	
	
	else if(loginform1.requirement.value=="")
	{
		alert("Please Specify the description.")
		loginform1.requirement.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;
		}



/////////////////////////////////////////////////////////////////////////

function openNewWin()
{
window.open('distance.html','Rajasthan_Cities_Distance_Charts','width=650,height=425,scrollbars=no');
}

