function clearText(thefield) 
{
  if (thefield.defaultValue==thefield.value) { thefield.value = "" }
} 

function replaceText(thefield) 
{
  if (thefield.value=="") { thefield.value = thefield.defaultValue }
}

function ValidateDataSmall(theForm)
{
	if (theForm.ContactDate.value != "")
	{
		return false;
	}
	
	if ((theForm.FirstName.value == "") || (theForm.FirstName.value == ' First Name'))
	{
		alert('Please, enter your First Name.');
		theForm.FirstName.focus();
		return false;
	}
	
	if ((theForm.LastName.value == "") || (theForm.LastName.value == ' Last Name'))
	{
		alert('Please, enter your Last Name.');
		theForm.LastName.focus();
		return false;
	}
	
	if ((theForm.Email.value == "") || (theForm.Email.value == ' Email'))
	{
		alert('Please, enter your email.');
		theForm.Email.focus();
		return false;
	}
	else
	{
		if(!ValidateEmail(theForm.Email.value))
		{
			alert("Please check the emails address");
			theForm.Email.focus();
			return false;
		}
	}
			
	if ((theForm.Comments.value == "") || (theForm.Comments.value == ' Comments'))
	{
		alert('Please, enter your comments.');
		theForm.Comments.focus();
		return false;
	}
}

function ValidateEmail(valor) 
{
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor))
		return true;
	else
		return false;
}
