function name_validate(name) {
	var illegalChars = /[\W_]/;

		if((name=="") || (name.length<3) || (name.length>20) || (illegalChars.test(name))|| !(isNaN(name))) {
		return false;
	}
	else {
		return true;
	}
}

function validate_zip(zip)
{
	var stripped = zip.replace(/[\(\)\.\-\ ]/g, '');
	if(zip=="") {
		alert("Please Enter the ZIP code");
		return false;
	}

	//strip out acceptable non-numeric characters
	if (isNaN(parseInt(stripped))) {
   		alert("The zip code contains illegal characters.");
		return false;
	}

	if (!(stripped.length == 5)) {
		alert("The Zip code is of wrong length.Make sure you include the correct zip code of 5 digits.");
		return false;
	}
	return true;
}

function validate_email(email)
{
	var emailFilter=/^.+@.+\..{2,3}$/;
	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/

	if (!(emailFilter.test(email)))  {
	   return false;
	}
	if (email.match(illegalChars)) {
		return false;
	}
	return true;
}

function validate_phone(phone)
{
	var stripped = phone.replace(/[\(\)\.\-\ ]/g, '');
	//strip out acceptable non-numeric characters
	if (isNaN(parseInt(stripped))) {
   		alert("The phone number contains illegal characters.");
		return false;
	}
	if (!(stripped.length == 10)) {
		alert("The phone number is the wrong length.Make sure you included an area code.");
		return false;
	}
	return true;
}
