viewHandler=Text;function Text(){var a=this;this.init=function(){this.base.init.call(this);this.initLinkAnimation()};this.initLinkAnimation=function(){var e=document.getElementById("textSidebar").getElementsByTagName("a");var g=[];for(var d=0,f;f=e[d++];){if(f.className.indexOf("active")==-1){g.push(f)}}this._addLinkAnimation(g,this.colours.mediumBlue,this.colours.darkGrey);this._addLinkAnimation(document.getElementById("textBody").getElementsByTagName("a"),this.colours.darkBlue,this.colours.lightBlue)};this.validateMailingList=function(f){var d=f.getElementsByTagName("input")[0];if(d.getAttribute("validationAdded")!="true"){this._errorHandlingInit([d]);d.setAttribute("validationAdded","true")}if(d.value.length<3){xhtml._errorHandlingInvalid(d);alert("Please enter your email address.");return false}var e=/^[a-z0-9_+-.]+@[a-z0-9_-]*\.?[a-z0-9_-]*\.?[a-z0-9_-]*\.[a-z]+$/i;if(e.test(d.value)==false){xhtml._errorHandlingInvalid(d);alert("Please check that your email address is entered correctly.");return false}f.submit()};this.toggle=function(e){var d=document.getElementById(e);if(d.className.indexOf("expanded")==-1){d.className+=" expanded";c(d)}else{d.className=d.className.replace(/\s?expanded/g,"");b(d)}};function c(f){xhtml._addAnimationId(f);var d=0;if(f.getAttribute("expandedHeight")==null){f.style.height="0px";f.style.overflow="hidden";f.style.visibility="hidden";f.className=f.className.replace(/\s?hidden/g,"");f.style.width=f.offsetWidth+"px";f.style.visibility="hidden";f.style.position="absolute";f.style.height="auto";d=f.offsetHeight;f.style.position="relative";f.style.height="0px";f.style.visibility="visible";f.setAttribute("expandedHeight",d)}else{d=f.getAttribute("expandedHeight")*1}try{xhtml.animationReferences[f.getAttribute("animationId")].stop(false)}catch(e){}xhtml.animationReferences[f.getAttribute("animationId")]=new YAHOO.util.Anim(f,{height:{to:d}},0.2);xhtml.animationReferences[f.getAttribute("animationId")].animate()}function b(e){try{xhtml.animationReferences[e.getAttribute("animationId")].stop(false)}catch(d){}xhtml.animationReferences[e.getAttribute("animationId")]=new YAHOO.util.Anim(e,{height:{to:0}},0.2);xhtml.animationReferences[e.getAttribute("animationId")].animate()}};