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.country.value == "")
	  {
		alert("Please select your Country.");
		theForm.country.focus();
		return (false);
	  }
	 
	 if (theForm.comments.value == "")
	  {
		alert("Please enter Your Comments.");
		theForm.comments.focus();
		return (false);
	  }
	  
	
	//return false;
	 
	  theForm.submit();
	}
	
	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;
	}
//====================================================================================================
//	Function Name	:	res()
//----------------------------------------------------------------------------------------------------
function res(t,v)
{
	var w = "";
	for (i=0; i < t.value.length; i++) 
	{
		x = t.value.charAt(i);
		if (v.indexOf(x,0) != -1)
		w += x;
	}

		t.value = w;
		//alert('Please enter Numeric Value');
		
			
	
}	

