var reel_scroll_amount = 1; function close_and_thankyou() { GB_hide(); GB_show('Thank You', 'http://cptevents2.co.uk/popup.php?page=signup_thankyou', 160, 400); } function invoice_thankyou() { GB_hide(); GB_show('Thank You', 'http://cptevents2.co.uk/popup.php?page=invoice_thankyou', 230, 550); } function scroll_news(){ if (news_reel.scrollTop >= (news_reel.scrollHeight/2)+(100/2)) { news_reel.scrollTop = 100 + 11; } else { news_reel.scrollTop += reel_scroll_amount; } } function start_scroll() { scrollInterval = window.setInterval("scroll_news()", 50); } function stop_scroll() { window.clearInterval(scrollInterval); } function search_focus(e, msg) { if (e.value == msg) { e.value = ''; e.style.color = 'black'; } } function search_blur(e, msg) { if (e.value == '') { e.value = msg; e.style.color = 'gray'; } } function select_change(e) { if (e.options[e.selectedIndex].value == '') e.style.color = 'gray'; else e.style.color = 'black'; } function validate(form) { var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; if (filter.test(form.email.value)) { form.submit(); } else { alert("Please enter your email address."); } } function bookmark() { window.external.AddFavorite('http://cptevents2.co.uk/?','CPT Events'); }