function s(ml){var a=new Array();a[0]=" Thank you for taking the time to reply.";a[1]=" If you live in UK and want newsletter,";a[2]=" Enter Postcode and check UK Mail.";a[3]=" Click Send button to Send Form.";a[4]=" If you prefer, you can E-mail us.";if(ml >= a.length){ml = 0;}var o = window.document.contact_bmr.b.value;var n;var r = Math.floor(Math.random() * a[ml].length);var cl = a[ml].charAt(r);if(o == a[ml]){ml++;setTimeout("s("+ml+")",4000);return;}if(cl == o.charAt(r)){s(ml);return;}var f = o.substring(0,r);r++;var l = o.substring(r,a[ml].length);var n = f + cl + l;window.document.contact_bmr.b.value = n;setTimeout("s("+ml+")",100);}
function init(){document.contact_bmr.name.focus();s(0);}
function msgLim(fld,cnt,max){var cntString=" Characters are now available.";if(fld.value.length > max)fld.value = fld.value.substring(0,max);else cnt.value = max - fld.value.length;cnt.value=cnt.value+cntString}
function validate(){m=document.contact_bmr.email.value;if(m.indexOf("@")<3){if(confirm("If you want us to reply to your feedback, we need a valid e-mail address. Click OK to send your feedback or CANCEL if you want to enter a valid e-mail address.") == true){document.contact_bmr.email.value='No_Email_Address_Given';document.contact_bmr.action='http://www.brightonportal.co.uk/cgi-bin/FormMail.pl';document.contact_bmr.submit();}else{document.contact_bmr.email.focus();document.contact_bmr.email.select();document.contact_bmr.email.value="Enter_your_e-mail_address_here";}}else{document.contact_bmr.action='http://www.brightonportal.co.uk/cgi-bin/FormMail.pl';document.contact_bmr.submit();}}
function checkUK(){if(document.contact_bmr.country.value == "221 United Kingdom"){var bmrpost = document.contact_bmr.pcode.value;size = bmrpost.length;bmrpost = bmrpost.toUpperCase();while (bmrpost.slice(0,1) == " "){bmrpost = bmrpost.substr(1,size-1);size = bmrpost.length}while(bmrpost.slice(size-1,size)== " "){bmrpost = bmrpost.substr(0,size-1);size = bmrpost.length}document.contact_bmr.pcode.value = bmrpost;if(size < 6 || size > 8){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it does not contain the correct number of characters. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;};if(!(isNaN(bmrpost.charAt(0)))){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it cannot start with a number. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;};if(isNaN(bmrpost.charAt(size-3))){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it contains an alpha character in the wrong position. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;};if(!(isNaN(bmrpost.charAt(size-2)))){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it contains a number in the wrong position. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;}if(!(isNaN(bmrpost.charAt(size-1)))){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it contains a number in the wrong position. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;}if(!(bmrpost.charAt(size-4) == " ")){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because it contains no space or the space is in the wrong position. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;}cnt1 = bmrpost.indexOf(" ");cnt2 = bmrpost.lastIndexOf(" ");if(cnt1 != cnt2){alert("You have supplied a postcode "+bmrpost+", which is not a valid UK postcode because only one space is allowed. Please check your postcode and typing, then enter your UK postcode again.");document.contact_bmr.pcode.value="";document.contact_bmr.pcode.focus();return false;};alert("The BMR NewsLetter shall be sent to the supplied UK postcode: "+bmrpost+". Thank you for subscribing to the printed version of the BMR NewsLetter !");document.contact_bmr.txtFor.focus();return true;}}
function goSend(){document.contact_bmr.txtFor.focus();}
function goMsg(){document.contact_bmr.msgTobmr.focus();}
function goEmail(){var to="robj@brightonmusicradio.freeserve.co.uk";var cc="robj@brightonmusicradio.freeserve.co.uk";var bcc="robj@brightonmusicradio.freeserve.co.uk";var subject="My Feedback to Brighton Music Radio";var body="To Rob J, ";var doc="mailto:"+to+"?cc="+cc+"&bcc="+bcc+"&subject="+escape(subject)+"&body="+escape(body);window.location=doc;}