var SexyAlertBox=new Class({Implements:[Chain],getOptions:function(){return{name:"SexyAlertBox",zIndex:999999,onReturn:false,onReturnFunction:$empty,BoxStyles:{width:500},OverlayStyles:{"background-color":"#000",opacity:0.7},showDuration:500,showEffect:Fx.Transitions.linear,closeDuration:500,closeEffect:Fx.Transitions.linear,moveDuration:1200,moveEffect:Fx.Transitions.Back.easeOut,onShowStart:$empty,onShowComplete:$empty,onCloseStart:$empty,onCloseComplete:function(properties){this.options.onReturnFunction(this.options.onReturn)}.bind(this)}},initialize:function(options){this.i=0;this.setOptions(this.getOptions(),options);this.Overlay=new Element("div",{id:"BoxOverlay",styles:{display:"none","z-index":this.options.zIndex,position:"absolute",top:"0",left:"0","background-color":this.options.OverlayStyles["background-color"],opacity:0,height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"}});this.Content=new Element("div",{id:this.options.name+"-BoxContainer"});this.Container=new Element("div",{id:this.options.name+"-BoxContent"}).adopt(this.Content);this.InBox=new Element("div",{id:this.options.name+"-InBox"}).adopt(this.Container);this.Box=new Element("div",{id:this.options.name+"-Box",styles:{display:"none","z-index":this.options.zIndex+2,position:"absolute",top:"0",left:"0",width:this.options.BoxStyles.width+"px"}}).adopt(this.InBox);this.Overlay.injectInside(document.body);this.Box.injectInside(document.body);window.addEvent("resize",function(){if(this.options.display==1){this.Overlay.setStyles({height:window.getScrollHeight()+"px",width:window.getScrollWidth()+"px"});this.replaceBox()}}.bind(this));window.addEvent("scroll",this.replaceBox.bind(this))},display:function(option){if(this.Transition){this.Transition.cancel()}if(this.options.display==0&&option!=0||option==1){this.Overlay.setStyle("display","block");this.options.display=1;this.fireEvent("onShowStart",[this.Overlay]);this.Transition=new Fx.Tween(this.Overlay,{property:"opacity",duration:this.options.showDuration,transition:this.options.showEffect,onComplete:function(){sizes=window.getSize();scrollito=window.getScroll();this.Box.setStyles({display:"block",left:(scrollito.x+(sizes.x-this.options.BoxStyles.width)/2).toInt()});this.replaceBox();this.fireEvent("onShowComplete",[this.Overlay])}.bind(this)}).start(this.options.OverlayStyles.opacity)}else{this.queue.delay(500,this);this.Box.setStyles({display:"none",top:0});this.Content.empty();this.options.display=0;this.fireEvent("onCloseStart",[this.Overlay]);if(this.i==1){this.Transition=new Fx.Tween(this.Overlay,{property:"opacity",duration:this.options.closeDuration,transition:this.options.closeEffect,onComplete:function(){this.fireEvent("onCloseComplete",[this.Overlay])}.bind(this)}).start(0)}}},replaceBox:function(){if(this.options.display==1){sizes=window.getSize();scrollito=window.getScroll();if(this.MoveBox){this.MoveBox.cancel()}this.MoveBox=new Fx.Morph(this.Box,{duration:this.options.moveDuration,transition:this.options.moveEffect}).start({left:(scrollito.x+(sizes.x-this.options.BoxStyles.width)/2).toInt(),top:(scrollito.y+(sizes.y-this.Box.offsetHeight)/2).toInt()})}},queue:function(){this.i--;this.callChain()},messageBox:function(type,message,properties,input){this.chain(function(){properties=$extend({textBoxBtnOk:"OK",textBoxBtnCancel:"Cancel",textBoxInputPrompt:null,password:false,onComplete:$empty},properties||{});this.options.onReturnFunction=properties.onComplete;this.ContainerButtons=new Element("div",{id:this.options.name+"-Buttons"});if(type=="plain"||type=="alert"||type=="info"||type=="error"){this.AlertBtnOk=new Element("input",{id:"BoxAlertBtnOk",type:"submit",value:properties.textBoxBtnOk,styles:{width:"70px"}});this.AlertBtnOk.addEvent("click",function(){this.options.onReturn=true;this.display(0)}.bind(this));if(type=="plain"){this.kind="BoxPlain";$("SexyAlertBox-BoxContainer").setStyle("padding-left","10px")}else{if(type=="alert"){this.kind="BoxAlert"}else{if(type=="error"){this.kind="BoxError"}else{if(type=="info"){this.kind="BoxInfo"}}}}this.Content.setProperty("class",this.kind).set("html",message);this.AlertBtnOk.injectInside(this.ContainerButtons);this.ContainerButtons.injectInside(this.Content);this.display(1)}else{if(type=="confirm"){this.ConfirmBtnOk=new Element("input",{id:"BoxConfirmBtnOk",type:"submit",value:properties.textBoxBtnOk,styles:{width:"70px"}});this.ConfirmBtnCancel=new Element("input",{id:"BoxConfirmBtnCancel",type:"submit",value:properties.textBoxBtnCancel,styles:{width:"70px"}});this.ConfirmBtnOk.addEvent("click",function(){this.options.onReturn=true;this.display(0)}.bind(this));this.ConfirmBtnCancel.addEvent("click",function(){this.options.onReturn=false;this.display(0)}.bind(this));this.Content.setProperty("class","BoxConfirm").set("html",message);this.ConfirmBtnOk.injectInside(this.ContainerButtons);this.ConfirmBtnCancel.injectInside(this.ContainerButtons);this.ContainerButtons.injectInside(this.Content);this.display(1)}else{if(type=="prompt"){this.PromptBtnOk=new Element("input",{id:"BoxPromptBtnOk",type:"submit",value:properties.textBoxBtnOk,styles:{width:"70px"}});this.PromptBtnCancel=new Element("input",{id:"BoxPromptBtnCancel",type:"submit",value:properties.textBoxBtnCancel,styles:{width:"70px"}});type=properties.password?"password":"text";this.PromptInput=new Element("input",{id:"BoxPromptInput",type:type,value:input,styles:{width:"250px"}});this.PromptBtnOk.addEvent("click",function(){this.options.onReturn=this.PromptInput.value;this.display(0)}.bind(this));this.PromptBtnCancel.addEvent("click",function(){this.options.onReturn=false;this.display(0)}.bind(this));this.Content.setProperty("class","BoxPrompt").set("html",message);this.PromptInput.injectInside(this.Content);this.PromptBtnOk.injectInside(this.ContainerButtons);this.PromptBtnCancel.injectInside(this.ContainerButtons);this.ContainerButtons.injectInside(this.Content);this.display(1)}else{this.options.onReturn=false;this.display(0)}}}});this.i++;if(this.i==1){this.callChain()}},plain:function(message,properties){this.messageBox("plain",message,properties)},alert:function(message,properties){this.messageBox("alert",message,properties)},info:function(message,properties){this.messageBox("info",message,properties)},error:function(message,properties){this.messageBox("error",message,properties)},confirm:function(message,properties){this.messageBox("confirm",message,properties)},prompt:function(message,input,properties){this.messageBox("prompt",message,properties,input)}});SexyAlertBox.implement(new Events,new Options);function safari(){AlertBox=new SexyAlertBox({OverlayStyles:{"background-color":"#550000",opacity:0.85}});AlertBox.plain("<p>There is a known issue with the <em><strong>Safari</strong></em> and <em><strong>Google Chrome</strong></em> web browser which affects the display of articles if the page is reloaded.</p><p>At this time we don't know the cause of this problem and are only able to recommend avoiding the use of the <em><strong>browser reload button</strong></em> while visiting our site.</p><p>This is not an issue in current versions of <em><strong>Firefox</strong>, <strong>Opera</strong> and <strong>Internet Explorer</strong></em> &mdash; you may find it convenient to use any of those browsers as an alternative option.</p>We apologize for this inconvenience and trust the issue will resolve itself in future updates/versions of the <em><strong>Safari</strong></em> and <strong><em>Google</strong></em> browsers.")}function msie6(){AlertBox=new SexyAlertBox({OverlayStyles:{"background-color":"#550000",opacity:0.85}});AlertBox.plain('<p>There are several known issues which affect the functionality of this site using <em><strong>Microsoft Internet Explorer 6</strong></em> (MSIE6), and so some features of the site have been disabled.</p><p>MSIE6 is widely considered to be a non-standard browser susceptible to security vulnerabilities. It\'s advisable to upgrade to the most current version, <em><strong>Internet Explorer 7</strong></em>, which has been available as a free download via <strong>Windows Update</strong> since 2006. You can also download it directly from the Microsoft website by clicking on the following link:</p><p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9ae91ebe-3385-447c-8a30-081805b2f90b&displaylang=en">www.microsoft.com/downloads/details.aspx</a></p><p>Due to its age (released in August 2001), rapidly declining popularity, and the range of alternative options, there are no plans to make this site fully compatible with <em><strong>MSIE6</strong></em>.</p><p>The site has been successfully tested with <em><strong>Internet Explorer 7</strong></em> as well as current versions of <em><strong>Firefox</strong>, <strong>Opera</strong> and <strong>Safari</strong></em> &mdash; you may find it convenient to use any of those browsers as an alternative option.</p>We apologize for this inconvenience...')};