FoldLinkNavigator=function(a){foldLinkNav=this;$("#tree").each(function(){this.lastLink_=undefined;foldLinkNav.initialiseNode(this,undefined)});this.previousAnchor=$("a#nav_prev");this.previousAnchor.bind("click",this.navigationAnchorClickedEvent);this.upAnchor=$("a#nav_up");this.upAnchor.bind("click",this.navigationAnchorClickedEvent);this.nextAnchor=$("a#nav_next");this.nextAnchor.bind("click",this.navigationAnchorClickedEvent);this.breadcrumbNode_=$("div#nav_breadcrumb");this.breadcrumbNode_.bind("click",this.navigationAnchorClickedEvent);this.titleNode_=$("div#nav_title");this.titleNode_.append("");this.maxFoldDepth=2};FoldLinkNavigator.upAnchor;FoldLinkNavigator.previousAnchor;FoldLinkNavigator.nextAnchor;FoldLinkNavigator.nextLink_;FoldLinkNavigator.nextLinkFocus_;FoldLinkNavigator.currentLink_;FoldLinkNavigator.breadcrumbNode_;FoldLinkNavigator.titleNode_;FoldLinkNavigator.lastLink_;FoldLinkNavigator.homeURL;FoldLinkNavigator.maxBreadcrumbWidth;FoldLinkNavigator.maxFoldDepth;FoldLinkNavigator.prototype.initialiseNode=function(b,d){while(b){var a;var c=b.tagName=="DIV"&&b.className=="fold_long";if(c){a=d;d=this.lastLink_}if(b.tagName=="A"||(b.tagName=="DIV"&&b.className=="fold_link_label")){if(this.lastLink_!=undefined){this.lastLink_.linkNext=b;b.linkUp=d;b.linkPrevious=this.lastLink_}$(b).bind("click",this.linkClickedEvent);this.lastLink_=b}this.initialiseNode(b.firstChild,d);if(c){d=a}b=b.nextSibling}};FoldLinkNavigator.prototype.setAnchor=function(b,a){if(b){b.each(function(){this.navlink=a});if(a){b.attr("href",a.getAttribute("href"));b.attr("target",a.getAttribute("target"));b.attr("class","active")}else{b.removeAttr("href");b.attr("class","disabled")}}};FoldLinkNavigator.prototype.createBreadcrumbTrail=function(e,d){var f=e;var c=document.createElement("UL");d.appendChild(c);while(e){var a=document.createElement("LI");c.insertBefore(a,c.firstChild);if(e.className=="fold_link_label"){a.appendChild(document.createTextNode(e.firstChild.data))}else{var b=document.createElement("A");b.setAttribute("href",e.getAttribute("href"));b.setAttribute("target",e.getAttribute("target"));if(e==f){b.setAttribute("id","current_link")}b.navlink=e;b.appendChild(document.createTextNode(e.firstChild.data));a.appendChild(b)}e=e.linkUp}if(this.homeURL){var a=document.createElement("LI");c.insertBefore(a,c.firstChild);var b=document.createElement("A");b.setAttribute("href",this.homeURL);b.appendChild(document.createTextNode("Home"));a.appendChild(b)}if(this.maxBreadcrumbWidth){var a=c.firstChild;while(d.offsetWidth>this.maxBreadcrumbWidth){a.style.display="none";a=a.nextSibling}}};FoldLinkNavigator.prototype.setCurrentLink=function(c,a){if(this.currentLink_){this.currentLink_.id=""}c.id="current_link";this.currentLink_=c;var d=$(c).parents(".fold");$("#tree").each(function(){$(".fold",this).removeClass("hidden")});$(d).addClass("open");if(d.size()>this.maxFoldDepth){$(d.slice(this.maxFoldDepth-1)).each(function(){$(this).siblings().each(function(){$(this).addClass("hidden");$(this).removeClass("open")})});$(d.slice(this.maxFoldDepth)).each(function(){$(this).addClass("hidden")})}rwtEnsureElementIsScrolledIntoView(c);this.titleNode_.text(c.firstChild.data);var b=c.linkUp;while(b&&b.className=="fold_link_label"){b=b.linkUp}this.setAnchor(this.upAnchor,b);b=c.linkPrevious;while(b&&b.className=="fold_link_label"){b=b.linkPrevious}this.setAnchor(this.previousAnchor,b);b=c.linkNext;while(b&&b.className=="fold_link_label"){b=b.linkNext}this.setAnchor(this.nextAnchor,b);this.breadcrumbNode_.each(function(e){while(this.firstChild){this.removeChild(this.firstChild)}foldLinkNav.createBreadcrumbTrail(c,this)})};FoldLinkNavigator.prototype.linkClickedEvent=function(a){target=a.target;while(target&&target.tagName!="A"){target=target.parentNode}foldLinkNav.nextLink_=target;foldLinkNav.nextLinkFocus_=false};FoldLinkNavigator.prototype.navigationAnchorClickedEvent=function(a){target=a.target;while(target&&target.tagName!="A"){target=target.parentNode}foldLinkNav.nextLink_=target.navlink;foldLinkNav.nextLinkFocus_=true};FoldLinkNavigator.prototype.pathsMatch=function(d,c){var a=d.length;var b=c.length;while(a--&&b--){if(d[a]!="."&&c[b]!="."&&d[a]!=c[b]){return false}}return true};FoldLinkNavigator.prototype.linksMatch=function(a,c,b){href=a.getAttribute("href");if(b){href=href.split("#")[0]}if(href){path2=href.split("/");if(this.pathsMatch(c,path2)){return true}}return false};FoldLinkNavigator.prototype.findLink=function(a){var c=document.getElementById("tree").getElementsByTagName("A");var d=a.split("/");for(var b=0;b