		
	function validator(theForm)
	{
		
	if (theForm.fname.value == "")
	  {
		alert("Please enter a value for the Name field.");
		theForm.fname.focus();
		return (false);
	  }
	//return false;
	  if (theForm.fname.value.length < 1)
	  {
		alert("Please enter at least 1 characters in the Name field.");
		theForm.fname.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.questions.value == "")
	  {
		alert("Please Enter Question.");
		theForm.questions.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;
	}
