// Author: Adam Brown
// Updated: August 9, 2009


// Submit Form
function formSubmit(id)
{
	document.getElementById(id).submit();
}


// Check each form input to ensure it is filled in
function checkMail(id)
{
	mailForm = document.getElementById(id);
	for (var i = 0; i < mailForm.elements.length; i++)
	{
		if (mailForm.elements[i].value == "")
		{
			alert("Please fill in all form fields and try sending your message again.");
			return;
		}
	}
	formSubmit(id)
}