function contactVerifyEmail() {
	pass = "okay";
	regex_email = /^[a-zA-Z0-9.\-_]+[@][a-zA-Z0-9.\-_]+[.][a-zA-Z]+$/i;
	if (document.form.from.value == '' || document.form.from.value == 'Your Email') {
		alert('Please provide an email address in the "From" field');
		pass = "no";
	}
	if (document.form.from.value.search(regex_email) && pass == 'okay') {
		alert('Email address invalid');
		pass = "no";
	}
	return pass;
}

function contactAutoFill() {
	selection = document.form.to.value;
	switch (selection) {
		case "webdesign@mzprojects.com" :
			document.form.subject.value = 'New Web Design Project';
			document.getElementById("body").innerHTML = 'Dear Web Design Team,';
			break;
		case "programming@mzprojects.com" :
			document.form.subject.value = 'New Web Programming Project';
			document.getElementById("body").innerHTML = 'Dear Web Programming Team,';
			break;
		case "animation@mzprojects.com" :
			document.form.subject.value = 'New Animation Project';
			document.getElementById("body").innerHTML = 'Dear Animation Team,';
			break;
		case "webmanagement@mzprojects.com" :
			document.form.subject.value = 'New Web Management Project';
			document.getElementById("body").innerHTML = 'Dear Web Management Team,';
			break;
		case "support@mzprojects.com" :
			document.form.subject.value = 'Tech Support Request';
			document.getElementById("body").innerHTML = 'Dear Tech Support,';
			break;
		case "webmaster@mzprojects.com" :
			document.form.subject.value = 'Web Master Alert';
			document.getElementById("body").innerHTML = 'Dear Web Master,';
			break;
	}
}

function contactClearForm() {
	document.form.subject.value=''; 
	document.getElementById('body').innerHTML = '';
}
