function validator(theForm)
	{
		
	if (theForm.name.value == "")
	  {
		alert("Please enter a value for the Name field.");
		theForm.name.focus();
		return (false);
	  }
	//return false;
	  if (theForm.name.value.length < 1)
	  {
		alert("Please enter at least 1 characters in the Name field.");
		theForm.name.focus();
		return (false);
	  }
	
	  if (theForm.email.value == "")
	  {
		alert("Please enter a value for the Email field.");
		theForm.email.focus();
		return (false);
	  }
	
	  if (theForm.email.value.length < 1)
	  {
		alert("Please enter at least 1 characters in the Email field.");
		theForm.email.focus();
		return (false);
	  }
	  
	  if(!IsEmail(theForm.email,'Please enter valid email'))
	  {
		return false;
	  }
	/*if (theForm.address.value == "")
	  {
		alert("Please enter your address.");
		theForm.address.focus();
		return (false);
	  }*/
	 if (theForm.city.value == "")
	  {
		alert("Please Enter City.");
		theForm.city.focus();
		return (false);
	  }
	  if (theForm.country.value == "0")
	  {
		alert("Please Select Your Country.");
		theForm.country.focus();
		return (false);
	  }
	  if (theForm.phone.value == "")
	  {
		alert("Please Enter Phone.");
		theForm.phone.focus();
		return (false);
	  }
	  
	  return (true);
	}
	
	function IsEmail(fld,msg)
	{
		var regex = /^[\w]+(\.[\w]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
		if(!regex.test(fld.value))
		{
			alert(msg);
			fld.focus();
			return false;
		}
		return true;
	}
