window.IE7_PNG_SUFFIX=".png";if(typeof(Fx)!=="undefined"&&!Fx.Style&&Fx.Tween){Fx.Style=Fx.Tween;Fx.Style.implement({stop:Fx.prototype.cancel})}if(typeof(Fx)!=="undefined"&&!Fx.Styles&&Fx.Morph){Fx.Styles=Fx.Morph;Fx.Styles.implement({stop:Fx.prototype.cancel})}if(typeof(Fx)!=="undefined"&&Fx.Transitions&&!Fx.Transitions.sineIn&&Fx.Transitions.Sine){Fx.Transitions.sineIn=Fx.Transitions.Sine.easeIn}if(typeof(Browser)!=="undefined"){window.ie=Browser.Engine.trident;window.ie6=(Browser.Engine.trident&&Browser.Engine.version<5);window.ie7=(Browser.Engine.trident&&Browser.Engine.version>=5)}var Page=(function(){var x,y,p,w,h,e,q;h=640;e=240;q=0;var c=[];var n=[];var o=function(){var B,A;B=$$("#search .term .text")[0];if($defined(B)){A=B.value.trim();B.addEvent("focus",function(){if(A==this.value.trim()){this.value=""}this.addClass("text-focus")}.bind(B));B.addEvent("blur",function(){if(this.value.trim().length<1){this.value=A}this.removeClass("text-focus")}.bind(B))}};var k=function(){if(typeof(sIFR)=="undefined"){return}var A={src:"styles/media/sifr.swf"};sIFR.fromLocal=true;sIFR.domains=["localhost","foreverknowledge.info"];sIFR.activate(A);sIFR.replace(A,{selector:"#content h2, #content h3, #content h4, #content h5, #content h6",wmode:"transparent"});sIFR.replace(A,{selector:".serif",wmode:"transparent",fitExactly:true})};var j=function(A){$$("#"+A+" .pages .node").each(function(C){if(C.getParent().getParent().hasClass("subpages")){return}if(window.ie6){var B;C.addEvent("mouseenter",function(){this.addClass("node-hover")}.bind(C));C.addEvent("mouseleave",function(){this.removeClass("node-hover")}.bind(C));B=$A(C.getElements(".node"));B.each(function(D){D.addEvent("mouseenter",function(){this.addClass("node-hover")}.bind(D));D.addEvent("mouseleave",function(){this.removeClass("node-hover")}.bind(D))})}if(window.ie){return}if((!C.hasClass("has-subpages"))&&(!C.getElement(".has-subpages"))){return}C.addEvent("mouseenter",function(){var F=this.getElement(".subpages");if(!$defined(F.fx)){F.fx={}}if(!$defined(F.fx.Style)){F.fx.Style=new Fx.Style(F,"opacity",{duration:125,transition:Fx.Transitions.sineIn})}var G=F.fx.Style;G.stop().set(0).start(0,1);var E,D,H,I;E=$A(this.getElements(".node"));D=0;H=175;I=(H/E.length);E.each(function(J){if(!$defined(J.fx)){J.fx={}}if(!$defined(J.fx.Styles)){J.fx.Styles=new Fx.Styles(J,{duration:I,transition:Fx.Transitions.sineIn})}var K=J.fx.Styles;K.stop().set({opacity:0,marginTop:-10});K.timerId=K.start.delay(Math.max(1,D*I),K,{opacity:[0,1],marginTop:[-10,0]});D++})}.bind(C));C.addEvent("mouseleave",function(){var D=this.getElement(".subpages");if($defined(D.fx)&&$defined(D.fx.Style)){D.fx.Style.stop()}D.setStyle("visibility","");$A(this.getElements(".node")).each(function(E){if($defined(E.fx)&&$defined(E.fx.Styles)){if($defined(E.fx.Styles.timerId)){$clear(E.fx.Styles.timerId)}E.fx.Styles.stop()}E.setStyle("visibility","")})}.bind(C))})};var l=function(){if($(document.body).hasClass("ppv")){$$("#shortcuts .node a").each(function(A){if(A.getParent().getParent().getParent().hasClass("subpages")){return}A.addEvent("click",function(B){new Event(B).stop()}.bindAsEventListener())})}else{$$("#shortcuts .node").each(function(A){A.addEvent("click",function(){window.location.href=this.getElement("a").href}.bind(A))})}};var v=function(D){if(D){document.write('<div id="print" onclick="window.print(); return false;"><a href="#print">&nbsp;</a></div>');document.write('<div id="help" onclick="return false;"><a href="#help">&nbsp;</a></div>')}else{var C;C=$(document.body);if((C.hasClass("frame"))||(C.hasClass("popup"))){var B,A;B=new Element("div");A=new Element("a");B.id="print";A.href="#print";A.setHTML("&nbsp;");A.addEvent("click",function(G){window.print();new Event(G).stop()}.bindAsEventListener());A.inject(B);B.inject(C);if(C.hasClass("frame")){var F,E;F=new Element("div");E=new Element("a");F.id="help";E.href="#help";E.setHTML("&nbsp;");E.addEvent("click",function(G){new Event(G).stop()}.bindAsEventListener());E.inject(F);F.inject(C)}}}};var b=function(){if(!$defined(window.pageImageLinksFx)){window.pageImageLinksFx=[]}$$(".page-image-links").each(function(C){if(!C.getProperty("initialised")){var F,G,H,D,A,I,E,B;F=0;H=D=0;G=[[]];C.getElements("li").each(function(L){var J;J=L.getElement("img");if(J){var K,N;N=window.pageImageLinksFx.length;K=new Fx.Style(J,"opacity",{duration:250});K.set(0.75);window.pageImageLinksFx[N]=K;L.addEvent("mouseover",function(){var O=window.pageImageLinksFx[N];O.stop();O.start(O.now,1)});L.addEvent("mouseout",function(){var O=window.pageImageLinksFx[N];O.stop();O.start(O.now,0.75)})}var M=new Fx.Style(L,"opacity",{duration:250});M.hide();M.start.delay(F,M,[0,1]);G[H][D]=L;F+=75;if(++D>3){D=0;H++;G[H]=[]}});for(E=0;E<G.length;E++){A=0;I=0;for(B=0;B<G[E].length;B++){A=Math.max(A,G[E][B].getElement("a").getSize().size.y);I=Math.max(I,G[E][B].getElement("img").height.toInt())}for(B=0;B<G[E].length;B++){G[E][B].getElement("img").setStyle("margin-top",I-G[E][B].getElement("img").height.toInt());G[E][B].getElement("a").setStyle("height",A)}}C.setProperty("initialised",true)}C.setStyle("visibility","visible")})};var u=function(){$$(".ratings dl").each(function(B){if(!B.getProperty("initialised")){var A;A=[];B.getElements("a").each(function(C){A.push(C);C.addEvent("mouseenter",function(D){D.each(function(E){E.getParent().addClass("rating-hover")})}.bind(null,[$A(A)]));C.addEvent("mouseleave",function(D){D.each(function(E){E.getParent().removeClass("rating-hover")})}.bind(null,[$A(A)]));C.addEvent("click",function(E,D){new Ajax(this.href,{method:"get"}).request();B.getElements("a").each(function(F){F.setStyle("display","none");new Element("span",{"class":F.className}).setText(F.getText()).inject(F,"before");D.each(function(G){G.getParent().addClass("rating-stick")})});if(!!B.getElement(".current")){B.getElement(".current").addClass("current-stick").setText("Thank you!")}E.stop();return false}.bindWithEvent(C,[$A(A)]))});B.setProperty("initialised",true)}})};var f=function(D,C){var E,B,A,F;if(D.id){E=(D.id.split("-")[0]+"_")}else{E=""}A=(C.path||"/fileadmin/img/aloe_design/");F=".png";B={width:(C.width||165),height:(C.height||324)};if(!!C.labels){B["padding-top"]=B.height;B.height="auto"}$ES(".node",D).each(function(J){var L,G,N,I,P,K,H,M,O;J.setStyles(B);L=J.getText().trim();G=L.toLowerCase().replace(/\s+/ig,"-");N=("button_"+E+G.replace(/[^A-Z0-9\_\-]+/ig,"").replace(/-/ig,"_"));I=new Element("img");I.setProperty("src",(A+N+"_normal"+F));I.setProperty("title",L);I.addClass("button-image");I.addClass("button-normal");P=new Element("img");P.setProperty("src",(A+N+"_hover"+F));P.setProperty("title",L);P.addClass("button-image");P.addClass("button-hover");if(!!C.single){if(!window.ie){K=new Fx.Style(I,"opacity",{duration:500});H=new Fx.Style(P,"opacity",{duration:125});K.set(1);H.set(0);J.addEvent("mouseenter",function(){K.stop();H.stop();K.start(1,0);H.start(0,1)});J.addEvent("mouseleave",function(){if(!!K){K.stop()}if(!!H){H.stop()}I.setStyle("opacity",1);P.setStyle("opacity",0)})}else{I.setStyle("visibility","visible");P.setStyle("visibility","hidden");J.addEvent("mouseenter",function(){I.setStyle("visibility","hidden");P.setStyle("visibility","visible")});J.addEvent("mouseleave",function(){I.setStyle("visibility","visible");P.setStyle("visibility","hidden")})}}else{if(!window.ie){H=new Fx.Style(P,"opacity",{duration:250,transition:Fx.Transitions.Quad.easeIn});H.set(0);J.addEvent("mouseenter",function(){H.stop().start((H.now||0),1)});J.addEvent("mouseleave",function(){H.stop().start((H.now||1),0)})}else{P.setStyle("visibility","hidden");J.addEvent("mouseenter",function(){P.setStyle("visibility","visible")}.bind());J.addEvent("mouseleave",function(){P.setStyle("visibility","hidden")}.bind())}}M=J.getElement("a");if(!!C.labels){P.inject(M,"top");I.inject(M,"top")}else{O=M.getProperty("href");if(!!M.onclick){J.addEvent("click",M.onclick.bind(M))}else{J.addEvent("click",function(Q){window.location.href=Q}.bind(J,[O]))}J.addEvent("mouseenter",function(Q){window.status=Q}.bind(J,[O]));J.addEvent("mouseleave",function(){window.status=""});J.empty();P.inject(J,"top");I.inject(J,"top")}})};var t=function(A){[$(document.documentElement),$(document.body)].each(function(B){if(!!B){B.setStyles({overflowX:(A||""),overflowY:(A||"")})}})};var g=function(B,C,A){var D;if(!!x){x.remove()}if(!!y){y.remove()}x=new Element("div");x.setProperty("id","flv-player");x.addClass("flv-player-width-"+C).addClass("flv-player-height-"+A).addClass("flv-player-size"+C+"x"+A);x.setStyles({"margin-left":(-C/2),"margin-top":(-A/2)});y=new Element("div");y.setProperty("id","flv-player-mask");D=new Element("div");D.addClass("close");D.setProperty("title","Stop video and return to website");D.addEvent("click",function(){x.remove();x=null;y.remove();y=null});y.inject(document.body);x.inject(document.body);UFO.create({movie:"fileadmin/video/player/flvplayer.swf",width:C,height:A,flashvars:("file="+encodeURIComponent(B)+"&streamscript="+encodeURIComponent("/video_proxy.php")+"&image="+encodeURIComponent(B.replace(".flv",".jpg"))+"&usefullscreen=true&displayheight="+A+"&backcolor=0x000000&frontcolor=0xffffff&lightcolor=0xa9f249&autostart=true"),allowfullscreen:true,majorversion:8,build:0},x.getProperty("id"));D.inject.delay(250,D,[x])};var a=function(A){var B;if(!p){p=new Element("div");p.setProperty("id","mp3-player");p.addClass("mp3-player-width-"+h).addClass("mp3-player-height-"+e).addClass("mp3-player-size"+h+"x"+e);p.setStyles({"margin-left":(-h/2),"margin-top":(-e/2)});w=new Element("div");w.setProperty("id","mp3-player-mask");w.inject(document.body);p.inject(document.body)}B=new Element("div");B.addClass("close");B.setProperty("title","Stop media and return to website");B.addEvent("click",function(){p.empty();p.setStyle("display","none");w.setStyle("display","none")});UFO.create({movie:"fileadmin/audio/player/mp3player.swf",width:h,height:e,flashvars:("file="+encodeURIComponent(A.replace(".mp3",".xml"))+"&image="+encodeURIComponent(A.replace(".mp3",".jpg"))+"&displaywidth="+(h-240)+"&thumbsinplaylist=true&backcolor=0x000000&frontcolor=0xffffff&lightcolor=0xa9f249&autostart=true"),majorversion:8,build:0},p.getProperty("id"));p.setStyle("display","");w.setStyle("display","");B.inject.delay(250,B,[p])};var d=function(B){var A;A=B.getProperty("href");if(!!window.opener){try{window.opener.location.href=A;window.opener.focus();return false}catch(C){}}window.open(A);return false};var m=function(){var A;A=$("help");if(!!A){Page.AttachHelp(A.getFirst(),"Printing Instructions","Please follow the instructions below to set up your printer:<ul><li>"+(window.ie7?'Select the arrow next to the printer icon in the toolbar above,</li><li>Go to <span class="ui">&lsquo;Page Setup&hellip;&rsquo;</span>,':'Go to <span class="ui">File</span> <big>&rarr;</big> <span class="ui">&lsquo;Page Setup&hellip;&rsquo;</span>,')+'</li><li>Make sure you have the correct <span class="ui">&lsquo;paper size&rsquo;</span> selected. The most common paper size used is <span class="ui">&lsquo;A4&rsquo;</span>,</li><li>Make sure you have <span class="ui">&lsquo;portrait&rsquo;</span> selected in <span class="ui">&lsquo;Orientation&rsquo;</span>,</li><li>Remove all text from <span class="ui">&lsquo;Header&rsquo;</span> and <span class="ui">&lsquo;Footer&rsquo;</span>,</li><li>Set <span class="ui">&lsquo;0&rsquo;</span> in <span class="ui">&lsquo;Top&rsquo;</span>, <span class="ui">&lsquo;Right&rsquo;</span>, <span class="ui">&lsquo;Bottom&rsquo;</span> and <span class="ui">&lsquo;Left&rsquo;</span> margins.</li></ul>Select <span class="ui">&lsquo;OK&rsquo;</span> to save your changes and dispose of the setup dialog.',false,window.ie6)}};var r=function(B,L,O,J,E){if(!B){return false}var H,M,P,Q,D,K,N,I,G,C,A;D=new Element("div");if(!B.id){D.setProperty("id","balloon-"+(q++))}else{D.setProperty("id",B.id+"-balloon")}D.addClass("balloon");H=B.getStyle("position");if(H=="static"||H=="relative"){H="absolute"}M=B.getPosition();P=B.getSize();D.setStyles({display:"none",position:H,top:(M.y+P.size.y+8),left:(M.x-20)});K=new Element("div");K.addClass("wrapper").addClass("wrapper-balloon");N=new Element("div");N.addClass("footer").addClass("footer-balloon");I=new Element("h5");I.addClass("title");G=new Element("span");G.addClass("wrapper").addClass("wrapper-title");G.setHTML(L);C=new Element("p");C.addClass("text");A=new Element("span");A.addClass("wrapper").addClass("wrapper-text");A.setHTML(O);G.inject(I);I.inject(K);A.inject(C);C.inject(K);K.inject(D);N.inject(D);D.inject(document.body);if(!!E){window.setInterval(function(S,R){var T=(S.getStyle("top").toInt()+R);if(!isNaN(T)){this.setStyle("top",T)}}.bind(D,[B,D.getStyle("top").toInt()-B.getStyle("top").toInt()]),250)}if(!!J){window.addEvent("scroll",function(R){this.setStyle("top",(R+(document.body.scrollTop||document.documentElement.scrollTop)))}.bind(D,[D.getStyle("top").toInt()]))}if(window.ie){B.addEvent("mouseenter",function(){this.setStyle("display","block")}.bind(D));B.addEvent("mouseleave",function(){this.setStyle("display","none")}.bind(D))}else{var F;F=new Fx.Style(D,"opacity",{duration:125,transition:Fx.Transitions.sineIn});F.set(0);D.setStyle("display","block");B.addEvent("mouseenter",function(){this.stop().start(this.now,1)}.bind(F));B.addEvent("mouseleave",function(){this.stop().start(this.now,0)}.bind(F))}return true};var s=function(){for(var A=0;A<document.images.length;A++){if(!document.images[A].src||document.images[A].src.indexOf(".png")<1){continue}document.images[A].runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod=crop, src='"+document.images[A].src+"')";document.images[A].src=(window.location.href.split("/")[0]+"/clear.gif")}};var z=function(){if(window.ie6){s()}};var i=function(){o();l();j("menu");j("shortcuts");if(!window.ie6){v()}m();b();u()};return{Run:function(){k();if(window.ie6){v(true)}window.addEvent("domready",i);window.addEvent("load",z)},Buttons:function(B,A){f($(B),(A||{}))},PlayFlv:function(B,C,A){g(B,C,A)},PlayMp3:function(A){a(A)},GoBack:function(A){A=$pick(A,1);if((window.history.length-(window.ie?0:1))>=A){window.history.go(-A);return false}return true},NewWindow:function(A){return d($(A))},AttachHelp:function(B,E,D,A,C){return r($(B),E,D,A,C)},IncludeAnalytics:function(){var A,D,B,C;D=(window.location.href.indexOf(":")+3);B=window.location.href.substr(D,window.location.href.indexOf("/",D)-D).toLowerCase();if(B.indexOf("bytesize")>=0){A="UA-1004139-3"}else{if(B.indexOf("forever")>=0){A="UA-1004139-1"}else{return false}}C="";C+=('<script type="text/javascript" src="');if(window.location.href.indexOf("https://")<0){C+="http://www"}else{C+="https://ssl"}C+=('.google-analytics.com/urchin.js"><\/script>');C+=('<script type="text/javascript">');C+="var urchinIntervalId = window.setInterval(function() {";C+='if (typeof (urchinTracker) == "undefined") return;';C+="window.clearTimeout(urchinIntervalId);";C+=('_uacct = "'+A+'";');C+="urchinTracker();";if(document.referrer.toString().indexOf(B)<0){C+="urchinTracker(document.referrer);"}C+="}, 250);";C+=("<\/script>");document.writeln(C);return true},BindCheckboxTree:function(A,B){var E,D,C;A.getElements(".ygtvitem").each(function(F){F=$(F);C=F.getParent(".ygtvitem");if(C===A){D=F.getElement("input");D.addEvent("click",Page.evhCheckboxTreeClicked);D.pspCheckboxParent=Page.GetElementRef(B);D.pspChildCheckboxes=[];if(B){B.pspChildCheckboxes.push(Page.GetElementRef(D))}Page.BindCheckboxTree(F,D)}});if(typeof(B)==="undefined"){Page.RebuildChecked(A)}},elementRefCache:[],GetElementRef:function(A){if(!A){return null}if(!A.pspElementCacheRef){A.pspElementCacheRef=Page.elementRefCache.length;Page.elementRefCache.push(A)}return A.pspElementCacheRef},GetElementByRef:function(A){if(A==null){return null}return Page.elementRefCache[A]},CheckboxTreeUpdateChildren:function(A){var B;A.pspChildCheckboxes.each(function(C){B=Page.GetElementByRef(C);B.checked=A.checked;if(B.onchange){B.onchange()}Page.CheckboxTreeUpdateChildren(B)})},CheckboxTreeUpdateParent:function(D){var C=Page.GetElementByRef(D.pspCheckboxParent);var B=0,A=0;if(C){C.pspChildCheckboxes.each(function(E){B++;elChild=Page.GetElementByRef(E);if(elChild.checked){A++}});C.checked=(B===A);if(C.onchange){C.onchange()}Page.CheckboxTreeUpdateParent(C)}},evhCheckboxTreeClicked:function(){var A=this;Page.CheckboxTreeUpdateChildren(A);Page.CheckboxTreeUpdateParent(A)},RebuildChecked:function(D){var F,B,E,A,C,G;F=false;$each($(D).getElements(".ygtvitem"),function(H){B=H.getElements("input");E=0;A=B.length;if(!A){return false}C=B[0].checked;$each(B,function(I){if(C){I.checked=true}if(I.checked){E++}});if(A>1&&C){E--}G=(E>0&&E>=A-1);if(G&&!C){B[0].checked=G;if(G){B[0].getParent().addClass("checked")}else{B[0].getParent().removeClass("checked")}F=true}return true});if(F){Page.RebuildChecked(D)}},HelpBox:function(C,B,A){if(!A||Cookie.get("help-box-"+C)!=="true"){document.writeln('<p class="help-box'+(A?" help-box-closable":"")+'">');document.writeln("<span>"+B+"</span>");if(A){document.writeln('<button tabindex="-1" onclick="Cookie.set(\'help-box-'+C+"', 'true'); $(this).getParent().remove(); return false;\"><span>&times;</span></button>")}document.writeln("</p>")}},ShowHelpPane:function(A){A=$(A);var B=$("help-panel");if(!B){B=new Element("div",{id:"help-panel"});B.store("fx",new Fx.Tween(B,{property:"opacity",duration:(Browser.Engine.trident&&Browser.Engine.version>4?0:350)}).set(0));B.inject(document.body)}if(!A.hasClass("help-box-attached")){new Element("div",{"class":"wrapper wrapper-help-box"}).wraps(A.setStyles({display:"",visibility:"hidden"})).inject(B);new Element("span",{"class":"title"}).inject(A,"top");new Element("span",{"class":"close",events:{click:function(){this.retrieve("fx").cancel().start(-this.getSize().x).chain(function(){this.retrieve("fx").cancel().start(0).chain(function(){if(Browser.Engine.trident&&Browser.Engine.version<5){$$("select").each(function(C){C.setStyle("visibility",C.retrieve("style::visibility"))})}});window.setTimeout(function(){$(document.body).setStyle("overflow-x","")},100)}.bind(B))}.bind(A),mousedown:function(){this.addClass("close-down")},mouseup:function(){this.removeClass("close-down")},mouseenter:function(){this.addClass("close-hover")},mouseleave:function(){this.removeClass("close-hover").removeClass("close-down")}}}).inject(A,"top");A.store("fx",new Fx.Tween(A.getParent(),{property:"margin-right",transition:Fx.Transitions.Sine.easeInOut,duration:450}).set(-A.getSize().x));A.setStyle("visibility","").addClass("help-box-attached")}if(Browser.Engine.trident&&Browser.Engine.version<5){$$("select").each(function(C){C.store("style::visibility",C.getStyle("visibility"));C.setStyle("visibility","hidden")});$(document.body).setStyle("overflow-x","hidden")}B.retrieve("fx").cancel().start(1).chain(function(){this.retrieve("fx").cancel().start(0)}.bind(A));return true}}})();Page.Run();
