function stopRKey(a){var a=(a)?a:((event)?event:null);var b=(a.target)?a.target:((a.srcElement)?a.srcElement:null);if((a.keyCode==13)&&(b.type=="text")){return false}}document.onkeypress=stopRKey;function checkLength(b,a){maxnum=a;div=document.getElementById(b);charleft=document.getElementById("CharacterCounter");charleft.innerHTML=maxnum-div.value.length;if(charleft.value<=0){charleft.value="max"}if(div.value.length>maxnum){div.value=div.value.substring(0,maxnum-1)}}function checkLength(c,a,b){maxnum=a;div=document.getElementById(c);charleft=document.getElementById(b);charleft.innerHTML=maxnum-div.value.length;if(charleft.value<=0){charleft.value="max"}if(div.value.length>maxnum){div.value=div.value.substring(0,maxnum-1)}}function LargeAmountCheck(a){var c=document.getElementById(a);var b=c.value;b=b.replace(",","");b=b.replace("$","");b=b.replace("€","");b=b.replace("£","");if(c.value.indexOf(",")!=-1&&b<=1000){alert("Please make sure you have not entered any special characters i.e. comma's etc... the format should be 20.00 or 20")}if(b!=""&&b>1000){alert("Wow, that is a generous donation but we just wanted to check that you wish to donate $"+b+"?\n\nIf this is incorrect, please make sure you have not entered any special characters i.e. comma's etc... the format should be 20.00 or 20")}c.value=b}function openTC(){window.open("/terms.aspx","TermsAndConditions","menubar=1,resizable=1,width=800,height=500,scrollbars=yes")}function openPaymentTerms(a){window.open("/paymentterms.aspx","PaymentTerms","menubar=1,resizable=1,width=780,height=500,scrollbars=yes")}function openCompetitionTerms(){window.open("/competitionterms.aspx","CompetitionTerms","menubar=1,resizable=1,width=780,height=500,scrollbars=yes")}function removeSpaces(a){return a.split(" ").join("")}function addCommas(b){b+="";x=b.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var a=/(\d+)(\d{3})/;while(a.test(x1)){x1=x1.replace(a,"$1,$2")}return x1+x2};
