function formSubmitProtect(){var a,b;a=$("#fieldHeading").val();b=$("#fieldMessage").val();if(a.length<2){alert("The heading of your message is too short!\nPlease enter a longer heading and try again!");return false}if(b.length<3){alert("The body of your message is too short!\nPlease enter a longer message and try again!");return false}if(b.search(/\[poll\]([\s\S]+?)\[\/poll\]/i)!=-1)if(!confirm("This message contains a poll, once you submit this message you can't change any of the questions or answers in this poll!\n\nAre you sure you wish to post this message?"))return false;
return true}function clickCheckNewAccountBoxes(){if($("#fieldUserDisplayNameLabel").length>0&&$("#fieldUserDisplayNameLabel").text()!="OK"||$("#fieldUserEmailLabel").length>0&&$("#fieldUserEmailLabel").text()!="OK"){alert("Some of the information you entered can't be used, or is missing!\nPlease check that each box is OK before proceeding!");return false}return true}
function changeCheckUserDisplayname(){$("#fieldUserDisplayNameLabel").remove();$("#fieldUserDisplayName").after('<span id="fieldUserDisplayNameLabel">Checking...</span>');$("#fieldUserDisplayNameLabel").css("margin-left","10px");jQuery.get("/Accounts/ajaxCheckData.asp?t=1&s="+encodeURI($("#fieldUserDisplayName").val()),function(a,b){b=="success"?$("#fieldUserDisplayNameLabel").html(a):$("#fieldUserDisplayNameLabel").html("A problem occured")})}
function changeCheckUserEmail(){$("#fieldUserEmailLabel").remove();$("#fieldUserEmail").after('<span id="fieldUserEmailLabel">Checking...</span>');$("#fieldUserEmailLabel").css("margin-left","10px");jQuery.get("/Accounts/ajaxCheckData.asp?t=2&s="+encodeURI($("#fieldUserEmail").val()),function(a,b){b=="success"?$("#fieldUserEmailLabel").html(a):$("#fieldUserEmailLabel").html("A problem occured")})}
function clickCheckUpdateAccountBoxes(){var a,b;a=document.getElementById("fieldUserLogin");if(!clickCheckAlphaNumeric(a.value)){alert("Your Login Name can only contain letters and numbers.\nPlease double check the Login Name you entered does not contain illegal characters, and try again!");return false}if(a.value.length<4){alert("Your new Login Name must be at least 4 characters or longer.\nPlease double check the Login Name you entered, and try again!");return false}a=document.getElementById("fieldUserPassword");
if(!clickCheckAlphaNumeric(a.value)){alert("Your Password can only contain letters and numbers.\nPlease double check the Password you entered does not contain illegal characters, and try again!");return false}if(a.value.length<5){alert("Your Password must be at least 5 characters or longer.\nPlease double check the Password you entered, and try again!");return false}a=document.getElementById("fieldNewUserPassword");if(a.value.length>0){if(a.value.length<5){alert("Your new Password must be at least 5 characters or longer.\nPlease double check the new Password you entered, and try again!");
return false}if(!clickCheckAlphaNumeric(a.value)){alert("Your New Password can only contain letters and numbers.\nPlease double check the new Password you entered does not contain illegal characters, and try again!");return false}if(a.value.length<5){alert("Your New Password must be at least 5 characters or longer.\nPlease double check the new Password you entered, and try again!");return false}b=document.getElementById("fieldConfirmUserPassword");if(a.value!=b.value){alert("The second Password you entered in the Confirm password box does not match the one in the Your New Password box.\nPlease double check the Confirmed Password you entered, and try again!");
return false}}a=document.getElementById("fieldUserEmail");if(a.value.length<7){alert("Your Email Address must be valid for you to activate your account, and be at least 7 characters or longer.\nPlease double check the Email Address you entered, and try again!");return false}return true}function clickCheckAlphaNumeric(a){if(a.search(/[^-a-zA-Z0-9_'\s]+/)!=-1)return false;return true}
function keypressCheckEnter(a){if(window.event){if(a.keyCode==13)return false}else if(a.which)if(a.which==13)return false;return true}
function clickCheckEmailSubjectAndBody(){var a;a=document.getElementById("fieldTitle");if(a.value.length<5){alert("The Subject of your email must be at least 5 characters or longer.\nPlease double check the Subject you wish to use for this message and try again!");return false}a=document.getElementById("fieldBody");if(a.value.length<5){alert("The Body of your email must be at least 5 characters or longer.\nPlease double check the Body you wish to use for this message and try again!");return false}return true}
function clickCheckEmailUsEmailSubjectAndBody(){var a;a=document.getElementById("fieldEmailAddress");if(a.value.length<7){alert("Your Email Address must be valid for you to activate your account, and be at least 7 characters or longer.\nPlease double check the Email Address you entered, and try again!");return false}a=document.getElementById("fieldTitle");if(a.value.length<5){alert("The Subject of your email must be at least 5 characters or longer.\nPlease double check the Subject you wish to use for this message and try again!");
return false}a=document.getElementById("fieldBody");if(a.value.length<5){alert("The Body of your email must be at least 5 characters or longer.\nPlease double check the Body you wish to use for this message and try again!");return false}return true}function clickDecryptEmail(a){var b;b=new String(a.href);b=b.replace(/x\.([^.]*)\.x/g,"$1");b=b.replace(/mailto:/g,"");a.href="mailto:"+b;a.innerHTML=b};

