function validate() {
	// Try to catch various mistakes before heading over to the profile page
	if (location.href != "https://www.ghca.com/SURRAnet/") {
		alert("ERROR - You are trying to access SURRAnet without going through a properly secured channel. Transmission of password aborted!");
		return;
	}
	// Note - forms[0] is search box form
	var userID = document.forms[1].elements[0].value;
	var password = document.forms[1].elements[1].value;
	var non_human = document.forms[1].elements[2].value;
	if (isNaN(parseInt(userID))) {
		alert("ERROR - User IDs are 4-digit numbers. Your ID is wrong.");
		return;
	}
	if (password.length < 12) {
		alert("PASSWORD ERROR!");
		return;
	}
	if (non_human) {
		alert("ERROR - You are either using an old browser, or you are not human! Aborting login process!");
		return;
	}
	document.forms[1].submit();
}