function Validate(theForm)
{
	//make sure all characters entered are numberic
	if (isNaN(theForm.txtPhonePre.value + theForm.txtPhoneFirst.value + theForm.txtPhoneLast.value + theForm.txtPhoneExt.value 
		 + theForm.txtFaxPre.value + theForm.txtFaxFirst.value + theForm.txtFaxLast.value))
	{
		ErrMessage.innerHTML="Only numeric values are allowed in phone and fax number fields.";
		return (false);
	}
		
	//area code length must be 0 or 3 only
	if (theForm.txtPhonePre.value.length != 0)
	{
		if (theForm.txtPhonePre.value.length != 3)
		{
			ErrMessage.innerHTML="The area code of your phone number may only be 3 digits long.";
			return (false);
		}
	}
	
	//phone prefix length must be 0 or 3 only
	if (theForm.txtPhoneFirst.value.length != 0)
	{
		if (theForm.txtPhoneFirst.value.length != 3)
		{
			ErrMessage.innerHTML="The prefix of your phone number may only be 3 digits long.";
			return (false);
		}
	}

	//phone last 4 length must be 0 or 4 only
	if (theForm.txtPhoneLast.value.length != 0)
	{
		if (theForm.txtPhoneLast.value.length != 4)
		{
			ErrMessage.innerHTML="The last part of your phone number may only be 4 digits long.";
			return (false);
		}
	}
	
	//area code length must be 0 or 3 only
	if (theForm.txtFaxPre.value.length != 0)
	{
		if (theForm.txtFaxPre.value.length != 3)
		{
			ErrMessage.innerHTML="The area code of your fax number may only be 3 digits long.";
			return (false);
		}
	}
	
	//fax prefix length must be 0 or 3 only
	if (theForm.txtFaxFirst.value.length != 0)
	{
		if (theForm.txtFaxFirst.value.length != 3)
		{
			ErrMessage.innerHTML="The prefix of your fax number may only be 3 digits long.";
			return (false);
		}
	}

	//fax last 4 length must be 0 or 4 only
	if (theForm.txtFaxLast.value.length != 0)
	{
		if (theForm.txtFaxLast.value.length != 4)
		{
			ErrMessage.innerHTML="The last part of your fax number may only be 4 digits long.";
			return (false);
		}
	}
	
	//check for complete phone number (or empty okay)
	if (theForm.txtPhonePre.value.length != 0 || theForm.txtPhoneFirst.value.length != 0 || theForm.txtPhoneLast.value.length != 0)
	{
		if ((theForm.txtPhonePre.value.length + theForm.txtPhoneFirst.value.length + theForm.txtPhoneLast.value.length) != 10)
		{
			ErrMessage.innerHTML="Please enter a complete phone number or clear all phone number fields before continuing.";
			return (false);
		}
	}
	
	//check for complete fax number (or empty okay)
	if (theForm.txtFaxPre.value.length != 0 || theForm.txtFaxFirst.value.length != 0 || theForm.txtFaxLast.value.length != 0)
	{
		if ((theForm.txtFaxPre.value.length + theForm.txtFaxFirst.value.length + theForm.txtFaxLast.value.length) != 10)
		{
			ErrMessage.innerHTML="Please enter a complete fax number or clear all fax number fields before continuing.";
			return (false);
		}
	}	
	return (true);
}