function validateContact()
{
	var howVal = getCheckedValue(document.mailer_contact.how);

	if (document.mailer_contact.fname.value == "" || (document.mailer_contact.fname.value.match(/([0-9]+)/gi)) )
	{
		alert("Please enter your first name. (Letters only)");
		document.mailer_contact.fname.focus();
		document.mailer_contact.fname.select();
		return false;
	}
	else if (document.mailer_contact.lname.value == "" || (document.mailer_contact.lname.value.match(/([0-9]+)/gi)) )
	{
		alert("Please enter your last name. (Letters only)");
		document.mailer_contact.lname.focus();
		document.mailer_contact.lname.select();
		return false;
	}
	else if ( (document.mailer_contact.email.value == "") || (!document.mailer_contact.email.value.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi)) )
	{
		alert("Please be sure to enter a valid email address.\n(i.e. name@company.com)");
		document.mailer_contact.email.focus();
		document.mailer_contact.email.select();
		return false;
	}
	else if ( (document.mailer_contact.pharea.value.length !=3) && (howVal == "phone"))
	{
		alert("Area Code : You must enter three digits for this part of the phone number.");
		document.mailer_contact.pharea.focus();
		document.mailer_contact.pharea.select();
		return false;
	}
	else if ( (!document.mailer_contact.pharea.value.match(/([0-9]{3})/gi)) && (howVal == "phone"))
	{
		alert("Area Code : You must enter three digits for this part of the phone number.");
		document.mailer_contact.pharea.focus();
		document.mailer_contact.pharea.select();
		return false;
	}
	else if ( (document.mailer_contact.phthree.value.length !=3) && (howVal == "phone") )
	{
		alert("Phone Number : You must enter three digits for this part of the phone number.");
		document.mailer_contact.phthree.focus();
		document.mailer_contact.phthree.select();
		return false;
	}
	else if ( (!document.mailer_contact.phthree.value.match(/([0-9]{3})/gi)) && (howVal == "phone") )
	{
		alert("Phone Number : You must enter three digits for this part of the phone number.");
		document.mailer_contact.phthree.focus();
		document.mailer_contact.phthree.select();
		return false;
	}
	else if ( (document.mailer_contact.phfour.value.length !=4) && (howVal == "phone") )
	{
		alert("Phone Number : You must enter four digits for this part of the phone number.");
		document.mailer_contact.phfour.focus();
		document.mailer_contact.phfour.select();
		return false;
	}
	else if ( (!document.mailer_contact.phfour.value.match(/([0-9]{4})/gi)) && (howVal == "phone") )
	{
		alert("Phone Number : You must enter four digits for this part of the phone number.");
		document.mailer_contact.phfour.focus();
		document.mailer_contact.phfour.select();
		return false;
	}
	else if ( document.mailer_contact.phext.value.length > 5 )
	{
		alert("Extension : You may only enter up to five digits for the extension.");
		document.mailer_contact.phext.focus();
		document.mailer_contact.phext.select();		
		return false;
	}
	else if ( !document.mailer_contact.phext.value.match(/([0-9]{0,5})/gi) )
	{
		alert("Extension : You may only enter up to five digits for the extension.");
		document.mailer_contact.phext.focus();
		document.mailer_contact.phext.select();		
		return false;
	}

	else
	{
		//alert(howVal);
		return true;
	}
  }
  
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
