		
	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.phone.value == "")
	  {
		alert("Please enter a value for the phone field.");
		theForm.phone.focus();
		return (false);
	  }
	
	  if (theForm.feedback.value == "")
	  {
		alert("Please Enter Feedback.");
		theForm.feedback.focus();
		return (false);
	  }
	  
	  return (true);
	}
	
	function validator_testimonial(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.company.value == "")
		  {
			alert("Please enter a value for the Company anem or position field.");
			theForm.company.focus();
			return (false);
		  }
		  
		  if (theForm.country.value == "")
		  {
			alert("Please enter a value for the country field.");
			theForm.country.focus();
			return (false);
		  }
		  
		  if (theForm.description.value == "")
		  {
			alert("Please enter a value for the description field.");
			theForm.description.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;
	}
	
//====================================================================================================
//	Function Name	:	isNumber()
//	Purpose			:	Provide the functionality of checking whether the input is alphabet or number.
//						It also allows decimal values. So it is mainly used for pricing fields	
//	Parameters		:	field	
//	Return			:	none
//----------------------------------------------------------------------------------------------------
function isNumber(field,msg) 
{
	var re = /^[0-9.]*$/;
	
	if (!re.test(field.value)) 
	{
		//field.value = field.value.replace(/[^0-9.]/g, ""); // This code does not allow user to enter any alphabet.
		alert(msg);
		field.focus();
		return false;
	}
	return true;
} 
	
	function validator_invoice(theForm)
	{
	
	 if(theForm.clientname.value == "")
	  {
		alert("Please Enter Name.");
		theForm.clientname.focus();
		return (false);
	  }	
	  
	 if (theForm.clientname.value.length < 1)
	  {
		alert("Please enter at least 1 characters in the Name Field.");
		theForm.clientname.focus();
		return (false);
	  }
	
	 if (theForm.clientemail.value == "")
	  {
		alert("Please enter a value for the Email field.");
		theForm.clientemail.focus();
		return (false);
	  }
	
	 if (theForm.clientemail.value.length < 1)
	  {
		alert("Please enter at least 1 characters in the Email field.");
		theForm.clientemail.focus();
		return (false);
	  }	  
	  
	 if(!IsEmail(theForm.clientemail,'Please enter valid email'))
	  {
		return false;
	  }
	 
	 if (theForm.country.value == 0)
	  {
		alert("Please select a country from list.");
		theForm.country.focus();
		return (false);
	  }
	 
	 if (theForm.invamount.value == "")
	  {
		alert("Please enter invoice amount.");
		theForm.invamount.focus();
		return (false);
	  }
	  
	  if(!isNumber(theForm.invamount,'Please enter numeric value only for invoice amount.'))
	  {
		return false;
	  }
	  
	  if (theForm.invamount.value < 1)
	  {
		alert("Invoice amount should be grated than 1.");
		theForm.invamount.focus();
		return (false);
	  }	
	  
	  return (true);
	}
	
	/*function DownloadLink(frm, path1)
	{
		Action.value='Download';
		submit();
	}*/
