var prevPagingInfo;var jsonData={Modules:[]};var pagingModuleRained=false;var NavHeight=new Fx.Tween("Left","height");var currentPageIndex=0;var cache={};var moduleSize={width:193,height:171};var mainDivMargin=218;createCSSRule("#Main .module",{visibility:"hidden"});if(!window.console){window.console={log:function(){},error:function(){},info:function(){}}}var RepopulationObj=new Class({request:null,onRepopulateComplete:null,initialize:function(){this.attachEvents()},setLocationHandler:function(A){window.Location.setLocation(this.rel||this.get("rel-location")||this.getProperty("href"));new Event(A).stop()},attachEvents:function(){var A=this;$$(".module").addEvent("click",function(){pageTracker._trackPageview(this.get("rel"))});$$("a.internal").addEvent("click",this.setLocationHandler);$$("a.body").forEach(function(C,B){C.getAncestor("module").set("rel-location",C.rel).addEvent("click",A.setLocationHandler).addEvent("mouseover",onHoverModuleOver).addEvent("mouseout",onHoverModuleOut)});$$(".jobs").addEvent("mouseover",onHoverModuleOver).addEvent("mouseout",onHoverModuleOut);$("Main").addEvent("mouseover",this.onMainMouseOver)},onMainMouseOver:function(A){NavAccordion.display(-1)},RepopulateModules:function(C){var A=this;var B=C;C=C.TrimEndChar("/");if(C===""){C="/home/index"}if(C.indexOf("/data")!==0){C="/data"+C}this.request=new Request({url:C,method:"get",evalScripts:true,onComplete:function(F){var E=new Element("DIV");E.set("html",F);var D=E.getFirst();D.getChildren().setStyles({opacity:0,visibility:"hidden"});transitionColl(extractCopy($("Main").getChildren()),slideOut,function(){$("Main").removeEvent("mouseover",A.onMainMouseOver).dispose();D.injectAfter($("Left"));if(A.onRepopulateComplete){A.onRepopulateComplete(B)}A.attachEvents()})}});this.request.send()}});var ModulesManagerObj=new Class({resizeTimerID:null,repopulationObj:null,initialize:function(B){var A=$("Main");var D=window.Location.getLocation();this.repopulationObj=B;if(A===null||window.Location.isSpecial()){if(A){A.show();if(!Browser.Engine.webkit){A.getChildren().show()}else{A.getChildren().each(function(E){E.show()})}return }if(window.Location.isJobs()){this.attachEvents();this.RefreshModules()}return }if(window.Location.isHome()){this.RefreshModules(slideIn)}else{if(window.Location.isOverlay(D)){var C=window.Location.GetModuleSet(D);if(C==="/"){this.RefreshModules()}else{this.repopulationObj.RepopulateModules(C)}}}this.attachEvents()},attachEvents:function(){var A=this;window.addEvent("resize",function(){if(A.resizeTimerID){clearTimeout(A.resizeTimerID);A.resizeTimerID=null}var C={y:getCache("prevWinHeight"),x:getCache("prevWinWidth")};var B={y:window.getHeight(),x:window.getWidth()};if(!C.x||!C.y){setCache("prevWinHeight",B.y);setCache("prevWinWidth",B.x)}if(C.y===B.y&&C.x===B.x){return }A.resizeTimerID=setTimeout(function(){A.RefreshModules(fadeIn)},150)})},RefreshModules:function(E){var B=$("Main");E=E||fadeIn;var D=this;var A=new Matrix();var C=this.GetModulesArray();pages=PageObj.BuildPages(C,A);if(currentPageIndex>=pages.length){currentPageIndex=pages.length-1}if(!this.PageHasChanged(pages,A)){return }pages.HideAllModulesOnOtherPages(currentPageIndex);pages.Get(currentPageIndex).Draw(fadeOut,E,function(){pages.PagingModule.Toggle()});setCache("prevMatrix",A);setCache("prevPages",pages)},GetModulesArray:function(){var B=[];var A=$("Main").getChildren();A.forEach(function(D,C){if(D.hasClass("module")&&D.id!=="pagingModule"){B.push(D)}});return B.reverse()},PageHasChanged:function(B,C){var D=getCache("prevMatrix");var A=getCache("prevPages");if(D===null||A===null){return true}if(D.rowCount!==C.rowCount||D.colCount!==C.colCount){return true}if(B.Get(currentPageIndex).length!==A.Get(currentPageIndex).length){return true}if(B.length!==A.length){return true}for(var E=0;E<B.Get(currentPageIndex).length;E++){if(B.Get(currentPageIndex).Get(E).module.id!==A.Get(currentPageIndex).Get(E).module.id){return true}}return false}});var PagingModuleObj=new Class({pagesCollection:null,initialize:function(A){this.pagesCollection=A},Toggle:function(){if(this.pagesCollection.length>1){this.DrawPagingModule();return }this.HidePagingModule()},DrawPagingModule:function(B){B=B||new Matrix();var D;var H=B.rowCount-1;var F=B.colCount-1;var E=this;if((D=$("pagingModule"))===null){D=new Element("DIV",{id:"pagingModule","class":"module paging",styles:{position:"absolute",top:H*moduleSize.height,left:F*moduleSize.width+mainDivMargin,visibility:"hidden",opacity:0}});D.injectInside($("Main"))}else{D.setStyles({top:H*moduleSize.height,left:F*moduleSize.width+mainDivMargin,visibility:"hidden"});D.empty()}var A=new Element("DIV",{"class":"controls"});A.injectInside(D);var C;for(var G=this.pagesCollection.length;G>0;G--){C=new Element("A",{id:"pageSelect"+G,events:{click:function(){E.GoToPage(this.get("text").toInt()-1)}}});if(G===1){C.addClass("first")}if(G===(currentPageIndex+1)){C.addClass("selected")}C.set("text",G).injectInside(A)}new Element("DIV",{id:"prev",events:{click:function(){E.GoToPage(currentPageIndex-1)}},"class":((currentPageIndex===0)?"disabled":"")}).injectInside(A);new Element("DIV",{id:"next",events:{click:function(){E.GoToPage(currentPageIndex+1)}},"class":((currentPageIndex===(this.pagesCollection.length-1))?"disabled":"")}).injectInside(A);fadeIn(D,null,500)},HidePagingModule:function(){var A=$("pagingModule");if(A!==null){A.setStyle("visibility","hidden")}},GoToPage:function(A){if(A<0){A=0}if(A>=pages.length){A=this.pagesCollection.length-1}if(currentPageIndex===A){return }var C=this;var B=$("pagingModule");B.getChildren()[0].getChildren().removeClass("selected");if(A>0){$("prev").removeClass("disabled")}else{$("prev").addClass("disabled")}if(A==(this.pagesCollection.length-1)){$("next").addClass("disabled")}else{$("next").removeClass("disabled")}$("pageSelect"+(1+A)).addClass("selected");transitionColl(this.pagesCollection.Get(currentPageIndex).GetModules(),fadeOut,function(){C.pagesCollection.Get(A).Draw(fadeOut,fadeIn)})}});var PagesCollectionObj=new Class({length:0,_pages:[],PagingModule:null,initialize:function(){this._pages=[];this.PagingModule=new PagingModuleObj(this)},Add:function(A){this._pages.push(A);A._index=(this.length=this._pages.length)-1},Get:function(A){return this._pages[A]},HideAllModulesOnOtherPages:function(A){this._pages.forEach(function(B,C){if(A==C){return }for(var D=0;D<B._modules.length;D++){B._modules[D].module.hide()}})}});var PageObj=new Class({length:0,_modules:[],_index:-1,_copyModule:null,initialize:function(){this._modules=[];this.length=0},Add:function(B,A,C){if(B.id==""){B.id="moduleID"+(new Date().getTime())+$random(1,100000)}if(B.hasClass("copy")){_copyModule=B}this._modules.push({module:B,x:A,y:C});this.length=this._modules.length},Get:function(A){if(A<0||A>this._modules.length){return null}return this._modules[A]},GetModules:function(){var A=[];for(var B=0;B<this._modules.length;B++){A.push(this._modules[B].module)}return A},ShowCopy:function(){var A=this;if(!this._copyModule){return }this._copyModule.show();this._modules=this._modules.erase(elementsToShow.filter(function(C,B){return(C.module.id==A._copyModule.id)}))},Draw:function(C,H,G){var B;var D=this;var A=getCache("prevPages");var E=[];var F=[];if(A&&A[this._index]){E=PageObj.Complement(this,A[this._index])}this.ShowCopy();transitionColl(extractCopy(E),C,function(){var I=D._modules.length;var J=1;D._modules.forEach(function(L,K){L.module.setStyles({position:"absolute",top:L.y*moduleSize.height+"px",left:L.x*moduleSize.width+mainDivMargin+"px"})});D._modules.forEach(function(L,K){H(L.module,function(){if(J++==I&&G){G()}},null,calculateDelay(K))})});currentPageIndex=this._index}});PageObj.BuildPages=function(D,G){var C=new PagesCollectionObj();var E=new PageObj();var H,I,F,A;var B=0;while(D.length>0){F=D.length-1;if(B>1000){break}while(!G.isFull()&&F>=0){H=$(D[F]);I=G.ModuleFit(H);if(I.canFit){E.Add(H,I.x,I.y);G.ToggleModuleBits(I);D=D.erase(H)}F--;G.TogglePagingBit((D.length>0||C.length>1))}B++;C.Add(E);E=new PageObj();G.Reset()}return C};PageObj.Complement=function(B,G){if(B==null||G==null){return[]}var E=[];var D,C;for(var F=0,A=Math.max(B._modules.length,G._modules.length);F<A;F++){D=B.Get(F);C=G.Get(F);if(C==null||D==null){if(C){E.push(C.module)}}else{if(!(D.module.id==C.module.id&&D.x==C.x&&D.y==C.y)){E.push(C.module)}}}return E};var OverlayObj=new Class({onHideOverlayComplete:function(){},onShowOverlayComplete:function(){},initialize:function(){this.ResizeOverlay();window.addEvent("resize",this.ResizeOverlay.bind(this))},onShowOverlay:function(B){var A=$$(".FLASHHERE");$$("#outerContainer").set("tween",{duration:500,property:"height",transition:Fx.Transitions.Expo["easeOut"],onStart:function(C){C.setStyle("overflow","hidden")},onComplete:function(C){C.setStyle("overflow","visible")}});if(window.Book&&A.length===0){Book.Make()}window.execLateScript();A.show();this.attachEvents();this.onShowOverlayComplete(B)},isOverlayOpen:function(){return $defined($("OverlayContent"))},ResizeOverlay:function(){var D=$("Overlay");if(D){var B=window.getSize();var A=B.y;var C=B.x-parseInt(D.getStyle("margin-left"));D.setStyles({width:C+"px",height:A+"px"})}},ShowOverlay:function(B){var C=this;var D="/data"+B.TrimEndChar("/");var A=400;new Request({url:D,evalScripts:true,method:"get",onComplete:function(E){var G=new Element("DIV",{id:"overlayContainer",styles:{visiblity:"hidden",opacity:0}});G.set("html",E).injectInside(document.body);$("OverlayContent").setStyle("display","block");$("Overlay").setStyle("height",getHeight()+17).setStyle("width",getWidth()-200);C.ResizeOverlay();var F=$$(".FLASHHERE");fadeIn(G,C.onShowOverlay.bind(C,B),A);F.hide();$$("a.track").addEvents({click:function(){pageTracker._trackPageview(this.rel)}})}}).send()},HideOverlay:function(D,C){var A=$("Overlay");var E=$("OverlayContent");var B=this;if(!A||!E){return false}fadeOut(A);fadeOut(E,function(){$$("#overlayContainer","#Overlay","#OverlayContent").dispose();window.Location.setLocation(C||window.Location.GetModuleSet(window.location.hash.substr(1)));if(B.onHideOverlayComplete){B.onHideOverlayComplete()}},800);if(D){new Event(D).stop()}return true},attachEvents:function(){var B=this;$$(".tags a.internal","a.section").addEvent("click",function(C){B.HideOverlay(null,this.rel);new Event(C).stop()});$$("#overlayClose","#Overlay").addEvent("click",this.HideOverlay.bindWithEvent(this));var A;if((A=$("overlayContainer"))!=null){A.addEvent("mouseover",function(C){NavAccordion.display(-1)})}}});var Matrix=new Class({moduleSize:{width:193,height:171},_m:[],rowCount:-1,colCount:-1,initialize:function(A,D){if(A==null&&D==null){var C=window.getSize();var B={};B.rows=Math.max(3,Math.floor(C.y/moduleSize.height));B.cols=this.GetColsMax();setCache("previousPageDimensions",B);A=B.rows;D=B.cols}if(isNaN(A)||isNaN(D)){return }this._m=[];var E=new Array(D);for(var F=0;F<D;F++){E[F]=0}for(var F=0;F<A;F++){this._m.push($A(E))}this.rowCount=A;this.colCount=D},GetColsMax:function(){var D=3;var A;var B=false;var C=$$(".copy")[0];if(C){if(C.getStyle("display")=="none"){B=true;C.setStyle("display","block")}A=C.getSize();D=Math.max(D,Math.ceil(A.x/this.moduleSize.width));if(B){C.setStyle("display","none")}}A=window.getSize();return Math.max(D,Math.floor((A.x-mainDivMargin)/this.moduleSize.width))},Reset:function(){this._m.each(function(B,A){B.each(function(D,C){B[C]=0})})},TogglePagingBit:function(B){var A=this._m[this._m.length-1];A[A.length-1]=(B!=null)?(B?1:0):!A[A.length-1]},ToggleModuleBits:function(B){if(this._m[B.y]==null||this._m[B.y][B.x]==null){return }var A;var E=B.y;for(var D=0;D<B.rowSpan;D++){A=B.x;for(var C=0;C<B.colSpan;C++){this._m[E][A++]=1}E++;if(this._m[E]==null){return }}},ModuleFit:function(E){var L,G;var K=false;var C=this._moduleSize(E);var H=Math.ceil(C.x/this.moduleSize.width);var J=Math.ceil(C.y/this.moduleSize.height);row_iterate:for(var B=0;B<this._m.length;B++){for(var I=0,A;I<this._m[B].length;I++){A=this._m[B][I];if(A==0){if((this._m.length-B)<J){break row_iterate}for(var F=0;F<J;F++){for(var D=0;D<H;D++){if(this._m[B+F][I+D]!=0){continue row_iterate}}}K=true;G=I;L=B;break row_iterate}}}return{canFit:K,rowSpan:J,colSpan:H,x:G,y:L}},_moduleSize:function(C){var B=C.getStyle("display");if(B=="block"){return C.getSize()}var A;C.setStyle("display","block");A=C.getSize();C.setStyle("display",B);return A},isFull:function(){return(this._m.toString().indexOf("0")==-1)},toString:function(){return this._m.toString()}});var LocationObj=new Class({moduleItem:"/",overlayItem:"",currentActionItem:"",SWFAddressInitialized:false,onAddressChange:function(){},initialize:function(){var A=this;SWFAddress.addEventListener(SWFAddressEvent.INIT,function(){if(A.isSpecial()){simplePaging()}if(isHomeIndex(A.getLocation())){A.setLocation("/")}SWFAddress.addEventListener(SWFAddressEvent.CHANGE,function(){var B=A.getLocation();if(A.isSpecial()&&A.isHome(B)){return }if(!A.isMain()&&!A.isHome(B)){window.location.href=window.location.protocol+"//"+window.location.hostname+"/#"+B;return }A.onAddressChange(B);syncNav(B)});A.SWFAddressInitialized=true});window.addEvent("load",function(){setTimeout(function(){if(A.SWFAddressInitialized){return }SWFAddress.dispatchEvent(new SWFAddressEvent("init"));SWFAddress.dispatchEvent(new SWFAddressEvent("change"))},50)})},isOverlay:function(A){return(A.indexOf("/detail")!=-1||A.indexOf("office/")!=-1)},isSpecial:function(){return($$(".specialPage")[0]!=null||this.isJobs())},isJobs:function(){var A=$$(".jobs")[0];return(A!=null&&A.hasClass("x16"))},isHome:function(A){var B=A||this.getLocation();if(B=="/"||B=="/home/index"||B=="/home/index/"){return true}return false},getModuleSetPath:function(A){if(!$defined(A)){return""}return $pick(["/detail","office/","/tag"].map(function(C,B,D){if(A.contains(C)){return A.split(C)[0]}return null}).clean()[0],A)},setLocation:function(A){if(A.indexOf("clients")!=-1){A=location.path+"/#/"+A}if(window.location.pathname.indexOf("presskit")>1){window.location.pathname="/#"+A}A=A.trim();if(A==this.getLocation()){return }try{SWFAddress.setValue(A)}catch(B){window.location.hash=A}},getLocation:function(){return SWFAddress.getValue()},isMain:function(){return window.location.pathname=="/"},CompareLocations:function(B,A){if(B==A){return true}if(!B||!A){return false}B=B.TrimEndChar("/");A=A.TrimEndChar("/");return(B==A)},GetModuleSet:function(A){var B=(A.indexOf("office/")==-1)?"/detail":"office/";var D=A.split(B);var C=D[0];if(window.location.href.toString().indexOf("/HOW")!=-1){C="/news/inthepress"}if(this.moduleItem.indexOf(C+"/tag/")===0){C=this.moduleItem}return C.TrimEndChar("/")+"/"}});function initNav(){var A=false;var E=null;var C=null;var F;var D;var G;NavAccordion=new Accordion("div.navSection","ul.navItems",{show:-1,duration:300,transition:Fx.Transitions.linear,onActive:function(H){A=true;H.addClass("selected")},onBackground:function(H){H.removeClass("selected");if(D){D.setStyle("margin-top","30px")}},onComplete:function(){A=false}},$("Navigation"));$$("div.navSection").addEvent("mouseenter",function(H){E=$(this);clearTimeout(G);G=setTimeout(function(){if(!E){return }var I=E.getNext();NavAccordion.display(I);D=I.getNext();if(D){D.setStyle("margin-top","15px")}},200+((A)?200:0))});$("Left").addEvent("mouseleave",function(){clearTimeout(G);NavAccordion.display(-1)});$("OtherNavigation").addEvent("mouseenter",function(){clearTimeout(G);NavAccordion.display(-1)});$$("#Navigation a").addEvent("mouseout",function(H){clearTimeout(G);new Event(H).stop()});$$(".navItems li a").addEvent("click",function(){try{syncNav($(this).getProperty("rel"));NavAccordion.display(-1);this.blur()}catch(H){}});$("Navigation").setStyle("visibility","visible");window.syncNav=function(L){var I=L;var H;var K=$("subNavIndicator");$$(".navItems a").removeClass("selected");if((window.Location.isHome()||L==="/jobs/index"||L==="/contact/index")&&K){K.dispose()}L=window.Location.getModuleSetPath(L).TrimEndChar("/");var J=$$(".navItems li a[rel="+L+"]");if(J.length==0){return }newItem=J[0];if(K){H=K.getProperty("rel");if(H==I){return }K.injectInside(B(newItem))}else{K=new Element("span",{id:"subNavIndicator"});K.injectInside(B(newItem))}K.innerHTML=(newItem.get("text")=="")?newItem.innerHTML:newItem.get("text");K.setProperty("rel",newItem.getProperty("rel"))};function B(J){var H=(J.tagName!="LI")?J.getParent().getParent():J.getParent();if(!H){return null}var I=null;while((I=H.getPrevious())!==null){if(I.tagName=="DIV"){break}}return I}}function initFooter(){var D=$("footer");if(!D){return }var A=$("OtherNavigation");var C=A.getCoordinates();B();window.addEvent("resize",function(){B()});function B(){var E=window.getHeight()-20;if(E<=C.bottom){D.setStyles({bottom:"",top:C.bottom+"px"})}else{D.setStyles({bottom:"11px",top:""})}}}function sizeMain(){A();window.addEvent("resize",A);function A(){if($("Main")){$("Main").setStyle("width",window.getSize().x-230+"px")}}}function setCache(A,B){cache[A]=B}function getCache(A){return cache[A]||null}function onHoverModuleOver(){this.addClass("hover")}function onHoverModuleOut(){this.removeClass("hover")}function execLateScript(){if(swfobject.getFlashPlayerVersion().major<9){var content=$("flashcontent");if(content){content.hide();ToggleCopyText(null,content.get("text"));var imgs=content.getElements("IMG");if(imgs.length>0){$(imgs[0]).setStyles({position:"absolute",bottom:"0px"}).injectInside(content.getParent())}content.empty()}return }$$(".lateBind").forEach(function(item,index){var str=item.get("html")||item.innerHTML;try{eval(str)}catch(e){alert("LateScriptError: "+e.message)}})}function extractCopy(A){var B=$$(".copy")[0];return A.erase(B)}function createCSSRule(E,B){var D="\n"+E+"{\n";for(var C in B){D+="\t"+C+": "+B[C]+";\n"}D+="}\n";var A=$$('style[type="text/css"]')[0]||new Element("style").setProperty("type","text/css").injectInside(document.head);if(Browser.Engine.trident){A.styleSheet.cssText+=D}else{A.appendText(D)}}function transitionColl(C,D,F){var A=C.length;var B=0;if(C==null||A==0||D==null){if(F){F()}return }C.forEach(function(H,G){D(H,E,null,calculateDelay(G))});function E(){B++;if(B==A){if(F){F()}}}}function fadeOut(B,D,C){if(B.getStyle("visibility")=="hidden"){if(D){D()}return }var A=new Fx.Morph(B,{duration:C||500,transition:Fx.Transitions.linear,onComplete:function(E){B.hide();if(D){D()}}});A.start({opacity:0})}function fadeIn(B,D,C){var A=new Fx.Morph(B,{duration:C||500,transition:Fx.Transitions.linear,onStart:function(E){E.show()},onComplete:function(E){if(D){D()}}});A.start({opacity:1})}function slideIn(C,F,E,B){if(window.opera){fadeIn(C,F,E);return }var A=C.getStyle("top").toInt();B=B||0;var D=new Fx.Morph(C,{ignore:false,duration:200,transition:Fx.Transitions.linear,onStart:function(G){G.show()},onComplete:function(G){if(F){F()}}});setTimeout(function(){D.start({top:[A-35,A],opacity:[0,1]})},B)}function slideOut(D,G,F,C){var A=D.getStyle("visibility");if(!D||A=="hidden"||(A=="inherit"&&D.getParent().getStyle("visibility")=="hidden")){if(G){G()}return }var B=D.getStyle("top").toInt();var E=new Fx.Morph(D,{wait:false,duration:200,transition:Fx.Transitions.linear,onComplete:function(H){H.hide();if(G){G()}}});setTimeout(function(){E.start({top:[B,B+35],opacity:[1,0]})},C)}function calculateDelay(A){return(A+1)*30}function isHomeIndex(A){return(A=="/home/index"||A=="/home/index/")}Element.implement({getAncestor:function(B){var A=this.getParent();while(A!=null){if(A.hasClass(B)){return A}A=A.getParent()}return null},show:function(){this.setStyles({visibility:"visible",display:"block",opacity:"1"});return this},hide:function(){this.setStyles({visibility:"hidden",display:"none",opacity:0});return this},toggleText:function(){var A=this.getProperty("_toggleText");this.setProperty("_toggleText",this.get("text"));this.set("text",A);return this}});String.implement({TrimEndChar:function(A){if(this.charAt(this.length-1)===A){return this.substr(0,this.length-1)}return this}});function ToggleCopyText(C,A){var E=$("outerContainer");var B=$("textContainer");var F=getCopyVersion(unescape(A));var D;if(A==null||A.length==0){$("booknav").setStyle("display","none");$("book").innerHTML="";if($("readMore")){$("readMore").dispose()}if(E.getStyle("height").toInt()!=0){E.tween(148,0)}}else{switch(F){case 1:simplePaging.delay(1,null,A);break;case 2:readMorePaging.delay(1,null,A);break}if(E.getStyle("height").toInt()!=148){E.tween(0,148)}}}function simplePaging(A){A=A||"";if(!$defined($("book"))){return }$$("#readMore").dispose();$$("#textContainer").removeClass("read-more");$("book").set("html","").show();$("booknav").show();Book.MakeAsync(unescape(A))}function readMorePaging(E){var F=unescape(E).split("<!--more-->");var B=F[0];var H=F[1];var A=false;var M=$("outerContainer");var K=$("book");var J=$("readMore")||(new Element("DIV",{id:"readMore","class":"read-more-intro"}).injectInside("textContainer"));J.set("html",B);var D=new Element("A",{"class":"read-more-link",href:"#",_toggleText:"Read Less"});D.set("html","Read More").addEvent("click",C).injectInside(J);$("textContainer").addClass("read-more");K.hide().set("html","");M.tween(148);function C(O){var N=(M.getSize().y==569);if(!A){K.show();Book.MakeAsync(H,344,390,function(){G(function(){L();I()})});A=true}else{if(N){K.hide()}else{K.show()}}M.tween((N)?148:569);$$(".read-more-link").toggleText();new Event(O).stop()}function L(){var N=$("book").getElement(".pageset:nth-child(last)").getElement(".bookpage:nth-child(last)");var O=N.getLast("p")||new Element("P").inject(N,"top");new Element("A",{"class":"read-more-link",href:"#",_toggleText:"Return to Image Viewer"}).set("text","Return to Image Viewer").addEvent("click",C).inject(O,"after")}function G(P){var N;var O=$("book").getElement(".lastCol ul.related");$$($$("#book .firstCol","#book .lastCol").getFirst("p:empty")).dispose();if($defined(O)){while($defined(N=O.getPrevious("p:empty"))){N.dispose()}}if($defined(P)){P()}}function I(){var N=$("book").getElement(".lastCol ul.related");if(!$defined(N)||$defined($("book").getElement(".related-header"))){return }new Element("H5",{"class":"related-header",html:"Related Links:"}).inject(N,"before")}}function getCopyVersion(A){if(A==null){return 1}if(A.contains("<!--more-->")){return 2}return 1}var Book=new Class({_divDim:null,_contentDiv:null,pages:[],current_page:1,cols_per_page:2,_newPage:function(A){return new Element("div",{id:"pageset-"+A,"class":"pageset",styles:{display:"none"}})},initialize:function(){this._divDim=$("divDim");this._contentDiv=$("content");$$("#booknav-next").setProperty("href","#").addEvent("click",this.ShowNextPage.bindWithEvent(this));$$("#booknav-prev").setProperty("href","#").addEvent("click",this.ShowPrevPage.bindWithEvent(this))},ParseText:function(A){if(!this._contentDiv){return }this._contentDiv.set("html",A)},MakeColumns:function(C,A){if(!this._contentDiv){return[]}var F=1;var B=C||this._divDim.getStyle("width").toInt();var H=A||this._divDim.getStyle("height").toInt();this.cols_per_page=($("clientList"))?4:2;this.current_page=1;this.pages=[];var E=this;var D=Columns.splitText(document.getElementById("content").innerHTML,B,H);var G=this._newPage(this.pages.length+1);D.map(function(K,J){K=K.replace("<li></li>","");var I=new Element("div",{id:"bookpage-"+(J+1),"class":"bookpage"+((F%2==0)?" evenCol":" oddCol")});if(F%E.cols_per_page==0){I.addClass("lastCol")}if(F==1||F==(E.cols_per_page+1)){I.addClass("firstCol")}I.set("html",K).injectInside(G);if(G.getChildren().length==E.cols_per_page||J==(D.length-1)){E.pages.push(G);G=E._newPage(E.pages.length+1)}F++;return K});return this.pages},Draw:function(C,A){A=A||this.pages;C=C||$("book");if(!C){return }C.empty();$each(A,function(E,D){E.injectInside(C)});var B=new RepopulationObj();this.UpdateNavigation();this.ShowPage(1)},ShowPage:function(A){var B;if((B=$("pageset-"+A))==null){return }$$(".pageset").setStyle("display","none");B.setStyle("display","inline");B.setStyle("visibility","visible");this.current_page=A},ShowNextPage:function(A){if($("pageset-"+(this.current_page+1))){this.ShowPage(this.current_page+1);this.UpdateNavigation()}if(A){new Event(A).stop()}},ShowPrevPage:function(A){if($("pageset-"+(this.current_page-1))){this.ShowPage(this.current_page-1);this.UpdateNavigation()}if(A){new Event(A).stop()}},UpdateNavigation:function(){var C;var B;if((B=$("booknav-current"))!==null){B.set("html","<span>{currentPage}/{numberOfPages}</span>".substitute({currentPage:this.current_page,numberOfPages:this.pages.length}))}if((B=$("booknav-current-full"))!==null){var A=new Element("div");B.empty().adopt(this.pages.map(function(F,E,G){E=E+1;var D=new Element("a",{id:"pageSelect"+E,html:E}).addEvent("click",this.ShowPage.pass(E,this)).addEvent("click",this.UpdateNavigation.bind(this));if(this.current_page==E){D.addClass("selected")}if(E==1){D.addClass("first")}return D},this).reverse())}if($("booknav-current")||$("booknav-current-full")){if(this.pages.length>0){$("booknav").show()}$("booknav-prev").setStyles((this.current_page<=1)?{backgroundImage:"url(/images/prev_page_inactive.gif)",cursor:"default"}:{backgroundImage:"url(/images/prev_transparent.gif)",cursor:"pointer"});$("booknav-next").setStyles((this.current_page==this.pages.length)?{backgroundImage:"url(/images/next_page_inactive.gif)",cursor:"default"}:{backgroundImage:"url(/images/next_transparent.gif)",cursor:"pointer"});$$("#booknav-current","#booknav-current-full","#booknav-next","#booknav-prev").setStyle("visibility",(this.pages.length>1)?"visible":"hidden")}}});Book.Make=function(C,D,A){var B=new Book();if(C){B.ParseText(C)}B.MakeColumns(D,A);B.Draw();Book.Instance=B;return B};Book.MakeAsync=function(C,D,A,E){var B=new Book();if(C){B.ParseText(C)}setTimeout(function(){B.MakeColumns(D,A);B.Draw();if(E){E(B)}},1);Book.Instance=B};window.addEvent("domready",function(){try{initNav();initFooter();sizeMain();var C=new RepopulationObj();C.onRepopulateComplete=function(E){window.Location.moduleItem=E;B.RefreshModules(slideIn)};var A=new OverlayObj();A.onShowOverlayComplete=function(E){Location.overlayItem=E};window.Location=new LocationObj();window.Location.onAddressChange=function(E){if(this.currentActionItem===""&&E==="/"){if(this.isOverlay(window.location.href)){A.onShowOverlay(E)}this.currentActionItem=E;return }A.HideOverlay();if(this.isOverlay(E)){A.ShowOverlay(E)}else{if(!this.CompareLocations(E,this.moduleItem)){currentPageIndex=0;C.RepopulateModules(E)}}parent.currentActionItem=E};var B=new ModulesManagerObj(C)}catch(D){alert(D.message)}});