		
	function validator(theForm)
	{
		  if(theForm.fullname.value == "")
		  {
			alert("Please Enter Full Name.");
			theForm.fullname.focus();
			return false;
		  }
		  
		  /*if(theForm.lname.value == "")
		  {
			alert("Please Enter Last Name.");
			theForm.lname.focus();
			return false;
		  }*/
				
		  if(theForm.country.value == "")
		  {
			alert("Please Enter Country.");
			theForm.country.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.messages.value == "")
		  {
			alert("Please Enter Your Message.");
			theForm.questions.focus();
			return (false);
		  }	
	 return true;
	}
	
	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;
	}

	
	function Search_Submit(frm)
	{
		with(frm)
		{
			if(srchtxt.value=='')
			{
				alert("Please Enter Search text.");
				srchtxt.focus();
				return (false);
			}
			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;
	}