
// make sure the form meets with our approval
function validate(f) {
	errors = "";
	
	// run our checks
	if(f.company.value == "") { errors += "\n- Must complete the Company Name field."; }
	if(f.login.value == "") { errors += "\n- Must complete the Login field."; }
	if(f.password.value == "") { errors += "\n- Must complete the Password field."; }
	if(f.password.value != f.password_confirm.value) { errors += "\n- Password must match Confirm Password."; }
	
	// if error found, complain
	if(errors != "") {
		errors = "The following problems were found with your details:\n" + errors + "\n\nPlease correct and try again.";
		alert(errors);
		return false;
	}
	
	// otherwise cool, let's go
	else {
		return true;
	}
}
