String.extend({deCamelize:function(){
return this.replace(/([a-z])([A-Z])/g,"$1 $2");
}});
function $getText(el){
return el.innerText||el.textContent||"";
}
Element.extend({injectWrapper:function(el){
while(el.firstChild){
this.appendChild(el.firstChild);
}
el.appendChild(this);
return this;
},visible:function(){
var el=this;
while($type(el)=="element"){
if(el.getStyle("visibility")=="hidden"){
return false;
}
if(el.getStyle("display")=="none"){
return false;
}
el=el.getParent();
}
return true;
},hide:function(){
this.style.display="none";
return this;
},show:function(){
this.style.display="";
return this;
},toggle:function(){
this.visible()?this.hide():this.show();
return this;
},scrollTo:function(x,y){
this.scrollLeft=x;
this.scrollTop=y;
},getPosition:function(_6){
_6=_6||[];
var el=this,_8=0,_9=0;
do{
_8+=el.offsetLeft||0;
_9+=el.offsetTop||0;
el=el.offsetParent;
}while(el);
_6.each(function(_a){
_8-=_a.scrollLeft||0;
_9-=_a.scrollTop||0;
});
return {"x":_8,"y":_9};
}});
var Observer=new Class({initialize:function(el,fn,_d){
this.options=Object.extend({event:"keyup",delay:300},_d||{});
this.element=$(el);
this.callback=fn;
this.timeout=null;
this.listener=this.fired.bind(this);
this.value=this.element.getValue();
this.element.setProperty("autocomplete","off").addEvent(this.options.event,this.listener);
},fired:function(){
if(this.value==this.element.value){
return;
}
this.clear();
this.value=this.element.value;
this.timeout=this.callback.delay(this.options.delay,null,[this.element]);
},clear:function(){
this.timeout=$clear(this.timeout);
},stop:function(){
this.element.removeEvent(this.options.event,this.listener);
this.clear();
}});
Element.extend({observe:function(fn,_f){
return new Observer(this,fn,_f);
}});
var Color=new Class({initialize:function(_10){
if(_10.blend&&_10.mix){
return _10;
}
var rgb=(_10.push)?_10:_10.hexToRgb(true);
return Object.extend(rgb,Color.prototype);
},blend:function(_12,_13){
_13=new Color(_13);
var rgb=[];
for(var i=0;i<3;i++){
rgb.push(Math.round((this[i]/100*_12)+(_13[i]/100*(100-_12))));
}
return new Color(rgb);
},mix:function(){
var _16;
$each(arguments,function(_17){
_16=this.blend(50,_17);
},this);
return _16;
},invert:function(){
var rgb=[];
for(var i=0;i<3;i++){
rgb.push(255-this[i]);
}
return new Color(rgb);
}});
function $C(_1a){
return new Color(_1a);
}
Color.implement({HTMLColors:{black:"000000",green:"008000",silver:"C0C0C0",lime:"00FF00",gray:"808080",olive:"808000",white:"FFFFFF",yellow:"FFFF00",maroon:"800000",navy:"000080",red:"FF0000",blue:"0000FF",purple:"800080",teal:"008080",fuchsia:"FF00FF",aqua:"00FFFF"},initialize:function(_1b){
if(_1b.blend&&_1b.mix){
return _1b;
}
var rgb=(_1b.push)?_1b:(this.HTMLColors[_1b]||_1b).hexToRgb(true);
return Object.extend(rgb,Color.prototype);
}});
String.extend({localize:function(){
var s=LocalizedStrings["javascript."+this],_1e=arguments;
if(!s){
return ("???"+this+"???");
}
return s.replace(/\{(\d)\}/g,function(m){
return _1e[m.charAt(1)]||"???"+m.charAt(1)+"???";
});
}});
Number.REparsefloat=new RegExp("([+-]?\\d+(:?\\.\\d+)?(:?e[-+]?\\d+)?)","i");
function $T(el){
var t=$(el);
return (t&&t.tBodies[0])?$(t.tBodies[0]):t;
}
function getAncestorByTagName(_22,_23){
if(!_22){
return null;
}
if(_22.nodeType==1&&(_22.tagName.toLowerCase()==_23.toLowerCase())){
return _22;
}else{
return getAncestorByTagName(_22.parentNode,_23);
}
}
var Wiki={JSONid:10000,DELIM:"\xa4",init:function(_24){
Object.extend(Wiki,_24||{});
var h=location.host;
this.BasePath=this.BaseUrl.slice(this.BaseUrl.indexOf(h)+h.length,-1);
this.prefs=new Hash.Cookie("JSPWikiUserPrefs",{path:Wiki.BasePath,duration:20});
},getUrl:function(_26){
return this.PageUrl.replace(/%23%24%25/,_26);
},getPageName:function(url){
var s=this.PageUrl.escapeRegExp().replace(/%23%24%25/,"(.+)");
return url.match(new RegExp(s))[1];
},onPageLoad:function(){
this.PermissionEdit=($E("a.edit")!==undefined);
this.url=null;
this.parseLocationHash.periodical(500);
["editorarea","j_username","loginname","assertedName","query2"].some(function(el){
el=$(el);
if(el&&el.visible()){
el.focus();
return true;
}
return false;
});
if($("morebutton")){
this.replaceMoreBox();
}
},savePrefs:function(){
if($("prefSkin")){
this.prefs.set("SkinName",$("prefSkin").getValue());
}
if($("prefTimeZone")){
this.prefs.set("TimeZone",$("prefTimeZone").getValue());
}
if($("prefTimeFormat")){
this.prefs.set("DateFormat",$("prefTimeFormat").getValue());
}
if($("prefOrientation")){
this.prefs.set("orientation",$("prefOrientation").getValue());
}
this.prefs.set("FontSize",this.PrefFontSize);
},changeOrientation:function(){
$("wikibody").className=$("prefOrientation").getValue();
},replaceMoreBox:function(){
var _2a=$("morebutton"),_2b=new Element("ul").inject(_2a),_2c=_2b.effect("opacity",{wait:false}).set(0),_2d=$("actionsMore"),_2e="";
$A(_2d.options).each(function(o){
if(o.value==""){
return;
}
_2e="separator";
new Element("a",{"class":o.className,"href":o.value}).setHTML(o.text).inject(new Element("li").inject(_2b));
});
$("moremenu").inject(new Element("li",{"class":_2e}).inject(_2b));
_2d.getParent().hide();
_2a.show().addEvent("mouseout",(function(){
_2c.start(0);
}).bind(this)).addEvent("mouseover",(function(){
Wiki.locatemenu(_2a,_2b);
_2c.start(0.9);
}).bind(this));
},locatemenu:function(_30,el){
var win={"x":window.getWidth(),"y":window.getHeight()},_33={"x":window.getScrollLeft(),"y":window.getScrollTop()},_34=_30.getPosition(),_35={"x":_30.offsetWidth-el.offsetWidth,"y":_30.offsetHeight},_36={"x":el.offsetWidth,"y":el.offsetHeight},_37={"x":"left","y":"top"};
for(var z in _37){
var pos=_34[z]+_35[z];
if((pos+_36[z]-_33[z])>win[z]){
pos=win[z]-_36[z]+_33[z];
}
el.setStyle(_37[z],pos);
}
},parseLocationHash:function(){
if(this.url&&this.url==location.href){
return;
}
this.url=location.href;
var h=location.hash;
if(h==""){
return;
}
h=h.replace(/^#/,"");
var _3b=el=$(h);
while($type(el)=="element"){
if(el.hasClass("hidetab")){
TabbedSection.onclick(el);
}else{
if(el.hasClass("tab")){
}else{
if(el.visible()){
el.show();
}
}
}
el=el.getParent();
}
if(_3b){
$(_3b).scrollTo();
}
},submitOnce:function(_3c){
window.onbeforeunload=null;
(function(){
$A(_3c.elements).each(function(e){
if((/submit|button/i).test(e.type)){
e.disabled=true;
}
});
}).delay(10);
return true;
},submitUpload:function(_3e,_3f){
$("progressbar").setStyle("visibility","visible");
this.progressbar=Wiki.jsonrpc.periodical(1000,this,["progressTracker.getProgress",[_3f],function(_40){
if(!_40.code){
$("progressbar").getFirst().setStyle("width",_40+"%").setHTML(_40+"%");
}
}]);
return Wiki.submitOnce(_3e);
},JSONid:10000,jsonrpc:function(_41,_42,fn){
new Ajax(Wiki.JsonUrl,{postBody:Json.toString({"id":Wiki.JSONid++,"method":_41,"params":_42}),method:"post",onComplete:function(_44){
var r=Json.evaluate(_44,true);
if(!r){
return;
}
if(r.result){
fn(r.result);
}else{
if(r.error){
fn(r.error);
}
}
}}).request();
}};
var WikiSlimbox={onPageLoad:function(){
var i=0,lnk=new Element("a",{"class":"slimbox"}).setHTML("&raquo;");
$$("*[class^=slimbox]").each(function(_48){
var _49="lightbox"+i++,_4a=_48.className.split("-")[1]||"img ajax",_4b=[];
if(_4a.test("img")){
_4b.extend(["img.inline","a.attachment"]);
}
if(_4a.test("ajax")){
_4b.extend(["a.wikipage","a.external"]);
}
$ES(_4b.join(","),_48).each(function(el){
var _4d=el.src||el.href;
var rel=(el.className.test("inline|attachment"))?"img":"ajax";
if((rel=="img")&&!_4d.test("(.bmp|.gif|.png|.jpg|.jpeg)(\\?.*)?$","i")){
return;
}
lnk.clone().setProperties({"href":_4d,"rel":_49+" "+rel,"title":el.alt||el.getText()}).injectBefore(el);
if(el.src){
el.replaceWith(new Element("a",{"class":"attachment","href":el.src}).setHTML(el.alt||el.getText()));
}
});
});
if(i){
Lightbox.init();
}
}};
var Lightbox={init:function(_4f){
this.options=$extend({resizeDuration:400,resizeTransition:false,initialWidth:250,initialHeight:250,animateCaption:true,errorMessage:"slimbox.error".localize()},_4f||{});
this.anchors=[];
$each(document.links,function(el){
if(el.rel&&el.rel.test(/^lightbox/i)){
el.onclick=this.click.pass(el,this);
this.anchors.push(el);
}
},this);
this.eventKeyDown=this.keyboardListener.bindAsEventListener(this);
this.eventPosition=this.position.bind(this);
this.overlay=new Element("div",{"id":"lbOverlay"}).inject(document.body);
this.center=new Element("div",{"id":"lbCenter","styles":{"width":this.options.initialWidth,"height":this.options.initialHeight,"marginLeft":-(this.options.initialWidth/2),"display":"none"}}).inject(document.body);
new Element("a",{"id":"lbCloseLink","href":"#","title":"Close [Esc]"}).inject(this.center).onclick=this.overlay.onclick=this.close.bind(this);
this.image=new Element("div",{"id":"lbImage"}).inject(this.center);
this.bottomContainer=new Element("div",{"id":"lbBottomContainer","styles":{"display":"none"}}).inject(document.body);
this.bottom=new Element("div",{"id":"lbBottom"}).inject(this.bottomContainer);
this.caption=new Element("div",{"id":"lbCaption"}).inject(this.bottom);
var _51=new Element("div").inject(this.bottom);
this.prevLink=new Element("a",{"id":"lbPrevLink","href":"#","styles":{"display":"none"}}).setHTML("slimbox.previous".localize()).inject(_51);
this.number=new Element("span",{"id":"lbNumber"}).inject(_51);
this.nextLink=this.prevLink.clone().setProperties({"id":"lbNextLink"}).setHTML("slimbox.next".localize()).inject(_51);
this.prevLink.onclick=this.previous.bind(this);
this.nextLink.onclick=this.next.bind(this);
this.error=new Element("div").setProperty("id","lbError").setHTML(this.options.errorMessage);
new Element("div",{"styles":{"clear":"both"}}).inject(this.bottom);
var _52=this.nextEffect.bind(this);
this.fx={overlay:this.overlay.effect("opacity",{duration:500}).hide(),resize:this.center.effects($extend({duration:this.options.resizeDuration,onComplete:_52},this.options.resizeTransition?{transition:this.options.resizeTransition}:{})),image:this.image.effect("opacity",{duration:500,onComplete:_52}),bottom:this.bottom.effect("margin-top",{duration:400,onComplete:_52})};
this.fxs=new Fx.Elements([this.center,this.image],$extend({duration:this.options.resizeDuration,onComplete:_52},this.options.resizeTransition?{transition:this.options.resizeTransition}:{}));
this.preloadPrev=new Image();
this.preloadNext=new Image();
},click:function(_53){
var rel=_53.rel.split(" ");
if(rel[0].length==8){
return this.open([[url,title,rel[1]]],0);
}
var _55=0,_56=[];
this.anchors.each(function(el){
var _58=el.rel.split(" ");
if(_58[0]!=rel[0]){
return;
}
if((el.href==_53.href)&&(el.title==_53.title)){
_55=_56.length;
}
_56.push([el.href,el.title,_58[1]]);
});
return this.open(_56,_55);
},open:function(_59,_5a){
this.images=_59;
this.position();
this.setup(true);
this.top=window.getScrollTop()+(window.getHeight()/15);
this.center.setStyles({top:this.top,display:""});
this.fx.overlay.start(0.7);
return this.changeImage(_5a);
},position:function(){
this.overlay.setStyles({top:window.getScrollTop(),height:window.getHeight()});
},setup:function(_5b){
var _5c=$A(document.getElementsByTagName("object"));
_5c.extend(document.getElementsByTagName(window.ie?"select":"embed"));
_5c.each(function(el){
if(_5b){
el.lbBackupStyle=el.style.visibility;
}
el.style.visibility=_5b?"hidden":el.lbBackupStyle;
});
var fn=_5b?"addEvent":"removeEvent";
window[fn]("scroll",this.eventPosition)[fn]("resize",this.eventPosition);
document[fn]("keydown",this.eventKeyDown);
this.step=0;
},keyboardListener:function(_5f){
switch(_5f.keyCode){
case 27:
case 88:
case 67:
this.close();
break;
case 37:
case 38:
case 80:
this.previous();
break;
case 13:
case 32:
case 39:
case 40:
case 78:
this.next();
break;
default:
return;
}
new Event(_5f).stop();
},previous:function(){
return this.changeImage(this.activeImage-1);
},next:function(){
return this.changeImage(this.activeImage+1);
},changeImage:function(_60){
if(this.step||(_60<0)||(_60>=this.images.length)){
return false;
}
this.step=1;
this.activeImage=_60;
this.center.style.backgroundColor="";
this.bottomContainer.style.display=this.prevLink.style.display=this.nextLink.style.display="none";
this.fx.image.hide();
this.center.className="lbLoading";
this.preload=new Image();
this.image.empty().setStyle("overflow","hidden");
if(this.images[_60][2]=="img"){
this.preload.onload=this.nextEffect.bind(this);
this.preload.src=this.images[_60][0];
}else{
this.iframeId="lbFrame_"+new Date().getTime();
this.so=new Element("iframe").setProperties({id:this.iframeId,frameBorder:0,scrolling:"auto",src:this.images[_60][0]}).inject(this.image);
this.nextEffect();
}
return false;
},ajaxFailure:function(){
this.ajaxFailed=true;
this.image.setHTML("").adopt(this.error.clone());
this.nextEffect();
},nextEffect:function(){
switch(this.step++){
case 1:
this.center.className="";
this.caption.empty().adopt(new Element("a",{"href":this.images[this.activeImage][0],"title":"slimbox.directLink".localize()}).setHTML(this.images[this.activeImage][1]||""));
var _61=(this.images[this.activeImage][2]=="img")?"slimbox.info":"slimbox.remoteRequest";
this.number.setHTML((this.images.length==1)?"":_61.localize(this.activeImage+1,this.images.length));
this.image.style.backgroundImage="none";
var w=Math.max(this.options.initialWidth,this.preload.width),h=Math.max(this.options.initialHeight,this.preload.height),ww=Window.getWidth()-10,wh=Window.getHeight()-120;
if(this.images[this.activeImage][2]!="img"&&!this.ajaxFailed){
w=6000;
h=3000;
}
if(w>ww){
h=Math.round(h*ww/w);
w=ww;
}
if(h>wh){
w=Math.round(w*wh/h);
h=wh;
}
this.image.style.width=this.bottom.style.width=w+"px";
this.image.style.height=h+"px";
if(this.images[this.activeImage][2]=="img"){
this.image.style.backgroundImage="url("+this.images[this.activeImage][0]+")";
if(this.activeImage){
this.preloadPrev.src=this.images[this.activeImage-1][0];
}
if(this.activeImage!=(this.images.length-1)){
this.preloadNext.src=this.images[this.activeImage+1][0];
}
this.number.setHTML(this.number.innerHTML+"&nbsp;&nbsp;["+this.preload.width+"&#215;"+this.preload.height+"]");
}else{
this.so.style.width=w+"px";
this.so.style.height=h+"px";
}
if(this.options.animateCaption){
this.bottomContainer.setStyles({height:"0px",display:""});
}
this.fxs.start({"0":{height:[this.image.offsetHeight],width:[this.image.offsetWidth],marginLeft:[-this.image.offsetWidth/2]},"1":{opacity:[1]}});
break;
case 2:
this.image.setStyle("overflow","auto");
this.bottomContainer.setStyles({top:(this.top+this.center.clientHeight)+"px",marginLeft:this.center.style.marginLeft});
if(this.options.animateCaption){
this.fx.bottom.set(-this.bottom.offsetHeight);
this.bottomContainer.style.height="";
this.fx.bottom.start(0);
break;
}
this.bottomContainer.style.height="";
case 3:
if(this.activeImage){
this.prevLink.style.display="";
}
if(this.activeImage!=(this.images.length-1)){
this.nextLink.style.display="";
}
this.step=0;
}
},close:function(){
if(this.step<0){
return;
}
this.step=-1;
if(this.preload){
this.preload.onload=Class.empty;
this.preload=null;
}
for(var f in this.fx){
this.fx[f].stop();
}
this.center.style.display=this.bottomContainer.style.display="none";
this.fx.overlay.chain(this.setup.pass(false,this)).start(0);
return false;
}};
var WikiReflection={onPageLoad:function(){
$$("*[class^=reflection]").each(function(w){
var _68=w.className.split("-");
$ES("img",w).each(function(img){
Reflection.add(img,_68[1],_68[2]);
});
});
}};
var Reflection={options:{height:0.33,opacity:0.5},add:function(img,_6b,_6c){
_6b=(_6b)?_6b/100:this.options.height;
_6c=(_6c)?_6c/100:this.options.opacity;
var div=new Element("div").injectAfter(img).adopt(img),_6e=img.width,_6f=img.height,rH=Math.floor(_6f*_6b);
div.className=img.className.replace(/\breflection\b/,"");
div.style.cssText=img.backupStyle=img.style.cssText;
div.setStyles({"width":img.width,"height":_6f+rH});
img.style.cssText="vertical-align: bottom";
if(window.ie){
new Element("img",{"src":img.src,"styles":{"width":_6e,"marginBottom":"-"+(_6f-rH)+"px","filter":"flipv progid:DXImageTransform.Microsoft.Alpha(opacity="+(_6c*100)+", style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy="+(_6b*100)+")"}}).inject(div);
}else{
var r=new Element("canvas",{"width":_6e,"height":rH,"styles":{"width":_6e,"height":rH}}).inject(div);
if(!r.getContext){
return;
}
var ctx=r.getContext("2d");
ctx.save();
ctx.translate(0,_6f-1);
ctx.scale(1,-1);
ctx.drawImage(img,0,0,_6e,_6f);
ctx.restore();
ctx.globalCompositeOperation="destination-out";
var g=ctx.createLinearGradient(0,0,0,rH);
g.addColorStop(0,"rgba(255, 255, 255, "+(1-_6c)+")");
g.addColorStop(1,"rgba(255, 255, 255, 1.0)");
ctx.fillStyle=g;
ctx.rect(0,0,_6e,rH);
ctx.fill();
}
}};
var QuickLinks={onPageLoad:function(){
if($("previewcontent")||!Wiki.PrefShowQuickLinks){
return;
}
var _74=$$("#pagecontent *[id^=section]");
if(_74.length==0){
return;
}
var ql,_76,_77,_78;
function qql(_79,_7a,_7b,_7c){
var a=new Element("a",{"title":_7a.localize()}).setHTML(_7b);
if(_7c){
a.setProperty("href",_7c);
}
ql.adopt(new Element("span",{"class":_79}).adopt(a));
return (a);
}
ql=new Element("div",{"class":"quicklinks"});
qql("quick2Top","quick.top","&laquo;","#wikibody");
_76=qql("quick2Prev","quick.previous","&lsaquo;");
if(Wiki.PermissioneEdit){
_77=qql("quick2Edit","quick.edit","&bull;");
}
_78=qql("quick2Next","quick.next","&rsaquo;");
qql("quick2Bottom","quick.bottom","&raquo;","#footer");
var _7e=_74.length-1;
_74.each(function(s,i){
_78.setProperty("href",(i==_7e)?"#footer":"#"+_74[i+1].id);
_76.setProperty("href",(i==0)?"#wikibody":"#"+_74[i-1].id);
if(_77){
_77.setProperty("href","Edit.jsp?page="+Wiki.PageName+"&section="+(i+1));
}
s.adopt(ql.clone());
});
}};
var TabbedSection={onPageLoad:function(){
$$(".tabmenu a").each(function(el){
if(el.href){
return;
}
var tab=$(el.id.substr(5));
el.addEvent("click",this.clickTab.bind(tab));
},this);
$$(".tabbedSection").each(function(tt){
tt.addClass("tabs");
var _84=new Element("div",{"class":"tabmenu"}).injectBefore(tt);
tt.getChildren().each(function(tab,i){
if(!tab.className.test("^tab-")){
return;
}
if(!tab.id||(tab.id=="")){
tab.id=tab.className;
}
var _87=tab.className.substr(4).deCamelize();
(i==0)?tab.removeClass("hidetab"):tab.addClass("hidetab");
new Element("div",{"styles":{"clear":"both"}}).inject(tab);
var _88=new Element("a",{"id":"menu-"+tab.id,"events":{"click":this.clickTab.bind(tab)}}).appendText(_87).inject(_84);
if(i==0){
_88.addClass("activetab");
}
},this);
},this);
},clickTab:function(){
var _89=$("menu-"+this.id);
this.getParent().getChildren().some(function(el){
if(el.id){
var m=$("menu-"+el.id);
if(m&&m.hasClass("activetab")){
if(el.id!=this.id){
m.removeClass("activetab");
_89.addClass("activetab");
el.addClass("hidetab");
this.removeClass("hidetab");
}
return true;
}
}
return false;
},this);
}};
var WikiAccordion={onPageLoad:function(){
$$(".accordion, .tabbedAccordion").each(function(tt){
var _8d=[],_8e=[],_8f=false;
if(tt.hasClass("tabbedAccordion")){
_8f=new Element("div",{"class":"togglemenu"}).injectBefore(tt);
}
tt.getChildren().each(function(tab){
if(!tab.className.test("^tab-")){
return;
}
var _91=tab.className.substr(4).deCamelize();
if(_8f){
_8d.push(new Element("div",{"class":"toggle"}).inject(_8f).appendText(_91));
}else{
_8d.push(new Element("div",{"class":"toggle"}).injectBefore(tab).appendText(_91));
}
_8e.push(tab.addClass("tab"));
});
new Accordion(_8d,_8e,{alwaysHide:!_8f,onComplete:function(){
var el=$(this.elements[this.previous]);
if(el.offsetHeight>0){
el.setStyle("height","auto");
}
},onActive:function(_93,_94){
_93.addClass("active");
_94.addClass("active");
},onBackground:function(_95,_96){
_96.setStyle("height",_96["offsetHeight"]);
_95.removeClass("active");
_96.removeClass("active");
}});
});
}};
var SearchBox={onPageLoad:function(){
this.onPageLoadQuickSearch();
this.onPageLoadFullSearch();
},onPageLoadQuickSearch:function(){
var q=$("query");
if(!q){
return;
}
this.query=q;
q.observe(this.ajaxQuickSearch.bind(this));
this.hover=$("searchboxMenu").setProperty("visibility","visible").effect("opacity",{wait:false}).set(0);
$(q.form).addEvent("submit",this.submit.bind(this)).addEvent("mouseout",function(){
this.hover.start(0);
}.bind(this)).addEvent("mouseover",function(){
Wiki.locatemenu(this.query,$("searchboxMenu"));
this.hover.start(0.9);
}.bind(this));
if(window.xwebkit){
q.setProperties({type:"search",autosave:q.form.action,results:"9",placeholder:q.defaultValue});
}else{
$("recentClear").addEvent("click",this.clear.bind(this));
this.recent=Wiki.prefs.get("RecentSearch");
if(!this.recent){
return;
}
var ul=new Element("ul",{"id":"recentItems"}).inject($("recentSearches").show());
this.recent.each(function(el){
new Element("a",{"href":"#","events":{"click":function(){
q.value=el;
q.form.submit();
}}}).setHTML(el).inject(new Element("li").inject(ul));
});
}
},onPageLoadFullSearch:function(){
var q2=$("query2");
if(!q2){
return;
}
this.query2=q2;
var _9b=function(){
var qq=this.query2.value.replace(/^(?:author:|name:|contents:|attachment:)/,"");
this.query2.value=$("scope").getValue()+qq;
this.runfullsearch();
}.bind(this);
q2.observe(this.runfullsearch.bind(this));
$("scope").addEvent("change",_9b);
$("details").addEvent("click",this.runfullsearch.bind(this));
},runfullsearch:function(){
var q2=this.query2.value;
if(!q2||(q2.trim()=="")){
$("searchResult2").empty();
return;
}
$("spin").show();
var _9e=$("scope"),_9f=q2.match(/^(?:author:|name:|contents:|attachment:)/)||"";
$each(_9e.options,function(_a0){
if(_a0.value==_9f){
_a0.selected=true;
}
});
new Ajax(Wiki.TemplateDir+"AJAXSearch.jsp",{postBody:$("searchform2").toQueryString(),update:"searchResult2",method:"post",onComplete:function(){
$("spin").hide();
GraphBar.onPageLoad();
Wiki.prefs.set("PrevQuery",q2);
}}).request();
},submit:function(){
var v=this.query.value;
if(v==this.query.defaultValue){
this.query.value="";
}
if(!this.recent){
this.recent=[];
}
if(!this.recent.test(v)){
if(this.recent.length>9){
this.recent.pop();
}
this.recent.unshift(v);
Wiki.prefs.set("RecentSearch",this.recent);
}
},clear:function(){
this.recent=[];
Wiki.prefs.remove("RecentSearch");
$("recentSearches","recentClear").hide();
},ajaxQuickSearch:function(){
var qv=this.query.value;
if((qv==null)||(qv.trim()=="")||(qv==this.query.defaultValue)){
$("searchOutput").empty();
return;
}
$("searchTarget").setHTML("("+qv+") :");
$("searchSpin").show();
Wiki.jsonrpc("search.findPages",[qv,20],function(_a3){
$("searchSpin").hide();
if(!_a3.list){
return;
}
var _a4=new Element("ul");
_a3.list.each(function(el){
new Element("li").adopt(new Element("a",{"href":Wiki.getUrl(el.map.page)}).setHTML(el.map.page),new Element("span",{"class":"small"}).setHTML(" ("+el.map.score+")")).inject(_a4);
});
$("searchOutput").empty().adopt(_a4);
Wiki.locatemenu($("query"),$("searchboxMenu"));
});
},navigate:function(url,_a7,_a8,_a9){
var p=Wiki.PageName,s=this.query.value;
if(s==this.query.defaultValue){
s="";
}
if(s==""){
s=prompt(_a7,(_a8)?p+"sbox.clone.suffix".localize():p);
if(!s||(s=="")){
return false;
}
}
if(_a8&&(s!=p)){
s+="&clone="+p;
}
if(s==""){
return false;
}
location.href=url.replace("__PAGEHERE__",s);
}};
var WikiColors={HTMLColors:{black:"000000",green:"008000",silver:"C0C0C0",lime:"00FF00",gray:"808080",olive:"808000",white:"FFFFFF",yellow:"FFFF00",maroon:"800000",navy:"000080",red:"FF0000",blue:"0000FF",purple:"800080",teal:"008080",fuchsia:"FF00FF",aqua:"00FFFF"},gradient:function(_ac,_ad,to){
if(_ac<0){
_ac=0;
}
if(_ac>1){
_ac=1;
}
var r=to[0]-_ad[0],g=to[1]-_ad[1],b=to[2]-_ad[2];
return this.asHTML([_ad[0]+r*_ac,_ad[1]+g*_ac,_ad[2]+b*_ac]);
},invert:function(_b2){
_b2=this.parse(_b2);
return ([255-_b2[0],255-_b2[1],255-_b2[2]]);
},parse:function(c){
if(c instanceof Array){
return (c);
}
c=c.toLowerCase();
if(WikiColors.HTMLColors[c]){
c=WikiColors.HTMLColors[c];
}
return c.hexToRgb(true);
},REparseColor:new RegExp("^[0-9a-fA-F]+$"),RErgbFormat:new RegExp("rgb\\((\\d+),\\s*(\\d+),\\s*(\\d+)\\)","i"),_array2hex:function(arr){
s=[];
for(i=0;i<arr.length;i++){
var v=Math.round(arr[i]).toString(16);
if(v.length<2){
s.push("0");
}
s.push(v);
}
return s.join("");
},asHTML:function(c){
var _b7="";
if(c instanceof Array){
_b7=this._array2hex(c.slice(0,3));
}else{
if(this.RErgbFormat.test(c)){
_b7=this._array2hex([RegExp.$1,RegExp.$2,RegExp.$3]);
}else{
_b7=c;
}
}
if(this.REparseColor.test(_b7)){
_b7="#"+_b7;
}
return _b7;
}};
var GraphBar={REclassName:new RegExp("(?:^| )graphBars([^-]*)(-\\S+)?"),onPageLoad:function(){
$$("*[class^=graphBars]").each(function(g){
var _b9=20,_ba=320,_bb=null,_bc=null,_bd=true,_be=false,_bf=false;
GraphBar.REclassName.test(g.className);
var _c0=RegExp.$1;
var _c1=RegExp.$2.toLowerCase().split("-");
for(var pi=0;pi<_c1.length;pi++){
p=_c1[pi];
if(p=="vertical"){
_bd=false;
}else{
if(p=="progress"){
_be=true;
}else{
if(p=="gauge"){
_bf=true;
}else{
if(p.indexOf("min")==0){
_b9=parseInt(p.substr(3),10);
}else{
if(p.indexOf("max")==0){
_ba=parseInt(p.substr(3),10);
}else{
p=WikiColors.parse(p);
if(!_bb){
_bb=p;
}else{
if(!_bc){
_bc=p;
}
}
}
}
}
}
}
}
if(_b9>_ba){
var m=_ba;
_ba=_b9;
_ba=m;
}
if(_be&&!_bb){
_bc="transparent";
}
if((_bf||_be)&&_bb&&!_bc){
_bc=WikiColors.invert(_bb);
}
if(_bb&&!_bc){
_bc=_bb;
}
var _c4=$ES(".gBar"+_c0,g);
if(!_c4&&_c0&&(_c0!="")){
_c4=this.getTableValues(g,_c0);
}
if(!_c4){
return;
}
var _c5=this.parseBarData(_c4,_b9,_ba);
var e=new Element("span",{"class":"graphBar"}).setHTML("&nbsp;");
_c4.each(function(b,j){
var pb=b.getParent();
var n=e.clone();
var nn=null;
var c=null;
if(_bb){
var _cd=(j/(_c4.length-1));
if(_bf){
_cd=(_c5[j]-_b9)/(_ba-_b9);
}
c=WikiColors.gradient(_cd,_bb,_bc);
}
if(_bd){
n.setStyles({"borderLeftStyle":"solid","borderLeftWidth":_c5[j]+"px"});
if(_be){
nn=n.clone();
n.setStyles({"paddingRight":"0","borderLeftWidth":(_ba-_c5[j])+"px","marginLeft":"-1ex"});
if(_bb){
nn.setStyle("borderLeftColor",WikiColors.asHTML(_bb));
}
if(_bc){
n.setStyle("borderLeftColor",WikiColors.asHTML(_bc));
}
}else{
if(c){
n.setStyle("borderLeftColor",c);
}
}
}else{
n.setStyles({"borderBottomStyle":"solid","borderBottomWidth":_c5[j]+"px"});
b.setStyle("position","relative");
if(pb.nodeName=="TD"){
pb=new Element("div").injectWrapper(pb);
}
var _ce=20;
pb.setStyles({"height":(_ba+_ce)+"px","position":"relative"});
if(!_be){
b.setStyle("top",(_ba-_c5[j])+"px");
}
n.setStyles({"position":"absolute","width":"1em","bottom":"0"});
if(_be){
if(_bb){
n.style.borderBottomColor=WikiColors.asHTML(_bb);
}
nn=n.clone().setStyle("borderBottomWidth",_ba+"px");
if(_bc){
nn.setStyle("borderBottomColor",WikiColors.asHTML(_bc));
}
}else{
if(c){
n.setStyle("borderBottomColor",c);
}
}
}
if(nn){
pb.insertBefore(nn,b);
}
pb.insertBefore(n,b);
},this);
e=null;
},this);
},parseBarData:function(_cf,_d0,_d1){
var _d2=[],_d3=_cf.length,_d4=Number.MIN_VALUE,_d5=Number.MAX_VALUE;
var _d6=_d1-_d0;
var _d7=true,_d8=true;
for(var j=0;j<_d3;j++){
var s=$getText(_cf[j]);
_d2[j]=s;
if(_d7){
_d7=!isNaN(parseFloat(s.match(Number.REparsefloat)));
}
if(_d8){
_d8=!isNaN(Date.parse(s));
}
}
for(var j=0;j<_d3;j++){
var k=_d2[j];
if(_d8){
k=new Date(Date.parse(k)).valueOf();
}else{
if(_d7){
k=parseFloat(k.match(Number.REparsefloat));
}
}
_d4=Math.max(_d4,k);
_d5=Math.min(_d5,k);
_d2[j]=k;
}
if(_d4==_d5){
_d4=_d5+1;
}
for(var j=0;j<_d3;j++){
_d2[j]=parseInt((_d6*(_d2[j]-_d5)/(_d4-_d5))+_d0);
}
return _d2;
},getTableValues:function(_dc,_dd){
var _de=$E("table",_dc);
if(!_de){
return null;
}
var _df=_de.rows.length;
if(_df>1){
var r=_de.rows[0];
for(var h=0;h<r.cells.length;h++){
if($getText(r.cells[h]).trim()==_dd){
var _e2=[];
for(var i=1;i<_df;i++){
_e2.push(new Element("span").injectWrapper(_de.rows[i].cells[h]));
}
return _e2;
}
}
}
for(var h=0;h<_df;h++){
var r=_de.rows[h];
if($getText(r.cells[0]).trim()==_dd){
var _e2=[];
for(var i=1;i<r.cells.length;i++){
_e2.push(new Element("span").injectWrapper(r.cells[i]));
}
return _e2;
}
}
return null;
}};
var Collapsible={pims:[],onPageLoad:function(){
this.bullet=new Element("div",{"class":"collapseBullet"}).setHTML("&bull;");
this.initialise("favorites","JSPWikiCollapseFavorites");
this.initialise("pagecontent","JSPWikiCollapse"+Wiki.PageName);
this.initialise("previewcontent","JSPWikiCollapse"+Wiki.PageName);
this.initialise("info");
},initialise:function(_e4,_e5){
_e4=$(_e4);
if(!_e4){
return;
}
this.pims.push({"name":_e5,"value":"","initial":(_e5?Cookie.get(_e5):"")});
$ES(".collapse",_e4).each(function(el){
if($E(".collapseBullet",el)){
return;
}
this.collapseNode(el);
},this);
$ES(".collapsebox,.collapsebox-closed",_e4).each(function(el){
this.collapseBox(el);
},this);
},collapseBox:function(el){
var _e9=el.getFirst();
if(!_e9){
return;
}
var _ea=new Element("div",{"class":"collapsebody"}),_eb=this.bullet.clone(),_ec=el.hasClass("collapsebox-closed");
while(_e9.nextSibling){
_ea.appendChild(_e9.nextSibling);
}
el.appendChild(_ea);
if(_ec){
el.removeClass("collapsebox-closed").addClass("collapsebox");
}
_eb.injectTop(_e9.addClass("collapsetitle"));
this.newBullet(_eb,_ea,!_ec,_e9);
},collapseNode:function(_ed){
$ES("li",_ed).each(function(li){
var _ef=$E("ul",li)||$E("ol",li);
var _f0=true;
for(var n=li.firstChild;n;n=n.nextSibling){
if((n.nodeType==3)&&(n.nodeValue.trim()=="")){
continue;
}
if((n.nodeName=="UL")||(n.nodeName=="OL")){
break;
}
_f0=false;
break;
}
if(_f0){
return;
}
new Element("div",{"class":"collapsebody"}).injectWrapper(li);
var _f2=this.bullet.clone().injectTop(li);
if(_ef){
this.newBullet(_f2,_ef,(_ef.getTag()=="ul"));
}
},this);
},newBullet:function(_f3,_f4,_f5,_f6){
var ck=this.pims.getLast();
_f5=this.parseCookie(_f5);
if(!_f6){
_f6=_f3;
}
var _f8=_f4.setStyle("overflow","hidden").effect("height",{wait:false,onStart:this.renderBullet.bind(_f3),onComplete:function(){
if(_f3.hasClass("collapseOpen")){
_f4.setStyle("height","auto");
}
}});
_f3.className=(_f5?"collapseClose":"collapseOpen");
_f6.addEvent("click",this.clickBullet.bind(_f3,[ck,ck.value.length-1,_f8])).addEvent("mouseenter",function(){
_f6.addClass("collapseHover");
}).addEvent("mouseleave",function(){
_f6.removeClass("collapseHover");
});
_f8.fireEvent("onStart");
if(!_f5){
_f8.set(0);
}
},renderBullet:function(){
if(this.hasClass("collapseClose")){
this.setProperties({"title":"collapse".localize(),"class":"collapseOpen"}).setHTML("-");
}else{
this.setProperties({"title":"expand".localize(),"class":"collapseClose"}).setHTML("+");
}
},clickBullet:function(ck,_fa,_fb){
var _fc=this.hasClass("collapseOpen"),_fd=_fb.element.scrollHeight;
if(_fc){
_fb.start(_fd,0);
}else{
_fb.start(_fd);
}
ck.value=ck.value.substring(0,_fa)+(_fc?"c":"o")+ck.value.substring(_fa+1);
if(ck.name){
Cookie.set(ck.name,ck.value,{path:Wiki.BasePath,duration:20});
}
},parseCookie:function(_fe){
var ck=this.pims.getLast(),_100=ck.value.length,_101=(_fe?"o":"c");
if(ck.initial&&(ck.initial.length>_100)){
var _102=ck.initial.charAt(_100);
if((_fe&&(_102=="c"))||(!_fe&&(_102=="o"))){
_101=_102;
}
if(_101!=_102){
ck.initial=null;
}
}
ck.value+=_101;
return (_101=="o");
}};
var RoundedCorners={NormalTop:[{margin:"5px",height:"1px",borderSide:"0",borderTop:"1px"},{margin:"3px",height:"1px",borderSide:"2px"},{margin:"2px",height:"1px",borderSide:"1px"},{margin:"1px",height:"2px",borderSide:"1px"}],SmallTop:[{margin:"2px",height:"1px",borderSide:"0",borderTop:"1px"},{margin:"1px",height:"1px",borderSide:"1px"}],registry:{},register:function(_103,_104){
this.registry[_103]=_104;
return this;
},onPageLoad:function(){
this.NormalBottom=this.NormalTop.slice(0).reverse();
this.SmallBottom=this.SmallTop.slice(0).reverse();
for(selector in this.registry){
var n=$$(selector);
var _106=this.registry[selector];
this.exec(n,_106[0],_106[1],_106[2],_106[3]);
}
$$("#pagecontent *[class^=roundedCorners]").each(function(el){
var _108=el.className.split("-");
if(_108.length<2){
return;
}
this.exec([el],_108[1],_108[2],_108[3],_108[4]);
},this);
},exec:function(_109,_10a,_10b,_10c,_10d){
_10a=(_10a?_10a+"nnnn":"yyyy");
_10b=(_10b?WikiColors.asHTML(_10b):"transparent");
if(_10c){
_10c=WikiColors.asHTML(_10c);
}
if(_10d){
_10d=WikiColors.asHTML(_10d);
}
var c=_10a.split("");
var _10f=null;
var _110=null;
if(c[0]+c[1]!="nn"){
_10f=document.createElement("b");
_10f.className="roundedCorners";
if((c[0]=="y")||(c[1]=="y")){
this.addCorner(_10f,this.NormalTop,c[0],c[1],_10b,_10c);
}else{
if((c[0]=="s")||(c[1]=="s")){
this.addCorner(_10f,this.SmallTop,c[0],c[1],_10b,_10c);
}
}
}
if(c[2]+c[3]!="nn"){
_110=document.createElement("b");
_110.className="roundedCorners";
if((c[2]=="y")||(c[3]=="y")){
this.addCorner(_110,this.NormalBottom,c[2],c[3],_10b,_10c);
}else{
if((c[2]=="s")||(c[3]=="s")){
this.addCorner(_110,this.SmallBottom,c[2],c[3],_10b,_10c);
}
}
}
if((!_10f)&&(!_10c)&&(!_110)){
return;
}
for(var i=0;i<_109.length;i++){
if(!_109[i]){
continue;
}
this.addBody(_109[i],_10b,_10c);
if(_10f){
_109[i].insertBefore(_10f.cloneNode(true),_109[i].firstChild);
}
if(_110){
_109[i].appendChild(_110.cloneNode(true));
}
}
},addCorner:function(node,arr,left,_115,_116,_117){
for(var i=0;i<arr.length;i++){
var n=document.createElement("div");
n.style.height=arr[i].height;
n.style.overflow="hidden";
n.style.borderWidth="0";
n.style.backgroundColor=_116;
if(_117){
n.style.borderColor=_117;
n.style.borderStyle="solid";
if(arr[i].borderTop){
n.style.borderTopWidth=arr[i].borderTop;
n.style.height="0";
}
}
if(left!="n"){
n.style.marginLeft=arr[i].margin;
}
if(_115!="n"){
n.style.marginRight=arr[i].margin;
}
if(_117){
n.style.borderLeftWidth=(left=="n")?"1px":arr[i].borderSide;
n.style.borderRightWidth=(_115=="n")?"1px":arr[i].borderSide;
}
node.appendChild(n);
}
},addBody:function(node,_11b,_11c){
if(node.passed){
return;
}
var _11d=new Element("div").injectWrapper(node);
_11d.style.padding="0 4px";
_11d.style.backgroundColor=_11b;
if(_11c){
_11d.style.borderLeft="1px solid "+_11c;
_11d.style.borderRight="1px solid "+_11c;
}
node.passed=true;
}};
var Sortable={onPageLoad:function(){
this.DefaultTitle="sort.click".localize();
this.AscendingTitle="sort.ascending".localize();
this.DescendingTitle="sort.descending".localize();
$$(".sortable table").each(function(_11e){
if(_11e.rows.length<2){
return;
}
$A(_11e.rows[0].cells).each(function(th){
th=$(th);
if(th.getTag()!="th"){
return;
}
th.addEvent("click",function(){
Sortable.sort(th);
}).addClass("sort").title=Sortable.DefaultTitle;
});
},this);
},sort:function(th){
var _121=getAncestorByTagName(th,"table"),_122=(_121.filterStack),rows=(_121.sortCache||[]),_124=0,body=$T(_121);
th=$(th);
$A(body.rows[0].cells).each(function(thi,i){
if(thi.getTag()!="th"){
return;
}
if(th==thi){
_124=i;
return;
}
thi.removeClass("sortAscending").removeClass("sortDescending").addClass("sort").title=Sortable.DefaultTitle;
});
if(rows.length==0){
$A(body.rows).each(function(r,i){
if((i==0)||((i==1)&&(_122))){
return;
}
rows.push(r);
});
}
var _12a=Sortable.guessDataType(rows,_124);
if(th.hasClass("sort")){
rows.sort(Sortable.createCompare(_124,_12a));
}else{
rows.reverse();
}
var fl=th.hasClass("sortDescending");
th.removeClass("sort").removeClass("sortAscending").removeClass("sortDescending");
th.addClass(fl?"sortAscending":"sortDescending").title=fl?Sortable.DescendingTitle:Sortable.AscendingTitle;
var frag=document.createDocumentFragment();
rows.each(function(r,i){
frag.appendChild(r);
});
body.appendChild(frag);
_121.sortCache=rows;
if(_121.zebra){
_121.zebra();
}
},guessDataType:function(rows,_130){
var num=date=ip4=euro=true;
rows.each(function(r,i){
var v=$getText(r.cells[_130]).clean().toLowerCase();
if(num){
num=!isNaN(parseFloat(v));
}
if(date){
date=!isNaN(Date.parse(v));
}
if(ip4){
ip4=v.test("(?:\\d{1,3}\\.){3}\\d{1,3}");
}
if(euro){
euro=v.test("^[\xac\xa3$\u201a\xc7\xa8][0-9.,]+");
}
});
return (euro)?"euro":(ip4)?"ip4":(date)?"date":(num)?"num":"string";
},convert:function(val,_136){
switch(_136){
case "num":
return parseFloat(val.match(Number.REparsefloat));
case "euro":
return parseFloat(val.replace(/[^0-9.,]/g,""));
case "date":
return new Date(Date.parse(val));
case "ip4":
var _137=val.split(".");
return parseInt(_137[0])*1000000000+parseInt(_137[1])*1000000+parseInt(_137[2])*1000+parseInt(_137[3]);
default:
return val.toString().toLowerCase();
}
},createCompare:function(i,_139){
return function(row1,row2){
var val1=Sortable.convert($getText(row1.cells[i]),_139);
var val2=Sortable.convert($getText(row2.cells[i]),_139);
if(val1<val2){
return -1;
}else{
if(val1>val2){
return 1;
}else{
return 0;
}
}
};
}};
var TableFilter={onPageLoad:function(){
this.All="filter.all".localize();
this.FilterRow=1;
$$(".table-filter table").each(function(_13e){
if(_13e.rows.length<2){
return;
}
var r=$(_13e.insertRow(TableFilter.FilterRow)).addClass("filterrow");
for(var j=0;j<_13e.rows[0].cells.length;j++){
var s=new Element("select",{"events":{"change":TableFilter.filter}});
s.fcol=j;
new Element("th").adopt(s).inject(r);
}
_13e.filterStack=[];
TableFilter.buildEmptyFilters(_13e);
});
},buildEmptyFilters:function(_142){
for(var i=0;i<_142.rows[0].cells.length;i++){
var ff=_142.filterStack.some(function(f){
return f.fcol==i;
});
if(!ff){
TableFilter.buildFilter(_142,i);
}
}
if(_142.zebra){
_142.zebra();
}
},buildFilter:function(_146,col,_148){
var _149=_146.rows[TableFilter.FilterRow].cells[col].firstChild;
if(!_149){
return;
}
_149.options.length=0;
var rows=[];
$A(_146.rows).each(function(r,i){
if((i==0)||(i==TableFilter.FilterRow)){
return;
}
if(r.style.display=="none"){
return;
}
rows.push(r);
});
rows.sort(Sortable.createCompare(col,Sortable.guessDataType(rows,col)));
_149.options[0]=new Option(this.All,this.All);
var _14d;
rows.each(function(r,i){
var v=$getText(r.cells[col]).clean().toLowerCase();
if(v==_14d){
return;
}
_14d=v;
if(v.length>32){
v=v.substr(0,32)+"...";
}
_149.options[_149.options.length]=new Option(v,_14d);
});
(_149.options.length<=2)?_149.hide():_149.show();
if(_148!=undefined){
_149.value=_148;
}else{
_149.options[0].selected=true;
}
},filter:function(){
var col=this.fcol,_152=this.value,_153=getAncestorByTagName(this,"table");
if(!_153||_153.style.display=="none"){
return;
}
if(_153.filterStack.every(function(f,i){
if(f.fcol!=col){
return true;
}
if(_152==TableFilter.All){
_153.filterStack.splice(i,1);
}else{
f.fValue=_152;
}
return false;
})){
_153.filterStack.push({fValue:_152,fcol:col});
}
$A(_153.rows).each(function(r,i){
r.style.display="";
});
_153.filterStack.each(function(f){
var v=f.fValue,c=f.fcol;
TableFilter.buildFilter(_153,c,v);
var j=0;
$A(_153.rows).each(function(r,i){
if((i==0)||(i==TableFilter.FilterRow)){
return;
}
if(v!=$getText(r.cells[c]).clean().toLowerCase()){
r.style.display="none";
}
});
});
TableFilter.buildEmptyFilters(_153);
}};
var Categories={onPageLoad:function(){
this.jsp=Wiki.TemplateDir+"/AJAXCategories.jsp";
$$(".category a.wikipage").each(function(link){
var page=Wiki.getPageName(link.href),wrap=new Element("span").injectBefore(link).adopt(link),_161=new Element("div",{"class":"categoryPopup"}).inject(wrap),_162=_161.effect("opacity",{wait:false}).set(0);
link.addClass("categoryLink").setProperties({href:"#",title:"Click to show category ["+page+"] ..."}).addEvent("click",function(e){
new Event(e).stop();
new Ajax(Categories.jsp,{postBody:"&page="+page,update:_161,onComplete:function(){
link.setProperty("title","").removeEvent("click");
wrap.addEvent("mouseover",function(e){
_162.start(0.9);
}).addEvent("mouseout",function(e){
_162.start(0);
});
_161.setStyle("left",link.getPosition().x);
_162.start(0.9);
}}).request();
});
});
}};
var WikiTips={onPageLoad:function(){
var tips=[];
$$("*[class^=tip]").each(function(t){
var _168=t.className.split("-");
if(_168.length<=0||_168[0]!="tip"){
return;
}
t.className="tip";
var body=new Element("span").injectWrapper(t).hide();
var _16a=(_168[1])?_168[1].deCamelize():"tip.default.title".localize();
var tt=new Element("span",{"class":"tip-anchor"}).setHTML(_16a).inject(t);
tt.title=_16a+"::";
tt.$tmp={myBody:body};
tips.push(tt);
});
if(tips.length>0){
new Tips(tips,{"className":"tip"});
}
}};
Tips.implement({start:function(el){
this.wrapper.empty();
if(el.$tmp.myTitle){
this.title=new Element("span").inject(new Element("div",{"class":this.options.className+"-title"}).inject(this.wrapper)).setHTML(el.$tmp.myTitle);
}
if(el.$tmp.myText){
this.text=new Element("span").inject(new Element("div",{"class":this.options.className+"-text"}).inject(this.wrapper)).setHTML(el.$tmp.myText);
}
if(el.$tmp.myBody){
el.$tmp.myBody.clone().inject(new Element("div",{"class":this.options.className+"-text"}).inject(this.wrapper)).show();
}
$clear(this.timer);
this.timer=this.show.delay(this.options.showDelay,this);
}});
var WikiColumns={onPageLoad:function(){
var tips=[];
$$("*[class^=columns]").each(function(t){
var _16f=t.className.split("-");
t.className="columns";
WikiColumns.buildColumns(t,_16f[1]||"auto");
});
},buildColumns:function(el,_171){
var _172=$ES("hr",el);
if(!_172||_172.length==0){
return;
}
var _173=_172.length+1;
_171=(_171=="auto")?98/_173+"%":_171/_173+"px";
var _174=new Element("div",{"class":"col","styles":{"width":_171}}),col=_174.clone().injectBefore(el.getFirst()),n;
while(n=col.nextSibling){
if(n.tagName&&n.tagName.toLowerCase()=="hr"){
col=_174.clone();
$(n).replaceWith(col);
continue;
}
col.appendChild(n);
}
new Element("div",{"styles":{"clear":"both"}}).inject(el);
}};
var ZebraTable={onPageLoad:function(){
$$("*[class^=zebra]").each(function(z){
var _178=z.className.split("-"),_179=_178[1].test("table"),c1=$C(_178[1]||""),c2=$C(_178[2]||"");
$ES("table",z).each(function(t){
t.zebra=this.zebrafy.pass([_179,c1,c2],t);
t.zebra();
},this);
},this);
},zebrafy:function(_17d,c1,c2){
var j=0;
$A($T(this).rows).each(function(r,i){
if(i==0||(r.style.display=="none")){
return;
}
if(_17d){
(j++%2==0)?$(r).addClass("odd"):$(r).removeClass("odd");
}else{
$(r).setStyle("background-color",(j++%2==0)?c1:c2);
}
});
}};
var HighlightWord={ReQuery:new RegExp("(?:\\?|&)(?:q|query)=([^&]*)","g"),onPageLoad:function(){
var q=Wiki.prefs.get("PrevQuery");
Wiki.prefs.set("PrevQuery","");
if(!q&&this.ReQuery.test(document.referrer)){
q=RegExp.$1;
}
if(!q){
return;
}
var _184=decodeURIComponent(q);
_184=_184.replace(/\+/g," ");
_184=_184.replace(/\s+-\S+/g,"");
_184=_184.replace(/([\(\[\{\\\^\$\|\)\?\*\.\+])/g,"\\$1");
_184=_184.trim().split(/\s+/).join("|");
this.reMatch=new RegExp("("+_184+")","gi");
this.walkDomTree($("pagecontent"));
},walkDomTree:function(node){
if(!node){
return;
}
var nn=null;
for(var n=node.firstChild;n;n=nn){
nn=n.nextSibling;
this.walkDomTree(n);
}
if(node.nodeType!=3){
return;
}
if(node.parentNode.className=="searchword"){
return;
}
var s=node.innerText||node.textContent||"";
if(!this.reMatch.test(s)){
return;
}
var tmp=new Element("span").setHTML(s.replace(this.reMatch,"<span class='searchword'>$1</span>"));
var f=document.createDocumentFragment();
while(tmp.firstChild){
f.appendChild(tmp.firstChild);
}
node.parentNode.replaceChild(f,node);
}};
var WikiPrettify={onPageLoad:function(){
var els=$$(".prettify pre, .prettify code");
if(!els){
return;
}
els.addClass("prettyprint");
prettyPrint();
}};
window.addEvent("load",function(){
Wiki.onPageLoad();
WikiReflection.onPageLoad();
WikiAccordion.onPageLoad();
TabbedSection.onPageLoad();
QuickLinks.onPageLoad();
Collapsible.onPageLoad();
SearchBox.onPageLoad();
Sortable.onPageLoad();
TableFilter.onPageLoad();
RoundedCorners.onPageLoad();
ZebraTable.onPageLoad();
HighlightWord.onPageLoad();
GraphBar.onPageLoad();
Categories.onPageLoad();
WikiSlimbox.onPageLoad();
WikiTips.onPageLoad();
WikiColumns.onPageLoad();
WikiPrettify.onPageLoad();
});

