Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 410

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 410

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 410

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 410

Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 124

Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 126

Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 127

Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 135
/* yahoo-dom-event.js (31,068), animation.js (13,669), connection.js (11,878), element.js (8,543), dragdrop.js (22,571), json.js (2,734), wikibits.js (8,424), menu.js (9,831), md5.compressed.js (5,234), print.js (4,917), gallery.js (1,387), messaging.js (3,745), general.js (5,695), Mindtouch.util.js (3,079), jquery.min.js (54,221), comments.js (2,599), thickbox.js (12,743), pagebus.js (4,035), rgbcolor.js (8,752), nav.js (33,718) */ stylePath = "/skins/ace/"; _skin_path = "/skins/"; _script_path = "/"; baseHref = "http://wiki.aransalut.net"; _editor_path = "/editor/Xinha"; _editor_url = "/editor/Xinha/core"; _editor_lang = "es"; _editor_skin = ""; var _gallery_sort = "date-desc"; var _total_images = 6; var Browser = new BrowserVersion(); /* --------- YAHOO-DOM-EVENT.JS --------- */ /* Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.5.1 */ if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}");}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var D={},B=arguments;for(var C=0,A=B.length;C=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.5.1",build:"984"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B0){A=H[0];}try{F=K.fn.call(J,A,K.obj);}catch(E){this.lastError=E;}}else{try{F=K.fn.call(J,this.type,H,K.obj);}catch(G){this.lastError=G;}}if(false===F){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var A=this.subscribers.length-1;A>-1;A--){this._delete(A);}this.subscribers=[];return A;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers.splice(A,1);},toString:function(){return"CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var I=[];var J=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39,63276:33,63277:34,25:9};return{POLL_RETRYS:2000,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,startInterval:function(){if(!this._interval){var K=this;var L=function(){K._tryPreloadAttach();};this._interval=setInterval(L,this.POLL_INTERVAL);}},onAvailable:function(P,M,Q,O,N){var K=(YAHOO.lang.isString(P))?[P]:P;for(var L=0;L-1;O--){U=(this.removeListener(L[O],K,T)&&U);}return U;}}if(!T||!T.call){return this.purgeElement(L,false,K);}if("unload"==K){for(O=J.length-1;O>-1;O--){V=J[O];if(V&&V[0]==L&&V[1]==K&&V[2]==T){J.splice(O,1);return true;}}return false;}var P=null;var Q=arguments[3];if("undefined"===typeof Q){Q=this._getCacheIndex(L,K,T);}if(Q>=0){P=I[Q];}if(!L||!P){return false;}if(this.useLegacyEvent(L,K)){var N=this.getLegacyIndex(L,K);var M=E[N];if(M){for(O=0,R=M.length;O0&&F.length>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var L,K,O,N,M=[];for(L=0,K=F.length;L-1;L--){O=F[L];if(!O||!O.id){F.splice(L,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(O,P,R){var M=(YAHOO.lang.isString(O))?this.getEl(O):O;var Q=this.getListeners(M,R),N,K;if(Q){for(N=Q.length-1;N>-1;N--){var L=Q[N];this.removeListener(M,L.type,L.fn);}}if(P&&M&&M.childNodes){for(N=0,K=M.childNodes.length;N-1;M--){L=I[M];if(L){K.removeListener(L[K.EL],L[K.TYPE],L[K.FN],M);}}L=null;}G=null;K._simpleRemove(window,"unload",K._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var K=document.documentElement,L=document.body;if(K&&(K.scrollTop||K.scrollLeft)){return[K.scrollTop,K.scrollLeft];}else{if(L){return[L.scrollTop,L.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(M,N,L,K){M.addEventListener(N,L,(K));};}else{if(window.attachEvent){return function(M,N,L,K){M.attachEvent("on"+N,L);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(M,N,L,K){M.removeEventListener(N,L,(K));};}else{if(window.detachEvent){return function(L,M,K){L.detachEvent("on"+M,K);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener; /* DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller */ if(EU.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var n=document.createElement("p");EU._dri=setInterval(function(){try{n.doScroll("left");clearInterval(EU._dri);EU._dri=null;EU._ready();n=null;}catch(ex){}},EU.POLL_INTERVAL);}else{if(EU.webkit&&EU.webkit<525){EU._dri=setInterval(function(){var rs=document.readyState;if("loaded"==rs||"complete"==rs){clearInterval(EU._dri);EU._dri=null;EU._ready();}},EU.POLL_INTERVAL);}else{EU._simpleAdd(document,"DOMContentLoaded",EU._ready);}}EU._simpleAdd(window,"load",EU._load);EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];if(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT); I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C0)?E:0;}B.Dom.setStyle(this.getEl(),C,E+D);},getAttribute:function(C){var E=this.getEl();var G=B.Dom.getStyle(E,C);if(G!=="auto"&&!this.patterns.offsetUnit.test(G)){return parseFloat(G);}var D=this.patterns.offsetAttribute.exec(C)||[];var H=!!(D[3]);var F=!!(D[2]);if(F||(B.Dom.getStyle(E,"position")=="absolute"&&H)){G=E["offset"+D[0].charAt(0).toUpperCase()+D[0].substr(1)];}else{G=0;}return G;},getDefaultUnit:function(C){if(this.patterns.defaultUnit.test(C)){return"px";}return"";},setRuntimeAttribute:function(D){var I;var E;var F=this.attributes;this.runtimeAttributes[D]={};var H=function(J){return(typeof J!=="undefined");};if(!H(F[D]["to"])&&!H(F[D]["by"])){return false;}I=(H(F[D]["from"]))?F[D]["from"]:this.getAttribute(D);if(H(F[D]["to"])){E=F[D]["to"];}else{if(H(F[D]["by"])){if(I.constructor==Array){E=[];for(var G=0,C=I.length;G0&&isFinite(K)){if(G.currentFrame+K>=J){K=J-(I+1);}G.currentFrame+=K;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(E,D){var F=E.length;var C=[];for(var B=0;B0&&!(L[0] instanceof Array)){L=[L];}else{var K=[];for(M=0,O=L.length;M0){this.runtimeAttributes[P]=this.runtimeAttributes[P].concat(L);}this.runtimeAttributes[P][this.runtimeAttributes[P].length]=I;}else{F.setRuntimeAttribute.call(this,P);}};var B=function(G,I){var H=E.Dom.getXY(this.getEl());G=[G[0]-H[0]+I[0],G[1]-H[1]+I[1]];return G;};var D=function(G){return(typeof G!=="undefined");};E.Motion=A;})();(function(){var D=function(F,E,G,H){if(F){D.superclass.constructor.call(this,F,E,G,H);}};D.NAME="Scroll";var B=YAHOO.util;YAHOO.extend(D,B.ColorAnim);var C=D.superclass;var A=D.prototype;A.doMethod=function(E,H,F){var G=null;if(E=="scroll"){G=[this.method(this.currentFrame,H[0],F[0]-H[0],this.totalFrames),this.method(this.currentFrame,H[1],F[1]-H[1],this.totalFrames)];}else{G=C.doMethod.call(this,E,H,F);}return G;};A.getAttribute=function(E){var G=null;var F=this.getEl();if(E=="scroll"){G=[F.scrollLeft,F.scrollTop];}else{G=C.getAttribute.call(this,E);}return G;};A.setAttribute=function(E,H,G){var F=this.getEl();if(E=="scroll"){F.scrollLeft=H[0];F.scrollTop=H[1];}else{C.setAttribute.call(this,E,H,G);}};B.Scroll=D;})();YAHOO.register("animation",YAHOO.util.Anim,{version:"2.5.1",build:"984"}); /* --------- CONNECTION.JS --------- */ /* Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.5.1 */ YAHOO.util.Connect={_msxml_progid:["Microsoft.XMLHTTP","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],_http_headers:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:"application/x-www-form-urlencoded; charset=UTF-8",_default_form_header:"application/x-www-form-urlencoded",_use_default_xhr_header:true,_default_xhr_header:"XMLHttpRequest",_has_default_headers:true,_default_headers:{},_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,_submitElementValue:null,_hasSubmitListener:(function(){if(YAHOO.util.Event){YAHOO.util.Event.addListener(document,"click",function(B){var A=YAHOO.util.Event.getTarget(B);if(A.nodeName.toLowerCase()=="input"&&(A.type&&A.type.toLowerCase()=="submit")){YAHOO.util.Connect._submitElementValue=encodeURIComponent(A.name)+"="+encodeURIComponent(A.value);}});return true;}return false;})(),startEvent:new YAHOO.util.CustomEvent("start"),completeEvent:new YAHOO.util.CustomEvent("complete"),successEvent:new YAHOO.util.CustomEvent("success"),failureEvent:new YAHOO.util.CustomEvent("failure"),uploadEvent:new YAHOO.util.CustomEvent("upload"),abortEvent:new YAHOO.util.CustomEvent("abort"),_customEvents:{onStart:["startEvent","start"],onComplete:["completeEvent","complete"],onSuccess:["successEvent","success"],onFailure:["failureEvent","failure"],onUpload:["uploadEvent","upload"],onAbort:["abortEvent","abort"]},setProgId:function(A){this._msxml_progid.unshift(A);},setDefaultPostHeader:function(A){if(typeof A=="string"){this._default_post_header=A;}else{if(typeof A=="boolean"){this._use_default_post_header=A;}}},setDefaultXhrHeader:function(A){if(typeof A=="string"){this._default_xhr_header=A;}else{this._use_default_xhr_header=A;}},setPollingInterval:function(A){if(typeof A=="number"&&isFinite(A)){this._polling_interval=A;}},createXhrObject:function(E){var D,A;try{A=new XMLHttpRequest();D={conn:A,tId:E};}catch(C){for(var B=0;B=200&&D<300||D===1223){C=this.createResponseObject(F,B);if(G&&G.success){if(!G.scope){G.success(C);}else{G.success.apply(G.scope,[C]);}}this.successEvent.fire(C);if(F.successEvent){F.successEvent.fire(C);}}else{switch(D){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:C=this.createExceptionObject(F.tId,B,(A?A:false));if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}break;default:C=this.createResponseObject(F,B);if(G&&G.failure){if(!G.scope){G.failure(C);}else{G.failure.apply(G.scope,[C]);}}}this.failureEvent.fire(C);if(F.failureEvent){F.failureEvent.fire(C);}}this.releaseObject(F);C=null;},createResponseObject:function(A,G){var D={};var I={};try{var C=A.conn.getAllResponseHeaders();var F=C.split("\n");for(var E=0;E");if(typeof A=="boolean"){C.src="javascript:false";}}else{C=document.createElement("iframe");C.id=B;C.name=B;}C.style.position="absolute";C.style.top="-1000px";C.style.left="-1000px";document.body.appendChild(C);},appendPostData:function(A){var D=[];var B=A.split("&");for(var C=0;C0){for(var G=0;Gthis.clickPixelThresh||C>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(B&&B.events.b4Drag){B.b4Drag(E);B.fireEvent("b4DragEvent",{e:E});}if(B&&B.events.drag){B.onDrag(E);B.fireEvent("dragEvent",{e:E});}if(B){this.fireEvents(E,false);}}this.stopEvent(E);}},fireEvents:function(U,K){var Z=this.dragCurrent;if(!Z||Z.isLocked()||Z.dragOnly){return ;}var M=YAHOO.util.Event.getPageX(U),L=YAHOO.util.Event.getPageY(U),O=new YAHOO.util.Point(M,L),J=Z.getTargetCoord(O.x,O.y),E=Z.getDragEl(),D=["out","over","drop","enter"],T=new YAHOO.util.Region(J.y,J.x+E.offsetWidth,J.y+E.offsetHeight,J.x),H=[],C={},P=[],a={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var R in this.dragOvers){var c=this.dragOvers[R];if(!this.isTypeOfDD(c)){continue;}if(!this.isOverTarget(O,c,this.mode,T)){a.outEvts.push(c);}H[R]=true;delete this.dragOvers[R];}for(var Q in Z.groups){if("string"!=typeof Q){continue;}for(R in this.ids[Q]){var F=this.ids[Q][R];if(!this.isTypeOfDD(F)){continue;}if(F.isTarget&&!F.isLocked()&&F!=Z){if(this.isOverTarget(O,F,this.mode,T)){C[Q]=true;if(K){a.dropEvts.push(F);}else{if(!H[F.id]){a.enterEvts.push(F);}else{a.overEvts.push(F);}this.dragOvers[F.id]=F;}}}}}this.interactionInfo={out:a.outEvts,enter:a.enterEvts,over:a.overEvts,drop:a.dropEvts,point:O,draggedRegion:T,sourceRegion:this.locationCache[Z.id],validDrop:K};for(var B in C){P.push(B);}if(K&&!a.dropEvts.length){this.interactionInfo.validDrop=false;if(Z.events.invalidDrop){Z.onInvalidDrop(U);Z.fireEvent("invalidDropEvent",{e:U});}}for(R=0;R2000){}else{setTimeout(B._addListeners,10);if(document&&document.body){B._timeoutCount+=1;}}}},handleWasClicked:function(B,D){if(this.isHandle(D,B.id)){return true;}else{var C=B.parentNode;while(C){if(this.isHandle(D,C.id)){return true;}else{C=C.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}(function(){var A=YAHOO.util.Event;var B=YAHOO.util.Dom;YAHOO.util.DragDrop=function(E,C,D){if(E){this.init(E,C,D);}};YAHOO.util.DragDrop.prototype={events:null,on:function(){this.subscribe.apply(this,arguments);},id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isTarget:true,padding:null,dragOnly:false,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,deltaX:0,deltaY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,cursorIsOver:false,overlap:null,b4StartDrag:function(C,D){},startDrag:function(C,D){},b4Drag:function(C){},onDrag:function(C){},onDragEnter:function(C,D){},b4DragOver:function(C){},onDragOver:function(C,D){},b4DragOut:function(C){},onDragOut:function(C,D){},b4DragDrop:function(C){},onDragDrop:function(C,D){},onInvalidDrop:function(C){},b4EndDrag:function(C){},endDrag:function(C){},b4MouseDown:function(C){},onMouseDown:function(C){},onMouseUp:function(C){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=B.get(this.id);}return this._domRef;},getDragEl:function(){return B.get(this.dragElId);},init:function(F,C,D){this.initTarget(F,C,D);A.on(this._domRef||this.id,"mousedown",this.handleMouseDown,this,true);for(var E in this.events){this.createEvent(E+"Event");}},initTarget:function(E,C,D){this.config=D||{};this.events={};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof E!=="string"){this._domRef=E;E=B.generateId(E);}this.id=E;this.addToGroup((C)?C:"default");this.handleElId=E;A.onAvailable(E,this.handleOnAvailable,this,true);this.setDragElId(E);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){this.events={mouseDown:true,b4MouseDown:true,mouseUp:true,b4StartDrag:true,startDrag:true,b4EndDrag:true,endDrag:true,drag:true,b4Drag:true,invalidDrop:true,b4DragOut:true,dragOut:true,dragEnter:true,b4DragOver:true,dragOver:true,b4DragDrop:true,dragDrop:true};if(this.config.events){for(var C in this.config.events){if(this.config.events[C]===false){this.events[C]=false;}}}this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false);this.dragOnly=((this.config.dragOnly===true)?true:false);},handleOnAvailable:function(){this.available=true; this.resetConstraints();this.onAvailable();},setPadding:function(E,C,F,D){if(!C&&0!==C){this.padding=[E,E,E,E];}else{if(!F&&0!==F){this.padding=[E,C,E,C];}else{this.padding=[E,C,F,D];}}},setInitPosition:function(F,E){var G=this.getEl();if(!this.DDM.verifyEl(G)){if(G&&G.style&&(G.style.display=="none")){}else{}return ;}var D=F||0;var C=E||0;var H=B.getXY(G);this.initPageX=H[0]-D;this.initPageY=H[1]-C;this.lastPageX=H[0];this.lastPageY=H[1];this.setStartPosition(H);},setStartPosition:function(D){var C=D||B.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=C[0];this.startPageY=C[1];},addToGroup:function(C){this.groups[C]=true;this.DDM.regDragDrop(this,C);},removeFromGroup:function(C){if(this.groups[C]){delete this.groups[C];}this.DDM.removeDDFromGroup(this,C);},setDragElId:function(C){this.dragElId=C;},setHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.handleElId=C;this.DDM.regHandle(this.id,C);},setOuterHandleElId:function(C){if(typeof C!=="string"){C=B.generateId(C);}A.on(C,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(C);this.hasOuterHandles=true;},unreg:function(){A.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return(this.DDM.isLocked()||this.locked);},handleMouseDown:function(H,G){var D=H.which||H.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(H);if(this.events.b4MouseDown){C=this.fireEvent("b4MouseDownEvent",H);}var E=this.onMouseDown(H);if(this.events.mouseDown){E=this.fireEvent("mouseDownEvent",H);}if((C===false)||(E===false)){return ;}this.DDM.refreshCache(this.groups);var F=new YAHOO.util.Point(A.getPageX(H),A.getPageY(H));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(F,this)){}else{if(this.clickValidator(H)){this.setStartPosition();this.DDM.handleMouseDown(H,this);this.DDM.stopEvent(H);}else{}}},clickValidator:function(D){var C=YAHOO.util.Event.getTarget(D);return(this.isValidHandleChild(C)&&(this.id==this.handleElId||this.DDM.handleWasClicked(C,this.id)));},getTargetCoord:function(E,D){var C=E-this.deltaX;var F=D-this.deltaY;if(this.constrainX){if(Cthis.maxX){C=this.maxX;}}if(this.constrainY){if(Fthis.maxY){F=this.maxY;}}C=this.getTick(C,this.xTicks);F=this.getTick(F,this.yTicks);return{x:C,y:F};},addInvalidHandleType:function(C){var D=C.toUpperCase();this.invalidHandleTypes[D]=D;},addInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}this.invalidHandleIds[C]=C;},addInvalidHandleClass:function(C){this.invalidHandleClasses.push(C);},removeInvalidHandleType:function(C){var D=C.toUpperCase();delete this.invalidHandleTypes[D];},removeInvalidHandleId:function(C){if(typeof C!=="string"){C=B.generateId(C);}delete this.invalidHandleIds[C];},removeInvalidHandleClass:function(D){for(var E=0,C=this.invalidHandleClasses.length;E=this.minX;D=D-C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}for(D=this.initPageX;D<=this.maxX;D=D+C){if(!E[D]){this.xTicks[this.xTicks.length]=D;E[D]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(F,C){this.yTicks=[];this.yTickSize=C;var E={};for(var D=this.initPageY;D>=this.minY;D=D-C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}for(D=this.initPageY;D<=this.maxY;D=D+C){if(!E[D]){this.yTicks[this.yTicks.length]=D;E[D]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(E,D,C){this.leftConstraint=parseInt(E,10);this.rightConstraint=parseInt(D,10);this.minX=this.initPageX-this.leftConstraint;this.maxX=this.initPageX+this.rightConstraint;if(C){this.setXTicks(this.initPageX,C);}this.constrainX=true;},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks();},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0;},setYConstraint:function(C,E,D){this.topConstraint=parseInt(C,10);this.bottomConstraint=parseInt(E,10);this.minY=this.initPageY-this.topConstraint;this.maxY=this.initPageY+this.bottomConstraint;if(D){this.setYTicks(this.initPageY,D);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var D=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var C=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(D,C);}else{this.setInitPosition();}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize);}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize);}},getTick:function(I,F){if(!F){return I;}else{if(F[0]>=I){return F[0];}else{for(var D=0,C=F.length;D=I){var H=I-F[D];var G=F[E]-I;return(G>H)?F[D]:F[E];}}return F[F.length-1];}}},toString:function(){return("DragDrop "+this.id);}};YAHOO.augment(YAHOO.util.DragDrop,YAHOO.util.EventProvider);})();YAHOO.util.DD=function(C,A,B){if(C){this.init(C,A,B);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(C,B){var A=C-this.startPageX;var D=B-this.startPageY;this.setDelta(A,D);},setDelta:function(B,A){this.deltaX=B;this.deltaY=A;},setDragElPos:function(C,B){var A=this.getDragEl();this.alignElWithMouse(A,C,B);},alignElWithMouse:function(C,G,F){var E=this.getTargetCoord(G,F);if(!this.deltaSetXY){var H=[E.x,E.y];YAHOO.util.Dom.setXY(C,H);var D=parseInt(YAHOO.util.Dom.getStyle(C,"left"),10);var B=parseInt(YAHOO.util.Dom.getStyle(C,"top"),10);this.deltaSetXY=[D-E.x,B-E.y];}else{YAHOO.util.Dom.setStyle(C,"left",(E.x+this.deltaSetXY[0])+"px"); YAHOO.util.Dom.setStyle(C,"top",(E.y+this.deltaSetXY[1])+"px");}this.cachePosition(E.x,E.y);var A=this;setTimeout(function(){A.autoScroll.call(A,E.x,E.y,C.offsetHeight,C.offsetWidth);},0);},cachePosition:function(B,A){if(B){this.lastPageX=B;this.lastPageY=A;}else{var C=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=C[0];this.lastPageY=C[1];}},autoScroll:function(J,I,E,K){if(this.scroll){var L=this.DDM.getClientHeight();var B=this.DDM.getClientWidth();var N=this.DDM.getScrollTop();var D=this.DDM.getScrollLeft();var H=E+I;var M=K+J;var G=(L+N-I-this.deltaY);var F=(B+D-J-this.deltaX);var C=40;var A=(document.all)?80:30;if(H>L&&G0&&I-NB&&F0&&J-D=0;--P){if(B[P]===J){return"null";}}B[B.length]=J;S=[];if(R>0){for(P=J.length-1;P>=0;--P){S[P]=G(J[P],T,R-1)||"null";}}B.pop();return"["+S.join(",")+"]";}if(W==="object"){if(!J){return"null";}for(P=B.length-1;P>=0;--P){if(B[P]===J){return"null";}}B[B.length]=J;S=[];if(R>0){if(T){for(P=0,O=0,Q=T.length;P=0?F:1/0;return G(C,K,F);}};YAHOO.register("json",YAHOO.lang.JSON,{version:"2.5.1",build:"984"}); /* --------- WIKIBITS.JS --------- */ /* * MindTouch DekiWiki - a commercial grade open source wiki * derived from MediaWiki (www.mediawiki.org) * Copyright (C) 2006 MindTouch, Inc. * www.mindtouch.com oss@mindtouch.com * * For community documentation and downloads visit www.opengarden.org; * please review the licensing section. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * http://www.gnu.org/copyleft/gpl.html */ //node is the current checkbox function select_checkboxes(node) { //select all checkboxes that is in the same form as this checkbox var boxes = DekiWiki.$("input[@type='checkbox']", DekiWiki.$(node).parents('form')); return node.checked ? boxes.check(): boxes.uncheck(); } // make the specified div a windowed control in IE6 // this masks an iframe (which is a windowed control) onto the div, // turning the div into a windowed control itself function makeWindowed(p_div) { var is_ie6 = document.all && (navigator.userAgent.toLowerCase().indexOf("msie 6.") != -1); if (is_ie6) { var html = ""; if (p_div) p_div.innerHTML += html; // force refresh of div var olddisplay = p_div.style.display; p_div.style.display = 'none'; p_div.style.display = olddisplay; }; } var saveFlag = false; var MTPageLoad = function() {}; MTPageLoad.HookEditSectionIcons = function() { DekiWiki.$("h2.editable,h3.editable,h4.editable,h5.editable,h6.editable", DekiWiki.$("#pageText")) .wrapInner("") .append('
' +''+wfMsg('wikibits-edit-section')+'
' ); HookSectionEditBehavior(); }; var HookSectionEditBehavior = function() { DekiWiki.$("h2.editable,h3.editable,h4.editable,h5.editable,h6.editable", DekiWiki.$("#pageText")) .hover( function() { DekiWiki.$("div.editIcon > a", this).get(0).style.visibility = 'visible'; }, function() { DekiWiki.$("div.editIcon > a", this).get(0).style.visibility = 'hidden'; } ); }; function BrowserVersion(){ BrowserVersion.minInternetExplorerVersion = 6.0; BrowserVersion.minFirefoxVersion = 1.5; BrowserVersion.minCaminoVersion = "1.0"; BrowserVersion.minFlockVersion = "0.5"; this.isIE = false; this.isFF = false; this.isMozilla = false; this.isNS = true; this.isCamino = false; this.isSafari = false; this.isFlock = false; this.version = null; this.isSupported = true; var browserApp = navigator.userAgent; var s = "MSIE"; var i; if((i = browserApp.indexOf(s)) >= 0){ this.isIE = true; this.isNS = false; this.version = parseFloat(browserApp.substr(i+s.length)); if(this.version < BrowserVersion.minInternetExplorerVersion){ this.isSupported = false; } return; } s = "Firefox/"; if((i = browserApp.indexOf(s)) >= 0){ this.isFF = true; this.version = parseFloat(browserApp.substr(i+s.length)); if(this.version < BrowserVersion.minFirefoxVersion){ this.isSupported = false; } return; } s = "SeaMonkey/"; if((i = browserApp.indexOf(s)) >= 0){ this.isMozilla = true; this.isSupported = true; return; } s = "Safari/"; if((i = browserApp.indexOf(s)) >= 0){ this.isSafari = true; this.isSupported = true; return; } s = "Camino/"; if((i = browserApp.indexOf(s)) >= 0){ this.isCamino = true; this.version = browserApp.substr(i+s.length); if(this.version < BrowserVersion.minCaminoVersion){ this.isSupported = false; } return; } s = "Flock/"; if((i = browserApp.indexOf(s)) >= 0){ this.isFlock = true; this.version = browserApp.substr(i+s.length); if(this.version >= BrowserVersion.minFlockVersion){ this.isSupported = true; } return; } s = "Netscape6/"; if((i = browserApp.indexOf(s)) >= 0){ this.isNS = true; this.version = parseFloat(browserApp.substr(i+s.length)); return; } s = "Gecko"; if((i = browserApp.indexOf(s)) >= 0){ this.isNS = true; this.version = 6.1; } }; function showToc(node) { return DWMenu.Position('menuPageContent', node, -2, 0); } /*** * hooks an onclick to all links in the table of contents dropdown which closes the window */ function hookTOCLinks() { DekiWiki.$('.pageToc ol a').click(function() { DWMenu.BodyClick(); }); }; function breadcrumbLoad(z) { document.getElementById('breadcrumb').innerHTML = z; }; function array_search(needle, haystack) { for (var i = 0; i < haystack.length; i++ ) { if (haystack[i] == needle) return i; } return false; }; // in [-]HH:MM format... // won't yet work with non-even tzs function fetchTimezone() { // FIXME: work around Safari bug var localclock = new Date(); // returns negative offset from GMT in minutes var tzRaw = localclock.getTimezoneOffset(); return formatTimezone(tzRaw); }; function formatTimezone(tzSecs) { var tzHour = Math.floor( Math.abs(tzSecs) / 60); var tzMin = Math.abs(tzSecs) % 60; return ((tzSecs >= 0) ? "-" : "") + ((tzHour < 10) ? "0" : "") + tzHour + ":" + ((tzMin < 10) ? "0" : "") + tzMin; }; function openWindow(href,menu) { window.open(href, 'popupwindow', 'width='+(winX - 100)+',height='+(winY - 100)+',scrollbars,resizable' + (menu ? ',menubar=yes' : '')); return false; }; // StepanR: Functions store and check attachments view mode, // that is if revisions are shown or not var gAttachments = new Array(); function SwitchShowMode(aId, aShowRevisions) { gAttachments[aId] = aShowRevisions; } function isShowRevisionsEnabled(aId) { if (gAttachments[aId] != undefined) { return gAttachments[aId]; } return 'false'; } function toggleAttachments(fileId) { DekiWiki.$('#showlink-'+fileId).toggle(); DekiWiki.$('#hidelink-'+fileId).toggle(); DekiWiki.$('#attachTable tr.attach_'+fileId).toggle(); return false; }; function toggleChangesTable(divid) { DekiWiki.$('#showlink-'+divid).toggle(); DekiWiki.$('#hidelink-'+divid).toggle(); DekiWiki.$('table tr.'+divid).toggle(); return false; }; /* blank function for sajax callback */ function cb_blank() {}; function selectSkin(node) { var divs = DekiWiki.$('#styleSelections').find('input').get(); var activeSkin = false; for ( var i = 0; i < divs.length; i++ ) { if (divs[i].name == 'wgActiveSkin') { divs[i].disabled = true; } } var child = DekiWiki.$('#skinStyle'+node.id).find('input').get(); for ( var i = 0; i < child.length; i++ ) { if (child[i].name == 'wgActiveSkin') { child[i].disabled = false; activeSkin = child[i].checked == true; } } if (!activeSkin) { child[0].checked = true; } showPreview(); }; function showPreview() { var child = DekiWiki.$('#styleSelections').find('input').get(); for ( var i = 0; i < child.length; i++ ) { if (child[i].checked == true) { if (child[i].name == 'wgActiveTemplate') { var wgActiveTemplate = child[i].value; } else if (child[i].name == 'wgActiveSkin') { var wgActiveSkin = child[i].value; } } } DekiWiki.$('#previewSkin').html('Skin Preview'); }; /* --------- MENU.JS --------- */ /* * MindTouch DekiWiki - a commercial grade open source wiki * derived from MediaWiki (www.mediawiki.org) * Copyright (C) 2006 MindTouch, Inc. * www.mindtouch.com oss@mindtouch.com * * For community documentation and downloads visit www.opengarden.org; * please review the licensing section. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * http://www.gnu.org/copyleft/gpl.html */ function DWMenu() {}; DWMenu.Bubble = false; DWMenu.Opened = false; DWMenu.OpenedNow = false; DWMenu.Selected = false; DWMenu.LinkClick = function(divid, xoffset) { if (DWMenu.Opened && DWMenu.Opened != divid) DWMenu.Toggle(DWMenu.Opened, xoffset); DWMenu.Toggle(divid, xoffset); }; DWMenu.Toggle = function(divid, xoffset) { var node = DekiWiki.$('#'+divid); //todo nullref var display = node.css('display'); node.toggle(); if (display == 'block') { DWMenu.Opened = false; } else { node.css('visibility', 'hidden'); //for ie6 var dimensions = Mindtouch.util.Dom.getDimensions(node); var position = YAHOO.util.Dom.getXY(node); if (typeof(winX) != 'null') { if ((position[0] + dimensions.width) > (winX - 36)) { if (typeof(offsetX) == 'undefined') offsetX = 0; node.css('left', (position[0] - dimensions.width + offsetX + 5)+'px'); } } node.css('visibility', ''); DWMenu.Opened = divid; DWMenu.OpenedNow = true; } } DWMenu.Position = function (divid, elt, offsetX, offsetY) { if (!document.getElementById(divid)) return; var x = YAHOO.util.Dom.getX(elt); var y = YAHOO.util.Dom.getY(elt); var dimensions = Mindtouch.util.Dom.getDimensions(elt); offsetY = offsetY + dimensions.height; if (typeof(offsetX) == 'number') x = x + offsetX; if (typeof(offsetY) == 'number') y = y + offsetY; DekiWiki.$("#" + divid).css("left", x+'px').css("top", y+'px'); DWMenu.LinkClick(divid, dimensions.width); return false; }; DWMenu.Off = function(divid) { var display = DekiWiki.$('#'+divid).css('display'); if (display == 'block') { DekiWiki.$('#'+divid).toggle(); DWMenu.Opened = false; } }; DWMenu.BodyClick = function() { if (!DWMenu.OpenedNow && !DWMenu.Bubble && DWMenu.Opened) { if (!DWMenu.Selected) { DWMenu.Toggle(DWMenu.Opened); } } if (DWMenu.Bubble) DWMenu.Bubble = false; if (DWMenu.OpenedNow) DWMenu.OpenedNow = false; }; //deprecated var menuLinkClick = function(divid, offsetX) { DWMenu.LinkClick(divid, offsetX); }; var menuToggle = function(navid, offsetX) { DWMenu.Toggle(navid, offsetX); }; var menuPosition = function (navid, elt, offsetX, offsetY) { return DWMenu.Position(navid, elt, offsetX, offsetY); }; var menuOff = function(navid) { DWMenu.Off(navid); }; var menuBodyClick = function() { DWMenu.BodyClick(); }; var FileMenu = { lastOpened : null, //the last opened menu id isOpening : null, openMenu : false, justClosed : false, maxHeight: 132, //max height of the menu minHeight: 1, //min height of the menu; keep at least 1px for IE bodyClick : function() { if (this.isOpening) { this.isOpening = null; return; } if(this.lastOpened) { this.hide(); } return false; }, /*** * */ show : function(node, titleID, attachID, isLoggedIn, showRevisions, areRevisions, reviseURL, isRestricted, inGallery, fullUrl) { this.menuBubble = true; this.isOpening = true; var divFiller = 'menuFiller'; //filler div for filling the menu var divMenu = 'npdmenu_' + titleID; //menu generated by generateMenu() if (this.lastOpened && '_' + titleID != this.lastOpened) { this.hide(); } else if (this.lastOpened) { this.hide(); this.justClosed = true; return false; } this.lastOpened = '_' + titleID; var eltFiller = document.getElementById(divFiller); eltFiller.style.position = 'absolute'; eltFiller.style.left = (YAHOO.util.Dom.getX(node))+'px'; eltFiller.style.top = (YAHOO.util.Dom.getY(node) + 16) + 'px'; //StepanR: I need an attachment name for menu generation function, this actual only for latest revisions. Previous revs already has ids in title var lAttachName = node.parentNode.parentNode.className.substr('attach_'.length); //for IE eltFiller.style.display = ''; //first, generate the new menu eltFiller.appendChild(this.generateMenu(titleID, attachID, isLoggedIn, showRevisions, areRevisions, reviseURL, isRestricted, lAttachName, inGallery, fullUrl)); //calculations need to be done when an element is visible eltFiller.style.display = 'block'; var dimensions = Mindtouch.util.Dom.getDimensions(divMenu); var linkDimensions = Mindtouch.util.Dom.getDimensions(node); var position = YAHOO.util.Dom.getXY(eltFiller); if (typeof(winX) != 'null' && typeof(winY) != 'null') { var pageDimensions = YAHOO.util.Dom.getXY(DekiWiki.$('#bodyHeight').get(0)); var pageHeight = pageDimensions[1]; var extendsRight = (position[0] + dimensions.width) > (winX - 36); var extendsBottom = (position[1] + dimensions.height) > pageHeight; var horizOffset = position[0] - dimensions.width + linkDimensions.width + 5; if (extendsRight) { if (typeof(offsetX) == 'undefined') offsetX = 0; eltFiller.style.left = horizOffset+'px'; } if (extendsBottom) { var vertOffset = position[1] - ((position[1] + dimensions.height) - pageHeight); eltFiller.style.top = vertOffset + 'px'; horizOffset = position[0] + linkDimensions.width; eltFiller.style.left = horizOffset+'px'; } } DekiWiki.$('#'+divMenu).toggle(); menuLinkClick(divMenu, dimensions.width); return false; }, hide: function () { if (this.lastOpened) { var eltMenu = 'npdmenu' + this.lastOpened; var elt = document.getElementById(eltMenu); elt.parentNode.removeChild(elt); menuLinkClick(eltMenu); } this.lastOpened = null; }, generateMenu : function (titleID, attachID, isLoggedIn, showRevisions, areRevisions, reviseURL, isRestricted, lAttachName, inGallery, fullUrl) { function addMenuItem(icon, text, href, onclick, cssClass) { var item = document.createElement('li'); var a = document.createElement('a'); a.href = href; a.className = 'mlink'+(cssClass && cssClass != '' ? ' '+cssClass: ''); item.className = 'mlink'+(cssClass && cssClass != '' ? ' '+cssClass: ''); a.appendChild(iconify(icon+(cssClass && cssClass != '' ? '-'+cssClass: ''))); var span = document.createElement('span'); span.innerHTML = text; span.className = 'text'; a.appendChild(span); if (onclick && isLoggedIn) a.onclick = onclick; item.appendChild(a); menuList.appendChild(item); }; var divid = 'npdmenu_' + titleID; var divMain = document.createElement('div'); divMain.onclick = function () { menuBubble = true; }; divMain.className = 'dmenu'; var divWrap = document.createElement('div'); divWrap.id = divid; divWrap.className = 'dmenu-wrap'; var divTop = document.createElement('div'); divTop.className = 'dmenu-top'; var divBottom = document.createElement('div'); divBottom.className = 'dmenu-bottom'; var divBody = document.createElement('div'); divBody.className = 'dmenu-body'; var menuList = document.createElement('ul'); if (inGallery) { addMenuItem('attachoriginal', wfMsg('menu-view-original'), fullUrl, function () {}, false); } if (isLoggedIn) { addMenuItem('attachedit', wfMsg('menu-edit-description'), '#', function () { if (!isRestricted) { return doPopupEditAttach(_page_ID, attachID); } }, isRestricted ? 'disabled': false); addMenuItem('attachmove', wfMsg('menu-move-file'), '#', function () { if (!isRestricted) { return doPopupMoveAttach(_page_ID, attachID, inGallery); } }, isRestricted ? 'disabled': false); // StepanR: if file revisions are displayed, then we use ids fo deletion. var RevMode = isShowRevisionsEnabled(lAttachName); addMenuItem('attachdel', wfMsg('menu-delete-file'), '#', function() { if (!isRestricted) { if (confirm(wfMsg('menu-confirm-delete'))) { x_wfDeleteFile(attachID, inGallery, function(z) { if (inGallery) { Attachments.SetImageCount(Attachments.GetImageCount() - 1); MTGallery.Refresh(); Attachments.SetCount(); } else { window.location.reload(); } }); } return false; } }, isRestricted ? 'disabled': false); } else { addMenuItem('attachedit', wfMsg('menu-edit-description'), '#', function () { return false; }, 'disabled'); addMenuItem('attachmove', wfMsg('menu-move-file'), '#', function () { return false; }, 'disabled'); addMenuItem('attachdel', wfMsg('menu-delete-file'), '#', function() { return false; }, 'disabled'); } if (showRevisions) { if (areRevisions) { addMenuItem('attachhist', wfMsg('menu-previous-versions'), reviseURL, false, false); } else { addMenuItem('attachhist', wfMsg('menu-previous-versions'), '#', function () { return false;}, 'disabled'); } } divBody.appendChild(menuList); divWrap.appendChild(divTop); divWrap.appendChild(divBody); divWrap.appendChild(divBottom); divMain.appendChild(divWrap); return divMain; } }; /* --------- MD5.COMPRESSED.JS --------- */ var hexcase=0; var b64pad=""; var chrsz=8; function hex_md5(s){ return binl2hex(core_md5(str2binl(s),s.length*chrsz)); } function b64_md5(s){ return binl2b64(core_md5(str2binl(s),s.length*chrsz)); } function str_md5(s){ return binl2str(core_md5(str2binl(s),s.length*chrsz)); } function hex_hmac_md5(_4,_5){ return binl2hex(core_hmac_md5(_4,_5)); } function b64_hmac_md5(_6,_7){ return binl2b64(core_hmac_md5(_6,_7)); } function str_hmac_md5(_8,_9){ return binl2str(core_hmac_md5(_8,_9)); } function core_md5(x,_b){ x[_b>>5]|=128<<((_b)%32); x[(((_b+64)>>>9)<<4)+14]=_b; var a=1732584193; var b=-271733879; var c=-1732584194; var d=271733878; for(var i=0;i16){ _39=core_md5(_39,key.length*chrsz); } var _3a=Array(16),opad=Array(16); for(var i=0;i<16;i++){ _3a[i]=_39[i]^909522486; opad[i]=_39[i]^1549556828; } var _3c=core_md5(_3a.concat(str2binl(_38)),512+_38.length*chrsz); return core_md5(opad.concat(_3c),512+128); } function safe_add(x,y){ var lsw=(x&65535)+(y&65535); var msw=(x>>16)+(y>>16)+(lsw>>16); return (msw<<16)|(lsw&65535); } function bit_rol(num,cnt){ return (num<>>(32-cnt)); } function str2binl(str){ var bin=Array(); var _45=(1<>5]|=(str.charCodeAt(i/chrsz)&_45)<<(i%32); } return bin; } function binl2str(bin){ var str=""; var _49=(1<>5]>>>(i%32))&_49); } return str; } function binl2hex(_4b){ var _4c=hexcase?"0123456789ABCDEF":"0123456789abcdef"; var str=""; for(var i=0;i<_4b.length*4;i++){ str+=_4c.charAt((_4b[i>>2]>>((i%4)*8+4))&15)+_4c.charAt((_4b[i>>2]>>((i%4)*8))&15); } return str; } function binl2b64(_4f){ var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var str=""; for(var i=0;i<_4f.length*4;i+=3){ var _53=(((_4f[i>>2]>>8*(i%4))&255)<<16)|(((_4f[i+1>>2]>>8*((i+1)%4))&255)<<8)|((_4f[i+2>>2]>>8*((i+2)%4))&255); for(var j=0;j<4;j++){ if(i*8+j*6>_4f.length*32){ str+=b64pad; }else{ str+=tab.charAt((_53>>6*(3-j))&63); } } } return str; } /* --------- PRINT.JS --------- */ /* * MindTouch DekiWiki - a commercial grade open source wiki * derived from MediaWiki (www.mediawiki.org) * Copyright (C) 2006 MindTouch, Inc. * www.mindtouch.com oss@mindtouch.com * * For community documentation and downloads visit www.opengarden.org; * please review the licensing section. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * http://www.gnu.org/copyleft/gpl.html */ var Print = { open : function(href, menu) { window.open(href, 'popupwindow', 'width='+600+',height='+winY+'' + (menu ? ',menubar=yes' : '')+',resizable=yes,scrollbars=yes'); return false; }, doPrint : function () { window.print(); // the first time you print in firefox (or mozilla), immediately executing parent.close() will // result in the page just closing with no print; oddly, if you open the print dialogue again, // the document will print then close the window correctly // setting a timeout on the close allows the browser to popup the "print" dialogue before parent.close() //window.setTimeout("Print.doClose()", 2000); }, doClose : function () { window.close(); }, createEndnotes : function () { var elt = document.getElementById('pageText'); var endnotes = ''; var j = 0; var Browser = new BrowserVersion(); var links = elt.getElementsByTagName('a'); for (i = 0; i < links.length; i++ ) { if (links[i].getAttribute('href')) { if (Browser.isIE && Browser.version < 7) { if (links[i].innerHTML == ' ') { continue; } } j++; var sup = document.createElement('sup'); sup.className = 'endnotes'; sup.innerHTML = j; links[i].appendChild(sup); endnotes += ''+(j)+' '+links[i].getAttribute('href')+'
'; } } var div = document.createElement('div'); div.setAttribute('id', 'endnotes'); div.setAttribute('class', 'print-toc'); elt.appendChild(div); div.innerHTML = '
'+wfMsg('print-end-notes')+'
'+endnotes+'
'; }, changeEndnotesDisplay : function () { var displayType = document.getElementById('printOptLinks').checked; var endnotes = document.getElementsByTagName('sup'); for (i = 0; i < endnotes.length; i++ ) { if (endnotes[i].className == 'endnotes') endnotes[i].style.display = displayType ? 'inline': 'none'; } var endnotesBody = document.getElementById('endnotes'); if (endnotesBody) endnotesBody.style.display = displayType ? 'block' : 'none'; }, changeFooterDisplay : function () { if (document.getElementById('printOptFooter').checked) DekiWiki.$("#printfooter").css("display", "block"); else DekiWiki.$("#printfooter").css("display", "none"); }, changeTocDisplay : function () { if (document.getElementById('printOptToc').checked) DekiWiki.$("#pageToc").css("display", "block"); else DekiWiki.$("#pageToc").css("display", "none"); }, onBodyLoad : function () { Print.createEndnotes(); Print.changeEndnotesDisplay(); Print.changeTocDisplay(); Print.changeFooterDisplay(); }, showPreferences: function(node) { var prefsnode = document.getElementById('printPrefs'); if (!prefsnode) return; if (prefsnode.style.display == 'none') { DekiWiki.$("#pageContent").addClass("prefsToggledOn"); prefsnode.style.display = 'block'; node.className = 'showPrintPrefs'; } else { DekiWiki.$("#pageContent").removeClass("prefsToggledOn"); prefsnode.style.display = 'none'; node.className = 'hidePrintPrefs'; } }, toggleEndnotes : function() { Print.changeEndnotesDisplay(); x_wfSetUserOption('printlinks', document.getElementById('printOptLinks').checked ? '1': 'null', function(returned) {}); }, toggleFooter : function() { Print.changeFooterDisplay(); x_wfSetUserOption('printfooter', document.getElementById('printOptFooter').checked ? '1': 'null', function(returned) {}); }, toggleToc : function() { Print.changeTocDisplay(); x_wfSetUserOption('printtoc', document.getElementById('printOptToc').checked ? '1': 'null', function(returned) {}); } }; function saveToPDF (page) { window.location = page + '&action=export&type=pdf'; } /* --------- GALLERY.JS --------- */ function MTGallery() {}; MTGallery.Offset = 0; MTGallery.PageID = 0; MTGallery.SortBy = _gallery_sort; MTGallery.FileID = 0; MTGallery.Next = function() { MTGallery.Offset = MTGallery.Offset + _total_images; return MTGallery.Show(); }; MTGallery.Back = function() { MTGallery.Offset = MTGallery.Offset - _total_images; return MTGallery.Show(); }; MTGallery.Refresh = function() { return MTGallery.Show(); }; MTGallery.ShowAll = function(showingRevisions) { MTGallery.Offset = -1; if (showingRevisions) { MTGallery.FileID = 0; } return MTGallery.Show(); }; MTGallery.ShowRevisions = function(FileID) { MTGallery.Offset = -1; MTGallery.SortBy = 'date-desc'; MTGallery.FileID = FileID; MTGallery.Show(); MTGallery.FileID = 0; return false; }; MTGallery.Sort = function(node) { MTGallery.SortBy = node.value; return MTGallery.Show(); }; MTGallery.Show = function() { if (MTGallery.PageID == 0) { MTGallery.PageID = _page_ID; } x_wfInlineImageGallery(MTGallery.PageID, MTGallery.Offset, MTGallery.SortBy, MTGallery.FileID, function(z) { if (!DekiWiki.$('#pageGallery').get(0)) return; DekiWiki.$('#pageGallery').html(z); MTGallery.ReloadViewHooks(); }); return false; }; MTGallery.ReloadViewHooks = function() { tb_init('#pageGallery a.lightbox');//pass where to apply thickbox imgLoader = new Image();// preload image imgLoader.src = tb_pathToImage; } /* --------- MESSAGING.JS --------- */ /*** * MindTouch Messaging * Outputs success/error messages that autoclose */ var MTMessage = function () {}; MTMessage.Active = false; MTMessage.DefaultTimerValue = 6; MTMessage.TimeValue = MTMessage.DefaultTimerValue; MTMessage.Timer = false; MTMessage.Show = function(headerText, bodyText, msgType, detailsArray) { if (MTMessage.Active) return; if (typeof(msgType) == 'undefined') msgType = 'ui-errormsg'; MTMessage.Active = true; MTMessage.SetHeader(headerText); MTMessage.SetBody(bodyText); if (typeof(detailsArray) == 'undefined' || detailsArray == '') { document.getElementById('MTMessageDetailsLink').style.display = 'none'; } else { MTMessage.SetDetails(detailsArray); } var node = document.getElementById('MTMessage'); document.getElementById('MTMessageStyle').className = 'ui-msg '+msgType; document.getElementById('MTMessage').style.display = 'block'; YAHOO.util.Dom.setStyle('MTMessage', 'opacity', 1); document.getElementById('MTMessageUnpaused').style.display = 'inline'; document.getElementById('MTMessagePaused').style.display = 'none'; document.getElementById('MTMessage').onmouseover = function() { if (MTMessage.Timer) MTMessage.PauseTimer(); }; MTMessage.GoTimer(); return false; }; MTMessage.Hide = function() { MTMessage.TimeValue = MTMessage.DefaultTimerValue; if (Browser.isIE && Browser.version < 7) { document.getElementById('MTMessage').style.display = 'none'; MTMessage.Active = false; return false; } var anim = new YAHOO.util.Anim('MTMessage', { opacity: { to: 0 } }, 1, YAHOO.util.Easing.easeOut); anim.onComplete.subscribe(function () { document.getElementById('MTMessage').style.display = 'none'; MTMessage.Active = false; }); anim.animate(); return false; }; MTMessage.PauseTimer = function() { MTMessage.Timer = false; document.getElementById('MTMessageUnpaused').style.display = 'none'; document.getElementById('MTMessagePaused').style.display = 'inline'; }; MTMessage.UnPauseTimer = function() { document.getElementById('MTMessageUnpaused').style.display = 'inline'; document.getElementById('MTMessagePaused').style.display = 'none'; MTMessage.GoTimer(); }; MTMessage.GoTimer = function() { MTMessage.Timer = true; MTMessage.TimeValue = MTMessage.DefaultTimerValue; MTMessage.TimerValue(MTMessage.TimeValue); }; MTMessage.TimerValue = function() { if (!MTMessage.Timer) return; MTMessage.TimeValue = MTMessage.TimeValue - 1; document.getElementById('MTMessageTimer').innerHTML = MTMessage.TimeValue+' '; if ((MTMessage.TimeValue) < 1) { MTMessage.Hide(); } else { setTimeout("MTMessage.TimerValue("+(MTMessage.TimeValue)+")", 1000); } }; MTMessage.SetHeader = function(val) { document.getElementById('MTMessageHeader').innerHTML = val; }; MTMessage.SetBody = function(val) { document.getElementById('MTMessageDesc').innerHTML = val; }; MTMessage.ShowDetails = function(anode) { document.getElementById('MTMessageDetails').style.display = 'block'; document.getElementById('MTMessageTextarea').select(); anode.parentNode.innerHTML = anode.innerHTML; //remove link }; MTMessage.SetDetails = function(val) { var node, container; container = document.getElementById('MTMessageDetails'); node = document.getElementById('MTMessageTextarea'); // remove the previous message's details if ( node ) { container.removeChild(node); } node = document.createElement('textarea'); node.id = 'MTMessageTextarea'; node.className = 'ui-msgtextarea'; node.setAttribute('readonly', 'true'); node.value = eval(val); container.appendChild(node); }; /* --------- GENERAL.JS --------- */ String.prototype.utf8ToCodepoint = function() { var z = this.charCodeAt(0), length; if (z & 0x80) { length = 0; while (z & 0x80) { length++; z <<= 1; } } else length = 1; if (length != this.length) return false; if (length == 1) return z; // Mask off the length-determining bits and shift back to the original location z &= 0xff; z >>= length; // Add in the free bits from subsequent bytes for ( var i=1; i < length; i++ ) { z <<= 6; z |= this.charCodeAt(i) & 0x3f; } return z; }; String.prototype.utf8ToString = function() { var val = this.replace(/[\xc0-\xfd][\x80-\xbf]*/g, function(s) { return String.fromCharCode(s.utf8ToCodepoint()); });; return val; }; String.prototype.utf8URL = function() { var val = this.replace(/[ \?%\+&=#\.\u0080-\uFFFF]/g, function(s) { switch (s) { case ' ': return '_'; // case ' ': return '%20'; case '+': return '%2B'; default: return escape(String.charToUtf8(s.charCodeAt(0))); } }); return val; }; String.prototype.utf8 = function() { var val = this.replace(/[\u0080-\uFFFF]/g, function(s) { return String.charToUtf8(s.charCodeAt(0)); }); return val; }; String.charToUtf8 = function(codepoint) { if(codepoint < 0x80) return String.fromCharCode(codepoint); if(codepoint < 0x800) return String.fromCharCode( codepoint >> 6 & 0x3f | 0xc0, codepoint & 0x3f | 0x80); if(codepoint < 0x10000) return String.fromCharCode( codepoint >> 12 & 0x0f | 0xe0, codepoint >> 6 & 0x3f | 0x80, codepoint & 0x3f | 0x80); if(codepoint < 0x110000) return String.fromCharCode( codepoint >> 18 & 0x07 | 0xf0, codepoint >> 12 & 0x3f | 0x80, codepoint >> 6 & 0x3f | 0x80, codepoint & 0x3f | 0x80); // There should be no assigned code points outside this range, but return String.fromCharCode(codepoint); }; var winX = null; var winY = null; clientWindow = function () { if (self.innerHeight) { winX = self.innerWidth; winY = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { winX = document.documentElement.clientWidth; winY = document.documentElement.clientHeight; } else if (document.body) { winX = document.body.clientWidth; winY = document.body.clientHeight; } }; function mt_gen() { } /*** * takes a string and escapes single quotes and encodes html */ mt_gen.htmlspecialchars = function(str) { // performs HTML encoding of some given string mt_gen.htmlEncode_regEx = [ new RegExp().compile(/&/ig), new RegExp().compile(//ig), new RegExp().compile(/'/ig), new RegExp().compile(/\xA0/g), // \x22 means '"' -- we use hex reprezentation so that we don't disturb // JS compressors (well, at least mine fails.. ;) new RegExp().compile(/\x22/g), // special encode none-ASCII new RegExp().compile(/[\x80-\xFF]/g) ]; mt_gen.htmlEncode_regExR = [ "&", "<", ">", "\\'", " ", """, function(s,b){return "&#"+s.charCodeAt(0)+";";} ]; if(typeof str.replace == 'undefined') str = str.toString(); for (var i = 0; i < mt_gen.htmlEncode_regEx.length; ++i) str = str.replace(mt_gen.htmlEncode_regEx[i], mt_gen.htmlEncode_regExR[i]); return str; }; mt_gen.getUrlFromName = function(href) { href = mt_gen.extractName(href).replace(/ /g,'_'); if (href.indexOf('&') > 0 || href.indexOf('?') > 0 || href.indexOf('+') > 0 || href.indexOf('#') > 0 || href.indexOf('\\') > 0 || href.indexOf('//') > 0 || href.indexOf('%') > 0 ) href = 'index.php?title=' + encodeURIComponent(href); return '/' + href; }; mt_gen.extractName = function(href) { if (href.charAt(0) == '/') href = href.substr(1); if (href.indexOf('index.php?title=') == 0) href = href.substr('index.php?title='.length); href = href.replace(/&action=.+$/i, ''); try { href = unescape(href); } catch (e) {} return href; }; function iconify(icon_class, parentClass) { if (!parentClass) parentClass = 'icon'; var span = document.createElement('span'); span.className = parentClass; var img = document.createElement('img'); img.src = '/skins/common/icons/icon-trans.gif'; if (typeof(icon_class) != 'undefined' && icon_class != '') { img.className = icon_class; } span.appendChild(img); return span; }; //returns an XML document function encode_xml(data, outer) { var result = ''; if (typeof(data) == 'object') { for (key in data) { var value = data[key]; if (strncmp(value,'@',1) == 0) { } else { var tag = outer != null ? outer: key; if (is_numeric_array(value)) { result += encode_xml(value, key); } else if (typeof(value) == 'object') { var attrs = ''; for (attr_key in value) { var attr_value = value[attr_key]; if(strncmp(attr_key, '@', 1) == 0) { attrs += ' '+attr_key.substr(0, 1)+ '="'+mt_gen.htmlspecialchars(attr_value)+'"'; } } result += '<' + tag + attrs + '>' + encode_xml(value) + ''+"\n"; } else if (tag != '#text') { result += '<' + tag + '>' + encode_xml(value) + ''; } else { result += mt_gen.htmlspecialchars(value); } } } } else if (typeof(data) == 'string') { result = mt_gen.htmlspecialchars(data); } else { result = data; } return result; } function strncmp(str1, str2, len) { if (typeof(str1) != 'string' || typeof(str2) != 'string') { return 1; } return str1.substr(0, len) == str2 ? 0: 1; //not exactly like PHP implementation, but returns 0 if true } function is_numeric_array(data) { var construct = data.constructor; return construct == Array; } /* --------- MINDTOUCH.UTIL.JS --------- */ if (typeof DekiWiki == "undefined") { var DekiWiki = {}; } DekiWiki.url = {}; DekiWiki.url.encode = function(plaintext) { // The Javascript escape and unescape functions do not correspond // with what browsers actually do... var SAFECHARS = "0123456789" + // Numeric "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + // Alphabetic "abcdefghijklmnopqrstuvwxyz" + "-_.!~*'()"; // RFC2396 Mark characters var HEX = "0123456789ABCDEF"; var encoded = ""; for (var i = 0; i < plaintext.length; i++ ) { var ch = plaintext.charAt(i); if (ch == " ") { encoded += "+"; // x-www-urlencoded, rather than %20 } else if (SAFECHARS.indexOf(ch) != -1) { encoded += ch; } else { var charCode = ch.charCodeAt(0); if (charCode > 255) { encoded += "+"; } else { encoded += "%"; encoded += HEX.charAt((charCode >> 4) & 0xF); encoded += HEX.charAt(charCode & 0xF); } } } // for return encoded; } DekiWiki.util = {}; DekiWiki.util.Dom = {}; DekiWiki.util.Dom.getDimensions = function(element) { var region = YAHOO.util.Dom.getRegion(element); var width = region.right - region.left; var height = region.bottom - region.top; return {"width": width, "height": height}; } DekiWiki.util.Dom.getText = function(node) { if(typeof(node.innerText) != 'undefined') { return node.innerText; } else { return node.textContent; } } DekiWiki.util.Dom.setInnerHTML = function (el, html) { el = YAHOO.util.Dom.get(el); if (!el || typeof html !== 'string') { return null; } // Break circular references. (function (o) { var a = o.attributes, i, l, n, c; if (a) { l = a.length; for (i = 0; i < l; i += 1) { n = a[i].name; if (typeof o[n] === 'function') { o[n] = null; } } } a = o.childNodes; if (a) { l = a.length; for (i = 0; i < l; i += 1) { c = o.childNodes[i]; // Purge child nodes. arguments.callee(c); // Removes all listeners attached to the element via YUI's addListener. YAHOO.util.Event.purgeElement(c); } } })(el); // Remove scripts from HTML string, and set innerHTML property el.innerHTML = html.replace(/]*>((.|[\r\n])*?)<\\?\/script>/ig, ""); // Return a reference to the first child return el.firstChild; }; DekiWiki.util.Dom.setInnerText = function(el, text) { if(typeof(el.innerText) != 'undefined') el.innerText = text; else el.textContent = text; }; DekiWiki.publish = function(c,d) { window.PageBus.publish(c,d); }; DekiWiki.subscribe = function(c,o,f,d) { window.PageBus.subscribe(c,o,f,d) }; DekiWiki.hasValue = function(v, d) { return (v != 'undefined') && (v != null) && (v != '') ? v : ((typeof d != 'undefined') ? d : null); }; if (typeof Mindtouch == "undefined") { var Mindtouch = {}; } //transition var Mindtouch = DekiWiki; /* --------- JQUERY.MIN.JS --------- */ /* * jQuery 1.2.3 - New Wave Javascript * * Copyright (c) 2008 John Resig (jquery.com) * Dual licensed under the MIT (MIT-LICENSE.txt) * and GPL (GPL-LICENSE.txt) licenses. * * $Date: 2008-02-06 00:21:25 -0500 (Wed, 06 Feb 2008) $ * $Rev: 4663 $ */ (function(){if(window.jQuery)var _jQuery=window.jQuery;var jQuery=window.jQuery=function(selector,context){return new jQuery.prototype.init(selector,context);};if(window.$)var _$=window.$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;var isSimple=/^.[^:#\[\.]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;return this;}else if(typeof selector=="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1])selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem)if(elem.id!=match[3])return jQuery().find(selector);else{this[0]=elem;this.length=1;return this;}else selector=[];}}else return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.3",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(elems){var ret=jQuery(elems);ret.prevObject=this;return ret;},setArray:function(elems){this.length=0;Array.prototype.push.apply(this,elems);return this;},each:function(callback,args){return jQuery.each(this,callback,args);},index:function(elem){var ret=-1;this.each(function(i){if(this==elem)ret=i;});return ret;},attr:function(name,value,type){var options=name;if(name.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],name)||undefined;else{options={};options[name]=value;}return this.each(function(i){for(name in options)jQuery.attr(type?this.style:this,name,jQuery.prop(this,options[name],type,i,name));});},css:function(key,value){if((key=='width'||key=='height')&&parseFloat(value)<0)value=undefined;return this.attr(key,value,"curCSS");},text:function(text){if(typeof text!="object"&&text!=null)return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(text));var ret="";jQuery.each(text||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)ret+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return ret;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,false,function(elem){if(this.nodeType==1)this.appendChild(elem);});},prepend:function(){return this.domManip(arguments,true,true,function(elem){if(this.nodeType==1)this.insertBefore(elem,this.firstChild);});},before:function(){return this.domManip(arguments,false,false,function(elem){this.parentNode.insertBefore(elem,this);});},after:function(){return this.domManip(arguments,false,true,function(elem){this.parentNode.insertBefore(elem,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(selector){var elems=jQuery.map(this,function(elem){return jQuery.find(selector,elem);});return this.pushStack(/[^+>] [^+>]/.test(selector)||selector.indexOf("..")>-1?jQuery.unique(elems):elems);},clone:function(events){var ret=this.map(function(){if(jQuery.browser.msie&&!jQuery.isXMLDoc(this)){var clone=this.cloneNode(true),container=document.createElement("div");container.appendChild(clone);return jQuery.clean([container.innerHTML])[0];}else return this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){if(this.nodeType==3)return;var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(selector){return this.pushStack(jQuery.isFunction(selector)&&jQuery.grep(this,function(elem,i){return selector.call(elem,i);})||jQuery.multiFilter(selector,this));},not:function(selector){if(selector.constructor==String)if(isSimple.test(selector))return this.pushStack(jQuery.multiFilter(selector,this,true));else selector=jQuery.multiFilter(selector,this);var isArrayLike=selector.length&&selector[selector.length-1]!==undefined&&!selector.nodeType;return this.filter(function(){return isArrayLike?jQuery.inArray(this,selector)<0:this!=selector;});},add:function(selector){return!selector?this:this.pushStack(jQuery.merge(this.get(),selector.constructor==String?jQuery(selector).get():selector.length!=undefined&&(!selector.nodeName||jQuery.nodeName(selector,"form"))?selector:[selector]));},is:function(selector){return selector?jQuery.multiFilter(selector,this).length>0:false;},hasClass:function(selector){return this.is("."+selector);},val:function(value){if(value==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,values=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,value)>=0);else if(jQuery.nodeName(this,"select")){var values=value.constructor==Array?value:[value];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,values)>=0||jQuery.inArray(this.text,values)>=0);});if(!values.length)this.selectedIndex=-1;}else this.value=value;});},html:function(value){return value==undefined?(this.length?this[0].innerHTML:null):this.empty().append(value);},replaceWith:function(value){return this.after(value).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},data:function(key,value){var parts=key.split(".");parts[1]=parts[1]?"."+parts[1]:"";if(value==null){var data=this.triggerHandler("getData"+parts[1]+"!",[parts[0]]);if(data==undefined&&this.length)data=jQuery.data(this[0],key);return data==null&&parts[1]?this.data(parts[0]):data;}else return this.trigger("setData"+parts[1]+"!",[parts[0],value]).each(function(){jQuery.data(this,key,value);});},removeData:function(key){return this.each(function(){jQuery.removeData(this,key);});},domManip:function(args,table,reverse,callback){var clone=this.length>1,elems;return this.each(function(){if(!elems){elems=jQuery.clean(args,this.ownerDocument);if(reverse)elems.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(elems[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(this.ownerDocument.createElement("tbody"));var scripts=jQuery([]);jQuery.each(elems,function(){var elem=clone?jQuery(this).clone(true)[0]:this;if(jQuery.nodeName(elem,"script")){scripts=scripts.add(elem);}else{if(elem.nodeType==1)scripts=scripts.add(jQuery("script",elem).remove());callback.call(obj,elem);}});scripts.each(evalScript);});}};jQuery.prototype.init.prototype=jQuery.prototype;function evalScript(i,elem){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},i=1,length=arguments.length,deep=false,options;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};i=2;}if(typeof target!="object"&&typeof target!="function")target={};if(length==1){target=this;i=0;}for(;i-1;}},swap:function(elem,options,callback){var old={};for(var name in options){old[name]=elem.style[name];elem.style[name]=options[name];}callback.call(elem);for(var name in options)elem.style[name]=old[name];},css:function(elem,name,force){if(name=="width"||name=="height"){var val,props={position:"absolute",visibility:"hidden",display:"block"},which=name=="width"?["Left","Right"]:["Top","Bottom"];function getWH(){val=name=="width"?elem.offsetWidth:elem.offsetHeight;var padding=0,border=0;jQuery.each(which,function(){padding+=parseFloat(jQuery.curCSS(elem,"padding"+this,true))||0;border+=parseFloat(jQuery.curCSS(elem,"border"+this+"Width",true))||0;});val-=Math.round(padding+border);}if(jQuery(elem).is(":visible"))getWH();else jQuery.swap(elem,props,getWH);return Math.max(0,val);}return jQuery.curCSS(elem,name,force);},curCSS:function(elem,name,force){var ret;function color(elem){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(elem,null);return!ret||ret.getPropertyValue("color")=="";}if(name=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(jQuery.browser.opera&&name=="display"){var save=elem.style.outline;elem.style.outline="0 solid black";elem.style.outline=save;}if(name.match(/float/i))name=styleFloat;if(!force&&elem.style&&elem.style[name])ret=elem.style[name];else if(document.defaultView&&document.defaultView.getComputedStyle){if(name.match(/float/i))name="float";name=name.replace(/([A-Z])/g,"-$1").toLowerCase();var getComputedStyle=document.defaultView.getComputedStyle(elem,null);if(getComputedStyle&&!color(elem))ret=getComputedStyle.getPropertyValue(name);else{var swap=[],stack=[];for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(var i=0;i]*?)\/>/g,function(all,front,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?all:front+">";});var tags=jQuery.trim(elem).toLowerCase(),div=context.createElement("div");var wrap=!tags.indexOf("",""]||!tags.indexOf("",""]||tags.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!tags.indexOf("",""]||(!tags.indexOf("",""]||!tags.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+elem+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){var tbody=!tags.indexOf(""&&tags.indexOf("=0;--j)if(jQuery.nodeName(tbody[j],"tbody")&&!tbody[j].childNodes.length)tbody[j].parentNode.removeChild(tbody[j]);if(/^\s/.test(elem))div.insertBefore(context.createTextNode(elem.match(/^\s*/)[0]),div.firstChild);}elem=jQuery.makeArray(div.childNodes);}if(elem.length===0&&(!jQuery.nodeName(elem,"form")&&!jQuery.nodeName(elem,"select")))return;if(elem[0]==undefined||jQuery.nodeName(elem,"form")||elem.options)ret.push(elem);else ret=jQuery.merge(ret,elem);});return ret;},attr:function(elem,name,value){if(!elem||elem.nodeType==3||elem.nodeType==8)return undefined;var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,""+value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter&&elem.filter.indexOf("opacity=")>=0?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(all,letter){return letter.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(text){return(text||"").replace(/^\s+|\s+$/g,"");},makeArray:function(array){var ret=[];if(typeof array!="array")for(var i=0,length=array.length;i*",this).remove();while(this.firstChild)this.removeChild(this.firstChild);}},function(name,fn){jQuery.fn[name]=function(){return this.each(fn,arguments);};});jQuery.each(["Height","Width"],function(i,name){var type=name.toLowerCase();jQuery.fn[type]=function(size){return this[0]==window?jQuery.browser.opera&&document.body["client"+name]||jQuery.browser.safari&&window["inner"+name]||document.compatMode=="CSS1Compat"&&document.documentElement["client"+name]||document.body["client"+name]:this[0]==document?Math.max(Math.max(document.body["scroll"+name],document.documentElement["scroll"+name]),Math.max(document.body["offset"+name],document.documentElement["offset"+name])):size==undefined?(this.length?jQuery.css(this[0],type):null):this.css(type,size.constructor==String?size:size+"px");};});var chars=jQuery.browser.safari&&parseInt(jQuery.browser.version)<417?"(?:[\\w*_-]|\\\\.)":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)",quickChild=new RegExp("^>\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":function(a,i,m){return m[2]=="*"||jQuery.nodeName(a,m[2]);},"#":function(a,i,m){return a.getAttribute("id")==m[2];},":":{lt:function(a,i,m){return im[3]-0;},nth:function(a,i,m){return m[3]-0==i;},eq:function(a,i,m){return m[3]-0==i;},first:function(a,i){return i==0;},last:function(a,i,m,r){return i==r.length-1;},even:function(a,i){return i%2==0;},odd:function(a,i){return i%2;},"first-child":function(a){return a.parentNode.getElementsByTagName("*")[0]==a;},"last-child":function(a){return jQuery.nth(a.parentNode.lastChild,1,"previousSibling")==a;},"only-child":function(a){return!jQuery.nth(a.parentNode.lastChild,2,"previousSibling");},parent:function(a){return a.firstChild;},empty:function(a){return!a.firstChild;},contains:function(a,i,m){return(a.textContent||a.innerText||jQuery(a).text()||"").indexOf(m[3])>=0;},visible:function(a){return"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden";},hidden:function(a){return"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden";},enabled:function(a){return!a.disabled;},disabled:function(a){return a.disabled;},checked:function(a){return a.checked;},selected:function(a){return a.selected||jQuery.attr(a,"selected");},text:function(a){return"text"==a.type;},radio:function(a){return"radio"==a.type;},checkbox:function(a){return"checkbox"==a.type;},file:function(a){return"file"==a.type;},password:function(a){return"password"==a.type;},submit:function(a){return"submit"==a.type;},image:function(a){return"image"==a.type;},reset:function(a){return"reset"==a.type;},button:function(a){return"button"==a.type||jQuery.nodeName(a,"button");},input:function(a){return/input|select|textarea|button/i.test(a.nodeName);},has:function(a,i,m){return jQuery.find(m[3],a).length;},header:function(a){return/h\d/i.test(a.nodeName);},animated:function(a){return jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length;}}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&context.nodeType!=1&&context.nodeType!=9)return[];context=context||document;var ret=[context],done=[],last,nodeName;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var merge={};nodeName=m[2].toUpperCase();m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=isSimple.test(m[3])?jQuery.filter(m[3],r,true).r:jQuery(r).not(m[3]);else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"0n+"+m[3]||m[3]),first=(test[1]+(test[2]||1))-0,last=test[3]-0;for(var i=0,rl=r.length;i=0)add=true;if(add^not)tmp.push(node);}r=tmp;}else{var fn=jQuery.expr[m[1]];if(typeof fn=="object")fn=fn[m[2]];if(typeof fn=="string")fn=eval("false||function(a,i){return "+fn+";}");r=jQuery.grep(r,function(elem,i){return fn(elem,i,m,r);},not);}}return{r:r,t:t};},dir:function(elem,dir){var matched=[];var cur=elem[dir];while(cur&&cur!=document){if(cur.nodeType==1)matched.push(cur);cur=cur[dir];}return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])if(cur.nodeType==1&&++num==result)break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))r.push(n);}return r;}});jQuery.event={add:function(elem,types,handler,data){if(elem.nodeType==3||elem.nodeType==8)return;if(jQuery.browser.msie&&elem.setInterval!=undefined)elem=window;if(!handler.guid)handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}var events=jQuery.data(elem,"events")||jQuery.data(elem,"events",{}),handle=jQuery.data(elem,"handle")||jQuery.data(elem,"handle",function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)return val;val=jQuery.event.handle.apply(arguments.callee.elem,arguments);return val;});handle.elem=elem;jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];handler.type=parts[1];var handlers=events[type];if(!handlers){handlers=events[type]={};if(!jQuery.event.special[type]||jQuery.event.special[type].setup.call(elem)===false){if(elem.addEventListener)elem.addEventListener(type,handle,false);else if(elem.attachEvent)elem.attachEvent("on"+type,handle);}}handlers[handler.guid]=handler;jQuery.event.global[type]=true;});elem=null;},guid:1,global:{},remove:function(elem,types,handler){if(elem.nodeType==3||elem.nodeType==8)return;var events=jQuery.data(elem,"events"),ret,index;if(events){if(types==undefined||(typeof types=="string"&&types.charAt(0)=="."))for(var type in events)this.remove(elem,type+(types||""));else{if(types.type){handler=types.handler;types=types.type;}jQuery.each(types.split(/\s+/),function(index,type){var parts=type.split(".");type=parts[0];if(events[type]){if(handler)delete events[type][handler.guid];else for(handler in events[type])if(!parts[1]||events[type][handler].type==parts[1])delete events[type][handler];for(ret in events[type])break;if(!ret){if(!jQuery.event.special[type]||jQuery.event.special[type].teardown.call(elem)===false){if(elem.removeEventListener)elem.removeEventListener(type,jQuery.data(elem,"handle"),false);else if(elem.detachEvent)elem.detachEvent("on"+type,jQuery.data(elem,"handle"));}ret=null;delete events[type];}}});}for(ret in events)break;if(!ret){var handle=jQuery.data(elem,"handle");if(handle)handle.elem=null;jQuery.removeData(elem,"events");jQuery.removeData(elem,"handle");}}},trigger:function(type,data,elem,donative,extra){data=jQuery.makeArray(data||[]);if(type.indexOf("!")>=0){type=type.slice(0,-1);var exclusive=true;}if(!elem){if(this.global[type])jQuery("*").add([window,document]).trigger(type,data);}else{if(elem.nodeType==3||elem.nodeType==8)return undefined;var val,ret,fn=jQuery.isFunction(elem[type]||null),event=!data[0]||!data[0].preventDefault;if(event)data.unshift(this.fix({type:type,target:elem}));data[0].type=type;if(exclusive)data[0].exclusive=true;if(jQuery.isFunction(jQuery.data(elem,"handle")))val=jQuery.data(elem,"handle").apply(elem,data);if(!fn&&elem["on"+type]&&elem["on"+type].apply(elem,data)===false)val=false;if(event)data.shift();if(extra&&jQuery.isFunction(extra)){ret=extra.apply(elem,val==null?data:data.concat(val));if(ret!==undefined)val=ret;}if(fn&&donative!==false&&val!==false&&!(jQuery.nodeName(elem,'a')&&type=="click")){this.triggered=true;try{elem[type]();}catch(e){}}this.triggered=false;}return val;},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var parts=event.type.split(".");event.type=parts[0];var handlers=jQuery.data(this,"events")&&jQuery.data(this,"events")[event.type],args=Array.prototype.slice.call(arguments,1);args.unshift(event);for(var j in handlers){var handler=handlers[j];args[0].handler=handler;args[0].data=handler.data;if(!parts[1]&&!event.exclusive||handler.type==parts[1]){var ret=handler.apply(this,args);if(val!==false)val=ret;if(ret===false){event.preventDefault();event.stopPropagation();}}}if(jQuery.browser.msie)event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target)event.target=event.srcElement||document;if(event.target.nodeType==3)event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var doc=document.documentElement,body=document.body;event.pageX=event.clientX+(doc&&doc.scrollLeft||body&&body.scrollLeft||0)-(doc.clientLeft||0);event.pageY=event.clientY+(doc&&doc.scrollTop||body&&body.scrollTop||0)-(doc.clientTop||0);}if(!event.which&&((event.charCode||event.charCode===0)?event.charCode:event.keyCode))event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)event.metaKey=event.ctrlKey;if(!event.which&&event.button)event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;},special:{ready:{setup:function(){bindReady();return;},teardown:function(){return;}},mouseenter:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseover",jQuery.event.special.mouseenter.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseover",jQuery.event.special.mouseenter.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseenter";return jQuery.event.handle.apply(this,arguments);}},mouseleave:{setup:function(){if(jQuery.browser.msie)return false;jQuery(this).bind("mouseout",jQuery.event.special.mouseleave.handler);return true;},teardown:function(){if(jQuery.browser.msie)return false;jQuery(this).unbind("mouseout",jQuery.event.special.mouseleave.handler);return true;},handler:function(event){if(withinElement(event,this))return true;arguments[0].type="mouseleave";return jQuery.event.handle.apply(this,arguments);}}}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data,fn){return this.each(function(){jQuery.event.trigger(type,data,this,true,fn);});},triggerHandler:function(type,data,fn){if(this[0])return jQuery.event.trigger(type,data,this[0],false,fn);return undefined;},toggle:function(){var args=arguments;return this.click(function(event){this.lastToggle=0==this.lastToggle?1:0;event.preventDefault();return args[this.lastToggle].apply(this,arguments)||false;});},hover:function(fnOver,fnOut){return this.bind('mouseenter',fnOver).bind('mouseleave',fnOut);},ready:function(fn){bindReady();if(jQuery.isReady)fn.call(document,jQuery);else jQuery.readyList.push(function(){return fn.call(this,jQuery);});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}jQuery(document).triggerHandler("ready");}}});var readyBound=false;function bindReady(){if(readyBound)return;readyBound=true;if(document.addEventListener&&!jQuery.browser.opera)document.addEventListener("DOMContentLoaded",jQuery.ready,false);if(jQuery.browser.msie&&window==top)(function(){if(jQuery.isReady)return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}jQuery.ready();})();if(jQuery.browser.opera)document.addEventListener("DOMContentLoaded",function(){if(jQuery.isReady)return;for(var i=0;i=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,dataType:"html",data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);self.each(callback,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null,username:null,password:null,accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},ajax:function(s){var jsonp,jsre=/=\?(&|$)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=(s.data+"").replace(jsre,"="+jsonp+"$1");s.url=s.url.replace(jsre,"="+jsonp+"$1");s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}if(head)head.removeChild(script);};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get"){var ts=(new Date()).getTime();var ret=s.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+ts+"$2");s.url=ret+((ret==s.url)?(s.url.match(/\?/)?"&":"?")+"_="+ts:"");}if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if((!s.url.indexOf("http")||!s.url.indexOf("//"))&&s.dataType=="script"&&s.type.toLowerCase()=="get"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(s.scriptCharset)script.charset=s.scriptCharset;if(!jsonp){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return undefined;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async,s.username,s.password);try{if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");xml.setRequestHeader("Accept",s.dataType&&s.accepts[s.dataType]?s.accepts[s.dataType]+", */*":s.accepts._default);}catch(e){}if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||r.status==1223||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock||"";if(jQuery.css(this,"display")=="none"){var elem=jQuery("<"+this.tagName+" />").appendTo("body");this.style.display=elem.css("display");if(this.style.display=="none")this.style.display="block";elem.remove();}}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var optall=jQuery.speed(speed,easing,callback);return this[optall.queue===false?"each":"queue"](function(){if(this.nodeType!=1)return false;var opt=jQuery.extend({},optall);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)||(type&&type.constructor==Array)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(clearQueue,gotoEnd){var timers=jQuery.timers;if(clearQueue)this.queue([]);this.each(function(){for(var i=timers.length-1;i>=0;i--)if(timers[i].elem==this){if(gotoEnd)timers[i](true);timers.splice(i,1);}});if(!gotoEnd)this.dequeue();return this;}});var queue=function(elem,type,array){if(!elem)return undefined;type=type||"fx";var q=jQuery.data(elem,type+"queue");if(!q||array)q=jQuery.data(elem,type+"queue",array?jQuery.makeArray(array):[]);return q;};jQuery.fn.dequeue=function(type){type=type||"fx";return this.each(function(){var q=queue(this,type);q.shift();if(q.length)q[0].apply(this);});};jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){if(opt.queue!==false)jQuery(this).dequeue();if(jQuery.isFunction(opt.old))opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},timers:[],timerId:null,fx:function(elem,options,prop){this.options=options;this.elem=elem;this.prop=prop;if(!options.orig)options.orig={};}});jQuery.fx.prototype={update:function(){if(this.options.step)this.options.step.apply(this.elem,[this.now,this]);(jQuery.fx.step[this.prop]||jQuery.fx.step._default)(this);if(this.prop=="height"||this.prop=="width")this.elem.style.display="block";},cur:function(force){if(this.elem[this.prop]!=null&&this.elem.style[this.prop]==null)return this.elem[this.prop];var r=parseFloat(jQuery.css(this.elem,this.prop,force));return r&&r>-10000?r:parseFloat(jQuery.curCSS(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(gotoEnd){return self.step(gotoEnd);}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timerId==null){jQuery.timerId=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var parent=elem.parentNode,offsetChild=elem,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522&&!/adobeair/i.test(userAgent),fixed=jQuery.css(elem,"position")=="fixed";if(elem.getBoundingClientRect){var box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));add(-doc.documentElement.clientLeft,-doc.documentElement.clientTop);}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&!/^t(able|d|h)$/i.test(offsetParent.tagName)||safari&&!safari2)border(offsetParent);if(!fixed&&jQuery.css(offsetParent,"position")=="fixed")fixed=true;offsetChild=/^body$/i.test(offsetParent.tagName)?offsetChild:offsetParent;offsetParent=offsetParent.offsetParent;}while(parent&&parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if((safari2&&(fixed||jQuery.css(offsetChild,"position")=="absolute"))||(mozilla&&jQuery.css(offsetChild,"position")!="absolute"))add(-doc.body.offsetLeft,-doc.body.offsetTop);if(fixed)add(Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));}results={top:top,left:left};}function border(elem){add(jQuery.curCSS(elem,"borderLeftWidth",true),jQuery.curCSS(elem,"borderTopWidth",true));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}return results;};})(); //initialize jQuery into the MindTouch namespace if(typeof DekiWiki == "undefined") { var DekiWiki = {}; } DekiWiki.$ = jQuery.noConflict(); /* --------- COMMENTS.JS --------- */ function MTComments() {}; MTComments.ViewingAll = false; MTComments.HookBehavior = function() { MTComments.HookSubmitOnclick(); }; //will make adding comments an inline experience MTComments.HookSubmitOnclick = function() { DekiWiki.$('#commentSubmit').click(function() { var cn = document.getElementById('wpCommentNum'); if (cn && cn.value > 0) { return; } MTComments.PostComment(); return false; }); }; MTComments.PostComment = function(commentnum) { x_postComment(_page_ID, document.getElementById('wpComment').value, MTComments.ViewingAll, commentnum, function(t) { MTComments.SetComment(t); return false; }); }; MTComments.ShowComment = function(commentnum) { var commentform = document.getElementById('commentTextForm'+commentnum); var commenttext = document.getElementById('commentText'+commentnum); if (!commentform || !commenttext) return false; commenttext.style.display = 'block'; commentform.style.display = 'none'; }; MTComments.EditComment = function(commentnum) { var commentform = document.getElementById('commentTextForm'+commentnum); var commenttext = document.getElementById('commentText'+commentnum); if (!commentform || !commenttext) return false; //if the comment form hasn't already been loaded if (commentform.innerHTML == '') { x_editComment(_page_ID, commentnum, function(t) { commentform.innerHTML = t; //hook behavior to cancel link DekiWiki.$('#wpComment').focus(); document.getElementById('commentCancel'+commentnum).onclick = function() { MTComments.ShowComment(commentnum); return false; }; document.getElementById('commentSubmit').onclick = function() { MTComments.PostComment(commentnum); return false; }; }); } commenttext.style.display = 'none'; commentform.style.display = 'block'; return false; }; MTComments.DeleteComment = function(commentnum) { if (confirm(wfMsg('comment-delete'))) { x_deleteComment(_page_ID, commentnum, function(t) { document.getElementById('comment'+commentnum).innerHTML = t; return false; }); } return false; }; MTComments.GetComments = function(commentcount) { if (commentcount == 'all') { MTComments.ViewingAll = true; } x_getComments(_page_ID, commentcount, function(t) { MTComments.SetComment(t); return false; }); return false; }; MTComments.SetComment = function(markup) { document.getElementById('comments').innerHTML = markup; new MTComments.HookBehavior; }; //hook is in /skins/common/javascript.php /* --------- THICKBOX.JS --------- */ /* * Thickbox 3.1 - One Box To Rule Them All. * By Cody Lindley (http://www.codylindley.com) * Copyright (c) 2007 cody lindley * Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php */ var tb_pathToImage = "/skins/common/jquery/thickbox/loadingAnimation.gif"; /*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/ //on page load call tb_init //moved to /skins/common/javascript.php //add thickbox to href & area elements that have a class of .thickbox function tb_init(domChunk){ DekiWiki.$(domChunk).unbind('onclick'); DekiWiki.$(domChunk).click(function(){ var t = this.title || this.name || null; var a = this.href || this.alt; var g = this.rel || false; tb_show(t,a,g); this.blur(); return false; }); } function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link try { if (typeof document.body.style.maxHeight === "undefined") {//if IE 6 DekiWiki.$("body","html").css({height: "100%", width: "100%"}); DekiWiki.$("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 DekiWiki.$("body").append("
"); DekiWiki.$("#TB_overlay").click(tb_remove); } }else{//all others if(document.getElementById("TB_overlay") === null){ DekiWiki.$("body").append("
"); DekiWiki.$("#TB_overlay").click(tb_remove); } } if(tb_detectMacXFF()){ DekiWiki.$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ DekiWiki.$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} DekiWiki.$("body").append("
");//add loader to the page DekiWiki.$('#TB_load').show();//show loader var baseURL; if(url.indexOf("?")!==-1){ //ff there is a query string involved baseURL = url.substr(0, url.indexOf("?")); }else{ baseURL = url; } var urlString = /\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/; var urlType = baseURL.toLowerCase().match(urlString); if(imageGroup || urlType == '.jpg' || urlType == '.jpeg' || urlType == '.png' || urlType == '.gif' || urlType == '.bmp'){//code to show images TB_PrevCaption = ""; TB_PrevURL = ""; TB_PrevHTML = ""; TB_NextCaption = ""; TB_NextURL = ""; TB_NextHTML = ""; TB_imageCount = ""; TB_FoundURL = false; if(imageGroup){ TB_TempArray = DekiWiki.$("a[@rel="+imageGroup+"]").get(); for (TB_Counter = 0; ((TB_Counter < TB_TempArray.length) && (TB_NextHTML === "")); TB_Counter++) { var urlTypeTemp = TB_TempArray[TB_Counter].href.toLowerCase().match(urlString); if (!(TB_TempArray[TB_Counter].href == url)) { if (TB_FoundURL) { TB_NextCaption = TB_TempArray[TB_Counter].title; TB_NextURL = TB_TempArray[TB_Counter].href; TB_NextHTML = ''+wfMsg('gallery-next')+' »'; } else { TB_PrevCaption = TB_TempArray[TB_Counter].title; TB_PrevURL = TB_TempArray[TB_Counter].href; TB_PrevHTML = '« '+wfMsg('gallery-prev')+''; } } else { TB_FoundURL = true; TB_imageCount = " Image " + (TB_Counter + 1) +" of "+ (TB_TempArray.length) + ' '; } } } if (TB_PrevHTML == '') { TB_PrevHTML = '« '+wfMsg('gallery-prev')+''; } if (TB_NextHTML == '') { TB_NextHTML = ''+wfMsg('gallery-next')+' »'; } imgPreloader = new Image(); imgPreloader.onload = function(){ imgPreloader.onload = null; // Resizing large images - orginal by Christian Montoya edited by me. var pagesize = tb_getPageSize(); var x = pagesize[0] - 150; var y = pagesize[1] - 150; var imageWidth = imgPreloader.width; var imageHeight = imgPreloader.height; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; } } else if (imageHeight > y) { imageWidth = imageWidth * (y / imageHeight); imageHeight = y; if (imageWidth > x) { imageHeight = imageHeight * (x / imageWidth); imageWidth = x; } } // End Resizing TB_WIDTH = imageWidth + 30; TB_HEIGHT = imageHeight + 60; // karena: IE doesn't support min-width if ( TB_WIDTH < 250 && jQuery.browser.msie && jQuery.browser.version < 7 ) { TB_WIDTH = 250; } DekiWiki.$("#TB_window").append("
"+ '
'+TB_PrevHTML + ' ' + TB_NextHTML + '
' + TB_imageCount + "
"+caption+"" + "
"+caption+"
"); DekiWiki.$("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if(DekiWiki.$(document).unbind("click",goPrev)){DekiWiki.$(document).unbind("click",goPrev);} DekiWiki.$("#TB_window").remove(); DekiWiki.$("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } DekiWiki.$("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext(){ DekiWiki.$("#TB_window").remove(); DekiWiki.$("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } DekiWiki.$("#TB_next").click(goNext); } document.onkeydown = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } else if(keycode == 190){ // display previous image if(!(TB_NextHTML == "")){ document.onkeydown = ""; goNext(); } } else if(keycode == 188){ // display next image if(!(TB_PrevHTML == "")){ document.onkeydown = ""; goPrev(); } } }; tb_position(); DekiWiki.$("#TB_load").remove(); DekiWiki.$("#TB_ImageOff").click(tb_remove); DekiWiki.$("#TB_window").css({display:"block"}); //for safari using css instead of show }; imgPreloader.src = url; }else{//code to show html var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); TB_WIDTH = (params['width']*1) + 30 || (typeof(winX) == 'undefined' ? 630: winX * .90); //defaults to 630 if no paramaters were added to URL TB_HEIGHT = (params['height']*1) + 40 || (typeof(winY) == 'undefined' ? 440: winY * .90); //defaults to 440 if no paramaters were added to URL ajaxContentW = TB_WIDTH - 30; ajaxContentH = TB_HEIGHT - 45; if(url.indexOf('TB_iframe') != -1){// either iframe or ajax window urlNoQuery = url.split('TB_'); DekiWiki.$("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal DekiWiki.$("#TB_window").append(""); }else{//iframe modal DekiWiki.$("#TB_overlay").unbind(); DekiWiki.$("#TB_window").append(""); } }else{// not an iframe, ajax if(DekiWiki.$("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){//ajax no modal DekiWiki.$("#TB_window").append("
"); }else{//ajax modal DekiWiki.$("#TB_overlay").unbind(); DekiWiki.$("#TB_window").append("
"); } }else{//this means the window is already up, we are just loading new content via ajax DekiWiki.$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; DekiWiki.$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; DekiWiki.$("#TB_ajaxContent")[0].scrollTop = 0; DekiWiki.$("#TB_ajaxWindowTitle").html(caption); } } DekiWiki.$("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline') != -1){ DekiWiki.$("#TB_ajaxContent").append(DekiWiki.$('#' + params['inlineId']).children()); DekiWiki.$("#TB_window").unload(function () { DekiWiki.$('#' + params['inlineId']).append( DekiWiki.$("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); DekiWiki.$("#TB_load").remove(); DekiWiki.$("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if($.browser.safari){//safari needs help because it will not fire iframe onload DekiWiki.$("#TB_load").remove(); DekiWiki.$("#TB_window").css({display:"block"}); } }else{ DekiWiki.$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method tb_position(); DekiWiki.$("#TB_load").remove(); tb_init("#TB_ajaxContent a.lightbox"); DekiWiki.$("#TB_window").css({display:"block"}); }); } } if(!params['modal']){ document.onkeyup = function(e){ if (e == null) { // ie keycode = event.keyCode; } else { // mozilla keycode = e.which; } if(keycode == 27){ // close tb_remove(); } }; } } catch(e) { //nothing here } } //helper functions below function tb_showIframe(){ DekiWiki.$("#TB_load").remove(); DekiWiki.$("#TB_window").css({display:"block"}); } function tb_remove() { DekiWiki.$("#TB_imageOff").unbind("click"); DekiWiki.$("#TB_closeWindowButton").unbind("click"); DekiWiki.$("#TB_window").fadeOut("fast",function(){DekiWiki.$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); DekiWiki.$("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 DekiWiki.$("body","html").css({height: "auto", width: "auto"}); DekiWiki.$("html").css("overflow",""); } document.onkeydown = ""; document.onkeyup = ""; return false; } function tb_position() { DekiWiki.$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6 DekiWiki.$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); } } function tb_parseQuery ( query ) { var Params = {}; if ( ! query ) {return Params;}// return empty object var Pairs = query.split(/[;&]/); for ( var i = 0; i < Pairs.length; i++ ) { var KeyVal = Pairs[i].split('='); if ( ! KeyVal || KeyVal.length != 2 ) {continue;} var key = unescape( KeyVal[0] ); var val = unescape( KeyVal[1] ); val = val.replace(/\+/g, ' '); Params[key] = val; } return Params; } function tb_getPageSize(){ var de = document.documentElement; var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; arrayPageSize = [w,h]; return arrayPageSize; } function tb_detectMacXFF() { var userAgent = navigator.userAgent.toLowerCase(); if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { return true; } } /* --------- PAGEBUS.JS --------- */ /** * Copyright (c) 2006-2007, TIBCO Software Inc. * Use, modification, and distribution subject to terms of license. * * TIBCO(R) PageBus 1.1.0 */ if(typeof window.PageBus == 'undefined') { PageBus = { version: "1.1.0", S: {c:{},s:[]}, X: 0, P: 0, U: [], H: "undefined" }; PageBus.subscribe = function(name, scope, callback, subscriberData) { if(name == null) this._badName(); if(scope == null) scope = window; var path = name.split("."); var sub = { f: callback, d: subscriberData, i: this.X++, p: path, w: scope }; for(var i = 0; i < path.length; i++) { if((path[i].indexOf("*") != -1) && (path[i] != "*") && (path[i] != "**")) this._badName(); } this._subscribe(this.S, path, 0, sub); return sub; } PageBus.publish = function (name, message) { if((name == null) || (name.indexOf("*") != -1)) this._badName(); var path = name.split("."); if(this.P > 100) this._throw("StackOverflow"); try { this.P++; this._publish(this.S, path, 0, name, message); } catch(err) { this.P--; throw err; } try { this.P--; if((this.U.length > 0) && (this.P == 0)) { for(var i = 0; i < this.U.length; i++) this.unsubscribe(this.U[i]); this.U = []; } } catch(err) { // All unsubscribe exceptions should already have // been handled when unsubscribe was called in the // publish callback. This is a repeat appearance // of this exception. Discard it. } } PageBus.unsubscribe = function(sub) { this._unsubscribe(this.S, sub.p, 0, sub.i); } /* * @private @jsxobf-clobber */ PageBus._throw = function(n) { throw new Error("PageBus." + n); } /* * @private @jsxobf-clobber */ PageBus._badName = function(n) { this._throw("BadName"); } /* * @private @jsxobf-clobber */ PageBus._subscribe = function(tree, path, index, sub) { var tok = path[index]; if(tok == "") this._badName(); if(index == path.length) tree.s.push(sub); else { if(typeof tree.c == this.H) tree.c = {}; if(typeof tree.c[tok] == this.H) { try { tree.c[tok] = { c: {}, s: [] }; this._subscribe(tree.c[tok], path, index + 1, sub); } catch(err) { delete tree.c[tok]; throw err; } } else this._subscribe( tree.c[tok], path, index + 1, sub ); } } /* * @private @jsxobf-clobber */ PageBus._publish = function(tree, path, index, name, msg) { if(path[index] == "") this._badName(); if(typeof tree != this.H) { if(index < path.length) { this._publish(tree.c[path[index]], path, index + 1, name, msg); this._publish(tree.c["*"], path, index + 1, name, msg); this._call(tree.c["**"], name, msg); } else this._call(tree, name, msg); } } /* * @private @jsxobf-clobber */ PageBus._call = function(node, name, msg) { if(typeof node != this.H) { var callbacks = node.s; var max = callbacks.length; for(var i = 0; i < max; i++) if(callbacks[i].f != null) callbacks[i].f.apply(callbacks[i].w, [name, msg, callbacks[i].d]); } } /* * @jsxobf-clobber */ PageBus._unsubscribe = function(tree, path, index, sid) { if(typeof tree != this.H) { if(index < path.length) { var childNode = tree.c[path[index]]; this._unsubscribe(childNode, path, index + 1, sid); if(childNode.s.length == 0) { for(var x in childNode.c) // not empty. We're done. return; delete tree.c[path[index]]; // if we got here, c is empty } return; } else { var callbacks = tree.s; var max = callbacks.length; for(var i = 0; i < max; i++) { if(sid == callbacks[i].i) { if(this.P > 0) { if(callbacks[i].f == null) this._throw("BadParameter"); callbacks[i].f = null; this.U.push(callbacks[i]); } else callbacks.splice(i, 1); return; } } // Not found. Fall through } } this._throw("BadParameter"); } } /* --------- RGBCOLOR.JS --------- */ /** * A class to parse color values * @author Stoyan Stefanov * @link http://www.phpied.com/rgb-color-parser-in-javascript/ * @license Use it if you like it */ function RGBColor(color_string) { this.ok = false; // strip any leading # if (color_string.charAt(0) == '#') { // remove # if any color_string = color_string.substr(1,6); } color_string = color_string.replace(/ /g,''); color_string = color_string.toLowerCase(); // before getting into regexps, try simple matches // and overwrite the input var simple_colors = { aliceblue: 'f0f8ff', antiquewhite: 'faebd7', aqua: '00ffff', aquamarine: '7fffd4', azure: 'f0ffff', beige: 'f5f5dc', bisque: 'ffe4c4', black: '000000', blanchedalmond: 'ffebcd', blue: '0000ff', blueviolet: '8a2be2', brown: 'a52a2a', burlywood: 'deb887', cadetblue: '5f9ea0', chartreuse: '7fff00', chocolate: 'd2691e', coral: 'ff7f50', cornflowerblue: '6495ed', cornsilk: 'fff8dc', crimson: 'dc143c', cyan: '00ffff', darkblue: '00008b', darkcyan: '008b8b', darkgoldenrod: 'b8860b', darkgray: 'a9a9a9', darkgreen: '006400', darkkhaki: 'bdb76b', darkmagenta: '8b008b', darkolivegreen: '556b2f', darkorange: 'ff8c00', darkorchid: '9932cc', darkred: '8b0000', darksalmon: 'e9967a', darkseagreen: '8fbc8f', darkslateblue: '483d8b', darkslategray: '2f4f4f', darkturquoise: '00ced1', darkviolet: '9400d3', deeppink: 'ff1493', deepskyblue: '00bfff', dimgray: '696969', dodgerblue: '1e90ff', feldspar: 'd19275', firebrick: 'b22222', floralwhite: 'fffaf0', forestgreen: '228b22', fuchsia: 'ff00ff', gainsboro: 'dcdcdc', ghostwhite: 'f8f8ff', gold: 'ffd700', goldenrod: 'daa520', gray: '808080', green: '008000', greenyellow: 'adff2f', honeydew: 'f0fff0', hotpink: 'ff69b4', indianred : 'cd5c5c', indigo : '4b0082', ivory: 'fffff0', khaki: 'f0e68c', lavender: 'e6e6fa', lavenderblush: 'fff0f5', lawngreen: '7cfc00', lemonchiffon: 'fffacd', lightblue: 'add8e6', lightcoral: 'f08080', lightcyan: 'e0ffff', lightgoldenrodyellow: 'fafad2', lightgrey: 'd3d3d3', lightgreen: '90ee90', lightpink: 'ffb6c1', lightsalmon: 'ffa07a', lightseagreen: '20b2aa', lightskyblue: '87cefa', lightslateblue: '8470ff', lightslategray: '778899', lightsteelblue: 'b0c4de', lightyellow: 'ffffe0', lime: '00ff00', limegreen: '32cd32', linen: 'faf0e6', magenta: 'ff00ff', maroon: '800000', mediumaquamarine: '66cdaa', mediumblue: '0000cd', mediumorchid: 'ba55d3', mediumpurple: '9370d8', mediumseagreen: '3cb371', mediumslateblue: '7b68ee', mediumspringgreen: '00fa9a', mediumturquoise: '48d1cc', mediumvioletred: 'c71585', midnightblue: '191970', mintcream: 'f5fffa', mistyrose: 'ffe4e1', moccasin: 'ffe4b5', navajowhite: 'ffdead', navy: '000080', oldlace: 'fdf5e6', olive: '808000', olivedrab: '6b8e23', orange: 'ffa500', orangered: 'ff4500', orchid: 'da70d6', palegoldenrod: 'eee8aa', palegreen: '98fb98', paleturquoise: 'afeeee', palevioletred: 'd87093', papayawhip: 'ffefd5', peachpuff: 'ffdab9', peru: 'cd853f', pink: 'ffc0cb', plum: 'dda0dd', powderblue: 'b0e0e6', purple: '800080', red: 'ff0000', rosybrown: 'bc8f8f', royalblue: '4169e1', saddlebrown: '8b4513', salmon: 'fa8072', sandybrown: 'f4a460', seagreen: '2e8b57', seashell: 'fff5ee', sienna: 'a0522d', silver: 'c0c0c0', skyblue: '87ceeb', slateblue: '6a5acd', slategray: '708090', snow: 'fffafa', springgreen: '00ff7f', steelblue: '4682b4', tan: 'd2b48c', teal: '008080', thistle: 'd8bfd8', tomato: 'ff6347', turquoise: '40e0d0', violet: 'ee82ee', violetred: 'd02090', wheat: 'f5deb3', white: 'ffffff', whitesmoke: 'f5f5f5', yellow: 'ffff00', yellowgreen: '9acd32' }; for (var key in simple_colors) { if (color_string == key) { color_string = simple_colors[key]; } } // emd of simple type-in colors // array of color definition objects var color_defs = [ { re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/, example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'], process: function (bits){ return [ parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3]) ]; } }, { re: /^(\w{2})(\w{2})(\w{2})$/, example: ['#00ff00', '336699'], process: function (bits){ return [ parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16) ]; } }, { re: /^(\w{1})(\w{1})(\w{1})$/, example: ['#fb0', 'f0f'], process: function (bits){ return [ parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16) ]; } } ]; // search through the definitions to find a match for (var i = 0; i < color_defs.length; i++) { var re = color_defs[i].re; var processor = color_defs[i].process; var bits = re.exec(color_string); if (bits) { channels = processor(bits); this.r = channels[0]; this.g = channels[1]; this.b = channels[2]; this.ok = true; } } // validate/cleanup values this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r); this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g); this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b); // some getters this.toRGB = function () { return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')'; } this.toHex = function () { var r = this.r.toString(16); var g = this.g.toString(16); var b = this.b.toString(16); if (r.length == 1) r = '0' + r; if (g.length == 1) g = '0' + g; if (b.length == 1) b = '0' + b; return '#' + r + g + b; } // help this.getHelpXML = function () { var examples = new Array(); // add regexps for (var i = 0; i < color_defs.length; i++) { var example = color_defs[i].example; for (var j = 0; j < example.length; j++) { examples[examples.length] = example[j]; } } // add type-in colors for (var sc in simple_colors) { examples[examples.length] = sc; } var xml = document.createElement('ul'); xml.setAttribute('id', 'rgbcolor-examples'); for (var i = 0; i < examples.length; i++) { try { var list_item = document.createElement('li'); var list_color = new RGBColor(examples[i]); var example_div = document.createElement('div'); example_div.style.cssText = 'margin: 3px; ' + 'border: 1px solid black; ' + 'background:' + list_color.toHex() + '; ' + 'color:' + list_color.toHex() ; example_div.appendChild(document.createTextNode('test')); var list_item_value = document.createTextNode( ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex() ); list_item.appendChild(example_div); list_item.appendChild(list_item_value); xml.appendChild(list_item); } catch(e){} } return xml; } } /* --------- NAV.JS --------- */ if(typeof DekiWiki == "undefined") { var DekiWiki = {}; } DekiWiki.nav = function() { var selectedNode, prevSelectedNode, selectedChildren, timeout; //Toggle debug console on/off var debug = false; //Nav wrapper ID var navDivID = "siteNavTree"; //Animation speed (seconds) var animOpenCloseSpeed = 0.15; // expand, collapse child & hidden nodes var animChangeBackgroundSpeed = 0; // switch background color of selected node var animImagePadSpeed = 0; // 0.04; var animShiftSpeed = 0.1; //Time before redirect occurs (millisec) var redirectTime = 0; var redirectDelay = 0; // 1500 //Toggle redirect on/off var redirect = true; //Max text width in nav pane var maxWidth = 0; //RGB values (auto detected from css) var siblingRGB, dockedNodeRGB, selectedRGB, selectedChildRGB; //Width and padding properties var properties = {}; return { //Initialize navigation init: function() { //Initialize properties DekiWiki.nav.initProperties(); //Initialize hover DekiWiki.nav.initHover(); DekiWiki.nav.maxWidth = navMaxWidth; //Initialize click DekiWiki.nav.initClick(); }, //Initialize properties initProperties: function() { YAHOO.util.Event.onContentReady(navDivID, function() { //------------------------Determine background colors-------------------- var testClasses = ["sibling", "dockedNode", "selected", "selectedChild"]; //Create invisible test node DekiWiki.$("#" + navDivID).append(""); for(var i = 0; i < testClasses.length; i++) { var testClass = testClasses[i]; //Add class to test node DekiWiki.$("#testNode").addClass(testClass); //Get background color var color = DekiWiki.$("#testNode a").css("backgroundColor") if(color && (color.toLowerCase() != 'transparent')) { //Get color as RGB var rgb = new RGBColor(color).toRGB(); //Set global color variable to RGB eval(testClass + "RGB = '" + rgb + "';"); } //Remove class from test node DekiWiki.$("#testNode").removeClass(testClass); } //--------------------------Determine padding and width----------------------- properties.linkWidth = parseInt(DekiWiki.$("#testNode a").css("width")); properties.linkHeight = parseInt(DekiWiki.$("#testNode a").css("height")) + parseInt(DekiWiki.$("#testNode a").css("borderBottomWidth")); properties.linkPadLeft = parseInt(DekiWiki.$("#testNode a").css("paddingLeft")); properties.linkPadRight = parseInt(DekiWiki.$("#testNode a").css("paddingRight")); properties.imgPadRight = parseInt(DekiWiki.$("#testNode img.nodeImage").css("paddingRight")); DekiWiki.$("#testNode").addClass("selectedChild"); properties.selChildPadLeft = parseInt(DekiWiki.$("#testNode a").css("paddingLeft")); properties.selChildPadRight = parseInt(DekiWiki.$("#testNode a").css("paddingRight")); properties.selChildWidth = parseInt(DekiWiki.$("#testNode a").css("width")); DekiWiki.$("#testNode").removeClass("selectedChild").addClass("sibling"); properties.sibImgPadLeft = parseInt(DekiWiki.$("#testNode img.nodeImage").css("paddingLeft")); properties.sibImgPadRight = parseInt(DekiWiki.$("#testNode img.nodeImage").css("paddingRight")); //Remove test node DekiWiki.$("#testNode").remove(); } ); }, //Initialize hover initHover: function() { //Get child nodes that are not closed var childNodes = DekiWiki.$("#" + navDivID + " div.childNode").not(".closedNode").get(); //Add mouseover listener YAHOO.util.Event.addListener(childNodes, "mouseover", DekiWiki.nav.mouseover); //Add mouseout listener YAHOO.util.Event.addListener(childNodes, "mouseout", DekiWiki.nav.mouseout); //----------Debug---------- if(debug) { if(!YAHOO.util.Dom.inDocument("navDebug")) { DekiWiki.$(document.body).append(""); } YAHOO.util.Event.addListener(DekiWiki.$("div.node"), "mouseover", function() { DekiWiki.$("#navDebug").html(this.className); } ); YAHOO.util.Event.addListener(DekiWiki.$("div.node"), "mouseout", function() { DekiWiki.$("#navDebug").html(""); } ); } }, //Remove hover removeHover: function() { var nodes = DekiWiki.$("#" + navDivID + " div.node").get(); //Remove listeners YAHOO.util.Event.removeListener(nodes, "mouseover"); YAHOO.util.Event.removeListener(nodes, "mouseout"); }, //Reset hover resetHover: function() { DekiWiki.nav.removeHover(); DekiWiki.nav.initHover(); }, //Initialize click initClick: function() { var nodes = DekiWiki.$("#" + navDivID + " div.node"); nodes.attr("onclick", "return false;"); //Add click handler YAHOO.util.Event.addListener(nodes.get(), "click", DekiWiki.nav.click); }, //Remove click removeClick: function() { var nodes = DekiWiki.$("#" + navDivID + " div.node"); nodes.attr("onclick", ""); //Add click handler YAHOO.util.Event.removeListener(nodes.get(), "click", DekiWiki.nav.click); }, //Reset click resetClick: function() { DekiWiki.nav.removeClick(); DekiWiki.nav.initClick(); }, //Reset all handlers resetAllHandlers: function() { //Initialize click DekiWiki.nav.resetClick(); //Reset hover DekiWiki.nav.resetHover(); }, //Mouseover mouseover: function() { }, //Mouseout mouseout: function() { }, //Click click: function() { //Redirect turned on redirect = true; //Get previously selected node prevSelectedNode = DekiWiki.$("#" + navDivID + " div.selected").get(0); //Currently selected node selectedNode = this; //Exit if clicked node is already the current node if(YAHOO.util.Dom.hasClass(selectedNode, "selected") || (DekiWiki.$(selectedNode).attr("reload") == "1")) { redirectTime = 0; DekiWiki.nav.animComplete(); return; } //Hidden nodes if(YAHOO.util.Dom.hasClass(selectedNode, "moreNodes")) { DekiWiki.nav.hiddenNodes.startAnim(); return; } //Clear timeout if running if(timeout) { window.clearTimeout(timeout); } //Automatic redirect if node has no children if( (!YAHOO.util.Dom.hasClass(selectedNode, "parentOpen") && !YAHOO.util.Dom.hasClass(selectedNode, "parentClosed")) ) { redirectTime = 0; } else { redirectTime = redirectDelay; } //Get missing data, animate, redirect DekiWiki.nav.getData(); // KarenA: Bugfix #0002049 - prevented double question during leaving modified page return false; }, animComplete: function() { //Reset Hover DekiWiki.nav.resetHover(); if(selectedNode) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", ""); } if(prevSelectedNode) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", ""); } //Start timer var disableNavWhenEditorIsLoaded = false; if(redirect && ((DekiWiki.$(selectedNode).attr("reload") == "1") || !(disableNavWhenEditorIsLoaded && typeof(wysiwyg_editors) != 'undefined' && wysiwyg_editors))) { timeout = window.setTimeout(DekiWiki.nav.redirect, redirectTime); } }, redirect: function() { var path = DekiWiki.$(selectedNode).find("a").attr("href"); // SteveB: remove click handlers (which restores the default 'href' behavior) DekiWiki.nav.removeClick(); if(!path) { path = ""; } // fix for IE6 when canceling page redirect try { window.location = path; } catch(e) {} }, //Get missing nodes getData: function() { var allChildren = false; var partialChildren = false; var allSiblings = false; var request = []; var selChildData = DekiWiki.$(selectedNode).attr("cd") || "1"; // children-data (0=data missing, nXYZ=known child) var selSiblingData = DekiWiki.$(selectedNode).attr("sd") || "1"; // sibling-data (0=data missing) var knownChild = null; var exclude = ""; if(matchResult = selChildData.match(new RegExp("n([0-9]+)"))) { knownChild = matchResult[0]; } //Child data if(selChildData == "0") { allChildren = true; request.push("children"); } else if(knownChild) { partialChildren = true; request.push("children"); exclude = "&exclude=" + knownChild.replace(new RegExp("n"), ""); } //Sibling data if(selSiblingData == "0") { allSiblings = true; request.push("siblings"); } //Ajax call for missing nodes if(request.length) { var nodeID = DekiWiki.$(selectedNode).attr("id").replace(new RegExp("^n"), ""); var requestURL = "/@api/deki/site/nav/" + nodeID + "/" + request.join(",") + "?dream.out.format=json" + exclude; if(DekiWiki.nav.maxWidth > 0) { requestURL = requestURL + "&width=" + DekiWiki.nav.maxWidth; } //Debug //DekiWiki.$(document.body).append(requestURL); YAHOO.util.Connect.asyncRequest( "GET", requestURL, { success: function(obj) { //Evaluate response eval("var response = " + obj.responseText); //Children data if(response.children) { var childData = response.children.html; var childNodes = response.children.nodes; } //Sibling data if(response.siblings) { var siblingData = response.siblings.html; var siblingNodes = response.siblings.nodes; } //-------------Add children------------ //All children if(allChildren) { //Set list of child node IDs DekiWiki.$(selectedNode).attr("c", childNodes); //Append children DekiWiki.$(selectedNode).after(childData); } //Partial children else if(partialChildren) { //Set list of child node IDs DekiWiki.$(selectedNode).attr("c", childNodes); //Prepend siblings if(childData.pre) { DekiWiki.$("#" + knownChild).before(childData.pre); } //Append siblings if(childData.post) { DekiWiki.$(DekiWiki.nav.getLastChild( DekiWiki.$("#" + knownChild).get() ) ).after(childData.post); } //All children of the selected node have full sibling knowledge DekiWiki.$( DekiWiki.nav.common.getNodesFromAttr(selectedNode, "c") ).attr("sd", ""); } //------------Add siblings----------- if(allSiblings) { //Prepend siblings if(siblingData.pre) { DekiWiki.$(selectedNode).before(siblingData.pre); } //Append siblings if(siblingData.post) { DekiWiki.$(DekiWiki.nav.getLastChild(selectedNode)).after(siblingData.post); } //Parent node has full child data DekiWiki.$("#" + DekiWiki.$(selectedNode).attr("p")).attr("cd", "").attr("c", siblingNodes); } //Update data states of selected node DekiWiki.$(selectedNode).attr("cd", "").attr("sd", ""); //Re-initialize event handlers DekiWiki.nav.resetAllHandlers(); //Start animation DekiWiki.nav.startAnim(); } } ); } else { //Start animation DekiWiki.nav.startAnim(); } }, //Get last child of node getLastChild: function(node) { var childNodes; while(true) { childNodes = DekiWiki.$(node).attr("c"); if(childNodes) { childNodes = childNodes.split(","); node = DekiWiki.$("#" + childNodes[childNodes.length - 1]).get(0); } else { break; } } return node; }, //Start animation startAnim: function() { selectedChildren = null; //Get children of selected node if(YAHOO.util.Dom.hasClass(selectedNode, "parentClosed")) { selectedChildren = DekiWiki.nav.common.getNodesFromAttr(selectedNode, "c"); } //Sibling if(YAHOO.util.Dom.hasClass(selectedNode, "sibling")) { DekiWiki.nav.sibling.startAnim(); } //Child node else if(YAHOO.util.Dom.hasClass(selectedNode, "selectedChild")) { DekiWiki.nav.child.startAnim(); } //Home node else if(YAHOO.util.Dom.hasClass(selectedNode, "homeNode")) { DekiWiki.nav.docked.homeNode.startAnim(); } //Last docked else if(YAHOO.util.Dom.hasClass(selectedNode, "lastDocked")) { DekiWiki.nav.docked.lastDocked.startAnim(); } //Mid docked else { DekiWiki.nav.docked.midDocked.startAnim(); } }, //-------------------------------Common-------------------------------- common: { //Complete function handler onComplete: function(anim, completeFuncs) { if(completeFuncs) { if(completeFuncs.length) { for (var i=0; i 0) { var anim = new YAHOO.util.Anim( DekiWiki.$(nodes).find("img.nodeImage").get(), {paddingLeft: {to: 0}, paddingRight: {to: properties.imgPadRight}}, animImagePadSpeed, YAHOO.util.Easing.easeIn ); DekiWiki.nav.common.onComplete(anim, completeFuncs); anim.animate(); } else { DekiWiki.$(nodes).find("img.nodeImage").css("paddingLeft", 0).css("paddingRight", properties.imgPadRight); DekiWiki.nav.common.onComplete(null, completeFuncs); } }, //Expand image padding expandImagePad: function(nodes, completeFuncs) { if(animImagePadSpeed > 0) { var anim = new YAHOO.util.Anim( DekiWiki.$(nodes).find("img.nodeImage").get(), {paddingLeft: {to: properties.sibImgPadLeft}, paddingRight: {to: properties.sibImgPadRight}}, animImagePadSpeed, YAHOO.util.Easing.easeOut ); DekiWiki.nav.common.onComplete(anim, completeFuncs); anim.animate(); } else { DekiWiki.$(nodes).find("img.nodeImage").css("paddingLeft", properties.sibImgPadLeft).css("paddingRight", properties.sibImgPadRight); DekiWiki.nav.common.onComplete(null, completeFuncs); } }, //Shift nodes to the left shiftLeft: function(nodes, completeFuncs) { var anim = new YAHOO.util.Anim( DekiWiki.$(nodes).find("a").get(), {paddingLeft: {to: properties.linkPadLeft}, width: {to: properties.linkWidth}}, animShiftSpeed, YAHOO.util.Easing.easeIn ); DekiWiki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Shift nodes to the right shiftRight: function(nodes, completeFuncs) { var anim = new YAHOO.util.Anim( DekiWiki.$(nodes).find("a").get(), {paddingLeft: {to: properties.selChildPadLeft}, width: {to: properties.selChildWidth}}, animShiftSpeed, YAHOO.util.Easing.easeOut ); DekiWiki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Open parent node openParent: function(node) { if(YAHOO.util.Dom.hasClass(node, "parentClosed")) { DekiWiki.$(node).removeClass("parentClosed").addClass("parentOpen"); } }, //Close parent node closeParent: function(node) { if(YAHOO.util.Dom.hasClass(node, "parentOpen")) { DekiWiki.$(node).removeClass("parentOpen").addClass("parentClosed"); } }, //Get nodes from attribute getNodesFromAttr: function(node, attr, ignore) { var attribute = DekiWiki.$(node).attr(attr); if(attribute) { var list = attribute.split(","); // check if there is an element to ignore if(ignore) { // remove the element to ignore var i = 0; while(i < list.length) { if (list[i] == ignore) { list.splice(i, 1); break; } else { i++; } } } return YAHOO.util.Dom.get(list); } else { return [ ]; } } }, //----------------------------Debug----------------------- debug: { printIDs: function(nodes) { var idStr = ""; DekiWiki.$(nodes).each( function() { idStr += this.id + ", "; } ); alert(idStr); }, logClicks: function() { DekiWiki.$("#clickLog").append(this.id + "
"); } }, //-------------------------------Docked-------------------------------- docked: { //---------------------------Home node--------------------------- homeNode: { //Start animation startAnim: function() { if(selectedRGB) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } //Unhighlight selected node DekiWiki.$(prevSelectedNode).removeClass("selected"); //Close parent DekiWiki.nav.common.closeParent(prevSelectedNode); var nodeStr = 'var nodes = DekiWiki.$("div.node").not(".homeNode").not(".closedNode")'; DekiWiki.$(selectedChildren).each( function() { nodeStr += '.not("#' + this.id + '")'; } ); nodeStr += ".get()"; eval(nodeStr); //var nodes = DekiWiki.$("div.node").not(".homeNode").not(".closedNode").not(selectedChildren).get(); if(nodes.length) { //Strip nodes DekiWiki.$(nodes).removeClass("sibling").removeClass("selectedChild").removeClass("dockedNode").removeClass("lastDocked"); //Close non-child nodes DekiWiki.nav.common.compactNodes( nodes, DekiWiki.nav.docked.homeNode.showChildren ); } else { DekiWiki.nav.docked.homeNode.showChildren(); } }, //Show children showChildren: function() { var closedNodes = DekiWiki.$(selectedChildren).filter(".closedNode").not(".hiddenNode").get(); DekiWiki.$(selectedChildren).each( function() { if(YAHOO.util.Dom.hasClass(this, "parentOpen")) { DekiWiki.nav.common.closeParent(this); } } ); //Expand image padding DekiWiki.nav.common.expandImagePad(selectedChildren); DekiWiki.$(selectedChildren).addClass("sibling").addClass("childNode").removeClass("selectedChild").removeClass("dockedNode").removeClass("lastDocked"); if(closedNodes.length) { DekiWiki.nav.common.openNodes( closedNodes, DekiWiki.nav.docked.homeNode.highlightSelected ); } else { DekiWiki.nav.docked.homeNode.highlightSelected(); } }, //Highlight selected node highlightSelected: function() { DekiWiki.$(selectedNode).addClass("selected"); //Animation complete DekiWiki.nav.animComplete(); } }, //---------------------------Last Docked--------------------------- lastDocked: { //Start animation startAnim: function() { if(selectedRGB) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } var viewableChildren = DekiWiki.$("#" + navDivID + " div.selectedChild").get(); //Minimize children of previously selected node (if they exist) if(viewableChildren.length) { DekiWiki.nav.common.compactNodes( viewableChildren, function() { DekiWiki.$(viewableChildren).removeClass("selectedChild"); DekiWiki.nav.docked.lastDocked.siblingsToChildren(); } ); } else { DekiWiki.nav.docked.lastDocked.siblingsToChildren(); } }, //Transform siblings into children siblingsToChildren: function() { //Close previously selected node DekiWiki.nav.common.closeParent(prevSelectedNode); //Move siblings to the right DekiWiki.nav.common.shiftRight(DekiWiki.$("#" + navDivID + " div.sibling").get(), function() { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", ""); //Minimize node image padding DekiWiki.nav.common.compactImagePad(DekiWiki.$("#" + navDivID + " div.sibling")); DekiWiki.$("#" + navDivID + " div.sibling").addClass("selectedChild").removeClass("sibling").addClass("childNode"); DekiWiki.$(prevSelectedNode).removeClass("selected"); //Highlight selected node DekiWiki.nav.docked.highlightSelected(); } ); } }, //---------------------------Mid Docked--------------------------- midDocked: { //Start animation startAnim: function() { if(selectedRGB) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } //Close current child nodes DekiWiki.nav.common.compactNodes( DekiWiki.$("#" + navDivID + " div.childNode").not(".closedNode").get(), function() { //Unhighlight previously selected node DekiWiki.nav.common.closeParent(prevSelectedNode); DekiWiki.$(prevSelectedNode).removeClass("selected"); // remove child & sibling styles DekiWiki.$("#" + navDivID + " div.childNode").removeClass("selectedChild").removeClass("sibling"); //Hide grandchildren and their children DekiWiki.nav.docked.midDocked.hideGrandchildren(); } ); }, //Hide grandchildren and their children hideGrandchildren: function() { var grandchildren = []; var selectedPath = DekiWiki.$(selectedNode).attr("path"); DekiWiki.$("#" + navDivID + " div.dockedNode").each( function() { if((new RegExp(selectedPath + "[^/]+/([^/]+/)+$")).test(this.getAttribute("path"))) { grandchildren.push( DekiWiki.$("#" + this.id).get(0) ); } } ); if(grandchildren.length) { DekiWiki.nav.common.compactNodes( grandchildren, function() { DekiWiki.$(grandchildren).removeClass("dockedNode"); DekiWiki.nav.docked.midDocked.transformDockedChild(); } ); } else { DekiWiki.nav.docked.midDocked.transformDockedChild(); } }, //Transform docked child transformDockedChild: function() { var dockedChild = DekiWiki.$(selectedChildren).filter(".dockedNode").get(0); // switch left icon & style DekiWiki.$(dockedChild).removeClass("dockedNode").removeClass("lastDocked").addClass("childNode").addClass("selectedChild"); //Move docked child to the right DekiWiki.nav.common.shiftRight( dockedChild, function() { } ); DekiWiki.nav.docked.midDocked.showSelectedChildren(); }, //Show selected node's children showSelectedChildren: function() { var hiddenChildren = DekiWiki.$(selectedChildren).filter(".closedNode").get(); //Shift children to the right if(hiddenChildren.length) { DekiWiki.nav.common.shiftRight( hiddenChildren, function() { DekiWiki.$(hiddenChildren).addClass("selectedChild"); } ); //Minimize image padding DekiWiki.nav.common.compactImagePad(hiddenChildren); //Open nodes DekiWiki.nav.common.openNodes( hiddenChildren, DekiWiki.nav.docked.highlightSelected ); } else { DekiWiki.nav.docked.highlightSelected(); } } }, //---------------------------Common--------------------------- //Highlight selected node highlightSelected: function() { //Expand node image padding DekiWiki.nav.common.expandImagePad(selectedNode); //Highlight node DekiWiki.$(selectedNode).removeClass("dockedNode").removeClass("lastDocked"). addClass("sibling").addClass("selected").addClass("childNode"); //Open node if parent DekiWiki.nav.common.openParent(selectedNode); //Set parent to last docked var parentID = DekiWiki.$(selectedNode).attr("p"); DekiWiki.$("#" + parentID).addClass("lastDocked"); //Show siblings DekiWiki.nav.docked.showSiblings(); }, //Show siblings showSiblings: function() { // fetch parent of current node var parentNode = DekiWiki.$("#" + DekiWiki.$(selectedNode).attr("p")); if(parentNode) { // fetch children of parent (i.e. siblings of current node), but remove current node var siblings = DekiWiki.nav.common.getNodesFromAttr(parentNode, "c", DekiWiki.$(selectedNode).attr("id")); if(siblings && siblings.length) { DekiWiki.$(siblings).addClass("sibling").addClass("childNode"); DekiWiki.nav.common.openNodes(siblings, function() { //Animation complete DekiWiki.nav.animComplete(); } ); } else { //Animation complete DekiWiki.nav.animComplete(); } } else { //Animation complete DekiWiki.nav.animComplete(); } } }, //-------------------------------Child-------------------------------- child: { //Start animation startAnim: function() { if(selectedRGB) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(dockedNodeRGB) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", dockedNodeRGB); } DekiWiki.nav.child.hideSiblings(); }, //Hide siblings hideSiblings: function() { var nodes = DekiWiki.$("#" + navDivID + " div.sibling").not(".selected").get(); if(nodes.length) { DekiWiki.nav.common.compactNodes( nodes, function() { DekiWiki.$("#" + navDivID + " div.sibling").not(".selected").removeClass("sibling"); DekiWiki.nav.child.unhighlightSelected(); } ); } else { DekiWiki.nav.child.unhighlightSelected(); } }, //Unhighlight selected unhighlightSelected: function() { //Last docked is no longer last DekiWiki.$("#" + navDivID + " div.lastDocked").removeClass("lastDocked"); //Transform node into docked node DekiWiki.$(prevSelectedNode).removeClass("sibling").removeClass("childNode").removeClass("selected").addClass("dockedNode").addClass("lastDocked").find("img.nodeImage"); // check if we need to close the previous parent if(YAHOO.util.Dom.hasClass(prevSelectedNode, "parentOpen")) { DekiWiki.$(prevSelectedNode).removeClass("parentOpen").addClass("parentClosed"); } //Remove node image padding DekiWiki.nav.common.compactImagePad(prevSelectedNode); //Expand node image padding DekiWiki.nav.common.expandImagePad( DekiWiki.$("#" + navDivID + " div.selectedChild") ); //Move to left DekiWiki.nav.common.shiftLeft( DekiWiki.$("#" + navDivID + " div.selectedChild"), function() { //Change selected children to sibling nodes DekiWiki.$("#" + navDivID + " div.selectedChild").removeClass("selectedChild").addClass("sibling"); DekiWiki.nav.child.highlightSelected(); } ); }, //Highlight selected node highlightSelected: function() { //Mark node as selected DekiWiki.$(selectedNode).addClass("selected"); if(YAHOO.util.Dom.hasClass(DekiWiki.$(selectedNode).get(0), "parentClosed")) { //Open selected node DekiWiki.nav.common.openParent(selectedNode); //Open children DekiWiki.nav.child.openChildren(); } else { //Animation complete DekiWiki.nav.animComplete(); } }, //Open children openChildren: function() { // shift right DekiWiki.$(selectedChildren).find("a").css("paddingLeft", properties.selChildPadLeft).css("width", properties.selChildWidth); DekiWiki.nav.common.openNodes(selectedChildren, DekiWiki.nav.child.shiftRight ); }, //Shift new children to the right shiftRight: function() { DekiWiki.$(selectedChildren).addClass("selectedChild").addClass("childNode"); //Animation complete DekiWiki.nav.animComplete(); //Compact node image padding DekiWiki.nav.common.compactImagePad(selectedChildren); } }, //-------------------------------Sibling-------------------------------- sibling: { //Start animation startAnim: function() { if(selectedRGB) { DekiWiki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { DekiWiki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } if(YAHOO.util.Dom.hasClass(prevSelectedNode, "parentOpen")) { //Hide children DekiWiki.nav.sibling.hideSelectedChildren(); } else { //Unhighlight selected DekiWiki.nav.sibling.unhighlightSelected(); } }, //Hide previously selected node's children hideSelectedChildren: function() { DekiWiki.nav.common.compactNodes( DekiWiki.$("#" + navDivID + " div.selectedChild"), function() { DekiWiki.$("#" + navDivID + " div.selectedChild").removeClass("selectedChild"); DekiWiki.nav.sibling.unhighlightSelected(); } ); }, //Unhighlight previously selected node unhighlightSelected: function() { //Close parent node DekiWiki.nav.common.closeParent(prevSelectedNode); //Unhiglight DekiWiki.$(prevSelectedNode).removeClass("selected"); //Highlight selected node DekiWiki.nav.sibling.highlightSelected(); }, //Highlight selected node highlightSelected: function() { DekiWiki.$(selectedNode).addClass("selected"); //Open parent DekiWiki.nav.common.openParent(selectedNode); //Show children if(selectedChildren) { DekiWiki.nav.sibling.showChildren(); } else { //Animation complete DekiWiki.nav.animComplete(); } }, //Show children showChildren: function() { DekiWiki.$(selectedChildren).addClass("selectedChild").addClass("childNode"); //Open nodes DekiWiki.nav.common.openNodes( selectedChildren, function() { //Animation complete DekiWiki.nav.animComplete(); } ); //Shift right DekiWiki.nav.common.shiftRight(selectedChildren); //Minimize image padding DekiWiki.nav.common.compactImagePad(selectedChildren); } }, //-------------------------------Hidden Nodes-------------------------------- hiddenNodes: { //Start animation startAnim: function() { //Set content DekiWiki.$(selectedNode).find("span").text( DekiWiki.$(selectedNode).attr("content") ); //Set title DekiWiki.$(selectedNode).find("a").attr("title", DekiWiki.$(selectedNode).attr("contentTitle") ); //Open hidden nodes DekiWiki.nav.hiddenNodes.openNodes(); }, //Open hidden nodes openNodes: function() { //Get hidden nodes var hiddenNodes = DekiWiki.nav.common.getNodesFromAttr(selectedNode, "hiddenNodes"); DekiWiki.$(hiddenNodes).show(); //Animate hidden nodes open var anim = new YAHOO.util.Anim( hiddenNodes, {height: {to: properties.linkHeight}}, animOpenCloseSpeed, YAHOO.util.Easing.easeIn ); //Execute after animation has completed anim.onComplete.subscribe( function() { //Unmark node as having more nodes DekiWiki.$(selectedNode).removeClass("moreNodes").removeAttr("hiddenNodes"); //Unmark hidden nodes as being closed and hidden DekiWiki.$(hiddenNodes).removeClass("closedNode").removeClass("hiddenNode"); //Turn redirect off (previously started redirect will not be terminated) redirect = false; // selectedNode = prevSelectedNode; //Animation complete DekiWiki.nav.animComplete(); } ); //Animate anim.animate(); } } }; }(); //the onload event handler is available in /skins/common/javascript.php so we can flag it
Warning: Cannot modify header information - headers already sent by (output started at /var/www/deki-hayes/includes/libraries/ui_handlers.php:410) in /var/www/deki-hayes/includes/libraries/ui_handlers.php on line 144