//Matts checkForm function V1.1
function checkForm() {

	// Set error message var...
	var formErrors = "Please check the form for missing information";
	var sendError = 0;
	
	// Set the element vars...
	var ele = '';
	var err = '';
	
	// Set up colours...
	var errorCol = '#ffcccc';
	var validCol = '#e5f1fb';
	
	function checkElement(element) {
		var eId = document.getElementById(element);
		if (!eId.value) {
			eId.style.backgroundColor = errorCol;
			sendError++;
		} else {
			eId.style.backgroundColor = validCol;
		}
	}
	
	// Run the checks... function('element id')
	checkElement('firstname');
	checkElement('lastname');
	checkElement('email');
	checkElement('phone');
	checkElement('company');
	checkElement('message');
	
	if (sendError > 0) {
		alert(formErrors);
		return false;
	} else {
		return true;
	}
}	