/* /static/yui/event-mouseenter/event-mouseenter-min.js, /static/yui/dragdrop/dragdrop-min.js, /static/yui/slider/slider-min.js, /static/ittach.js, /static/pagedLoader.js, /static/FileManager.js, /static/fileGrid.js, /static/thumbnailGrid.js, /static/fileViewSort.js, /static/fileView.js, /static/search.js, /static/rmsearch.js, /static/CalendarFactory.js, /static/CalendarPopup.js */
/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
(function(){var B=YAHOO.util.Event,G=YAHOO.lang,E=B.addListener,F=B.removeListener,C=B.getListeners,D=[],H={mouseenter:"mouseover",mouseleave:"mouseout"},A=function(N,M,L){var J=B._getCacheIndex(D,N,M,L),I,K;if(J>=0){I=D[J];}if(N&&I){K=F.call(B,I[0],M,I[3]);if(K){delete D[J][2];delete D[J][3];D.splice(J,1);}}return K;};G.augmentObject(B._specialTypes,H);G.augmentObject(B,{_createMouseDelegate:function(I,J,K){return function(Q,M){var P=this,L=B.getRelatedTarget(Q),O,N;if(P!=L&&!YAHOO.util.Dom.isAncestor(P,L)){O=P;if(K){if(K===true){O=J;}else{O=K;}}N=[Q,P,J];if(M){N.splice(2,0,M);}return I.apply(O,N);}};},addListener:function(M,L,K,N,O){var I,J;if(H[L]){I=B._createMouseDelegate(K,N,O);I.mouseDelegate=true;D.push([M,L,K,I]);J=E.call(B,M,L,I);}else{J=E.apply(B,arguments);}return J;},removeListener:function(L,K,J){var I;if(H[K]){I=A.apply(B,arguments);}else{I=F.apply(B,arguments);}return I;},getListeners:function(N,M){var L=[],P,K=(M==="mouseover"||M==="mouseout"),O,J,I;if(M&&(K||H[M])){P=C.call(B,N,this._getType(M));if(P){for(J=P.length-1;J>-1;J--){I=P[J];O=I.fn.mouseDelegate;if((H[M]&&O)||(K&&!O)){L.push(I);}}}}else{L=C.apply(B,arguments);}return(L&&L.length)?L:null;}},true);B.on=B.addListener;}());YAHOO.register("event-mouseenter",YAHOO.util.Event,{version:"2.8.0r4",build:"2449"});/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var A=YAHOO.util.Event,B=YAHOO.util.Dom;return{useShim:false,_shimActive:false,_shimState:false,_debugShim:false,_createShim:function(){var C=document.createElement("div");C.id="yui-ddm-shim";if(document.body.firstChild){document.body.insertBefore(C,document.body.firstChild);}else{document.body.appendChild(C);}C.style.display="none";C.style.backgroundColor="red";C.style.position="absolute";C.style.zIndex="99999";B.setStyle(C,"opacity","0");this._shim=C;A.on(C,"mouseup",this.handleMouseUp,this,true);A.on(C,"mousemove",this.handleMouseMove,this,true);A.on(window,"scroll",this._sizeShim,this,true);},_sizeShim:function(){if(this._shimActive){var C=this._shim;C.style.height=B.getDocumentHeight()+"px";C.style.width=B.getDocumentWidth()+"px";C.style.top="0";C.style.left="0";}},_activateShim:function(){if(this.useShim){if(!this._shim){this._createShim();}this._shimActive=true;var C=this._shim,D="0";if(this._debugShim){D=".5";}B.setStyle(C,"opacity",D);this._sizeShim();C.style.display="block";}},_deactivateShim:function(){this._shim.style.display="none";this._shimActive=false;},_shim:null,ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,interactionInfo:null,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,STRICT_INTERSECT:2,mode:0,_execOnAll:function(E,D){for(var F in this.ids){for(var C in this.ids[F]){var G=this.ids[F][C];if(!this.isTypeOfDD(G)){continue;}G[E].apply(G,D);}}},_onLoad:function(){this.init();A.on(document,"mouseup",this.handleMouseUp,this,true);A.on(document,"mousemove",this.handleMouseMove,this,true);A.on(window,"unload",this._onUnload,this,true);A.on(window,"resize",this._onResize,this,true);},_onResize:function(C){this._execOnAll("resetConstraints",[]);},lock:function(){this.locked=true;},unlock:function(){this.locked=false;},isLocked:function(){return this.locked;},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:1000,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,fromTimeout:false,regDragDrop:function(D,C){if(!this.initialized){this.init();}if(!this.ids[C]){this.ids[C]={};}this.ids[C][D.id]=D;},removeDDFromGroup:function(E,C){if(!this.ids[C]){this.ids[C]={};}var D=this.ids[C];if(D&&D[E.id]){delete D[E.id];}},_remove:function(E){for(var D in E.groups){if(D){var C=this.ids[D];if(C&&C[E.id]){delete C[E.id];}}}delete this.handleIds[E.id];},regHandle:function(D,C){if(!this.handleIds[D]){this.handleIds[D]={};}this.handleIds[D][C]=C;},isDragDrop:function(C){return(this.getDDById(C))?true:false;},getRelated:function(H,D){var G=[];for(var F in H.groups){for(var E in this.ids[F]){var C=this.ids[F][E];if(!this.isTypeOfDD(C)){continue;}if(!D||C.isTarget){G[G.length]=C;}}}return G;},isLegalTarget:function(G,F){var D=this.getRelated(G,true);for(var E=0,C=D.length;E<C;++E){if(D[E].id==F.id){return true;}}return false;},isTypeOfDD:function(C){return(C&&C.__ygDragDrop);},isHandle:function(D,C){return(this.handleIds[D]&&this.handleIds[D][C]);},getDDById:function(D){for(var C in this.ids){if(this.ids[C][D]){return this.ids[C][D];}}return null;},handleMouseDown:function(E,D){this.currentTarget=YAHOO.util.Event.getTarget(E);this.dragCurrent=D;var C=D.getEl();this.startX=YAHOO.util.Event.getPageX(E);this.startY=YAHOO.util.Event.getPageY(E);this.deltaX=this.startX-C.offsetLeft;this.deltaY=this.startY-C.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var F=YAHOO.util.DDM;F.startDrag(F.startX,F.startY);F.fromTimeout=true;},this.clickTimeThresh);},startDrag:function(C,E){if(this.dragCurrent&&this.dragCurrent.useShim){this._shimState=this.useShim;this.useShim=true;}this._activateShim();clearTimeout(this.clickTimeout);var D=this.dragCurrent;if(D&&D.events.b4StartDrag){D.b4StartDrag(C,E);D.fireEvent("b4StartDragEvent",{x:C,y:E});}if(D&&D.events.startDrag){D.startDrag(C,E);D.fireEvent("startDragEvent",{x:C,y:E});}this.dragThreshMet=true;},handleMouseUp:function(C){if(this.dragCurrent){clearTimeout(this.clickTimeout);if(this.dragThreshMet){if(this.fromTimeout){this.fromTimeout=false;this.handleMouseMove(C);}this.fromTimeout=false;this.fireEvents(C,true);}else{}this.stopDrag(C);this.stopEvent(C);}},stopEvent:function(C){if(this.stopPropagation){YAHOO.util.Event.stopPropagation(C);}if(this.preventDefault){YAHOO.util.Event.preventDefault(C);}},stopDrag:function(E,D){var C=this.dragCurrent;if(C&&!D){if(this.dragThreshMet){if(C.events.b4EndDrag){C.b4EndDrag(E);C.fireEvent("b4EndDragEvent",{e:E});}if(C.events.endDrag){C.endDrag(E);C.fireEvent("endDragEvent",{e:E});}}if(C.events.mouseUp){C.onMouseUp(E);C.fireEvent("mouseUpEvent",{e:E});}}if(this._shimActive){this._deactivateShim();if(this.dragCurrent&&this.dragCurrent.useShim){this.useShim=this._shimState;this._shimState=false;}}this.dragCurrent=null;this.dragOvers={};},handleMouseMove:function(F){var C=this.dragCurrent;if(C){if(YAHOO.util.Event.isIE&&!F.button){this.stopEvent(F);return this.handleMouseUp(F);}else{if(F.clientX<0||F.clientY<0){}}if(!this.dragThreshMet){var E=Math.abs(this.startX-YAHOO.util.Event.getPageX(F));var D=Math.abs(this.startY-YAHOO.util.Event.getPageY(F));if(E>this.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;S<E.length;S++){var Y=null;if(c[E[S]+"Evts"]){Y=c[E[S]+"Evts"];}if(Y&&Y.length){var H=E[S].charAt(0).toUpperCase()+E[S].substr(1),X="onDrag"+H,J="b4Drag"+H,O="drag"+H+"Event",W="drag"+H;if(this.mode){if(a.events[J]){a[J](V,Y,Q);a.fireEvent(J+"Event",{event:V,info:Y,group:Q});}if(a.events[W]){a[X](V,Y,Q);a.fireEvent(O,{event:V,info:Y,group:Q});}}else{for(var Z=0,T=Y.length;Z<T;++Z){if(a.events[J]){a[J](V,Y[Z].id,Q[0]);a.fireEvent(J+"Event",{event:V,info:Y[Z].id,group:Q[0]});}if(a.events[W]){a[X](V,Y[Z].id,Q[0]);a.fireEvent(O,{event:V,info:Y[Z].id,group:Q[0]});}}}}}},getBestMatch:function(E){var G=null;var D=E.length;if(D==1){G=E[0];}else{for(var F=0;F<D;++F){var C=E[F];if(this.mode==this.INTERSECT&&C.cursorIsOver){G=C;break;}else{if(!G||!G.overlap||(C.overlap&&G.overlap.getArea()<C.overlap.getArea())){G=C;}}}}return G;},refreshCache:function(D){var F=D||this.ids;for(var C in F){if("string"!=typeof C){continue;}for(var E in this.ids[C]){var G=this.ids[C][E];if(this.isTypeOfDD(G)){var H=this.getLocation(G);if(H){this.locationCache[G.id]=H;}else{delete this.locationCache[G.id];}}}}},verifyEl:function(D){try{if(D){var C=D.offsetParent;if(C){return true;}}}catch(E){}return false;},getLocation:function(H){if(!this.isTypeOfDD(H)){return null;}var F=H.getEl(),K,E,D,M,L,N,C,J,G;try{K=YAHOO.util.Dom.getXY(F);}catch(I){}if(!K){return null;}E=K[0];D=E+F.offsetWidth;M=K[1];L=M+F.offsetHeight;N=M-H.padding[0];C=D+H.padding[1];J=L+H.padding[2];G=E-H.padding[3];return new YAHOO.util.Region(N,C,J,G);},isOverTarget:function(K,C,E,F){var G=this.locationCache[C.id];if(!G||!this.useCache){G=this.getLocation(C);this.locationCache[C.id]=G;}if(!G){return false;}C.cursorIsOver=G.contains(K);var J=this.dragCurrent;if(!J||(!E&&!J.constrainX&&!J.constrainY)){return C.cursorIsOver;}C.overlap=null;if(!F){var H=J.getTargetCoord(K.x,K.y);var D=J.getDragEl();F=new YAHOO.util.Region(H.y,H.x+D.offsetWidth,H.y+D.offsetHeight,H.x);}var I=F.intersect(G);if(I){C.overlap=I;return(E)?true:C.cursorIsOver;}else{return false;}},_onUnload:function(D,C){this.unregAll();},unregAll:function(){if(this.dragCurrent){this.stopDrag();this.dragCurrent=null;}this._execOnAll("unreg",[]);this.ids={};},elementCache:{},getElWrapper:function(D){var C=this.elementCache[D];if(!C||!C.el){C=this.elementCache[D]=new this.ElementWrapper(YAHOO.util.Dom.get(D));}return C;},getElement:function(C){return YAHOO.util.Dom.get(C);},getCss:function(D){var C=YAHOO.util.Dom.get(D);return(C)?C.style:null;},ElementWrapper:function(C){this.el=C||null;this.id=this.el&&C.id;this.css=this.el&&C.style;},getPosX:function(C){return YAHOO.util.Dom.getX(C);},getPosY:function(C){return YAHOO.util.Dom.getY(C);},swapNode:function(E,C){if(E.swapNode){E.swapNode(C);}else{var F=C.parentNode;var D=C.nextSibling;if(D==E){F.insertBefore(E,C);}else{if(C==E.nextSibling){F.insertBefore(C,E);}else{E.parentNode.replaceChild(C,E);F.insertBefore(E,D);}}}},getScroll:function(){var E,C,F=document.documentElement,D=document.body;if(F&&(F.scrollTop||F.scrollLeft)){E=F.scrollTop;C=F.scrollLeft;}else{if(D){E=D.scrollTop;C=D.scrollLeft;}else{}}return{top:E,left:C};},getStyle:function(D,C){return YAHOO.util.Dom.getStyle(D,C);},getScrollTop:function(){return this.getScroll().top;},getScrollLeft:function(){return this.getScroll().left;},moveToEl:function(C,E){var D=YAHOO.util.Dom.getXY(E);YAHOO.util.Dom.setXY(C,D);},getClientHeight:function(){return YAHOO.util.Dom.getViewportHeight();},getClientWidth:function(){return YAHOO.util.Dom.getViewportWidth();},numericSort:function(D,C){return(D-C);},_timeoutCount:0,_addListeners:function(){var C=YAHOO.util.DDM;if(YAHOO.util.Event&&document){C._onLoad();}else{if(C._timeoutCount>2000){}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(C<this.minX){C=this.minX;}if(C>this.maxX){C=this.maxX;}}if(this.constrainY){if(F<this.minY){F=this.minY;}if(F>this.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<C;++E){if(this.invalidHandleClasses[E]==D){delete this.invalidHandleClasses[E];}}},isValidHandleChild:function(F){var E=true;var H;try{H=F.nodeName.toUpperCase();}catch(G){H=F.nodeName;}E=E&&!this.invalidHandleTypes[H];E=E&&!this.invalidHandleIds[F.id];for(var D=0,C=this.invalidHandleClasses.length;E&&D<C;++D){E=!B.hasClass(F,this.invalidHandleClasses[D]);}return E;},setXTicks:function(F,C){this.xTicks=[];this.xTickSize=C;var E={};for(var D=this.initPageX;D>=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<C;++D){var E=D+1;if(F[E]&&F[E]>=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&&G<C){window.scrollTo(D,N+A);}if(I<N&&N>0&&I-N<C){window.scrollTo(D,N-A);}if(M>B&&F<C){window.scrollTo(D+A,N);}if(J<D&&D>0&&J-D<C){window.scrollTo(D-A,N);}}},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(A){this.setStartPosition();this.autoOffset(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},b4Drag:function(A){this.setDragElPos(YAHOO.util.Event.getPageX(A),YAHOO.util.Event.getPageY(A));},toString:function(){return("DD "+this.id);}});YAHOO.util.DDProxy=function(C,A,B){if(C){this.init(C,A,B);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var B=this,A=document.body;if(!A||!A.firstChild){setTimeout(function(){B.createFrame();},50);return;}var F=this.getDragEl(),E=YAHOO.util.Dom;if(!F){F=document.createElement("div");F.id=this.dragElId;var D=F.style;D.position="absolute";D.visibility="hidden";D.cursor="move";D.border="2px solid #aaa";D.zIndex=999;D.height="25px";D.width="25px";var C=document.createElement("div");E.setStyle(C,"height","100%");E.setStyle(C,"width","100%");E.setStyle(C,"background-color","#ccc");E.setStyle(C,"opacity","0");F.appendChild(C);A.insertBefore(F,A.firstChild);}},initFrame:function(){this.createFrame();},applyConfig:function(){YAHOO.util.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||YAHOO.util.DDProxy.dragElId);},showFrame:function(E,D){var C=this.getEl();var A=this.getDragEl();var B=A.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(B.width,10)/2),Math.round(parseInt(B.height,10)/2));}this.setDragElPos(E,D);YAHOO.util.Dom.setStyle(A,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var H=YAHOO.util.Dom;var B=this.getEl();var C=this.getDragEl();var G=parseInt(H.getStyle(C,"borderTopWidth"),10);var I=parseInt(H.getStyle(C,"borderRightWidth"),10);var F=parseInt(H.getStyle(C,"borderBottomWidth"),10);var D=parseInt(H.getStyle(C,"borderLeftWidth"),10);if(isNaN(G)){G=0;}if(isNaN(I)){I=0;}if(isNaN(F)){F=0;}if(isNaN(D)){D=0;}var E=Math.max(0,B.offsetWidth-I-D);var A=Math.max(0,B.offsetHeight-G-F);H.setStyle(C,"width",E+"px");H.setStyle(C,"height",A+"px");}},b4MouseDown:function(B){this.setStartPosition();var A=YAHOO.util.Event.getPageX(B);var C=YAHOO.util.Event.getPageY(B);this.autoOffset(A,C);},b4StartDrag:function(A,B){this.showFrame(A,B);},b4EndDrag:function(A){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(D){var C=YAHOO.util.Dom;var B=this.getEl();var A=this.getDragEl();C.setStyle(A,"visibility","");C.setStyle(B,"visibility","hidden");YAHOO.util.DDM.moveToEl(B,A);C.setStyle(A,"visibility","hidden");C.setStyle(B,"visibility","");},toString:function(){return("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(C,A,B){if(C){this.initTarget(C,A,B);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return("DDTarget "+this.id);}});YAHOO.register("dragdrop",YAHOO.util.DragDropMgr,{version:"2.8.0r4",build:"2449"});/*
Copyright (c) 2009, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.net/yui/license.txt
version: 2.8.0r4
*/
(function(){var B=YAHOO.util.Dom.getXY,A=YAHOO.util.Event,D=Array.prototype.slice;function C(G,E,F,H){C.ANIM_AVAIL=(!YAHOO.lang.isUndefined(YAHOO.util.Anim));if(G){this.init(G,E,true);this.initSlider(H);this.initThumb(F);}}YAHOO.lang.augmentObject(C,{getHorizSlider:function(F,G,I,H,E){return new C(F,F,new YAHOO.widget.SliderThumb(G,F,I,H,0,0,E),"horiz");},getVertSlider:function(G,H,E,I,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,0,0,E,I,F),"vert");},getSliderRegion:function(G,H,J,I,E,K,F){return new C(G,G,new YAHOO.widget.SliderThumb(H,G,J,I,E,K,F),"region");},SOURCE_UI_EVENT:1,SOURCE_SET_VALUE:2,SOURCE_KEY_EVENT:3,ANIM_AVAIL:false},true);YAHOO.extend(C,YAHOO.util.DragDrop,{_mouseDown:false,dragOnly:true,initSlider:function(E){this.type=E;this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);this.isTarget=false;this.animate=C.ANIM_AVAIL;this.backgroundEnabled=true;this.tickPause=40;this.enableKeys=true;this.keyIncrement=20;this.moveComplete=true;this.animationDuration=0.2;this.SOURCE_UI_EVENT=1;this.SOURCE_SET_VALUE=2;this.valueChangeSource=0;this._silent=false;this.lastOffset=[0,0];},initThumb:function(F){var E=this;this.thumb=F;F.cacheBetweenDrags=true;if(F._isHoriz&&F.xTicks&&F.xTicks.length){this.tickPause=Math.round(360/F.xTicks.length);}else{if(F.yTicks&&F.yTicks.length){this.tickPause=Math.round(360/F.yTicks.length);}}F.onAvailable=function(){return E.setStartSliderState();};F.onMouseDown=function(){E._mouseDown=true;return E.focus();};F.startDrag=function(){E._slideStart();};F.onDrag=function(){E.fireEvents(true);};F.onMouseUp=function(){E.thumbMouseUp();};},onAvailable:function(){this._bindKeyEvents();},_bindKeyEvents:function(){A.on(this.id,"keydown",this.handleKeyDown,this,true);A.on(this.id,"keypress",this.handleKeyPress,this,true);},handleKeyPress:function(F){if(this.enableKeys){var E=A.getCharCode(F);switch(E){case 37:case 38:case 39:case 40:case 36:case 35:A.preventDefault(F);break;default:}}},handleKeyDown:function(J){if(this.enableKeys){var G=A.getCharCode(J),F=this.thumb,H=this.getXValue(),E=this.getYValue(),I=true;switch(G){case 37:H-=this.keyIncrement;break;case 38:E-=this.keyIncrement;break;case 39:H+=this.keyIncrement;break;case 40:E+=this.keyIncrement;break;case 36:H=F.leftConstraint;E=F.topConstraint;break;case 35:H=F.rightConstraint;E=F.bottomConstraint;break;default:I=false;}if(I){if(F._isRegion){this._setRegionValue(C.SOURCE_KEY_EVENT,H,E,true);}else{this._setValue(C.SOURCE_KEY_EVENT,(F._isHoriz?H:E),true);}A.stopEvent(J);}}},setStartSliderState:function(){this.setThumbCenterPoint();this.baselinePos=B(this.getEl());this.thumb.startOffset=this.thumb.getOffsetFromParent(this.baselinePos);if(this.thumb._isRegion){if(this.deferredSetRegionValue){this._setRegionValue.apply(this,this.deferredSetRegionValue);this.deferredSetRegionValue=null;}else{this.setRegionValue(0,0,true,true,true);}}else{if(this.deferredSetValue){this._setValue.apply(this,this.deferredSetValue);this.deferredSetValue=null;}else{this.setValue(0,true,true,true);}}},setThumbCenterPoint:function(){var E=this.thumb.getEl();if(E){this.thumbCenterPoint={x:parseInt(E.offsetWidth/2,10),y:parseInt(E.offsetHeight/2,10)};}},lock:function(){this.thumb.lock();this.locked=true;},unlock:function(){this.thumb.unlock();this.locked=false;},thumbMouseUp:function(){this._mouseDown=false;if(!this.isLocked()){this.endMove();}},onMouseUp:function(){this._mouseDown=false;if(this.backgroundEnabled&&!this.isLocked()){this.endMove();}},getThumb:function(){return this.thumb;},focus:function(){this.valueChangeSource=C.SOURCE_UI_EVENT;var E=this.getEl();if(E.focus){try{E.focus();}catch(F){}}this.verifyOffset();return !this.isLocked();},onChange:function(E,F){},onSlideStart:function(){},onSlideEnd:function(){},getValue:function(){return this.thumb.getValue();},getXValue:function(){return this.thumb.getXValue();},getYValue:function(){return this.thumb.getYValue();},setValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setValue.apply(this,E);},_setValue:function(I,L,G,H,E){var F=this.thumb,K,J;if(!F.available){this.deferredSetValue=arguments;return false;}if(this.isLocked()&&!H){return false;}if(isNaN(L)){return false;}if(F._isRegion){return false;}this._silent=E;this.valueChangeSource=I||C.SOURCE_SET_VALUE;F.lastOffset=[L,L];this.verifyOffset();this._slideStart();if(F._isHoriz){K=F.initPageX+L+this.thumbCenterPoint.x;this.moveThumb(K,F.initPageY,G);}else{J=F.initPageY+L+this.thumbCenterPoint.y;this.moveThumb(F.initPageX,J,G);}return true;},setRegionValue:function(){var E=D.call(arguments);E.unshift(C.SOURCE_SET_VALUE);return this._setRegionValue.apply(this,E);},_setRegionValue:function(F,J,H,I,G,K){var L=this.thumb,E,M;if(!L.available){this.deferredSetRegionValue=arguments;return false;}if(this.isLocked()&&!G){return false;}if(isNaN(J)){return false;}if(!L._isRegion){return false;}this._silent=K;this.valueChangeSource=F||C.SOURCE_SET_VALUE;L.lastOffset=[J,H];this.verifyOffset();this._slideStart();E=L.initPageX+J+this.thumbCenterPoint.x;M=L.initPageY+H+this.thumbCenterPoint.y;this.moveThumb(E,M,I);return true;},verifyOffset:function(){var F=B(this.getEl()),E=this.thumb;if(!this.thumbCenterPoint||!this.thumbCenterPoint.x){this.setThumbCenterPoint();}if(F){if(F[0]!=this.baselinePos[0]||F[1]!=this.baselinePos[1]){this.setInitPosition();this.baselinePos=F;E.initPageX=this.initPageX+E.startOffset[0];E.initPageY=this.initPageY+E.startOffset[1];E.deltaSetXY=null;this.resetThumbConstraints();return false;}}return true;},moveThumb:function(K,J,I,G){var L=this.thumb,M=this,F,E,H;if(!L.available){return;}L.setDelta(this.thumbCenterPoint.x,this.thumbCenterPoint.y);E=L.getTargetCoord(K,J);F=[Math.round(E.x),Math.round(E.y)];if(this.animate&&L._graduated&&!I){this.lock();this.curCoord=B(this.thumb.getEl());this.curCoord=[Math.round(this.curCoord[0]),Math.round(this.curCoord[1])];setTimeout(function(){M.moveOneTick(F);},this.tickPause);}else{if(this.animate&&C.ANIM_AVAIL&&!I){this.lock();
H=new YAHOO.util.Motion(L.id,{points:{to:F}},this.animationDuration,YAHOO.util.Easing.easeOut);H.onComplete.subscribe(function(){M.unlock();if(!M._mouseDown){M.endMove();}});H.animate();}else{L.setDragElPos(K,J);if(!G&&!this._mouseDown){this.endMove();}}}},_slideStart:function(){if(!this._sliding){if(!this._silent){this.onSlideStart();this.fireEvent("slideStart");}this._sliding=true;this.moveComplete=false;}},_slideEnd:function(){if(this._sliding){var E=this._silent;this._sliding=false;this.moveComplete=true;this._silent=false;if(!E){this.onSlideEnd();this.fireEvent("slideEnd");}}},moveOneTick:function(F){var H=this.thumb,G=this,I=null,E,J;if(H._isRegion){I=this._getNextX(this.curCoord,F);E=(I!==null)?I[0]:this.curCoord[0];I=this._getNextY(this.curCoord,F);J=(I!==null)?I[1]:this.curCoord[1];I=E!==this.curCoord[0]||J!==this.curCoord[1]?[E,J]:null;}else{if(H._isHoriz){I=this._getNextX(this.curCoord,F);}else{I=this._getNextY(this.curCoord,F);}}if(I){this.curCoord=I;this.thumb.alignElWithMouse(H.getEl(),I[0]+this.thumbCenterPoint.x,I[1]+this.thumbCenterPoint.y);if(!(I[0]==F[0]&&I[1]==F[1])){setTimeout(function(){G.moveOneTick(F);},this.tickPause);}else{this.unlock();if(!this._mouseDown){this.endMove();}}}else{this.unlock();if(!this._mouseDown){this.endMove();}}},_getNextX:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[0]>F[0]){J=H.tickSize-this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]-J,E[1]);I=[G.x,G.y];}else{if(E[0]<F[0]){J=H.tickSize+this.thumbCenterPoint.x;G=H.getTargetCoord(E[0]+J,E[1]);I=[G.x,G.y];}else{}}return I;},_getNextY:function(E,F){var H=this.thumb,J,G=[],I=null;if(E[1]>F[1]){J=H.tickSize-this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]-J);I=[G.x,G.y];}else{if(E[1]<F[1]){J=H.tickSize+this.thumbCenterPoint.y;G=H.getTargetCoord(E[0],E[1]+J);I=[G.x,G.y];}else{}}return I;},b4MouseDown:function(E){if(!this.backgroundEnabled){return false;}this.thumb.autoOffset();this.baselinePos=[];},onMouseDown:function(F){if(!this.backgroundEnabled||this.isLocked()){return false;}this._mouseDown=true;var E=A.getPageX(F),G=A.getPageY(F);this.focus();this._slideStart();this.moveThumb(E,G);},onDrag:function(F){if(this.backgroundEnabled&&!this.isLocked()){var E=A.getPageX(F),G=A.getPageY(F);this.moveThumb(E,G,true,true);this.fireEvents();}},endMove:function(){this.unlock();this.fireEvents();this._slideEnd();},resetThumbConstraints:function(){var E=this.thumb;E.setXConstraint(E.leftConstraint,E.rightConstraint,E.xTickSize);E.setYConstraint(E.topConstraint,E.bottomConstraint,E.xTickSize);},fireEvents:function(G){var F=this.thumb,I,H,E;if(!G){F.cachePosition();}if(!this.isLocked()){if(F._isRegion){I=F.getXValue();H=F.getYValue();if(I!=this.previousX||H!=this.previousY){if(!this._silent){this.onChange(I,H);this.fireEvent("change",{x:I,y:H});}}this.previousX=I;this.previousY=H;}else{E=F.getValue();if(E!=this.previousVal){if(!this._silent){this.onChange(E);this.fireEvent("change",E);}}this.previousVal=E;}}},toString:function(){return("Slider ("+this.type+") "+this.id);}});YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);YAHOO.widget.Slider=C;})();YAHOO.widget.SliderThumb=function(G,B,E,D,A,F,C){if(G){YAHOO.widget.SliderThumb.superclass.constructor.call(this,G,B);this.parentElId=B;}this.isTarget=false;this.tickSize=C;this.maintainOffset=true;this.initSlider(E,D,A,F,C);this.scroll=false;};YAHOO.extend(YAHOO.widget.SliderThumb,YAHOO.util.DD,{startOffset:null,dragOnly:true,_isHoriz:false,_prevVal:0,_graduated:false,getOffsetFromParent0:function(C){var A=YAHOO.util.Dom.getXY(this.getEl()),B=C||YAHOO.util.Dom.getXY(this.parentElId);return[(A[0]-B[0]),(A[1]-B[1])];},getOffsetFromParent:function(H){var A=this.getEl(),E,I,F,B,K,D,C,J,G;if(!this.deltaOffset){I=YAHOO.util.Dom.getXY(A);F=H||YAHOO.util.Dom.getXY(this.parentElId);E=[(I[0]-F[0]),(I[1]-F[1])];B=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);K=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);D=B-E[0];C=K-E[1];if(isNaN(D)||isNaN(C)){}else{this.deltaOffset=[D,C];}}else{J=parseInt(YAHOO.util.Dom.getStyle(A,"left"),10);G=parseInt(YAHOO.util.Dom.getStyle(A,"top"),10);E=[J+this.deltaOffset[0],G+this.deltaOffset[1]];}return E;},initSlider:function(D,C,A,E,B){this.initLeft=D;this.initRight=C;this.initUp=A;this.initDown=E;this.setXConstraint(D,C,B);this.setYConstraint(A,E,B);if(B&&B>1){this._graduated=true;}this._isHoriz=(D||C);this._isVert=(A||E);this._isRegion=(this._isHoriz&&this._isVert);},clearTicks:function(){YAHOO.widget.SliderThumb.superclass.clearTicks.call(this);this.tickSize=0;this._graduated=false;},getValue:function(){return(this._isHoriz)?this.getXValue():this.getYValue();},getXValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[0])){this.lastOffset=A;return(A[0]-this.startOffset[0]);}else{return(this.lastOffset[0]-this.startOffset[0]);}},getYValue:function(){if(!this.available){return 0;}var A=this.getOffsetFromParent();if(YAHOO.lang.isNumber(A[1])){this.lastOffset=A;return(A[1]-this.startOffset[1]);}else{return(this.lastOffset[1]-this.startOffset[1]);}},toString:function(){return"SliderThumb "+this.id;},onChange:function(A,B){}});(function(){var A=YAHOO.util.Event,B=YAHOO.widget;function C(I,F,H,D){var G=this,J={min:false,max:false},E,K;this.minSlider=I;this.maxSlider=F;this.activeSlider=I;this.isHoriz=I.thumb._isHoriz;E=this.minSlider.thumb.onMouseDown;K=this.maxSlider.thumb.onMouseDown;this.minSlider.thumb.onMouseDown=function(){G.activeSlider=G.minSlider;E.apply(this,arguments);};this.maxSlider.thumb.onMouseDown=function(){G.activeSlider=G.maxSlider;K.apply(this,arguments);};this.minSlider.thumb.onAvailable=function(){I.setStartSliderState();J.min=true;if(J.max){G.fireEvent("ready",G);}};this.maxSlider.thumb.onAvailable=function(){F.setStartSliderState();J.max=true;if(J.min){G.fireEvent("ready",G);}};I.onMouseDown=F.onMouseDown=function(L){return this.backgroundEnabled&&G._handleMouseDown(L);};I.onDrag=F.onDrag=function(L){G._handleDrag(L);};I.onMouseUp=F.onMouseUp=function(L){G._handleMouseUp(L);
};I._bindKeyEvents=function(){G._bindKeyEvents(this);};F._bindKeyEvents=function(){};I.subscribe("change",this._handleMinChange,I,this);I.subscribe("slideStart",this._handleSlideStart,I,this);I.subscribe("slideEnd",this._handleSlideEnd,I,this);F.subscribe("change",this._handleMaxChange,F,this);F.subscribe("slideStart",this._handleSlideStart,F,this);F.subscribe("slideEnd",this._handleSlideEnd,F,this);this.createEvent("ready",this);this.createEvent("change",this);this.createEvent("slideStart",this);this.createEvent("slideEnd",this);D=YAHOO.lang.isArray(D)?D:[0,H];D[0]=Math.min(Math.max(parseInt(D[0],10)|0,0),H);D[1]=Math.max(Math.min(parseInt(D[1],10)|0,H),0);if(D[0]>D[1]){D.splice(0,2,D[1],D[0]);}this.minVal=D[0];this.maxVal=D[1];this.minSlider.setValue(this.minVal,true,true,true);this.maxSlider.setValue(this.maxVal,true,true,true);}C.prototype={minVal:-1,maxVal:-1,minRange:0,_handleSlideStart:function(E,D){this.fireEvent("slideStart",D);},_handleSlideEnd:function(E,D){this.fireEvent("slideEnd",D);},_handleDrag:function(D){B.Slider.prototype.onDrag.call(this.activeSlider,D);},_handleMinChange:function(){this.activeSlider=this.minSlider;this.updateValue();},_handleMaxChange:function(){this.activeSlider=this.maxSlider;this.updateValue();},_bindKeyEvents:function(D){A.on(D.id,"keydown",this._handleKeyDown,this,true);A.on(D.id,"keypress",this._handleKeyPress,this,true);},_handleKeyDown:function(D){this.activeSlider.handleKeyDown.apply(this.activeSlider,arguments);},_handleKeyPress:function(D){this.activeSlider.handleKeyPress.apply(this.activeSlider,arguments);},setValues:function(H,K,I,E,J){var F=this.minSlider,M=this.maxSlider,D=F.thumb,L=M.thumb,N=this,G={min:false,max:false};if(D._isHoriz){D.setXConstraint(D.leftConstraint,L.rightConstraint,D.tickSize);L.setXConstraint(D.leftConstraint,L.rightConstraint,L.tickSize);}else{D.setYConstraint(D.topConstraint,L.bottomConstraint,D.tickSize);L.setYConstraint(D.topConstraint,L.bottomConstraint,L.tickSize);}this._oneTimeCallback(F,"slideEnd",function(){G.min=true;if(G.max){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});this._oneTimeCallback(M,"slideEnd",function(){G.max=true;if(G.min){N.updateValue(J);setTimeout(function(){N._cleanEvent(F,"slideEnd");N._cleanEvent(M,"slideEnd");},0);}});F.setValue(H,I,E,false);M.setValue(K,I,E,false);},setMinValue:function(F,H,I,E){var G=this.minSlider,D=this;this.activeSlider=G;D=this;this._oneTimeCallback(G,"slideEnd",function(){D.updateValue(E);setTimeout(function(){D._cleanEvent(G,"slideEnd");},0);});G.setValue(F,H,I);},setMaxValue:function(D,H,I,F){var G=this.maxSlider,E=this;this.activeSlider=G;this._oneTimeCallback(G,"slideEnd",function(){E.updateValue(F);setTimeout(function(){E._cleanEvent(G,"slideEnd");},0);});G.setValue(D,H,I);},updateValue:function(J){var E=this.minSlider.getValue(),K=this.maxSlider.getValue(),F=false,D,M,H,I,L,G;if(E!=this.minVal||K!=this.maxVal){F=true;D=this.minSlider.thumb;M=this.maxSlider.thumb;H=this.isHoriz?"x":"y";G=this.minSlider.thumbCenterPoint[H]+this.maxSlider.thumbCenterPoint[H];I=Math.max(K-G-this.minRange,0);L=Math.min(-E-G-this.minRange,0);if(this.isHoriz){I=Math.min(I,M.rightConstraint);D.setXConstraint(D.leftConstraint,I,D.tickSize);M.setXConstraint(L,M.rightConstraint,M.tickSize);}else{I=Math.min(I,M.bottomConstraint);D.setYConstraint(D.leftConstraint,I,D.tickSize);M.setYConstraint(L,M.bottomConstraint,M.tickSize);}}this.minVal=E;this.maxVal=K;if(F&&!J){this.fireEvent("change",this);}},selectActiveSlider:function(H){var E=this.minSlider,D=this.maxSlider,J=E.isLocked()||!E.backgroundEnabled,G=D.isLocked()||!E.backgroundEnabled,F=YAHOO.util.Event,I;if(J||G){this.activeSlider=J?D:E;}else{if(this.isHoriz){I=F.getPageX(H)-E.thumb.initPageX-E.thumbCenterPoint.x;}else{I=F.getPageY(H)-E.thumb.initPageY-E.thumbCenterPoint.y;}this.activeSlider=I*2>D.getValue()+E.getValue()?D:E;}},_handleMouseDown:function(D){if(!D._handled&&!this.minSlider._sliding&&!this.maxSlider._sliding){D._handled=true;this.selectActiveSlider(D);return B.Slider.prototype.onMouseDown.call(this.activeSlider,D);}else{return false;}},_handleMouseUp:function(D){B.Slider.prototype.onMouseUp.apply(this.activeSlider,arguments);},_oneTimeCallback:function(G,D,F){var E=function(){G.unsubscribe(D,E);F.apply({},arguments);};G.subscribe(D,E);},_cleanEvent:function(K,E){var J,I,D,G,H,F;if(K.__yui_events&&K.events[E]){for(I=K.__yui_events.length;I>=0;--I){if(K.__yui_events[I].type===E){J=K.__yui_events[I];break;}}if(J){H=J.subscribers;F=[];G=0;for(I=0,D=H.length;I<D;++I){if(H[I]){F[G++]=H[I];}}J.subscribers=F;}}}};YAHOO.lang.augmentProto(C,YAHOO.util.EventProvider);B.Slider.getHorizDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,G,0,0,F),E=new B.SliderThumb(K,H,0,G,0,0,F);return new C(new B.Slider(H,H,I,"horiz"),new B.Slider(H,H,E,"horiz"),G,D);};B.Slider.getVertDualSlider=function(H,J,K,G,F,D){var I=new B.SliderThumb(J,H,0,0,0,G,F),E=new B.SliderThumb(K,H,0,0,0,G,F);return new B.DualSlider(new B.Slider(H,H,I,"vert"),new B.Slider(H,H,E,"vert"),G,D);};YAHOO.widget.DualSlider=C;})();YAHOO.register("slider",YAHOO.widget.Slider,{version:"2.8.0r4",build:"2449"});function VBIsIttachAvailable(){
if(navigator.plugins&&navigator.plugins.length){
plugin=navigator.plugins["Xythos Drive"];
if(plugin){
return -1;
}else{
return 0;
}
}else{
if(navigator.mimeTypes&&navigator.mimeTypes.length){
mimetype=navigator.mimeTypes["application/x-Intellittach-plugin"];
if(mimetype&&mimetype.enabledPlugin){
return -1;
}else{
return 0;
}
}else{
try{
var _1=new ActiveXObject("XythosIT.Intellittach");
return -1;
}
catch(e){
return 0;
}
}
}
}
function VBIsClientRunning(){
if(VBIsIttachAvailable()!=0){
return -1;
}else{
return 0;
}
}
function isIE(){
if(navigator.plugins&&navigator.plugins.length){
return false;
}else{
if(navigator.mimeTypes&&navigator.mimeTypes.length){
return false;
}else{
return true;
}
}
}
function VBConnectAndOpenApp(_2){
var _3=false;
if(VBIsIttachAvailable()){
if(isIE()){
try{
var _4=new ActiveXObject("XythosIT.Intellittach");
if(_4){
_4.ConnectAndOpenApp(_2,"");
}
}
catch(e){
window.open(_2);
}
}else{
if(document.createElement&&document.createTextNode){
var _5=document.createElement("EMBED");
_5.setAttribute("TYPE","application/x-Intellittach-plugin");
_5.setAttribute("NAME","ITplugin");
_5.setAttribute("HEIGHT","0");
_5.setAttribute("WIDTH","0");
_5.setAttribute("URL",_2);
document.body.appendChild(_5);
_3=true;
}
if((_3==false)||(navigator.userAgent.indexOf("Opera")>-1)){
w=window.open();
w.document.open();
w.document.writeln("<HTML><HEAD>");
w.document.writeln("<TITLE>Xythos Drive Intellitach Plugin</TITLE>");
w.document.writeln("</HEAD><BODY>");
w.document.writeln("<EMBED type=application/x-Intellittach-plugin "+"name=ITplugin height=0 width=0 URL=\""+_2+"\">");
w.document.writeln("</BODY></HTML>");
w.document.close();
w.close();
}
}
}
}

(function(){
var _1=YAHOO.util.Connect;
var _2=function(_3,_4){
this.sourceUrl=_3;
this.cached=[];
this.clear();
if(_4){
this.formData=_1.setForm(_4);
_1.resetFormState();
}
};
var _5=function(_6,_7,_8){
var _9=_7,_a=_7+_8,_b=Math.max(0,_7-_8),_c=_a+_8,_d=false,_e=false;
for(var i=_6.length;i>0;i--){
var _10=_6[i-1];
if(_10.start<=_7&&_7<=_10.end){
_9=_10.end;
_d=true;
}
if(_10.start<=_b&&_b<=_10.end){
_b=_10.end;
}
if(_10.start<=_a&&_a<=_10.end){
_a=_10.start;
_e=true;
}
if(_10.start<=_c&&_c<=_10.end){
_c=_10.start;
}
}
if(_9!=_a&&_9<_a){
if(_9!=_a&&_a-_9<_8){
if(!_e){
return [_9,Math.min(_9+_8,_c)];
}else{
if(!_d){
return [Math.max(_a-_8,_b),_a];
}
}
}
return [_9,_a];
}
};
var _11=function(_12,_13){
var i=_12.indexOf(_13);
delete _13.conn;
if(i>0){
var _15=_12[i-1];
if(!_15.conn&&_15.end>=_13.start){
_13.start=Math.min(_15.start,_13.start);
_13.end=Math.max(_15.end,_13.end);
_12.splice(i-1,1);
i--;
}
}
if(i>-1&&i<_12.length-1){
var _16=_12[i+1];
if(!_16.conn&&_13.end>=_16.start){
_13.start=Math.min(_16.start,_13.start);
_13.end=Math.max(_16.end,_13.end);
_12.splice(i+1,1);
}
}
};
var _17=function(_18,_19){
for(var i=_18.length;i>0;i--){
var _1b=_18[i-1];
if(_19.start>=_1b.start){
_18.splice(i,0,_19);
return;
}
}
_18.splice(0,0,_19);
};
_2.prototype.load=function(_1c,_1d,_1e,_1f){
var _20=this.loadId;
var _21=_5(this.lazyLoads,_1c,_1d);
if(!_21){
return;
}
_1c=_21[0];
_1d=_21[1]-_1c;
var _22={success:function(p_o){
xy.handleAjaxSuccessResponsePreProcessor(p_o);
if(this.loadId!=_20){
return;
}
var _24=JSON.parse(p_o.responseText);
_1e(_24);
_11(this.lazyLoads,_25);
if(_1f){
_11(this.cached,_25);
}
},failure:function(p_o){
xy.handleAjaxErrorResponse(p_o);
},scope:this};
var _25={start:_1c,end:_1c+_1d,conn:_1.asyncRequest(this.formData?"POST":"GET",this.sourceUrl+"&posStart="+_1c+"&count="+_1d,_22,this.formData)};
_17(this.lazyLoads,_25);
if(_1f){
_17(this.cached,_25);
}
return [_1c,_1d];
};
_2.prototype.clear=function(){
var _27=this.lazyLoads||[];
for(var i=_27.length;i>0;i--){
var _29=_27[i-1];
if(_29.conn){
_1.abort(_29.conn);
}
}
this.lazyLoads=this.cached.slice();
this.loadId=(this.loadId||0)+1;
};
xy.PagedLoader=_2;
})();

(function(){
var _1=YAHOO.util.Dom,_2=YAHOO.util.Event,_3=xy.Aria,_4=YAHOO.widget.MenuManager;
var _5="viewListView",_6="viewThumbView",_7="viewAddRemoveColumns";
xy.FileMgr=function(){
xy.FileMgr.superclass.constructor.call(this,"pageTitle");
this._initialLoadComplete=false;
};
YAHOO.extend(xy.FileMgr,xy.Application);
xy.FileMgr.instance=null;
xy.FileMgr.get=function(){
if(xy.FileMgr.instance==null){
xy.FileMgr.instance=new xy.FileMgr();
}
return xy.FileMgr.instance;
};
xy.FileMgr.prototype.run=function(){
this.setupGrid();
this.createEvents();
this.setupViewMenu();
this.setupToolbars();
this.setupEvents();
this.setupModal();
this.initLocation();
this.setupBreadcrumb();
if(_8(xy.FileMgr.Config.sessionTimeout)){
xy.FileMgr.Config.useXythosDrive=true;
}else{
xy.FileMgr.Config.useXythosDrive=false;
}
this.setMinWidth(this.getToolbarWidth());
};
xy.FileMgr.prototype.resizeHandler=function(){
xy.fileGrid.setSizes();
};
xy.FileMgr.prototype.setupGrid=function(){
xy.fileGrid=new xy.widget.FileView("content_wide","gridbox","thumbbox","fileViewFooter",this.getConfig());
};
xy.FileMgr.prototype.setupToolbars=function(){
this.getMessagesToolbar().hide();
this.mainNavToolbar=new xy.MainNavToolbar("location_left",function(){
return xy.FileMgr.Config.uiConfig.mainNav;
},xy.FileMgr.Config.Strings);
this.mainNavToolbar.subscribeToConfigEvent(this,xy.events.UpdateConfigEvent);
this.breadcrumbToolbar=new xy.BreadcrumbToolbar("breadcrumbToolbar",function(){
return xy.FileMgr.Config.uiConfig.breadcrumbToolbar;
},xy.FileMgr.Config.Strings);
this.breadcrumbToolbar.subscribeToConfigEvent(this,xy.events.UpdateConfigEvent);
this.searchToolbar=new xy.SearchToolbar("searchToolbar",function(){
return xy.FileMgr.Config.uiConfig.searchToolbar;
},xy.FileMgr.Config.Strings);
this.searchToolbar.subscribeToConfigEvent(this,xy.events.UpdateConfigEvent);
this.leftToolbar=new xy.widget.LeftToolbar("idToolbarLeft","XM_ALT_LEFT_TOOLBAR",function(){
return xy.FileMgr.Config.uiConfig.leftTool;
},xy.FileMgr.Config.Strings);
this.leftToolbar.subscribeToConfigEvent(this,xy.events.UpdateConfigEvent);
this.rightToolbar=new xy.widget.MainToolbar("idToolbarRight","XM_ALT_RIGHT_TOOLBAR",function(){
return xy.FileMgr.Config.uiConfig.rightTool;
},xy.FileMgr.Config.Strings);
this.rightToolbar.subscribeToConfigEvent(this,xy.events.UpdateConfigEvent);
_2.addListener("searchtext","keypress",function(_9){
var e=_9||window.event;
if(e.keyCode==13){
this.doQuickSearch();
}
return e.keyCode!=13;
},this,true);
};
xy.FileMgr.prototype.setupViewMenu=function(){
var _b=this;
var _c=new xy.widget.ViewMenu("viewMenu",{classname:"dropdownMenu"});
_c.getConfig=function(){
return _b.getConfig().uiConfig.view;
};
xy.events.UpdateConfigEvent.subscribe(_c.updateConfig,_c,true);
_c.updateConfig();
new YAHOO.util.KeyListener(document,{keys:xy.DomUtil.Keys.ESCAPE},function(){
_c.hide();
}).enable();
var _d=function(_e,_f,_10){
var _11=_4.getMenuItem(_e);
if(_11){
_11.cfg.setProperty(_f,_10);
}
};
var _12=function(_13){
_d(_5,"checked",_13);
_d(_6,"checked",!_13);
_d(_7,"disabled",!_13);
};
_c.selectedListView=function(){
_12(true);
};
_c.selectedThumbView=function(){
_12(false);
};
_c.beforeShowEvent.subscribe(function(){
_12(xy.fileGrid.type==xy.widget.FileView.Type.GRID);
});
this.viewMenu=_c;
};
xy.FileMgr.prototype.refresh=function(_14,_15){
xy.fileGrid.clearAll();
this.isRefresh=true;
if(_14){
this.onLoadMessage={msg:_14,type:_15};
}
if(xy.FileMgr.isSearch){
this.doSearch();
this.fetchConfig(this.getEntryName(),true,(xy.FileMgr.searchType=="QUICK"));
}else{
this.viewDirectory(this.getEntryName());
}
};
xy.FileMgr.prototype.createEvents=function(){
var _16=function(_17){
return new YAHOO.util.CustomEvent(_17,window,true,YAHOO.util.CustomEvent.LIST);
};
xy.events.ViewLoadedEvent=_16("ViewLoadedEvent");
xy.events.ViewDirectoryEvent=_16("ViewDirectoryEvent");
xy.events.UpdateConfigEvent=_16("UpdateConfigEvent");
xy.events.SearchEvent=_16("SearchEvent");
xy.events.SelectedEntriesChangedEvent=_16("SelectedEntriesChangedEvent");
xy.events.RowDoubleClickEvent=_16("RowDoubleClickEvent");
xy.events.OpenAdvancedSearchEvent=_16("OpenAdvancedSearchEvent");
xy.events.CloseAdvancedSearchEvent=_16("CloseAdvancedSearchEvent");
xy.events.OpenAddCriteriaEvent=_16("OpenAddCriteriaEvent");
xy.events.CloseAddCriteriaEvent=_16("CloseAddCriteriaEvent");
xy.events.AddSearchCriteriaEvent=_16("AddSearchCriteriaEvent");
};
xy.FileMgr.prototype.setupEvents=function(){
xy.events.ViewLoadedEvent.subscribe(this.viewLoadedListener,this,true);
xy.events.SearchEvent.subscribe(this.searchEventListener,this,true);
xy.events.ViewDirectoryEvent.subscribe(this.viewDirectoryEventListener,this,true);
xy.events.SelectedEntriesChangedEvent.subscribe(this.selectedEntriesChangedEventListener,this,true);
xy.events.RowDoubleClickEvent.subscribe(this.rowDoubleClickEventListener,this,true);
xy.events.ViewDirectoryEvent.subscribe(this.viewDirectoryHandler,this,true);
xy.events.CloseAdvancedSearchEvent.subscribe(this.closeAdvancedSearchEventListener,this,true);
xy.events.OpenAdvancedSearchEvent.subscribe(this.openAdvancedSearchEventListener,this,true);
xy.events.UpdateConfigEvent.subscribe(this.trashNoteHandler,this,true);
};
xy.FileMgr.prototype.trashNoteHandler=function(_18,_19,_1a){
var _1b=xy.FileMgr.Config,_1c=!xy.app.getMessagesToolbar().hasMessages();
if(_1c&&_1b.uiConfig.isTrash&&_1b.showTrashDeletionMessage){
xy.app.displayMessage(xy.MessageBundle.getString("XM_MESSAGE_IN_TRASHCAN"));
}
};
xy.FileMgr.prototype.getSelectedEntries=function(){
return xy.fileGrid.getSelectedEntries();
};
xy.FileMgr.prototype.getSelectedEntriesSorted=function(){
return xy.fileGrid.getSelectedEntriesSorted();
};
xy.FileMgr.prototype.selectNext=function(_1d){
return xy.fileGrid.selectNext(_1d);
};
xy.FileMgr.prototype.selectPrev=function(_1e){
return xy.fileGrid.selectPrev(_1e);
};
xy.FileMgr.prototype.saveColumnLayout=function(_1f){
return xy.fileGrid.saveLayout(_1f);
};
xy.FileMgr.prototype.viewDirectoryEventListener=function(_20,_21,_22){
var _23=_21[0];
var _24=_21[1];
xy.FileMgr.isSearch=false;
if(xy.app.isRepositorySpaceSwitch(xy.app.getEntryName(),_23)){
var url=xy.app.getFileManagerFullURL(_23);
window.location=url;
}else{
this.setEntryName(_23);
this.clearMessages();
var _26=this;
if(!this.isRefresh){
xy.fileGrid.clearType();
}else{
this.isRefresh=undefined;
}
xy.fileGrid.load(xy.FileMgr.get().getGridDataURL(this.getEntryName()),undefined,function(){
if(_26.onLoadMessage){
_26.displayMessage(_26.onLoadMessage.msg,_26.onLoadMessage.type);
_26.onLoadMessage=undefined;
}
});
if(this.isRMSpace(_23)){
this.getMainMenu().selectApp(xy.widget.MainMenu.Apps.RECORD_MANAGER);
}else{
this.getMainMenu().selectApp(xy.widget.MainMenu.Apps.FILE_MANAGER);
}
if(_24){
xy.FileMgr.get().displayErrorMessage(_24);
}
}
};
xy.FileMgr.prototype.viewLoadedListener=function(_27,_28,_29){
if(!xy.FileMgr.isSearch){
xy.Aria.notifyReader(xy.MessageBundle.formatString("XM_ALT_DIR_CONTENTS_LOADED",this.getEntryName()));
}
};
xy.FileMgr.prototype.isRepositorySpaceSwitch=function(_2a,_2b){
if(!_2a||!_2b){
return false;
}
var _2c=false;
if(this.isRMSpace(_2a)){
_2c=!this.isRMSpace(_2b);
}else{
_2c=this.isRMSpace(_2b);
}
return _2c;
};
xy.FileMgr.prototype.isRMSpace=function(_2d){
var _2e=false;
var _2f=xy.FileMgr.Config.rmRootDir;
if(_2d.length>=_2f.length){
_2e=_2d.substr(0,_2f.length)===_2f;
}
return _2e;
};
xy.FileMgr.prototype.buildPostBodyFromSelectedEntries=function(_30){
var _31=[];
_31.push("numSelected=");
_31.push(_30.length);
for(var i=0;i<_30.length;i++){
_31.push("&selectedEntryName=");
_31.push(encodeURIComponent(_30[i].id));
}
var _33=_31.join("");
return _33;
};
xy.FileMgr.prototype.selectedEntriesChangedEventListener=function(_34,_35,_36){
var _37=_35[0];
xy.app.setupFilesForm(_37);
};
xy.FileMgr.prototype.setupFilesForm=function(_38){
var _39=_38||this.getSelectedEntries();
var _3a=document.getElementById("filesForm");
xy.DomUtil.removeAllChildNodes(_3a);
var _3b=function(_3c,_3d){
var _3e=document.createElement("input");
_3e.type="hidden";
_3e.id=_3e.name=_3c;
_3e.value=_3d;
return _3e;
};
_3a.appendChild(_3b("numFiles",_39.length));
_3a.appendChild(_3b("subaction",""));
_3a.appendChild(_3b("a1","multiple"));
_3a.appendChild(_3b("stk",this.getConfig().stk));
for(var i=0;i<_39.length;i++){
_3a.appendChild(_3b("file"+i,_39[i].id));
}
};
xy.FileMgr.prototype.rowDoubleClickEventListener=function(_40,_41,_42){
var _43=_41[0];
this.open(_43);
};
xy.FileMgr.prototype.searchEventListener=function(_44,_45,_46){
xy.FileMgr.get().showLevelToolbar();
var _47=this.onLoadMessage;
if(_47){
this.displayMessage(_47.msg,_47.type);
this.onLoadMessage=undefined;
}
};
xy.FileMgr.prototype.openAdvancedSearchEventListener=function(_48,_49,_4a){
xy.FileMgr.isSearch=true;
var _4b=_49[0]?_49[0]:this.getEntryName();
var _4c=_49[1]?_49[1]:false;
this.fetchConfig(_4b,true,_4c);
this.setEntryName(_4b);
xy.fileGrid.clearAll();
this.clearMessages();
this.hideLevelToolbar();
xy.DomUtil.hideElement(this.gridHeader);
};
xy.FileMgr.prototype.closeAdvancedSearchEventListener=function(_4d,_4e,_4f){
xy.FileMgr.get().clearMessages();
};
xy.FileMgr.prototype.getLevelToolbar=function(){
if(!this.levelToolbar){
this.levelToolbar=document.getElementById("level_toolbar");
}
return this.levelToolbar;
};
xy.FileMgr.prototype.showLevelToolbar=function(){
_1.setStyle(this.getLevelToolbar(),"display","block");
};
xy.FileMgr.prototype.hideLevelToolbar=function(){
_1.setStyle(this.getLevelToolbar(),"display","none");
};
xy.FileMgr.prototype.setupBreadcrumb=function(){
this.breadCrumb=new xy.widget.Breadcrumb(xy.widget.Breadcrumb.Config);
this.breadCrumb.render();
xy.events.ViewDirectoryEvent.subscribe(this.breadCrumb.viewDirectoryEventListener,this.breadCrumb,true);
xy.events.OpenAdvancedSearchEvent.subscribe(this.breadCrumb.openAdvancedSearchEventListener,this.breadCrumb);
xy.widget.Breadcrumb.instance=this.breadCrumb;
};
xy.FileMgr.prototype.viewDirectory=function(_50,_51){
xy.events.ViewDirectoryEvent.fire(_50,_51);
};
xy.FileMgr.prototype.getGridDataURL=function(_52){
var _53=xy.FileMgr.Config.getGridDataURLRoot;
var url=_53+"&entryName="+(_52?encodeURIComponent(_52):"");
var _55=xy.fileGrid.getSortingState();
if(_55&&_55.length==2){
url+="&colSort="+_55[0]+"_"+_55[1];
}
url+=Xythos.getLoadUniq();
return url;
};
xy.FileMgr.prototype.getFileManagerFullURL=function(_56){
var _57=(_56?_56:"");
var url=xy.FileMgr.Config.Strings.formatString("fileManagerUrl",encodeURIComponent(_57));
url=url.substr(1,url.length-1);
return url;
};
xy.FileMgr.prototype.getBreadcrumb=function(){
return this.breadCrumb;
};
xy.FileMgr.prototype.setupModal=function(){
var _59={visible:false,fixedcenter:true};
this.modal=new xy.widget.RefreshedModalDialog("panel_modal",_59);
this.modal.render(document.body);
this.setModal(this.modal);
};
xy.FileMgr.prototype.fetchConfig=function(_5a,_5b,_5c){
if(this._initialLoadComplete||_5a!==this.getConfig().initialEntry||_5b==true){
var _5d=xy.FileMgr.Config.Strings.formatString("uiConfigUrl",encodeURIComponent(_5a));
if(_5b){
_5d=_5d+"&searchMode=true";
if(_5c){
_5d=_5d+"&quickSearch=true";
}
}
this.execAndFetchConfig(_5d,false);
}else{
xy.events.UpdateConfigEvent.fire();
this._initialLoadComplete=true;
}
};
xy.FileMgr.prototype.manageSelectedEntry=function(_5e){
var _5f=this.getSelectedEntries();
if(_5f.length!=1){
return;
}
var _60=_5f[0].getID();
if(_60){
var _61=xy.FileMgr.Config.Strings.formatString("manageEntryUrl",encodeURIComponent(_60))+this.getReturnTarget();
if(_5e){
_61+="#"+_5e;
}
window.location=_61;
}
};
xy.FileMgr.prototype.rss=function(_62){
var _63=_62;
if(!_63){
_63=xy.app.getSelectedEntries();
}
if(!_63||!_63||_63.length!=1){
return;
}
var _64=_63[0].id;
var _65=_63[0].httpSafeName;
var _66=xy.FileMgr.Config.Strings.formatString("rssUrl",_65);
window.open(_66);
};
xy.FileMgr.prototype.createSubscription=function(_67){
var _68=_67;
if(!_68){
_68=xy.app.getSelectedEntries();
}
if(!_68||!_68||_68.length!=1){
return;
}
var _69=_68[0].id;
var _6a=xy.modal.Config.formatString("CREATE_SUBSCRIPTIONS_URL",encodeURIComponent(_69));
this.getModal().cfg.setProperty("pageRequest",{pageSrc:_6a});
this.getModal().show();
};
xy.FileMgr.prototype.shareSelectedEntry=function(){
var _6b=this.getSelectedEntries();
if(_6b.length!=1){
return;
}
var _6c=_6b[0].getID();
if(_6c){
var _6d=xy.FileMgr.Config.Strings.formatString("manageEntryUrl",encodeURIComponent(_6c))+"#SHARING";
window.location=_6d;
}
};
xy.FileMgr.prototype.initLocation=function(){
if(xy.FileMgr.Config.searchName!=""){
xy.FileMgr.get().openSavedSearch(xy.FileMgr.Config.searchName);
}else{
if(this.getConfig().lastSearch){
this.openLastSearch();
}else{
xy.FileMgr.get().viewDirectory(this.getConfig().initialEntry);
}
}
};
xy.FileMgr.prototype.viewDirectoryHandler=function(_6e,_6f,_70){
var _71=_6f[0];
this.showLevelToolbar();
this.fetchConfig(_71);
};
xy.FileMgr.prototype.manageBookmarks=function(){
window.location=xy.FileMgr.Config.Strings.formatString("manageBookmarksURL",encodeURIComponent(this.getEntryName()));
};
xy.FileMgr.prototype.addBookmark=function(_72){
this.getModal().show();
this.getModal().cfg.setProperty("pageRequest",{pageSrc:xy.FileMgr.Config.Strings.getString("addBookmarkURL"),formSrc:xy.constructPostdata({"fullPath":_72})});
};
xy.FileMgr.prototype.launchWebFolder=function(_73,_74){
var _75=_73;
var _76=_74;
this.openWebFolder=function(){
oDAV.navigateFrame(_76,_75);
return false;
};
};
xy.FileMgr.prototype.copyURLToClipBoard=function(url,_78){
if(window.clipboardData){
window.clipboardData.setData("Text",url);
}else{
var _79=this.getModal();
_79.renderResult({header:"",body:"<p><b>"+_78+"</b></p>"+"<p><a href=\""+url+"\">"+url+"</a></p>",buttons:[{text:xy.MessageBundle.getString("OK"),onclickHandler:function(){
this.hide();
}}]});
_79.show();
}
};
xy.FileMgr.prototype.openInXythosDrive=function(_7a){
if(xy.FileMgr.Config.useXythosDrive){
VBConnectAndOpenApp(_7a);
setTimeout("window.blur()",xy.FileMgr.Config.ittachTimeout);
}else{
window.open(_7a,"edit_help","width=450,height=300,top=200,left=200,scrollbars=yes,resizable=yes");
if(_7b()){
rightFrame.location.reload();
setTimeout("window.blur()",xy.FileMgr.Config.ittachTimeout);
}
}
};
xy.FileMgr.prototype.getFullEntryPath=function(){
return this.getConfig().uiConfig.fullEntryPath;
};
xy.FileMgr.prototype.getReturnTarget=function(){
var _7c=this.getSelectedEntries();
if(xy.FileMgr.isSearch){
return xy.modal.Config.formatString("SEARCH_RETURN_ACTION");
}else{
if(_7c&&_7c.length>1){
return xy.modal.Config.formatString("SELF_RETURN_ACTION");
}else{
return xy.modal.Config.formatString("RETURN_ACTION");
}
}
};
xy.FileMgr.prototype.viewProperty=function(_7d,_7e,_7f){
this.getModal().show();
var _80=xy.modal.Config.formatString("VIEW_PROPERTY_URL",encodeURIComponent(this.getEntryName()))+"&entryID="+_7d+"&propName="+encodeURIComponent(_7e)+"&propNamespace="+encodeURIComponent(_7f);
this.getModal().cfg.setProperty("pageRequest",{pageSrc:_80,formSrc:document.filesForm});
};
xy.FileMgr.prototype.newWiki=function(){
var _81=xy.modal.Config.formatString("NEW_WIKI_URL",encodeURIComponent(this.getEntryName()));
this.getModal().cfg.setProperty("pageRequest",{pageSrc:_81});
this.getModal().show();
};
xy.FileMgr.prototype.loadBookmark=function(_82){
if(xy.FileMgr.isSearch){
xy.app.getSearchManager().openSearch(_82,undefined,true);
}else{
xy.app.viewDirectory(_82);
}
};
xy.FileMgr.prototype.startWaitIndicator=function(){
xy.fileGrid.clearAll();
xy.fileGrid.setupLongGridLoadingDisplay();
};
xy.FileMgr.prototype.stopWaitIndicator=function(){
this.refresh();
};
xy.getLoadUniq=function(){
return "&loaduniq="+(new Date()).valueOf();
};
Xythos.removeSearchBoxText=function(){
if(xy.app.getConfig().searchBoxHelpText){
var box=document.getElementById("searchtext");
box.value="";
box.style.color="black";
xy.app.getConfig().searchBoxHelpText=false;
}
};
Xythos.addSearchBoxText=function(_84){
if(!xy.app.getConfig().searchBoxHelpText){
var box=document.getElementById("searchtext");
if(box.value==""){
box.value=_84;
box.style.color="gray";
xy.app.getConfig().searchBoxHelpText=true;
}
}
};
var _8=function(_86){
var _87=_88("xythosdrive");
var _89=1;
var _8a="";
if(_86!=-1){
_8a=_8b(_86);
}
if(VBIsIttachAvailable()==0||VBIsClientRunning()==0){
_89=0;
}
if(_87==1&&_89!=1){
if(_8a!=""){
document.cookie="xythosdrive=0; path=/; expires="+_8a;
}else{
document.cookie="xythosdrive=0; path=/";
}
document.location.reload();
}
if(_89==1&&_87!=1){
if(_8a!=""){
document.cookie="xythosdrive=1; path=/; expires="+_8a;
}else{
document.cookie="xythosdrive=1; path=/";
}
}
return _89;
};
var _7b=function(){
var _8c=_88("xythosdrive");
var _8d=1;
var _8e=0;
if(VBIsIttachAvailable()==0||VBIsClientRunning()==0){
_8d=0;
}
if(_8c==1&&_8d!=1){
_8e=1;
}
if(_8d==1&&_8c!=1){
_8e=1;
}
return _8e;
};
var _8f=function(_90){
var _91=_88("xythosdrive");
var _92=1;
var _93="";
if(_90!=-1){
_93=_8b(_90);
}
if(VBIsIttachAvailable()==0||VBIsClientRunning()==0){
_92=0;
}
if(_91==1&&_92!=1){
if(_93!=""){
document.cookie="xythosdrive=0; path=/; expires="+_93;
}else{
document.cookie="xythosdrive=0; path=/";
}
}
if(_92==1&&_91!=1){
if(_93!=""){
document.cookie="xythosdrive=1; path=/; expires="+_93;
}else{
document.cookie="xythosdrive=1; path=/";
}
}
return _92;
};
var _88=function(_94){
var _95=_94+"=";
var _96=_95.length;
var _97=document.cookie.length;
var i=0;
while(i<_97){
var j=i+_96;
if(document.cookie.substring(i,j)==_95){
var _9a=document.cookie.indexOf(";",j);
if(_9a==-1){
_9a=document.cookie.length;
}
return decodeURIComponent(document.cookie.substring(j,_9a));
}
i=document.cookie.indexOf(" ",i)+1;
if(i==0){
break;
}
}
return null;
};
var _8b=function(_9b){
var _9c=new Date();
var _9d=_9c.getTime();
var _9e=_9d+1000*_9b;
_9c.setTime(_9e);
return _9c.toGMTString();
};
})();

(function(){
var _1=YAHOO.util.Dom,_2=YAHOO.util.Event,_3=xy.Aria;
var _4=function(_5,_6,_7){
_4.superclass.constructor.call(this,_6);
this.fileView=_5;
this.config=_7;
this.createEvents();
this.initGrid();
this.registerEventListeners();
this.registerKeyboardHandler();
};
YAHOO.lang.extend(_4,xy.widget.XComponent);
_4.prototype.initGrid=function(){
var _8=this;
this.grid=new xy.widget.ActiveGrid(this.containerId,this.config);
var _9=this.grid;
_9.enableMultiselect(true);
_9.enableColumnMove(true);
_9.enableKeyboardSupport(false);
_9.setAwaitedRowHeight("22px");
_9.enablePaging(true,this.config.gridLazyLoadingPageSize);
_9.enablePreRendering();
_9.setPagingSkin("custom");
_9.clearAll=(function(){
var _a=_9.clearAll;
return function(){
_8.headerRow=undefined;
_8._xy_checkboxes=[];
_8._xy_checkall=false;
_8.highlightCell=undefined;
_8.highlightRow=undefined;
return _a.apply(this,arguments);
};
})();
if(_9.entBox.onmousedown){
_9.entBox.oncontextmenu=function(){
};
}
_9._xy_fileGrid=this;
};
_4.prototype.createEvents=function(){
var _b=function(_c){
return new YAHOO.util.CustomEvent(_c,window,true,YAHOO.util.CustomEvent.LIST);
};
this.viewLoadedEvent=_b("ViewLoadedEvent");
this.selectedEntriesChangedEvent=_b("SelectedEntriesChangedEvent");
this.rowDoubleClickEvent=_b("RowDoubleClickEvent");
this.lazyLoadEvent=_b("LazyLoadEvent");
this.pagedEvent=_b("PagedEvent");
};
_4.prototype.getViewLoadedEvent=function(){
return this.viewLoadedEvent;
};
_4.prototype.getSelectionChangedEvent=function(){
return this.selectedEntriesChangedEvent;
};
_4.prototype.getDoubleClickEvent=function(){
return this.rowDoubleClickEvent;
};
_4.prototype.getLazyLoadEvent=function(){
return this.lazyLoadEvent;
};
_4.prototype.getPagedEvent=function(){
return this.pagedEvent;
};
_4.prototype.beginLoad=function(){
this.clearAll();
_2.removeListener("checkall_id","click");
};
_4.prototype.parse=function(_d){
this.fullDataset=this.fullDataset||_d.fullDataset;
this.grid.xmlFileUrl=true;
this.grid.parse(_d,"json");
this.changePage(this.curPage||0);
};
_4.prototype.changePage=function(_e){
this.curPage=_e;
if(!this.fullDataset){
var _f=this.grid.getRowsNum(),_10=_e*this.config.gridLazyLoadingPageSize,end=(_e+1)*this.config.gridLazyLoadingPageSize;
if(_f<end){
this.lazyLoadEvent.fire(Math.max(_10,_f));
var _12=this.grid.rowsBuffer;
if(!_12[_10]){
_12[_10]=null;
this.ignorePageEvent=true;
}
}
}
this.grid.changePage(_e+1);
};
_4.prototype.getUserData=function(_13,_14){
return this.grid.getUserData(_13,_14);
};
_4.prototype.getLayoutConfig=function(){
return this.layoutConfig;
};
_4.prototype.setSizes=function(){
var _15=this;
setTimeout(function(){
_15.grid.setSizes();
},0);
};
_4.prototype.clearAll=function(_16){
var _17=_16===undefined?this._initialGridLoadComplete:_16;
if(_17){
this._initialGridLoadComplete=false;
this.fullDataset=false;
this.curPage=0;
}
this.grid.clearAll(_17);
this.grid.clearSelection();
this.doOnRowSelectionChanged({});
};
_4.prototype.getSelectedEntries=function(){
var _18=this.grid;
var _19=[];
for(var i=0;i<_18.selectedRows.length;i++){
_19.push(this.fileView.getUIEntry(_18.selectedRows[i].idd));
}
return _19;
};
_4.prototype.getSelectedEntriesSorted=function(){
function l_sortByRowIndex(_1b,_1c){
return _1b.rowIndex-_1c.rowIndex;
}
var _1d=this.grid.selectedRows;
_1d.sort(l_sortByRowIndex);
return this.getSelectedEntries();
};
_4.prototype.selectNext=function(_1e){
var _1f=this.grid,_20=_1f.selectedRows,_21=this.getGridState(),max;
for(var i=_20.length;i>0;i--){
var row=_20[i-1];
if(!max||max.rowIndex<row.rowIndex){
max=row;
}
}
var _25=max?max.rowIndex:0;
if(_25>=(_21.pageEnd-_21.pageStart)){
_25=0;
}
_25+=_21.pageStart;
if(_1e){
var _26=_25;
while(_1f.getUserData(_1f.getRowId(_25),"ENTRYTYPE")!="F"){
_25++;
if(_25>=_21.pageEnd){
_25=_21.pageStart;
}
if(_25==_26){
return;
}
}
}
_1f.selectRowById(_1f.getRowId(_25),false,true,true);
};
_4.prototype.selectPrev=function(_27){
var _28=this.grid,_29=_28.selectedRows,_2a=this.getGridState(),min;
for(var i=_29.length;i>0;i--){
var row=_29[i-1];
if(!min||min.rowIndex>row.rowIndex){
min=row;
}
}
var _2e=min?min.rowIndex-2:-1;
if(_2e<0){
_2e=(_2a.pageEnd-_2a.pageStart)-1;
}
_2e+=_2a.pageStart;
if(_27){
var _2f=_2e;
while(_28.getUserData(_28.getRowId(_2e),"ENTRYTYPE")!="F"){
_2e--;
if(_2e<0){
_2e=_2a.pageEnd-1;
}
if(_2e==_2f){
return;
}
}
}
_28.selectRowById(_28.getRowId(_2e),false,true,true);
};
_4.prototype.getRowByIndex=function(_30){
return _30?this.grid.getRowById(this.grid.getRowId(_30-1)):this.grid.headerRow;
};
_4.prototype.getHeaderRow=function(){
if(!this.headerRow){
var _31=_1.getElementsByClassName("hdrcell","div",this.grid.hdr)[0];
var _32=_1.getAncestorByTagName(_31,"tr");
this.headerRow=_32;
}
return this.headerRow;
};
_4.prototype.markCheckboxes=function(){
var _33=this.grid,_34=this.getGridState(),_35=_34.pageEnd-_34.pageStart;
for(var i=0;i<_33.selectedRows.length;i++){
var _37=_33.cells(_33.selectedRows[i].idd,0);
_37.setChecked(true);
}
for(var i=0;i<this._xy_checkboxes.length;i++){
var _38=true;
for(var j=0;j<_33.selectedRows.length;j++){
if(_33.selectedRows[j].idd==this._xy_checkboxes[i]){
_38=false;
break;
}
}
if(_38){
var _37=_33.cells(this._xy_checkboxes[i],0);
_37.setChecked(false);
}
}
this._xy_checkboxes=[];
for(var i=0;i<_33.selectedRows.length;i++){
this._xy_checkboxes[i]=_33.selectedRows[i].idd;
}
if((_33.selectedRows.length==_35&&!this._xy_checkall)||(this._xy_checkall&&_33.selectedRows.length!=_35)){
this.toggleCheckAll();
}
};
_4.prototype.toggleCheckAll=function(){
var _3a=document.getElementById("checkall_id");
if(_3a!=null){
if(this._xy_checkall=!this._xy_checkall){
_1.replaceClass(_3a,"item_chk0","item_chk1");
}else{
_1.replaceClass(_3a,"item_chk1","item_chk0");
}
_3.applyAriaAttribute(_3a,_3.Attr.CHECKED,this._xy_checkall);
}
};
_4.prototype.registerEventListeners=function(){
var _3b=this;
var _3c=_3b.grid;
function bind(fn){
return function(){
return fn.apply(_3b,arguments);
};
}
_3c.attachEvent("onSelectStateChanged",bind(_3b.doOnRowSelectionChanged));
_3c.attachEvent("onCheckbox",bind(_3b.doOnCheck));
_3c.attachEvent("onRightClick",bind(_3b.doOnBeforeContextMenu));
_3c.attachEvent("onRowDblClicked",bind(_3b.doOnRowDoubleClick));
_3c.attachEvent("onHeaderClick",bind(_3b.doOnHeaderClick));
_3c.attachEvent("onXLE",bind(_3b.doOnXLE));
_3c.attachEvent("onDynXLS",bind(_3b.doOnDynXLS));
_3c.attachEvent("onPageChanged",bind(_3b.doOnPageChanged));
_3c.attachEvent("onRowCreated",bind(_3b.doOnRowCreated));
_3c.attachEvent("onBeforeSorting",bind(_3b.doOnBeforeSorting));
_3c.attachEvent("onBeforeCMove",bind(_3b.doOnBeforeColumnMove));
_3c.attachEvent("onAfterCMove",bind(_3b.doUpdateLayoutConfig));
_3c.attachEvent("onResizeEnd",bind(_3b.doUpdateLayoutConfig));
_3c.obj.onclick=(function(){
var _3e=_3c.obj.onclick;
return function(_3f){
var ev=_2.getEvent(_3f,_3c.obj);
var _41=_2.getTarget(ev);
var el=(_41.tagName||"").toLowerCase()=="td"?_41:_1.getAncestorByTagName(_41,"td");
var _43=_1.getAncestorByTagName(el,"tr");
_3b.highlightRow=_3c.getRowIndex(_43.idd)+1;
_3b.highlightCell=el._cellIndex;
_3b.displayGridFocus();
if(_1.hasClass(el,"aria_ch")){
new eXcell_aria_ch(el).changeState();
_2.stopEvent(ev);
}else{
return _3e.call(this,_3f);
}
};
})();
};
_4.prototype.doOnRowSelectionChanged=function(){
this.markCheckboxes();
this.selectedEntriesChangedEvent.fire(this.getSelectedEntries());
};
_4.prototype.doOnBeforeColumnMove=function(_44,_45){
this.fileView.columnMoved(_44,_45);
return _45!=0;
};
_4.prototype.doOnCheck=function(rid,_47,_48){
var _49=this.grid;
var row=_49.getRowById(rid);
if(_48){
_49.selectRow(row,false,true);
this._xy_checkboxes.push(rid);
}else{
if(row.className.indexOf("rowselected")!=-1){
row.className="";
if(_49.cell){
_49.cell.className=_49.cell.className.replace(/cellselected/g,"");
}
for(var _4b=0;_4b<_49.selectedRows.length;_4b++){
if(_49.selectedRows[_4b]==row){
_49.selectedRows.splice(_4b,1);
break;
}
}
for(var i=0;i<this._xy_checkboxes.length;i++){
if(this._xy_checkboxes[i]==rid){
this._xy_checkboxes.splice(i,1);
break;
}
}
}
this.doOnRowSelectionChanged();
}
return true;
};
_4.prototype.doOnBeforeContextMenu=function(rid){
for(var i=0;i<this.grid.selectedRows.length;i++){
if(rid==this.grid.selectedRows[i].idd){
return true;
}
}
this.grid.selectRow(this.grid.getRowById(rid),true);
return true;
};
_4.prototype.doOnRowDoubleClick=function(_4f,_50){
var _51=this.fileView.getUIEntry(_4f);
this.rowDoubleClickEvent.fire(_51,_50);
};
_4.prototype.doOnBeforeSorting=function(_52,_53,_54){
if(!this.fileView.sort(_52,_54,_53)){
return false;
}
this.grid.setSortImgState(true,_52,_54);
var _55=this.grid.hdr.rows[1].cells[_52];
_3.applyAriaAttribute(_55,_3.Attr.SORT,_54=="des"?"descending":"ascending");
return false;
};
_4.prototype.doOnHeaderClick=function(_56,_57){
this.highlightRow=undefined;
this.highlightCell=_56;
this.displayGridFocus();
return true;
};
_4.prototype.doOnDynXLS=function(_58,_59){
this.lazyLoadEvent.fire(_58,_59);
return false;
};
_4.prototype.doUpdateLayoutConfig=function(){
var _5a=this.grid,_5b=[],_5c=[],_5d=_5a.getColumnCount(),_5e=this;
for(var i=0;i<_5d;i++){
var id=_5a.getColumnId(i);
if(!(id=="TRASH_DELETION_DATE"||id=="TRASH_DELETED_BY"||id=="TRASH_DELETED_FROM")){
_5b.push(id);
_5c.push(_5a.getColWidth(i));
}
}
this.layoutConfig="columns="+_5b.join(",")+"&widths="+_5c.join(",");
};
_4.prototype.gridCheckAll=function(_61){
if(!this._xy_checkall){
this.grid.selectAll();
this.toggleCheckAll();
}else{
this.grid.clearSelection();
this.toggleCheckAll();
}
this.doOnRowSelectionChanged();
if(_61){
_2.stopEvent(_61);
}
};
_4.prototype.doOnXLE=function(obj,len,pid,_65){
var _66=this.grid,_67=this;
if(_65.pos){
return;
}
this._initialGridLoadComplete=true;
this.doUpdateLayoutConfig();
var _68=document.getElementById("checkall_id");
if(_68){
_68.alt=xy.MessageBundle.getString("XM_ALT_SELECTALL");
_3.allowKeyboardFocus(_68,false);
_3.applyRole(_68,"checkbox");
_3.applyAriaAttribute(_68,_3.Attr.CHECKED,false);
_2.addListener(_68.parentNode,"click",_67.gridCheckAll,_67,true);
}
var _69=this.getHeaderRow();
_3.applyRole(_69,"row");
var _6a=_66.obj;
var _6b=_6a.rows[0];
for(var i=0;i<_69.cells.length;i++){
var _6d=_69.cells[i];
var _6e=_6b.cells[i];
if(!_6e.childNodes.length){
_3.applyRole(_6d,"columnheader");
var _6f=document.createElement("div");
_6f.appendChild(document.createTextNode(_6d.textContent||_6d.innerText));
_6e.setAttribute("scope","col");
_6e.appendChild(_6f);
_3.applyRole(_6e,"columnheader");
}
}
var _70=_67.getContainerElement();
var _71=_70.getElementsByTagName("table");
for(var i=0;i<_71.length;i++){
if(_71[i]!=_6a){
_1.addClass(_71[i],"xy_presentation");
_3.applyRole(_71[i],"presentation");
}
}
_1.addClass(_6a,"xy_data");
_6a.summary=xy.MessageBundle.getString("XM_ALT_DIRECTORY_CONTENTS");
xy.DomUtil.unhideElement(_67.gridHeader);
if(_67.restoreFocus){
_67.displayGridFocus();
_67.restoreFocus=false;
}
this.pagedEvent.fire(this.getGridState());
this.viewLoadedEvent.fire();
this.selectedEntriesChangedEvent.fire([]);
};
_4.prototype.doOnPageChanged=function(){
this.grid.clearSelection();
this.doOnRowSelectionChanged();
if(!this.ignorePageEvent){
this.pagedEvent.fire(this.getGridState());
}
this.ignorePageEvent=false;
};
_4.prototype.doOnRowCreated=function(_72,row){
_3.applyRole(row,"row");
};
_4.prototype.registerKeyboardHandler=function(){
this._xy_checkboxes=[];
this._xy_checkall=false;
var _74=this.getContainerElement();
_3.allowKeyboardFocus(_74,true);
_3.allowKeyboardFocus(_1.getElementsByClassName("objbox","div",_74),false);
this.gridHeader=_3.addHeadingElement(_74,xy.MessageBundle.getString("XM_ALT_DIRECTORY_CONTENTS"),2);
_3.applyAriaAttribute(_74,_3.Attr.MULTISELECTABLE,true);
_3.registerRepeatingKeyListener(_74,this.doOnKeyPressed,this,true);
_2.addListener(_74,"focus",this.doFocus,this,true);
_2.on(_74,"focusin",function(_75){
var _76=_2.getTarget(_75);
_1.addClass(_76,"keyHover");
});
_2.on(_74,"focusout",function(_77){
var _78=_2.getTarget(_77);
_1.removeClass(_78,"keyHover");
});
};
_4.prototype.doFocus=function(_79){
var _7a=_2.getTarget(_79);
if(!xy.DomUtil.isFocusImplicit(_7a)){
this.displayGridFocus();
}
};
_4.prototype.doOnKeyPressed=function(_7b){
var _7c=_2.getCharCode(_7b),_7d=this.getGridState();
var _7e=xy.DomUtil.Keys,UP=_7e.UP,_80=_7e.DOWN,_81=_7e.LEFT,_82=_7e.RIGHT;
this.highlightRow=Math.min(this.highlightRow||_7d.pageStart,_7d.pageEnd);
if(_7c==UP||_7c==_80){
this.highlightRow=Math.max(Math.min(this.highlightRow+(_7c==_80?1:-1),_7d.pageEnd),_7d.pageStart);
this.displayGridFocus();
_2.stopEvent(_7b);
}else{
if(_7c==_81||_7c==_82){
if(this.highlightCell==undefined){
this.highlightCell=1;
}
this.highlightCell=Math.max(Math.min(this.highlightCell+(_7c==_82?1:-1),this.grid.getColumnsNum()-1),0);
this.displayGridFocus();
_2.stopEvent(_7b);
}else{
if(_7c==_7e.SPACE){
if(this.highlightRow==0){
var _83=this.getFocusElement().parentNode;
if(_83._cellIndex==0){
xy.app.gridCheckAll();
}else{
this.grid.sortField(_83._cellIndex,false,_83);
}
}else{
var row=this.getRowByIndex(this.highlightRow);
var _85=false;
for(var i=0;i<this._xy_checkboxes.length;i++){
_85=(row.idd==this._xy_checkboxes[i]);
if(_85){
break;
}
}
var _87=this.grid.cells(row.idd,0);
_87.setChecked(!_85);
this.doOnCheck(row.idd,0,!_85);
}
_2.stopEvent(_7b);
}else{
if(_7c==_7e.ENTER){
if(this.highlightRow){
var row=this.getRowByIndex(this.highlightRow);
if(row){
this.restoreFocus=true;
this.doOnRowDoubleClick(row.idd);
}
}
}
}
}
}
return true;
};
_4.prototype.getFocusElement=function(){
var _88=this.getGridState();
if(this.highlightCell===undefined){
this.highlightCell=1;
}
if(this.highlightRow>_88.pageStart){
return this.getRowByIndex(this.highlightRow).cells[this.highlightCell];
}else{
return _1.getElementsByClassName("hdrcell","div",this.grid.headerRow)[this.highlightCell];
}
};
_4.prototype.displayGridFocus=function(){
var _89=_1.getElementsByClassName("keyHover",undefined,this.getContainerElement());
_89=_89.length?_89:this.getContainerElement();
_3.allowKeyboardFocus(_89,false);
var _8a=this.getFocusElement();
if(_8a){
_3.allowKeyboardFocus(_8a,true);
setTimeout(function(){
try{
_8a.focus();
}
catch(err){
}
},0);
}
};
_4.prototype.getGridState=function(){
var _8b=this.grid.getStateOfView();
return {page:_8b[0]-1,pageStart:_8b[1],pageEnd:_8b[2],count:_8b[3]};
};
eXcell_aria_ro=function(_8c){
eXcell_ro.call(this,_8c);
};
YAHOO.lang.extend(eXcell_aria_ro,eXcell_ro);
eXcell_aria_ro.prototype.setValue=function(val){
eXcell_aria_ro.superclass.setValue.call(this,val);
var _8e=this.grid._xy_fileGrid.getHeaderRow();
this.cell.longdesc=_8e.cells[this.cell._cellIndex].innerText;
};
eXcell_fileName_ro=function(_8f){
eXcell_fileName_ro.superclass.constructor.call(this,_8f);
_3.applyAriaAttribute(_8f.parent,_3.Attr.LABELLEDBY,_1.generateId(_8f));
};
YAHOO.lang.extend(eXcell_fileName_ro,eXcell_aria_ro);
eXcell_aria_ch=function(_90){
eXcell_ch.call(this,_90);
};
YAHOO.lang.extend(eXcell_aria_ch,eXcell_ch);
eXcell_aria_ch.prototype.setValue=function(val){
_1.addClass(this.cell,"aria_ch");
this.cell.style.verticalAlign="middle";
if(val){
val=val.toString()._dhx_trim();
if((val=="false")||(val=="0")){
val="";
}
}
val=val?"1":"0";
this.cell.chstate=val;
this.setCValue("<input type=\"image\" src='"+xy.widget.Config.dummyImage+"' class='item_chk"+val+"'>",this.cell.chstate);
var img=this.cell.getElementsByTagName("input")[0];
_3.allowKeyboardFocus(img,false);
_3.applyRole(img,"checkbox");
_3.applyAriaAttribute(img,_3.Attr.CHECKED,val=="1");
img.alt=xy.MessageBundle.formatString("XM_ALT_SELECT",this.cell.parentNode.idd);
};
eXcell_xyimgtitle=function(_93){
try{
this.cell=_93;
this.grid=this.cell.parentNode.grid;
}
catch(er){
}
this.getTitle=function(){
if(_93.firstChild&&_93.firstChild.firstChild){
return _93.firstChild.firstChild.title;
}else{
if(_93.firstChild&&_93.firstChild.title){
return _93.firstChild.title;
}else{
return "";
}
}
};
};
if(typeof eXcell!="undefined"){
eXcell_xyimgtitle.prototype=new eXcell;
}
xy.widget.FileGrid=_4;
})();

(function(){
var _1=YAHOO.util.Dom,_2=YAHOO.util.Event,_3=xy.Aria,_4=xy.DomUtil.Keys;
var _5="selected",_6="thumbnail";
THUMB_TAG="li",IMG_TAG="img",LABEL_TAG="label",INPUT_TAG="input",DIV_TAG="div",SPAN_TAG="span";
TICK_SIZE=17,PAGE_CACHE_SIZE=8;
var _7=xy.util.Browser.browser=="Explorer";
var _8=["THUMB24","THUMB32","THUMB48","THUMB128","THUMB256"],_9=_8[2];
function setPixelHeight(el,_b){
_1.setStyle(el,"height",_b+"px");
}
var _c=function(_d,_e,_f){
_c.superclass.constructor.call(this,_e);
this.fileView=_d;
this.config=_f;
this.data=[];
this.selectedMap=[];
this.selectedCount=0;
this.thumbSize=_9;
var _10=this.getContainerElement();
_2.on(_10,"mouseover",this.mouseoverHandler,this,true);
_2.on(_10,"mouseleave",this.mouseleaveHandler,this,true,true);
_2.on(_10,"mousedown",this.mousedownHandler,this,true);
_2.on(_10,"click",this.clickHandler,this,true);
_2.on(_10,"dblclick",this.doubleClickHandler,this,true);
_3.registerRepeatingKeyListener(_10,this.keydownHandler,this,true);
this.createEvents();
this.render();
};
YAHOO.lang.extend(_c,xy.widget.XComponent);
_c.prototype.createEvents=function(){
var _11=function(_12){
return new YAHOO.util.CustomEvent(_12,window,true,YAHOO.util.CustomEvent.LIST);
};
this.viewLoadedEvent=_11("ViewLoadedEvent");
this.selectedEntriesChangedEvent=_11("SelectedEntriesChangedEvent");
this.rowDoubleClickEvent=_11("RowDoubleClickEvent");
this.thumbnailClickEvent=_11("ThumbnailClickEvent");
this.lazyLoadEvent=_11("LazyLoadEvent");
this.pagedEvent=_11("PagedEvent");
};
_c.prototype.getViewLoadedEvent=function(){
return this.viewLoadedEvent;
};
_c.prototype.getSelectionChangedEvent=function(){
return this.selectedEntriesChangedEvent;
};
_c.prototype.getDoubleClickEvent=function(){
return this.rowDoubleClickEvent;
};
_c.prototype.getThumbnailClickEvent=function(){
return this.thumbnailClickEvent;
};
_c.prototype.getLazyLoadEvent=function(){
return this.lazyLoadEvent;
};
_c.prototype.getPagedEvent=function(){
return this.pagedEvent;
};
_c.prototype.clearAll=function(){
this.list.innerHTML="";
this.data={};
this.entryLookup={};
this.selectedMap=[];
this.selectedCount=0;
this.highlightItem=0;
this.fullDataset=false;
};
_c.prototype.beginLoad=function(){
this.clearAll();
};
_c.prototype.parse=function(_13){
if(!_13.pos){
this.data=_13;
this.rows=_13.rows.slice();
this.entryLookup={};
this.thumbSize=_13.thumbSize||this.thumbSize;
}
for(var i=0;i<_13.rows.length;i++){
var _15=_13.rows[i];
this.entryLookup[_15.id]=_15;
if(_13.pos){
this.rows[i+_13.pos]=_15;
}
}
this.fullDataset=this.fullDataset||_13.fullDataset;
if(_13.pos){
this.changePage(this.curPage);
}else{
this.render();
}
this.viewLoadedEvent.fire();
};
_c.prototype.setSizes=function(){
if(_7){
var _16=this.getContainerElement().parentNode;
setPixelHeight(this.body,_16.offsetHeight-24-24);
}
};
_c.prototype.changePage=function(_17){
this.curPage=_17;
var _18=this.getPageState(),_19=this.renderPage(_18.pageStart,_18.pageEnd);
this.body.replaceChild(_19.page,this.list);
this.list=_19.page;
if(!_19.needsLoad){
this.pagedEvent.fire(_18);
}
};
_c.prototype.getPageState=function(){
var _1a=this.getPageSize(),_1b=_1a*this.curPage,_1c=Math.min(_1b+_1a,this.data.total_count||(this.fullDataset?this.rows.length:Number.MAX_VALUE));
return {page:this.curPage,pageStart:_1b,pageEnd:_1c,count:this.data.total_count||(this.rows?this.rows.length:0)};
};
_c.prototype.getLayoutConfig=function(){
return "thumbSize="+this.thumbSize;
};
_c.prototype.getSelectedEntries=function(){
var _1d=this.fileView,ret=[],_1f=this.rows,_20=this.selectedMap,len=_20.length;
for(var i=0;i<len;i++){
if(_20[i]){
ret.push(_1d.getUIEntry(_1f[i].id));
if(ret.length>=this.selectedCount){
break;
}
}
}
return ret;
};
_c.prototype.getSelectedEntriesSorted=_c.prototype.getSelectedEntries;
_c.prototype.selectNext=function(_23){
var _24=this.selectedMap.length,_25=this.getPageState();
while(_24&&!this.selectedMap[_24-1]){
_24--;
}
if(_24>=_25.pageEnd){
_24=_25.pageStart;
}
if(_23){
var _26=_24;
while(this.rows[_24].userdata.ENTRYTYPE!="F"){
_24++;
if(_24>=_25.pageEnd){
_24=_25.pageStart;
}
if(_24==_26){
return;
}
}
}
this.highlightItem=_24;
this.displayGridFocus();
this.clearSelection();
this.toggleSelection(this.getFocusCell());
this.selectedEntriesChangedEvent.fire();
};
_c.prototype.selectPrev=function(_27){
var _28=0,_29=this.getPageState();
while(_28<this.selectedMap.length&&!this.selectedMap[_28]){
_28++;
}
if(_28>_29.pageStart){
_28--;
}else{
_28=_29.pageEnd-1;
}
if(_27){
var _2a=_28;
while(this.rows[_28].userdata.ENTRYTYPE!="F"){
_28--;
if(_28<_29.pageStart){
_28=_29.pageEnd-1;
}
if(_28==_2a){
return;
}
}
}
this.highlightItem=_28;
this.displayGridFocus();
this.clearSelection();
this.toggleSelection(this.getFocusCell());
this.selectedEntriesChangedEvent.fire();
};
_c.prototype.getUserData=function(_2b,_2c){
return this.entryLookup[_2b].userdata[_2c];
};
_c.prototype.render=function(){
if(!this.body){
var _2d=this.getContainerElement();
_1.addClass(_2d,"thumbnailGrid");
_2d.appendChild(this.renderHeader());
_2d.appendChild(this.renderBody());
}
this.curPage=0;
this.applyThumbSize(true);
this.changePage(0);
this.displayGridFocus(true);
};
_c.prototype.renderHeader=function(){
var _2e=document.createElement(DIV_TAG);
_1.addClass(_2e,"head");
_1.addClass(_2e,"column_header");
var _2f=document.createElement(DIV_TAG);
_1.addClass(_2f,"sliderBase");
var _30=document.createElement(DIV_TAG);
_1.addClass(_30,"yui-h-slider");
_1.generateId(_30);
var _31=document.createElement(DIV_TAG);
_1.addClass(_31,"yui-slider-thumb");
_1.addClass(_31,"sliderBall");
_1.generateId(_31);
_30.appendChild(_31);
_2f.appendChild(_30);
_2e.appendChild(_2f);
this.slider=YAHOO.widget.Slider.getHorizSlider(_30.id,_31.id,0,70,TICK_SIZE);
this.slider.animate=false;
this.slider.subscribe("change",this.slideChangeHandler,this,true);
this.head=_2e;
return _2e;
};
_c.prototype.renderBody=function(){
this.highlightItem=0;
var _32=document.createElement("ul");
_1.addClass(_32,"thumbnails");
var _33=document.createElement(DIV_TAG);
_3.allowKeyboardFocus(_33,false);
_1.addClass(_33,"body");
_33.appendChild(_32);
this.body=_33;
this.list=_32;
return _33;
};
var _34=function(_35,src){
if(src&&_7){
var _37=_35;
_2.on(_37,"load",function(){
if(_37.height>_37.width){
_1.addClass(_37,"portrait");
}else{
_1.addClass(_37,"landscape");
}
_2.removeListener(_37,"load");
});
}
_35.src=src;
};
_c.prototype.renderEntry=function(_38,_39){
var _3a=document.createElement(THUMB_TAG);
_1.addClass(_3a,_6);
_3a._xy_thumbIndex=_38;
_3a.title=_39.id;
var _3b=document.createElement(IMG_TAG);
_34(_3b,this.getThumbnailUrl(_39));
var _3c=document.createElement(DIV_TAG);
_1.addClass(_3c,"thumbCenter");
_3c.appendChild(_3b);
var _3d=document.createElement(DIV_TAG);
_1.addClass(_3d,"thumbContainer");
_3d.appendChild(_3c);
_3a.appendChild(_3d);
var _3e=document.createElement(DIV_TAG);
var _3f=document.createElement(INPUT_TAG);
_3f.id=_1.generateId();
_3f.type="checkbox";
_3.allowKeyboardFocus(_3f,false);
_3e.appendChild(_3f);
var _40=document.createElement(LABEL_TAG);
_40.setAttribute("for",_3f.id);
_40.appendChild(document.createTextNode(_39.userdata["NAME"]));
_3e.appendChild(_40);
_3a.appendChild(_3e);
this.applySelectedUI(_3a);
return _3a;
};
_c.prototype.getThumbnailUrl=function(_41){
if(!_41){
return;
}
var _42=_41.userdata["THUMBNAIL_URL"];
if(_42.indexOf("view=thumb")>0){
return _42+this.getImageSize(this.thumbSize);
}else{
return _42;
}
};
_c.prototype.getImageSize=function(_43){
var _44=_43=="THUMB128"||_43=="THUMB256";
return "&thumbnailSize="+(_44?"LARGE":"SMALL");
};
_c.prototype.applySelectedUI=function(_45,_46){
var _47=_45.getElementsByTagName(INPUT_TAG)[0];
if(!this.isSelected(_45)){
_1.removeClass(_45,_5);
setTimeout(function(){
_47.checked="";
},0);
}else{
_1.addClass(_45,_5);
setTimeout(function(){
_47.checked="checked";
},0);
if(_46){
this.highlightItem=_45._xy_thumbIndex;
this.displayGridFocus();
}
}
};
_c.prototype.renderPage=function(_48,end){
var _4a=this.rows||[];
var _4b=document.createElement("ul");
_1.addClass(_4b,"thumbnails");
for(var i=_48;i<end;i++){
var _4d=_4a[i];
if(!_4d){
this.lazyLoadEvent.fire(i);
return {page:_4b,needsLoad:true};
}
}
for(var i=_48;i<end;i++){
var el=this.renderEntry(i,_4a[i]);
_4b.appendChild(el);
}
return {page:_4b,needsLoad:false};
};
_c.prototype.getThumbnailEl=function(_4f){
var _50=_4f.tagName&&_4f.tagName.toLowerCase();
return _50==THUMB_TAG?_4f:_1.getAncestorByTagName(_4f,THUMB_TAG);
};
_c.prototype.mouseoverHandler=function(_51){
var _52=this,_53=_2.getTarget(_51),_54=_52.getThumbnailEl(_53);
var _55=_52.quickViewIcon;
if(_54){
if(_52.hoverThumb!=_54){
_52.hoverThumb=_54;
if(!_55){
_55=document.createElement(SPAN_TAG);
_1.addClass(_55,"icon_quickView");
_52.quickViewIcon=_55;
}else{
if(_55.parentNode){
_55.parentNode.removeChild(_55);
}
}
clearTimeout(_52.quickViewHoverTimeout);
if(this.rows[_54._xy_thumbIndex].userdata.ENTRYTYPE=="F"){
_52.quickViewHoverTimeout=setTimeout(function(){
_54.appendChild(_55);
},500);
}
}
}else{
if(_55&&_55.parentNode){
_55.parentNode.removeChild(_55);
_52.hoverThumb=undefined;
clearTimeout(_52.quickViewHoverTimeout);
}
}
};
_c.prototype.mouseleaveHandler=function(_56){
this.hoverThumb=undefined;
clearTimeout(this.quickViewHoverTimeout);
if(this.quickViewIcon&&this.quickViewIcon.parentNode){
this.quickViewIcon.parentNode.removeChild(this.quickViewIcon);
}
};
_c.prototype.mousedownHandler=function(_57){
if(_57.button!=2){
return;
}
var _58=_2.getTarget(_57);
var _59=this.getThumbnailEl(_58);
if(_59){
this.clearSelection();
this.toggleSelection(_59,true);
this.selectedEntriesChangedEvent.fire();
}
};
_c.prototype.clickHandler=function(_5a){
var _5b=_2.getTarget(_5a);
var _5c=this.getThumbnailEl(_5b);
if(_5c){
var _5d=_5b.tagName&&_5b.tagName.toLowerCase(),_5e=_5a.metaKey||_5a.ctrlKey;
if(_5d==INPUT_TAG||_5d==LABEL_TAG){
this.toggleSelection(_5c,true);
}else{
if(!_5e&&_1.hasClass(_5b,"icon_quickView")){
this.clearSelection();
this.toggleSelection(_5c,true);
xy.app.quickView();
}else{
if(!_5e){
this.clearSelection();
}
this.toggleSelection(_5c,true);
}
}
this.selectedEntriesChangedEvent.fire();
_2.stopEvent(_5a);
}
};
_c.prototype.doubleClickHandler=function(_5f){
var _60=this.getThumbnailEl(_2.getTarget(_5f));
if(_60){
this.rowDoubleClickEvent.fire(this.fileView.getUIEntry(this.rows[_60._xy_thumbIndex].id));
_2.stopEvent(_5f);
}
};
_c.prototype.keydownHandler=function(_61){
var _62=this,_63=_2.getCharCode(_61),_64=this.getPageState(),UP=_4.UP,_66=_4.DOWN,_67=_4.LEFT,_68=_4.RIGHT;
this.highlightItem=Math.min(this.highlightItem||0,_64.pageEnd);
if(_63==UP||_63==_66||_63==_67||_63==_68){
var _69=_64.pageEnd,_6a=1,_6b=0;
if(_63==UP||_63==_66){
var _6c=this.getGridCount().width;
_6a=_6c;
_6b=_6c-(this.getPageSize()%_6c);
}
if(_63==UP||_63==_67){
_6a=_6a*-1;
}
var _6d=this.highlightItem+_6a;
_6d=Math.max(_6d,_64.pageStart);
if(_6d<=_69-1+_6b){
this.highlightItem=Math.min(_6d,_69-1);
}
this.displayGridFocus();
_2.stopEvent(_61);
}else{
if(_63==_4.SPACE){
this.toggleSelection(this.getFocusCell());
this.selectedEntriesChangedEvent.fire();
_2.stopEvent(_61);
}else{
if(_63==_4.ENTER){
var _6e=this.getFocusCell();
if(!this.isSelected(_6e)||this.selectedCount>1){
this.clearSelection();
this.toggleSelection(_6e);
this.selectedEntriesChangedEvent.fire();
}
this.rowDoubleClickEvent.fire(this.fileView.getUIEntry(this.rows[_6e._xy_thumbIndex].id));
_2.stopEvent(_61);
}
}
}
return true;
};
_c.prototype.slideChangeHandler=function(){
var _6f=Math.round(this.slider.getValue()/TICK_SIZE);
var _70=this.thumbSize;
this.thumbSize=_8[_6f]||_9;
this.applyThumbSize(false);
if(this.getImageSize(_70)!=this.getImageSize(this.thumbSize)){
this.changePage(this.curPage);
}
};
_c.prototype.applyThumbSize=function(_71){
var _72=this.getContainerElement();
_1.removeClass(_72,/thumb\d+/);
_1.addClass(_72,this.thumbSize.toLowerCase());
if(_71){
for(var i=0;i<_8.length;i++){
if(this.thumbSize==_8[i]){
this.slider.setValue(i*TICK_SIZE);
break;
}
}
}
};
_c.prototype.getFocusCell=function(){
var _74=this.getPageSize(),_75=this.highlightItem%_74;
return this.list.getElementsByTagName(THUMB_TAG)[_75];
};
_c.prototype.clearSelection=function(){
_1.getElementsByClassName(_5,THUMB_TAG,this.list,this.toggleSelection,this,true);
this.selectedMap=[];
this.selectedCount=0;
};
_c.prototype.toggleSelection=function(_76,_77){
if(!this.isSelected(_76)){
this.selectedMap[_76._xy_thumbIndex]=true;
this.selectedCount++;
}else{
delete this.selectedMap[_76._xy_thumbIndex];
this.selectedCount--;
}
this.applySelectedUI(_76,_77);
};
_c.prototype.isSelected=function(_78){
return this.selectedMap.hasOwnProperty(_78._xy_thumbIndex);
};
_c.prototype.displayGridFocus=function(_79){
var _7a="focus";
_1.getElementsByClassName(_7a,THUMB_TAG,this.list,function(_7b){
_3.allowKeyboardFocus(_7b,false);
_1.removeClass(_7b,_7a);
});
var _7c=this.getFocusCell();
if(_7c){
_1.addClass(_7c,_7a);
_3.allowKeyboardFocus(_7c,true);
if(!_79){
setTimeout(function(){
try{
_7c.focus();
}
catch(err){
}
},0);
var _7d=this.body,top=_7c.offsetTop+_7c.parentNode.offsetTop,_7f=_7c.offsetHeight,_80=_7d.scrollTop,_81=_7d.offsetHeight;
if(top<_80||top+_7f>_80+_81){
this.body.scrollTop=Math.max(top-(_81-_7f)/2,0);
}
}
}
};
_c.prototype.getCellSize=function(){
if(!this.cellSize){
var _82=this.list.firstChild;
if(!_82){
return {width:0,height:0};
}
if(document.compatMode!="BackCompat"){
this.cellSize={width:_82.offsetWidth+20,height:_82.offsetHeight+20};
}else{
this.cellSize={width:_82.offsetWidth,height:_82.offsetHeight};
}
}
return this.cellSize;
};
_c.prototype.getGridCount=function(){
if(!this.gridCount){
var _83=this.getCellSize();
this.gridCount={width:Math.floor(this.body.clientWidth/_83.width),height:Math.ceil(this.body.clientHeight/_83.height)};
}
return this.gridCount;
};
_c.prototype.getPageSize=function(){
return this.config.gridLazyLoadingPageSize;
};
_c.prototype.resetMetricsCache=function(){
delete this.cellSize;
delete this.gridCount;
};
xy.widget.ThumbnailGrid=_c;
})();

(function(){
var _1=function(){
};
_1.prototype={sort:function(_2,_3,_4,_5){
var _6=this;
try{
_2.sort(function(a,b){
return (_4=="asc"?1:-1)*_6[_5](a,b,_3,_4);
});
}
catch(ex){
if(ex==_1.ServerSortException){
return false;
}else{
throw ex;
}
}
return true;
},getRowColumnData:function(_9,_a){
return _9.data[_a].value;
},getRowColumnAttribute:function(_b,_c,_d){
return _b.data[_c][_d];
},getRowUserData:function(_e,_f){
return _e.userdata[_f];
},na:function(){
},server:function(){
throw _1.ServerSortException;
},xyGridNameColumnComparator:function(a,b,_12){
var _13=this.getRowUserData(a,"ENTRYTYPE");
var _14=this.getRowUserData(b,"ENTRYTYPE");
if(_13=="D"&&_14!="D"){
return -1;
}else{
if(_13!="D"&&_14=="D"){
return 1;
}else{
var _15=/([\d.]+)/g,_16=this.getRowUserData(a,"NAME").toLowerCase().split(_15),_17=this.getRowUserData(b,"NAME").toLowerCase().split(_15),_18=Math.min(_16.length,_17.length),ret=0;
for(var i=0;i<_18;i++){
var _1b=parseFloat(_16[i]),_1c=isNaN(_1b),_1d=parseFloat(_17[i]),_1e=isNaN(_1d);
if(_1c&&_1e){
ret=_16[i].localeCompare(_17[i]);
}else{
if(!_1c&&!_1e){
ret=_1b-_1d;
}else{
ret=_1c?-1:1;
}
}
if(ret){
return ret;
}
}
if(_16.length==_17.length){
return 0;
}
return _16.length>_17.length?1:-1;
}
}
},xyGridStringColumnComparator:function(a,b,_21,_22){
var _23=(this.getRowColumnData(a,_21)||"").toLowerCase();
var _24=(this.getRowColumnData(b,_21)||"").toLowerCase();
return _23.localeCompare(_24);
},xyGridNumericColumnComparator:function(a,b,_27,_28){
a=this.getRowColumnAttribute(a,_27,"numVal")||0;
b=this.getRowColumnAttribute(b,_27,"numVal")||0;
return a-b;
}};
_1.ServerSortException=function(){
};
xy.FileViewSort=_1;
})();

(function(){
var _1=YAHOO.util.Dom,_2=YAHOO.util.Event,_3=xy.Aria;
var _4={GRID:"GRID",THUMBNAIL:"THUMBNAIL"};
var _5=3;
var _6=function(_7,_8,_9,_a,_b){
_6.superclass.constructor.call(this,_7);
this.config=_b;
this.gridboxId=_8;
this.thumbboxId=_9;
this.footerId=_a;
this.init();
};
YAHOO.lang.extend(_6,xy.widget.XComponent);
_6.prototype.init=function(){
this.sortHandler=new xy.FileViewSort();
this.contextMenu=_c(this.getContainerElement());
var _d=document.getElementById(this.footerId);
_d.innerHTML="";
_1.addClass(_d,"table_footer");
_2.on(_d,"click",this.pagingClickHandler,this,true);
this.footer=_d;
var _e=document.createElement("span");
_1.addClass(_e,"footerText");
_d.appendChild(_e);
this.footerText=_e;
var _f=document.createElement("span");
_1.addClass(_f,"pagingCtl");
_d.appendChild(_f);
this.pagingCtl=_f;
var _10=document.createElement("span");
_1.addClass(_10,"pageState");
_3.applyAriaClasses(_10,"xy_alert");
_d.appendChild(_10);
this.pageState=_10;
_2.on(window,"resize",this.setSizes,this,true);
};
_6.prototype.getGridType=function(_11){
return this.explicitGridType||_11.type||_4.GRID;
};
_6.prototype.setType=function(_12){
this.explicitGridType=_12||_4.GRID;
if(this.type!=this.explicitGridType){
this.displayGrid();
}
};
_6.prototype.clearType=function(){
this.explicitGridType=undefined;
};
_6.prototype.displayGrid=function(){
var _13=this.currentView;
this.type=this.getGridType(this.data);
if(this.type==_4.GRID){
this.gridView=this.gridView||new xy.widget.FileGrid(this,this.gridboxId,this.config);
this.currentView=this.gridView;
}else{
this.thumbView=this.thumbView||new xy.widget.ThumbnailGrid(this,this.thumbboxId,this.config);
this.currentView=this.thumbView;
}
if(_13!=this.currentView){
this.registerEventListeners(_13);
this.pagedLoader.clear();
if(_13){
_13.clearAll();
xy.DomUtil.hideElement(_13.getContainerElement());
}
xy.DomUtil.unhideElement(this.currentView.getContainerElement());
}
this.fullDataset=this.data.fullDataset;
this.currentView.parse(this.data);
};
_6.prototype.registerEventListeners=function(_14){
var _15=this;
var _16=function(_17,_18){
if(_17){
_17.subscribe(_18,_15,true);
}
};
var _19=function(_1a,_1b){
if(_1a){
_1a.unsubscribe(_1b,_15,true);
}
};
if(_14){
_19(_14.getViewLoadedEvent(),this.viewLoadedEventHandler);
_19(_14.getSelectionChangedEvent(),this.selectionChangedEventHandler);
_19(_14.getDoubleClickEvent(),this.doubleClickEventHandler);
_19(_14.getLazyLoadEvent(),this.lazyLoadEventHandler);
_19(_14.getPagedEvent(),this.pagedEventHandler);
}
_16(this.currentView.getViewLoadedEvent(),this.viewLoadedEventHandler);
_16(this.currentView.getSelectionChangedEvent(),this.selectionChangedEventHandler);
_16(this.currentView.getDoubleClickEvent(),this.doubleClickEventHandler);
_16(this.currentView.getLazyLoadEvent(),this.lazyLoadEventHandler);
_16(this.currentView.getPagedEvent(),this.pagedEventHandler);
};
_6.prototype.viewLoadedEventHandler=function(){
xy.events.ViewLoadedEvent.fire();
};
_6.prototype.selectionChangedEventHandler=function(_1c,_1d,_1e){
var _1f=_1d[0];
xy.events.SelectedEntriesChangedEvent.fire(_1f);
};
_6.prototype.doubleClickEventHandler=function(_20,_21,_22){
var _23=_21[0];
var col=_21[1];
xy.events.RowDoubleClickEvent.fire(_23,col);
};
_6.prototype.lazyLoadEventHandler=function(_25,_26,_27){
var _28=_26[0],_29=this;
this.setupLongGridLoadingDisplay();
this.pagedLoader.load(_28,this.getDataPageSize(),function(_2a){
_29.fullDataset=_29.fullDataset||_2a.fullDataset;
if(!_29.endLoad(_2a)){
_29.currentView.parse(_2a);
}
});
};
_6.prototype.clearAll=function(){
if(this.currentView){
this.currentView.clearAll();
}
this.displayFooter("");
this.pagingCtl.innerHTML="";
};
_6.prototype.pagedEventHandler=function(_2b,_2c,_2d){
var _2e=this.pagingCtl,_2f=_2c[0],_30=Math.ceil(_2f.count/this.config.gridLazyLoadingPageSize)+(!this.fullDataset?_5:0),_31=_2f.page-_2f.page%_5,_32=Math.min(_31+_5,_30);
_2e.innerHTML="";
if(this.iserror){
return;
}
var _33=document.createElement("button");
_33.title=xy.MessageBundle.getString("XM_LABEL_PREV_PAGES");
_1.addClass(_33,"pageSelector");
_2e.appendChild(_33);
if(_31>0){
_33._xy_pageNum=_31-1;
_1.addClass(_33,"arrow_left");
var _34=document.createElement("span");
_34.innerHTML="...";
_1.addClass(_34,"pageSelector");
_2e.appendChild(_34);
}else{
_1.addClass(_33,"arrow_left_disabled");
_33.disabled="disabled";
}
for(var i=_31;i<_32;i++){
var _36=document.createElement("a");
_1.addClass(_36,"pageSelector");
if(i==_2f.page){
_1.addClass(_36,"selectedPage");
}
_36.href="#";
_36.innerHTML=i+1;
_36._xy_pageNum=i;
_2e.appendChild(_36);
}
var _37=document.createElement("button");
_37.title=xy.MessageBundle.getString("XM_LABEL_NEXT_PAGES");
_1.addClass(_37,"pageSelector");
if(!this.fullDataset||_32<_30){
var _34=document.createElement("span");
_34.innerHTML="...";
_1.addClass(_34,"pageSelector");
_2e.appendChild(_34);
_1.addClass(_37,"arrow_right");
_37._xy_pageNum=_32;
}else{
_1.addClass(_37,"arrow_right_disabled");
_37.disabled="disabled";
}
_2e.appendChild(_37);
var _38=_2f.count;
if(!this.fullDataset){
_38=Math.floor(_38/10)*10;
}
this.pageState.innerHTML=xy.MessageBundle.formatString(this.fullDataset?"XM_DISPLAYING_ENTRIES":"XM_DISPLAYING_ENTRIES_MORE",Math.min(_2f.pageStart+1,_2f.count),_2f.pageEnd,_38);
};
_6.prototype.pagingClickHandler=function(_39){
var _3a=_2.getTarget(_39);
if(_3a._xy_pageNum||_3a._xy_pageNum===0){
this.currentView.changePage(_3a._xy_pageNum);
_2.stopEvent(_39);
}
};
_6.prototype.getSelectedEntries=function(){
return this.currentView&&this.currentView.getSelectedEntries();
};
_6.prototype.getSelectedEntriesSorted=function(){
return this.currentView&&this.currentView.getSelectedEntriesSorted();
};
_6.prototype.selectNext=function(_3b){
return this.currentView.selectNext(_3b);
};
_6.prototype.selectPrev=function(_3c){
return this.currentView.selectPrev(_3c);
};
_6.prototype.getUserData=function(_3d,_3e){
return this.currentView&&this.currentView.getUserData(_3d,_3e);
};
_6.prototype.getSortingState=function(){
return this.sortingState||[];
};
_6.prototype.sort=function(_3f,_40,_41,_42){
this.sortingState=[_3f,_40];
if(this.sortHandler.sort(this.data.rows,this.columnLookup[_3f],_40,_41)){
if(!_42&&this.currentView){
this.currentView.clearAll(false);
this.currentView.parse({rows:this.data.rows});
}
return true;
}else{
if(!_42){
xy.app.refresh();
}
return false;
}
};
_6.prototype.columnMoved=function(_43,_44){
var _45=this.columnLookup.splice(_43,1);
this.columnLookup.splice(_44,0,_45[0]);
};
_6.prototype.setSizes=function(_46){
var _47=this.getContainerElement(),_48=this.footer,_49=(_48?_48.offsetHeight:0),_4a=_1.getY(_47),_4b=this;
var _4c=_1.getViewportHeight()-_4a-_49;
if(_4c<200){
_4c=200;
}
_1.setStyle(_47,"height",_4c+"px");
_1.setStyle(_47.parentNode,"height",(_4c+_49)+"px");
if(_4b.currentView){
_4b.currentView.setSizes();
}
if(!_46){
clearTimeout(this.sizeTimeout);
this.sizeTimeout=setTimeout(function(){
_4b.setSizes(true);
},100);
}
};
_6.prototype.saveLayout=function(_4d){
var _4e=function(_4f){
xy.handleAjaxSuccessResponsePreProcessor(_4f);
if(_4f.responseText){
var _50=JSON.parse(_4f.responseText);
var _51=(_50.message?_50.message:false);
var _52=_50.status&&_50.status=="STATUS_SUCCESS";
if(_51){
if(_52){
xy.app.refresh();
}else{
xy.app.displayErrorMessage(_51);
}
}
}
};
var _53={success:_4e,failure:xy.handleAjaxErrorResponse};
var _54=["fileGridEntryName="+encodeURIComponent(xy.FileMgr.get().getEntryName()),"forUser="+_4d,"type="+this.type];
if(this.gridView){
_54.push(this.gridView.getLayoutConfig());
}
if(this.thumbView){
_54.push(this.thumbView.getLayoutConfig());
}
YAHOO.util.Connect.asyncRequest("POST",xy.app.getConfig().columnMoveURL,_53,_54.join("&"));
};
_6.prototype.beginLoad=function(){
this.setupLongGridLoadingDisplay();
if(this.currentView){
this.currentView.beginLoad();
}
this.iserror=false;
};
_6.prototype.endLoad=function(_55){
if(_55.footer){
this.displayFooter(_55.footer);
}
if(_55.message){
xy.app.displayMessage(_55.message,_55.messageType);
}
if(_55.errormsg){
xy.app.displayErrorMessage(_55.errormsg);
}
this.iserror=_55.iserror;
this.clearLoadingMessage();
this.setSizes();
return this.iserror;
};
_6.prototype.load=function(_56,_57,_58){
var _59=this;
if(this.pagedLoader){
this.pagedLoader.clear();
}
if(_56){
this.pagedLoader=new xy.PagedLoader(_56,_57);
}
this.beginLoad();
this.pagedLoader.load(0,this.getDataPageSize(),function(_5a){
_59.data=_5a;
_59.fullDataset=_5a.fullDataset;
var _5b=[];
if(_5a.columns){
for(var i=0;i<_5a.columns.length;i++){
_5b.push(i);
}
}
_59.columnLookup=_5b;
if(!_59.endLoad(_5a)){
_59.processSortConfig(_5a);
_59.displayGrid();
}
if(_58){
_58(_5a);
}
},true);
};
_6.prototype.getDataPageSize=function(){
return this.config.gridLazyLoadingPageSize*_5;
};
_6.prototype.processSortConfig=function(_5d){
var _5e=_5d.colSort;
if(_5d.columns&&_5e&&_5e.clientSort){
if(_5e.clientSort&&_5d.columns[_5e.index]){
this.sort(_5e.index,_5e.order,_5d.columns[_5e.index].sort,true);
}else{
this.sortingState=[_5e.index,_5e.order];
}
}
};
_6.prototype.displayFooter=function(_5f){
this.footerText.innerHTML=_5f;
};
_6.prototype.setupLongGridLoadingDisplay=function(){
this.loadIndicator=this.loadIndicator||new xy.widget.WaitIndicator("xyLoadingContainer");
this.loadIndicator.start();
};
_6.prototype.clearLoadingMessage=function(){
if(this.loadIndicator){
this.loadIndicator.end();
}
};
_6.prototype.getUIEntry=function(id){
var _61=this.getUserData(id,"LOCKANDVERSIONINFO")||"";
var _62={id:id,url:this.getUserData(id,"URL"),httpSafeName:this.getUserData(id,"HTTPSAFEENTRYNAME"),type:this.getUserData(id,"ENTRYTYPE"),perm:this.getUserData(id,"PERM"),lockStatus:_61.substring(0,1),versionStatus:_61.substring(1),sharedComments:this.getUserData(id,"SHAREDCOMMENTS")};
return new xy.widget.UIEntry(_62);
};
xy.widget.FileView=_6;
_6.Type=_4;
var _c=function(_63){
var _64;
var _65=function(){
var _66=xy.app.getSelectedEntries();
if(!_66.length){
_64.cancel();
return;
}
var _67=xy.app.buildPostBodyFromSelectedEntries(_66);
_64.clearContent();
_64.addItem({id:"XM_LOADING_MESSAGE",text:xy.MessageBundle.getString("XM_LOADING_MESSAGE")});
_64.render(YAHOO.util.Dom.inDocument(_64.element)?undefined:document.body);
var _68=function(_69){
xy.handleAjaxSuccessResponsePreProcessor(_69);
_64.hide();
_64.clearContent();
_64.addItems(JSON.parse(_69.responseText).itemData);
_64.render(_1.inDocument(_64.element)?undefined:document.body);
_64.show();
};
var _6a=function(_6b){
xy.handleAjaxErrorResponse(_6b);
};
var _6c={success:_68,failure:_6a,argument:{}};
setTimeout(function(){
YAHOO.util.Connect.asyncRequest("POST",xy.app.getConfig().rightClickXMLURL,_6c,_67);
},1000);
};
var _64=new xy.widget.AriaContextMenu("contextmenu",{trigger:_63,classname:"dropdownMenu"});
_64.subscribe("triggerContextMenu",_65);
_64.render(document.body);
return _64;
};
})();

xy.FileMgr.prototype.openSaveSearch=function(){
this.getModal().show();
this.getModal().cfg.setProperty("pageRequest",{pageSrc:xy.modal.Config.formatString("OPEN_SAVE_SEARCH_URL",encodeURIComponent(this.getEntryName())),formSrc:document.filesForm});
};
xy.removeSearchBoxText=function(){
if(xy.app.getConfig().searchBoxHelpText){
var _1=document.getElementById("searchtext");
_1.value="";
_1.style.color="black";
xy.app.getConfig().searchBoxHelpText=false;
}
};
xy.addSearchBoxText=function(_2){
if(!xy.app.getConfig().searchBoxHelpText){
var _3=document.getElementById("searchtext");
if(_3.value==""){
_3.value=_2;
_3.style.color="gray";
xy.app.getConfig().searchBoxHelpText=true;
}
}
};
xy.FileMgr.prototype.saveSearchResults=function(){
this.getModal().show();
this.getModal().cfg.setProperty("pageRequest",{pageSrc:xy.modal.Config.formatString("OPEN_SAVE_SEARCH_RESULTS_URL",encodeURIComponent(this.getEntryName())),formSrc:document.filesForm});
};
xy.FileMgr.prototype.doSearch=function(){
if(xy.FileMgr.searchType=="QUICK"){
this.doQuickSearch();
}else{
if(xy.FileMgr.searchType=="ADVANCED"){
this.doAdvancedSearch();
}else{
if(xy.FileMgr.searchType=="RM"){
this.doRMAdvSearch();
}
}
}
};
xy.FileMgr.prototype.doQuickSearch=function(){
if(!xy.FileMgr.Config.isSearchIndexConfigured){
xy.FileMgr.get().displayErrorMessage(xy.MessageBundle.getString("XM_ERROR_QUICKSEARCH_NO_INDEX"));
return;
}
var _4=document.getElementById("searchtext").value;
if(_4!=null&&_4=="+"||_4=="-"){
xy.FileMgr.get().displayErrorMessage(xy.MessageBundle.getString("XM_SIMPLE_SEARCH_CANT_BE_ONLY_PLUS_OR_MINUS"));
return;
}
if(_4.match(/^\s+$/)){
xy.FileMgr.get().displayErrorMessage(xy.MessageBundle.getString("XM_ERROR_BLANK_SEARCH_QUERY"));
return;
}
var _5=xy.app.getConfig().searchBoxHelpText;
if(_4==null||_4==""||_5){
alert(xy.FileMgr.Config.quickSearchErrorMessage);
}else{
xy.events.OpenAdvancedSearchEvent.fire(this.getEntryName(),true);
this.getSearchManager().selectMode("STANDARD");
var _6=this.getConfig().Strings.formatString("searchAction",encodeURIComponent(this.getEntryName()));
_6=_6+"&query="+encodeURIComponent(_4)+Xythos.getLoadUniq();
this.search("QUICK",_6);
this.displayMessage(xy.MessageBundle.formatString("XM_SEARCH_RESULTS_FOR",xy.DomUtil.makeHtmlSafe(_4)));
}
};
xy.FileMgr.prototype.search=function(_7,_8,_9,_a){
var _b=xy.app;
var _c;
xy.FileMgr.isSearch=true;
xy.FileMgr.searchType=_7;
var _d=xy.fileGrid.getSortingState();
if(_d&&_d.length==2){
_8+="&colSort="+_d[0]+"_"+_d[1];
}
if(!this.isRefresh){
xy.fileGrid.clearType();
}else{
this.isRefresh=undefined;
}
xy.fileGrid.load(_8,_9,function(){
if(_a){
xy.events.SearchEvent.fire(_a);
}else{
xy.events.SearchEvent.fire(_b.getEntryName());
}
});
};
xy.FileMgr.prototype.doAdvancedSearch=function(_e){
this.clearMessages();
var _f=_e?_e:this.getEntryName();
this.search("ADVANCED",this.getConfig().Strings.formatString("advancedSearchAction",encodeURIComponent(_f)),document.searchForm,_e);
};
xy.FileMgr.prototype.doRMAdvSearch=function(_10){
this.clearMessages();
this.search("RM",this.getConfig().Strings.formatString("rmAdvSearchUrl",encodeURIComponent(this.getEntryName())),document.rmAdvSearchForm,_10);
};
xy.FileMgr.prototype.closeAdvancedSearch=function(){
this.viewDirectory(this.getEntryName());
xy.events.CloseAdvancedSearchEvent.fire();
};
xy.FileMgr.prototype.createSearchManager=function(){
if(!this.searchManager){
var _11={containerId:"search",helpUrl:this.getConfig().searchHelpUrl,rmAdvConfig:{containerId:"rm_adv_search"},advConfig:{containerId:"advanced_search",isTicketUser:this.getConfig().isTicketUser}};
this.searchManager=new xy.SearchFormManager(_11);
}
};
xy.FileMgr.prototype.getSearchManager=function(){
if(this.searchManager==null){
this.createSearchManager();
}
return this.searchManager;
};
xy.FileMgr.prototype.openSavedSearch=function(_12){
xy.FileMgr.get().getSearchManager().initializeSavedSearchCriteria(_12);
};
xy.FileMgr.prototype.openLastSearch=function(){
xy.FileMgr.get().getSearchManager().initializeSavedSearchCriteria("",true);
};
xy.SearchFormManager=function(_13){
this.config=_13;
xy.SearchFormManager.superclass.constructor.call(this,_13);
this.help=new xy.widget.HelpIcon("searchHelp");
this.help.setUrl(this.config.helpUrl);
this.resizeEvent.subscribe(function(){
xy.app.resizeHandler();
});
xy.events.CloseAdvancedSearchEvent.subscribe(this.close,this,true);
xy.events.ViewDirectoryEvent.subscribe(this.close,this,true);
};
YAHOO.lang.extend(xy.SearchFormManager,xy.widget.ExpandWidget);
xy.SearchFormManager.prototype.getExpandButton=function(){
};
xy.SearchFormManager.prototype.showMenu=function(_14){
var _15=this.rmMenu;
if(!_15){
_15=new xy.widget.AriaMenu("rmSearch",{classname:"dropdownMenu",width:"150px"});
_15.addItems([{text:xy.MessageBundle.getString("XM_LABEL_STANDARD_SEARCH"),onclick:{fn:function(){
this.openSearch(this.searchPath,"STANDARD");
},scope:this}},{text:xy.MessageBundle.getString("XM_LABEL_ADVANCED_SEARCH"),onclick:{fn:function(){
this.openSearch(this.searchPath,"RM");
},scope:this}}]);
_15.render(document.body);
this.rmMenu=_15;
}
_15.cfg.setProperty("context",[_14.getContainerElement(),YAHOO.widget.Overlay.TOP_RIGHT,YAHOO.widget.Overlay.BOTTOM_RIGHT]);
if(this.escapeListener){
this.escapeListener.disable();
}
this.escapeListener=xy.DomUtil.createEscapeHideListener(_15,_14.getContainerElement());
_15.show();
};
xy.SearchFormManager.prototype.openSearch=function(_16,_17,_18,_19){
if(_18){
this.reset();
}
this.searchPath=_16||xy.app.getEntryName();
var _1a=_17||this.mode;
if(_1a=="MENU"){
this.showMenu(_19);
}else{
this.selectMode(_1a);
this.open();
}
};
xy.SearchFormManager.prototype.open=function(){
xy.events.OpenAdvancedSearchEvent.fire(this.searchPath);
xy.SearchFormManager.superclass.open.call(this);
var _1b=xy.Aria.getFirstFocusable(this.currentPanel.getContainerElement());
if(_1b){
setTimeout(function(){
_1b.focus();
},0);
}
if(!this.oldMsgToolbar){
this.oldMsgToolbar=xy.app.getMessagesToolbar();
xy.app.pushMessagesToolbar(this);
}
};
xy.SearchFormManager.prototype.selectMode=function(_1c,_1d){
if(this.currentPanel){
this.currentPanel.close();
this.currentPanel=undefined;
}
if(_1c=="RM"){
this.rmAdvSearch=this.rmAdvSearch||new xy.RMAdvSearchForm(this.config.rmAdvConfig);
this.currentPanel=this.rmAdvSearch;
}else{
if(_1c){
this.advSearch=this.advSearch||new xy.AdvancedSearchForm(this.config.advConfig);
this.currentPanel=this.advSearch;
}
}
if(this.currentPanel){
this.currentPanel.open(_1d);
}
this.mode=_1c;
};
xy.SearchFormManager.prototype.close=function(){
xy.SearchFormManager.superclass.close.call(this);
if(this.oldMsgToolbar){
xy.app.popMessagesToolbar();
this.oldMsgToolbar=undefined;
}
};
xy.SearchFormManager.prototype.reset=function(){
if(this.advSearch){
this.advSearch.reset();
}
if(this.rmAdvSearch){
this.rmAdvSearch.reset();
}
};
xy.SearchFormManager.prototype.initializeSavedSearchCriteria=function(_1e,_1f){
var _20={success:function(o){
xy.handleAjaxSuccessResponsePreProcessor(o);
if(o.responseText){
var _22;
try{
_22=JSON.parse(o.responseText);
}
catch(e){
xy.app.displayErrorMessage(xy.MessageBundle.formatString("XM_ERROR_UNEXPECTED_RESPONSE"));
return;
}
if(_22.errorMsg&&_22.errorMsg!=null){
if(xy.FileMgr.get().getEntryName()){
xy.app.displayErrorMessage(_22.errorMsg);
return;
}else{
xy.FileMgr.get().viewDirectory(xy.FileMgr.get().getConfig().initialEntry,_22.errorMsg);
return;
}
}
if(_22.isRMSearch){
this.selectMode("RM",_22);
}else{
this.selectMode("STANDARD",_22);
}
this.searchPath=_22.from;
this.open();
}
},failure:function(o){
xy.debug("initializeSaveSearch: failed");
},scope:this};
if(this.currentPanel){
this.currentPanel.reset();
}
if(_1f){
var _24=YAHOO.util.Connect.asyncRequest("get",xy.FileMgr.Config.getLastSearchAction,_20);
}else{
if(_1e){
var _24=YAHOO.util.Connect.asyncRequest("get",xy.FileMgr.Config.getSavedSearchAction+"&savedSearchName="+_1e,_20);
}
}
};
xy.SearchFormManager.prototype.hasMessages=function(){
return !!this.getSearchMsgDiv().innerHTML;
};
xy.SearchFormManager.prototype.displayMessage=function(_25,_26){
if(_26=="searcherror"){
this.getSearchMsgDiv().innerHTML="<span>"+_25+"</span>";
YAHOO.util.Dom.setStyle(this.getSearchMsgDiv(),"display","block");
xy.Aria.notifyReader(_25);
}else{
this.oldMsgToolbar.displayMessage(_25,_26);
}
};
xy.SearchFormManager.prototype.clearMessages=function(_27){
this.getSearchMsgDiv().innerHTML="";
YAHOO.util.Dom.setStyle(this.getSearchMsgDiv(),"display","none");
xy.Aria.clearNotifySection();
this.oldMsgToolbar.clearMessages();
};
xy.SearchFormManager.prototype.getSearchMsgDiv=function(){
if(!this.searchMsgDiv){
this.searchMsgDiv=document.getElementById("searchmsg");
}
return this.searchMsgDiv;
};
xy.SearchPanel=function(_28){
this.config=_28;
this.setContainerId(_28.containerId);
};
YAHOO.lang.extend(xy.SearchPanel,xy.widget.XComponent);
xy.SearchPanel.prototype.open=function(_29){
xy.DomUtil.unhideElement(this.getContainerElement());
this.initializeCriterias(_29);
};
xy.SearchPanel.prototype.close=function(){
xy.DomUtil.hideElement(this.getContainerElement());
this.reset();
};
xy.SearchPanel.prototype.createDeleteIcon=function(_2a,_2b,_2c){
var _2d=new xy.widget.ImageButton({id:_2a,text:xy.MessageBundle.formatString("XM_ALT_REMOVE_CRITERIA",_2c),imageCssClass:"icon_delete",onclickHandler:_2b});
return _2d.getContainerElement();
};
xy.AdvancedSearchForm=function(_2e){
xy.AdvancedSearchForm.superclass.constructor.call(this,_2e);
this.containerId=(_2e.containerId?_2e.containerId:null);
this.advsearchtable=document.getElementById("advancedSearchTableId");
var _2f=this;
new xy.widget.Button({id:"advancedSearchButtonId",text:xy.MessageBundle.getString("HELPMENU_SEARCH"),onclickHandler:function(){
xy.FileMgr.get().doAdvancedSearch();
},submit:true});
var _30=new xy.widget.Button({id:"addpropertybuttonid",text:xy.MessageBundle.getString("XM_SEARCH_ADD_SEARCH_CRITERIA"),onclickHandler:function(){
xy.AddSearchCriteriaForm.get().applyAddCriteria(_2f);
}});
this.exandButton=new xy.widget.ExpandWidget({containerId:"addcriteriadivid",expandButtonId:"ADD_CRITERIA_OPEN_BUTTON",labels:{"open":xy.MessageBundle.getString("XM_ALT_OPEN_ADD_SEARCH_CRITERIA"),"close":xy.MessageBundle.getString("XM_ALT_CLOSE_ADD_SEARCH_CRITERIA")},dontAnimate:true});
xy.Aria.labelElement("searchIsAllAnd",xy.MessageBundle.getString("XM_ALT_SEARCH_MODE"));
YAHOO.util.Event.addListener(document.searchForm,"keypress",function(e){
if(e.keyCode==xy.DomUtil.Keys.ENTER){
var _32=YAHOO.util.Event.getTarget(e);
var _33=_32.tagName&&_32.tagName.toLowerCase();
var _34=_32.type&&_32.type.toLowerCase();
if((_33=="input"&&(_34=="image"||_34=="button"||_34=="submit"))||_33=="button"){
return;
}
xy.FileMgr.get().doAdvancedSearch();
YAHOO.util.Event.stopEvent(e);
}
},this,true);
YAHOO.util.Event.addListener("addcriteriadivid","keypress",function(e){
if(e.keyCode==xy.DomUtil.Keys.ENTER){
_30.click();
YAHOO.util.Event.stopEvent(e);
}
},this,true);
xy.initializeSearchMaps();
xy.AddSearchCriteriaForm.get().render();
};
YAHOO.extend(xy.AdvancedSearchForm,xy.SearchPanel);
xy.AdvancedSearchForm.prototype.addSearchCriteriaEventListener=function(_36,_37,_38){
this.addCriteriaRow(_37[0],_37[1]);
};
xy.AdvancedSearchForm.prototype.deleteCriteriaRow=function(e,_3a,_3b){
var _3c=_3a[0];
var _3d=YAHOO.util.Dom.getAncestorByTagName("removeCriteriaId"+_3c,"tr");
var _3e=YAHOO.util.Dom.getAncestorByTagName(_3d,"table");
if(!_3d){
return;
}
if(_3d.parentNode){
_3d.parentNode.removeChild(_3d);
}
for(var i=document.searchForm.elements.length-1;i>=0;i--){
var _40=document.searchForm.elements[i];
if(_40.name.substring(0,12)=="criterias("+_3c+")"){
_40.parentNode.removeChild(_40);
}
}
this.count--;
if(this.count==0){
this.addNoCriteriaMessage();
}
if(!_3b){
var _41=xy.Aria.getFirstFocusable("advancedSearchTableId");
if(_41){
setTimeout(function(){
_41.focus();
},0);
}
}
xy.app.resizeHandler();
};
xy.AdvancedSearchForm.prototype.getDisplayValue=function(_42){
if(_42.namespace=="D"&&_42.name=="getcontentlength"){
return xy.MessageBundle.formatString("BYTES",_42.value);
}else{
return xy.DomUtil.makeHtmlSafe(_42.value);
}
};
xy.AdvancedSearchForm.prototype.addNoCriteriaMessage=function(){
var _43=document.getElementById("noCriteriaId");
if(_43){
return;
}
var tr=this.advsearchtable.insertRow(0);
var td1=tr.insertCell(0);
td1.innerHTML="<div id=\"noCriteriaId\">"+xy.MessageBundle.getString("XM_SEARCH_NO_CRITERIA")+"</div>";
};
xy.AdvancedSearchForm.prototype.removeNoCriteriaMessage=function(){
var _46=YAHOO.util.Dom.getAncestorByTagName("noCriteriaId","tr");
if(_46&&_46.parentNode){
_46.parentNode.removeChild(_46);
}
};
xy.AdvancedSearchForm.prototype.addCriteriaRow=function(_47){
if(!this.criterias){
this.criterias=new Array(0);
this.count=0;
}
if(this.count==0){
this.removeNoCriteriaMessage();
}
var _48=this.criterias.length;
_47.id=_48;
this.criterias[_48]=_47;
var tr=this.advsearchtable.insertRow(this.count);
this.count++;
var td1=tr.insertCell(0);
td1.innerHTML="<label id=\"criteriaLabel"+_48+"\" class=\"small\">"+_47.nameText+"</label>"+"<span id=\"divop"+_48+"\"> </span>"+"<span id=\"divvalue"+_48+"\"> </span>";
var _4b=this;
var _4c=this.createDeleteIcon("removeCriteriaId"+_48,function(p_e){
_4b.deleteCriteriaRow(p_e,[_48]);
},_48);
td1.appendChild(_4c);
this.renderOpsDiv(_47);
function c_hidden(_4e,_4f){
var _50=document.createElement("input");
_50.type="hidden";
_50.name="criterias("+_48+")."+_4e;
_50.value=_4f;
document.searchForm.appendChild(_50);
}
c_hidden("id",_48);
c_hidden("namespace",this.criterias[_48].namespace);
c_hidden("name",this.criterias[_48].name);
c_hidden("datatype",this.criterias[_48].datatype);
xy.Aria.refreshReader();
xy.app.resizeHandler();
};
xy.AdvancedSearchForm.prototype.renderOpsDiv=function(_51){
var div=document.getElementById("divop"+_51.id);
xy.DomUtil.removeAllChildNodes(div);
if(_51.allowedOps.length>1){
var _53=document.createElement("select");
_53.id="selectop"+_51.id;
_53.name="criterias("+_51.id+").op";
div.appendChild(_53);
for(var i=0;i<_51.allowedOps.length;i++){
var _55=document.createElement("option");
_55.value=_51.allowedOps[i];
_55.appendChild(document.createTextNode(xy.operatorToNL(_51.allowedOps[i],_51.datatype)));
if(_51.op==_51.allowedOps[i]){
_55.selected=true;
}
_53.appendChild(_55);
}
YAHOO.util.Event.removeListener("selectop"+_51.id,"change");
YAHOO.util.Event.addListener("selectop"+_51.id,"change",this.renderValueDiv,{"advform":this,"criteria":_51},true);
}else{
if(_51.allowedOps.length==1){
var _56=document.createElement("input");
_56.id="selectop"+_51.id;
_56.name="criterias("+_51.id+").op";
_56.value=_51.allowedOps[0];
_56.type="hidden";
div.appendChild(_56);
}
}
this.renderValueDiv(null,{"advform":this,"criteria":_51});
};
xy.AdvancedSearchForm.prototype.labelValueElement=function(_57,_58){
var yud=YAHOO.util.Dom;
var _5a=document.getElementById("criteriaLabel"+_57.id);
var _5b=document.getElementById("selectop"+_57.id);
var _5c=document.getElementById("unitEl"+_57.id);
var _5d="";
var _5e=[];
var _5f=[];
if(_5a){
_5e.push(yud.generateId(_5a));
}
if(_5b&&_5b.type!="hidden"){
if(_5b.tagName.toLowerCase()=="select"){
_5d=(_5e[0]||"")+" ";
_5e=[""];
}else{
_5e.push(yud.generateId(_5b));
}
xy.Aria.labelElement(_5b,_57.nameText);
_5f.push(_5b);
}
_5e.push(yud.generateId(_58));
_5f.push(_58);
if(_5c){
_5e.push(yud.generateId(_5c));
_5f.push(_5c);
}
if(_5d){
xy.Aria.labelledBySelect(_5b,_5f,_5d,_5e.join(" "));
}else{
if(_5e.length>2){
xy.Aria.applyAriaAttribute(_5f,xy.Aria.Attr.LABELLEDBY,_5e.join(" "));
}else{
if(_5a){
_5a.setAttribute("for",yud.generateId(_58));
}
}
}
};
xy.AdvancedSearchForm.prototype.renderValueDiv=function(e,_61){
var _62=_61.criteria;
var div=document.getElementById("divvalue"+_62.id);
var _64=document.getElementById("selectvalue"+_62.id);
var _65=document.getElementById("selectunit"+_62.id);
var _66,_67;
if(_64){
_66=_64.value;
}
if(_65){
_67=_65.value;
}
xy.DomUtil.removeAllChildNodes(div);
var _68;
var _69=document.getElementById("selectop"+_62.id);
if(_69&&_69.value){
_62.op=_69.value;
}
var _6a=_62.op||_62.allowedOps[0];
if((_6a!="DEFINEDOP")&&(_6a!="UNDEFINEDOP")){
if(_62.allowedValues&&_62.allowedValues.length>0){
var _6b=document.createElement("select");
_6b.id="selectvalue"+_62.id;
_6b.name="criterias("+_62.id+").value";
for(var i=0;i<_62.allowedValues.length;i++){
var _6d=document.createElement("option");
_6d.value=_62.allowedValues[i].value;
_6d.selected=_6d.value&&(_62.value==_6d.value||_66==_6d.value);
_6d.appendChild(document.createTextNode(_62.allowedValues[i].displayValue));
_6b.appendChild(_6d);
}
div.appendChild(_6b);
_68=_6b;
}else{
var _6e=document.createElement("input");
_6e.id="selectvalue"+_62.id;
_6e.type="text";
_6e.name="criterias("+_62.id+").value";
_6e.value=_62.value||_66||"";
div.appendChild(_6e);
_68=_6e;
if(_62.datatype==5){
if(_62.op=="DATEWITHIN"||_62.op=="ANYDATEWITHIN"){
_6e.size=10;
var _6b=document.createElement("select");
_6b.id="selectunit"+_62.id;
_6b.name="criterias("+_62.id+").unit";
var _6f=["DAY","WEEK","MONTH","YEAR"];
var _70=[xy.MessageBundle.getString("DAYS"),xy.MessageBundle.getString("WEEKS"),xy.MessageBundle.getString("MONTHS"),xy.MessageBundle.getString("YEARS")];
for(var i=0;i<_6f.length;i++){
var _6d=document.createElement("option");
_6d.value=_6f[i];
_6d.selected=_6d.value&&(_62.unit==_6d.value||_67==_6d.value);
_6d.appendChild(document.createTextNode(_70[i]));
_6b.appendChild(_6d);
}
div.appendChild(_6b);
}else{
var _71=new xy.widget.CalendarSelector("searchcal"+_62.id,_6e,xy.app.getConfig().calendarWidgetDateFormat);
div.appendChild(_71.getContainerElement());
}
}else{
if(_62.name=="getcontentlength"&&_62.namespace=="D"){
var _72=document.createElement("span");
_72.id="unitEl"+_62.id;
_72.appendChild(document.createTextNode(" "+xy.MessageBundle.getString("XM_SEARCH_BYTES")));
div.appendChild(_72);
}else{
if(_62.datatype==1000){
var _73=new xy.widget.Button({text:xy.MessageBundle.getString("FIND_USER"),onclickHandler:function(){
this.findUserClickHandler(_62.id);
}},this);
div.appendChild(_73.getContainerElement());
}
}
}
}
if(_68){
_61.advform.labelValueElement(_62,_68);
}
}
};
xy.AdvancedSearchForm.prototype.findUserClickHandler=function(id){
xy.FileMgr.get().getModal().show();
xy.FileMgr.get().getModal().cfg.setProperty("pageRequest",{pageSrc:xy.modal.Config.formatString("SEARCH_FIND_USERS_MODAL_URL",encodeURIComponent(xy.FileMgr.get().getEntryName()))+"&destination=selectvalue"+id});
};
xy.AdvancedSearchForm.prototype.initializeCriterias=function(_75){
if(_75){
var _76=_75.criterias;
if(_76){
for(var i=_76.length-1;i>=0;i--){
this.addCriteriaRow(_76[i],false);
}
}
this.getSearchIsAllAndElement().value=_75.isAllAnd;
this.getSearchOrderByElement().value=_75.orderBy;
xy.app.doAdvancedSearch(_75.from);
}else{
var _78={"id":0,"nameText":xy.MessageBundle.getString("SEARCH_LABEL_FILENAME"),"name":"displayname","namespace":"D","allowedOps":["LIKE","LIKEWD"],"op":"LIKEWD","datatype":1,"value":"","allowedValues":[]};
this.addCriteriaRow(_78,false);
var _79={"id":1,"nameText":xy.MessageBundle.getString("XM_SEARCH_CONTENT_CONTAINS_INPUT"),"namespace":"","allowedOps":["CONTAINS"],"op":"CONTAINS","datatype":1,"value":"","allowedValues":[]};
this.addCriteriaRow(_79,false);
}
};
xy.AdvancedSearchForm.prototype.reset=function(){
var _7a=this.criterias;
if(_7a){
for(var i=0;i<_7a.length;i++){
var _7c=[_7a[i].id];
this.deleteCriteriaRow(null,_7c,true);
}
this.criterias=[];
this.count=0;
}
this.getSearchIsAllAndElement().value="true";
this.getSearchOrderByElement().value="score";
};
xy.AdvancedSearchForm.prototype.getSearchIsAllAndElement=function(){
return document.getElementById("searchIsAllAnd");
};
xy.AdvancedSearchForm.prototype.getSearchOrderByElement=function(){
return document.getElementById("searchOrderBy");
};
xy.operatorToNL=function(_7d,_7e){
if(!this.searchopmap){
return _7d;
}else{
if(this.searchopmap[_7d+"_"+_7e]){
return this.searchopmap[_7d+"_"+_7e];
}else{
if(this.searchopmap[_7d]){
return this.searchopmap[_7d];
}else{
return _7d;
}
}
}
};
xy.initializeSearchMaps=function(){
this.searchopmap=new Array(0);
this.searchopmap["CONTAINS"]=xy.MessageBundle.getString("CONTAINS");
this.searchopmap["COMMENTCONTAINS"]=xy.MessageBundle.getString("CONTAINS");
this.searchopmap["NAME_CONTENT_CONTAINS"]=xy.MessageBundle.getString("CONTAINS");
this.searchopmap["LIKE"]=xy.MessageBundle.getString("EQUALS");
this.searchopmap["LIKEWD"]=xy.MessageBundle.getString("CONTAINS");
this.searchopmap["EQ"]=xy.MessageBundle.getString("EQUALS");
this.searchopmap["EQ_5"]=xy.MessageBundle.getString("ON");
this.searchopmap["LT"]=xy.MessageBundle.getString("LESS_THAN");
this.searchopmap["LT_5"]=xy.MessageBundle.getString("BEFORE");
this.searchopmap["GT"]=xy.MessageBundle.getString("GREATER_THAN");
this.searchopmap["GT_5"]=xy.MessageBundle.getString("AFTER");
this.searchopmap["DEFINEDOP"]=xy.MessageBundle.getString("DEFINED");
this.searchopmap["UNDEFINEDOP"]=xy.MessageBundle.getString("UNDEFINED");
this.searchopmap["ANYEQ"]=xy.MessageBundle.getString("ANY_EQUAL");
this.searchopmap["SOMELIKE"]=xy.MessageBundle.getString("ANY_CONTAIN");
this.searchopmap["ANYGT"]=xy.MessageBundle.getString("ANY_GREATER_THAN");
this.searchopmap["ANYLT"]=xy.MessageBundle.getString("ANY_LESS_THAN");
this.searchopmap["ANYGT_5"]=xy.MessageBundle.getString("ANY_AFTER");
this.searchopmap["ANYLT_5"]=xy.MessageBundle.getString("ANY_BEFORE");
this.searchopmap["DATEWITHIN_5"]=xy.MessageBundle.getString("DATEWITHIN");
this.searchopmap["ANYDATEWITHIN_5"]=xy.MessageBundle.getString("ANYDATEWITHIN");
};
xy.AddSearchCriteriaForm=function(_7f){
this.config=_7f;
this.props={};
};
YAHOO.extend(xy.AddSearchCriteriaForm,xy.widget.XComponent);
xy.AddSearchCriteriaForm.prototype.render=function(){
this.renderDocclassDiv();
};
xy.AddSearchCriteriaForm.get=function(){
if(xy.AddSearchCriteriaForm.addSearchCriteriaForm==null){
var _80={containerId:"addsearchcriteriadiv"};
xy.AddSearchCriteriaForm.addSearchCriteriaForm=new xy.AddSearchCriteriaForm(_80);
}
return xy.AddSearchCriteriaForm.addSearchCriteriaForm;
};
xy.AddSearchCriteriaForm.prototype.renderDocclassDiv=function(){
var _81=xy.AddSearchCriteriaForm.docclasses;
var div=document.getElementById("divdocclassid");
xy.DomUtil.removeAllChildNodes(div);
if(_81&&_81.length>0){
if(_81.length>1){
var _83=document.createElement("select");
_83.id="selectdocclassid";
for(var i=0;i<_81.length;i++){
var _85=document.createElement("option");
_85.value=_81[i].name;
_85.appendChild(document.createTextNode(_81[i].text));
if(i==0){
_85.selected=true;
}
_83.appendChild(_85);
YAHOO.util.Event.addListener(_83,"change",this.renderPropertiesDiv);
}
div.appendChild(_83);
}else{
if(_81.length==1){
var _86=document.createElement("input");
_86.type="hidden";
_86.id="selectdocclassid";
_86.value=_81[0].name;
div.appendChild(_86);
var _87=document.createElement("span");
_87.innerHTML="&nbsp;&nbsp;"+_81[0].text;
div.appendChild(_87);
}
}
}
this.renderPropertiesDiv();
};
xy.AddSearchCriteriaForm.prototype.renderPropertiesDiv=function(){
var _88={success:function(o){
if(o.responseText!=undefined){
var div=document.getElementById("divpropertyid");
xy.DomUtil.removeAllChildNodes(div);
var _8b=JSON.parse(o.responseText);
xy.AddSearchCriteriaForm.props=_8b;
if(_8b&&_8b.length>0){
var _8c=document.createElement("select");
_8c.id="selectpropertyid";
for(var i=0;i<_8b.length;i++){
var _8e=document.createElement("option");
_8e.value=_8b[i].id;
_8e.appendChild(document.createTextNode(_8b[i].nameText));
if(i==0){
_8e.selected=true;
}
_8c.appendChild(_8e);
}
div.appendChild(_8c);
}
}
},failure:function(o){
xy.debug("renderPropertiesDiv: failed");
}};
var _90=document.getElementById("selectdocclassid");
if(_90&&_90.value){
var _91=YAHOO.util.Connect.asyncRequest("get",xy.FileMgr.Config.getSearchPropertiesAction+"&docClassName="+encodeURIComponent(_90.value),_88);
}
};
xy.AddSearchCriteriaForm.prototype.getSelectedProp=function(){
var _92=xy.AddSearchCriteriaForm.props;
var _93=document.getElementById("selectpropertyid");
if(_93&&_93.value){
for(var i=0;i<_92.length;i++){
if(_93.value==_92[i].id){
return _92[i];
}
}
}
return null;
};
xy.AddSearchCriteriaForm.prototype.applyAddCriteria=function(_95){
var _96=this.getSelectedProp();
var _97=_96.selectedOp||_96.ops[0];
var _98={"name":_96.name,"nameText":_96.nameLongText,"namespace":_96.namespace,"datatype":_96.datatype,"allowedValues":_96.allowedValues,"allowedOps":_96.ops,"op":_97,"value":_96.selectedValue};
_95.addCriteriaRow(_98);
};

xy.RMAdvSearchForm=function(_1){
xy.RMAdvSearchForm.superclass.constructor.call(this,_1);
this._index=0;
this._count=0;
YAHOO.util.Event.addListener(this.getSearchForElement(),"change",this.searchForChanged,this,true);
var _2=this;
new xy.widget.Button({id:"rmSearchButtonId",text:xy.MessageBundle.getString("XM_BUTTON_SEARCH"),onclickHandler:function(){
xy.app.doRMAdvSearch();
},submit:true});
new xy.widget.Button({id:"rmSearchAdd",text:xy.MessageBundle.getString("CHOOSE_ADVANCED_SEARCH_PROPS"),onclickHandler:this.showAddCriteria},this);
this.initStandardCriteria();
};
YAHOO.extend(xy.RMAdvSearchForm,xy.SearchPanel);
xy.RMAdvSearchForm.deleteStandardCriteria=function(_3,_4){
xy.DomUtil.hideElement(YAHOO.util.Dom.getAncestorByTagName(_3,"tr"));
document.getElementById("query."+_4+".value").value="";
};
xy.RMAdvSearchForm.prototype.initStandardCriteria=function(){
var _5=["nameCriteria","containsCriteria"];
for(var i=0;i<_5.length;i++){
var _7=document.getElementById("query."+_5[i]+".value");
var _8=YAHOO.util.Dom.getAncestorByTagName(_7,"tr");
var _9=document.createElement("td");
var _a=this.createDeleteIcon(YAHOO.util.Dom.generateId(),(function(){
var _b=_5[i];
return function(_c){
var el=YAHOO.util.Event.getTarget(_c);
xy.RMAdvSearchForm.deleteStandardCriteria(el,_b);
};
})(),i+1);
_9.appendChild(_a);
_8.appendChild(_9);
}
};
xy.RMAdvSearchForm.prototype.initializeCriterias=function(_e){
var i;
this.reset();
if(_e){
this.getSearchForElement().value=_e.searchFor;
this.getOrderByElement().value=_e.orderBy;
var _10="",_11="";
if(_e.nameCriteria){
_10=_e.nameCriteria.op;
_11=_e.nameCriteria.value;
}
document.getElementsByName("query.nameCriteria.op")[0].value=_10;
document.getElementsByName("query.nameCriteria.value")[0].value=_11;
var _12="";
if(_e.containsCriteria){
_12=_e.containsCriteria.value;
}
document.getElementsByName("query.containsCriteria.value")[0].value=_12;
var _13=_e.groups||[];
var _14=_e.operators||[];
for(i=0;i<_13.length;i++){
this.addCriteria(_13[i],i>0?_14[i-1]:undefined);
}
xy.app.doRMAdvSearch(_e.from);
}else{
this.getSearchForElement().value="forEverything";
}
};
xy.RMAdvSearchForm.prototype.reset=function(){
this.resetStandardCriteria();
var _15=this.getRecordCriteriaElement();
while(_15.firstChild){
_15.removeChild(_15.firstChild);
}
this._count=0;
};
xy.RMAdvSearchForm.prototype.getRecordCriteriaElement=function(){
var el=document.getElementById("rmSearchCriteria");
this.getRecordCriteriaElement=function(){
return el;
};
return el;
};
xy.RMAdvSearchForm.prototype.getSearchForElement=function(){
var el=document.getElementById("rmSearch_searchFor");
this.getSearchForElement=function(){
return el;
};
return el;
};
xy.RMAdvSearchForm.prototype.getOrderByElement=function(){
var el=document.getElementById("rmSearch_orderBy");
this.getOrderByElement=function(){
return el;
};
return el;
};
xy.RMAdvSearchForm.prototype.showAddCriteria=function(){
var _19=xy.app.getModal();
_19.rmSearch=this;
_19.show();
_19.cfg.setProperty("pageRequest",{pageSrc:xy.modal.Config.formatString("addRMSearchCriteriaUrl",xy.app.getEntryName()),formSrc:document.RMAdvSearchForm});
};
xy.RMAdvSearchForm.prototype.addCriteria=function(_1a,_1b){
function $c_hidden(_1c,_1d){
var _1e=document.createElement("input");
_1e.id=_1e.name=_1c;
_1e.type="hidden";
_1e.value=_1d;
return _1e;
}
function $c_option(_1f,_20){
var _21=document.createElement("option");
_21.value=_1f;
if(_1f===_20){
_21.selected="selected";
}
_21.appendChild(document.createTextNode(xy.MessageBundle.getString(_1f)));
return _21;
}
var _22=this.getRecordCriteriaElement();
var row,_24;
row=document.createElement("tr");
row.criteria=_1a;
_24=document.createElement("td");
_24.appendChild($c_hidden("operatorID",this._index));
var _25=document.createElement("select");
_25.name=_25.id="queryGroupOper"+this._index;
_25.appendChild($c_option("GROUP_AND",_1b));
_25.appendChild($c_option("GROUP_OR",_1b));
_25.appendChild($c_option("GROUP_ANDNOT",_1b));
_24.appendChild(_25);
row.appendChild(_24);
_24=document.createElement("td");
_24.appendChild($c_hidden("groupID",this._index));
_24.appendChild($c_hidden("queryGroupValue"+this._index,_1a.data));
_24.appendChild(document.createTextNode(_1a.text));
row.appendChild(_24);
var _26=this;
_24=document.createElement("td");
_24.appendChild(this.createDeleteIcon(YAHOO.util.Dom.generateId(),function(){
_26.deleteCriteria(row);
},this._index+1));
row.appendChild(_24);
_22.appendChild(row);
this._count++;
this._index++;
};
xy.RMAdvSearchForm.prototype.resetStandardCriteria=function(){
YAHOO.util.Dom.getElementsBy(function(){
return true;
},"tr","rmStandardCriteria",function(_27){
YAHOO.util.Dom.setStyle(_27,"display","");
});
var _28=["nameCriteria","containsCriteria"];
for(var i=0;i<_28.length;i++){
document.getElementById("query."+_28[i]+".value").value="";
}
xy.Aria.labelledBySelect("nameOp",["nameOp","query.nameCriteria.value"],"nameLabel "," query.nameCriteria.value");
};
xy.RMAdvSearchForm.prototype.deleteCriteria=function(_2a){
_2a.parentNode.removeChild(_2a);
this._count--;
};
xy.RMAdvSearchForm.prototype.searchForChanged=function(){
var _2b=this.getSearchForElement();
var _2c=this.getRecordCriteriaElement();
var _2d=_2b.value;
var _2e;
if(_2d==="forRecords"){
_2e="record";
}else{
if(_2d==="forCategories"){
_2e="category";
}else{
if(_2d==="forFolders"){
_2e="folder";
}else{
return;
}
}
}
var el=_2c.lastChild;
while(el){
var _30=el.previousSibling?el.previousSibling.previousSibling:undefined;
var _31=el.criteria.types;
for(var i=0;i<_31.length;i++){
var _33=_31[i];
if(!_33[_2e]){
this.deleteCriteria(el);
break;
}
}
el=_30;
}
};

xy.CalendarFactory=function(_1){
this.title=_1.title;
this.todayText=_1.todayText;
this.monthNames=_1.monthNames;
this.dayHeaders=_1.dayHeaders;
this.getNewCalendar=function(){
var _2=new CalendarPopup();
_2.showYearNavigation();
_2.setTitle(this.title);
_2.setTodayText(this.todayText);
_2.setMonthNames(this.monthNames[0],this.monthNames[1],this.monthNames[2],this.monthNames[3],this.monthNames[4],this.monthNames[5],this.monthNames[6],this.monthNames[7],this.monthNames[8],this.monthNames[9],this.monthNames[10],this.monthNames[11]);
_2.setDayHeaders(this.dayHeaders[0],this.dayHeaders[1],this.dayHeaders[2],this.dayHeaders[3],this.dayHeaders[4],this.dayHeaders[5],this.dayHeaders[6]);
return _2;
};
};

getAnchorPosition=function(_1){
var _2=false;
var _3=new Object();
var x=0,y=0;
var _6=false,_7=false,_8=false;
if(document.getElementById){
_6=true;
}else{
if(document.all){
_7=true;
}else{
if(document.layers){
_8=true;
}
}
}
if(_6&&document.all){
x=AnchorPosition_getPageOffsetLeft(document.all[_1]);
y=AnchorPosition_getPageOffsetTop(document.all[_1]);
}else{
if(_6){
var o=document.getElementById(_1);
x=AnchorPosition_getPageOffsetLeft(o);
y=AnchorPosition_getPageOffsetTop(o);
}else{
if(_7){
x=AnchorPosition_getPageOffsetLeft(document.all[_1]);
y=AnchorPosition_getPageOffsetTop(document.all[_1]);
}else{
if(_8){
var _a=0;
for(var i=0;i<document.anchors.length;i++){
if(document.anchors[i].name==_1){
_a=1;
break;
}
}
if(_a==0){
_3.x=0;
_3.y=0;
return _3;
}
x=document.anchors[i].x;
y=document.anchors[i].y;
}else{
_3.x=0;
_3.y=0;
return _3;
}
}
}
}
_3.x=x;
_3.y=y;
return _3;
};
getAnchorWindowPosition=function(_c){
var _d=getAnchorPosition(_c);
var x=0;
var y=0;
if(document.getElementById){
if(isNaN(window.screenX)){
x=_d.x-document.body.scrollLeft+window.screenLeft;
y=_d.y-document.body.scrollTop+window.screenTop;
}else{
x=_d.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_d.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}else{
if(document.all){
x=_d.x-document.body.scrollLeft+window.screenLeft;
y=_d.y-document.body.scrollTop+window.screenTop;
}else{
if(document.layers){
x=_d.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
y=_d.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
}
}
}
_d.x=x;
_d.y=y;
return _d;
};
AnchorPosition_getPageOffsetLeft=function(el){
var ol=el.offsetLeft;
while((el=el.offsetParent)!=null){
ol+=el.offsetLeft;
}
return ol;
};
AnchorPosition_getWindowOffsetLeft=function(el){
return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
};
AnchorPosition_getPageOffsetTop=function(el){
var ot=el.offsetTop;
while((el=el.offsetParent)!=null){
ot+=el.offsetTop;
}
return ot;
};
AnchorPosition_getWindowOffsetTop=function(el){
return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
};
MONTH_NAMES=new Array("January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
DAY_NAMES=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat");
LZ=function(x){
return (x<0||x>9?"":"0")+x;
};
isDate=function(val,_18){
var _19=getDateFromFormat(val,_18);
if(_19==0){
return false;
}
return true;
};
compareDates=function(_1a,_1b,_1c,_1d){
var d1=getDateFromFormat(_1a,_1b);
var d2=getDateFromFormat(_1c,_1d);
if(d1==0||d2==0){
return -1;
}else{
if(d1>d2){
return 1;
}
}
return 0;
};
formatDate=function(_20,_21){
_21=_21+"";
var _22="";
var _23=0;
var c="";
var _25="";
var y=_20.getYear()+"";
var M=_20.getMonth()+1;
var d=_20.getDate();
var E=_20.getDay();
var H=_20.getHours();
var m=_20.getMinutes();
var s=_20.getSeconds();
var _2d,yy,MMM,MM,dd,hh,h,mm,ss,_36,HH,H,KK,K,kk,k;
var _3c=new Object();
if(y.length<4){
y=""+(y-0+1900);
}
_3c["y"]=""+y;
_3c["yyyy"]=y;
_3c["yy"]=y.substring(2,4);
_3c["M"]=M;
_3c["MM"]=LZ(M);
_3c["MMM"]=MONTH_NAMES[M-1];
_3c["NNN"]=MONTH_NAMES[M+11];
_3c["d"]=d;
_3c["dd"]=LZ(d);
_3c["E"]=DAY_NAMES[E+7];
_3c["EE"]=DAY_NAMES[E];
_3c["H"]=H;
_3c["HH"]=LZ(H);
if(H==0){
_3c["h"]=12;
}else{
if(H>12){
_3c["h"]=H-12;
}else{
_3c["h"]=H;
}
}
_3c["hh"]=LZ(_3c["h"]);
if(H>11){
_3c["K"]=H-12;
}else{
_3c["K"]=H;
}
_3c["k"]=H+1;
_3c["KK"]=LZ(_3c["K"]);
_3c["kk"]=LZ(_3c["k"]);
if(H>11){
_3c["a"]="PM";
}else{
_3c["a"]="AM";
}
_3c["m"]=m;
_3c["mm"]=LZ(m);
_3c["s"]=s;
_3c["ss"]=LZ(s);
while(_23<_21.length){
c=_21.charAt(_23);
_25="";
while((_21.charAt(_23)==c)&&(_23<_21.length)){
_25+=_21.charAt(_23++);
}
if(_3c[_25]!=null){
_22=_22+_3c[_25];
}else{
_22=_22+_25;
}
}
return _22;
};
_isInteger=function(val){
var _3e="1234567890";
for(var i=0;i<val.length;i++){
if(_3e.indexOf(val.charAt(i))==-1){
return false;
}
}
return true;
};
_getInt=function(str,i,_42,_43){
for(var x=_43;x>=_42;x--){
var _45=str.substring(i,i+x);
if(_45.length<_42){
return null;
}
if(_isInteger(_45)){
return _45;
}
}
return null;
};
getDateFromFormat=function(val,_47){
val=val+"";
_47=_47+"";
var _48=0;
var _49=0;
var c="";
var _4b="";
var _4c="";
var x,y;
var now=new Date();
var _50=now.getYear();
var _51=now.getMonth()+1;
var _52=1;
var hh=now.getHours();
var mm=now.getMinutes();
var ss=now.getSeconds();
var _56="";
while(_49<_47.length){
c=_47.charAt(_49);
_4b="";
while((_47.charAt(_49)==c)&&(_49<_47.length)){
_4b+=_47.charAt(_49++);
}
if(_4b=="yyyy"||_4b=="yy"||_4b=="y"){
if(_4b=="yyyy"){
x=4;
y=4;
}
if(_4b=="yy"){
x=2;
y=2;
}
if(_4b=="y"){
x=2;
y=4;
}
_50=_getInt(val,_48,x,y);
if(_50==null){
return 0;
}
_48+=_50.length;
if(_50.length==2){
if(_50>70){
_50=1900+(_50-0);
}else{
_50=2000+(_50-0);
}
}
}else{
if(_4b=="MMM"||_4b=="NNN"){
_51=0;
for(var i=0;i<MONTH_NAMES.length;i++){
var _58=MONTH_NAMES[i];
if(val.substring(_48,_48+_58.length).toLowerCase()==_58.toLowerCase()){
if(_4b=="MMM"||(_4b=="NNN"&&i>11)){
_51=i+1;
if(_51>12){
_51-=12;
}
_48+=_58.length;
break;
}
}
}
if((_51<1)||(_51>12)){
return 0;
}
}else{
if(_4b=="EE"||_4b=="E"){
for(var i=0;i<DAY_NAMES.length;i++){
var _59=DAY_NAMES[i];
if(val.substring(_48,_48+_59.length).toLowerCase()==_59.toLowerCase()){
_48+=_59.length;
break;
}
}
}else{
if(_4b=="MM"||_4b=="M"){
_51=_getInt(val,_48,_4b.length,2);
if(_51==null||(_51<1)||(_51>12)){
return 0;
}
_48+=_51.length;
}else{
if(_4b=="dd"||_4b=="d"){
_52=_getInt(val,_48,_4b.length,2);
if(_52==null||(_52<1)||(_52>31)){
return 0;
}
_48+=_52.length;
}else{
if(_4b=="hh"||_4b=="h"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<1)||(hh>12)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="HH"||_4b=="H"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<0)||(hh>23)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="KK"||_4b=="K"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<0)||(hh>11)){
return 0;
}
_48+=hh.length;
}else{
if(_4b=="kk"||_4b=="k"){
hh=_getInt(val,_48,_4b.length,2);
if(hh==null||(hh<1)||(hh>24)){
return 0;
}
_48+=hh.length;
hh--;
}else{
if(_4b=="mm"||_4b=="m"){
mm=_getInt(val,_48,_4b.length,2);
if(mm==null||(mm<0)||(mm>59)){
return 0;
}
_48+=mm.length;
}else{
if(_4b=="ss"||_4b=="s"){
ss=_getInt(val,_48,_4b.length,2);
if(ss==null||(ss<0)||(ss>59)){
return 0;
}
_48+=ss.length;
}else{
if(_4b=="a"){
if(val.substring(_48,_48+2).toLowerCase()=="am"){
_56="AM";
}else{
if(val.substring(_48,_48+2).toLowerCase()=="pm"){
_56="PM";
}else{
return 0;
}
}
_48+=2;
}else{
if(val.substring(_48,_48+_4b.length)!=_4b){
return 0;
}else{
_48+=_4b.length;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if(_48!=val.length){
return 0;
}
if(_51==2){
if(((_50%4==0)&&(_50%100!=0))||(_50%400==0)){
if(_52>29){
return 0;
}
}else{
if(_52>28){
return 0;
}
}
}
if((_51==4)||(_51==6)||(_51==9)||(_51==11)){
if(_52>30){
return 0;
}
}
if(hh<12&&_56=="PM"){
hh=hh-0+12;
}else{
if(hh>11&&_56=="AM"){
hh-=12;
}
}
var _5a=new Date(_50,_51-1,_52,hh,mm,ss);
return _5a.getTime();
};
parseDate=function(val){
var _5c=(arguments.length==2)?arguments[1]:false;
generalFormats=new Array("y-M-d","MMM d, y","MMM d,y","y-MMM-d","d-MMM-y","MMM d");
monthFirst=new Array("M/d/y","M-d-y","M.d.y","MMM-d","M/d","M-d");
dateFirst=new Array("d/M/y","d-M-y","d.M.y","d-MMM","d/M","d-M");
var _5d=new Array("generalFormats",_5c?"dateFirst":"monthFirst",_5c?"monthFirst":"dateFirst");
var d=null;
for(var i=0;i<_5d.length;i++){
var l=window[_5d[i]];
for(var j=0;j<l.length;j++){
d=getDateFromFormat(val,l[j]);
if(d!=0){
return new Date(d);
}
}
}
return null;
};
PopupWindow_getXYPosition=function(_62){
var _63;
if(this.type=="WINDOW"){
_63=getAnchorWindowPosition(_62);
}else{
_63=getAnchorPosition(_62);
}
this.x=_63.x;
this.y=_63.y;
};
PopupWindow_setSize=function(_64,_65){
this.width=_64;
this.height=_65;
};
PopupWindow_populate=function(_66){
this.contents=_66;
this.populated=false;
};
PopupWindow_setUrl=function(url){
this.url=url;
};
PopupWindow_setWindowProperties=function(_68){
this.windowProperties=_68;
};
PopupWindow_refresh=function(){
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).innerHTML=this.contents;
}else{
if(this.use_css){
document.all[this.divName].innerHTML=this.contents;
}else{
if(this.use_layers){
var d=document.layers[this.divName];
d.document.open();
d.document.writeln(this.contents);
d.document.close();
}
}
}
}else{
if(this.popupWindow!=null&&!this.popupWindow.closed){
if(this.url!=""){
this.popupWindow.location.href=this.url;
}else{
this.popupWindow.document.open();
this.popupWindow.document.writeln(this.contents);
this.popupWindow.document.close();
}
this.popupWindow.focus();
}
}
};
PopupWindow_showPopup=function(_6a){
this.getXYPosition(_6a);
this.x+=this.offsetX;
this.y+=this.offsetY;
if(!this.populated&&(this.contents!="")){
this.populated=true;
this.refresh();
}
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).style.left=this.x+"px";
document.getElementById(this.divName).style.top=this.y+"px";
document.getElementById(this.divName).style.visibility="visible";
}else{
if(this.use_css){
document.all[this.divName].style.left=this.x;
document.all[this.divName].style.top=this.y;
document.all[this.divName].style.visibility="visible";
}else{
if(this.use_layers){
document.layers[this.divName].left=this.x;
document.layers[this.divName].top=this.y;
document.layers[this.divName].visibility="visible";
}
}
}
}else{
if(this.popupWindow==null||this.popupWindow.closed){
if(this.x<0){
this.x=0;
}
if(this.y<0){
this.y=0;
}
if(screen&&screen.availHeight){
if((this.y+this.height)>screen.availHeight){
this.y=screen.availHeight-this.height;
}
}
if(screen&&screen.availWidth){
if((this.x+this.width)>screen.availWidth){
this.x=screen.availWidth-this.width;
}
}
var _6b=window.opera||(document.layers&&!navigator.mimeTypes["*"])||navigator.vendor=="KDE"||(document.childNodes&&!document.all&&!navigator.taintEnabled);
this.popupWindow=window.open(_6b?"":"about:blank","window_"+_6a,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");
}
this.refresh();
}
};
PopupWindow_hidePopup=function(){
if(this.divName!=null){
if(this.use_gebi){
document.getElementById(this.divName).style.visibility="hidden";
}else{
if(this.use_css){
document.all[this.divName].style.visibility="hidden";
}else{
if(this.use_layers){
document.layers[this.divName].visibility="hidden";
}
}
}
}else{
if(this.popupWindow&&!this.popupWindow.closed){
this.popupWindow.close();
this.popupWindow=null;
}
}
};
PopupWindow_isClicked=function(e){
if(this.divName!=null){
if(this.use_layers){
var _6d=e.pageX;
var _6e=e.pageY;
var t=document.layers[this.divName];
if((_6d>t.left)&&(_6d<t.left+t.clip.width)&&(_6e>t.top)&&(_6e<t.top+t.clip.height)){
return true;
}else{
return false;
}
}else{
if(document.all){
var t=window.event.srcElement;
while(t.parentElement!=null){
if(t.id==this.divName){
return true;
}
t=t.parentElement;
}
return false;
}else{
if(this.use_gebi&&e){
var t=e.originalTarget;
while(t.parentNode!=null){
if(t.id==this.divName){
return true;
}
t=t.parentNode;
}
return false;
}
}
}
return false;
}
return false;
};
PopupWindow_hideIfNotClicked=function(e){
if(this.autoHideEnabled&&!this.isClicked(e)){
this.hidePopup();
}
};
PopupWindow_autoHide=function(){
this.autoHideEnabled=true;
};
PopupWindow_hidePopupWindows=function(e){
for(var i=0;i<popupWindowObjects.length;i++){
if(popupWindowObjects[i]!=null){
var p=popupWindowObjects[i];
p.hideIfNotClicked(e);
}
}
};
PopupWindow_attachListener=function(){
if(document.layers){
document.captureEvents(Event.MOUSEUP);
}
window.popupWindowOldEventListener=document.onmouseup;
if(window.popupWindowOldEventListener!=null){
document.onmouseup=new Function("window.popupWindowOldEventListener(); PopupWindow_hidePopupWindows();");
}else{
document.onmouseup=PopupWindow_hidePopupWindows;
}
};
PopupWindow=function(){
if(!window.popupWindowIndex){
window.popupWindowIndex=0;
}
if(!window.popupWindowObjects){
window.popupWindowObjects=new Array();
}
if(!window.listenerAttached){
window.listenerAttached=true;
PopupWindow_attachListener();
}
this.index=popupWindowIndex++;
popupWindowObjects[this.index]=this;
this.divName=null;
this.popupWindow=null;
this.width=0;
this.height=0;
this.populated=false;
this.visible=false;
this.autoHideEnabled=false;
this.contents="";
this.url="";
this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";
if(arguments.length>0){
this.type="DIV";
this.divName=arguments[0];
}else{
this.type="WINDOW";
}
this.use_gebi=false;
this.use_css=false;
this.use_layers=false;
if(document.getElementById){
this.use_gebi=true;
}else{
if(document.all){
this.use_css=true;
}else{
if(document.layers){
this.use_layers=true;
}else{
this.type="WINDOW";
}
}
}
this.offsetX=0;
this.offsetY=0;
this.getXYPosition=PopupWindow_getXYPosition;
this.populate=PopupWindow_populate;
this.setUrl=PopupWindow_setUrl;
this.setWindowProperties=PopupWindow_setWindowProperties;
this.refresh=PopupWindow_refresh;
this.showPopup=PopupWindow_showPopup;
this.hidePopup=PopupWindow_hidePopup;
this.setSize=PopupWindow_setSize;
this.isClicked=PopupWindow_isClicked;
this.autoHide=PopupWindow_autoHide;
this.hideIfNotClicked=PopupWindow_hideIfNotClicked;
};
CalendarPopup=function(){
var c;
if(arguments.length>0){
c=new PopupWindow(arguments[0]);
}else{
c=new PopupWindow();
c.setSize(150,175);
}
c.offsetX=-152;
c.offsetY=25;
c.autoHide();
c.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
c.dayHeaders=new Array("S","M","T","W","T","F","S");
c.returnFunction="CP_tmpReturnFunction";
c.secondaryReturnFunction=null;
c.secondaryReturnFunctionParameter=null;
c.returnMonthFunction="CP_tmpReturnMonthFunction";
c.returnQuarterFunction="CP_tmpReturnQuarterFunction";
c.returnYearFunction="CP_tmpReturnYearFunction";
c.weekStartDay=0;
c.isShowYearNavigation=false;
c.displayType="date";
c.disabledWeekDays=new Object();
c.disabledDatesExpression="";
c.yearSelectStartOffset=2;
c.currentDate=null;
c.todayText="Today";
c.cssPrefix="";
c.isShowNavigationDropdowns=false;
c.isShowYearNavigationInput=false;
c.title="Calander";
window.CP_calendarObject=null;
window.CP_targetInput=null;
window.CP_dateFormat="MM/dd/yyyy";
c.copyMonthNamesToWindow=CP_copyMonthNamesToWindow;
c.setReturnFunction=CP_setReturnFunction;
c.setSecondaryReturnFunction=CP_setSecondaryReturnFunction;
c.setSecondaryReturnFunctionParameter=CP_setSecondaryReturnFunctionParameter;
c.setReturnMonthFunction=CP_setReturnMonthFunction;
c.setReturnQuarterFunction=CP_setReturnQuarterFunction;
c.setReturnYearFunction=CP_setReturnYearFunction;
c.setMonthNames=CP_setMonthNames;
c.setMonthAbbreviations=CP_setMonthAbbreviations;
c.setDayHeaders=CP_setDayHeaders;
c.setWeekStartDay=CP_setWeekStartDay;
c.setDisplayType=CP_setDisplayType;
c.setDisabledWeekDays=CP_setDisabledWeekDays;
c.addDisabledDates=CP_addDisabledDates;
c.setYearSelectStartOffset=CP_setYearSelectStartOffset;
c.setTodayText=CP_setTodayText;
c.showYearNavigation=CP_showYearNavigation;
c.showCalendar=CP_showCalendar;
c.hideCalendar=CP_hideCalendar;
c.getStyles=getCalendarStyles;
c.refreshCalendar=CP_refreshCalendar;
c.getCalendar=CP_getCalendar;
c.select=CP_select;
c.setCssPrefix=CP_setCssPrefix;
c.showNavigationDropdowns=CP_showNavigationDropdowns;
c.showYearNavigationInput=CP_showYearNavigationInput;
c.setTitle=CP_setTitle;
c.copyMonthNamesToWindow();
return c;
};
CP_copyMonthNamesToWindow=function(){
if(typeof (window.MONTH_NAMES)!="undefined"&&window.MONTH_NAMES!=null){
window.MONTH_NAMES=new Array();
for(var i=0;i<this.monthNames.length;i++){
window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthNames[i];
}
for(var i=0;i<this.monthAbbreviations.length;i++){
window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthAbbreviations[i];
}
}
};
CP_tmpReturnFunction=function(y,m,d){
if(window.CP_calendarObject.secondaryReturnFunction!=null){
if(!window.CP_calendarObject.secondaryReturnFunction(y,m,d,window.CP_calendarObject.secondaryReturnFunctionParameter)){
return;
}
}
if(window.CP_targetInput!=null){
var dt=new Date(y,m-1,d,0,0,0);
if(window.CP_calendarObject!=null){
window.CP_calendarObject.copyMonthNamesToWindow();
}
window.CP_targetInput.value=formatDate(dt,window.CP_dateFormat);
}else{
alert("Use setReturnFunction() to define which function will get the clicked results!");
}
};
CP_tmpReturnMonthFunction=function(y,m){
alert("Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , month="+m);
};
CP_tmpReturnQuarterFunction=function(y,q){
alert("Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year="+y+" , quarter="+q);
};
CP_tmpReturnYearFunction=function(y){
alert("Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year="+y);
};
CP_setReturnFunction=function(_7f){
this.returnFunction=_7f;
};
CP_setSecondaryReturnFunction=function(_80){
this.secondaryReturnFunction=_80;
};
CP_setSecondaryReturnFunctionParameter=function(_81){
this.secondaryReturnFunctionParameter=_81;
};
CP_setReturnMonthFunction=function(_82){
this.returnMonthFunction=_82;
};
CP_setReturnQuarterFunction=function(_83){
this.returnQuarterFunction=_83;
};
CP_setReturnYearFunction=function(_84){
this.returnYearFunction=_84;
};
CP_setMonthNames=function(){
for(var i=0;i<arguments.length;i++){
this.monthNames[i]=arguments[i];
}
this.copyMonthNamesToWindow();
};
CP_setMonthAbbreviations=function(){
for(var i=0;i<arguments.length;i++){
this.monthAbbreviations[i]=arguments[i];
}
this.copyMonthNamesToWindow();
};
CP_setDayHeaders=function(){
for(var i=0;i<arguments.length;i++){
this.dayHeaders[i]=arguments[i];
}
};
CP_setTitle=function(_88){
this.title=_88;
};
CP_setWeekStartDay=function(day){
this.weekStartDay=day;
};
CP_showYearNavigation=function(){
this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true;
};
CP_setDisplayType=function(_8a){
if(_8a!="date"&&_8a!="week-end"&&_8a!="month"&&_8a!="quarter"&&_8a!="year"){
alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");
return false;
}
this.displayType=_8a;
};
CP_setYearSelectStartOffset=function(num){
this.yearSelectStartOffset=num;
};
CP_setDisabledWeekDays=function(){
this.disabledWeekDays=new Object();
for(var i=0;i<arguments.length;i++){
this.disabledWeekDays[arguments[i]]=true;
}
};
CP_addDisabledDates=function(_8d,end){
if(arguments.length==1){
end=_8d;
}
if(_8d==null&&end==null){
return;
}
if(this.disabledDatesExpression!=""){
this.disabledDatesExpression+="||";
}
if(_8d!=null){
_8d=parseDate(_8d);
_8d=""+_8d.getFullYear()+LZ(_8d.getMonth()+1)+LZ(_8d.getDate());
}
if(end!=null){
end=parseDate(end);
end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());
}
if(_8d==null){
this.disabledDatesExpression+="(ds<="+end+")";
}else{
if(end==null){
this.disabledDatesExpression+="(ds>="+_8d+")";
}else{
this.disabledDatesExpression+="(ds>="+_8d+"&&ds<="+end+")";
}
}
};
CP_setTodayText=function(_8f){
this.todayText=_8f;
};
CP_setCssPrefix=function(val){
this.cssPrefix=val;
};
CP_showNavigationDropdowns=function(){
this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true;
};
CP_showYearNavigationInput=function(){
this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true;
};
CP_hideCalendar=function(){
if(arguments.length>0){
window.popupWindowObjects[arguments[0]].hidePopup();
}else{
this.hidePopup();
}
if(window.parent!=null){
window.parent.focus();
}
};
CP_refreshCalendar=function(_91){
var _92=window.popupWindowObjects[_91];
if(arguments.length>1){
_92.populate(_92.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));
}else{
_92.populate(_92.getCalendar());
}
_92.refresh();
};
CP_showCalendar=function(_93){
if(arguments.length>1){
if(arguments[1]==null||arguments[1]==""){
this.currentDate=new Date();
}else{
this.currentDate=new Date(parseDate(arguments[1]));
}
}
this.populate(this.getCalendar());
this.showPopup(_93);
};
CP_select=function(_94,_95,_96){
var _97=(arguments.length>3)?arguments[3]:null;
if(!window.getDateFromFormat){
alert("calendar.select: To use this method you must also include 'date.js' for date formatting");
return;
}
if(this.displayType!="date"&&this.displayType!="week-end"){
alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");
return;
}
if(_94.type!="text"&&_94.type!="hidden"&&_94.type!="textarea"){
alert("calendar.select: Input object passed is not a valid form input object");
window.CP_targetInput=null;
return;
}
if(_94.disabled){
return;
}
window.CP_targetInput=_94;
window.CP_calendarObject=this;
this.currentDate=null;
var _98=0;
if(_97!=null){
_98=getDateFromFormat(_97,_96);
}else{
if(_94.value!=""){
_98=getDateFromFormat(_94.value,_96);
}
}
if(_97!=null||_94.value!=""){
if(_98==0){
this.currentDate=null;
}else{
this.currentDate=new Date(_98);
}
}
window.CP_dateFormat=_96;
this.showCalendar(_95);
};
getCalendarStyles=function(){
var _99="";
var p="";
if(this!=null&&typeof (this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){
p=this.cssPrefix;
}
_99+="<STYLE>\n";
_99+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation { background-color:#C0C0C0; text-align:center; vertical-align:center; text-decoration:none; color:#000000; font-weight:bold; }\n";
_99+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText { font-family:arial; font-size:8pt; }\n";
_99+="TD."+p+"cpDayColumnHeader { text-align:right; border:solid thin #C0C0C0;border-width:0 0 1 0; }\n";
_99+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate  { text-align:right; text-decoration:none; }\n";
_99+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled { color:#D0D0D0; text-align:right; text-decoration:line-through; }\n";
_99+="."+p+"cpCurrentMonthDate, .cpCurrentDate { color:#000000; }\n";
_99+="."+p+"cpOtherMonthDate { color:#808080; }\n";
_99+="TD."+p+"cpCurrentDate { color:white; background-color: #C0C0C0; border-width:1; border:solid thin #800000; }\n";
_99+="TD."+p+"cpCurrentDateDisabled { border-width:1; border:solid thin #FFAAAA; }\n";
_99+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled { border:solid thin #C0C0C0; border-width:1 0 0 0;}\n";
_99+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled { height:20px; }\n";
_99+="A."+p+"cpTodayText { color:black; }\n";
_99+="."+p+"cpTodayTextDisabled { color:#D0D0D0; }\n";
_99+="."+p+"cpBorder { border:solid thin #808080; }\n";
_99+="</STYLE>\n";
return _99;
};
CP_getCalendar=function(){
var now=new Date();
if(this.type=="WINDOW"){
var _9c="window.opener.";
}else{
var _9c="";
}
var _9d="";
if(this.type=="WINDOW"){
_9d+="<HTML><HEAD><TITLE>"+this.title+"</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";
_9d+="<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n";
}else{
_9d+="<TABLE CLASS=\""+this.cssPrefix+"cpBorder\" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n";
_9d+="<TR><TD ALIGN=CENTER>\n";
_9d+="<CENTER>\n";
}
if(this.displayType=="date"||this.displayType=="week-end"){
if(this.currentDate==null){
this.currentDate=now;
}
if(arguments.length>0){
var _9e=arguments[0];
}else{
var _9e=this.currentDate.getMonth()+1;
}
if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){
var _9f=arguments[1];
}else{
var _9f=this.currentDate.getFullYear();
}
var _a0=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
if(((_9f%4==0)&&(_9f%100!=0))||(_9f%400==0)){
_a0[2]=29;
}
var _a1=new Date(_9f,_9e-1,1);
var _a2=_9f;
var _a3=_9e;
var _a4=1;
var _a5=_a1.getDay();
var _a6=0;
_a6=(_a5>=this.weekStartDay)?_a5-this.weekStartDay:7-this.weekStartDay+_a5;
if(_a6>0){
_a3--;
if(_a3<1){
_a3=12;
_a2--;
}
_a4=_a0[_a3]-_a6+1;
}
var _a7=_9e+1;
var _a8=_9f;
if(_a7>12){
_a7=1;
_a8++;
}
var _a9=_9e-1;
var _aa=_9f;
if(_a9<1){
_a9=12;
_aa--;
}
var _ab;
if(this.type!="WINDOW"){
_9d+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
}
_9d+="<TR>\n";
var _ac=_9c+"CP_refreshCalendar";
var _ad="javascript:"+_ac;
if(this.isShowNavigationDropdowns){
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"78\" COLSPAN=\"3\"><select CLASS=\""+this.cssPrefix+"cpMonthNavigation\" name=\"cpMonth\" onChange=\""+_ac+"("+this.index+",this.options[this.selectedIndex].value-0,"+(_9f-0)+");\">";
for(var _ae=1;_ae<=12;_ae++){
var _af=(_ae==_9e)?"SELECTED":"";
_9d+="<option value=\""+_ae+"\" "+_af+">"+this.monthNames[_ae-1]+"</option>";
}
_9d+="</select></TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\">&nbsp;</TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"56\" COLSPAN=\"3\"><select CLASS=\""+this.cssPrefix+"cpYearNavigation\" name=\"cpYear\" onChange=\""+_ac+"("+this.index+","+_9e+",this.options[this.selectedIndex].value-0);\">";
for(var _b0=_9f-this.yearSelectStartOffset;_b0<=_9f+this.yearSelectStartOffset;_b0++){
var _af=(_b0==_9f)?"SELECTED":"";
_9d+="<option value=\""+_b0+"\" "+_af+">"+_b0+"</option>";
}
_9d+="</select></TD>";
}else{
if(this.isShowYearNavigation){
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_ad+"("+this.index+","+_a9+","+_aa+");\">&lt;</A></TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"58\"><SPAN CLASS=\""+this.cssPrefix+"cpMonthNavigation\">"+this.monthNames[_9e-1]+"</SPAN></TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_ad+"("+this.index+","+_a7+","+_a8+");\">&gt;</A></TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"10\">&nbsp;</TD>";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\""+_ad+"("+this.index+","+_9e+","+(_9f-1)+");\">&lt;</A></TD>";
if(this.isShowYearNavigationInput){
_9d+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"36\"><INPUT NAME=\"cpYear\" CLASS=\""+this.cssPrefix+"cpYearNavigation\" SIZE=\"4\" MAXLENGTH=\"4\" VALUE=\""+_9f+"\" onBlur=\""+_ac+"("+this.index+","+_9e+",this.value-0);\"></TD>";
}else{
_9d+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"36\"><SPAN CLASS=\""+this.cssPrefix+"cpYearNavigation\">"+_9f+"</SPAN></TD>";
}
_9d+="<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"10\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\""+_ad+"("+this.index+","+_9e+","+(_9f+1)+");\">&gt;</A></TD>";
}else{
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_ad+"("+this.index+","+_a9+","+_aa+");\">&lt;&lt;</A></TD>\n";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"100\"><SPAN CLASS=\""+this.cssPrefix+"cpMonthNavigation\">"+this.monthNames[_9e-1]+" "+_9f+"</SPAN></TD>\n";
_9d+="<TD CLASS=\""+this.cssPrefix+"cpMonthNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpMonthNavigation\" HREF=\""+_ad+"("+this.index+","+_a7+","+_a8+");\">&gt;&gt;</A></TD>\n";
}
}
_9d+="</TR></TABLE>\n";
_9d+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n";
_9d+="<TR>\n";
for(var j=0;j<7;j++){
_9d+="<TD CLASS=\""+this.cssPrefix+"cpDayColumnHeader\" WIDTH=\"14%\"><SPAN CLASS=\""+this.cssPrefix+"cpDayColumnHeader\">"+this.dayHeaders[(this.weekStartDay+j)%7]+"</TD>\n";
}
_9d+="</TR>\n";
for(var row=1;row<=6;row++){
_9d+="<TR>\n";
for(var col=1;col<=7;col++){
var _b4=false;
if(this.disabledDatesExpression!=""){
var ds=""+_a2+LZ(_a3)+LZ(_a4);
eval("disabled=("+this.disabledDatesExpression+")");
}
var _b6="";
if((_a3==this.currentDate.getMonth()+1)&&(_a4==this.currentDate.getDate())&&(_a2==this.currentDate.getFullYear())){
_b6="cpCurrentDate";
}else{
if(_a3==_9e){
_b6="cpCurrentMonthDate";
}else{
_b6="cpOtherMonthDate";
}
}
if(_b4||this.disabledWeekDays[col-1]){
_9d+="\t<TD CLASS=\""+this.cssPrefix+_b6+"\"><SPAN CLASS=\""+this.cssPrefix+_b6+"Disabled\">"+_a4+"</SPAN></TD>\n";
}else{
var _b7=_a4;
var _b8=_a3;
var _b9=_a2;
if(this.displayType=="week-end"){
var d=new Date(_b9,_b8-1,_b7,0,0,0,0);
d.setDate(d.getDate()+(7-col));
_b9=d.getYear();
if(_b9<1000){
_b9+=1900;
}
_b8=d.getMonth()+1;
_b7=d.getDate();
}
_9d+="\t<TD CLASS=\""+this.cssPrefix+_b6+"\"><A HREF=\"javascript:"+_9c+this.returnFunction+"("+_b9+","+_b8+","+_b7+");"+_9c+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+this.cssPrefix+_b6+"\">"+_a4+"</A></TD>\n";
}
_a4++;
if(_a4>_a0[_a3]){
_a4=1;
_a3++;
}
if(_a3>12){
_a3=1;
_a2++;
}
}
_9d+="</TR>";
}
var _bb=now.getDay()-this.weekStartDay;
if(_bb<0){
_bb+=7;
}
_9d+="<TR>\n";
_9d+="\t<TD COLSPAN=7 ALIGN=CENTER CLASS=\""+this.cssPrefix+"cpTodayText\">\n";
if(this.disabledDatesExpression!=""){
var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());
eval("disabled=("+this.disabledDatesExpression+")");
}
if(_b4||this.disabledWeekDays[_bb+1]){
_9d+="\t\t<SPAN CLASS=\""+this.cssPrefix+"cpTodayTextDisabled\">"+this.todayText+"</SPAN>\n";
}else{
_9d+="\t\t<A CLASS=\""+this.cssPrefix+"cpTodayText\" HREF=\"javascript:"+_9c+this.returnFunction+"('"+now.getFullYear()+"','"+(now.getMonth()+1)+"','"+now.getDate()+"');"+_9c+"CP_hideCalendar('"+this.index+"');\">"+this.todayText+"</A>\n";
}
_9d+="\t\t<BR>\n";
_9d+="\t</TD></TR></TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){
if(arguments.length>0){
var _9f=arguments[0];
}else{
if(this.displayType=="year"){
var _9f=now.getFullYear()-this.yearSelectStartOffset;
}else{
var _9f=now.getFullYear();
}
}
if(this.displayType!="year"&&this.isShowYearNavigation){
_9d+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
_9d+="<TR>\n";
_9d+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9c+"CP_refreshCalendar("+this.index+","+(_9f-1)+");\">&lt;&lt;</A></TD>\n";
_9d+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"100\">"+_9f+"</TD>\n";
_9d+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"22\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9c+"CP_refreshCalendar("+this.index+","+(_9f+1)+");\">&gt;&gt;</A></TD>\n";
_9d+="</TR></TABLE>\n";
}
}
if(this.displayType=="month"){
_9d+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<4;i++){
_9d+="<TR>";
for(var j=0;j<3;j++){
var _bd=((i*3)+j);
_9d+="<TD WIDTH=33% ALIGN=CENTER><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9c+this.returnMonthFunction+"("+_9f+","+(_bd+1)+");"+_9c+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ab+"\">"+this.monthAbbreviations[_bd]+"</A></TD>";
}
_9d+="</TR>";
}
_9d+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="quarter"){
_9d+="<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<2;i++){
_9d+="<TR>";
for(var j=0;j<2;j++){
var _be=((i*2)+j+1);
_9d+="<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9c+this.returnQuarterFunction+"("+_9f+","+_be+");"+_9c+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ab+"\">Q"+_be+"</A><BR><BR></TD>";
}
_9d+="</TR>";
}
_9d+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.displayType=="year"){
var _bf=4;
_9d+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";
_9d+="<TR>\n";
_9d+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"50%\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9c+"CP_refreshCalendar("+this.index+","+(_9f-(_bf*2))+");\">&lt;&lt;</A></TD>\n";
_9d+="\t<TD CLASS=\""+this.cssPrefix+"cpYearNavigation\" WIDTH=\"50%\"><A CLASS=\""+this.cssPrefix+"cpYearNavigation\" HREF=\"javascript:"+_9c+"CP_refreshCalendar("+this.index+","+(_9f+(_bf*2))+");\">&gt;&gt;</A></TD>\n";
_9d+="</TR></TABLE>\n";
_9d+="<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n";
for(var i=0;i<_bf;i++){
for(var j=0;j<2;j++){
var _c0=_9f+(j*_bf)+i;
_9d+="<TD WIDTH=50% ALIGN=CENTER><A CLASS=\""+this.cssPrefix+"cpText\" HREF=\"javascript:"+_9c+this.returnYearFunction+"("+_c0+");"+_9c+"CP_hideCalendar('"+this.index+"');\" CLASS=\""+_ab+"\">"+_c0+"</A></TD>";
}
_9d+="</TR>";
}
_9d+="</TABLE></CENTER></TD></TR></TABLE>\n";
}
if(this.type=="WINDOW"){
_9d+="</BODY></HTML>\n";
}
return _9d;
};

