function checkForm(){
	var hasError = 0;
	var hasError2 = 0;
	var hasError3 = 0;
	var missingFields = "";

	highlightColor = "#ffffcc";
	defaultColor = "#ffffff";
	thisForm = document.contactForm

	var arrFields = new Array("Email");
	var arrTitles = new Array("Email address");

	for(i=0; i<arrFields.length; i++){
		theField = arrFields[i]
		theTitle = arrTitles[i]

		if(isNaN(thisForm[theField].length) || ! isNaN(thisForm[theField].selectedIndex)){
			if(thisForm[theField].value == ""){
				missingFields += theTitle + "\n";
				thisForm[theField].style.background = highlightColor;
				if(hasError == 0){thisForm[theField].focus()}
				hasError = 1;
			}else{
				thisForm[theField].style.background = defaultColor;
			}
		}else{
			var hasNodeSelected = 0;
			for(j=0; j<thisForm[theField].length; j++){
				if(thisForm[theField][j].checked){
					hasNodeSelected++;
				}
			}
			if(hasNodeSelected == 0){
				hasError = 1;
				missingFields += theTitle + "\n";
			}
		}
	}

	if(hasError == 1){
		alert('Please complete the following fields:\n' + missingFields)
		return false;
	}else{
		return true;
	}

}