function clickEditWithChanges(){if(!confirm("Changes have already been made to this item and are awaiting approval.\nIf you continue these changes may be lost.\nAre you sure you wish to edit this item?"))return false}function clickApproveEdit(){if(!confirm("This action can not be easily reversed.\nAre you approving these changes?"))return false}
function clickRefuseEdit(){if(!confirm("Refusing this item or changes will delete them.\nAre you ABSOLUTELY SURE you wish to refuse this item or changes?"))return false}function clickCheckReason(){var b;b=document.getElementById("fieldReason").value;b=b.replace(/^\s+|\s+$/g,"");if(b.length<10){alert("The reason you have given for this deletion request is too short!\nInvalid reasons will result in the request being ignored.\nPlease expand on your reason and try again!");return false}return true}
function clickCheckReportReason(){var b;b=document.getElementById("fieldReason").value;b=b.replace(/^\s+|\s+$/g,"");if(b.length<10){alert("The reason you have given for this complaint is too short!\nInvalid reasons will result in the request being ignored.\nPlease expand on your reason and try again!");return false}return true}
function clickCheckDeleteAndReason(){if(!clickCheckReason())return false;if(!confirm("Agreeing to delete this item cannot be easily undone.\nAre you sure you wish to proceed?"))return false}function clickCheckClose(){if(!confirm("Are you sure you want to CLOSE this support request?"))return false}
function clickCheckAttachId(){var b;b=document.getElementById("fieldAttachId").value;b=b.replace(/^\s+|\s+$/g,"");if(b.length<10){alert("You must enter a valid 10 digit Unique ID Code!\nPlease enter more digits and try again!");return false}if(b.search(/[^0-9]+/)!=-1){alert("You must enter a valid 10 digit Unique ID Code!\nPlease edit the ID code and try again!");return false}return true}
function clickCheckTitle(){var b;if((b=document.getElementById("fieldTitle"))&&b.value.length<5){alert("The title of any item must be at least 5 characters long!\nPlease edit the title and try again!");return false}return true}function clickCheckTitleAndTags(){var b;if((b=document.getElementById("fieldTitle"))&&b.value.length<5){alert("The title of any item must be at least 5 characters long!\nPlease edit the title and try again!");return false}return clickCheckTags()}
function clickCheckBodyTitleAndTags(b){if(b&&b.value.length<5){alert("The body of any item must be at least 5 characters long!\nPlease edit the body of this item and try again!");return false}return clickCheckTitleAndTags()}
function clickSubmitFormBody(b){var a;if(document.getElementById("fieldBody"))a="fieldBody";else if(document.getElementById("fieldComment"))a="fieldComment";else if(document.getElementById("fieldDescription"))a="fieldDescription";a=document.getElementById(a);if(document.getElementById(b))if(clickCheckBodyTitleAndTags(a))document.getElementById(b).submit();else return false}
function clickCheckTags(){var b,a;b=document.getElementById("fieldTags");if(!b)return true;a=b.value;a=a.replace(/`/g,"'");a=a.replace(/\ufffd/g,"'");a=a.replace(/\ufffd/g,"'");a=a.replace(/\ufffd/g,"'");a=a.replace(/^\s+|\s+$/g,"");if(a.length==0){b.value=a;alert("You must enter at least one tag!\nPlease double check the list of tags you wish to submit and try again!");return false}if(a.search(/[^-a-zA-Z0-9.&' \r\n]+/)!=-1){a=a.replace(/,/g,"\r\n");a=a.replace(/;/g,"\r\n");a=a.replace(/[\ufffd]/g,
"ae");a=a.replace(/&#230;/g,"ae");a=a.replace(/[\ufffd]/g,"AE");a=a.replace(/&#198;/g,"AE");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]/g,"a");a=a.replace(/&#22[4-9];/g,"a");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd]/g,"A");a=a.replace(/&#19[23567];/g,"A");a=a.replace(/[\ufffd]/g,"c");a=a.replace(/&#231;/g,"c");a=a.replace(/[\ufffd]/g,"C");a=a.replace(/&#199;/g,"C");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,"e");a=a.replace(/&#23[2-5];/g,"e");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,
"E");a=a.replace(/&#20[0-3];/g,"E");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,"i");a=a.replace(/&#23[6-9];/g,"i");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,"I");a=a.replace(/&#20[4-7];/g,"I");a=a.replace(/[\ufffd]/g,"n");a=a.replace(/&#241;/g,"n");a=a.replace(/[\ufffd]/g,"N");a=a.replace(/&#209;/g,"N");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd\ufffd]/g,"o");a=a.replace(/&#24[2-6];/g,"o");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd\ufffd]/g,"O");a=a.replace(/&#21[0-4];/g,"O");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,
"u");a=a.replace(/&#249;/g,"u");a=a.replace(/&#25[0-2];/g,"u");a=a.replace(/[\ufffd\ufffd\ufffd\ufffd]/g,"U");a=a.replace(/&#21[7-9];/g,"U");a=a.replace(/&#220;/g,"U");a=a.replace(/[\ufffd\ufffd]/g,"y");a=a.replace(/&#25[35];/g,"y");a=a.replace(/[\ufffd]/g,"Y");a=a.replace(/&#221;/g,"Y");a=a.replace(/[^-a-zA-Z0-9.&' \r\n]+/g,"");b.value=a;alert("Some of the tags you have entered contain illegal characters, these have been removed or converted to acceptable equivalents.\nPlease double check the list of tags you wish to submit and try again!");
return false}else b.value=a;return true}
function clickCheckNewAccountBoxes(){var b,a;b=document.getElementById("fieldUserLogin");if(!clickCheckAlphaNumeric(b.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(b.value.length<5){alert("Your new Login Name must be at least 5 characters or longer.\nPlease double check the Login Name you entered, and try again!");return false}b=document.getElementById("fieldUserPassword");
if(!clickCheckAlphaNumeric(b.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(b.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("fieldConfirmUserPassword");if(b.value!=a.value){alert("The second Password you entered in the Confirm password box does not match the one in the Your Password box.\nPlease double check the Confirmed Password you entered, and try again!");
return false}b=document.getElementById("fieldUserEmail");if(b.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 clickCheckUpdateAccountBoxes(){var b,a;b=document.getElementById("fieldUserLogin");if(!clickCheckAlphaNumeric(b.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(b.value.length<5){alert("Your new Login Name must be at least 5 characters or longer.\nPlease double check the Login Name you entered, and try again!");return false}b=document.getElementById("fieldUserPassword");
if(!clickCheckAlphaNumeric(b.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(b.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}b=document.getElementById("fieldNewUserPassword");if(b.value.length>0){if(b.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(b.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(b.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}a=document.getElementById("fieldConfirmUserPassword");if(b.value!=a.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}}b=document.getElementById("fieldUserEmail");if(b.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(b){if(b.search(/[^-a-zA-Z0-9'\s]+/)!=-1)return false;return true}
function clickInsertTagToField(b){var a;a=document.getElementById("fieldTags");a.value=a.value.replace(/^\s*|\s*$/g,"");a.value+="\n"+b}function keypressCheckEnter(b){if(window.event){if(b.keyCode==13)return false}else if(b.which)if(b.which==13)return false;return true}
function clickCheckEmailSubjectAndBody(){var b;b=document.getElementById("fieldTitle");if(b.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}b=document.getElementById("fieldBody");if(b.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(b){var a;a=new String(b.href);a=a.replace(/x\.([^.]*)\.x/g,"$1");a=a.replace(/mailto:/g,"");b.href="mailto:"+a;b.innerHTML=a}function hoverSetOpacity(b,a){b.style.opacity=a/100;b.style.filter="alpha(opacity="+a+")"}function changeImage(b,a){var f,c;c=document.getElementById(a);f=c.src.match(/.*\//);c.src=f+b.value}
function changeColour(b,a,f){for(var c=0;c<document.styleSheets.length;c++){var d;if(document.styleSheets[c].cssRules)d=document.styleSheets[c].cssRules;else if(document.styleSheets[c].rules)d=document.styleSheets[c].rules;for(var e=0;e<d.length;e++)if(d[e].selectorText.toLowerCase()==a)switch(f){case 1:d[e].style.color=b.value;break;case 2:d[e].style.backgroundColor=b.value;break;case 3:d[e].style.borderTop="1px solid "+b.value;break;case 4:d[e].style.borderBottom="1px solid "+b.value}}}
var arrayCoverFiles=Array(9);function checkCoverFile(){var b;b=document.getElementById("fieldCoverBox");if(b.checked==true)if(confirm("You can only upload one image when adding a cover. Do you wish to continue?"))for(b=1;b<10;b++){var a=document.getElementById("idFile"+b);arrayCoverFiles[b-1]=a.value;a.value="";a.disabled=true}else b.checked=false;else for(b=1;b<10;b++){a=document.getElementById("idFile"+b);try{a.value=arrayCoverFiles[b-1]}catch(f){}a.disabled=false}}var tickerTimeout;
function rotateFlicker(){for(var b=1;b<10;b++){var a;if(a=document.getElementById("flicker"+b)){if(a.style.display!="none"){(b=document.getElementById("flicker"+(b+1)))||(b=document.getElementById("flicker1"));a.style.display="none";b.style.display="block";rotateFlickerStart();break}}else if(b==0)break}}function rotateFlickerStart(){tickerTimeout=setTimeout("rotateFlicker()",4E3)}function rotateFlickerStop(){if(tickerTimeout){clearTimeout(tickerTimeout);tickerTimeout=null}};

