<!--
function validateForm(theForm) {

	var why = "";
	why += isEmpty(theForm.month.value, "the month");
    why += isEmpty(theForm.day.value, "the day");
    why += isEmpty(theForm.year.value, "the year");
	why += isEmpty(theForm.last.value, "your last name");
	why += isEmpty(theForm.first.value, "your first name");
    why += isEmpty(theForm.business.value, "a business name");
    why += isEmpty(theForm.address.value, "an address");
    why += isEmpty(theForm.city.value, "a city");
    why += isEmpty(theForm.zip.value, "a zipcode");
    why += isEmpty(theForm.phone.value, "a phone number");
    why += isEmpty(theForm.email.value, "an email address");
    
	
    if (why != "") {
       alert(why);
       return false;
    }
return true;
}

function isEmpty(strng, inputname) {
	var error = "";
	if (strng == "") {
		error = "Please enter "+inputname+".\n";
	}
return error;	  
}

function checkEmail (strng) {
	var error="";
	if (strng == "") {
		error = "Please enter your email address.\n";
	}
	else {
		var emailFilter=/^.+@.+\..{2,4}$/;
		if (!(emailFilter.test(strng))) { 
		   error = "Please enter a valid email address.\n";
		}
		else {
	//test email for illegal characters
			var illegalChars= /[\(\)\<\>\,\;\:\\\"\[\]]/;
			if (strng.match(illegalChars)) {
				error = "The email address contains illegal characters.\n";
			}
		}
	}
return error;    
}


function checkPhone(strng) {
	var error = "";
	if (strng == "") {
		error = "Please enter your phone number.\n";
	}
	else {
		var stripped = strng.replace(/[\(\)\.\-\+\ ]/g, '');
		//strip out acceptable non-numeric characters
		if (isNaN(parseInt(stripped))) {
			error = "The phone number contains illegal characters.\n";
		}
		else if (stripped.length < 10) {
			error = "The phone number is the wrong length.\n";
		}
	}
return error;
}


function checkFax(strng) {
	var error = "";
	if (!(strng == "")) {
		var stripped = strng.replace(/[\(\)\.\-\+\ ]/g, '');
		//strip out acceptable non-numeric characters
		if (isNaN(parseInt(stripped))) {
		   error = "The fax number contains illegal characters.\n";
		}
		else if (stripped.length < 10) {
			error = "The fax number is the wrong length.\n";
		}
	}
return error;
}


function checkExt(strng) {
	var error = "";
	if (!(strng == "")) {
		var stripped = strng.replace(/[\(\)\.\-\+\ ]/g, '');
		//strip out acceptable non-numeric characters
		if (isNaN(parseInt(stripped))) {
		   error = "The extension contains illegal characters.\n";
		}
	}
return error;
}

function checkQuantity(strng, name) {
	var error = "";
	if (!(strng == "")) {
		if (isNaN(parseInt(strng))) {
			error = "The quantity for "+name+" should contain a number or left blank.\n";
		}
	}
return error;
}

-->

