function clearName() {
	if (document.contact.yourname.value == 'Name*') {
		document.contact.yourname.value = '';
	}
	else if (document.contact.yourname.value == '') {
		document.contact.yourname.value = 'Name*';
	}
}
function clearCompany() {
	if (document.contact.company.value == 'Company') {
		document.contact.company.value = '';
	}
	else if (document.contact.company.value == '') {
		document.contact.company.value = 'Company';
	}
}
function clearEmail() {
	if (document.contact.email.value == 'Email*') {
		document.contact.email.value = '';
	}
	else if (document.contact.email.value == '') {
		document.contact.email.value = 'Email*';
	}
}
function clearComments() {
	if (document.contact.comments.value == 'Comments') {
		document.contact.comments.value = '';
	}
	else if (document.contact.comments.value == '') {
		document.contact.comments.value = 'Comments';
	}
}

function checkForm() {
var str = "The following errors were found:\n\n";
var errorMsg = str;
	
	
	if (document.contact.yourname.value == 'Name*') {
		errorMsg = errorMsg + " :: Please enter your name.\n";
	}
	if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.contact.email.value)) == 0) {
		errorMsg = errorMsg + " :: Please enter a valid email address.\n";
	}

	if (errorMsg != str) {
		alert (errorMsg);
		return false;
	} else {
		document.contact.submit();
	}
}