function checkorder() {
	var theform = document.theform;
	var emailpattern = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	var phonepattern = /[0-9]{3}.*[0-9]{3}.*[0-9]{4}/;
	if (theform.title.value == '' || theform.authors.value == '' || theform.categories.value == '' || theform.contactname.value == '' || theform.publisher.value == '' || theform.address.value == '' || theform.city.value == '' || theform.province.value == '' || theform.postal.value == '' || theform.phone.value == '' || theform.email.value == '') {
		alert ("All fields are required in order to submit your entry.");
		return false;
	}
	if (!theform.phone.value.match(phonepattern)) {
		alert ("Please enter your phone number including area code.");
		return false;
	}
	if (!theform.email.value.match(emailpattern)) {
		alert ("You must enter a valid email address to continue.");
		return false;
	}
	if (theform.email.value != theform.email2.value) {
		alert ("You must enter the same email address twice to continue.");
		return false;
	}
	if (isNaN(theform.numcerts.value) || theform.numcerts.value < 1) {
		alert ("You must enter at least 1 certificate to continue.");
		return false;
	}
	return true;
}
function updateprice(value) {
	var theform = document.theform;
	var theprice = (value==1?20:20 + 5 * (value-1));
	theform.price.value = '$'+theprice+'.00';
}
