function ValidateData(theForm)
{
	try{
		
		if (theForm.contactDate.value != "")
		{
			//alert('Test');		
			return (false);
		}

		if (theForm.firstName.value == "")
		{
			alert('Please, enter your first name.');
			theForm.firstName.focus();
			return (false);
		}

		if (theForm.lastName.value == "")
		{
			alert('Please, enter your last name.');
			theForm.lastName.focus();
			return (false);
		}

		if (theForm.email.value == "")
		{
			alert('Please, enter your email.');
			theForm.email.focus();
			return (false);
		}
		if (!ValidateEmail(theForm.email.value)){
			alert("Please check the emails address");
			theForm.email.focus();
			return (false);
		}
		
		if  ( 
				hasSpamStrings(theForm.firstName) ||
				hasSpamStrings(theForm.lastName) ||									
				hasSpamStrings(theForm.address1) ||			
				hasSpamStrings(theForm.address2)  ||
				hasSpamStrings(theForm.city) ||									
				hasSpamStrings(theForm.state) ||			
				hasSpamStrings(theForm.zip)  ||
				hasSpamStrings(theForm.homePhone) ||									
				hasSpamStrings(theForm.cellPhone) ||			
				hasSpamStrings(theForm.workPhone)  ||
				hasSpamStrings(theForm.IamInterestedIn) ||									
				hasSpamStrings(theForm.PreviousCosmeticSurgery) ||			
				hasSpamStrings(theForm.DoYouHaveAnyConcerns)  ||			
				hasSpamStrings(theForm.HowDidYouLearnOfOurWebsite)  ||
				hasSpamStrings(theForm.comments)
			)
		{
			return false;
		}
		return  (true);
	}
	catch (e){		
		return false;
	}
	

	
}

function hasSpamStrings(textField)
{

	var fieldValue = textField.value;
	
	if (	
			fieldValue.indexOf('@')			!=	-1 	|| 
			fieldValue.indexOf('http')	!=	-1
		)
	{
			alert('Please, enter a valid value.');
			textField.focus();
			return true;
	}	
	else
	{
			return false;
	}

}


function ValidateEmail(valor) 
{
      if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
          return true;
     else
          return false;
}

