/* yahoo-dom-event.js (31,637), animation.js (13,683), connection.js (11,602), element.js (8,589), dragdrop.js (24,043), json.js (3,480), get.js (4,061), wikibits.js (7,077), menu.js (9,797), print.js (4,819), gallery.js (2,531), messaging.js (4,888), general.js (5,695), jquery.min.js (57,254), jquery.plugins.js (1,607), Mindtouch.util.js (6,313), editor.js (5,178), comments.js (4,235), thickbox.js (12,501), pagebus.js (4,035), page_alerts.js (3,238), rgbcolor.js (8,752), nav.js (32,954) */ if (typeof Deki == "undefined" || !Deki ) { var Deki = {}; } Deki.GalleryTotalImages = 6; Deki.GallerySort = "date-desc"; /* --------- 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.6.0 */ if(typeof YAHOO=="undefined"||!YAHOO){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}if(K.length>1){K.pop();}K.push("]");}else{K.push("{");for(F in D){if(A.hasOwnProperty(D,F)){K.push(F+G);if(A.isObject(D[F])){K.push((I>0)?A.dump(D[F],I-1):L);}else{K.push(D[F]);}K.push(J);}}if(K.length>1){K.pop();}K.push("}");}return K.join("");},substitute:function(S,E,L){var I,H,G,O,P,R,N=[],F,J="dump",M=" ",D="{",Q="}";for(;;){I=S.lastIndexOf(D);if(I<0){break;}H=S.indexOf(Q,I);if(I+1>=H){break;}F=S.substring(I+1,H);O=F;R=null;G=O.indexOf(M);if(G>-1){R=O.substring(G+1);O=O.substring(0,G);}P=E[O];if(L){P=L(O,P,R);}if(A.isObject(P)){if(A.isArray(P)){P=A.dump(P,parseInt(R,10));}else{R=R||"";var K=R.indexOf(J);if(K>-1){R=R.substring(4);}if(P.toString===Object.prototype.toString||K>-1){P=A.dump(P,parseInt(R,10));}else{P=P.toString();}}}else{if(!A.isString(P)&&!A.isNumber(P)){P="~-"+N.length+"-~";N[N.length]=F;}}S=S.substring(0,I)+P+S.substring(H+1);}for(I=N.length-1;I>=0;I=I-1){S=S.replace(new RegExp("~-"+I+"-~"),"{"+N[I]+"}","g");}return S;},trim:function(D){try{return D.replace(/^\s+|\s+$/g,"");}catch(E){return D;}},merge:function(){var G={},E=arguments;for(var F=0,D=E.length;F=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.6.0",build:"1321"});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){B=I[0];}try{G=M.fn.call(L,B,M.obj);}catch(F){this.lastError=F;if(A){throw F;}}}else{try{G=M.fn.call(L,this.type,I,M.obj);}catch(H){this.lastError=H;if(A){throw H;}}}if(false===G){if(!this.silent){}break;}}}return(G!==false);},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};var K=YAHOO.env.ua.ie?"focusin":"focus";var L=YAHOO.env.ua.ie?"focusout":"blur";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,CAPTURE:7,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,_dri:null,DOMReady:false,throwErrors:false,startInterval:function(){if(!this._interval){var M=this;var N=function(){M._tryPreloadAttach();};this._interval=setInterval(N,this.POLL_INTERVAL);}},onAvailable:function(R,O,S,Q,P){var M=(YAHOO.lang.isString(R))?[R]:R;for(var N=0;N-1;Q--){W=(this._removeListener(N[Q],M,V,Y)&&W);}return W;}}if(!V||!V.call){return this.purgeElement(N,false,M);}if("unload"==M){for(Q=J.length-1;Q>-1;Q--){X=J[Q];if(X&&X[0]==N&&X[1]==M&&X[2]==V){J.splice(Q,1);return true;}}return false;}var R=null;var S=arguments[4];if("undefined"===typeof S){S=this._getCacheIndex(N,M,V);}if(S>=0){R=I[S];}if(!N||!R){return false;}if(this.useLegacyEvent(N,M)){var P=this.getLegacyIndex(N,M);var O=E[P];if(O){for(Q=0,T=O.length;Q0&&F.length>0);}var R=[];var T=function(V,W){var U=V;if(W.override){if(W.override===true){U=W.obj;}else{U=W.override;}}W.fn.call(U,W.obj);};var N,M,Q,P,O=[];for(N=0,M=F.length;N-1;N--){Q=F[N];if(!Q||!Q.id){F.splice(N,1);}}this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;},purgeElement:function(Q,R,T){var O=(YAHOO.lang.isString(Q))?this.getEl(Q):Q;var S=this.getListeners(O,T),P,M;if(S){for(P=S.length-1;P>-1;P--){var N=S[P];this._removeListener(O,N.type,N.fn,N.capture);}}if(R&&O&&O.childNodes){for(P=0,M=O.childNodes.length;P-1;O--){N=I[O];if(N){M._removeListener(N[M.EL],N[M.TYPE],N[M.FN],N[M.CAPTURE],O);}}N=null;}G=null;M._simpleRemove(window,"unload",M._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var M=document.documentElement,N=document.body;if(M&&(M.scrollTop||M.scrollLeft)){return[M.scrollTop,M.scrollLeft];}else{if(N){return[N.scrollTop,N.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(O,P,N,M){O.addEventListener(P,N,(M));};}else{if(window.attachEvent){return function(O,P,N,M){O.attachEvent("on"+P,N);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(O,P,N,M){O.removeEventListener(P,N,(M));};}else{if(window.detachEvent){return function(N,O,M){N.detachEvent("on"+O,M);};}else{return function(){};}}}()};}();(function(){var EU=YAHOO.util.Event;EU.on=EU.addListener;EU.onFocus=EU.addFocusListener;EU.onBlur=EU.addBlurListener; /* 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.6.0",build:"1321"}); /* --------- 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.6.0 */ 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(F){var E,A;try{A=new XMLHttpRequest();E={conn:A,tId:F};}catch(D){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-1){A=B.options[B.selectedIndex];F[O++]=K+encodeURIComponent((A.attributes.value&&A.attributes.value.specified)?A.value:A.text);}break;case"select-multiple":if(B.selectedIndex>-1){for(D=B.selectedIndex,N=B.options.length;D');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=[],B=A.split("&"),C,E;for(C=0;C0){for(H=0;Hthis.clickPixelThresh||D>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){if(C&&C.events.b4Drag){C.b4Drag(F);C.fireEvent("b4DragEvent",{e:F});}if(C&&C.events.drag){C.onDrag(F);C.fireEvent("dragEvent",{e:F});}if(C){this.fireEvents(F,false);}}this.stopEvent(F);}},fireEvents:function(V,L){var a=this.dragCurrent;if(!a||a.isLocked()||a.dragOnly){return ;}var N=YAHOO.util.Event.getPageX(V),M=YAHOO.util.Event.getPageY(V),P=new YAHOO.util.Point(N,M),K=a.getTargetCoord(P.x,P.y),F=a.getDragEl(),E=["out","over","drop","enter"],U=new YAHOO.util.Region(K.y,K.x+F.offsetWidth,K.y+F.offsetHeight,K.x),I=[],D={},Q=[],c={outEvts:[],overEvts:[],dropEvts:[],enterEvts:[]};for(var S in this.dragOvers){var d=this.dragOvers[S];if(!this.isTypeOfDD(d)){continue; }if(!this.isOverTarget(P,d,this.mode,U)){c.outEvts.push(d);}I[S]=true;delete this.dragOvers[S];}for(var R in a.groups){if("string"!=typeof R){continue;}for(S in this.ids[R]){var G=this.ids[R][S];if(!this.isTypeOfDD(G)){continue;}if(G.isTarget&&!G.isLocked()&&G!=a){if(this.isOverTarget(P,G,this.mode,U)){D[R]=true;if(L){c.dropEvts.push(G);}else{if(!I[G.id]){c.enterEvts.push(G);}else{c.overEvts.push(G);}this.dragOvers[G.id]=G;}}}}}this.interactionInfo={out:c.outEvts,enter:c.enterEvts,over:c.overEvts,drop:c.dropEvts,point:P,draggedRegion:U,sourceRegion:this.locationCache[a.id],validDrop:L};for(var C in D){Q.push(C);}if(L&&!c.dropEvts.length){this.interactionInfo.validDrop=false;if(a.events.invalidDrop){a.onInvalidDrop(V);a.fireEvent("invalidDropEvent",{e:V});}}for(S=0;S2000){}else{setTimeout(C._addListeners,10);if(document&&document.body){C._timeoutCount+=1;}}}},handleWasClicked:function(C,E){if(this.isHandle(E,C.id)){return true;}else{var D=C.parentNode;while(D){if(this.isHandle(E,D.id)){return true;}else{D=D.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,useShim: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);this.useShim=((this.config.useShim===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(J,I){var D=J.which||J.button;if(this.primaryButtonOnly&&D>1){return ;}if(this.isLocked()){return ;}var C=this.b4MouseDown(J),F=true;if(this.events.b4MouseDown){F=this.fireEvent("b4MouseDownEvent",J);}var E=this.onMouseDown(J),H=true;if(this.events.mouseDown){H=this.fireEvent("mouseDownEvent",J);}if((C===false)||(E===false)||(F===false)||(H===false)){return ;}this.DDM.refreshCache(this.groups);var G=new YAHOO.util.Point(A.getPageX(J),A.getPageY(J));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(G,this)){}else{if(this.clickValidator(J)){this.setStartPosition();this.DDM.handleMouseDown(J,this);this.DDM.stopEvent(J);}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;--i){if(pstack[i]===o){return"null";}}pstack[pstack.length]=o;a=[];isArray=l.isArray(o);if(d>0){if(isArray){for(i=o.length-1;i>=0;--i){a[i]=_stringify(o,i,d-1,w,pstack)||"null";}}else{j=0;if(l.isArray(w)){for(i=0,len=w.length;i=0?d:1/0;return _stringify({"":o},"",d,w,[]);}return undefined;},dateToString:function(d){function _zeroPad(v){return v<10?"0"+v:v;}return d.getUTCFullYear()+"-"+_zeroPad(d.getUTCMonth()+1)+"-"+_zeroPad(d.getUTCDate())+"T"+_zeroPad(d.getUTCHours())+":"+_zeroPad(d.getUTCMinutes())+":"+_zeroPad(d.getUTCSeconds())+"Z";},stringToDate:function(str){if(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})Z$/.test(str)){var d=new Date();d.setUTCFullYear(RegExp.$1,(RegExp.$2|0)-1,RegExp.$3);d.setUTCHours(RegExp.$4,RegExp.$5,RegExp.$6);return d;}return str;}};})();YAHOO.register("json",YAHOO.lang.JSON,{version:"2.6.0",build:"1321"}); /* --------- GET.JS --------- */ /* Copyright (c) 2008, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt version: 2.6.0 */ YAHOO.util.Get=function(){var M={},L=0,R=0,E=false,N=YAHOO.env.ua,S=YAHOO.lang;var J=function(W,T,X){var U=X||window,Y=U.document,Z=Y.createElement(W);for(var V in T){if(T[V]&&YAHOO.lang.hasOwnProperty(T,V)){Z.setAttribute(V,T[V]);}}return Z;};var I=function(T,U,W){var V=W||"utf-8";return J("link",{"id":"yui__dyn_"+(R++),"type":"text/css","charset":V,"rel":"stylesheet","href":T},U);};var P=function(T,U,W){var V=W||"utf-8";return J("script",{"id":"yui__dyn_"+(R++),"type":"text/javascript","charset":V,"src":T},U);};var A=function(T,U){return{tId:T.tId,win:T.win,data:T.data,nodes:T.nodes,msg:U,purge:function(){D(this.tId);}};};var B=function(T,W){var U=M[W],V=(S.isString(T))?U.win.document.getElementById(T):T;if(!V){Q(W,"target node not found: "+T);}return V;};var Q=function(W,V){var T=M[W];if(T.onFailure){var U=T.scope||T.win;T.onFailure.call(U,A(T,V));}};var C=function(W){var T=M[W];T.finished=true;if(T.aborted){var V="transaction "+W+" was aborted";Q(W,V);return ;}if(T.onSuccess){var U=T.scope||T.win;T.onSuccess.call(U,A(T));}};var O=function(V){var T=M[V];if(T.onTimeout){var U=T.context||T;T.onTimeout.call(U,A(T));}};var G=function(V,Z){var U=M[V];if(U.timer){U.timer.cancel();}if(U.aborted){var X="transaction "+V+" was aborted";Q(V,X);return ;}if(Z){U.url.shift();if(U.varName){U.varName.shift();}}else{U.url=(S.isString(U.url))?[U.url]:U.url;if(U.varName){U.varName=(S.isString(U.varName))?[U.varName]:U.varName;}}var c=U.win,b=c.document,a=b.getElementsByTagName("head")[0],W;if(U.url.length===0){if(U.type==="script"&&N.webkit&&N.webkit<420&&!U.finalpass&&!U.varName){var Y=P(null,U.win,U.charset);Y.innerHTML='YAHOO.util.Get._finalize("'+V+'");';U.nodes.push(Y);a.appendChild(Y);}else{C(V);}return ;}var T=U.url[0];if(!T){U.url.shift();return G(V);}if(U.timeout){U.timer=S.later(U.timeout,U,O,V);}if(U.type==="script"){W=P(T,c,U.charset);}else{W=I(T,c,U.charset);}F(U.type,W,V,T,c,U.url.length);U.nodes.push(W);if(U.insertBefore){var e=B(U.insertBefore,V);if(e){e.parentNode.insertBefore(W,e);}}else{a.appendChild(W);}if((N.webkit||N.gecko)&&U.type==="css"){G(V,T);}};var K=function(){if(E){return ;}E=true;for(var T in M){var U=M[T];if(U.autopurge&&U.finished){D(U.tId);delete M[T];}}E=false;};var D=function(a){var X=M[a];if(X){var Z=X.nodes,T=Z.length,Y=X.win.document,W=Y.getElementsByTagName("head")[0];if(X.insertBefore){var V=B(X.insertBefore,a);if(V){W=V.parentNode;}}for(var U=0;U=420){X.addEventListener("load",function(){a(W,U);});}else{var T=M[W];if(T.varName){var V=YAHOO.util.Get.POLL_FREQ;T.maxattempts=YAHOO.util.Get.TIMEOUT/V;T.attempts=0;T._cache=T.varName[0].split(".");T.timer=S.later(V,T,function(j){var f=this._cache,e=f.length,d=this.win,g;for(g=0;gthis.maxattempts){var h="Over retry limit, giving up";T.timer.cancel();Q(W,h);}else{}return ;}}T.timer.cancel();a(W,U);},null,true);}else{S.later(YAHOO.util.Get.POLL_FREQ,null,a,[W,U]);}}}}else{X.onload=function(){a(W,U);};}}};return{POLL_FREQ:10,PURGE_THRESH:20,TIMEOUT:2000,_finalize:function(T){S.later(0,null,C,T);},abort:function(U){var V=(S.isString(U))?U:U.tId;var T=M[V];if(T){T.aborted=true;}},script:function(T,U){return H("script",T,U);},css:function(T,U){return H("css",T,U);}};}();YAHOO.register("get",YAHOO.util.Get,{version:"2.6.0",build:"1321"}); /* --------- WIKIBITS.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 showWebDavLinks() { Deki.$.each(jQuery.browser, function(browser) { if (browser == 'msie') { Deki.$('a.deki-webdavdoc').css('display', 'inline'); } }); } function loadOfficeDoc(url) { if (window.ActiveXObject) { var ed; try { ed = new ActiveXObject('SharePoint.OpenDocuments.1'); } catch(err) { window.alert('Unable to create an ActiveX object to open the document. This is most likely because of the security settings for your browser.'); return false; } if (ed) { ed.EditDocument(url); return false; } else { window.alert('Cannot instantiate the required ActiveX control to open the document. This is most likely because you do not have Office installed or you have an older version of Office.'); return false; } } else { window.alert('Internet Explorer is required to use this feature'); } return false; } //node is the current checkbox function select_checkboxes(node) { //select all checkboxes that is in the same form as this checkbox var boxes = Deki.$("input[@type='checkbox']", Deki.$(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; }; } function showEditArea(elt) { var prt = Deki.$(elt).parent().parent().parent().addClass('editHover'); }; function hideEditArea(elt) { var prt = Deki.$(elt).parent().parent().parent().removeClass('editHover'); }; var MTPageLoad = function() {}; MTPageLoad.HookEditSectionIcons = function() { Deki.$("h2.editable,h3.editable,h4.editable,h5.editable,h6.editable", Deki.$("#pageText")) .wrapInner("") .append('
' +''+wfMsg('wikibits-edit-section')+'
' ); HookSectionEditBehavior(); }; var HookSectionEditBehavior = function() { Deki.$("h2.editable,h3.editable,h4.editable,h5.editable,h6.editable", Deki.$("#pageText")) .hover( function() { Deki.$("div.editIcon > a", this).css('visibility', 'visible') }, function() { Deki.$("div.editIcon > a", this).css('visibility', 'hidden') } ); }; 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() { Deki.$('.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) { Deki.$('#showlink-'+fileId).toggle(); Deki.$('#hidelink-'+fileId).toggle(); Deki.$('#attachTable tr.attach_'+fileId).toggle(); return false; }; function toggleChangesTable(divid) { Deki.$('#showlink-'+divid).toggle(); Deki.$('#hidelink-'+divid).toggle(); Deki.$('table tr.'+divid).toggle(); return false; }; function selectSkin(node) { var divs = Deki.$('#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 = Deki.$('#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 = Deki.$('#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; } } } Deki.$('#previewSkin').html('Skin Preview'); }; /* --------- MENU.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 = Deki.$('#'+divid); //todo nullref var display = node.css('display'); node.toggle(); if (display == 'block') { DWMenu.Opened = false; } else { node.css('visibility', 'hidden'); //for ie6 var width = node.width(); var position = YAHOO.util.Dom.getXY(node); if (typeof(winX) != 'null') { if ((position[0] + width) > (winX - 36)) { if (typeof(offsetX) == 'undefined') offsetX = 0; node.css('left', (position[0] - 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 $elt = Deki.$(elt); var offset = $elt.offset(); offsetY = offsetY + $elt.outerHeight(); if (typeof(offsetX) == 'number') var x = offset.left + offsetX; if (typeof(offsetY) == 'number') var y = offset.top + offsetY; Deki.$("#" + divid).css("left", x+'px').css("top", y+'px'); DWMenu.LinkClick(divid, $elt.width()); return false; }; DWMenu.Off = function(divid) { var display = Deki.$('#'+divid).css('display'); if (display == 'block') { Deki.$('#'+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 elDivMenu = Deki.$('#'+divMenu); var dimensions = {"width" : elDivMenu.width(), "height" : elDivMenu.height()}; var position = YAHOO.util.Dom.getXY(eltFiller); if (typeof(winX) != 'null' && typeof(winY) != 'null') { var pageDimensions = YAHOO.util.Dom.getXY(Deki.$('#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 + Deki.$(node).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] + Deki.$(node).width(); eltFiller.style.left = horizOffset+'px'; } } elDivMenu.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(Deki.PageId, attachID); } }, isRestricted ? 'disabled': false); addMenuItem('attachmove', wfMsg('menu-move-file'), '#', function () { if (!isRestricted) { return doPopupMoveAttach(Deki.PageId, 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'))) { var oData = { 'fileId' : attachID, 'inGallery' : inGallery }; Deki.$.get("/deki/gui/attachments.php?action=delete", oData, function () { 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; } }; /* --------- PRINT.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 links = elt.getElementsByTagName('a'); for (i = 0; i < links.length; i++ ) { if (links[i].getAttribute('href')) { if (Deki.$.browser.msie && parseInt(Deki.$.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) Deki.$("#printfooter").css("display", "block"); else Deki.$("#printfooter").css("display", "none"); }, changeTocDisplay : function () { if (document.getElementById('printOptToc').checked) Deki.$("#pageToc").css("display", "block"); else Deki.$("#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') { Deki.$("#pageContent").addClass("prefsToggledOn"); prefsnode.style.display = 'block'; node.className = 'showPrintPrefs'; } else { Deki.$("#pageContent").removeClass("prefsToggledOn"); prefsnode.style.display = 'none'; node.className = 'hidePrintPrefs'; } }, toggleEndnotes : function() { Print.changeEndnotesDisplay(); Deki.$.get('/deki/gui/setuseroption.php', { 'key' : 'printlinks', 'value' : Deki.$('#printOptLinks').attr('checked') }); }, toggleFooter : function() { Print.changeFooterDisplay(); Deki.$.get('/deki/gui/setuseroption.php', { 'key' : 'printfooter', 'value' : Deki.$('#printOptFooter').attr('checked') }); }, toggleToc : function() { Print.changeTocDisplay(); Deki.$.get('/deki/gui/setuseroption.php', { 'key' : 'printtoc', 'value' : Deki.$('#printOptToc').attr('checked') }); } }; function saveToPDF (page) { window.location = page; } /* --------- GALLERY.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 MTGallery() {}; MTGallery.Offset = 0; MTGallery.PageID = 0; MTGallery.SortBy = Deki.GallerySort; MTGallery.FileID = 0; MTGallery.Next = function() { MTGallery.Offset = MTGallery.Offset + Deki.GalleryTotalImages; return MTGallery.Show(); }; MTGallery.Back = function() { MTGallery.Offset = MTGallery.Offset - Deki.GalleryTotalImages; 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 = Deki.PageId; } var oData = { 'pageId' : MTGallery.PageID, 'offset' : MTGallery.Offset, 'sortBy' : MTGallery.SortBy, 'fileId' : MTGallery.FileID }; Deki.$.get("/deki/gui/attachments.php?action=getimagegallery", oData, function(sHtml) { Deki.$( '#pageGallery' ).html( sHtml ); 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 Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 */ /*** * 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 (YAHOO.env.ua.ie > 0 && YAHOO.env.ua.ie < 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) { var elText = document.createTextNode(val); el = document.getElementById('MTMessageDesc'); el.innerHTML = ''; el.appendChild(elText); }; 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; } /* --------- JQUERY.MIN.JS --------- */ /* * jQuery JavaScript Library v1.3.2 * http://jquery.com/ * * Copyright (c) 2009 John Resig * Dual licensed under the MIT and GPL licenses. * http://docs.jquery.com/License * * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) * Revision: 6246 */ (function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("",""]||!O.indexOf("",""]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!O.indexOf("",""]||(!O.indexOf("",""]||!O.indexOf("",""]||!o.support.htmlSerialize&&[1,"div
","
"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}}); /* * Sizzle CSS Selector Engine - v0.9.3 * Copyright 2009, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ (function(){var R=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g,L=0,H=Object.prototype.toString;var F=function(Y,U,ab,ac){ab=ab||[];U=U||document;if(U.nodeType!==1&&U.nodeType!==9){return[]}if(!Y||typeof Y!=="string"){return ab}var Z=[],W,af,ai,T,ad,V,X=true;R.lastIndex=0;while((W=R.exec(Y))!==null){Z.push(W[1]);if(W[2]){V=RegExp.rightContext;break}}if(Z.length>1&&M.exec(Y)){if(Z.length===2&&I.relative[Z[0]]){af=J(Z[0]+Z[1],U)}else{af=I.relative[Z[0]]?[U]:F(Z.shift(),U);while(Z.length){Y=Z.shift();if(I.relative[Y]){Y+=Z.shift()}af=J(Y,af)}}}else{var ae=ac?{expr:Z.pop(),set:E(ac)}:F.find(Z.pop(),Z.length===1&&U.parentNode?U.parentNode:U,Q(U));af=F.filter(ae.expr,ae.set);if(Z.length>0){ai=E(af)}else{X=false}while(Z.length){var ah=Z.pop(),ag=ah;if(!I.relative[ah]){ah=""}else{ag=Z.pop()}if(ag==null){ag=U}I.relative[ah](ai,ag,Q(U))}}if(!ai){ai=af}if(!ai){throw"Syntax error, unrecognized expression: "+(ah||Y)}if(H.call(ai)==="[object Array]"){if(!X){ab.push.apply(ab,ai)}else{if(U.nodeType===1){for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&(ai[aa]===true||ai[aa].nodeType===1&&K(U,ai[aa]))){ab.push(af[aa])}}}else{for(var aa=0;ai[aa]!=null;aa++){if(ai[aa]&&ai[aa].nodeType===1){ab.push(af[aa])}}}}}else{E(ai,ab)}if(V){F(V,U,ab,ac);if(G){hasDuplicate=false;ab.sort(G);if(hasDuplicate){for(var aa=1;aa":function(Z,U,aa){var X=typeof U==="string";if(X&&!/\W/.test(U)){U=aa?U:U.toUpperCase();for(var V=0,T=Z.length;V=0)){if(!V){T.push(Y)}}else{if(V){U[X]=false}}}}return false},ID:function(T){return T[1].replace(/\\/g,"")},TAG:function(U,T){for(var V=0;T[V]===false;V++){}return T[V]&&Q(T[V])?U[1]:U[1].toUpperCase()},CHILD:function(T){if(T[1]=="nth"){var U=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2]=="even"&&"2n"||T[2]=="odd"&&"2n+1"||!/\D/.test(T[2])&&"0n+"+T[2]||T[2]);T[2]=(U[1]+(U[2]||1))-0;T[3]=U[3]-0}T[0]=L++;return T},ATTR:function(X,U,V,T,Y,Z){var W=X[1].replace(/\\/g,"");if(!Z&&I.attrMap[W]){X[1]=I.attrMap[W]}if(X[2]==="~="){X[4]=" "+X[4]+" "}return X},PSEUDO:function(X,U,V,T,Y){if(X[1]==="not"){if(X[3].match(R).length>1||/^\w/.test(X[3])){X[3]=F(X[3],null,null,U)}else{var W=F.filter(X[3],U,V,true^Y);if(!V){T.push.apply(T,W)}return false}}else{if(I.match.POS.test(X[0])||I.match.CHILD.test(X[0])){return true}}return X},POS:function(T){T.unshift(true);return T}},filters:{enabled:function(T){return T.disabled===false&&T.type!=="hidden"},disabled:function(T){return T.disabled===true},checked:function(T){return T.checked===true},selected:function(T){T.parentNode.selectedIndex;return T.selected===true},parent:function(T){return !!T.firstChild},empty:function(T){return !T.firstChild},has:function(V,U,T){return !!F(T[3],V).length},header:function(T){return/h\d/i.test(T.nodeName)},text:function(T){return"text"===T.type},radio:function(T){return"radio"===T.type},checkbox:function(T){return"checkbox"===T.type},file:function(T){return"file"===T.type},password:function(T){return"password"===T.type},submit:function(T){return"submit"===T.type},image:function(T){return"image"===T.type},reset:function(T){return"reset"===T.type},button:function(T){return"button"===T.type||T.nodeName.toUpperCase()==="BUTTON"},input:function(T){return/input|select|textarea|button/i.test(T.nodeName)}},setFilters:{first:function(U,T){return T===0},last:function(V,U,T,W){return U===W.length-1},even:function(U,T){return T%2===0},odd:function(U,T){return T%2===1},lt:function(V,U,T){return UT[3]-0},nth:function(V,U,T){return T[3]-0==U},eq:function(V,U,T){return T[3]-0==U}},filter:{PSEUDO:function(Z,V,W,aa){var U=V[1],X=I.filters[U];if(X){return X(Z,W,V,aa)}else{if(U==="contains"){return(Z.textContent||Z.innerText||"").indexOf(V[3])>=0}else{if(U==="not"){var Y=V[3];for(var W=0,T=Y.length;W=0)}}},ID:function(U,T){return U.nodeType===1&&U.getAttribute("id")===T},TAG:function(U,T){return(T==="*"&&U.nodeType===1)||U.nodeName===T},CLASS:function(U,T){return(" "+(U.className||U.getAttribute("class"))+" ").indexOf(T)>-1},ATTR:function(Y,W){var V=W[1],T=I.attrHandle[V]?I.attrHandle[V](Y):Y[V]!=null?Y[V]:Y.getAttribute(V),Z=T+"",X=W[2],U=W[4];return T==null?X==="!=":X==="="?Z===U:X==="*="?Z.indexOf(U)>=0:X==="~="?(" "+Z+" ").indexOf(U)>=0:!U?Z&&T!==false:X==="!="?Z!=U:X==="^="?Z.indexOf(U)===0:X==="$="?Z.substr(Z.length-U.length)===U:X==="|="?Z===U||Z.substr(0,U.length+1)===U+"-":false},POS:function(X,U,V,Y){var T=U[2],W=I.setFilters[T];if(W){return W(X,V,U,Y)}}}};var M=I.match.POS;for(var O in I.match){I.match[O]=RegExp(I.match[O].source+/(?![^\[]*\])(?![^\(]*\))/.source)}var E=function(U,T){U=Array.prototype.slice.call(U);if(T){T.push.apply(T,U);return T}return U};try{Array.prototype.slice.call(document.documentElement.childNodes)}catch(N){E=function(X,W){var U=W||[];if(H.call(X)==="[object Array]"){Array.prototype.push.apply(U,X)}else{if(typeof X.length==="number"){for(var V=0,T=X.length;V";var T=document.documentElement;T.insertBefore(U,T.firstChild);if(!!document.getElementById(V)){I.find.ID=function(X,Y,Z){if(typeof Y.getElementById!=="undefined"&&!Z){var W=Y.getElementById(X[1]);return W?W.id===X[1]||typeof W.getAttributeNode!=="undefined"&&W.getAttributeNode("id").nodeValue===X[1]?[W]:g:[]}};I.filter.ID=function(Y,W){var X=typeof Y.getAttributeNode!=="undefined"&&Y.getAttributeNode("id");return Y.nodeType===1&&X&&X.nodeValue===W}}T.removeChild(U)})();(function(){var T=document.createElement("div");T.appendChild(document.createComment(""));if(T.getElementsByTagName("*").length>0){I.find.TAG=function(U,Y){var X=Y.getElementsByTagName(U[1]);if(U[1]==="*"){var W=[];for(var V=0;X[V];V++){if(X[V].nodeType===1){W.push(X[V])}}X=W}return X}}T.innerHTML="";if(T.firstChild&&typeof T.firstChild.getAttribute!=="undefined"&&T.firstChild.getAttribute("href")!=="#"){I.attrHandle.href=function(U){return U.getAttribute("href",2)}}})();if(document.querySelectorAll){(function(){var T=F,U=document.createElement("div");U.innerHTML="

";if(U.querySelectorAll&&U.querySelectorAll(".TEST").length===0){return}F=function(Y,X,V,W){X=X||document;if(!W&&X.nodeType===9&&!Q(X)){try{return E(X.querySelectorAll(Y),V)}catch(Z){}}return T(Y,X,V,W)};F.find=T.find;F.filter=T.filter;F.selectors=T.selectors;F.matches=T.matches})()}if(document.getElementsByClassName&&document.documentElement.getElementsByClassName){(function(){var T=document.createElement("div");T.innerHTML="
";if(T.getElementsByClassName("e").length===0){return}T.lastChild.className="e";if(T.getElementsByClassName("e").length===1){return}I.order.splice(1,0,"CLASS");I.find.CLASS=function(U,V,W){if(typeof V.getElementsByClassName!=="undefined"&&!W){return V.getElementsByClassName(U[1])}}})()}function P(U,Z,Y,ad,aa,ac){var ab=U=="previousSibling"&&!ac;for(var W=0,V=ad.length;W0){X=T;break}}}T=T[U]}ad[W]=X}}}var K=document.compareDocumentPosition?function(U,T){return U.compareDocumentPosition(T)&16}:function(U,T){return U!==T&&(U.contains?U.contains(T):true)};var Q=function(T){return T.nodeType===9&&T.documentElement.nodeName!=="HTML"||!!T.ownerDocument&&Q(T.ownerDocument)};var J=function(T,aa){var W=[],X="",Y,V=aa.nodeType?[aa]:aa;while((Y=I.match.PSEUDO.exec(T))){X+=Y[0];T=T.replace(I.match.PSEUDO,"")}T=I.relative[T]?T+"*":T;for(var Z=0,U=V.length;Z0||T.offsetHeight>0};F.selectors.filters.animated=function(T){return o.grep(o.timers,function(U){return T===U.elem}).length};o.multiFilter=function(V,T,U){if(U){V=":not("+V+")"}return F.matches(V,T)};o.dir=function(V,U){var T=[],W=V[U];while(W&&W!=document){if(W.nodeType==1){T.push(W)}W=W[U]}return T};o.nth=function(X,T,V,W){T=T||1;var U=0;for(;X;X=X[V]){if(X.nodeType==1&&++U==T){break}}return X};o.sibling=function(V,U){var T=[];for(;V;V=V.nextSibling){if(V.nodeType==1&&V!=U){T.push(V)}}return T};return;l.Sizzle=F})();o.event={add:function(I,F,H,K){if(I.nodeType==3||I.nodeType==8){return}if(I.setInterval&&I!=l){I=l}if(!H.guid){H.guid=this.guid++}if(K!==g){var G=H;H=this.proxy(G);H.data=K}var E=o.data(I,"events")||o.data(I,"events",{}),J=o.data(I,"handle")||o.data(I,"handle",function(){return typeof o!=="undefined"&&!o.event.triggered?o.event.handle.apply(arguments.callee.elem,arguments):g});J.elem=I;o.each(F.split(/\s+/),function(M,N){var O=N.split(".");N=O.shift();H.type=O.slice().sort().join(".");var L=E[N];if(o.event.specialAll[N]){o.event.specialAll[N].setup.call(I,K,O)}if(!L){L=E[N]={};if(!o.event.special[N]||o.event.special[N].setup.call(I,K,O)===false){if(I.addEventListener){I.addEventListener(N,J,false)}else{if(I.attachEvent){I.attachEvent("on"+N,J)}}}}L[H.guid]=H;o.event.global[N]=true});I=null},guid:1,global:{},remove:function(K,H,J){if(K.nodeType==3||K.nodeType==8){return}var G=o.data(K,"events"),F,E;if(G){if(H===g||(typeof H==="string"&&H.charAt(0)==".")){for(var I in G){this.remove(K,I+(H||""))}}else{if(H.type){J=H.handler;H=H.type}o.each(H.split(/\s+/),function(M,O){var Q=O.split(".");O=Q.shift();var N=RegExp("(^|\\.)"+Q.slice().sort().join(".*\\.")+"(\\.|$)");if(G[O]){if(J){delete G[O][J.guid]}else{for(var P in G[O]){if(N.test(G[O][P].type)){delete G[O][P]}}}if(o.event.specialAll[O]){o.event.specialAll[O].teardown.call(K,Q)}for(F in G[O]){break}if(!F){if(!o.event.special[O]||o.event.special[O].teardown.call(K,Q)===false){if(K.removeEventListener){K.removeEventListener(O,o.data(K,"handle"),false)}else{if(K.detachEvent){K.detachEvent("on"+O,o.data(K,"handle"))}}}F=null;delete G[O]}}})}for(F in G){break}if(!F){var L=o.data(K,"handle");if(L){L.elem=null}o.removeData(K,"events");o.removeData(K,"handle")}}},trigger:function(I,K,H,E){var G=I.type||I;if(!E){I=typeof I==="object"?I[h]?I:o.extend(o.Event(G),I):o.Event(G);if(G.indexOf("!")>=0){I.type=G=G.slice(0,-1);I.exclusive=true}if(!H){I.stopPropagation();if(this.global[G]){o.each(o.cache,function(){if(this.events&&this.events[G]){o.event.trigger(I,K,this.handle.elem)}})}}if(!H||H.nodeType==3||H.nodeType==8){return g}I.result=g;I.target=H;K=o.makeArray(K);K.unshift(I)}I.currentTarget=H;var J=o.data(H,"handle");if(J){J.apply(H,K)}if((!H[G]||(o.nodeName(H,"a")&&G=="click"))&&H["on"+G]&&H["on"+G].apply(H,K)===false){I.result=false}if(!E&&H[G]&&!I.isDefaultPrevented()&&!(o.nodeName(H,"a")&&G=="click")){this.triggered=true;try{H[G]()}catch(L){}}this.triggered=false;if(!I.isPropagationStopped()){var F=H.parentNode||H.ownerDocument;if(F){o.event.trigger(I,K,F,true)}}},handle:function(K){var J,E;K=arguments[0]=o.event.fix(K||l.event);K.currentTarget=this;var L=K.type.split(".");K.type=L.shift();J=!L.length&&!K.exclusive;var I=RegExp("(^|\\.)"+L.slice().sort().join(".*\\.")+"(\\.|$)");E=(o.data(this,"events")||{})[K.type];for(var G in E){var H=E[G];if(J||I.test(H.type)){K.handler=H;K.data=H.data;var F=H.apply(this,arguments);if(F!==g){K.result=F;if(F===false){K.preventDefault();K.stopPropagation()}}if(K.isImmediatePropagationStopped()){break}}}},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(H){if(H[h]){return H}var F=H;H=o.Event(F);for(var G=this.props.length,J;G;){J=this.props[--G];H[J]=F[J]}if(!H.target){H.target=H.srcElement||document}if(H.target.nodeType==3){H.target=H.target.parentNode}if(!H.relatedTarget&&H.fromElement){H.relatedTarget=H.fromElement==H.target?H.toElement:H.fromElement}if(H.pageX==null&&H.clientX!=null){var I=document.documentElement,E=document.body;H.pageX=H.clientX+(I&&I.scrollLeft||E&&E.scrollLeft||0)-(I.clientLeft||0);H.pageY=H.clientY+(I&&I.scrollTop||E&&E.scrollTop||0)-(I.clientTop||0)}if(!H.which&&((H.charCode||H.charCode===0)?H.charCode:H.keyCode)){H.which=H.charCode||H.keyCode}if(!H.metaKey&&H.ctrlKey){H.metaKey=H.ctrlKey}if(!H.which&&H.button){H.which=(H.button&1?1:(H.button&2?3:(H.button&4?2:0)))}return H},proxy:function(F,E){E=E||function(){return F.apply(this,arguments)};E.guid=F.guid=F.guid||E.guid||this.guid++;return E},special:{ready:{setup:B,teardown:function(){}}},specialAll:{live:{setup:function(E,F){o.event.add(this,F[0],c)},teardown:function(G){if(G.length){var E=0,F=RegExp("(^|\\.)"+G[0]+"(\\.|$)");o.each((o.data(this,"events").live||{}),function(){if(F.test(this.type)){E++}});if(E<1){o.event.remove(this,G[0],c)}}}}}};o.Event=function(E){if(!this.preventDefault){return new o.Event(E)}if(E&&E.type){this.originalEvent=E;this.type=E.type}else{this.type=E}this.timeStamp=e();this[h]=true};function k(){return false}function u(){return true}o.Event.prototype={preventDefault:function(){this.isDefaultPrevented=u;var E=this.originalEvent;if(!E){return}if(E.preventDefault){E.preventDefault()}E.returnValue=false},stopPropagation:function(){this.isPropagationStopped=u;var E=this.originalEvent;if(!E){return}if(E.stopPropagation){E.stopPropagation()}E.cancelBubble=true},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u;this.stopPropagation()},isDefaultPrevented:k,isPropagationStopped:k,isImmediatePropagationStopped:k};var a=function(F){var E=F.relatedTarget;while(E&&E!=this){try{E=E.parentNode}catch(G){E=this}}if(E!=this){F.type=F.data;o.event.handle.apply(this,arguments)}};o.each({mouseover:"mouseenter",mouseout:"mouseleave"},function(F,E){o.event.special[E]={setup:function(){o.event.add(this,F,a,E)},teardown:function(){o.event.remove(this,F,a)}}});o.fn.extend({bind:function(F,G,E){return F=="unload"?this.one(F,G,E):this.each(function(){o.event.add(this,F,E||G,E&&G)})},one:function(G,H,F){var E=o.event.proxy(F||H,function(I){o(this).unbind(I,E);return(F||H).apply(this,arguments)});return this.each(function(){o.event.add(this,G,E,F&&H)})},unbind:function(F,E){return this.each(function(){o.event.remove(this,F,E)})},trigger:function(E,F){return this.each(function(){o.event.trigger(E,F,this)})},triggerHandler:function(E,G){if(this[0]){var F=o.Event(E);F.preventDefault();F.stopPropagation();o.event.trigger(F,G,this[0]);return F.result}},toggle:function(G){var E=arguments,F=1;while(F=0){var E=G.slice(I,G.length);G=G.slice(0,I)}var H="GET";if(J){if(o.isFunction(J)){K=J;J=null}else{if(typeof J==="object"){J=o.param(J);H="POST"}}}var F=this;o.ajax({url:G,type:H,dataType:"html",data:J,complete:function(M,L){if(L=="success"||L=="notmodified"){F.html(E?o("
").append(M.responseText.replace(//g,"")).find(E):M.responseText)}if(K){F.each(K,[M.responseText,L,M])}}});return this},serialize:function(){return o.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?o.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password|search/i.test(this.type))}).map(function(E,F){var G=o(this).val();return G==null?null:o.isArray(G)?o.map(G,function(I,H){return{name:F.name,value:I}}):{name:F.name,value:G}}).get()}});o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(E,F){o.fn[F]=function(G){return this.bind(F,G)}});var r=e();o.extend({get:function(E,G,H,F){if(o.isFunction(G)){H=G;G=null}return o.ajax({type:"GET",url:E,data:G,success:H,dataType:F})},getScript:function(E,F){return o.get(E,null,F,"script")},getJSON:function(E,F,G){return o.get(E,F,G,"json")},post:function(E,G,H,F){if(o.isFunction(G)){H=G;G={}}return o.ajax({type:"POST",url:E,data:G,success:H,dataType:F})},ajaxSetup:function(E){o.extend(o.ajaxSettings,E)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return l.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()},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(M){M=o.extend(true,M,o.extend(true,{},o.ajaxSettings,M));var W,F=/=\?(&|$)/g,R,V,G=M.type.toUpperCase();if(M.data&&M.processData&&typeof M.data!=="string"){M.data=o.param(M.data)}if(M.dataType=="jsonp"){if(G=="GET"){if(!M.url.match(F)){M.url+=(M.url.match(/\?/)?"&":"?")+(M.jsonp||"callback")+"=?"}}else{if(!M.data||!M.data.match(F)){M.data=(M.data?M.data+"&":"")+(M.jsonp||"callback")+"=?"}}M.dataType="json"}if(M.dataType=="json"&&(M.data&&M.data.match(F)||M.url.match(F))){W="jsonp"+r++;if(M.data){M.data=(M.data+"").replace(F,"="+W+"$1")}M.url=M.url.replace(F,"="+W+"$1");M.dataType="script";l[W]=function(X){V=X;I();L();l[W]=g;try{delete l[W]}catch(Y){}if(H){H.removeChild(T)}}}if(M.dataType=="script"&&M.cache==null){M.cache=false}if(M.cache===false&&G=="GET"){var E=e();var U=M.url.replace(/(\?|&)_=.*?(&|$)/,"$1_="+E+"$2");M.url=U+((U==M.url)?(M.url.match(/\?/)?"&":"?")+"_="+E:"")}if(M.data&&G=="GET"){M.url+=(M.url.match(/\?/)?"&":"?")+M.data;M.data=null}if(M.global&&!o.active++){o.event.trigger("ajaxStart")}var Q=/^(\w+:)?\/\/([^\/?#]+)/.exec(M.url);if(M.dataType=="script"&&G=="GET"&&Q&&(Q[1]&&Q[1]!=location.protocol||Q[2]!=location.host)){var H=document.getElementsByTagName("head")[0];var T=document.createElement("script");T.src=M.url;if(M.scriptCharset){T.charset=M.scriptCharset}if(!W){var O=false;T.onload=T.onreadystatechange=function(){if(!O&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){O=true;I();L();T.onload=T.onreadystatechange=null;H.removeChild(T)}}}H.appendChild(T);return g}var K=false;var J=M.xhr();if(M.username){J.open(G,M.url,M.async,M.username,M.password)}else{J.open(G,M.url,M.async)}try{if(M.data){J.setRequestHeader("Content-Type",M.contentType)}if(M.ifModified){J.setRequestHeader("If-Modified-Since",o.lastModified[M.url]||"Thu, 01 Jan 1970 00:00:00 GMT")}J.setRequestHeader("X-Requested-With","XMLHttpRequest");J.setRequestHeader("Accept",M.dataType&&M.accepts[M.dataType]?M.accepts[M.dataType]+", */*":M.accepts._default)}catch(S){}if(M.beforeSend&&M.beforeSend(J,M)===false){if(M.global&&!--o.active){o.event.trigger("ajaxStop")}J.abort();return false}if(M.global){o.event.trigger("ajaxSend",[J,M])}var N=function(X){if(J.readyState==0){if(P){clearInterval(P);P=null;if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}}else{if(!K&&J&&(J.readyState==4||X=="timeout")){K=true;if(P){clearInterval(P);P=null}R=X=="timeout"?"timeout":!o.httpSuccess(J)?"error":M.ifModified&&o.httpNotModified(J,M.url)?"notmodified":"success";if(R=="success"){try{V=o.httpData(J,M.dataType,M)}catch(Z){R="parsererror"}}if(R=="success"){var Y;try{Y=J.getResponseHeader("Last-Modified")}catch(Z){}if(M.ifModified&&Y){o.lastModified[M.url]=Y}if(!W){I()}}else{o.handleError(M,J,R)}L();if(X){J.abort()}if(M.async){J=null}}}};if(M.async){var P=setInterval(N,13);if(M.timeout>0){setTimeout(function(){if(J&&!K){N("timeout")}},M.timeout)}}try{J.send(M.data)}catch(S){o.handleError(M,J,null,S)}if(!M.async){N()}function I(){if(M.success){M.success(V,R)}if(M.global){o.event.trigger("ajaxSuccess",[J,M])}}function L(){if(M.complete){M.complete(J,R)}if(M.global){o.event.trigger("ajaxComplete",[J,M])}if(M.global&&!--o.active){o.event.trigger("ajaxStop")}}return J},handleError:function(F,H,E,G){if(F.error){F.error(H,E,G)}if(F.global){o.event.trigger("ajaxError",[H,F,G])}},active:0,httpSuccess:function(F){try{return !F.status&&location.protocol=="file:"||(F.status>=200&&F.status<300)||F.status==304||F.status==1223}catch(E){}return false},httpNotModified:function(G,E){try{var H=G.getResponseHeader("Last-Modified");return G.status==304||H==o.lastModified[E]}catch(F){}return false},httpData:function(J,H,G){var F=J.getResponseHeader("content-type"),E=H=="xml"||!H&&F&&F.indexOf("xml")>=0,I=E?J.responseXML:J.responseText;if(E&&I.documentElement.tagName=="parsererror"){throw"parsererror"}if(G&&G.dataFilter){I=G.dataFilter(I,H)}if(typeof I==="string"){if(H=="script"){o.globalEval(I)}if(H=="json"){I=l["eval"]("("+I+")")}}return I},param:function(E){var G=[];function H(I,J){G[G.length]=encodeURIComponent(I)+"="+encodeURIComponent(J)}if(o.isArray(E)||E.jquery){o.each(E,function(){H(this.name,this.value)})}else{for(var F in E){if(o.isArray(E[F])){o.each(E[F],function(){H(F,this)})}else{H(F,o.isFunction(E[F])?E[F]():E[F])}}}return G.join("&").replace(/%20/g,"+")}});var m={},n,d=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];function t(F,E){var G={};o.each(d.concat.apply([],d.slice(0,E)),function(){G[this]=F});return G}o.fn.extend({show:function(J,L){if(J){return this.animate(t("show",3),J,L)}else{for(var H=0,F=this.length;H").appendTo("body");K=I.css("display");if(K==="none"){K="block"}I.remove();m[G]=K}o.data(this[H],"olddisplay",K)}}for(var H=0,F=this.length;H=0;H--){if(G[H].elem==this){if(E){G[H](true)}G.splice(H,1)}}});if(!E){this.dequeue()}return this}});o.each({slideDown:t("show",1),slideUp:t("hide",1),slideToggle:t("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(E,F){o.fn[E]=function(G,H){return this.animate(F,G,H)}});o.extend({speed:function(G,H,F){var E=typeof G==="object"?G:{complete:F||!F&&H||o.isFunction(G)&&G,duration:G,easing:F&&H||H&&!o.isFunction(H)&&H};E.duration=o.fx.off?0:typeof E.duration==="number"?E.duration:o.fx.speeds[E.duration]||o.fx.speeds._default;E.old=E.complete;E.complete=function(){if(E.queue!==false){o(this).dequeue()}if(o.isFunction(E.old)){E.old.call(this)}};return E},easing:{linear:function(G,H,E,F){return E+F*G},swing:function(G,H,E,F){return((-Math.cos(G*Math.PI)/2)+0.5)*F+E}},timers:[],fx:function(F,E,G){this.options=E;this.elem=F;this.prop=G;if(!E.orig){E.orig={}}}});o.fx.prototype={update:function(){if(this.options.step){this.options.step.call(this.elem,this.now,this)}(o.fx.step[this.prop]||o.fx.step._default)(this);if((this.prop=="height"||this.prop=="width")&&this.elem.style){this.elem.style.display="block"}},cur:function(F){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null)){return this.elem[this.prop]}var E=parseFloat(o.css(this.elem,this.prop,F));return E&&E>-10000?E:parseFloat(o.curCSS(this.elem,this.prop))||0},custom:function(I,H,G){this.startTime=e();this.start=I;this.end=H;this.unit=G||this.unit||"px";this.now=this.start;this.pos=this.state=0;var E=this;function F(J){return E.step(J)}F.elem=this.elem;if(F()&&o.timers.push(F)&&!n){n=setInterval(function(){var K=o.timers;for(var J=0;J=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var E=true;for(var F in this.options.curAnim){if(this.options.curAnim[F]!==true){E=false}}if(E){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(o.css(this.elem,"display")=="none"){this.elem.style.display="block"}}if(this.options.hide){o(this.elem).hide()}if(this.options.hide||this.options.show){for(var I in this.options.curAnim){o.attr(this.elem.style,I,this.options.orig[I])}}this.options.complete.call(this.elem)}return false}else{var J=G-this.startTime;this.state=J/this.options.duration;this.pos=o.easing[this.options.easing||(o.easing.swing?"swing":"linear")](this.state,J,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update()}return true}};o.extend(o.fx,{speeds:{slow:600,fast:200,_default:400},step:{opacity:function(E){o.attr(E.elem.style,"opacity",E.now)},_default:function(E){if(E.elem.style&&E.elem.style[E.prop]!=null){E.elem.style[E.prop]=E.now+E.unit}else{E.elem[E.prop]=E.now}}}});if(document.documentElement.getBoundingClientRect){o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}var G=this[0].getBoundingClientRect(),J=this[0].ownerDocument,F=J.body,E=J.documentElement,L=E.clientTop||F.clientTop||0,K=E.clientLeft||F.clientLeft||0,I=G.top+(self.pageYOffset||o.boxModel&&E.scrollTop||F.scrollTop)-L,H=G.left+(self.pageXOffset||o.boxModel&&E.scrollLeft||F.scrollLeft)-K;return{top:I,left:H}}}else{o.fn.offset=function(){if(!this[0]){return{top:0,left:0}}if(this[0]===this[0].ownerDocument.body){return o.offset.bodyOffset(this[0])}o.offset.initialized||o.offset.initialize();var J=this[0],G=J.offsetParent,F=J,O=J.ownerDocument,M,H=O.documentElement,K=O.body,L=O.defaultView,E=L.getComputedStyle(J,null),N=J.offsetTop,I=J.offsetLeft;while((J=J.parentNode)&&J!==K&&J!==H){M=L.getComputedStyle(J,null);N-=J.scrollTop,I-=J.scrollLeft;if(J===G){N+=J.offsetTop,I+=J.offsetLeft;if(o.offset.doesNotAddBorder&&!(o.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(J.tagName))){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}F=G,G=J.offsetParent}if(o.offset.subtractsBorderForOverflowNotVisible&&M.overflow!=="visible"){N+=parseInt(M.borderTopWidth,10)||0,I+=parseInt(M.borderLeftWidth,10)||0}E=M}if(E.position==="relative"||E.position==="static"){N+=K.offsetTop,I+=K.offsetLeft}if(E.position==="fixed"){N+=Math.max(H.scrollTop,K.scrollTop),I+=Math.max(H.scrollLeft,K.scrollLeft)}return{top:N,left:I}}}o.offset={initialize:function(){if(this.initialized){return}var L=document.body,F=document.createElement("div"),H,G,N,I,M,E,J=L.style.marginTop,K='
';M={position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"};for(E in M){F.style[E]=M[E]}F.innerHTML=K;L.insertBefore(F,L.firstChild);H=F.firstChild,G=H.firstChild,I=H.nextSibling.firstChild.firstChild;this.doesNotAddBorder=(G.offsetTop!==5);this.doesAddBorderForTableAndCells=(I.offsetTop===5);H.style.overflow="hidden",H.style.position="relative";this.subtractsBorderForOverflowNotVisible=(G.offsetTop===-5);L.style.marginTop="1px";this.doesNotIncludeMarginInBodyOffset=(L.offsetTop===0);L.style.marginTop=J;L.removeChild(F);this.initialized=true},bodyOffset:function(E){o.offset.initialized||o.offset.initialize();var G=E.offsetTop,F=E.offsetLeft;if(o.offset.doesNotIncludeMarginInBodyOffset){G+=parseInt(o.curCSS(E,"marginTop",true),10)||0,F+=parseInt(o.curCSS(E,"marginLeft",true),10)||0}return{top:G,left:F}}};o.fn.extend({position:function(){var I=0,H=0,F;if(this[0]){var G=this.offsetParent(),J=this.offset(),E=/^body|html$/i.test(G[0].tagName)?{top:0,left:0}:G.offset();J.top-=j(this,"marginTop");J.left-=j(this,"marginLeft");E.top+=j(G,"borderTopWidth");E.left+=j(G,"borderLeftWidth");F={top:J.top-E.top,left:J.left-E.left}}return F},offsetParent:function(){var E=this[0].offsetParent||document.body;while(E&&(!/^body|html$/i.test(E.tagName)&&o.css(E,"position")=="static")){E=E.offsetParent}return o(E)}});o.each(["Left","Top"],function(F,E){var G="scroll"+E;o.fn[G]=function(H){if(!this[0]){return null}return H!==g?this.each(function(){this==l||this==document?l.scrollTo(!F?H:o(l).scrollLeft(),F?H:o(l).scrollTop()):this[G]=H}):this[0]==l||this[0]==document?self[F?"pageYOffset":"pageXOffset"]||o.boxModel&&document.documentElement[G]||document.body[G]:this[0][G]}});o.each(["Height","Width"],function(I,G){var E=I?"Left":"Top",H=I?"Right":"Bottom",F=G.toLowerCase();o.fn["inner"+G]=function(){return this[0]?o.css(this[0],F,false,"padding"):null};o.fn["outer"+G]=function(K){return this[0]?o.css(this[0],F,false,K?"margin":"border"):null};var J=G.toLowerCase();o.fn[J]=function(K){return this[0]==l?document.compatMode=="CSS1Compat"&&document.documentElement["client"+G]||document.body["client"+G]:this[0]==document?Math.max(document.documentElement["client"+G],document.body["scroll"+G],document.documentElement["scroll"+G],document.body["offset"+G],document.documentElement["offset"+G]):K===g?(this.length?o.css(this[0],J):null):this.css(J,typeof K==="string"?K:K+"px")}})})(); /* --------- JQUERY.PLUGINS.JS --------- */ jQuery.fn.extend({ check: function() { return this.each(function() { this.checked = true; }); }, uncheck: function() { return this.each(function() { this.checked = false; }); } }); jQuery.extend({ htmlEncode : function(html) { if ( !html ) return ''; html = html.replace( /&/g, '&' ); html = html.replace( //g, '>' ); return html; }, htmlDecode : function(html) { if ( !html ) return '' ; html = html.replace( />/g, '>' ); html = html.replace( /</g, '<' ); html = html.replace( /&/g, '&' ); return html; } }); /* defaultValue plugin */ (function($) { $.fn.defaultValue = function() { var elements = this; var defaultArgs = arguments; return elements.each(function(index) { var $el = $(this); var defVal = defaultArgs[index] || $el.attr('title'); var defClass = 'deki-default-value'; // make an arg? if ($el.val() == '') { // initialize only if no value $el.val(defVal).addClass(defClass); } $el.focus(function() { if ($el.hasClass(defClass)) { $el.val('').removeClass(defClass); } }) .blur(function() { if ($el.val() == '') { $el.val(defVal).addClass(defClass); } }) // make sure we don't submit the default .parents('form:first').submit(function() { if ($el.hasClass(defClass)) { $el.val(''); } }) ; // end $el }); }; })(jQuery); /* /defaultValue plugin */ /* --------- MINDTOUCH.UTIL.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 */ /* global Deki object */ if (typeof Deki == "undefined") { var Deki = {}; } // setup our jQuery reference Deki.$ = jQuery; Deki.url = {}; Deki.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; } Deki.util = {}; Deki.util.Dom = {}; Deki.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}; } Deki.util.Dom.getText = function(node) { if(typeof(node.innerText) != 'undefined') { return node.innerText; } else { return node.textContent; } } Deki.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; }; Deki.util.Dom.setInnerText = function(el, text) { if(typeof(el.innerText) != 'undefined') el.innerText = text; else el.textContent = text; }; Deki.publish = function(c,d) { if((name != null) && (name.indexOf("*") == -1)) Deki._query_store[c] = d; window.PageBus.publish(c,d); }; Deki.subscribe = function(c,o,f,d) { window.PageBus.subscribe(c,o,f,d) }; Deki._query_store = { }; Deki.query = function(c) { return Deki._query_store[c]; }; Deki.hasValue = function(v, d) { return (v != 'undefined') && (v != null) && (v != '') ? v : ((typeof d != 'undefined') ? d : null); }; Deki.Editor = null; Deki.LoadEditor = function( sectionElement, action ) { if ( Deki.Editor ) { var oEditor = Deki.Editor; if ( oEditor.IsLoading || oEditor.IsStarted ) { return false; } if ( oEditor.SectionToEdit ) { if ( !oEditor.Cancel() ) { return false; } } // if we have a message, hide it Deki.$('#sessionMsg').hide(); oEditor.IsLoading = true; } var oCurrentSection = '', oSectionToEdit = null; if ( !YAHOO.lang.isValue( sectionElement ) ) { Deki.$('#title').hide(); } else { oSectionToEdit = Deki.$( sectionElement ).parent().parent().parent(); // edit section oCurrentSection = oSectionToEdit.attr('id').substr(8); } var callback = { success : function(o) { var oResponse = YAHOO.lang.JSON.parse( o.responseText ); if ( YAHOO.lang.isArray(oResponse.scripts) ) { YAHOO.util.Get.script( oResponse.scripts, { onSuccess : function() { if ( Deki.Editor ) { Deki.Editor.Start(oResponse, oSectionToEdit, oCurrentSection); } } } ); } }, failure : function(o) { if ( Deki.Editor ) Deki.Editor.Cancel() } }; var sUrl = []; if ( window.location.search.length > 0 ) { var queryString = window.location.search.substring(1); sUrl = sUrl.concat(queryString.split('&')); } if ( ! /(&|\?)text=/.test( window.location.search ) ) sUrl.push('text=' + encodeURIComponent(Deki.PageTitle)); if ( ! /(&|\?)pageId=/.test( window.location.search ) ) sUrl.push('pageId=' + encodeURIComponent(Deki.PageId)); if ( ! /(&|\?)sectionId=/.test( window.location.search ) ) sUrl.push('sectionId=' + encodeURIComponent(oCurrentSection)); if ( action && action == 'source' ) { sUrl.push('source=true'); } sUrl = '/deki/gui/loadeditor.php' + (( sUrl.length > 0 ) ? '?' : '') + sUrl.join('&'); YAHOO.util.Connect.asyncRequest( 'GET', sUrl, callback ); return false; }; /* --------- EDITOR.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 DekiEditor = function( sEditAreaId ) { this.EditArea = sEditAreaId; this.Instance = null; this.IsLoading = false; this.IsStarted = false; this.ReadOnly = false; this.SectionToEdit = null; this.CurrentSection = new String(); this.OldContent = null; this.InitContent = null; this.Container = null; this.Init(); } DekiEditor.prototype = { Init: function() { }, BeforeStart : function() { }, Start : function( editorContent, sectionToEdit, currentSection ) { this.SectionToEdit = ( sectionToEdit ) ? sectionToEdit : Deki.$( "#pageText" ); // edit page if ( this.SectionToEdit.length == 0 ) { alert( 'You did not define the ID pageText in your skin.' ); this.Cancel(); return; } if ( YAHOO.lang.isString( currentSection ) ) { this.CurrentSection = currentSection; } this.BeforeStart(); this.OldContent = this.SectionToEdit.html(); if ( YAHOO.lang.isValue( editorContent ) ) { if ( this.SectionToEdit.find( '#' + this.EditArea ).length == 0 ) { this.SectionToEdit.html( editorContent.content ); } this.SectionToEdit.append( editorContent.script ); Deki.$( '#wpEditTime' ).val( editorContent.edittime ); Deki.$( '#wpSection' ).val( this.CurrentSection ); } this.ReadOnly = Deki.EditorReadOnly || false; var wait = Deki.$( "#formLoading" ); wait.show(); this.Instance = null; if ( this.IsSupproted() ) { this.CreateEditor(); } else { var oSelf = this; Deki.$( "#wpFormButtons input[name=doSave]" ).click(function() { oSelf.Save(); return true; }); Deki.$( "#wpFormButtons input[name=doCancel]" ).click(function() { oSelf.Cancel(); }); var textarea = Deki.$( "#" + this.EditArea ); textarea.show(); this.InitContent = textarea.val(); Deki.$( "#wpFormButtons" ).show(); } wait.hide(); Deki.$( '.hideforedit' ).hide(); this.IsStarted = true; this.IsLoading = false; }, /** * Creates the editor instance * @abstract */ CreateEditor : function() { }, IsSupproted : function() { return true; }, BeforeSave : function() { }, Save : function() { if ( this.ReadOnly ) { return false; } this.BeforeSave(); Deki.$( '#quicksavewait' ).show(); this.IsStarted = false; }, BeforeCancel : function() { }, Cancel : function() { var sCancelMessage; if ( !this.ReadOnly ) { sCancelMessage = ( YAHOO.lang.isFunction( window.onbeforeunload ) ) ? window.onbeforeunload() : this.IsChanged(); } if ( YAHOO.lang.isValue( sCancelMessage ) ) { if ( !confirm("Are you sure you want to navigate away from the editor?\n\n" + sCancelMessage + "\n\nPress OK to continue, or Cancel to stay on the current editor.") ) { return false; } } this.IsStarted = false; this.IsLoading = false; this.BeforeCancel(); Deki.$( '#title' ).show(); // if we're editing an existing page Deki.$('.hideforedit').show(); if (typeof Deki.CancelUrl != 'undefined') { window.location = Deki.CancelUrl; } else if ( YAHOO.lang.isBoolean( Deki.StaticEditor ) && Deki.StaticEditor ) { window.history.back(); } else if ( this.SectionToEdit ) { if ( !YAHOO.lang.isNull(this.OldContent) ) { this.SectionToEdit.html( this.OldContent ); } HookSectionEditBehavior(); this.SectionToEdit = null; this.Instance = null; this.CurrentSection = ''; this.OldContent = null; this.InitContent = null; } return true; }, GetEditorHeight : function() { if ( !this.Container || YAHOO.lang.isValue( this.CurrentSection ) ) { return 400; } var newHeight = YAHOO.util.Dom.getViewportHeight() - YAHOO.util.Dom.getY( this.Container ) - ( YAHOO.env.ua.ie > 0 ? 7 : 12 ); if ( newHeight < 400 ) { newHeight = 400; } return newHeight; }, IsChanged : function() { } } /* --------- COMMENTS.JS --------- */ /* * MindTouch Deki - enterprise collaboration and integration platform * Copyright (C) 2006-2009 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 MTComments() {}; MTComments.ViewingAll = false; MTComments.HookBehavior = function() { MTComments.HookSubmitOnclick(); }; //will make adding comments an inline experience MTComments.HookSubmitOnclick = function() { Deki.$('input[name=commentSubmit]').click(function() { var cn = document.getElementById('wpCommentNum'); if (cn && cn.value > 0) { return; } MTComments.PostComment(this); return false; }); }; MTComments.PostComment = function(submitButton, commentnum) { var comment = Deki.$(submitButton).parents('form').find('textarea').val(); Deki.$.post( '/deki/gui/comments.php', { 'action' : 'post', 'titleId' : Deki.PageId, 'comment' : comment, 'showAll' : MTComments.ViewingAll, 'commentNum' : commentnum ? commentnum : null }, function( data ) { MTComments.SetComment( data ); }, 'html' ); }; 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 == '') { Deki.$.get( '/deki/gui/comments.php', { 'action' : 'edit', 'titleId' : Deki.PageId, 'commentNum' : commentnum }, function( data ) { commentform.innerHTML = data; //hook behavior to cancel link Deki.$('form#commentEditForm textarea[name=wpComment]').focus(); document.getElementById('commentCancel'+commentnum).onclick = function() { MTComments.ShowComment(commentnum); return false; }; Deki.$('form#commentEditForm input[name=commentSubmit]').click(function() { MTComments.PostComment(this, commentnum); return false; }); }, 'html' ); } commenttext.style.display = 'none'; commentform.style.display = 'block'; return false; }; MTComments.DeleteComment = function(commentnum) { if (confirm(wfMsg('comment-delete'))) { Deki.$.get( '/deki/gui/comments.php', { 'action' : 'delete', 'titleId' : Deki.PageId, 'commentNum' : commentnum }, function( data ) { Deki.$( '#comment' + commentnum ).html( data ); }, 'html' ); } return false; }; MTComments.GetComments = function(commentcount) { if (commentcount == 'all') { MTComments.ViewingAll = true; } Deki.$.get( '/deki/gui/comments.php', { 'action' : 'show', 'titleId' : Deki.PageId, 'commentCount' : commentcount }, function( data ) { MTComments.SetComment( data ); }, 'html' ); 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){ Deki.$(domChunk).unbind('onclick'); Deki.$(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 Deki.$("body","html").css({height: "100%", width: "100%"}); Deki.$("html").css("overflow","hidden"); if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6 Deki.$("body").append("
"); Deki.$("#TB_overlay").click(tb_remove); } }else{//all others if(document.getElementById("TB_overlay") === null){ Deki.$("body").append("
"); Deki.$("#TB_overlay").click(tb_remove); } } if(tb_detectMacXFF()){ Deki.$("#TB_overlay").addClass("TB_overlayMacFFBGHack");//use png overlay so hide flash }else{ Deki.$("#TB_overlay").addClass("TB_overlayBG");//use background and opacity } if(caption===null){caption="";} Deki.$("body").append("
");//add loader to the page Deki.$('#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 = Deki.$("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; } Deki.$("#TB_window").append("
"+ '
'+TB_PrevHTML + ' ' + TB_NextHTML + '
' + TB_imageCount + "
"+caption+"" + "
"+caption+"
"); Deki.$("#TB_closeWindowButton").click(tb_remove); if (!(TB_PrevHTML === "")) { function goPrev(){ if(Deki.$(document).unbind("click",goPrev)){Deki.$(document).unbind("click",goPrev);} Deki.$("#TB_window").remove(); Deki.$("body").append("
"); tb_show(TB_PrevCaption, TB_PrevURL, imageGroup); return false; } Deki.$("#TB_prev").click(goPrev); } if (!(TB_NextHTML === "")) { function goNext(){ Deki.$("#TB_window").remove(); Deki.$("body").append("
"); tb_show(TB_NextCaption, TB_NextURL, imageGroup); return false; } Deki.$("#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(); Deki.$("#TB_load").remove(); Deki.$("#TB_ImageOff").click(tb_remove); Deki.$("#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_'); Deki.$("#TB_iframeContent").remove(); if(params['modal'] != "true"){//iframe no modal Deki.$("#TB_window").append(""); }else{//iframe modal Deki.$("#TB_overlay").unbind(); Deki.$("#TB_window").append(""); } }else{// not an iframe, ajax if(Deki.$("#TB_window").css("display") != "block"){ if(params['modal'] != "true"){//ajax no modal Deki.$("#TB_window").append("
"); }else{//ajax modal Deki.$("#TB_overlay").unbind(); Deki.$("#TB_window").append("
"); } }else{//this means the window is already up, we are just loading new content via ajax Deki.$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; Deki.$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; Deki.$("#TB_ajaxContent")[0].scrollTop = 0; Deki.$("#TB_ajaxWindowTitle").html(caption); } } Deki.$("#TB_closeWindowButton").click(tb_remove); if(url.indexOf('TB_inline') != -1){ Deki.$("#TB_ajaxContent").append(Deki.$('#' + params['inlineId']).children()); Deki.$("#TB_window").unload(function () { Deki.$('#' + params['inlineId']).append( Deki.$("#TB_ajaxContent").children() ); // move elements back when you're finished }); tb_position(); Deki.$("#TB_load").remove(); Deki.$("#TB_window").css({display:"block"}); }else if(url.indexOf('TB_iframe') != -1){ tb_position(); if(Deki.$.browser.safari){//safari needs help because it will not fire iframe onload Deki.$("#TB_load").remove(); Deki.$("#TB_window").css({display:"block"}); } }else{ Deki.$("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method tb_position(); Deki.$("#TB_load").remove(); tb_init("#TB_ajaxContent a.lightbox"); Deki.$("#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(){ Deki.$("#TB_load").remove(); Deki.$("#TB_window").css({display:"block"}); } function tb_remove() { Deki.$("#TB_imageOff").unbind("click"); Deki.$("#TB_closeWindowButton").unbind("click"); Deki.$("#TB_window").fadeOut("fast",function(){Deki.$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); Deki.$("#TB_load").remove(); if (typeof document.body.style.maxHeight == "undefined") {//if IE 6 Deki.$("body","html").css({height: "auto", width: "auto"}); Deki.$("html").css("overflow",""); } document.onkeydown = ""; document.onkeyup = ""; return false; } function tb_position() { Deki.$("#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 Deki.$("#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"); } } /* --------- PAGE_ALERTS.JS --------- */ var Deki = Deki || {}; Deki.PageAlerts = {}; //Deki.PageAlerts.init Deki.$(document).ready(function() { var $Alerts = Deki.$('#deki-page-alerts'); Deki.PageAlerts.$Toggle = $Alerts.find('div.toggle'); Deki.PageAlerts.$A = $Alerts.find('div.toggle a'); Deki.PageAlerts.$Form = $Alerts.find('form.options'); // only hook events if page alerts are enabled if (!$Alerts.hasClass('disabled')) { // hiding/showing the options Deki.PageAlerts.$A.click(Deki.PageAlerts.toggleOptions); // handle option selections Deki.PageAlerts.$Form.find(':radio').click(Deki.PageAlerts.changeStatus); // grab the current selection value Deki.PageAlerts.nLastStatus = Deki.PageAlerts.$Form.find(':checked').val(); } }); // hack for IE of course // stores the last radio button value Deki.PageAlerts.nLastStatus = null; Deki.PageAlerts.toggleOptions = function(event) { var bVisible = Deki.PageAlerts.$Toggle.hasClass('with-options'); Deki.PageAlerts.setOptionsVisibility(!bVisible); if (!bVisible) { // hook the hide event, once Deki.$('body').one('click', function() { Deki.PageAlerts.setOptionsVisibility(false); }); } return false; }; Deki.PageAlerts.setOptionsVisibility = function(visible) { if (visible) { // align the form to the right var tOffset = Deki.PageAlerts.$Toggle.offset(); var tWidth = Deki.PageAlerts.$Toggle.outerWidth(); var fWidth = Deki.PageAlerts.$Form.outerWidth(); var newLeft = (tOffset.left + tWidth) - fWidth; Deki.PageAlerts.$Form.css('left', newLeft); Deki.PageAlerts.$Toggle.addClass('with-options'); Deki.PageAlerts.$Form.show(); } else { Deki.PageAlerts.$Toggle.removeClass('with-options'); Deki.PageAlerts.$Form.hide(); // only blur when hiding the options Deki.PageAlerts.$A.blur(); } }; Deki.PageAlerts.changeStatus = function(event) { if (Deki.PageAlerts.nLastStatus != this.value) { Deki.PageAlerts.nLastStatus = this.value; // hide the menu so it seems like a "fast" operation Deki.PageAlerts.setOptionsVisibility(false); var sUrl = [ '/deki/gui/pageactions.php?action=setalerts', '&status=', encodeURIComponent(this.value), '&pageId=', encodeURIComponent(Deki.PageId) ]; // set the status to reflect an ajax request Deki.PageAlerts.$A.addClass('loading'); // post to deki/gui to perform the status change Deki.$.ajax({ url: sUrl.join(''), type: 'POST', data: {}, dataType: 'json', timeout: 10000, error: function() { Deki.PageAlerts.$A.removeClass('loading'); }, success: function(data) { // remove ajax loading Deki.PageAlerts.$A.removeClass('loading'); if (data.success) { Deki.PageAlerts.setStatus(data.subscribed, data.message); } else { MTMessage.Show('Error', data.message); // make the menu visible to change to a valid status Deki.PageAlerts.setOptionsVisibility(true); } } }); } }; Deki.PageAlerts.setStatus = function(bSubscribed, sStatus) { if (bSubscribed) { Deki.PageAlerts.$A.removeClass('off'); } else { Deki.PageAlerts.$A.addClass('off'); } // set the textual status if specified if (sStatus) { Deki.PageAlerts.$A.find('span.status').text(sStatus); } }; /* --------- 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 Deki == "undefined") { var Deki = {}; } Deki.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 Deki.nav.initProperties(); //Initialize hover Deki.nav.initHover(); Deki.nav.maxWidth = navMaxWidth; //Initialize click Deki.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 Deki.$("#" + navDivID).append(""); for(var i = 0; i < testClasses.length; i++) { var testClass = testClasses[i]; //Add class to test node Deki.$("#testNode").addClass(testClass); //Get background color var color = Deki.$("#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 Deki.$("#testNode").removeClass(testClass); } //--------------------------Determine padding and width----------------------- properties.linkWidth = parseInt(Deki.$("#testNode a").css("width")); properties.linkHeight = parseInt(Deki.$("#testNode a").css("height")) + parseInt(Deki.$("#testNode a").css("borderBottomWidth")); properties.linkPadLeft = parseInt(Deki.$("#testNode a").css("paddingLeft")); properties.linkPadRight = parseInt(Deki.$("#testNode a").css("paddingRight")); properties.imgPadRight = parseInt(Deki.$("#testNode img.nodeImage").css("paddingRight")); Deki.$("#testNode").addClass("selectedChild"); properties.selChildPadLeft = parseInt(Deki.$("#testNode a").css("paddingLeft")); properties.selChildPadRight = parseInt(Deki.$("#testNode a").css("paddingRight")); properties.selChildWidth = parseInt(Deki.$("#testNode a").css("width")); Deki.$("#testNode").removeClass("selectedChild").addClass("sibling"); properties.sibImgPadLeft = parseInt(Deki.$("#testNode img.nodeImage").css("paddingLeft")); properties.sibImgPadRight = parseInt(Deki.$("#testNode img.nodeImage").css("paddingRight")); //Remove test node Deki.$("#testNode").remove(); } ); }, //Initialize hover initHover: function() { //Get child nodes that are not closed var childNodes = Deki.$("#" + navDivID + " div.childNode").not(".closedNode").get(); //Add mouseover listener YAHOO.util.Event.addListener(childNodes, "mouseover", Deki.nav.mouseover); //Add mouseout listener YAHOO.util.Event.addListener(childNodes, "mouseout", Deki.nav.mouseout); //----------Debug---------- if(debug) { if(!YAHOO.util.Dom.inDocument("navDebug")) { Deki.$(document.body).append(""); } YAHOO.util.Event.addListener(Deki.$("div.node"), "mouseover", function() { Deki.$("#navDebug").html(this.className); } ); YAHOO.util.Event.addListener(Deki.$("div.node"), "mouseout", function() { Deki.$("#navDebug").html(""); } ); } }, //Remove hover removeHover: function() { var nodes = Deki.$("#" + navDivID + " div.node").get(); //Remove listeners YAHOO.util.Event.removeListener(nodes, "mouseover"); YAHOO.util.Event.removeListener(nodes, "mouseout"); }, //Reset hover resetHover: function() { Deki.nav.removeHover(); Deki.nav.initHover(); }, //Initialize click initClick: function() { var nodes = Deki.$("#" + navDivID + " div.node"); nodes.attr("onclick", "return false;"); //Add click handler YAHOO.util.Event.addListener(nodes.get(), "click", Deki.nav.click); }, //Remove click removeClick: function() { var nodes = Deki.$("#" + navDivID + " div.node"); nodes.attr("onclick", ""); //Add click handler YAHOO.util.Event.removeListener(nodes.get(), "click", Deki.nav.click); }, //Reset click resetClick: function() { Deki.nav.removeClick(); Deki.nav.initClick(); }, //Reset all handlers resetAllHandlers: function() { //Initialize click Deki.nav.resetClick(); //Reset hover Deki.nav.resetHover(); }, //Mouseover mouseover: function() { }, //Mouseout mouseout: function() { }, //Click click: function() { //Redirect turned on redirect = true; //Get previously selected node prevSelectedNode = Deki.$("#" + 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") || (Deki.$(selectedNode).attr("reload") == "1")) { redirectTime = 0; Deki.nav.animComplete(); return false; } //Hidden nodes if(YAHOO.util.Dom.hasClass(selectedNode, "moreNodes")) { Deki.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 Deki.nav.getData(); // KarenA: Bugfix #0002049 - prevented double question during leaving modified page return false; }, animComplete: function() { //Reset Hover Deki.nav.resetHover(); if(selectedNode) { Deki.$(selectedNode).find("a").css("backgroundColor", ""); } if(prevSelectedNode) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", ""); } //Start timer var disableNavWhenEditorIsLoaded = false; if(redirect && ((Deki.$(selectedNode).attr("reload") == "1") || !(disableNavWhenEditorIsLoaded && Deki.Editor && Deki.Editor.IsStarted))) { timeout = window.setTimeout(Deki.nav.redirect, redirectTime); } }, redirect: function() { // Opera doesn't support onbeforeunload event if ( YAHOO.env.ua.opera && Deki.Editor && Deki.Editor.Cancel && !Deki.Editor.Cancel() ) { return false; } var path = Deki.$(selectedNode).find("a").attr("href"); // SteveB: remove click handlers (which restores the default 'href' behavior) Deki.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 = Deki.$(selectedNode).attr("cd") || "1"; // children-data (0=data missing, nXYZ=known child) var selSiblingData = Deki.$(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 = Deki.$(selectedNode).attr("id").replace(new RegExp("^n"), ""); var scheme = window.location.protocol.replace(/:.*/, ''); var requestURL = "/@api/deki/site/nav/" + nodeID + "/" + request.join(",") + "?dream.in.scheme=" + scheme + "&dream.out.format=json" + exclude; if(Deki.nav.maxWidth > 0) { requestURL = requestURL + "&width=" + Deki.nav.maxWidth; } //Debug //Deki.$(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 Deki.$(selectedNode).attr("c", childNodes); //Append children Deki.$(selectedNode).after(childData); } //Partial children else if(partialChildren) { //Set list of child node IDs Deki.$(selectedNode).attr("c", childNodes); //Prepend siblings if(childData.pre) { Deki.$("#" + knownChild).before(childData.pre); } //Append siblings if(childData.post) { Deki.$(Deki.nav.getLastChild( Deki.$("#" + knownChild).get() ) ).after(childData.post); } //All children of the selected node have full sibling knowledge Deki.$( Deki.nav.common.getNodesFromAttr(selectedNode, "c") ).attr("sd", ""); } //------------Add siblings----------- if(allSiblings) { //Prepend siblings if(siblingData.pre) { Deki.$(selectedNode).before(siblingData.pre); } //Append siblings if(siblingData.post) { Deki.$(Deki.nav.getLastChild(selectedNode)).after(siblingData.post); } //Parent node has full child data Deki.$("#" + Deki.$(selectedNode).attr("p")).attr("cd", "").attr("c", siblingNodes); } //Update data states of selected node Deki.$(selectedNode).attr("cd", "").attr("sd", ""); //Re-initialize event handlers Deki.nav.resetAllHandlers(); //Start animation Deki.nav.startAnim(); } } ); } else { //Start animation Deki.nav.startAnim(); } }, //Get last child of node getLastChild: function(node) { var childNodes; while(true) { childNodes = Deki.$(node).attr("c"); if(childNodes) { childNodes = childNodes.split(","); node = Deki.$("#" + 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 = Deki.nav.common.getNodesFromAttr(selectedNode, "c"); } //Sibling if(YAHOO.util.Dom.hasClass(selectedNode, "sibling")) { Deki.nav.sibling.startAnim(); } //Child node else if(YAHOO.util.Dom.hasClass(selectedNode, "selectedChild")) { Deki.nav.child.startAnim(); } //Home node else if(YAHOO.util.Dom.hasClass(selectedNode, "homeNode")) { Deki.nav.docked.homeNode.startAnim(); } //Last docked else if(YAHOO.util.Dom.hasClass(selectedNode, "lastDocked")) { Deki.nav.docked.lastDocked.startAnim(); } //Mid docked else { Deki.nav.docked.midDocked.startAnim(); } }, //-------------------------------Common-------------------------------- common: { //Complete function handler onComplete: function(anim, completeFuncs) { if(completeFuncs) { if(completeFuncs.length) { for (var i=0; i 0 && YAHOO.env.ua.ie < 7) ? 0.1 : 0}}, //make collapsing sorta of work for IE6 animOpenCloseSpeed, YAHOO.util.Easing.easeIn ); anim.onComplete.subscribe( function() { Deki.$(nodes).addClass("closedNode"); } ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Open nodes openNodes: function(nodes, completeFuncs) { nodes = Deki.$(nodes).not(".hiddenNode"); Deki.$(nodes).show(); var anim = new YAHOO.util.Anim( nodes, {height: {to: properties.linkHeight}}, animOpenCloseSpeed, YAHOO.util.Easing.easeIn ); anim.onComplete.subscribe( function() { Deki.$(nodes).removeClass("closedNode"); } ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Compact image padding compactImagePad: function(nodes, completeFuncs) { if(animImagePadSpeed > 0) { var anim = new YAHOO.util.Anim( Deki.$(nodes).find("img.nodeImage").get(), {paddingLeft: {to: 0}, paddingRight: {to: properties.imgPadRight}}, animImagePadSpeed, YAHOO.util.Easing.easeIn ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); } else { Deki.$(nodes).find("img.nodeImage").css("paddingLeft", 0).css("paddingRight", properties.imgPadRight); Deki.nav.common.onComplete(null, completeFuncs); } }, //Expand image padding expandImagePad: function(nodes, completeFuncs) { if(animImagePadSpeed > 0) { var anim = new YAHOO.util.Anim( Deki.$(nodes).find("img.nodeImage").get(), {paddingLeft: {to: properties.sibImgPadLeft}, paddingRight: {to: properties.sibImgPadRight}}, animImagePadSpeed, YAHOO.util.Easing.easeOut ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); } else { Deki.$(nodes).find("img.nodeImage").css("paddingLeft", properties.sibImgPadLeft).css("paddingRight", properties.sibImgPadRight); Deki.nav.common.onComplete(null, completeFuncs); } }, //Shift nodes to the left shiftLeft: function(nodes, completeFuncs) { var anim = new YAHOO.util.Anim( Deki.$(nodes).find("a").get(), {paddingLeft: {to: properties.linkPadLeft}, width: {to: properties.linkWidth}}, animShiftSpeed, YAHOO.util.Easing.easeIn ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Shift nodes to the right shiftRight: function(nodes, completeFuncs) { var anim = new YAHOO.util.Anim( Deki.$(nodes).find("a").get(), {paddingLeft: {to: properties.selChildPadLeft}, width: {to: properties.selChildWidth}}, animShiftSpeed, YAHOO.util.Easing.easeOut ); Deki.nav.common.onComplete(anim, completeFuncs); anim.animate(); }, //Open parent node openParent: function(node) { if(YAHOO.util.Dom.hasClass(node, "parentClosed")) { Deki.$(node).removeClass("parentClosed").addClass("parentOpen"); } }, //Close parent node closeParent: function(node) { if(YAHOO.util.Dom.hasClass(node, "parentOpen")) { Deki.$(node).removeClass("parentOpen").addClass("parentClosed"); } }, //Get nodes from attribute getNodesFromAttr: function(node, attr, ignore) { var attribute = Deki.$(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 = ""; Deki.$(nodes).each( function() { idStr += this.id + ", "; } ); alert(idStr); }, logClicks: function() { Deki.$("#clickLog").append(this.id + "
"); } }, //-------------------------------Docked-------------------------------- docked: { //---------------------------Home node--------------------------- homeNode: { //Start animation startAnim: function() { if(selectedRGB) { Deki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } //Unhighlight selected node Deki.$(prevSelectedNode).removeClass("selected"); //Close parent Deki.nav.common.closeParent(prevSelectedNode); var nodeStr = 'var nodes = Deki.$("div.node").not(".homeNode").not(".closedNode")'; Deki.$(selectedChildren).each( function() { nodeStr += '.not("#' + this.id + '")'; } ); nodeStr += ".get()"; eval(nodeStr); //var nodes = Deki.$("div.node").not(".homeNode").not(".closedNode").not(selectedChildren).get(); if(nodes.length) { //Strip nodes Deki.$(nodes).removeClass("sibling").removeClass("selectedChild").removeClass("dockedNode").removeClass("lastDocked"); //Close non-child nodes Deki.nav.common.compactNodes( nodes, Deki.nav.docked.homeNode.showChildren ); } else { Deki.nav.docked.homeNode.showChildren(); } }, //Show children showChildren: function() { var closedNodes = Deki.$(selectedChildren).filter(".closedNode").not(".hiddenNode").get(); Deki.$(selectedChildren).each( function() { if(YAHOO.util.Dom.hasClass(this, "parentOpen")) { Deki.nav.common.closeParent(this); } } ); //Expand image padding Deki.nav.common.expandImagePad(selectedChildren); Deki.$(selectedChildren).addClass("sibling").addClass("childNode").removeClass("selectedChild").removeClass("dockedNode").removeClass("lastDocked"); if(closedNodes.length) { Deki.nav.common.openNodes( closedNodes, Deki.nav.docked.homeNode.highlightSelected ); } else { Deki.nav.docked.homeNode.highlightSelected(); } }, //Highlight selected node highlightSelected: function() { Deki.$(selectedNode).addClass("selected"); //Animation complete Deki.nav.animComplete(); } }, //---------------------------Last Docked--------------------------- lastDocked: { //Start animation startAnim: function() { if(selectedRGB) { Deki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } var viewableChildren = Deki.$("#" + navDivID + " div.selectedChild").get(); //Minimize children of previously selected node (if they exist) if(viewableChildren.length) { Deki.nav.common.compactNodes( viewableChildren, function() { Deki.$(viewableChildren).removeClass("selectedChild"); Deki.nav.docked.lastDocked.siblingsToChildren(); } ); } else { Deki.nav.docked.lastDocked.siblingsToChildren(); } }, //Transform siblings into children siblingsToChildren: function() { //Close previously selected node Deki.nav.common.closeParent(prevSelectedNode); //Move siblings to the right Deki.nav.common.shiftRight(Deki.$("#" + navDivID + " div.sibling").get(), function() { Deki.$(prevSelectedNode).find("a").css("backgroundColor", ""); //Minimize node image padding Deki.nav.common.compactImagePad(Deki.$("#" + navDivID + " div.sibling")); Deki.$("#" + navDivID + " div.sibling").addClass("selectedChild").removeClass("sibling").addClass("childNode"); Deki.$(prevSelectedNode).removeClass("selected"); //Highlight selected node Deki.nav.docked.highlightSelected(); } ); } }, //---------------------------Mid Docked--------------------------- midDocked: { //Start animation startAnim: function() { if(selectedRGB) { Deki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } //Close current child nodes Deki.nav.common.compactNodes( Deki.$("#" + navDivID + " div.childNode").not(".closedNode").get(), function() { //Unhighlight previously selected node Deki.nav.common.closeParent(prevSelectedNode); Deki.$(prevSelectedNode).removeClass("selected"); // remove child & sibling styles Deki.$("#" + navDivID + " div.childNode").removeClass("selectedChild").removeClass("sibling"); //Hide grandchildren and their children Deki.nav.docked.midDocked.hideGrandchildren(); } ); }, //Hide grandchildren and their children hideGrandchildren: function() { var grandchildren = []; var selectedPath = Deki.$(selectedNode).attr("path"); Deki.$("#" + navDivID + " div.dockedNode").each( function() { if((new RegExp(selectedPath + "[^/]+/([^/]+/)+$")).test(this.getAttribute("path"))) { grandchildren.push( Deki.$("#" + this.id).get(0) ); } } ); if(grandchildren.length) { Deki.nav.common.compactNodes( grandchildren, function() { Deki.$(grandchildren).removeClass("dockedNode"); Deki.nav.docked.midDocked.transformDockedChild(); } ); } else { Deki.nav.docked.midDocked.transformDockedChild(); } }, //Transform docked child transformDockedChild: function() { var dockedChild = Deki.$(selectedChildren).filter(".dockedNode").get(0); // switch left icon & style Deki.$(dockedChild).removeClass("dockedNode").removeClass("lastDocked").addClass("childNode").addClass("selectedChild"); //Move docked child to the right Deki.nav.common.shiftRight( dockedChild, function() { } ); Deki.nav.docked.midDocked.showSelectedChildren(); }, //Show selected node's children showSelectedChildren: function() { var hiddenChildren = Deki.$(selectedChildren).filter(".closedNode").get(); //Shift children to the right if(hiddenChildren.length) { Deki.nav.common.shiftRight( hiddenChildren, function() { Deki.$(hiddenChildren).addClass("selectedChild"); } ); //Minimize image padding Deki.nav.common.compactImagePad(hiddenChildren); //Open nodes Deki.nav.common.openNodes( hiddenChildren, Deki.nav.docked.highlightSelected ); } else { Deki.nav.docked.highlightSelected(); } } }, //---------------------------Common--------------------------- //Highlight selected node highlightSelected: function() { //Expand node image padding Deki.nav.common.expandImagePad(selectedNode); //Highlight node Deki.$(selectedNode).removeClass("dockedNode").removeClass("lastDocked"). addClass("sibling").addClass("selected").addClass("childNode"); //Open node if parent Deki.nav.common.openParent(selectedNode); //Set parent to last docked var parentID = Deki.$(selectedNode).attr("p"); Deki.$("#" + parentID).addClass("lastDocked"); //Show siblings Deki.nav.docked.showSiblings(); }, //Show siblings showSiblings: function() { // fetch parent of current node var parentNode = Deki.$("#" + Deki.$(selectedNode).attr("p")); if(parentNode) { // fetch children of parent (i.e. siblings of current node), but remove current node var siblings = Deki.nav.common.getNodesFromAttr(parentNode, "c", Deki.$(selectedNode).attr("id")); if(siblings && siblings.length) { Deki.$(siblings).addClass("sibling").addClass("childNode"); Deki.nav.common.openNodes(siblings, function() { //Animation complete Deki.nav.animComplete(); } ); } else { //Animation complete Deki.nav.animComplete(); } } else { //Animation complete Deki.nav.animComplete(); } } }, //-------------------------------Child-------------------------------- child: { //Start animation startAnim: function() { if(selectedRGB) { Deki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(dockedNodeRGB) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", dockedNodeRGB); } Deki.nav.child.hideSiblings(); }, //Hide siblings hideSiblings: function() { var nodes = Deki.$("#" + navDivID + " div.sibling").not(".selected").get(); if(nodes.length) { Deki.nav.common.compactNodes( nodes, function() { Deki.$("#" + navDivID + " div.sibling").not(".selected").removeClass("sibling"); Deki.nav.child.unhighlightSelected(); } ); } else { Deki.nav.child.unhighlightSelected(); } }, //Unhighlight selected unhighlightSelected: function() { //Last docked is no longer last Deki.$("#" + navDivID + " div.lastDocked").removeClass("lastDocked"); //Transform node into docked node Deki.$(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")) { Deki.$(prevSelectedNode).removeClass("parentOpen").addClass("parentClosed"); } //Remove node image padding Deki.nav.common.compactImagePad(prevSelectedNode); //Expand node image padding Deki.nav.common.expandImagePad( Deki.$("#" + navDivID + " div.selectedChild") ); //Move to left Deki.nav.common.shiftLeft( Deki.$("#" + navDivID + " div.selectedChild"), function() { //Change selected children to sibling nodes Deki.$("#" + navDivID + " div.selectedChild").removeClass("selectedChild").addClass("sibling"); Deki.nav.child.highlightSelected(); } ); }, //Highlight selected node highlightSelected: function() { //Mark node as selected Deki.$(selectedNode).addClass("selected"); if(YAHOO.util.Dom.hasClass(Deki.$(selectedNode).get(0), "parentClosed")) { //Open selected node Deki.nav.common.openParent(selectedNode); //Open children Deki.nav.child.openChildren(); } else { //Animation complete Deki.nav.animComplete(); } }, //Open children openChildren: function() { // shift right Deki.$(selectedChildren).find("a").css("paddingLeft", properties.selChildPadLeft).css("width", properties.selChildWidth); Deki.nav.common.openNodes(selectedChildren, Deki.nav.child.shiftRight ); }, //Shift new children to the right shiftRight: function() { Deki.$(selectedChildren).addClass("selectedChild").addClass("childNode"); //Animation complete Deki.nav.animComplete(); //Compact node image padding Deki.nav.common.compactImagePad(selectedChildren); } }, //-------------------------------Sibling-------------------------------- sibling: { //Start animation startAnim: function() { if(selectedRGB) { Deki.$(selectedNode).find("a").css("backgroundColor", selectedRGB); } if(siblingRGB) { Deki.$(prevSelectedNode).find("a").css("backgroundColor", siblingRGB); } if(YAHOO.util.Dom.hasClass(prevSelectedNode, "parentOpen")) { //Hide children Deki.nav.sibling.hideSelectedChildren(); } else { //Unhighlight selected Deki.nav.sibling.unhighlightSelected(); } }, //Hide previously selected node's children hideSelectedChildren: function() { Deki.nav.common.compactNodes( Deki.$("#" + navDivID + " div.selectedChild"), function() { Deki.$("#" + navDivID + " div.selectedChild").removeClass("selectedChild"); Deki.nav.sibling.unhighlightSelected(); } ); }, //Unhighlight previously selected node unhighlightSelected: function() { //Close parent node Deki.nav.common.closeParent(prevSelectedNode); //Unhiglight Deki.$(prevSelectedNode).removeClass("selected"); //Highlight selected node Deki.nav.sibling.highlightSelected(); }, //Highlight selected node highlightSelected: function() { Deki.$(selectedNode).addClass("selected"); //Open parent Deki.nav.common.openParent(selectedNode); //Show children if(selectedChildren) { Deki.nav.sibling.showChildren(); } else { //Animation complete Deki.nav.animComplete(); } }, //Show children showChildren: function() { Deki.$(selectedChildren).addClass("selectedChild").addClass("childNode"); //Open nodes Deki.nav.common.openNodes( selectedChildren, function() { //Animation complete Deki.nav.animComplete(); } ); //Shift right Deki.nav.common.shiftRight(selectedChildren); //Minimize image padding Deki.nav.common.compactImagePad(selectedChildren); } }, //-------------------------------Hidden Nodes-------------------------------- hiddenNodes: { //Start animation startAnim: function() { //Set content Deki.$(selectedNode).find("span").text( Deki.$(selectedNode).attr("content") ); //Set title Deki.$(selectedNode).find("a").attr("title", Deki.$(selectedNode).attr("contentTitle") ); //Open hidden nodes Deki.nav.hiddenNodes.openNodes(); }, //Open hidden nodes openNodes: function() { //Get hidden nodes var hiddenNodes = Deki.nav.common.getNodesFromAttr(selectedNode, "hiddenNodes"); Deki.$(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 Deki.$(selectedNode).removeClass("moreNodes").removeAttr("hiddenNodes"); //Unmark hidden nodes as being closed and hidden Deki.$(hiddenNodes).removeClass("closedNode").removeClass("hiddenNode"); //Turn redirect off (previously started redirect will not be terminated) redirect = false; // selectedNode = prevSelectedNode; //Animation complete Deki.nav.animComplete(); } ); //Animate anim.animate(); } } }; }(); //the onload event handler is available in /skins/common/javascript.php so we can flag it var DekiWiki = Deki; // backwards compatibility