// JavaScript check membership form

function checkMemb(){
	// alert("checkMamb: " );
	var missingList = "";
	// Check required fields are present
	if (document.getElementById("forename").value == "")
		missingList += "Forename\n";
	if (document.getElementById("surname").value == "")
		missingList += "Surname\n";
//	if (document.getElementById("address").value == "")
//		missingList += "Address\n";
//	if (document.getElementById("postcode").value == "")
//		missingList += "Post code\n";
	if (document.getElementById("email").value == "")
		missingList += "Email Address\n";
	if (missingList != ""){
		// Errors on form
		alert("Please ensure the following information is provided\n" + missingList);
		return false;		
	}
	// Check email addresses
	if (document.getElementById("email").value != document.getElementById("email2").value){
		alert("Please ensure email addresses match");
		return false;
	}
	// Check conditions accepted
//	if (!document.getElementById("accept").checked){
//		alert("Please ensure the box above the submit button has been clicked");
//		return false;
//	}
	return true;
}
