if(!Array.indexOf)Array.prototype.indexOf=function(a){for(var b=0;b<this.length;b++)if(this[b]==a)return b;return-1};var emailRegex=/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/,domain="@galstonequestrianclub.org.au";if(trim(document.getElementById("email").value)=="")document.getElementById("email").focus();else trim(document.getElementById("password").value)!=""&&document.getElementById("submit").focus();document.MembersLogin.remember.checked=true;function trim(a){return a.replace(/^\s+|\s+$/,"")}
function checkform(a){if(trim(a.email.value)==""){hideAllErrors();document.getElementById("emailMissing").style.display="inline";a.email.select();a.email.focus();return false}if(a.email.value.indexOf("@")==-1)a.email.value+=domain;if(!a.email.value.match(emailRegex)){hideAllErrors();document.getElementById("emailInvalid").style.display="inline";a.email.select();a.email.focus();return false}if(trim(a.password.value)==""){hideAllErrors();document.getElementById("passwordMissing").style.display="inline";
a.password.select();a.password.focus();return false}if(testSessionCookie())a.remember.checked?writeSessionCookie("remember","Y"):writeSessionCookie("remember","N");return true}function hideAllErrors(){document.getElementById("emailMissing").style.display="none";document.getElementById("emailInvalid").style.display="none";document.getElementById("passwordMissing").style.display="none"};
