/* Copyright (c) 2006, Yahoo! Inc. All rights reserved.Code licensed under the BSD License:http://developer.yahoo.net/yui/license.txt */ if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}if(propertyCache[property]){return propertyCache[property];}while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};}YAHOO.util.Dom={get:function(el){if(!el){return null;}if(typeof el!='string'&&!(el instanceof Array)){return el;}if(typeof el=='string'){return document.getElementById(el);}else{var collection=[];for(var i=0,len=el.length;i=this.left&®ion.right<=this.right&®ion.top>=this.top&®ion.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new YAHOO.util.Region(t,r,b,l);}else{return null;}};YAHOO.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(el){var p=YAHOO.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new YAHOO.util.Region(t,r,b,l);};YAHOO.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};YAHOO.util.Point.prototype=new YAHOO.util.Region();YAHOO.util.CustomEvent=function(_1,_2,_3,_4){this.type=_1;this.scope=_2||window;this.silent=_3;this.signature=_4||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var _5="_YUICEOnSubscribe";if(_1!==_5){this.subscribeEvent=new YAHOO.util.CustomEvent(_5,this,true);}};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(fn,_7,_8){if(this.subscribeEvent){this.subscribeEvent.fire(fn,_7,_8);}this.subscribers.push(new YAHOO.util.Subscriber(fn,_7,_8));},unsubscribe:function(fn,_9){var _10=false;for(var i=0,len=this.subscribers.length;i0){_17=_14[0];}ret=s.fn.call(_16,_17,s.obj);}else{ret=s.fn.call(_16,this.type,_14,s.obj);}if(false===ret){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i=0){_60=_23[_61];}if(!el||!_60){return false;}if(this.useLegacyEvent(el,_59)){var _62=this.getLegacyIndex(el,_59);var _63=_26[_62];if(_63){for(i=0,len=_63.length;i0);}var _76=[];for(var i=0,len=_28.length;i0){for(var i=0,len=_23.length;i0){j=_23.length;while(j){index=j-1;l=_23[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}j=j-1;}l=null;EU.clearCache();}for(i=0,len=_25.length;i0)?val:0;}YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';}return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;}start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})();(function(){var _1=YAHOO.util.Event;var _2=YAHOO.util.Dom;YAHOO.util.DragDrop=function(id,_4,_5){if(id){this.init(id,_4,_5);}};YAHOO.util.DragDrop.prototype={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,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},getEl:function(){if(!this._domRef){this._domRef=_2.get(this.id);}return this._domRef;},getDragEl:function(){return _2.get(this.dragElId);},init:function(id,_9,_10){this.initTarget(id,_9,_10);_1.on(this.id,"mousedown",this.handleMouseDown,this,true);},initTarget:function(id,_11,_12){this.config=_12||{};this.DDM=YAHOO.util.DDM;this.groups={};if(typeof id!=="string"){YAHOO.log("id is not a string, assuming it is an HTMLElement");id=_2.generateId(id);}this.id=id;this.addToGroup((_11)?_11:"default");this.handleElId=id;_1.onAvailable(id,this.handleOnAvailable,this,true);this.setDragElId(id);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();},applyConfig:function(){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);},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable();},setPadding:function(_13,_14,_15,_16){if(!_14&&0!==_14){this.padding=[_13,_13,_13,_13];}else{if(!_15&&0!==_15){this.padding=[_13,_14,_13,_14];}else{this.padding=[_13,_14,_15,_16];}}},setInitPosition:function(_17,_18){var el=this.getEl();if(!this.DDM.verifyEl(el)){return;}var dx=_17||0;var dy=_18||0;var p=_2.getXY(el);this.initPageX=p[0]-dx;this.initPageY=p[1]-dy;this.lastPageX=p[0];this.lastPageY=p[1];this.setStartPosition(p);},setStartPosition:function(pos){var p=pos||_2.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=p[0];this.startPageY=p[1];},addToGroup:function(_24){this.groups[_24]=true;this.DDM.regDragDrop(this,_24);},removeFromGroup:function(_25){if(this.groups[_25]){delete this.groups[_25];}this.DDM.removeDDFromGroup(this,_25);},setDragElId:function(id){this.dragElId=id;},setHandleElId:function(id){if(typeof id!=="string"){YAHOO.log("id is not a string, assuming it is an HTMLElement");id=_2.generateId(id);}this.handleElId=id;this.DDM.regHandle(this.id,id);},setOuterHandleElId:function(id){if(typeof id!=="string"){YAHOO.log("id is not a string, assuming it is an HTMLElement");id=_2.generateId(id);}_1.on(id,"mousedown",this.handleMouseDown,this,true);this.setHandleElId(id);this.hasOuterHandles=true;},unreg:function(){_1.removeListener(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this);},isLocked:function(){return (this.DDM.isLocked()||this.locked);},handleMouseDown:function(e,oDD){var _27=e.which||e.button;if(this.primaryButtonOnly&&_27>1){return;}if(this.isLocked()){return;}this.DDM.refreshCache(this.groups);var pt=new YAHOO.util.Point(_1.getPageX(e),_1.getPageY(e));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(pt,this)){}else{if(this.clickValidator(e)){this.setStartPosition();this.b4MouseDown(e);this.onMouseDown(e);this.DDM.handleMouseDown(e,this);this.DDM.stopEvent(e);}else{}}},clickValidator:function(e){var _29=_1.getTarget(e);return (this.isValidHandleChild(_29)&&(this.id==this.handleElId||this.DDM.handleWasClicked(_29,this.id)));},addInvalidHandleType:function(_30){var _31=_30.toUpperCase();this.invalidHandleTypes[_31]=_31;},addInvalidHandleId:function(id){if(typeof id!=="string"){YAHOO.log("id is not a string, assuming it is an HTMLElement");id=_2.generateId(id);}this.invalidHandleIds[id]=id;},addInvalidHandleClass:function(_32){this.invalidHandleClasses.push(_32);},removeInvalidHandleType:function(_33){var _34=_33.toUpperCase();delete this.invalidHandleTypes[_34];},removeInvalidHandleId:function(id){if(typeof id!=="string"){YAHOO.log("id is not a string, assuming it is an HTMLElement");id=_2.generateId(id);}delete this.invalidHandleIds[id];},removeInvalidHandleClass:function(_35){for(var i=0,len=this.invalidHandleClasses.length;i=this.minX;i=i-_41){if(!_42[i]){this.xTicks[this.xTicks.length]=i;_42[i]=true;}}for(i=this.initPageX;i<=this.maxX;i=i+_41){if(!_42[i]){this.xTicks[this.xTicks.length]=i;_42[i]=true;}}this.xTicks.sort(this.DDM.numericSort);},setYTicks:function(_43,_44){this.yTicks=[];this.yTickSize=_44;var _45={};for(var i=this.initPageY;i>=this.minY;i=i-_44){if(!_45[i]){this.yTicks[this.yTicks.length]=i;_45[i]=true;}}for(i=this.initPageY;i<=this.maxY;i=i+_44){if(!_45[i]){this.yTicks[this.yTicks.length]=i;_45[i]=true;}}this.yTicks.sort(this.DDM.numericSort);},setXConstraint:function(_46,_47,_48){this.leftConstraint=_46;this.rightConstraint=_47;this.minX=this.initPageX-_46;this.maxX=this.initPageX+_47;if(_48){this.setXTicks(this.initPageX,_48);}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(iUp,_50,_51){this.topConstraint=iUp;this.bottomConstraint=_50;this.minY=this.initPageY-iUp;this.maxY=this.initPageY+_50;if(_51){this.setYTicks(this.initPageY,_51);}this.constrainY=true;},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var dx=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var dy=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(dx,dy);}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(val,_53){if(!_53){return val;}else{if(_53[0]>=val){return _53[0];}else{for(var i=0,len=_53.length;i=val){var _55=val-_53[i];var _56=_53[_54]-val;return (_56>_55)?_53[i]:_53[_54];}}return _53[_53.length-1];}}},toString:function(){return ("DragDrop "+this.id);}};})();if(!YAHOO.util.DragDropMgr){YAHOO.util.DragDropMgr=function(){var _57=YAHOO.util.Event;return {ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initalized:false,locked:false,init:function(){this.initialized=true;},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(_58,_59){for(var i in this.ids){for(var j in this.ids[i]){var oDD=this.ids[i][j];if(!this.isTypeOfDD(oDD)){continue;}oDD[_58].apply(oDD,_59);}}},_onLoad:function(){this.init();_57.on(document,"mouseup",this.handleMouseUp,this,true);_57.on(document,"mousemove",this.handleMouseMove,this,true);_57.on(window,"unload",this._onUnload,this,true);_57.on(window,"resize",this._onResize,this,true);},_onResize:function(e){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,regDragDrop:function(oDD,_61){if(!this.initialized){this.init();}if(!this.ids[_61]){this.ids[_61]={};}this.ids[_61][oDD.id]=oDD;},removeDDFromGroup:function(oDD,_62){if(!this.ids[_62]){this.ids[_62]={};}var obj=this.ids[_62];if(obj&&obj[oDD.id]){delete obj[oDD.id];}},_remove:function(oDD){for(var g in oDD.groups){if(g&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}}delete this.handleIds[oDD.id];},regHandle:function(_65,_66){if(!this.handleIds[_65]){this.handleIds[_65]={};}this.handleIds[_65][_66]=_66;},isDragDrop:function(id){return (this.getDDById(id))?true:false;},getRelated:function(_67,_68){var _69=[];for(var i in _67.groups){for(j in this.ids[i]){var dd=this.ids[i][j];if(!this.isTypeOfDD(dd)){continue;}if(!_68||dd.isTarget){_69[_69.length]=dd;}}}return _69;},isLegalTarget:function(oDD,_71){var _72=this.getRelated(oDD,true);for(var i=0,len=_72.length;ithis.clickPixelThresh||_77>this.clickPixelThresh){this.startDrag(this.startX,this.startY);}}if(this.dragThreshMet){this.dragCurrent.b4Drag(e);this.dragCurrent.onDrag(e);this.fireEvents(e,false);}this.stopEvent(e);return true;},fireEvents:function(e,_78){var dc=this.dragCurrent;if(!dc||dc.isLocked()){return;}var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);var pt=new YAHOO.util.Point(x,y);var _80=[];var _81=[];var _82=[];var _83=[];var _84=[];for(var i in this.dragOvers){var ddo=this.dragOvers[i];if(!this.isTypeOfDD(ddo)){continue;}if(!this.isOverTarget(pt,ddo,this.mode)){_81.push(ddo);}_80[i]=true;delete this.dragOvers[i];}for(var _86 in dc.groups){if("string"!=typeof _86){continue;}for(i in this.ids[_86]){var oDD=this.ids[_86][i];if(!this.isTypeOfDD(oDD)){continue;}if(oDD.isTarget&&!oDD.isLocked()&&oDD!=dc){if(this.isOverTarget(pt,oDD,this.mode)){if(_78){_83.push(oDD);}else{if(!_80[oDD.id]){_84.push(oDD);}else{_82.push(oDD);}this.dragOvers[oDD.id]=oDD;}}}}}if(this.mode){if(_81.length){dc.b4DragOut(e,_81);dc.onDragOut(e,_81);}if(_84.length){dc.onDragEnter(e,_84);}if(_82.length){dc.b4DragOver(e,_82);dc.onDragOver(e,_82);}if(_83.length){dc.b4DragDrop(e,_83);dc.onDragDrop(e,_83);}}else{var len=0;for(i=0,len=_81.length;i2000){}else{setTimeout(DDM._addListeners,10);if(document&&document.body){DDM._timeoutCount+=1;}}}},handleWasClicked:function(node,id){if(this.isHandle(id,node.id)){return true;}else{var p=node.parentNode;while(p){if(this.isHandle(id,p.id)){return true;}else{p=p.parentNode;}}}return false;}};}();YAHOO.util.DDM=YAHOO.util.DragDropMgr;YAHOO.util.DDM._addListeners();}YAHOO.util.DD=function(id,_111,_112){if(id){this.init(id,_111,_112);}};YAHOO.extend(YAHOO.util.DD,YAHOO.util.DragDrop,{scroll:true,autoOffset:function(_113,_114){var x=_113-this.startPageX;var y=_114-this.startPageY;this.setDelta(x,y);},setDelta:function(_115,_116){this.deltaX=_115;this.deltaY=_116;},setDragElPos:function(_117,_118){var el=this.getDragEl();this.alignElWithMouse(el,_117,_118);},alignElWithMouse:function(el,_119,_120){var _121=this.getTargetCoord(_119,_120);if(!this.deltaSetXY){var _122=[_121.x,_121.y];YAHOO.util.Dom.setXY(el,_122);var _123=parseInt(YAHOO.util.Dom.getStyle(el,"left"),10);var _124=parseInt(YAHOO.util.Dom.getStyle(el,"top"),10);this.deltaSetXY=[_123-_121.x,_124-_121.y];}else{YAHOO.util.Dom.setStyle(el,"left",(_121.x+this.deltaSetXY[0])+"px");YAHOO.util.Dom.setStyle(el,"top",(_121.y+this.deltaSetXY[1])+"px");}this.cachePosition(_121.x,_121.y);this.autoScroll(_121.x,_121.y,el.offsetHeight,el.offsetWidth);},cachePosition:function(_125,_126){if(_125){this.lastPageX=_125;this.lastPageY=_126;}else{var _127=YAHOO.util.Dom.getXY(this.getEl());this.lastPageX=_127[0];this.lastPageY=_127[1];}},autoScroll:function(x,y,h,w){if(this.scroll){var _130=this.DDM.getClientHeight();var _131=this.DDM.getClientWidth();var st=this.DDM.getScrollTop();var sl=this.DDM.getScrollLeft();var bot=h+y;var _135=w+x;var _136=(_130+st-y-this.deltaY);var _137=(_131+sl-x-this.deltaX);var _138=40;var _139=(document.all)?80:30;if(bot>_130&&_136<_138){window.scrollTo(sl,st+_139);}if(y0&&y-st<_138){window.scrollTo(sl,st-_139);}if(_135>_131&&_137<_138){window.scrollTo(sl+_139,st);}if(x0&&x-sl<_138){window.scrollTo(sl-_139,st);}}},getTargetCoord:function(_140,_141){var x=_140-this.deltaX;var y=_141-this.deltaY;if(this.constrainX){if(xthis.maxX){x=this.maxX;}}if(this.constrainY){if(ythis.maxY){y=this.maxY;}}x=this.getTick(x,this.xTicks);y=this.getTick(y,this.yTicks);return {x:x,y:y};},applyConfig:function(){YAHOO.util.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false);},b4MouseDown:function(e){this.autoOffset(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},b4Drag:function(e){this.setDragElPos(YAHOO.util.Event.getPageX(e),YAHOO.util.Event.getPageY(e));},toString:function(){return ("DD "+this.id);}});YAHOO.util.DDProxy=function(id,_142,_143){if(id){this.init(id,_142,_143);this.initFrame();}};YAHOO.util.DDProxy.dragElId="ygddfdiv";YAHOO.extend(YAHOO.util.DDProxy,YAHOO.util.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var self=this;var body=document.body;if(!body||!body.firstChild){setTimeout(function(){self.createFrame();},50);return;}var div=this.getDragEl();if(!div){div=document.createElement("div");div.id=this.dragElId;var s=div.style;s.position="absolute";s.visibility="hidden";s.cursor="move";s.border="2px solid #aaa";s.zIndex=999;body.insertBefore(div,body.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(_147,_148){var el=this.getEl();var _149=this.getDragEl();var s=_149.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(s.width,10)/2),Math.round(parseInt(s.height,10)/2));}this.setDragElPos(_147,_148);YAHOO.util.Dom.setStyle(_149,"visibility","visible");},_resizeProxy:function(){if(this.resizeFrame){var DOM=YAHOO.util.Dom;var el=this.getEl();var _151=this.getDragEl();var bt=parseInt(DOM.getStyle(_151,"borderTopWidth"),10);var br=parseInt(DOM.getStyle(_151,"borderRightWidth"),10);var bb=parseInt(DOM.getStyle(_151,"borderBottomWidth"),10);var bl=parseInt(DOM.getStyle(_151,"borderLeftWidth"),10);if(isNaN(bt)){bt=0;}if(isNaN(br)){br=0;}if(isNaN(bb)){bb=0;}if(isNaN(bl)){bl=0;}var _156=Math.max(0,el.offsetWidth-br-bl);var _157=Math.max(0,el.offsetHeight-bt-bb);DOM.setStyle(_151,"width",_156+"px");DOM.setStyle(_151,"height",_157+"px");}},b4MouseDown:function(e){var x=YAHOO.util.Event.getPageX(e);var y=YAHOO.util.Event.getPageY(e);this.autoOffset(x,y);this.setDragElPos(x,y);},b4StartDrag:function(x,y){this.showFrame(x,y);},b4EndDrag:function(e){YAHOO.util.Dom.setStyle(this.getDragEl(),"visibility","hidden");},endDrag:function(e){var DOM=YAHOO.util.Dom;var lel=this.getEl();var del=this.getDragEl();DOM.setStyle(del,"visibility","");DOM.setStyle(lel,"visibility","hidden");YAHOO.util.DDM.moveToEl(lel,del);DOM.setStyle(del,"visibility","hidden");DOM.setStyle(lel,"visibility","");},toString:function(){return ("DDProxy "+this.id);}});YAHOO.util.DDTarget=function(id,_160,_161){if(id){this.initTarget(id,_160,_161);}};YAHOO.extend(YAHOO.util.DDTarget,YAHOO.util.DragDrop,{toString:function(){return ("DDTarget "+this.id);}}); YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_header:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded',_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(id) {this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b) {this._use_default_post_header=b;},setPollingInterval:function(i) {if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId) {var obj,http;try {http=new XMLHttpRequest();obj={conn:http,tId:transactionId};} catch(e) {for(var i=0;i=200&&httpStatus<300){try {responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);} else{callback.success.apply(callback.scope,[responseObject]);}}} catch(e){}} else{try {switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);} else{callback.failure.apply(callback.scope,[responseObject]);}} break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);} else{callback.failure.apply(callback.scope,[responseObject]);}}}} catch(e){}} this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg) {var obj={};var headerObj={};try {var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i');if(typeof secureUri=='boolean'){io.src='javascript:false';} else if(typeof secureURI=='string'){io.src=secureUri;}} else{var io=document.createElement('iframe');io.id=frameId;io.name=frameId;} io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},appendPostData:function(postData) {var formElements=new Array();var postMessage=postData.split('&');for(var i=0;i0){try {for(var i=0;i0)?val:0;}YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);}var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;}return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';}return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;}start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i0&&isFinite(tweak)){if(tween.currentFrame+tweak>=frames){tweak=frames-(frame+1);}tween.currentFrame+=tweak;}};};YAHOO.util.Bezier=new function(){this.getPosition=function(points,t){var n=points.length;var tmp=[];for(var i=0;i0&&!(control[0]instanceof Array)){control=[control];}else{var tmp=[];for(i=0,len=control.length;i0){this.runtimeAttributes[attr]=this.runtimeAttributes[attr].concat(control);}this.runtimeAttributes[attr][this.runtimeAttributes[attr].length]=end;}else{superclass.setRuntimeAttribute.call(this,attr);}};var translateValues=function(val,start){var pageXY=Y.Dom.getXY(this.getEl());val=[val[0]-pageXY[0]+start[0],val[1]-pageXY[1]+start[1]];return val;};var isset=function(prop){return(typeof prop!=='undefined');};})();(function(){YAHOO.util.Scroll=function(el,attributes,duration,method){if(el){YAHOO.util.Scroll.superclass.constructor.call(this,el,attributes,duration,method);}};YAHOO.extend(YAHOO.util.Scroll,YAHOO.util.ColorAnim);var Y=YAHOO.util;var superclass=Y.Scroll.superclass;var proto=Y.Scroll.prototype;proto.toString=function(){var el=this.getEl();var id=el.id||el.tagName;return("Scroll "+id);};proto.doMethod=function(attr,start,end){var val=null;if(attr=='scroll'){val=[this.method(this.currentFrame,start[0],end[0]-start[0],this.totalFrames),this.method(this.currentFrame,start[1],end[1]-start[1],this.totalFrames)];}else{val=superclass.doMethod.call(this,attr,start,end);}return val;};proto.getAttribute=function(attr){var val=null;var el=this.getEl();if(attr=='scroll'){val=[el.scrollLeft,el.scrollTop];}else{val=superclass.getAttribute.call(this,attr);}return val;};proto.setAttribute=function(attr,val,unit){var el=this.getEl();if(attr=='scroll'){el.scrollLeft=val[0];el.scrollTop=val[1];}else{superclass.setAttribute.call(this,attr,val,unit);}};})(); /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.3 */ YAHOO.util.Connect={_msxml_progid:['MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'],_http_header:{},_has_http_headers:false,_use_default_post_header:true,_default_post_header:'application/x-www-form-urlencoded',_isFormSubmit:false,_isFileUpload:false,_formNode:null,_sFormData:null,_poll:{},_timeOut:{},_polling_interval:50,_transaction_id:0,setProgId:function(id) {this._msxml_progid.unshift(id);},setDefaultPostHeader:function(b) {this._use_default_post_header=b;},setPollingInterval:function(i) {if(typeof i=='number'&&isFinite(i)){this._polling_interval=i;}},createXhrObject:function(transactionId) {var obj,http;try {http=new XMLHttpRequest();obj={conn:http,tId:transactionId};} catch(e) {for(var i=0;i=200&&httpStatus<300){try {responseObject=this.createResponseObject(o,callback.argument);if(callback.success){if(!callback.scope){callback.success(responseObject);} else{callback.success.apply(callback.scope,[responseObject]);}}} catch(e){}} else{try {switch(httpStatus){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:responseObject=this.createExceptionObject(o.tId,callback.argument,(isAbort?isAbort:false));if(callback.failure){if(!callback.scope){callback.failure(responseObject);} else{callback.failure.apply(callback.scope,[responseObject]);}} break;default:responseObject=this.createResponseObject(o,callback.argument);if(callback.failure){if(!callback.scope){callback.failure(responseObject);} else{callback.failure.apply(callback.scope,[responseObject]);}}}} catch(e){}} this.releaseObject(o);responseObject=null;},createResponseObject:function(o,callbackArg) {var obj={};var headerObj={};try {var headerStr=o.conn.getAllResponseHeaders();var header=headerStr.split('\n');for(var i=0;i');if(typeof secureUri=='boolean'){io.src='javascript:false';} else{io.src=secureUri;}} else{var io=document.createElement('IFRAME');io.id=frameId;io.name=frameId;} io.style.position='absolute';io.style.top='-1000px';io.style.left='-1000px';document.body.appendChild(io);},uploadFile:function(id,callback,uri){var frameId='yuiIO'+id;var io=document.getElementById(frameId);this._formNode.action=uri;this._formNode.enctype='multipart/form-data';this._formNode.method='POST';this._formNode.target=frameId;this._formNode.submit();this._formNode=null;this._isFileUpload=false;this._isFormSubmit=false;var uploadCallback=function() {var obj={};obj.tId=id;obj.responseText=io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:null;obj.responseXML=io.contentWindow.document.XMLDocument?io.contentWindow.document.XMLDocument:io.contentWindow.document;obj.argument=callback.argument;if(callback.upload){if(!callback.scope){callback.upload(obj);} else{callback.upload.apply(callback.scope,[obj]);}} if(YAHOO.util.Event){YAHOO.util.Event.removeListener(io,"load",uploadCallback);} else if(window.ActiveXObject){io.detachEvent('onload',uploadCallback);} else{io.removeEventListener('load',uploadCallback,false);} setTimeout(function(){document.body.removeChild(io);},100);};if(YAHOO.util.Event){YAHOO.util.Event.addListener(io,"load",uploadCallback);} else if(window.ActiveXObject){io.attachEvent('onload',uploadCallback);} else{io.addEventListener('load',uploadCallback,false);}},abort:function(o,callback,isTimeout) {if(this.isCallInProgress(o)){o.conn.abort();window.clearInterval(this._poll[o.tId]);delete this._poll[o.tId];if(isTimeout){delete this._timeOut[o.tId];} this.handleTransactionResponse(o,callback,true);return true;} else{return false;}},isCallInProgress:function(o) {if(o.conn){return o.conn.readyState!=4&&o.conn.readyState!=0;} else{return false;}},releaseObject:function(o) {o.conn=null;o=null;}}; /* Copyright (c) 2006, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.txt Version: 0.11.3 */ YAHOO.util.Config=function(owner){if(owner){this.init(owner);}};YAHOO.util.Config.prototype={owner:null,configChangedEvent:null,queueInProgress:false,addProperty:function(key,propertyObject){},getConfig:function(){},getProperty:function(key){},resetProperty:function(key){},setProperty:function(key,value,silent){},queueProperty:function(key,value){},refireEvent:function(key){},applyConfig:function(userConfig,init){},refresh:function(){},fireQueue:function(){},subscribeToConfigEvent:function(key,handler,obj,override){},unsubscribeFromConfigEvent:function(key,handler,obj){},checkBoolean:function(val){if(typeof val=='boolean'){return true;}else{return false;}},checkNumber:function(val){if(isNaN(val)){return false;}else{return true;}}};YAHOO.util.Config.prototype.init=function(owner){this.owner=owner;this.configChangedEvent=new YAHOO.util.CustomEvent("configChanged");this.queueInProgress=false;var config={};var initialConfig={};var eventQueue=[];var fireEvent=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){property.event.fire(value);}};this.addProperty=function(key,propertyObject){key=key.toLowerCase();config[key]=propertyObject;propertyObject.event=new YAHOO.util.CustomEvent(key);propertyObject.key=key;if(propertyObject.handler){propertyObject.event.subscribe(propertyObject.handler,this.owner,true);} this.setProperty(key,propertyObject.value,true);if(!propertyObject.suppressEvent){this.queueProperty(key,propertyObject.value);}};this.getConfig=function(){var cfg={};for(var prop in config){var property=config[prop];if(typeof property!='undefined'&&property.event){cfg[prop]=property.value;}} return cfg;};this.getProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){return property.value;}else{return undefined;}};this.resetProperty=function(key){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){this.setProperty(key,initialConfig[key].value);}else{return undefined;}};this.setProperty=function(key,value,silent){key=key.toLowerCase();if(this.queueInProgress&&!silent){this.queueProperty(key,value);return true;}else{var property=config[key];if(typeof property!='undefined'&&property.event){if(property.validator&&!property.validator(value)){return false;}else{property.value=value;if(!silent){fireEvent(key,value);this.configChangedEvent.fire([key,value]);} return true;}}else{return false;}}};this.queueProperty=function(key,value){key=key.toLowerCase();var property=config[key];if(typeof property!='undefined'&&property.event){if(typeof value!='undefined'&&property.validator&&!property.validator(value)){return false;}else{if(typeof value!='undefined'){property.value=value;}else{value=property.value;} var foundDuplicate=false;for(var i=0;irightConstraint){x=rightConstraint;} if(ybottomConstraint){y=bottomConstraint;} this.cfg.setProperty("x",x,true);this.cfg.setProperty("y",y,true);this.cfg.setProperty("xy",[x,y],true);};YAHOO.widget.Overlay.prototype.center=function(){var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft;var scrollY=document.documentElement.scrollTop||document.body.scrollTop;var viewPortWidth=YAHOO.util.Dom.getClientWidth();var viewPortHeight=YAHOO.util.Dom.getClientHeight();var elementWidth=this.element.offsetWidth;var elementHeight=this.element.offsetHeight;var x=(viewPortWidth/2)-(elementWidth/2)+scrollX;var y=(viewPortHeight/2)-(elementHeight/2)+scrollY;this.element.style.left=parseInt(x,10)+"px";this.element.style.top=parseInt(y,10)+"px";this.syncPosition();this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.syncPosition=function(){var pos=YAHOO.util.Dom.getXY(this.element);this.cfg.setProperty("x",pos[0],true);this.cfg.setProperty("y",pos[1],true);this.cfg.setProperty("xy",pos,true);};YAHOO.widget.Overlay.prototype.onDomResize=function(e,obj){YAHOO.widget.Overlay.superclass.onDomResize.call(this,e,obj);this.cfg.refireEvent("iframe");};YAHOO.widget.Overlay.prototype.destroy=function(){if(this.iframe){this.iframe.parentNode.removeChild(this.iframe);} this.iframe=null;YAHOO.widget.Overlay.superclass.destroy.call(this);};YAHOO.widget.Overlay.prototype.toString=function(){return"Overlay "+this.id;};YAHOO.widget.Overlay.windowScrollEvent=new YAHOO.util.CustomEvent("windowScroll");YAHOO.widget.Overlay.windowResizeEvent=new YAHOO.util.CustomEvent("windowResize");YAHOO.widget.Overlay.windowScrollHandler=function(e){YAHOO.widget.Overlay.windowScrollEvent.fire();};YAHOO.widget.Overlay.windowResizeHandler=function(e){YAHOO.widget.Overlay.windowResizeEvent.fire();};YAHOO.widget.Overlay._initialized=null;if(YAHOO.widget.Overlay._initialized===null){YAHOO.util.Event.addListener(window,"scroll",YAHOO.widget.Overlay.windowScrollHandler);YAHOO.util.Event.addListener(window,"resize",YAHOO.widget.Overlay.windowResizeHandler);YAHOO.widget.Overlay._initialized=true;} YAHOO.widget.OverlayManager=function(userConfig){this.init(userConfig);};YAHOO.widget.OverlayManager.CSS_FOCUSED="focused";YAHOO.widget.OverlayManager.prototype={constructor:YAHOO.widget.OverlayManager,overlays:null,initDefaultConfig:function(){this.cfg.addProperty("overlays",{suppressEvent:true});this.cfg.addProperty("focusevent",{value:"mousedown"});},getActive:function(){},focus:function(overlay){},remove:function(overlay){},blurAll:function(){},init:function(userConfig){this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();if(userConfig){this.cfg.applyConfig(userConfig,true);} this.cfg.fireQueue();var activeOverlay=null;this.getActive=function(){return activeOverlay;};this.focus=function(overlay){var o=this.find(overlay);if(o){this.blurAll();activeOverlay=o;YAHOO.util.Dom.addClass(activeOverlay.element,YAHOO.widget.OverlayManager.CSS_FOCUSED);this.overlays.sort(this.compareZIndexDesc);var topZIndex=YAHOO.util.Dom.getStyle(this.overlays[0].element,"zIndex");if(!isNaN(topZIndex)&&this.overlays[0]!=overlay){activeOverlay.cfg.setProperty("zIndex",(parseInt(topZIndex,10)+2));} this.overlays.sort(this.compareZIndexDesc);}};this.remove=function(overlay){var o=this.find(overlay);if(o){var originalZ=YAHOO.util.Dom.getStyle(o.element,"zIndex");o.cfg.setProperty("zIndex",-1000,true);this.overlays.sort(this.compareZIndexDesc);this.overlays=this.overlays.slice(0,this.overlays.length-1);o.cfg.setProperty("zIndex",originalZ,true);o.cfg.setProperty("manager",null);o.focusEvent=null;o.blurEvent=null;o.focus=null;o.blur=null;}};this.blurAll=function(){activeOverlay=null;for(var o=0;o0){return true;}}else{return false;}},find:function(overlay){if(overlay instanceof YAHOO.widget.Overlay){for(var o=0;ozIndex2){return-1;}else if(zIndex1";this.body.innerHTML+=formHTML;form=this.element.getElementsByTagName("FORM")[0];} this.firstFormElement=function(){for(var f=0;f=0;f--){var el=form.elements[f];if(el.focus){if(el.type&&el.type!="hidden"){return el;}}} return null;}();this.form=form;if(this.cfg.getProperty("modal")&&this.form){var me=this;var firstElement=this.firstFormElement||this.firstButton;if(firstElement){this.preventBackTab=new YAHOO.util.KeyListener(firstElement,{shift:true,keys:9},{fn:me.focusLast,scope:me,correctScope:true});this.showEvent.subscribe(this.preventBackTab.enable,this.preventBackTab,true);this.hideEvent.subscribe(this.preventBackTab.disable,this.preventBackTab,true);} var lastElement=this.lastButton||this.lastFormElement;if(lastElement){this.preventTabOut=new YAHOO.util.KeyListener(lastElement,{shift:false,keys:9},{fn:me.focusFirst,scope:me,correctScope:true});this.showEvent.subscribe(this.preventTabOut.enable,this.preventTabOut,true);this.hideEvent.subscribe(this.preventTabOut.disable,this.preventTabOut,true);}}};YAHOO.widget.Dialog.prototype.configButtons=function(type,args,obj){var buttons=args[0];if(buttons!="none"){this.buttonSpan=null;this.buttonSpan=document.createElement("SPAN");this.buttonSpan.className="button-group";for(var b=0;b";};YAHOO.widget.SimpleDialog.prototype.configIcon=function(type,args,obj){var icon=args[0];if(icon&&icon!="none"){var iconHTML="";this.body.innerHTML=iconHTML+this.body.innerHTML;}};YAHOO.widget.SimpleDialog.prototype.configText=function(type,args,obj){var text=args[0];if(text){this.setBody(text);this.cfg.refireEvent("icon");}};YAHOO.widget.SimpleDialog.prototype.toString=function(){return"SimpleDialog "+this.id;};YAHOO.widget.ContainerEffect=function(overlay,attrIn,attrOut,targetElement,animClass){if(!animClass){animClass=YAHOO.util.Anim;} this.overlay=overlay;this.attrIn=attrIn;this.attrOut=attrOut;this.targetElement=targetElement||overlay.element;this.animClass=animClass;};YAHOO.widget.ContainerEffect.prototype.init=function(){this.beforeAnimateInEvent=new YAHOO.util.CustomEvent("beforeAnimateIn");this.beforeAnimateOutEvent=new YAHOO.util.CustomEvent("beforeAnimateOut");this.animateInCompleteEvent=new YAHOO.util.CustomEvent("animateInComplete");this.animateOutCompleteEvent=new YAHOO.util.CustomEvent("animateOutComplete");this.animIn=new this.animClass(this.targetElement,this.attrIn.attributes,this.attrIn.duration,this.attrIn.method);this.animIn.onStart.subscribe(this.handleStartAnimateIn,this);this.animIn.onTween.subscribe(this.handleTweenAnimateIn,this);this.animIn.onComplete.subscribe(this.handleCompleteAnimateIn,this);this.animOut=new this.animClass(this.targetElement,this.attrOut.attributes,this.attrOut.duration,this.attrOut.method);this.animOut.onStart.subscribe(this.handleStartAnimateOut,this);this.animOut.onTween.subscribe(this.handleTweenAnimateOut,this);this.animOut.onComplete.subscribe(this.handleCompleteAnimateOut,this);};YAHOO.widget.ContainerEffect.prototype.animateIn=function(){this.beforeAnimateInEvent.fire();this.animIn.animate();};YAHOO.widget.ContainerEffect.prototype.animateOut=function(){this.beforeAnimateOutEvent.fire();this.animOut.animate();};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateIn=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleStartAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleTweenAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.handleCompleteAnimateOut=function(type,args,obj){};YAHOO.widget.ContainerEffect.prototype.toString=function(){var output="ContainerEffect";if(this.overlay){output+=" ["+this.overlay.toString()+"]";} return output;};YAHOO.widget.ContainerEffect.FADE=function(overlay,dur){var fade=new YAHOO.widget.ContainerEffect(overlay,{attributes:{opacity:{from:0,to:1}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{opacity:{to:0}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element);fade.handleStartAnimateIn=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(!obj.overlay.underlay){obj.overlay.cfg.refireEvent("underlay");} if(obj.overlay.underlay){obj.initialUnderlayOpacity=YAHOO.util.Dom.getStyle(obj.overlay.underlay,"opacity");obj.overlay.underlay.style.filter=null;} YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","visible");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",0);};fade.handleCompleteAnimateIn=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;} if(obj.overlay.underlay){YAHOO.util.Dom.setStyle(obj.overlay.underlay,"opacity",obj.initialUnderlayOpacity);} obj.overlay.cfg.refireEvent("iframe");obj.animateInCompleteEvent.fire();};fade.handleStartAnimateOut=function(type,args,obj){YAHOO.util.Dom.addClass(obj.overlay.element,"hide-select");if(obj.overlay.underlay){obj.overlay.underlay.style.filter=null;}};fade.handleCompleteAnimateOut=function(type,args,obj){YAHOO.util.Dom.removeClass(obj.overlay.element,"hide-select");if(obj.overlay.element.style.filter){obj.overlay.element.style.filter=null;} YAHOO.util.Dom.setStyle(obj.overlay.element,"visibility","hidden");YAHOO.util.Dom.setStyle(obj.overlay.element,"opacity",1);obj.overlay.cfg.refireEvent("iframe");obj.animateOutCompleteEvent.fire();};fade.init();return fade;};YAHOO.widget.ContainerEffect.SLIDE=function(overlay,dur){var x=overlay.cfg.getProperty("x")||YAHOO.util.Dom.getX(overlay.element);var y=overlay.cfg.getProperty("y")||YAHOO.util.Dom.getY(overlay.element);var clientWidth=YAHOO.util.Dom.getClientWidth();var offsetWidth=overlay.element.offsetWidth;var slide=new YAHOO.widget.ContainerEffect(overlay,{attributes:{points:{to:[x,y]}},duration:dur,method:YAHOO.util.Easing.easeIn},{attributes:{points:{to:[(clientWidth+25),y]}},duration:dur,method:YAHOO.util.Easing.easeOut},overlay.element,YAHOO.util.Motion);slide.handleStartAnimateIn=function(type,args,obj){obj.overlay.element.style.left=(-25-offsetWidth)+"px";obj.overlay.element.style.top=y+"px";};slide.handleTweenAnimateIn=function(type,args,obj){var pos=YAHOO.util.Dom.getXY(obj.overlay.element);var currentX=pos[0];var currentY=pos[1];if(YAHOO.util.Dom.getStyle(obj.overlay.element,"visibility")=="hidden"&¤tX0){var i=this._aListElements.length-1;do{_1f=this._aListElements[i].firstChild;do{switch(_1f.tagName){case "LI":this.addItem(new this.ITEM_TYPE(_1f),i);break;}}while((_1f=_1f.nextSibling));}while(i--);}break;case "SELECT":_1f=this.srcElement.firstChild;do{switch(_1f.tagName){case "OPTGROUP":case "OPTION":this.addItem(new this.ITEM_TYPE(_1f));break;}}while((_1f=_1f.nextSibling));break;}};YAHOO.widget.MenuModule.prototype._getFirstEnabledItem=function(){var _21=this._aItemGroups.length;var _22;var _23;for(var i=0;i<_21;i++){_23=this._aItemGroups[i];if(_23){var _25=_23.length;for(var n=0;n<_25;n++){_22=_23[n];if(!_22.cfg.getProperty("disabled")&&_22.element.style.display!="none"){return _22;}_22=null;}}}};YAHOO.widget.MenuModule.prototype._checkPosition=function(_27){if(typeof _27=="string"){var _28=_27.toLowerCase();return ("dynamic,static".indexOf(_28)!=-1);}};YAHOO.widget.MenuModule.prototype._addItemToGroup=function(_29,_2a,_2b){var Dom=this._oDom;var _2d;if(_2a instanceof this.ITEM_TYPE){_2d=_2a;}else{if(typeof _2a=="string"){_2d=new this.ITEM_TYPE(_2a);}}if(_2d){var _2e=Dom.generateId();_2d.element.setAttribute("yuiid",_2e);YAHOO.widget.MenuModule._menuItems[_2e]=_2d;var _2f=typeof _29=="number"?_29:0;var _30=this._getItemGroup(_2f);var _31;if(!_30){_30=this._createItemGroup(_2f);}if(typeof _2b=="number"){var _32=(_2b>=_30.length);if(_30[_2b]){_30.splice(_2b,0,_2d);}else{_30[_2b]=_2d;}_31=_30[_2b];if(_31){if(_32&&(!_31.element.parentNode||_31.element.parentNode.nodeType==11)){this._aListElements[_2f].appendChild(_31.element);}else{function getNextItemSibling(_33,_34){return (_33[_34]||getNextItemSibling(_33,(_34+1)));}var _35=getNextItemSibling(_30,(_2b+1));if(_35&&(!_31.element.parentNode||_31.element.parentNode.nodeType==11)){this._aListElements[_2f].insertBefore(_31.element,_35.element);}}_31.parent=this;this._subscribeToItemEvents(_31);this._configureItemSubmenuModule(_31);this._updateItemProperties(_2f);return _31;}}else{var _36=_30.length;_30[_36]=_2d;_31=_30[_36];if(_31){if(!Dom.isAncestor(this._aListElements[_2f],_31.element)){this._aListElements[_2f].appendChild(_31.element);}_31.element.setAttribute("groupindex",_2f);_31.element.setAttribute("index",_36);_31.parent=this;_31.index=_36;_31.groupIndex=_2f;this._subscribeToItemEvents(_31);this._configureItemSubmenuModule(_31);if(_36===0){Dom.addClass(_31.element,"first-of-type");}return _31;}}}};YAHOO.widget.MenuModule.prototype._removeItemFromGroupByIndex=function(_37,_38){var _39=typeof _37=="number"?_37:0;var _3a=this._getItemGroup(_39);if(_3a){var _3b=_3a.splice(_38,1);var _3c=_3b[0];if(_3c){this._updateItemProperties(_39);if(_3a.length===0){var oUL=this._aListElements[_39];if(this.body&&oUL){this.body.removeChild(oUL);}this._aItemGroups.splice(_39,1);this._aListElements.splice(_39,1);oUL=this._aListElements[0];if(oUL){this._oDom.addClass(oUL,"first-of-type");}}return _3c;}}};YAHOO.widget.MenuModule.prototype._removeItemFromGroupByValue=function(_3e,_3f){var _40=this._getItemGroup(_3e);if(_40){var _41=_40.length;var _42=-1;if(_41>0){var i=_41-1;do{if(_40[i]==_3f){_42=i;break;}}while(i--);if(_42>-1){return this._removeItemFromGroupByIndex(_3e,_42);}}}};YAHOO.widget.MenuModule.prototype._updateItemProperties=function(_44){var _45=this._getItemGroup(_44);var _46=_45.length;if(_46>0){var Dom=this._oDom;var i=_46-1;var _49;var oLI;do{_49=_45[i];if(_49){oLI=_49.element;_49.index=i;_49.groupIndex=_44;oLI.setAttribute("groupindex",_44);oLI.setAttribute("index",i);Dom.removeClass(oLI,"first-of-type");}}while(i--);if(oLI){Dom.addClass(oLI,"first-of-type");}}};YAHOO.widget.MenuModule.prototype._createItemGroup=function(_4b){if(!this._aItemGroups[_4b]){this._aItemGroups[_4b]=[];var oUL=document.createElement("ul");this._aListElements[_4b]=oUL;return this._aItemGroups[_4b];}};YAHOO.widget.MenuModule.prototype._getItemGroup=function(_4d){var _4e=((typeof _4d=="number")?_4d:0);return this._aItemGroups[_4e];};YAHOO.widget.MenuModule.prototype._configureItemSubmenuModule=function(_4f){var _50=_4f.cfg.getProperty("submenu");if(_50){this.cfg.configChangedEvent.subscribe(this._onParentMenuModuleConfigChange,_50,true);this.renderEvent.subscribe(this._onParentMenuModuleRender,_50,true);_50.beforeShowEvent.subscribe(this._onSubmenuBeforeShow,_50,true);_50.showEvent.subscribe(this._onSubmenuShow,_50,true);_50.hideEvent.subscribe(this._onSubmenuHide,_50,true);}};YAHOO.widget.MenuModule.prototype._subscribeToItemEvents=function(_51){var _52=[this,_51];_51.focusEvent.subscribe(this._onItemFocus,_52);_51.blurEvent.subscribe(this._onItemBlur,_52);_51.cfg.configChangedEvent.subscribe(this._onItemConfigChange,_52);};YAHOO.widget.MenuModule.prototype._getOffsetWidth=function(){var _53=this.element.cloneNode(true);this._oDom.setStyle(_53,"width","");document.body.appendChild(_53);var _54=_53.offsetWidth;document.body.removeChild(_53);return _54;};YAHOO.widget.MenuModule.prototype._onInit=function(_55,_56,_57){var _58=(this.cfg.getProperty("position")=="static")?"static":"absolute";this._oDom.setStyle(this.element,"position",_58);};YAHOO.widget.MenuModule.prototype._onBeforeRender=function(_59,_5a,_5b){var Dom=this._oDom;var _5d=this.cfg;var oEl=this.element;var _5f=this._aListElements.length;if(_5d.getProperty("position")=="static"){_5d.queueProperty("iframe",false);_5d.queueProperty("visible",true);}if(_5f>0){var i=0;var _61=true;var oUL;var _63;do{oUL=this._aListElements[i];if(oUL){if(_61){Dom.addClass(oUL,"first-of-type");_61=false;}if(!Dom.isAncestor(oEl,oUL)){this.appendToBody(oUL);}_63=this._aGroupTitleElements[i];if(_63){if(!Dom.isAncestor(oEl,_63)){oUL.parentNode.insertBefore(_63,oUL);}Dom.addClass(oUL,"hastitle");}}i++;}while(i<_5f);}};YAHOO.widget.MenuModule.prototype._onRender=function(_64,_65,_66){if(this.cfg.getProperty("position")=="dynamic"){var _67=this.element.parentNode.tagName=="BODY"?this.element.offsetWidth:this._getOffsetWidth();this.cfg.setProperty("width",(_67+"px"));}};YAHOO.widget.MenuModule.prototype._onShow=function(_68,_69,_6a){this.setInitialFocus();};YAHOO.widget.MenuModule.prototype._onBeforeHide=function(_6b,_6c,_6d){var _6e=this.activeItem;if(_6e){_6e.blur();if(_6e.cfg.getProperty("selected")){_6e.cfg.setProperty("selected",false);}var _6f=_6e.cfg.getProperty("submenu");if(_6f&&_6f.cfg.getProperty("visible")){_6f.hide();}}};YAHOO.widget.MenuModule.prototype._onParentMenuModuleConfigChange=function(_70,_71,_72){var _73=_71[0][0];var _74=_71[0][1];switch(_73){case "iframe":case "constraintoviewport":_72.cfg.setProperty(_73,_74);break;}};YAHOO.widget.MenuModule.prototype._onParentMenuModuleRender=function(_75,_76,_77){var _78=_77.parent.parent;var _79={constraintoviewport:_78.cfg.getProperty("constraintoviewport"),xy:[0,0]};if(this.cfg.getProperty("position")==_78.cfg.getProperty("position")){_79.iframe=_78.cfg.getProperty("iframe");}_77.cfg.applyConfig(_79);if(this._oDom.inDocument(this.element)){this.render();}else{this.render(this.parent.element);}};YAHOO.widget.MenuModule.prototype._onSubmenuBeforeShow=function(_7a,_7b,_7c){var _7d=this.parent;var _7e=_7d.parent.cfg.getProperty("submenualignment");this.cfg.setProperty("context",[_7d.element,_7e[0],_7e[1]]);_7d.submenuIndicator.alt=_7d.EXPANDED_SUBMENU_INDICATOR_ALT_TEXT;};YAHOO.widget.MenuModule.prototype._onSubmenuShow=function(_7f,_80,_81){var _82=this.parent;_82.submenuIndicator.alt=_82.EXPANDED_SUBMENU_INDICATOR_ALT_TEXT;};YAHOO.widget.MenuModule.prototype._onSubmenuHide=function(_83,_84,_85){var _86=this.parent;if(_86.parent.cfg.getProperty("visible")){_86.cfg.setProperty("selected",false);_86.focus();}_86.submenuIndicator.alt=_86.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;};YAHOO.widget.MenuModule.prototype._onItemFocus=function(_87,_88,_89){var me=_89[0];var _8b=_89[1];me.activeItem=_8b;};YAHOO.widget.MenuModule.prototype._onItemBlur=function(_8c,_8d,_8e){var me=_8e[0];var _90=_8e[1];var _91=_90.cfg.getProperty("submenu");if(!_91||(_91&&!_91.cfg.getProperty("visible"))){me.activeItem=null;}};YAHOO.widget.MenuModule.prototype._onItemConfigChange=function(_92,_93,_94){var me=_94[0];var _96=_93[0][0];var _97=_94[1];switch(_96){case "submenu":var _98=_93[0][1];if(_98){me._configureItemSubmenuModule(_97);}break;case "text":case "helptext":if(me.element.style.width){var _99=me._getOffsetWidth()+"px";me._oDom.setStyle(me.element,"width",_99);}break;}};YAHOO.widget.MenuModule.prototype.enforceConstraints=function(_9a,_9b,obj){var Dom=this._oDom;var _9e=this.cfg;var pos=_9b[0];var x=pos[0];var y=pos[1];var bod=document.getElementsByTagName("body")[0];var htm=document.getElementsByTagName("html")[0];var _a4=Dom.getStyle(bod,"overflow");var _a5=Dom.getStyle(htm,"overflow");var _a6=this.element.offsetHeight;var _a7=this.element.offsetWidth;var _a8=Dom.getClientWidth();var _a9=Dom.getClientHeight();var _aa=window.scrollX||document.body.scrollLeft;var _ab=window.scrollY||document.body.scrollTop;var _ac=_ab+10;var _ad=_aa+10;var _ae=_ab+_a9-_a6-10;var _af=_aa+_a8-_a7-10;var _b0=_9e.getProperty("context");var _b1=_b0?_b0[0]:null;if(x<10){x=_ad;}else{if((x+_a7)>_a8){if(_b1&&((x-_b1.offsetWidth)>_a7)){x=(x-(_b1.offsetWidth+_a7));}else{x=_af;}}}if(y<10){y=_ac;}else{if(y>_ae){if(_b1&&(y>_a6)){y=((y+_b1.offsetHeight)-_a6);}else{y=_ae;}}}_9e.setProperty("x",x,true);_9e.setProperty("y",y,true);};YAHOO.widget.MenuModule.prototype.configPosition=function(_b2,_b3,_b4){var _b5=_b3[0]=="static"?"static":"absolute";this._oDom.setStyle(this.element,"position",_b5);};YAHOO.widget.MenuModule.prototype.configIframe=function(_b6,_b7,_b8){if(this.cfg.getProperty("position")=="dynamic"){YAHOO.widget.MenuModule.superclass.configIframe.call(this,_b6,_b7,_b8);}};YAHOO.widget.MenuModule.prototype.toString=function(){return ("Menu "+this.id);};YAHOO.widget.MenuModule.prototype.setItemGroupTitle=function(_b9,_ba){if(typeof _b9=="string"&&_b9.length>0){var Dom=this._oDom;var _bc=typeof _ba=="number"?_ba:0;var _bd=this._aGroupTitleElements[_bc];if(_bd){_bd.innerHTML=_b9;}else{_bd=document.createElement(this.GROUP_TITLE_TAG_NAME);_bd.innerHTML=_b9;this._aGroupTitleElements[_bc]=_bd;}var i=this._aGroupTitleElements.length-1;var _bf;do{if(this._aGroupTitleElements[i]){Dom.removeClass(this._aGroupTitleElements[i],"first-of-type");_bf=i;}}while(i--);if(_bf!==null){Dom.addClass(this._aGroupTitleElements[_bf],"first-of-type");}}};YAHOO.widget.MenuModule.prototype.addItem=function(_c0,_c1){if(_c0){return this._addItemToGroup(_c1,_c0);}};YAHOO.widget.MenuModule.prototype.insertItem=function(_c2,_c3,_c4){if(_c2){return this._addItemToGroup(_c4,_c2,_c3);}};YAHOO.widget.MenuModule.prototype.removeItem=function(_c5,_c6){if(typeof _c5!="undefined"){var _c7;if(_c5 instanceof YAHOO.widget.MenuModuleItem){_c7=this._removeItemFromGroupByValue(_c6,_c5);}else{if(typeof _c5=="number"){_c7=this._removeItemFromGroupByIndex(_c6,_c5);}}if(_c7){_c7.destroy();return _c7;}}};YAHOO.widget.MenuModule.prototype.getItemGroups=function(){return this._aItemGroups;};YAHOO.widget.MenuModule.prototype.getItem=function(_c8,_c9){if(typeof _c8=="number"){var _ca=this._getItemGroup(_c9);if(_ca){return _ca[_c8];}}};YAHOO.widget.MenuModule.prototype.destroy=function(){this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();var _cb=this._aItemGroups.length;var _cc;var _cd;var _ce;var i;var n;if(_cb>0){i=_cb-1;do{_cd=this._aItemGroups[i];if(_cd){_cc=_cd.length;if(_cc>0){n=_cc-1;do{_ce=this._aItemGroups[i][n];if(_ce){_ce.destroy();}}while(n--);}}}while(i--);}YAHOO.widget.MenuModule.superclass.destroy.call(this);};YAHOO.widget.MenuModule.prototype.setInitialFocus=function(){var _d1=this._getFirstEnabledItem();if(_d1){_d1.focus();}};YAHOO.widget.MenuModule.prototype.setInitialSelection=function(){var _d2=this._getFirstEnabledItem();if(_d2){_d2.cfg.setProperty("selected",true);}};YAHOO.widget.MenuModule.prototype.clearActiveItem=function(){if(this.activeItem){var _d3=this.activeItem.cfg;_d3.setProperty("selected",false);var _d4=_d3.getProperty("submenu");if(_d4){_d4.hide();}}};YAHOO.widget.MenuModule.prototype.initDefaultConfig=function(){YAHOO.widget.MenuModule.superclass.initDefaultConfig.call(this);var _d5=this.cfg;_d5.addProperty("position",{value:"dynamic",handler:this.configPosition,validator:this._checkPosition});_d5.addProperty("submenualignment",{value:["tl","tr"]});};YAHOO.widget.MenuModuleItem=function(_d6,_d7){if(_d6){this.init(_d6,_d7);}};YAHOO.widget.MenuModuleItem.prototype={SUBMENU_INDICATOR_IMAGE_PATH:"js/yui/menu/assets/menuarorght8_nrm_1.gif",SELECTED_SUBMENU_INDICATOR_IMAGE_PATH:"js/yui/menu/assets/menuarorght8_hov_1.gif",DISABLED_SUBMENU_INDICATOR_IMAGE_PATH:"js/yui/menu/assets/menuarorght8_dim_1.gif",COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT:"Collapsed. Click to expand.",EXPANDED_SUBMENU_INDICATOR_ALT_TEXT:"Expanded. Click to collapse.",DISABLED_SUBMENU_INDICATOR_ALT_TEXT:"Disabled.",CSS_CLASS_NAME:"yuimenuitem",SUBMENU_TYPE:null,SUBMENU_ITEM_TYPE:null,IMG_ROOT:"http://shared.indycar.com/",IMG_ROOT_SSL:"/shared/",_oAnchor:null,_oText:null,_oHelpTextEM:null,_oSubmenu:null,_oDom:YAHOO.util.Dom,_bFiredMouseOverEvent:false,_bFiredMouseOutEvent:false,constructor:YAHOO.widget.MenuModuleItem,imageRoot:null,isSecure:YAHOO.widget.Module.prototype.isSecure,index:null,groupIndex:null,parent:null,element:null,srcElement:null,value:null,submenuIndicator:null,browser:YAHOO.widget.Module.prototype.browser,destroyEvent:null,mouseOverEvent:null,mouseOutEvent:null,mouseDownEvent:null,mouseUpEvent:null,clickEvent:null,keyPressEvent:null,keyDownEvent:null,keyUpEvent:null,focusEvent:null,blurEvent:null,init:function(_d8,_d9){this.imageRoot=(this.isSecure)?this.IMG_ROOT_SSL:this.IMG_ROOT;if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.MenuModule;}if(!this.SUBMENU_ITEM_TYPE){this.SUBMENU_ITEM_TYPE=YAHOO.widget.MenuModuleItem;}this.cfg=new YAHOO.util.Config(this);this.initDefaultConfig();var _da=this.cfg;if(this._checkString(_d8)){this._createRootNodeStructure();_da.setProperty("text",_d8);}else{if(this._checkDOMNode(_d8)){switch(_d8.tagName){case "OPTION":this._createRootNodeStructure();_da.setProperty("text",_d8.text);this.srcElement=_d8;break;case "OPTGROUP":this._createRootNodeStructure();_da.setProperty("text",_d8.label);this.srcElement=_d8;this._initSubTree();break;case "LI":var _db=this._getFirstElement(_d8,"A");var _dc="#";var _dd=null;var _de=null;if(_db){_dc=_db.getAttribute("href");_dd=_db.getAttribute("target");if(_db.innerText){_de=_db.innerText;}else{var _df=_db.ownerDocument.createRange();_df.selectNodeContents(_db);_de=_df.toString();}}else{var _e0=_d8.firstChild;_de=_e0.nodeValue;_db=document.createElement("a");_db.setAttribute("href",_dc);_d8.replaceChild(_db,_e0);_db.appendChild(_e0);}this.srcElement=_d8;this.element=_d8;this._oAnchor=_db;var _e1=this._getFirstElement(_db);var _e2=false;var _e3=false;if(_e1){this._oText=_e1.firstChild;switch(_e1.tagName){case "EM":_e2=true;break;case "STRONG":_e3=true;break;}}else{this._oText=_db.firstChild;}_da.setProperty("text",_de,true);_da.setProperty("url",_dc,true);_da.setProperty("target",_dd,true);_da.setProperty("emphasis",_e2,true);_da.setProperty("strongemphasis",_e3,true);this._initSubTree();break;}}}if(this.element){this._oDom.addClass(this.element,this.CSS_CLASS_NAME);var _e4=YAHOO.util.CustomEvent;this.destroyEvent=new _e4("destroyEvent",this);this.mouseOverEvent=new _e4("mouseOverEvent",this);this.mouseOutEvent=new _e4("mouseOutEvent",this);this.mouseDownEvent=new _e4("mouseDownEvent",this);this.mouseUpEvent=new _e4("mouseUpEvent",this);this.clickEvent=new _e4("clickEvent",this);this.keyPressEvent=new _e4("keyPressEvent",this);this.keyDownEvent=new _e4("keyDownEvent",this);this.keyUpEvent=new _e4("keyUpEvent",this);this.focusEvent=new _e4("focusEvent",this);this.blurEvent=new _e4("blurEvent",this);this.clickEvent.subscribe(this._onMenuModuleItemClick,this,true);if(_d9){_da.applyConfig(_d9);}_da.fireQueue();}},_getFirstElement:function(_e5,_e6){var _e7;if(_e5.firstChild&&_e5.firstChild.nodeType==1){_e7=_e5.firstChild;}else{if(_e5.firstChild&&_e5.firstChild.nextSibling&&_e5.firstChild.nextSibling.nodeType==1){_e7=_e5.firstChild.nextSibling;}}if(_e6){return (_e7&&_e7.tagName==_e6)?_e7:false;}return _e7;},_checkString:function(_e8){return (typeof _e8=="string");},_checkDOMNode:function(_e9){return (_e9&&_e9.tagName);},_createRootNodeStructure:function(){this.element=document.createElement("li");this._oText=document.createTextNode("");this._oAnchor=document.createElement("a");this._oAnchor.appendChild(this._oText);this.cfg.refireEvent("url");this.element.appendChild(this._oAnchor);},_initSubTree:function(){var _ea=this.SUBMENU_TYPE;var _eb=this.SUBMENU_ITEM_TYPE;var _ec=this.srcElement;var _ed=this.cfg;if(_ec.childNodes.length>0){var _ee=_ec.firstChild;var _ef=[];do{switch(_ee.tagName){case "DIV":_ed.setProperty("submenu",(new _ea(_ee)));break;case "OPTION":_ef[_ef.length]=_ee;break;}}while((_ee=_ee.nextSibling));var _f0=_ef.length;if(_f0>0){_ed.setProperty("submenu",(new _ea(this._oDom.generateId())));for(var n=0;n<_f0;n++){this._oSubmenu.addItem((new _eb(_ef[n])));}}}},_onMenuModuleItemClick:function(_f2,_f3,_f4){var _f5=YAHOO.util.Event;var _f6=_f3[0];var _f7=_f5.getTarget(_f6);var _f8=this.cfg.getProperty("submenu");if(_f7==this.submenuIndicator&&_f8){if(_f8.cfg.getProperty("visible")){_f8.hide();}else{var _f9=this.parent.activeItem;if(_f9&&_f9!=this){this.parent.clearActiveItem();}this.parent.activeItem=this;this.cfg.setProperty("selected",true);_f8.show();}}else{var _fa=this.cfg.getProperty("url");var _fb=(_fa.substr((_fa.length-1),1)=="#");var _fc=this.cfg.getProperty("target");var _fd=(_fc&&_fc.length>0);if(_f7.tagName=="A"&&_fb&&!_fd){_f5.preventDefault(_f6);}if(_f7.tagName!="A"&&!_fb&&!_fd){document.location=_fa;}}},configText:function(_fe,_ff,_100){var _101=_ff[0];if(this._oText){this._oText.nodeValue=_101;}},configHelpText:function(_102,_103,_104){var me=this;var Dom=this._oDom;var _107=_103[0];var oEl=this.element;var _109=this.cfg;var _10a=[oEl,this._oAnchor];var oImg=this.submenuIndicator;function initHelpText(){Dom.addClass(_10a,"hashelptext");if(_109.getProperty("disabled")){_109.refireEvent("disabled");}if(_109.getProperty("selected")){_109.refireEvent("selected");}}function removeHelpText(){Dom.removeClass(_10a,"hashelptext");oEl.removeChild(me._oHelpTextEM);me._oHelpTextEM=null;}if(this._checkDOMNode(_107)){if(this._oHelpTextEM){this._oHelpTextEM.parentNode.replaceChild(_107,this._oHelpTextEM);}else{this._oHelpTextEM=_107;oEl.insertBefore(this._oHelpTextEM,oImg);}initHelpText();}else{if(this._checkString(_107)){if(_107.length===0){removeHelpText();}else{if(!this._oHelpTextEM){this._oHelpTextEM=document.createElement("em");oEl.insertBefore(this._oHelpTextEM,oImg);}this._oHelpTextEM.innerHTML=_107;initHelpText();}}else{if(!_107&&this._oHelpTextEM){removeHelpText();}}}},configURL:function(_10c,_10d,_10e){var sURL=_10d[0];if(!sURL){sURL="#";}this._oAnchor.setAttribute("href",sURL);},configTarget:function(_110,_111,_112){var _113=_111[0];var _114=this._oAnchor;if(_113&&_113.length>0){_114.setAttribute("target",_113);}else{_114.removeAttribute("target");}},configEmphasis:function(_115,_116,_117){var _118=_116[0];var _119=this._oAnchor;var _11a=this._oText;var _11b=this.cfg;var oEM;if(_118&&_11b.getProperty("strongemphasis")){_11b.setProperty("strongemphasis",false);}if(_119){if(_118){oEM=document.createElement("em");oEM.appendChild(_11a);_119.appendChild(oEM);}else{oEM=this._getFirstElement(_119,"EM");_119.removeChild(oEM);_119.appendChild(_11a);}}},configStrongEmphasis:function(_11d,_11e,_11f){var _120=_11e[0];var _121=this._oAnchor;var _122=this._oText;var _123=this.cfg;var _124;if(_120&&_123.getProperty("emphasis")){_123.setProperty("emphasis",false);}if(_121){if(_120){_124=document.createElement("strong");_124.appendChild(_122);_121.appendChild(_124);}else{_124=this._getFirstElement(_121,"STRONG");_121.removeChild(_124);_121.appendChild(_122);}}},configDisabled:function(_125,_126,_127){var _128=_126[0];var Dom=this._oDom;var _12a=this._oAnchor;var _12b=[this.element,_12a];var oEM=this._oHelpTextEM;var _12d=this.cfg;var oImg=this.submenuIndicator;var _12f;var _130;if(oEM){_12b[2]=oEM;}if(_128){if(_12d.getProperty("selected")){_12d.setProperty("selected",false);}_12a.removeAttribute("href");Dom.addClass(_12b,"disabled");_12f=this.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH;_130=this.DISABLED_SUBMENU_INDICATOR_ALT_TEXT;}else{_12a.setAttribute("href",_12d.getProperty("url"));Dom.removeClass(_12b,"disabled");_12f=this.SUBMENU_INDICATOR_IMAGE_PATH;_130=this.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;}if(oImg){oImg.src=this.imageRoot+_12f;oImg.alt=_130;}},configSelected:function(_131,_132,_133){if(!this.cfg.getProperty("disabled")){var Dom=this._oDom;var _135=_132[0];var oEM=this._oHelpTextEM;var _137=[this.element,this._oAnchor];var oImg=this.submenuIndicator;var _139;if(oEM){_137[_137.length]=oEM;}if(oImg){_137[_137.length]=oImg;}if(_135){Dom.addClass(_137,"selected");_139=this.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH;}else{Dom.removeClass(_137,"selected");_139=this.SUBMENU_INDICATOR_IMAGE_PATH;}if(oImg){oImg.src=document.images[(this.imageRoot+_139)].src;}}},configSubmenu:function(_13a,_13b,_13c){var Dom=this._oDom;var oEl=this.element;var _13f=_13b[0];var oImg=this.submenuIndicator;var _141=this.cfg;var _142=[this.element,this._oAnchor];if(_13f){_13f.parent=this;this._oSubmenu=_13f;if(!oImg){var me=this;function preloadImage(_144){var _145=me.imageRoot+_144;if(!document.images[_145]){var _146=document.createElement("img");_146.src=_145;_146.name=_145;_146.id=_145;_146.style.display="none";document.body.appendChild(_146);}}preloadImage(this.SUBMENU_INDICATOR_IMAGE_PATH);preloadImage(this.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH);preloadImage(this.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH);oImg=document.createElement("img");oImg.src=(this.imageRoot+this.SUBMENU_INDICATOR_IMAGE_PATH);oImg.alt=this.COLLAPSED_SUBMENU_INDICATOR_ALT_TEXT;oEl.appendChild(oImg);this.submenuIndicator=oImg;Dom.addClass(_142,"hassubmenu");if(_141.getProperty("disabled")){_141.refireEvent("disabled");}if(_141.getProperty("selected")){_141.refireEvent("selected");}}}else{Dom.removeClass(_142,"hassubmenu");if(oImg){oEl.removeChild(oImg);}if(this._oSubmenu){this._oSubmenu.destroy();}}},initDefaultConfig:function(){var _147=this.cfg;var _148=_147.checkBoolean;_147.addProperty("text",{value:"",handler:this.configText,validator:this._checkString,suppressEvent:true});_147.addProperty("helptext",{handler:this.configHelpText});_147.addProperty("url",{value:"#",handler:this.configURL,suppressEvent:true});_147.addProperty("target",{handler:this.configTarget,suppressEvent:true});_147.addProperty("emphasis",{value:false,handler:this.configEmphasis,validator:_148,suppressEvent:true});_147.addProperty("strongemphasis",{value:false,handler:this.configStrongEmphasis,validator:_148,suppressEvent:true});_147.addProperty("disabled",{value:false,handler:this.configDisabled,validator:_148,suppressEvent:true});_147.addProperty("selected",{value:false,handler:this.configSelected,validator:_148,suppressEvent:true});_147.addProperty("submenu",{handler:this.configSubmenu});},getNextEnabledSibling:function(){if(this.parent instanceof YAHOO.widget.MenuModule){var _149=this.groupIndex;function getNextArrayItem(_14a,_14b){return _14a[_14b]||getNextArrayItem(_14a,(_14b+1));}var _14c=this.parent.getItemGroups();var _14d;if(this.index<(_14c[_149].length-1)){_14d=getNextArrayItem(_14c[_149],(this.index+1));}else{var _14e;if(_149<(_14c.length-1)){_14e=_149+1;}else{_14e=0;}var _14f=getNextArrayItem(_14c,_14e);_14d=getNextArrayItem(_14f,0);}return (_14d.cfg.getProperty("disabled")||_14d.element.style.display=="none")?_14d.getNextEnabledSibling():_14d;}},getPreviousEnabledSibling:function(){if(this.parent instanceof YAHOO.widget.MenuModule){var _150=this.groupIndex;function getPreviousArrayItem(_151,_152){return _151[_152]||getPreviousArrayItem(_151,(_152-1));}function getFirstItemIndex(_153,_154){return _153[_154]?_154:getFirstItemIndex(_153,(_154+1));}var _155=this.parent.getItemGroups();var _156;if(this.index>getFirstItemIndex(_155[_150],0)){_156=getPreviousArrayItem(_155[_150],(this.index-1));}else{var _157;if(_150>getFirstItemIndex(_155,0)){_157=_150-1;}else{_157=_155.length-1;}var _158=getPreviousArrayItem(_155,_157);_156=getPreviousArrayItem(_158,(_158.length-1));}return (_156.cfg.getProperty("disabled")||_156.element.style.display=="none")?_156.getPreviousEnabledSibling():_156;}},focus:function(){var _159=this.parent;var _15a=this._oAnchor;var _15b=_159.activeItem;if(!this.cfg.getProperty("disabled")&&_159&&_159.cfg.getProperty("visible")&&this.element.style.display!="none"){if(_15b){_15b.blur();}_15a.focus();this.focusEvent.fire();}},blur:function(){var _15c=this.parent;if(!this.cfg.getProperty("disabled")&&_15c&&this._oDom.getStyle(_15c.element,"visibility")=="visible"){this._oAnchor.blur();this.blurEvent.fire();}},destroy:function(){var oEl=this.element;if(oEl){this.mouseOverEvent.unsubscribeAll();this.mouseOutEvent.unsubscribeAll();this.mouseDownEvent.unsubscribeAll();this.mouseUpEvent.unsubscribeAll();this.clickEvent.unsubscribeAll();this.keyPressEvent.unsubscribeAll();this.keyDownEvent.unsubscribeAll();this.keyUpEvent.unsubscribeAll();this.focusEvent.unsubscribeAll();this.blurEvent.unsubscribeAll();this.cfg.configChangedEvent.unsubscribeAll();var _15e=oEl.parentNode;if(_15e){_15e.removeChild(oEl);this.destroyEvent.fire();}this.destroyEvent.unsubscribeAll();}}};YAHOO.widget.Menu=function(_15f,_160){YAHOO.widget.Menu.superclass.constructor.call(this,_15f,_160);};YAHOO.extend(YAHOO.widget.Menu,YAHOO.widget.MenuModule);YAHOO.widget.Menu.prototype.init=function(_161,_162){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuItem;}YAHOO.widget.Menu.superclass.init.call(this,_161);this.beforeInitEvent.fire(YAHOO.widget.Menu);this.showEvent.subscribe(this._onMenuShow,this,true);this.mouseOverEvent.subscribe(this._onMenuMouseOver,this,true);this.keyDownEvent.subscribe(this._onMenuKeyDown,this,true);if(_162){this.cfg.applyConfig(_162,true);}this.initEvent.fire(YAHOO.widget.Menu);};YAHOO.widget.Menu.prototype._onMenuShow=function(_163,_164,_165){var _166=this.parent;if(_166&&_166.parent instanceof YAHOO.widget.Menu){var _167=_166.parent.cfg.getProperty("submenualignment");this.cfg.setProperty("submenualignment",[_167[0],_167[1]]);}};YAHOO.widget.Menu.prototype._onMenuMouseOver=function(_168,_169,_16a){if(this.parent){this.parent.cfg.setProperty("selected",true);}};YAHOO.widget.Menu.prototype._onMenuKeyDown=function(_16b,_16c,_16d){if(this.cfg.getProperty("position")=="dynamic"){var _16e=_16c[0];var _16f=this.parent;if(_16e.keyCode==27){this.hide();if(_16f){_16f.focus();if(_16f.parent instanceof YAHOO.widget.Menu){_16f.cfg.setProperty("selected",true);}YAHOO.util.Event.preventDefault(_16e);}}}};YAHOO.widget.Menu.prototype.onDomResize=function(e,obj){if(!this._handleResize){this._handleResize=true;return;}var me=this;var _173=this.cfg;if(_173.getProperty("position")=="dynamic"){_173.setProperty("width",(this._getOffsetWidth()+"px"));if(this.parent&&_173.getProperty("visible")){function align(){me.align();}window.setTimeout(align,0);}}YAHOO.widget.Menu.superclass.onDomResize.call(this,e,obj);};YAHOO.widget.MenuItem=function(_174,_175){YAHOO.widget.MenuItem.superclass.constructor.call(this,_174,_175);};YAHOO.extend(YAHOO.widget.MenuItem,YAHOO.widget.MenuModuleItem);YAHOO.widget.MenuItem.prototype.init=function(_176,_177){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}if(!this.SUBMENU_ITEM_TYPE){this.SUBMENU_ITEM_TYPE=YAHOO.widget.MenuItem;}YAHOO.widget.MenuItem.superclass.init.call(this,_176);this.keyDownEvent.subscribe(this._onKeyDown,this,true);this.mouseOverEvent.subscribe(this._onMouseOver,this,true);this.mouseOutEvent.subscribe(this._onMouseOut,this,true);this.clickEvent.subscribe(this._onClick,this,true);var _178=this.cfg;if(_177){_178.applyConfig(_177,true);}_178.fireQueue();};YAHOO.widget.MenuItem.prototype.CHECKED_IMAGE_PATH="nt/ic/ut/bsc/menuchk8_nrm_1.gif";YAHOO.widget.MenuItem.prototype.SELECTED_CHECKED_IMAGE_PATH="nt/ic/ut/bsc/menuchk8_hov_1.gif";YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_IMAGE_PATH="nt/ic/ut/bsc/menuchk8_dim_1.gif";YAHOO.widget.MenuItem.prototype.CHECKED_IMAGE_ALT_TEXT="Checked.";YAHOO.widget.MenuItem.prototype.DISABLED_CHECKED_IMAGE_ALT_TEXT="Checked. (Item disabled.)";YAHOO.widget.MenuItem.prototype._checkImage=null;YAHOO.widget.MenuItem.prototype._onKeyDown=function(_179,_17a,_17b){var _17c=YAHOO.util.Event;var _17d=_17a[0];var _17e=this.parent;var _17f=this.cfg;var _180;switch(_17d.keyCode){case 38:case 40:if(this==_17e.activeItem&&!_17f.getProperty("selected")){_17f.setProperty("selected",true);}else{var _181=(_17d.keyCode==38)?this.getPreviousEnabledSibling():this.getNextEnabledSibling();if(_181){_17e.clearActiveItem();_181.cfg.setProperty("selected",true);_181.focus();}}_17c.preventDefault(_17d);break;case 39:_17e.clearActiveItem();_17f.setProperty("selected",true);this.focus();var _182=_17f.getProperty("submenu");if(_182){_182.show();_182.setInitialSelection();}else{if(YAHOO.widget.MenuBarItem&&_17e.parent&&_17e.parent instanceof YAHOO.widget.MenuBarItem){_17e.hide();_180=_17e.parent;if(_180){_180.focus();_180.cfg.setProperty("selected",true);}}}_17c.preventDefault(_17d);break;case 37:if(_17e.parent){_17e.hide();_180=_17e.parent;if(_180){_180.focus();_180.cfg.setProperty("selected",true);}}_17c.preventDefault(_17d);break;}};YAHOO.widget.MenuItem.prototype._onMouseOver=function(_183,_184,_185){var _186=this.parent;var _187=this.cfg;var _188=_186.activeItem;if(_188&&_188!=this){_186.clearActiveItem();}_187.setProperty("selected",true);this.focus();var _189=_187.getProperty("submenu");if(_189){_189.show();}};YAHOO.widget.MenuItem.prototype._onMouseOut=function(_18a,_18b,_18c){var _18d=this.cfg;var _18e=_18d.getProperty("submenu");_18d.setProperty("selected",false);if(_18e){var _18f=_18b[0];var _190=YAHOO.util.Event.getRelatedTarget(_18f);if(!(_190==_18e.element||YAHOO.util.Dom.isAncestor(_18e.element,_190))){_18e.hide();}}};YAHOO.widget.MenuItem.prototype._onClick=function(_191,_192,_193){function findRoot(_194){var _195=_194.parent;if(_195){var _196=_195.parent;if(_196&&(_196 instanceof YAHOO.widget.Menu)&&_196.cfg.getProperty("position")=="dynamic"){return findRoot(_196);}}return _194;}var _197=findRoot(this.parent);var sURL=this.cfg.getProperty("url");if((sURL.substr((sURL.length-1),1)=="#")&&_197&&_197.cfg.getProperty("position")=="dynamic"){_197.hide();}};YAHOO.widget.MenuItem.prototype.configChecked=function(_199,_19a,_19b){var Dom=YAHOO.util.Dom;var _19d=_19a[0];var oEl=this.element;var _19f=this.cfg;var oImg;if(_19d){var me=this;function preloadImage(_1a2){var _1a3=me.imageRoot+_1a2;if(!document.images[_1a3]){var _1a4=document.createElement("img");_1a4.src=_1a3;_1a4.name=_1a3;_1a4.id=_1a3;_1a4.style.display="none";document.body.appendChild(_1a4);}}preloadImage(this.CHECKED_IMAGE_PATH);preloadImage(this.SELECTED_CHECKED_IMAGE_PATH);preloadImage(this.DISABLED_CHECKED_IMAGE_PATH);oImg=document.createElement("img");oImg.src=(this.imageRoot+this.CHECKED_IMAGE_PATH);oImg.alt=this.CHECKED_IMAGE_ALT_TEXT;var _1a5=this.cfg.getProperty("submenu");if(_1a5){oEl.insertBefore(oImg,_1a5.element);}else{oEl.appendChild(oImg);}Dom.addClass([oEl,oImg],"checked");this._checkImage=oImg;if(_19f.getProperty("disabled")){_19f.refireEvent("disabled");}if(_19f.getProperty("selected")){_19f.refireEvent("selected");}}else{oImg=this._checkImage;Dom.removeClass([oEl,oImg],"checked");if(oImg){oEl.removeChild(oImg);}this._checkImage=null;}};YAHOO.widget.MenuItem.prototype.configSelected=function(_1a6,_1a7,_1a8){YAHOO.widget.MenuItem.superclass.configSelected.call(this,_1a6,_1a7,_1a8);var _1a9=this.cfg;if(!_1a9.getProperty("disabled")&&_1a9.getProperty("checked")){var _1aa=_1a7[0];var sSrc=this.imageRoot+(_1aa?this.SELECTED_CHECKED_IMAGE_PATH:this.CHECKED_IMAGE_PATH);this._checkImage.src=document.images[sSrc].src;}};YAHOO.widget.MenuItem.prototype.configDisabled=function(_1ac,_1ad,_1ae){YAHOO.widget.MenuItem.superclass.configDisabled.call(this,_1ac,_1ad,_1ae);if(this.cfg.getProperty("checked")){var _1af=_1ad[0];var sAlt=this.CHECKED_IMAGE_ALT_TEXT;var sSrc=this.CHECKED_IMAGE_PATH;var oImg=this._checkImage;if(_1af){sAlt=this.DISABLED_CHECKED_IMAGE_ALT_TEXT;sSrc=this.DISABLED_CHECKED_IMAGE_PATH;}oImg.src=document.images[(this.imageRoot+sSrc)].src;oImg.alt=sAlt;}};YAHOO.widget.MenuItem.prototype.initDefaultConfig=function(){YAHOO.widget.MenuItem.superclass.initDefaultConfig.call(this);this.cfg.addProperty("checked",{value:false,handler:this.configChecked,validator:this.cfg.checkBoolean,suppressEvent:true,supercedes:["disabled"]});};YAHOO.widget.ContextMenu=function(_1b3,_1b4){YAHOO.widget.ContextMenu.superclass.constructor.call(this,_1b3,_1b4);};YAHOO.extend(YAHOO.widget.ContextMenu,YAHOO.widget.Menu);YAHOO.widget.ContextMenu._aMenus=[];YAHOO.widget.ContextMenu.prototype._oTrigger=null;YAHOO.widget.ContextMenu.prototype.contextEventTarget=null;YAHOO.widget.ContextMenu.prototype.init=function(_1b5,_1b6){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.ContextMenuItem;}YAHOO.widget.ContextMenu.superclass.init.call(this,_1b5);this.beforeInitEvent.fire(YAHOO.widget.ContextMenu);if(_1b6){this.cfg.applyConfig(_1b6,true);}this.initEvent.fire(YAHOO.widget.ContextMenu);var _1b7=YAHOO.widget.ContextMenu._aMenus;_1b7[_1b7.length]=this;};YAHOO.widget.ContextMenu.prototype._onDocumentClick=function(_1b8,_1b9){this.hide();};YAHOO.widget.ContextMenu.prototype._onTriggerClick=function(_1ba,_1bb){if(_1ba.ctrlKey){YAHOO.util.Event.stopEvent(_1ba);}};YAHOO.widget.ContextMenu.prototype._onTriggerContextMenu=function(_1bc,_1bd){var _1be=YAHOO.util.Event;var _1bf=this.cfg;var _1c0=YAHOO.widget.ContextMenu._aMenus;var i=_1c0.length-1;do{_1c0[i].hide();}while(i--);if(_1bc.type=="mousedown"&&!_1bc.ctrlKey){return;}this.contextEventTarget=_1be.getTarget(_1bc);var nX=_1be.getPageX(_1bc);var nY=_1be.getPageY(_1bc);_1bf.applyConfig({xy:[nX,nY],visible:true});_1bf.fireQueue();_1be.stopEvent(_1bc);};YAHOO.widget.ContextMenu.prototype.initDefaultConfig=function(){YAHOO.widget.ContextMenu.superclass.initDefaultConfig.call(this);this.cfg.addProperty("trigger",{handler:this.configTrigger});};YAHOO.widget.ContextMenu.prototype.configTrigger=function(_1c4,_1c5,_1c6){var _1c7=YAHOO.util.Event;var _1c8=_1c5[0];if(_1c8){if(this._oTrigger){_1c7.purgeElement(this._oTrigger);}this._oTrigger=_1c8;var _1c9=(this.browser=="opera");_1c7.addListener(_1c8,(_1c9?"mousedown":"contextmenu"),this._onTriggerContextMenu,this,true);if(_1c9){_1c7.addListener(_1c8,"click",this._onTriggerClick,this,true);}_1c7.addListener(document,"click",this._onDocumentClick,this,true);}};YAHOO.widget.ContextMenuItem=function(_1ca,_1cb){YAHOO.widget.ContextMenuItem.superclass.constructor.call(this,_1ca,_1cb);};YAHOO.extend(YAHOO.widget.ContextMenuItem,YAHOO.widget.MenuItem);YAHOO.widget.ContextMenuItem.prototype.init=function(_1cc,_1cd){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.ContextMenu;}if(!this.SUBMENU_ITEM_TYPE){this.SUBMENU_ITEM_TYPE=YAHOO.widget.ContextMenuItem;}YAHOO.widget.ContextMenuItem.superclass.init.call(this,_1cc);var _1ce=this.cfg;if(_1cd){_1ce.applyConfig(_1cd,true);}_1ce.fireQueue();};YAHOO.widget.MenuBar=function(_1cf,_1d0){YAHOO.widget.MenuBar.superclass.constructor.call(this,_1cf,_1d0);};YAHOO.extend(YAHOO.widget.MenuBar,YAHOO.widget.MenuModule);YAHOO.widget.MenuBar.prototype.init=function(_1d1,_1d2){if(!this.ITEM_TYPE){this.ITEM_TYPE=YAHOO.widget.MenuBarItem;}YAHOO.widget.MenuBar.superclass.init.call(this,_1d1);this.beforeInitEvent.fire(YAHOO.widget.MenuBar);var _1d3=this.cfg;if(!_1d2||(_1d2&&!_1d2.position)){_1d3.queueProperty("position","static");}if(!_1d2||(_1d2&&!_1d2.submenualignment)){_1d3.queueProperty("submenualignment",["tl","bl"]);}if(_1d2){_1d3.applyConfig(_1d2,true);}this.initEvent.fire(YAHOO.widget.MenuBar);};YAHOO.widget.MenuBar.prototype.CSS_CLASS_NAME="yuimenubar";YAHOO.widget.MenuBarItem=function(_1d4,_1d5){YAHOO.widget.MenuBarItem.superclass.constructor.call(this,_1d4,_1d5);};YAHOO.extend(YAHOO.widget.MenuBarItem,YAHOO.widget.MenuModuleItem);YAHOO.widget.MenuBarItem.prototype.init=function(_1d6,_1d7){if(!this.SUBMENU_TYPE){this.SUBMENU_TYPE=YAHOO.widget.Menu;}if(!this.SUBMENU_ITEM_TYPE){this.SUBMENU_ITEM_TYPE=YAHOO.widget.MenuItem;}YAHOO.widget.MenuBarItem.superclass.init.call(this,_1d6);this.keyDownEvent.subscribe(this._onKeyDown,this,true);var _1d8=this.cfg;if(_1d7){_1d8.applyConfig(_1d7,true);}_1d8.fireQueue();};YAHOO.widget.MenuBarItem.prototype.CSS_CLASS_NAME="yuimenubaritem";YAHOO.widget.MenuBarItem.prototype.SUBMENU_INDICATOR_IMAGE_PATH="js/yui/menu/assets/menuarodwn8_nrm_1.gif";YAHOO.widget.MenuBarItem.prototype.SELECTED_SUBMENU_INDICATOR_IMAGE_PATH="js/yui/menu/assets/menuarodwn8_hov_1.gif";YAHOO.widget.MenuBarItem.prototype.DISABLED_SUBMENU_INDICATOR_IMAGE_PATH="js/yui/menu/assets/menuarodwn8_dim_1.gif";YAHOO.widget.MenuBarItem.prototype._onKeyDown=function(_1d9,_1da,_1db){var _1dc=YAHOO.util.Event;var _1dd=_1da[0];var _1de=this.cfg;var _1df=this.parent;switch(_1dd.keyCode){case 37:case 39:if(this==_1df.activeItem&&!_1de.getProperty("selected")){_1de.setProperty("selected",true);}else{var _1e0=(_1dd.keyCode==37)?this.getPreviousEnabledSibling():this.getNextEnabledSibling();if(_1e0){_1df.clearActiveItem();_1e0.cfg.setProperty("selected",true);_1e0.focus();}}_1dc.preventDefault(_1dd);break;case 40:_1df.clearActiveItem();_1de.setProperty("selected",true);this.focus();var _1e1=_1de.getProperty("submenu");if(_1e1){_1e1.show();_1e1.setInitialSelection();}_1dc.preventDefault(_1dd);break;}};YAHOO.namespace('ext','ext.util','ext.grid');YAHOO.ext.Strict=(document.compatMode=='CSS1Compat');YAHOO.ext.SSL_SECURE_URL='javascript:false';window.undefined=undefined;Function.prototype.createCallback=function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};};Function.prototype.createDelegate=function(obj,args,appendArgs){var method=this;return function(){var callArgs=args||arguments;if(appendArgs===true){callArgs=Array.prototype.slice.call(arguments,0);callArgs=callArgs.concat(args);}else if(typeof appendArgs=='number'){callArgs=Array.prototype.slice.call(arguments,0);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} return method.apply(obj||window,callArgs);};};Function.prototype.defer=function(millis,obj,args,appendArgs){return setTimeout(this.createDelegate(obj,args,appendArgs),millis);};Function.prototype.createSequence=function(fcn,scope){if(typeof fcn!='function'){return this;} var method=this;return function(){var retval=method.apply(this||window,arguments);fcn.apply(scope||this||window,arguments);return retval;};};YAHOO.util.Event.on(window,'unload',function(){delete Function.prototype.createSequence;delete Function.prototype.defer;delete Function.prototype.createDelegate;delete Function.prototype.createCallback;delete Function.prototype.createInterceptor;});Function.prototype.createInterceptor=function(fcn,scope){if(typeof fcn!='function'){return this;} var method=this;return function(){fcn.target=this;fcn.method=method;if(fcn.apply(scope||this||window,arguments)===false){return;} return method.apply(this||window,arguments);;};};YAHOO.ext.util.Browser=new function(){var ua=navigator.userAgent.toLowerCase();this.isOpera=(ua.indexOf('opera')>-1);this.isSafari=(ua.indexOf('webkit')>-1);this.isIE=(window.ActiveXObject);this.isIE7=(ua.indexOf('msie 7')>-1);this.isGecko=!this.isSafari&&(ua.indexOf('gecko')>-1);if(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1){this.isWindows=true;}else if(ua.indexOf("macintosh")!=-1){this.isMac=true;} if(this.isIE&&!this.isIE7){try{document.execCommand("BackgroundImageCache",false,true);}catch(e){}}}();YAHOO.print=function(arg1,arg2,etc){if(!YAHOO.ext._console){var cs=YAHOO.ext.DomHelper.insertBefore(document.body.firstChild,{tag:'div',style:'width:250px;height:350px;overflow:auto;border:3px solid #c3daf9;'+'background:white;position:absolute;right:5px;top:5px;'+'font:normal 8pt arial,verdana,helvetica;z-index:50000;padding:5px;'},true);new YAHOO.ext.Resizable(cs,{transparent:true,handles:'all',pinned:true,adjustments:[0,0],wrap:true,draggable:(YAHOO.util.DD?true:false)});cs.on('dblclick',cs.hide);YAHOO.ext._console=cs;} var msg='';for(var i=0,len=arguments.length;i';} YAHOO.ext._console.dom.innerHTML=msg+YAHOO.ext._console.dom.innerHTML;YAHOO.ext._console.dom.scrollTop=0;YAHOO.ext._console.show();};YAHOO.printf=function(format,arg1,arg2,etc){var args=Array.prototype.slice.call(arguments,1);YAHOO.print(format.replace(/\{\{[^{}]*\}\}|\{(\d+)(,\s*([\w.]+))?\}/g,function(m,a1,a2,a3){if(m.chatAt=='{'){return m.slice(1,-1);} var rpl=args[a1];if(a3){var f=eval(a3);rpl=f(rpl);} return rpl?rpl:'';}));} YAHOO.util.CustomEvent.prototype.fireDirect=function(){var len=this.subscribers.length;for(var i=0;icontainerBottom){c.scrollTop=childBottom-c.clientHeight;} if(restorePos){c.setStyle('position',cp);} return this;},autoHeight:function(animate,duration,onComplete,easing){var oldHeight=this.getHeight();this.clip();this.setHeight(1);setTimeout(function(){var height=parseInt(this.dom.scrollHeight,10);if(!animate){this.setHeight(height);this.unclip();if(typeof onComplete=='function'){onComplete();}}else{this.setHeight(oldHeight);this.setHeight(height,animate,duration,function(){this.unclip();if(typeof onComplete=='function')onComplete();}.createDelegate(this),easing);}}.createDelegate(this),0);return this;},isVisible:function(deep){var vis=YAHOO.util.Dom.getStyle(this.dom,'visibility')!='hidden'&&YAHOO.util.Dom.getStyle(this.dom,'display')!='none';if(!deep||!vis){return vis;} var p=this.dom.parentNode;while(p&&p.tagName.toLowerCase()!='body'){if(YAHOO.util.Dom.getStyle(p,'visibility')=='hidden'||YAHOO.util.Dom.getStyle(p,'display')=='none'){return false;} p=p.parentNode;} return true;},select:function(selector,unique){return YAHOO.ext.Element.select('#'+this.dom.id+' '+selector,unique);},initDD:function(group,config,overrides){var dd=new YAHOO.util.DD(YAHOO.util.Dom.generateId(this.dom),group,config);return YAHOO.ext.util.Config.apply(dd,overrides);},initDDProxy:function(group,config,overrides){var dd=new YAHOO.util.DDProxy(YAHOO.util.Dom.generateId(this.dom),group,config);return YAHOO.ext.util.Config.apply(dd,overrides);},initDDTarget:function(group,config,overrides){var dd=new YAHOO.util.DDTarget(YAHOO.util.Dom.generateId(this.dom),group,config);return YAHOO.ext.util.Config.apply(dd,overrides);},setVisible:function(visible,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){if(this.visibilityMode==YAHOO.ext.Element.DISPLAY){this.setDisplayed(visible);}else{YAHOO.util.Dom.setStyle(this.dom,'visibility',visible?'visible':'hidden');}}else{this.setOpacity(visible?0:1);YAHOO.util.Dom.setStyle(this.dom,'visibility','visible');if(this.visibilityMode==YAHOO.ext.Element.DISPLAY){this.setDisplayed(true);} var args={opacity:{from:(visible?0:1),to:(visible?1:0)}};var anim=new YAHOO.util.Anim(this.dom,args,duration||.35,easing||(visible?YAHOO.util.Easing.easeIn:YAHOO.util.Easing.easeOut));anim.onComplete.subscribe((function(){if(this.visibilityMode==YAHOO.ext.Element.DISPLAY){this.setDisplayed(visible);}else{YAHOO.util.Dom.setStyle(this.dom,'visibility',visible?'visible':'hidden');}}).createDelegate(this));if(onComplete){anim.onComplete.subscribe(onComplete);} anim.animate();} return this;},isDisplayed:function(){return YAHOO.util.Dom.getStyle(this.dom,'display')!='none';},toggle:function(animate,duration,onComplete,easing){this.setVisible(!this.isVisible(),animate,duration,onComplete,easing);return this;},setDisplayed:function(value){if(typeof value=='boolean'){value=value?this.originalDisplay:'none';} YAHOO.util.Dom.setStyle(this.dom,'display',value);return this;},focus:function(){try{this.dom.focus();}catch(e){} return this;},blur:function(){try{this.dom.blur();}catch(e){} return this;},addClass:function(className){if(className instanceof Array){for(var i=0,len=className.length;ithis.getWidth()?YAHOO.util.Easing.easeOut:YAHOO.util.Easing.easeIn));} return this;},setHeight:function(height,animate,duration,onComplete,easing){height=this.adjustHeight(height);if(!animate||!YAHOO.util.Anim){YAHOO.util.Dom.setStyle(this.dom,'height',this.addUnits(height));}else{this.anim({height:{to:height}},duration,onComplete,easing||(height>this.getHeight()?YAHOO.util.Easing.easeOut:YAHOO.util.Easing.easeIn));} return this;},setSize:function(width,height,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){this.setWidth(width);this.setHeight(height);}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({width:{to:width},height:{to:height}},duration,onComplete,easing);} return this;},setBounds:function(x,y,width,height,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){this.setWidth(width);this.setHeight(height);this.setLocation(x,y);}else{width=this.adjustWidth(width);height=this.adjustHeight(height);this.anim({points:{to:[x,y]},width:{to:width},height:{to:height}},duration,onComplete,easing,YAHOO.util.Motion);} return this;},setRegion:function(region,animate,duration,onComplete,easing){this.setBounds(region.left,region.top,region.right-region.left,region.bottom-region.top,animate,duration,onComplete,easing);return this;},addListener:function(eventName,handler,scope,override){YAHOO.util.Event.addListener(this.dom,eventName,handler,scope||this,true);return this;},bufferedListener:function(eventName,fn,scope,millis){var task=new YAHOO.ext.util.DelayedTask();scope=scope||this;var newFn=function(){task.delay(millis||250,fn,scope,Array.prototype.slice.call(arguments,0));} this.addListener(eventName,newFn);return newFn;},addHandler:function(eventName,stopPropagation,handler,scope,override){var fn=YAHOO.ext.Element.createStopHandler(stopPropagation,handler,scope||this,true);YAHOO.util.Event.addListener(this.dom,eventName,fn);return this;},on:function(eventName,handler,scope,override){YAHOO.util.Event.addListener(this.dom,eventName,handler,scope||this,true);return this;},addManagedListener:function(eventName,fn,scope,override){return YAHOO.ext.EventManager.on(this.dom,eventName,fn,scope||this,true);},mon:function(eventName,fn,scope,override){return YAHOO.ext.EventManager.on(this.dom,eventName,fn,scope||this,true);},removeListener:function(eventName,handler,scope){YAHOO.util.Event.removeListener(this.dom,eventName,handler);return this;},removeAllListeners:function(){YAHOO.util.Event.purgeElement(this.dom);return this;},setOpacity:function(opacity,animate,duration,onComplete,easing){if(!animate||!YAHOO.util.Anim){YAHOO.util.Dom.setStyle(this.dom,'opacity',opacity);}else{this.anim({opacity:{to:opacity}},duration,onComplete,easing);} return this;},getLeft:function(local){if(!local){return this.getX();}else{return parseInt(this.getStyle('left'),10)||0;}},getRight:function(local){if(!local){return this.getX()+this.getWidth();}else{return(this.getLeft(true)+this.getWidth())||0;}},getTop:function(local){if(!local){return this.getY();}else{return parseInt(this.getStyle('top'),10)||0;}},getBottom:function(local){if(!local){return this.getY()+this.getHeight();}else{return(this.getTop(true)+this.getHeight())||0;}},setAbsolutePositioned:function(zIndex){this.setStyle('position','absolute');if(zIndex){this.setStyle('z-index',zIndex);} return this;},setRelativePositioned:function(zIndex){this.setStyle('position','relative');if(zIndex){this.setStyle('z-index',zIndex);} return this;},clearPositioning:function(){this.setStyle('position','');this.setStyle('left','');this.setStyle('right','');this.setStyle('top','');this.setStyle('bottom','');return this;},getPositioning:function(){return{'position':this.getStyle('position'),'left':this.getStyle('left'),'right':this.getStyle('right'),'top':this.getStyle('top'),'bottom':this.getStyle('bottom')};},getBorderWidth:function(side){return this.addStyles(side,YAHOO.ext.Element.borders);},getPadding:function(side){return this.addStyles(side,YAHOO.ext.Element.paddings);},setPositioning:function(positionCfg){if(positionCfg.position)this.setStyle('position',positionCfg.position);if(positionCfg.left)this.setLeft(positionCfg.left);if(positionCfg.right)this.setRight(positionCfg.right);if(positionCfg.top)this.setTop(positionCfg.top);if(positionCfg.bottom)this.setBottom(positionCfg.bottom);return this;},setLeftTop:function(left,top){this.dom.style.left=this.addUnits(left);this.dom.style.top=this.addUnits(top);return this;},move:function(direction,distance,animate,duration,onComplete,easing){var xy=this.getXY();direction=direction.toLowerCase();switch(direction){case'l':case'left':this.moveTo(xy[0]-distance,xy[1],animate,duration,onComplete,easing);break;case'r':case'right':this.moveTo(xy[0]+distance,xy[1],animate,duration,onComplete,easing);break;case't':case'top':case'up':this.moveTo(xy[0],xy[1]-distance,animate,duration,onComplete,easing);break;case'b':case'bottom':case'down':this.moveTo(xy[0],xy[1]+distance,animate,duration,onComplete,easing);break;} return this;},clip:function(){if(!this.isClipped){this.isClipped=true;this.originalClip={'o':this.getStyle('overflow'),'x':this.getStyle('overflow-x'),'y':this.getStyle('overflow-y')};this.setStyle('overflow','hidden');this.setStyle('overflow-x','hidden');this.setStyle('overflow-y','hidden');} return this;},unclip:function(){if(this.isClipped){this.isClipped=false;var o=this.originalClip;if(o.o){this.setStyle('overflow',o.o);} if(o.x){this.setStyle('overflow-x',o.x);} if(o.y){this.setStyle('overflow-y',o.y);}} return this;},alignTo:function(element,position,offsets,animate,duration,onComplete,easing){var otherEl=getEl(element);if(!otherEl){return this;} offsets=offsets||[0,0];var r=otherEl.getRegion();position=position.toLowerCase();switch(position){case'bl':this.moveTo(r.left+offsets[0],r.bottom+offsets[1],animate,duration,onComplete,easing);break;case'br':this.moveTo(r.right+offsets[0],r.bottom+offsets[1],animate,duration,onComplete,easing);break;case'tl':this.moveTo(r.left+offsets[0],r.top+offsets[1],animate,duration,onComplete,easing);break;case'tr':this.moveTo(r.right+offsets[0],r.top+offsets[1],animate,duration,onComplete,easing);break;} return this;},clearOpacity:function(){if(window.ActiveXObject){this.dom.style.filter='';}else{this.dom.style.opacity='';this.dom.style['-moz-opacity']='';this.dom.style['-khtml-opacity']='';} return this;},hide:function(animate,duration,onComplete,easing){this.setVisible(false,animate,duration,onComplete,easing);return this;},show:function(animate,duration,onComplete,easing){this.setVisible(true,animate,duration,onComplete,easing);return this;},addUnits:function(size){if(size===''||size=='auto'||typeof size=='undefined'){return size;} if(typeof size=='number'||!YAHOO.ext.Element.unitPattern.test(size)){return size+this.defaultUnit;} return size;},beginMeasure:function(){var el=this.dom;if(el.offsetWidth||el.offsetHeight){return this;} var changed=[];var p=this.dom;while((!el.offsetWidth&&!el.offsetHeight)&&p&&p.tagName&&p.tagName.toLowerCase()!='body'){if(YAHOO.util.Dom.getStyle(p,'display')=='none'){changed.push({el:p,visibility:YAHOO.util.Dom.getStyle(p,'visibility')});p.style.visibility='hidden';p.style.display='block';} p=p.parentNode;} this._measureChanged=changed;return this;},endMeasure:function(){var changed=this._measureChanged;if(changed){for(var i=0,len=changed.length;i';YAHOO.util.Event.onAvailable(id,function(){var hd=document.getElementsByTagName("head")[0];var re=/(?:)((\n|\r|.)*?)(?:<\/script>)/img;var srcRe=/\ssrc=([\'\"])(.*?)\1/i;var match;while(match=re.exec(html)){var srcMatch=match[0].match(srcRe);if(srcMatch&&srcMatch[2]){var s=document.createElement("script");s.src=srcMatch[2];hd.appendChild(s);}else if(match[1]&&match[1].length>0){eval(match[1]);}} var el=document.getElementById(id);if(el){el.parentNode.removeChild(el);} if(typeof callback=='function'){callback();}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/img,'');return this;},load:function(){var um=this.getUpdateManager();um.update.apply(um,arguments);return this;},getUpdateManager:function(){if(!this.updateManager){this.updateManager=new YAHOO.ext.UpdateManager(this);} return this.updateManager;},unselectable:function(){this.dom.unselectable='on';this.swallowEvent('selectstart',true);this.applyStyles('-moz-user-select:none;-khtml-user-select:none;');return this;},getCenterXY:function(offsetScroll){var centerX=Math.round((YAHOO.util.Dom.getViewportWidth()-this.getWidth())/2);var centerY=Math.round((YAHOO.util.Dom.getViewportHeight()-this.getHeight())/2);if(!offsetScroll){return[centerX,centerY];}else{var scrollX=document.documentElement.scrollLeft||document.body.scrollLeft||0;var scrollY=document.documentElement.scrollTop||document.body.scrollTop||0;return[centerX+scrollX,centerY+scrollY];}},center:function(centerIn){if(!centerIn){this.setXY(this.getCenterXY(true));}else{var box=YAHOO.ext.Element.get(centerIn).getBox();this.setXY([box.x+(box.width/2)-(this.getWidth()/2),box.y+(box.height/2)-(this.getHeight()/2)]);} return this;},getChildrenByTagName:function(tagName){var children=this.dom.getElementsByTagName(tagName);var len=children.length;var ce=new Array(len);for(var i=0;i';} return b;} var createDom=function(o,parentNode){var el=d.createElement(o.tag);var useSet=el.setAttribute?true:false;for(var attr in o){if(attr=='tag'||attr=='children'||attr=='html'||attr=='style'||typeof o[attr]=='function')continue;if(attr=='cls'){el.className=o['cls'];}else{if(useSet)el.setAttribute(attr,o[attr]);else el[attr]=o[attr];}} YAHOO.ext.DomHelper.applyStyles(el,o.style);if(o.children){for(var i=0,len=o.children.length;i'+html+'';node=tempTableEl.firstChild.firstChild.firstChild;}else{tempTableEl.innerHTML=''+html+'
';node=tempTableEl.firstChild.firstChild.firstChild.firstChild;} if(where=='beforebegin'){el.parentNode.insertBefore(node,el);return node;}else if(where=='afterbegin'){el.insertBefore(node,el.firstChild);return node;}else if(where=='beforeend'){el.appendChild(node);return node;}else if(where=='afterend'){el.parentNode.insertBefore(node,el.nextSibling);return node;}} this.insertHtml=function(where,el,html){where=where.toLowerCase();if(el.insertAdjacentHTML){var tag=el.tagName.toLowerCase();if(tag=='table'||tag=='tbody'||tag=='tr'){return insertIntoTable(tag,where,el,html);} switch(where){case'beforebegin':el.insertAdjacentHTML(where,html);return el.previousSibling;case'afterbegin':el.insertAdjacentHTML(where,html);return el.firstChild;case'beforeend':el.insertAdjacentHTML(where,html);return el.lastChild;case'afterend':el.insertAdjacentHTML(where,html);return el.nextSibling;} throw'Illegal insertion point -> "'+where+'"';} var range=el.ownerDocument.createRange();var frag;switch(where){case'beforebegin':range.setStartBefore(el);frag=range.createContextualFragment(html);el.parentNode.insertBefore(frag,el);return el.previousSibling;case'afterbegin':if(el.firstChild){range.setStartBefore(el.firstChild);}else{range.selectNodeContents(el);range.collapse(true);} frag=range.createContextualFragment(html);el.insertBefore(frag,el.firstChild);return el.firstChild;case'beforeend':if(el.lastChild){range.setStartAfter(el.lastChild);}else{range.selectNodeContents(el);range.collapse(false);} frag=range.createContextualFragment(html);el.appendChild(frag);return el.lastChild;case'afterend':range.setStartAfter(el);frag=range.createContextualFragment(html);el.parentNode.insertBefore(frag,el.nextSibling);return el.nextSibling;} throw'Illegal insertion point -> "'+where+'"';};this.insertBefore=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.parentNode.insertBefore(newNode,el);}else{var html=createHtml(o);newNode=this.insertHtml('beforeBegin',el,html);} return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.insertAfter=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.parentNode.insertBefore(newNode,el.nextSibling);}else{var html=createHtml(o);newNode=this.insertHtml('afterEnd',el,html);} return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.append=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);var newNode;if(this.useDom){newNode=createDom(o,null);el.appendChild(newNode);}else{var html=createHtml(o);newNode=this.insertHtml('beforeEnd',el,html);} return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;};this.overwrite=function(el,o,returnElement){el=YAHOO.util.Dom.get(el);el.innerHTML=createHtml(o);return returnElement?YAHOO.ext.Element.get(el.firstChild,true):el.firstChild;};this.createTemplate=function(o){var html=createHtml(o);return new YAHOO.ext.DomHelper.Template(html);};}();YAHOO.ext.DomHelper.Template=function(html){this.html=html;};YAHOO.ext.DomHelper.Template.prototype={applyTemplate:function(values){if(this.compiled){return this.compiled(values);} var empty='';var fn=function(match,index){if(typeof values[index]!='undefined'){return values[index];}else{return empty;}} return this.html.replace(this.re,fn);},re:/\{(\w+)\}/g,compile : function(){ var body = ["this.compiled = function(values){ return ['"]; body.push(this.html.replace(this.re, "', values['$1'], '")); body.push("'].join('');};"); eval(body.join('')); return this; },insertBefore:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('beforeBegin',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},insertAfter:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('afterEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},append:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);var newNode=YAHOO.ext.DomHelper.insertHtml('beforeEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;},overwrite:function(el,values,returnElement){el=YAHOO.util.Dom.get(el);el.innerHTML='';var newNode=YAHOO.ext.DomHelper.insertHtml('beforeEnd',el,this.applyTemplate(values));return returnElement?YAHOO.ext.Element.get(newNode,true):newNode;}};YAHOO.ext.Template=YAHOO.ext.DomHelper.Template; YAHOO.ext.EventManager=new function(){var docReadyEvent;var docReadyProcId;var docReadyState=false;this.ieDeferSrc=false;var resizeEvent;var resizeTask;var fireDocReady=function(){if(!docReadyState){docReadyState=true;if(docReadyProcId){clearInterval(docReadyProcId);} if(docReadyEvent){docReadyEvent.fire();}}};var initDocReady=function(){docReadyEvent=new YAHOO.util.CustomEvent('documentready');if(document.addEventListener){YAHOO.util.Event.on(document,"DOMContentLoaded",fireDocReady);}else if(YAHOO.ext.util.Browser.isIE){document.write('');YAHOO.util.Event.on('ie-deferred-loader','readystatechange',function(){if(this.readyState=='complete'){fireDocReady();}});}else if(YAHOO.ext.util.Browser.isSafari){docReadyProcId=setInterval(function(){var rs=document.readyState;if(rs=='loaded'||rs=='complete'){fireDocReady();}},10);} YAHOO.util.Event.on(window,'load',fireDocReady);};this.wrap=function(fn,scope,override){var wrappedFn=function(e){YAHOO.ext.EventObject.setEvent(e);fn.call(override?scope||window:window,YAHOO.ext.EventObject,scope);};return wrappedFn;};this.addListener=function(element,eventName,fn,scope,override){var wrappedFn=this.wrap(fn,scope,override);YAHOO.util.Event.addListener(element,eventName,wrappedFn);return wrappedFn;};this.removeListener=function(element,eventName,wrappedFn){return YAHOO.util.Event.removeListener(element,eventName,wrappedFn);};this.on=this.addListener;this.onDocumentReady=function(fn,scope,override){if(docReadyState){fn.call(override?scope||window:window,scope);return;} if(!docReadyEvent){initDocReady();} docReadyEvent.subscribe(fn,scope,override);} this.onWindowResize=function(fn,scope,override){if(!resizeEvent){resizeEvent=new YAHOO.util.CustomEvent('windowresize');resizeTask=new YAHOO.ext.util.DelayedTask(function(){resizeEvent.fireDirect(YAHOO.util.Dom.getViewportWidth(),YAHOO.util.Dom.getViewportHeight());});YAHOO.util.Event.on(window,'resize',function(){resizeTask.delay(50);});} resizeEvent.subscribe(fn,scope,override);},this.removeResizeListener=function(fn,scope){if(resizeEvent){resizeEvent.unsubscribe(fn,scope);}}};YAHOO.ext.EventObject=new function(){this.browserEvent=null;this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;this.BACKSPACE=8;this.TAB=9;this.RETURN=13;this.ESC=27;this.SPACE=32;this.PAGEUP=33;this.PAGEDOWN=34;this.END=35;this.HOME=36;this.LEFT=37;this.UP=38;this.RIGHT=39;this.DOWN=40;this.DELETE=46;this.F5=116;this.setEvent=function(e){if(e==this){return this;} this.browserEvent=e;if(e){this.button=e.button;this.shiftKey=e.shiftKey;this.ctrlKey=e.ctrlKey;this.altKey=e.altKey;}else{this.button=-1;this.shiftKey=false;this.ctrlKey=false;this.altKey=false;} return this;};this.stopEvent=function(){if(this.browserEvent){YAHOO.util.Event.stopEvent(this.browserEvent);}};this.preventDefault=function(){if(this.browserEvent){YAHOO.util.Event.preventDefault(this.browserEvent);}};this.isNavKeyPress=function(){return(this.browserEvent.keyCode&&this.browserEvent.keyCode>=33&&this.browserEvent.keyCode<=40);};this.stopPropagation=function(){if(this.browserEvent){YAHOO.util.Event.stopPropagation(this.browserEvent);}};this.getCharCode=function(){if(this.browserEvent){return YAHOO.util.Event.getCharCode(this.browserEvent);} return null;};this.getKey=function(){if(this.browserEvent){return this.browserEvent.keyCode||this.browserEvent.charCode;} return null;};this.getPageX=function(){if(this.browserEvent){return YAHOO.util.Event.getPageX(this.browserEvent);} return null;};this.getPageY=function(){if(this.browserEvent){return YAHOO.util.Event.getPageY(this.browserEvent);} return null;};this.getTime=function(){if(this.browserEvent){return YAHOO.util.Event.getTime(this.browserEvent);} return null;};this.getXY=function(){if(this.browserEvent){return YAHOO.util.Event.getXY(this.browserEvent);} return[];};this.getTarget=function(){if(this.browserEvent){return YAHOO.util.Event.getTarget(this.browserEvent);} return null;};this.findTarget=function(className,tagName){if(tagName)tagName=tagName.toLowerCase();if(this.browserEvent){function isMatch(el){if(!el){return false;} if(className&&!YAHOO.util.Dom.hasClass(el,className)){return false;} if(tagName&&el.tagName.toLowerCase()!=tagName){return false;} return true;};var t=this.getTarget();if(!t||isMatch(t)){return t;} var p=t.parentNode;var b=document.body;while(p&&p!=b){if(isMatch(p)){return p;} p=p.parentNode;}} return null;};this.getRelatedTarget=function(){if(this.browserEvent){return YAHOO.util.Event.getRelatedTarget(this.browserEvent);} return null;};this.getWheelDelta=function(){var e=this.browserEvent;var delta=0;if(e.wheelDelta){delta=e.wheelDelta/120;if(window.opera)delta=-delta;}else if(e.detail){delta=-e.detail/3;} return delta;};this.hasModifier=function(){return this.ctrlKey||this.altKey||this.shiftKey;};}(); YAHOO.ext.UpdateManager=function(el,forceNew){el=YAHOO.ext.Element.get(el);if(!forceNew&&el.updateManager){return el.updateManager;} this.el=el;this.defaultUrl=null;this.beforeUpdate=new YAHOO.util.CustomEvent('UpdateManager.beforeUpdate');this.onUpdate=new YAHOO.util.CustomEvent('UpdateManager.onUpdate');this.onFailure=new YAHOO.util.CustomEvent('UpdateManager.onFailure');this.events={'beforeupdate':this.beforeUpdate,'update':this.onUpdate,'failure':this.onFailure};this.sslBlankUrl=YAHOO.ext.UpdateManager.defaults.sslBlankUrl;this.disableCaching=YAHOO.ext.UpdateManager.defaults.disableCaching;this.indicatorText=YAHOO.ext.UpdateManager.defaults.indicatorText;this.showLoadIndicator=YAHOO.ext.UpdateManager.defaults.showLoadIndicator;this.timeout=YAHOO.ext.UpdateManager.defaults.timeout;this.loadScripts=YAHOO.ext.UpdateManager.defaults.loadScripts;this.transaction=null;this.autoRefreshProcId=null;this.refreshDelegate=this.refresh.createDelegate(this);this.updateDelegate=this.update.createDelegate(this);this.formUpdateDelegate=this.formUpdate.createDelegate(this);this.successDelegate=this.processSuccess.createDelegate(this);this.failureDelegate=this.processFailure.createDelegate(this);this.renderer=new YAHOO.ext.UpdateManager.BasicRenderer();};YAHOO.ext.UpdateManager.prototype={fireEvent:YAHOO.ext.util.Observable.prototype.fireEvent,on:YAHOO.ext.util.Observable.prototype.on,addListener:YAHOO.ext.util.Observable.prototype.addListener,delayedListener:YAHOO.ext.util.Observable.prototype.delayedListener,removeListener:YAHOO.ext.util.Observable.prototype.removeListener,purgeListeners:YAHOO.ext.util.Observable.prototype.purgeListeners,bufferedListener:YAHOO.ext.util.Observable.prototype.bufferedListener,getEl:function(){return this.el;},update:function(url,params,callback,discardUrl){if(this.beforeUpdate.fireDirect(this.el,url,params)!==false){if(typeof url=='object'){var cfg=url;url=cfg.url;params=params||cfg.params;callback=callback||cfg.callback;discardUrl=discardUrl||cfg.discardUrl;if(callback&&cfg.scope){callback=callback.createDelegate(cfg.scope);} if(typeof cfg.nocache!='undefined'){this.disableCaching=cfg.nocache};if(typeof cfg.text!='undefined'){this.indicatorText='
'+cfg.text+'
'};if(typeof cfg.scripts!='undefined'){this.loadScripts=cfg.scripts};if(typeof cfg.timeout!='undefined'){this.timeout=cfg.timeout};} this.showLoading();if(!discardUrl){this.defaultUrl=url;} if(typeof url=='function'){url=url();} if(typeof params=='function'){params=params();} if(params&&typeof params!='string'){var buf=[];for(var key in params){if(typeof params[key]!='function'){buf.push(encodeURIComponent(key),'=',encodeURIComponent(params[key]),'&');}} delete buf[buf.length-1];params=buf.join('');} var callback={success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{'url':url,'form':null,'callback':callback,'params':params}};var method=params?'POST':'GET';if(method=='GET'){url=this.prepareUrl(url);} this.transaction=YAHOO.util.Connect.asyncRequest(method,url,callback,params);}},formUpdate:function(form,url,reset,callback){if(this.beforeUpdate.fireDirect(this.el,form,url)!==false){this.showLoading();formEl=YAHOO.util.Dom.get(form);if(typeof url=='function'){url=url();} if(typeof params=='function'){params=params();} url=url||formEl.action;var callback={success:this.successDelegate,failure:this.failureDelegate,timeout:(this.timeout*1000),argument:{'url':url,'form':form,'callback':callback,'reset':reset}};var isUpload=false;var enctype=formEl.getAttribute('enctype');if(enctype&&enctype.toLowerCase()=='multipart/form-data'){isUpload=true;} YAHOO.util.Connect.setForm(form,isUpload,this.sslBlankUrl);this.transaction=YAHOO.util.Connect.asyncRequest('POST',url,callback);}},refresh:function(callback){if(this.defaultUrl==null){return;} this.update(this.defaultUrl,null,callback,true);},startAutoRefresh:function(interval,url,params,callback,refreshNow){if(refreshNow){this.update(url||this.defaultUrl,params,callback,true);} if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);} this.autoRefreshProcId=setInterval(this.update.createDelegate(this,[url||this.defaultUrl,params,callback,true]),interval*1000);},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);}},showLoading:function(){if(this.showLoadIndicator){this.el.update(this.indicatorText);}},prepareUrl:function(url){if(this.disableCaching){var append='_dc='+(new Date().getTime());if(url.indexOf('?')!==-1){url+='&'+append;}else{url+='?'+append;}} return url;},processSuccess:function(response){this.transaction=null;if(response.argument.form&&response.argument.reset){try{response.argument.form.reset();}catch(e){}} if(this.loadScripts){this.renderer.render(this.el,response,this,this.updateComplete.createDelegate(this,[response]));}else{this.renderer.render(this.el,response,this);this.updateComplete(response);}},updateComplete:function(response){this.fireEvent('update',this.el,response);if(typeof response.argument.callback=='function'){response.argument.callback(this.el,true);}},processFailure:function(response){this.transaction=null;this.onFailure.fireDirect(this.el,response);if(typeof response.argument.callback=='function'){response.argument.callback(this.el,false);}},setRenderer:function(renderer){this.renderer=renderer;},getRenderer:function(){return this.renderer;},setDefaultUrl:function(defaultUrl){this.defaultUrl=defaultUrl;},abort:function(){if(this.transaction){YAHOO.util.Connect.abort(this.transaction);}},isUpdating:function(){if(this.transaction){return YAHOO.util.Connect.isCallInProgress(this.transaction);} return false;}};YAHOO.ext.UpdateManager.defaults={timeout:30,loadScripts:false,sslBlankUrl:(YAHOO.ext.SSL_SECURE_URL||'javascript:false'),disableCaching:false,showLoadIndicator:true,indicatorText:'
Loading...
'};YAHOO.ext.UpdateManager.updateElement=function(el,url,params,options){var um=getEl(el,true).getUpdateManager();YAHOO.ext.util.Config.apply(um,options);um.update(url,params,options.callback);} YAHOO.ext.UpdateManager.update=YAHOO.ext.UpdateManager.updateElement;YAHOO.ext.UpdateManager.BasicRenderer=function(){};YAHOO.ext.UpdateManager.BasicRenderer.prototype={render:function(el,response,updateManager,callback){el.update(response.responseText,updateManager.loadScripts,callback);}}; YAHOO.ext.util.JSON=new function(){var useHasOwn={}.hasOwnProperty?true:false;var pad=function(n){return n<10?'0'+n:n;};var m={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};var encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;} c=b.charCodeAt();return'\\u00'+ Math.floor(c/16).toString(16)+ (c%16).toString(16);})+'"';} return'"'+s+'"';};var encodeArray=function(o){var a=['['],b,i,l=o.length,v;for(i=0;i0){animFn.defer((duration/2)*1000,this);}else{if(typeof callback=='function'){callback();}}} animFn.call(this);} this.addAsyncCall(frameFn,0,null,this);};YAHOO.ext.Actor.Action=function(actor,method,args){this.actor=actor;this.method=method;this.args=args;} YAHOO.ext.Actor.Action.prototype={play:function(onComplete){this.method.apply(this.actor||window,this.args);onComplete();}};YAHOO.ext.Actor.AsyncAction=function(actor,method,args,onIndex){YAHOO.ext.Actor.AsyncAction.superclass.constructor.call(this,actor,method,args);this.onIndex=onIndex;this.originalCallback=this.args[onIndex];} YAHOO.extendX(YAHOO.ext.Actor.AsyncAction,YAHOO.ext.Actor.Action);YAHOO.ext.Actor.AsyncAction.prototype.play=function(onComplete){var callbackArg=this.originalCallback?this.originalCallback.createSequence(onComplete):onComplete;this.args[this.onIndex]=callbackArg;this.method.apply(this.actor,this.args);};YAHOO.ext.Actor.PauseAction=function(seconds){this.seconds=seconds;};YAHOO.ext.Actor.PauseAction.prototype={play:function(onComplete){setTimeout(onComplete,this.seconds*1000);}}; YAHOO.ext.Animator=function(){this.actors=[];this.playlist=new YAHOO.ext.Animator.AnimSequence();this.captureDelegate=this.capture.createDelegate(this);this.playDelegate=this.play.createDelegate(this);this.syncing=false;this.stopping=false;this.playing=false;for(var i=0;i=this.sequences.length&&this.onComplete){this.onComplete();}},stop:function(){for(var i=0;i1||objs instanceof Array){var args=arguments.length>1?arguments:objs;for(var i=0,len=args.length;i=this.items.length){return this.add(o,key);} this.items.splice(index,0,o);if(typeof key!='undefined'&&key!=null){this.items[key]=o;this.keys.splice(index,0,key);} this.fireEvent('add',index,o,key);return o;},remove:function(o){var index=this.indexOf(o);this.items.splice(index,1);if(typeof this.keys[index]!='undefined'){var key=this.keys[index];this.keys.splice(index,1);delete this.items[key];} this.fireEvent('remove',o);return o;},removeAt:function(index){this.items.splice(index,1);var key=this.keys[index];if(typeof key!='undefined'){this.keys.splice(index,1);delete this.items[key];} this.fireEvent('remove',o,key);},removeKey:function(key){var o=this.items[key];var index=this.indexOf(o);this.items.splice(index,1);this.keys.splice(index,1);delete this.items[key];this.fireEvent('remove',o,key);},getCount:function(){return this.items.length;},indexOf:function(o){if(!this.items.indexOf){for(var i=0,len=this.items.length;ithis.resizingEl.getX()?YAHOO.ext.SplitBar.LEFT:YAHOO.ext.SplitBar.RIGHT);this.el.setStyle('cursor','e-resize');}else{this.placement=placement||(this.el.getY()>this.resizingEl.getY()?YAHOO.ext.SplitBar.TOP:YAHOO.ext.SplitBar.BOTTOM);this.el.setStyle('cursor','n-resize');} this.events={'resize':this.onMoved,'moved':this.onMoved,'beforeresize':new YAHOO.util.CustomEvent('beforeresize')}} YAHOO.extendX(YAHOO.ext.SplitBar,YAHOO.ext.util.Observable,{onStartProxyDrag:function(x,y){this.fireEvent('beforeresize',this);if(this.useShim){if(!this.shim){this.shim=YAHOO.ext.SplitBar.createShim();} this.shim.setVisible(true);} YAHOO.util.Dom.setStyle(this.proxy,'display','block');var size=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();;this.activeMaxSize=this.getMaximumSize();;var c1=size-this.activeMinSize;var c2=Math.max(this.activeMaxSize-size,0);if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==YAHOO.ext.SplitBar.LEFT?c1:c2,this.placement==YAHOO.ext.SplitBar.LEFT?c2:c1);this.dd.setYConstraint(0,0);}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==YAHOO.ext.SplitBar.TOP?c1:c2,this.placement==YAHOO.ext.SplitBar.TOP?c2:c1);} this.dragSpecs.startSize=size;this.dragSpecs.startPoint=[x,y];YAHOO.util.DDProxy.prototype.b4StartDrag.call(this.dd,x,y);},onEndProxyDrag:function(e){YAHOO.util.Dom.setStyle(this.proxy,'display','none');var endPoint=YAHOO.util.Event.getXY(e);if(this.useShim){this.shim.setVisible(false);} var newSize;if(this.orientation==YAHOO.ext.SplitBar.HORIZONTAL){newSize=this.dragSpecs.startSize+ (this.placement==YAHOO.ext.SplitBar.LEFT?endPoint[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-endPoint[0]);}else{newSize=this.dragSpecs.startSize+ (this.placement==YAHOO.ext.SplitBar.TOP?endPoint[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-endPoint[1]);} newSize=Math.min(Math.max(newSize,this.activeMinSize),this.activeMaxSize);if(newSize!=this.dragSpecs.startSize){this.adapter.setElementSize(this,newSize);this.onMoved.fireDirect(this,newSize);}},getAdapter:function(){return this.adapter;},setAdapter:function(adapter){this.adapter=adapter;this.adapter.init(this);},getMinimumSize:function(){return this.minSize;},setMinimumSize:function(minSize){this.minSize=minSize;},getMaximumSize:function(){return this.maxSize;},setMaximumSize:function(maxSize){this.maxSize=maxSize;},setCurrentSize:function(size){var oldAnimate=this.animate;this.animate=false;this.adapter.setElementSize(this,size);this.animate=oldAnimate;},destroy:function(removeEl){if(this.shim){this.shim.remove();} this.dd.unreg();this.proxy.parentNode.removeChild(this.proxy);if(removeEl){this.el.remove();}}});YAHOO.ext.SplitBar.createShim=function(){var shim=document.createElement('div');shim.unselectable='on';YAHOO.util.Dom.generateId(shim,'split-shim');YAHOO.util.Dom.setStyle(shim,'width','100%');YAHOO.util.Dom.setStyle(shim,'height','100%');YAHOO.util.Dom.setStyle(shim,'position','absolute');YAHOO.util.Dom.setStyle(shim,'background','white');YAHOO.util.Dom.setStyle(shim,'z-index',11000);window.document.body.appendChild(shim);var shimEl=YAHOO.ext.Element.get(shim);shimEl.setOpacity(.01);shimEl.setXY([0,0]);return shimEl;};YAHOO.ext.SplitBar.createProxy=function(orientation){var proxy=document.createElement('div');proxy.unselectable='on';YAHOO.util.Dom.generateId(proxy,'split-proxy');YAHOO.util.Dom.setStyle(proxy,'position','absolute');YAHOO.util.Dom.setStyle(proxy,'visibility','hidden');YAHOO.util.Dom.setStyle(proxy,'z-index',11001);YAHOO.util.Dom.setStyle(proxy,'background-color',"#aaa");if(orientation==YAHOO.ext.SplitBar.HORIZONTAL){YAHOO.util.Dom.setStyle(proxy,'cursor','e-resize');}else{YAHOO.util.Dom.setStyle(proxy,'cursor','n-resize');} YAHOO.util.Dom.setStyle(proxy,'line-height','0px');YAHOO.util.Dom.setStyle(proxy,'font-size','0px');window.document.body.appendChild(proxy);return proxy;};YAHOO.ext.SplitBar.BasicLayoutAdapter=function(){};YAHOO.ext.SplitBar.BasicLayoutAdapter.prototype={init:function(s){},getElementSize:function(s){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){return s.resizingEl.getWidth();}else{return s.resizingEl.getHeight();}},setElementSize:function(s,newSize,onComplete){if(s.orientation==YAHOO.ext.SplitBar.HORIZONTAL){if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setWidth(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setWidth(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}else{if(!YAHOO.util.Anim||!s.animate){s.resizingEl.setHeight(newSize);if(onComplete){onComplete(s,newSize);}}else{s.resizingEl.setHeight(newSize,true,.1,onComplete,YAHOO.util.Easing.easeOut);}}}};YAHOO.ext.SplitBar.AbsoluteLayoutAdapter=function(container){this.basic=new YAHOO.ext.SplitBar.BasicLayoutAdapter();this.container=getEl(container);} YAHOO.ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(s){this.basic.init(s);},getElementSize:function(s){return this.basic.getElementSize(s);},setElementSize:function(s,newSize,onComplete){this.basic.setElementSize(s,newSize,this.moveSplitter.createDelegate(this,[s]));},moveSplitter:function(s){var yes=YAHOO.ext.SplitBar;switch(s.placement){case yes.LEFT:s.el.setX(s.resizingEl.getRight());break;case yes.RIGHT:s.el.setStyle('right',(this.container.getWidth()-s.resizingEl.getLeft())+'px');break;case yes.TOP:s.el.setY(s.resizingEl.getBottom());break;case yes.BOTTOM:s.el.setY(s.resizingEl.getTop()-s.el.getHeight());break;}}};YAHOO.ext.SplitBar.VERTICAL=1;YAHOO.ext.SplitBar.HORIZONTAL=2;YAHOO.ext.SplitBar.LEFT=1;YAHOO.ext.SplitBar.RIGHT=2;YAHOO.ext.SplitBar.TOP=3;YAHOO.ext.SplitBar.BOTTOM=4; YAHOO.ext.TabPanel=function(container,config){this.el=getEl(container,true);this.tabPosition='top';this.currentTabWidth=0;this.minTabWidth=40;this.maxTabWidth=250;this.preferredTabWidth=175;this.resizeTabs=false;this.monitorResize=true;if(config){if(typeof config=='boolean'){this.tabPosition=config?'bottom':'top';}else{YAHOO.ext.util.Config.apply(this,config);}} if(this.tabPosition=='bottom'){this.bodyEl=getEl(this.createBody(this.el.dom));this.el.addClass('ytabs-bottom');} this.stripWrap=getEl(this.createStrip(this.el.dom),true);this.stripEl=getEl(this.createStripList(this.stripWrap.dom),true);this.stripBody=getEl(this.stripWrap.dom.firstChild.firstChild,true);if(YAHOO.ext.util.Browser.isIE){YAHOO.util.Dom.setStyle(this.stripWrap.dom.firstChild,'overflow-x','hidden');} if(this.tabPosition!='bottom'){this.bodyEl=getEl(this.createBody(this.el.dom));this.el.addClass('ytabs-top');} this.items=[];this.bodyEl.setStyle('position','relative');if(!this.items.indexOf){this.items.indexOf=function(o){for(var i=0,len=this.length;i1){var newTab=this.getNextAvailable(index);if(newTab)newTab.activate();} this.stripEl.dom.removeChild(tab.pnode.dom);if(tab.bodyEl.dom.parentNode==this.bodyEl.dom){this.bodyEl.dom.removeChild(tab.bodyEl.dom);} items.splice(index,1);delete this.items[tab.id];tab.fireEvent('close',tab);tab.purgeListeners();this.autoSizeTabs();},getNextAvailable:function(start){var items=this.items;var index=start;while(index=0){var item=items[--index];if(item&&!item.isHidden()){return item;}} return null;},disableTab:function(id){var tab=this.items[id];if(tab&&this.active!=tab){tab.disable();}},enableTab:function(id){var tab=this.items[id];tab.enable();},activate:function(id){var tab=this.items[id];if(tab==this.active){return tab;} var e={};this.fireEvent('beforetabchange',this,e,tab);if(e.cancel!==true&&!tab.disabled){if(this.active){this.active.hide();} this.active=this.items[id];this.active.show();this.onTabChange.fireDirect(this,this.active);} return tab;},getActiveTab:function(){return this.active;},syncHeight:function(targetHeight){var height=(targetHeight||this.el.getHeight())-this.el.getBorderWidth('tb')-this.el.getPadding('tb');var bm=this.bodyEl.getMargins();var newHeight=height-(this.stripWrap.getHeight()||0)-(bm.top+bm.bottom);this.bodyEl.setHeight(newHeight);return newHeight;},onResize:function(){if(this.monitorResize){this.autoSizeTabs();}},beginUpdate:function(){this.updating=true;},endUpdate:function(){this.updating=false;this.autoSizeTabs();},autoSizeTabs:function(){var count=this.items.length;var vcount=count-this.hiddenCount;if(!this.resizeTabs||count<1||vcount<1||this.updating)return;var w=Math.max(this.el.getWidth()-this.cpad,10);var availWidth=Math.floor(w/vcount);var b=this.stripBody;if(b.getWidth()>w){var tabs=this.items;this.setTabWidth(Math.max(availWidth,this.minTabWidth));if(availWidth
';return strip.firstChild.firstChild.firstChild.firstChild;};YAHOO.ext.TabPanel.prototype.createBody=function(container){var body=document.createElement('div');YAHOO.util.Dom.generateId(body,'tab-body');YAHOO.util.Dom.addClass(body,'yui-ext-tabbody');container.appendChild(body);return body;};YAHOO.ext.TabPanel.prototype.createItemBody=function(bodyEl,id){var body=YAHOO.util.Dom.get(id);if(!body){body=document.createElement('div');body.id=id;} YAHOO.util.Dom.addClass(body,'yui-ext-tabitembody');bodyEl.insertBefore(body,bodyEl.firstChild);return body;};YAHOO.ext.TabPanel.prototype.createStripElements=function(stripEl,text,closable){var td=document.createElement('td');stripEl.appendChild(td);if(closable){td.className="ytab-closable";if(!this.closeTpl){this.closeTpl=new YAHOO.ext.Template(''+'{text}'+'
 
');} var el=this.closeTpl.overwrite(td,{'text':text});var close=el.getElementsByTagName('div')[0];var inner=el.getElementsByTagName('em')[0];return{'el':el,'close':close,'inner':inner};}else{if(!this.tabTpl){this.tabTpl=new YAHOO.ext.Template(''+'{text}');} var el=this.tabTpl.overwrite(td,{'text':text});var inner=el.getElementsByTagName('em')[0];return{'el':el,'inner':inner};}}; YAHOO.ext.Resizable=function(el,config){this.el=getEl(el);if(config&&config.wrap){config.resizeChild=this.el;this.el=this.el.wrap(typeof config.wrap=='object'?config.wrap:null);this.el.id=this.el.dom.id=config.resizeChild.id+'-rzwrap';this.el.setStyle('overflow','hidden');this.el.setPositioning(config.resizeChild.getPositioning());config.resizeChild.clearPositioning();if(!config.width||!config.height){var csize=config.resizeChild.getSize();this.el.setSize(csize.width,csize.height);} if(config.pinned&&!config.adjustments){config.adjustments='auto';}} this.proxy=this.el.createProxy({tag:'div',cls:'yresizable-proxy',id:this.el.id+'-rzproxy'}) this.proxy.unselectable();this.overlay=this.el.createProxy({tag:'div',cls:'yresizable-overlay',html:' '});this.overlay.unselectable();this.overlay.enableDisplayMode('block');this.overlay.mon('mousemove',this.onMouseMove,this,true);this.overlay.mon('mouseup',this.onMouseUp,this,true);YAHOO.ext.util.Config.apply(this,config,{resizeChild:false,adjustments:[0,0],minWidth:5,minHeight:5,maxWidth:10000,maxHeight:10000,enabled:true,animate:false,duration:.35,dynamic:false,handles:false,multiDirectional:false,disableTrackOver:false,easing:YAHOO.util.Easing?YAHOO.util.Easing.easeOutStrong:null,widthIncrement:0,heightIncrement:0,pinned:false,width:null,height:null,preserveRatio:false,transparent:false,minX:0,minY:0,draggable:false});if(this.pinned){this.disableTrackOver=true;this.el.addClass('yresizable-pinned');} var position=this.el.getStyle('position');if(position!='absolute'&&position!='fixed'){this.el.setStyle('position','relative');} if(!this.handles){this.handles='s,e,se';if(this.multiDirectional){this.handles+=',n,w';}} if(this.handles=='all'){this.handles='n s e w ne nw se sw';} var hs=this.handles.split(/\s*?[,;]\s*?| /);var ps=YAHOO.ext.Resizable.positions;for(var i=0,len=hs.length;i0){if(m>(inc/2)){newValue=value+(inc-m);}else{newValue=value-m;}} return Math.max(min,newValue);},resizeElement:function(){var box=this.proxy.getBox();this.el.setBox(box,false,this.animate,this.duration,null,this.easing);this.updateChildSize();this.proxy.hide();return box;},constrain:function(v,diff,m,mx){if(v-diffmx){diff=mx-v;} return diff;},onMouseMove:function(e){if(this.enabled){try{var curSize=this.curSize||this.startBox;var x=this.startBox.x,y=this.startBox.y;var ox=x,oy=y;var w=curSize.width,h=curSize.height;var ow=w,oh=h;var mw=this.minWidth,mh=this.minHeight;var mxw=this.maxWidth,mxh=this.maxHeight;var wi=this.widthIncrement;var hi=this.heightIncrement;var eventXY=e.getXY();var diffX=-(this.startPoint[0]-Math.max(this.minX,eventXY[0]));var diffY=-(this.startPoint[1]-Math.max(this.minY,eventXY[1]));var pos=this.activeHandle.position;switch(pos){case'east':w+=diffX;w=Math.min(Math.max(mw,w),mxw);break;case'south':h+=diffY;h=Math.min(Math.max(mh,h),mxh);break;case'southeast':w+=diffX;h+=diffY;w=Math.min(Math.max(mw,w),mxw);h=Math.min(Math.max(mh,h),mxh);break;case'north':diffY=this.constrain(h,diffY,mh,mxh);y+=diffY;h-=diffY;break;case'west':diffX=this.constrain(w,diffX,mw,mxw);x+=diffX;w-=diffX;break;case'northeast':w+=diffX;w=Math.min(Math.max(mw,w),mxw);diffY=this.constrain(h,diffY,mh,mxh);y+=diffY;h-=diffY;break;case'northwest':diffX=this.constrain(w,diffX,mw,mxw);diffY=this.constrain(h,diffY,mh,mxh);y+=diffY;h-=diffY;x+=diffX;w-=diffX;break;case'southwest':diffX=this.constrain(w,diffX,mw,mxw);h+=diffY;h=Math.min(Math.max(mh,h),mxh);x+=diffX;w-=diffX;break;} var sw=this.snap(w,wi,mw);var sh=this.snap(h,hi,mh);if(sw!=w||sh!=h){switch(pos){case'northeast':y-=sh-h;break;case'north':y-=sh-h;break;case'southwest':x-=sw-w;break;case'west':x-=sw-w;break;case'northwest':x-=sw-w;y-=sh-h;break;} w=sw;h=sh;} if(this.preserveRatio){switch(pos){case'southeast':case'east':h=oh*(w/ow);h=Math.min(Math.max(mh,h),mxh);w=ow*(h/oh);break;case'south':w=ow*(h/oh);w=Math.min(Math.max(mw,w),mxw);h=oh*(w/ow);break;case'northeast':w=ow*(h/oh);w=Math.min(Math.max(mw,w),mxw);h=oh*(w/ow);break;case'north':var tw=w;w=ow*(h/oh);w=Math.min(Math.max(mw,w),mxw);h=oh*(w/ow);x+=(tw-w)/2;break;case'southwest':h=oh*(w/ow);h=Math.min(Math.max(mh,h),mxh);var tw=w;w=ow*(h/oh);x+=tw-w;break;case'west':var th=h;h=oh*(w/ow);h=Math.min(Math.max(mh,h),mxh);y+=(th-h)/2;var tw=w;w=ow*(h/oh);x+=tw-w;break;case'northwest':var tw=w;var th=h;h=oh*(w/ow);h=Math.min(Math.max(mh,h),mxh);w=ow*(h/oh);y+=th-h;x+=tw-w;break;}} this.proxy.setBounds(x,y,w,h);if(this.dynamic){this.resizeElement();}}catch(e){}}},handleOver:function(){if(this.enabled){this.el.addClass('yresizable-over');}},handleOut:function(){if(!this.resizing){this.el.removeClass('yresizable-over');}},getEl:function(){return this.el;},getResizeChild:function(){return this.resizeChild;}});YAHOO.ext.Resizable.positions={n:'north',s:'south',e:'east',w:'west',se:'southeast',sw:'southwest',nw:'northwest',ne:'northeast'};YAHOO.ext.Resizable.Handle=function(rz,pos,disableTrackOver,transparent){if(!this.tpl){var tpl=YAHOO.ext.DomHelper.createTemplate({tag:'div',cls:'yresizable-handle yresizable-handle-{0}',html:' '});tpl.compile();YAHOO.ext.Resizable.Handle.prototype.tpl=tpl;} this.position=pos;this.rz=rz;this.el=this.tpl.append(rz.el.dom,[this.position],true);this.el.unselectable();if(transparent){this.el.setOpacity(0);} this.el.mon('mousedown',this.onMouseDown,this,true);if(!disableTrackOver){this.el.mon('mouseover',this.onMouseOver,this,true);this.el.mon('mouseout',this.onMouseOut,this,true);}};YAHOO.ext.Resizable.Handle.prototype={afterResize:function(rz){},onMouseDown:function(e){this.rz.onMouseDown(this,e);},onMouseOver:function(e){this.rz.handleOver(this,e);},onMouseOut:function(e){this.rz.handleOut(this,e);}}; YAHOO.ext.Button=function(renderTo,config){YAHOO.ext.util.Config.apply(this,config);this.events={'click':true};if(renderTo){this.render(renderTo);}};YAHOO.extendX(YAHOO.ext.Button,YAHOO.ext.util.Observable,{render:function(renderTo){var btn;if(!this.dhconfig){if(!YAHOO.ext.Button.buttonTemplate){YAHOO.ext.Button.buttonTemplate=new YAHOO.ext.DomHelper.Template('
 {0} 
');} btn=YAHOO.ext.Button.buttonTemplate.append(getEl(renderTo).dom,[this.text],true);this.tbl=getEl(btn.dom.firstChild,true);}else{btn=YAHOO.ext.DomHelper.append(this.footer.dom,this.dhconfig,true);} this.el=btn;this.autoWidth();btn.addClass('ybtn');btn.mon('click',this.onClick,this,true);btn.on('mouseover',this.onMouseOver,this,true);btn.on('mouseout',this.onMouseOut,this,true);btn.on('mousedown',this.onMouseDown,this,true);btn.on('mouseup',this.onMouseUp,this,true);},getEl:function(){return this.el;},autoWidth:function(){if(this.tbl){this.el.setWidth('auto');this.tbl.setWidth('auto');if(this.minWidth){if(this.tbl.getWidth()0){this.body.addClass(this.tabPosition=='bottom'?'ytabs-bottom':'ytabs-top');this.tabs=new YAHOO.ext.TabPanel(this.body.dom,this.tabPosition=='bottom');for(var i=0,len=tabEls.length;ivw){x=vw-w;moved=true;} if(y+h>vh){y=vh-h;moved=true;} if(x<0){x=0;moved=true;} if(y<0){y=0;moved=true;} if(moved){this.xy=[x,y];if(this.isVisible()){this.el.setLocation(x,y);this.adjustAssets();}}}},onDrag:function(){if(!this.proxyDrag){this.xy=this.el.getXY();this.adjustAssets();}},adjustAssets:function(doShow){var x=this.xy[0],y=this.xy[1];var w=this.size.width,h=this.size.height;if(doShow===true){if(this.shadow){this.shadow.show();} if(this.shim){this.shim.show();}} if(this.shadow&&this.shadow.isVisible()){this.shadow.setBounds(x+this.shadowOffset,y+this.shadowOffset,w,h);} if(this.shim&&this.shim.isVisible()){this.shim.setBounds(x,y,w,h);}},adjustViewport:function(w,h){if(!w||!h){w=YAHOO.util.Dom.getViewportWidth();h=YAHOO.util.Dom.getViewportHeight();} this.viewSize=[w,h];if(this.modal&&this.mask.isVisible()){this.mask.setSize(w,h);this.mask.setSize(YAHOO.util.Dom.getDocumentWidth(),YAHOO.util.Dom.getDocumentHeight());} if(this.isVisible()){this.constrainXY();}},destroy:function(removeEl){YAHOO.ext.EventManager.removeResizeListener(this.adjustViewport,this);if(this.tabs){this.tabs.destroy(removeEl);} if(removeEl===true){this.el.update('');this.el.remove();} YAHOO.ext.DialogManager.unregister(this);},startMove:function(){if(this.proxyDrag){this.proxy.show();} if(this.constraintoviewport!==false){this.dd.constrainTo(document.body,{right:this.shadowOffset,bottom:this.shadowOffset});}},endMove:function(){if(!this.proxyDrag){YAHOO.util.DD.prototype.endDrag.apply(this.dd,arguments);}else{YAHOO.util.DDProxy.prototype.endDrag.apply(this.dd,arguments);this.proxy.hide();} this.refreshSize();this.adjustAssets();this.fireEvent('move',this,this.xy[0],this.xy[1])},toFront:function(){YAHOO.ext.DialogManager.bringToFront(this);return this;},toBack:function(){YAHOO.ext.DialogManager.sendToBack(this);return this;},center:function(){this.moveTo(this.el.getCenterXY(true));return this;},moveTo:function(x,y){this.xy=[x,y];if(this.isVisible()){this.el.setXY(this.xy);this.adjustAssets();} return this;},isVisible:function(){return this.el.isVisible();},animHide:function(callback){var b=getEl(this.animateTarget,true).getBox();this.proxy.show();this.proxy.setBounds(this.xy[0],this.xy[1],this.size.width,this.size.height);this.el.hide();this.proxy.setBounds(b.x,b.y,b.width,b.height,true,.35,this.hideEl.createDelegate(this,[callback]));},hide:function(callback){if(this.fireEvent('beforehide',this)===false) return;if(this.shadow){this.shadow.hide();} if(this.shim){this.shim.hide();} if(this.animateTarget){this.animHide(callback);}else{this.el.hide();this.hideEl(callback);} return this;},hideEl:function(callback){this.proxy.hide();if(this.modal){this.mask.hide();YAHOO.util.Dom.removeClass(document.body,'masked');} this.fireEvent('hide',this);if(typeof callback=='function'){callback();}},hideAction:function(){this.setLeft('-10000px');this.setTop('-10000px');this.setStyle('visibility','hidden');},refreshSize:function(){this.size=this.el.getSize();this.xy=this.el.getXY();YAHOO.ext.state.Manager.set(this.el.id+'-state',this.el.getBox());},setZIndex:function(index){if(this.modal){this.mask.setStyle('z-index',index);} if(this.shadow){this.shadow.setStyle('z-index',++index);} if(this.shim){this.shim.setStyle('z-index',++index);} this.el.setStyle('z-index',++index);if(this.proxy){this.proxy.setStyle('z-index',++index);} if(this.resizer){this.resizer.proxy.setStyle('z-index',++index);} this.lastZIndex=index;},getEl:function(){return this.el;}});YAHOO.ext.DialogManager=function(){var list={};var accessList=[];var front=null;var sortDialogs=function(d1,d2){return(!d1._lastAccess||d1._lastAccess0?title:" ");}},setActivePanel:function(panel){panel=this.getPanel(panel);if(this.activePanel&&this.activePanel!=panel){this.activePanel.setActiveState(false);} this.activePanel=panel;panel.setActiveState(true);if(this.panelSize){panel.setSize(this.panelSize.width,this.panelSize.height);} this.closeBtn.setVisible(!this.config.closeOnTab&&!this.isSlid&&panel.isClosable());this.updateTitle(panel.getTitle());this.fireEvent('panelactivated',this,panel);},showPanel:function(panel){if(panel=this.getPanel(panel)){if(this.tabs){this.tabs.activate(panel.getEl().id);}else{this.setActivePanel(panel);}} return panel;},getActivePanel:function(){return this.activePanel;},validateVisibility:function(){if(this.panels.getCount()<1){this.updateTitle(' ');this.closeBtn.hide();this.hide();}else{if(!this.isVisible()){this.show();}}},add:function(panel){if(arguments.length>1){for(var i=0,len=arguments.length;i0){this.remove(this.panels.first());}},remove:function(panel,preservePanel){panel=this.getPanel(panel);if(!panel){return null;} var e={};this.fireEvent('beforeremove',this,panel,e);if(e.cancel===true){return null;} preservePanel=(typeof preservePanel!='undefined'?preservePanel:(this.config.preservePanels===true||panel.preserve===true));var panelId=panel.getId();this.panels.removeKey(panelId);if(preservePanel){document.body.appendChild(panel.getEl().dom);} if(this.tabs){this.tabs.removeTab(panel.getEl().id);}else if(!preservePanel){this.bodyEl.dom.removeChild(panel.getEl().dom);} if(this.panels.getCount()==1&&this.tabs&&!this.config.alwaysShowTabs){var p=this.panels.first();var tempEl=document.createElement('span');tempEl.appendChild(p.getEl().dom);this.bodyEl.update('');this.bodyEl.dom.appendChild(p.getEl().dom);tempEl=null;this.updateTitle(p.getTitle());this.tabs=null;this.bodyEl.setStyle('overflow',this.config.autoScroll?'auto':'hidden');this.setActivePanel(p);} panel.setRegion(null);if(this.activePanel==panel){this.activePanel=null;} if(this.config.autoDestroy!==false&&preservePanel!==true){try{panel.destroy();}catch(e){}} this.fireEvent('panelremoved',this,panel);return panel;},getTabs:function(){return this.tabs;},getPanel:function(id){if(typeof id=='object'){return id;} return this.panels.get(id);},getPosition:function(){return this.position;},createTool:function(parentEl,className){var btn=YAHOO.ext.DomHelper.append(parentEl,{tag:'div',cls:'ylayout-tools-button',children:[{tag:'div',cls:'ylayout-tools-button-inner '+className,html:' '}]},true);btn.addClassOnOver('ylayout-tools-button-over');return btn;}}); YAHOO.ext.SplitLayoutRegion=function(mgr,config,pos,cursor){this.cursor=cursor;YAHOO.ext.SplitLayoutRegion.superclass.constructor.call(this,mgr,config,pos);if(config.split){this.hide();}};YAHOO.extendX(YAHOO.ext.SplitLayoutRegion,YAHOO.ext.LayoutRegion,{applyConfig:function(config){YAHOO.ext.SplitLayoutRegion.superclass.applyConfig.call(this,config);if(config.split){if(!this.split){var splitEl=YAHOO.ext.DomHelper.append(this.mgr.el.dom,{tag:'div',id:this.el.id+'-split',cls:'ylayout-split ylayout-split-'+this.position,html:' '});this.split=new YAHOO.ext.SplitBar(splitEl,this.el);this.split.onMoved.subscribe(this.onSplitMove,this,true);this.split.useShim=config.useShim===true;YAHOO.util.Dom.setStyle([this.split.el.dom,this.split.proxy],'cursor',this.cursor);this.split.getMaximumSize=this.getMaxSize.createDelegate(this);} if(typeof config.minSize!='undefined'){this.split.minSize=config.minSize;} if(typeof config.maxSize!='undefined'){this.split.maxSize=config.maxSize;}}},getMaxSize:function(){var cmax=this.config.maxSize||10000;var center=this.mgr.getRegion('center');return Math.min(cmax,(this.el.getWidth()+center.getEl().getWidth())-center.getMinWidth());},onSplitMove:function(split,newSize){this.fireEvent('resized',this,newSize);},getSplitBar:function(){return this.split;},hide:function(){if(this.split){this.split.el.setLocation(-2000,-2000);this.split.el.hide();} YAHOO.ext.SplitLayoutRegion.superclass.hide.call(this);},show:function(){if(this.split){this.split.el.show();} YAHOO.ext.SplitLayoutRegion.superclass.show.call(this);},beforeSlide:function(){if(YAHOO.ext.util.Browser.isGecko){this.bodyEl.clip();if(this.tabs)this.tabs.bodyEl.clip();if(this.activePanel){this.activePanel.getEl().clip();if(this.activePanel.beforeSlide){this.activePanel.beforeSlide();}}}},afterSlide:function(){if(YAHOO.ext.util.Browser.isGecko){this.bodyEl.unclip();if(this.tabs)this.tabs.bodyEl.unclip();if(this.activePanel){this.activePanel.getEl().unclip();if(this.activePanel.afterSlide){this.activePanel.afterSlide();}}}},slideOut:function(){if(!this.slideEl){this.slideEl=new YAHOO.ext.Actor(YAHOO.ext.DomHelper.append(this.mgr.el.dom,{tag:'div',cls:'ylayout-slider'}));if(this.config.autoHide!==false){var slideInTask=new YAHOO.ext.util.DelayedTask(this.slideIn,this);this.slideEl.mon('mouseout',function(e){var to=e.getRelatedTarget();if(to&&to!=this.slideEl.dom&&!YAHOO.util.Dom.isAncestor(this.slideEl.dom,to)){slideInTask.delay(500);}},this,true);this.slideEl.mon('mouseover',function(e){slideInTask.cancel();},this,true);}} var sl=this.slideEl,c=this.collapsedEl,cm=this.cmargins;this.isSlid=true;this.snapshot={'left':this.el.getLeft(true),'top':this.el.getTop(true),'colbtn':this.collapseBtn.isVisible(),'closebtn':this.closeBtn.isVisible()};this.collapseBtn.hide();this.closeBtn.hide();this.el.show();this.el.setLeftTop(0,0);sl.startCapture(true);var size;switch(this.position){case'west':sl.setLeft(c.getRight(true));sl.setTop(c.getTop(true));size=this.el.getWidth();break;case'east':sl.setRight(this.mgr.getViewSize().width-c.getLeft(true));sl.setTop(c.getTop(true));size=this.el.getWidth();break;case'north':sl.setLeft(c.getLeft(true));sl.setTop(c.getBottom(true));size=this.el.getHeight();break;case'south':sl.setLeft(c.getLeft(true));sl.setBottom(this.mgr.getViewSize().height-c.getTop(true));size=this.el.getHeight();break;} sl.dom.appendChild(this.el.dom);YAHOO.util.Event.on(document.body,'click',this.slideInIf,this,true);sl.setSize(this.el.getWidth(),this.el.getHeight());this.beforeSlide();if(this.activePanel){this.activePanel.setSize(this.bodyEl.getWidth(),this.bodyEl.getHeight());} sl.slideShow(this.getAnchor(),size,this.slideDuration,null,false);sl.play(function(){this.afterSlide();}.createDelegate(this));},slideInIf:function(e){var t=YAHOO.util.Event.getTarget(e);if(!YAHOO.util.Dom.isAncestor(this.el.dom,t)){this.slideIn();}},slideIn:function(callback){if(this.isSlid&&!this.slideEl.playlist.isPlaying()){YAHOO.util.Event.removeListener(document.body,'click',this.slideInIf,this,true);this.slideEl.startCapture(true);this.slideEl.slideHide(this.getAnchor(),this.slideDuration,null);this.beforeSlide();this.slideEl.play(function(){this.isSlid=false;this.el.setPositioning(this.snapshot);this.collapseBtn.setVisible(this.snapshot.colbtn);this.closeBtn.setVisible(this.snapshot.closebtn);this.afterSlide();this.mgr.el.dom.appendChild(this.el.dom);if(typeof callback=='function'){callback();}}.createDelegate(this));}},animateExpand:function(){var em=this.margins,cm=this.cmargins;var c=this.collapsedEl,el=this.el;var direction,distance;switch(this.position){case'west':direction='right';el.setLeft(-(el.getWidth()+(em.right+em.left)));el.setTop(c.getTop(true)-cm.top+em.top);distance=el.getWidth()+(em.right+em.left);break;case'east':direction='left';el.setLeft(this.mgr.getViewSize().width+em.left);el.setTop(c.getTop(true)-cm.top+em.top);distance=el.getWidth()+(em.right+em.left);break;case'north':direction='down';el.setLeft(em.left);el.setTop(-(el.getHeight()+(em.top+em.bottom)));distance=el.getHeight()+(em.top+em.bottom);break;case'south':direction='up';el.setLeft(em.left);el.setTop(this.mgr.getViewSize().height+em.top);distance=el.getHeight()+(em.top+em.bottom);break;} this.beforeSlide();el.setStyle('z-index','100');el.show();c.setLocation(-2000,-2000);c.hide();el.move(direction,distance,true,this.duration,function(){this.afterSlide();el.setStyle('z-index','');if(this.split){this.split.el.show();} this.fireEvent('invalidated',this);this.fireEvent('expanded',this);}.createDelegate(this),this.config.easing||YAHOO.util.Easing.easeOut);},animateCollapse:function(){var em=this.margins,cm=this.cmargins;var c=this.collapsedEl,el=this.el;var direction,distance;switch(this.position){case'west':direction='left';distance=el.getWidth()+(em.right+em.left);break;case'east':direction='right';distance=el.getWidth()+(em.right+em.left);break;case'north':direction='up';distance=el.getHeight()+(em.top+em.bottom);break;case'south':direction='down';distance=el.getHeight()+(em.top+em.bottom);break;} this.el.setStyle('z-index','100');this.beforeSlide();this.el.move(direction,distance,true,this.duration,function(){this.afterSlide();this.el.setStyle('z-index','');this.el.setLocation(-20000,-20000);this.el.hide();this.collapsedEl.show();this.fireEvent('collapsed',this);}.createDelegate(this),YAHOO.util.Easing.easeIn);},getAnchor:function(){switch(this.position){case'west':return'left';case'east':return'right';case'north':return'top';case'south':return'bottom';}}}); YAHOO.ext.CenterLayoutRegion=function(mgr,config){YAHOO.ext.CenterLayoutRegion.superclass.constructor.call(this,mgr,config,'center');this.visible=true;this.minWidth=config.minWidth||20;this.minHeight=config.minHeight||20;};YAHOO.extendX(YAHOO.ext.CenterLayoutRegion,YAHOO.ext.LayoutRegion,{hide:function(){},show:function(){},getMinWidth:function(){return this.minWidth;},getMinHeight:function(){return this.minHeight;}});YAHOO.ext.NorthLayoutRegion=function(mgr,config){YAHOO.ext.NorthLayoutRegion.superclass.constructor.call(this,mgr,config,'north','n-resize');if(this.split){this.split.placement=YAHOO.ext.SplitBar.TOP;this.split.orientation=YAHOO.ext.SplitBar.VERTICAL;this.split.el.addClass('ylayout-split-v');} if(typeof config.initialSize!='undefined'){this.el.setHeight(config.initialSize);}};YAHOO.extendX(YAHOO.ext.NorthLayoutRegion,YAHOO.ext.SplitLayoutRegion,{getBox:function(){if(this.collapsed){return this.collapsedEl.getBox();} var box=this.el.getBox();if(this.split){box.height+=this.split.el.getHeight();} return box;},updateBox:function(box){if(this.split&&!this.collapsed){box.height-=this.split.el.getHeight();this.split.el.setLeft(box.x);this.split.el.setTop(box.y+box.height);this.split.el.setWidth(box.width);} if(this.collapsed){this.el.setWidth(box.width);var bodyWidth=box.width-this.el.getBorderWidth('rl');this.bodyEl.setWidth(bodyWidth);if(this.activePanel&&this.panelSize){this.activePanel.setSize(bodyWidth,this.panelSize.height);}} YAHOO.ext.NorthLayoutRegion.superclass.updateBox.call(this,box);}});YAHOO.ext.SouthLayoutRegion=function(mgr,config){YAHOO.ext.SouthLayoutRegion.superclass.constructor.call(this,mgr,config,'south','s-resize');if(this.split){this.split.placement=YAHOO.ext.SplitBar.BOTTOM;this.split.orientation=YAHOO.ext.SplitBar.VERTICAL;this.split.el.addClass('ylayout-split-v');} if(typeof config.initialSize!='undefined'){this.el.setHeight(config.initialSize);}};YAHOO.extendX(YAHOO.ext.SouthLayoutRegion,YAHOO.ext.SplitLayoutRegion,{getBox:function(){if(this.collapsed){return this.collapsedEl.getBox();} var box=this.el.getBox();if(this.split){var sh=this.split.el.getHeight();box.height+=sh;box.y-=sh;} return box;},updateBox:function(box){if(this.split&&!this.collapsed){var sh=this.split.el.getHeight();box.height-=sh;box.y+=sh;this.split.el.setLeft(box.x);this.split.el.setTop(box.y-sh);this.split.el.setWidth(box.width);} if(this.collapsed){this.el.setWidth(box.width);var bodyWidth=box.width-this.el.getBorderWidth('rl');this.bodyEl.setWidth(bodyWidth);if(this.activePanel&&this.panelSize){this.activePanel.setSize(bodyWidth,this.panelSize.height);}} YAHOO.ext.SouthLayoutRegion.superclass.updateBox.call(this,box);}});YAHOO.ext.EastLayoutRegion=function(mgr,config){YAHOO.ext.EastLayoutRegion.superclass.constructor.call(this,mgr,config,'east','e-resize');if(this.split){this.split.placement=YAHOO.ext.SplitBar.RIGHT;this.split.orientation=YAHOO.ext.SplitBar.HORIZONTAL;this.split.el.addClass('ylayout-split-h');} if(typeof config.initialSize!='undefined'){this.el.setWidth(config.initialSize);}};YAHOO.extendX(YAHOO.ext.EastLayoutRegion,YAHOO.ext.SplitLayoutRegion,{getBox:function(){if(this.collapsed){return this.collapsedEl.getBox();} var box=this.el.getBox();if(this.split){var sw=this.split.el.getWidth();box.width+=sw;box.x-=sw;} return box;},updateBox:function(box){if(this.split&&!this.collapsed){var sw=this.split.el.getWidth();box.width-=sw;this.split.el.setLeft(box.x);this.split.el.setTop(box.y);this.split.el.setHeight(box.height);box.x+=sw;} if(this.collapsed){this.el.setHeight(box.height);var bodyHeight=this.config.titlebar?box.height-(this.titleEl.getHeight()||0):box.height;bodyHeight-=this.el.getBorderWidth('tb');this.bodyEl.setHeight(bodyHeight);if(this.activePanel&&this.panelSize){this.activePanel.setSize(this.panelSize.width,bodyHeight);}} YAHOO.ext.EastLayoutRegion.superclass.updateBox.call(this,box);}});YAHOO.ext.WestLayoutRegion=function(mgr,config){YAHOO.ext.WestLayoutRegion.superclass.constructor.call(this,mgr,config,'west','w-resize');if(this.split){this.split.placement=YAHOO.ext.SplitBar.LEFT;this.split.orientation=YAHOO.ext.SplitBar.HORIZONTAL;this.split.el.addClass('ylayout-split-h');} if(typeof config.initialSize!='undefined'){this.el.setWidth(config.initialSize);}};YAHOO.extendX(YAHOO.ext.WestLayoutRegion,YAHOO.ext.SplitLayoutRegion,{getBox:function(){if(this.collapsed){return this.collapsedEl.getBox();} var box=this.el.getBox();if(this.split){box.width+=this.split.el.getWidth();} return box;},updateBox:function(box){if(this.split&&!this.collapsed){var sw=this.split.el.getWidth();box.width-=sw;this.split.el.setLeft(box.x+box.width);this.split.el.setTop(box.y);this.split.el.setHeight(box.height);} if(this.collapsed){this.el.setHeight(box.height);var bodyHeight=this.config.titlebar?box.height-(this.titleEl.getHeight()||0):box.height;bodyHeight-=this.el.getBorderWidth('tb');this.bodyEl.setHeight(bodyHeight);if(this.activePanel&&this.panelSize){this.activePanel.setSize(this.panelSize.width,bodyHeight);}} YAHOO.ext.WestLayoutRegion.superclass.updateBox.call(this,box);}}); YAHOO.ext.ContentPanel=function(el,config,content){YAHOO.ext.ContentPanel.superclass.constructor.call(this);this.el=getEl(el,true);if(!this.el&&config&&config.autoCreate){if(typeof config.autoCreate=='object'){if(!config.autoCreate.id){config.autoCreate.id=el;} this.el=YAHOO.ext.DomHelper.append(document.body,config.autoCreate,true);}else{this.el=YAHOO.ext.DomHelper.append(document.body,{tag:'div',cls:'ylayout-inactive-content',id:el},true);}} this.closable=false;this.loaded=false;this.active=false;if(typeof config=='string'){this.title=config;}else{YAHOO.ext.util.Config.apply(this,config);} if(this.resizeEl){this.resizeEl=getEl(this.resizeEl,true);}else{this.resizeEl=this.el;} this.events={'activate':new YAHOO.util.CustomEvent('activate'),'deactivate':new YAHOO.util.CustomEvent('deactivate')};if(this.autoScroll){this.el.setStyle('overflow','auto');} if(content){this.setContent(content);}};YAHOO.extendX(YAHOO.ext.ContentPanel,YAHOO.ext.util.Observable,{setRegion:function(region){this.region=region;if(region){this.el.replaceClass('ylayout-inactive-content','ylayout-active-content');}else{this.el.replaceClass('ylayout-active-content','ylayout-inactive-content');}},getToolbar:function(){return this.toolbar;},setActiveState:function(active){this.active=active;if(!active){this.fireEvent('deactivate',this);}else{this.fireEvent('activate',this);}},setContent:function(content,loadScripts){this.el.update(content,loadScripts);},getUpdateManager:function(){return this.el.getUpdateManager();},setUrl:function(url,params,loadOnce){if(this.refreshDelegate){this.removeListener('activate',this.refreshDelegate);} this.refreshDelegate=this._handleRefresh.createDelegate(this,[url,params,loadOnce]);this.on('activate',this._handleRefresh.createDelegate(this,[url,params,loadOnce]));return this.el.getUpdateManager();},_handleRefresh:function(url,params,loadOnce){if(!loadOnce||!this.loaded){var updater=this.el.getUpdateManager();updater.update(url,params,this._setLoaded.createDelegate(this));}},_setLoaded:function(){this.loaded=true;},getId:function(){return this.el.id;},getEl:function(){return this.el;},adjustForComponents:function(width,height){if(this.toolbar){var te=this.toolbar.getEl();height-=te.getHeight();te.setWidth(width);} if(this.adjustments){width+=this.adjustments[0];height+=this.adjustments[1];} return{'width':width,'height':height};},setSize:function(width,height){if(this.fitToFrame){var size=this.adjustForComponents(width,height);this.resizeEl.setSize(this.autoWidth?'auto':size.width,size.height);}},getTitle:function(){return this.title;},setTitle:function(title){this.title=title;if(this.region){this.region.updatePanelTitle(this,title);}},isClosable:function(){return this.closable;},beforeSlide:function(){this.el.clip();this.resizeEl.clip();},afterSlide:function(){this.el.unclip();this.resizeEl.unclip();},refresh:function(){if(this.refreshDelegate){this.loaded=false;this.refreshDelegate();}},destroy:function(){this.el.removeAllListeners();var tempEl=document.createElement('span');tempEl.appendChild(this.el.dom);tempEl.innerHTML='';this.el=null;}});YAHOO.ext.GridPanel=function(grid,config){this.wrapper=YAHOO.ext.DomHelper.append(document.body,{tag:'div',cls:'ylayout-grid-wrapper ylayout-inactive-content'},true);this.wrapper.dom.appendChild(grid.container.dom);YAHOO.ext.GridPanel.superclass.constructor.call(this,this.wrapper,config);if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);} grid.monitorWindowResize=false;grid.autoHeight=false;grid.autoWidth=false;this.grid=grid;this.grid.container.replaceClass('ylayout-inactive-content','ylayout-component-panel');};YAHOO.extendX(YAHOO.ext.GridPanel,YAHOO.ext.ContentPanel,{getId:function(){return this.grid.id;},getGrid:function(){return this.grid;},setSize:function(width,height){var grid=this.grid;var size=this.adjustForComponents(width,height);grid.container.setSize(size.width,size.height);grid.autoSize();},beforeSlide:function(){this.grid.getView().wrapEl.clip();},afterSlide:function(){this.grid.getView().wrapEl.unclip();},destroy:function(){this.grid.getView().unplugDataModel(this.grid.getDataModel());this.grid.container.removeAllListeners();YAHOO.ext.GridPanel.superclass.destroy.call(this);}});YAHOO.ext.NestedLayoutPanel=function(layout,config){YAHOO.ext.NestedLayoutPanel.superclass.constructor.call(this,layout.getEl(),config);layout.monitorWindowResize=false;this.layout=layout;this.layout.getEl().addClass('ylayout-nested-layout');};YAHOO.extendX(YAHOO.ext.NestedLayoutPanel,YAHOO.ext.ContentPanel,{setSize:function(width,height){var size=this.adjustForComponents(width,height);this.layout.getEl().setSize(size.width,size.height);this.layout.layout();},getLayout:function(){return this.layout;}}); var selectOpen = 0; var selectBoxes = []; function doSelectClose() { selectBoxes[selectOpen].activate(); } SelectBox = function(elmName, config) { this.config = { open: false }; this.element = getEl(elmName); this.id = elmName; this.fieldType = 'select'; if (!this.element) { return false; } this.events = { onSelect: true, onShow: true, onHide: true, onDestroy: true, onDrawError: true } } YAHOO.extendX(SelectBox, YAHOO.ext.util.Observable,{ render : function(){ this.element._rendered = false; this.wrapperid = 'yui_wrap_' + this.id; this.topcontid = 'yui_' + this.id; this.topid = 'yui_top_' + this.id; this.menuid = 'yui_menu_' + this.id; this.menuulid = 'yui_menu_ul_' + this.id var sel = this.element.dom.options.selectedIndex; var selValue = this.element.dom.options[sel].innerHTML; this.element.setStyle( { 'position': 'absolute' } ); this.element.setVisible(false); this.element.setLocation(0,0); var div = YAHOO.ext.DomHelper.insertBefore(this.element.dom, { tag: 'div', id: this.wrapperid, cls: 'yui_select_wrap', children: [ { tag: 'div', id: this.topcontid, cls: 'yui_select', children: [ { tag: 'a', id: this.topid, href: '#', html: selValue }]}, { tag: 'div', id: this.menuid, cls: 'yui_selectlist', style: 'position: absolute; visibility: hidden; top: -999px, left: -9999' } ]} ); this.config.container = new YAHOO.widget.Overlay(this.menuid, { visible: false, constraintoviewport: true, context: [this.topcontid, 'tl', 'bl'] }); this.config.container.render(this.element.dom.parentNode); /*this.config.select = new YAHOO.widget.Overlay(this.topcontid, { visible: true, context: [this.element.dom.parentNode, 'tl', 'tl'] }); this.config.select.render(this.element.dom.parentNode);*/ getEl(this.topcontid).mon('click',this.activate, this, true); this.open = false; selectBoxes[this.id] = this; }, activate : function(e){ if (this.open) { getEl(this.menuid).hide(); this.open = false; this.fireEvent('onHide', this, e); selectOpen = 0; /*this.onHide.fire(); YAHOO.DHTMLForms.currentOpen = false; this.config.container.hide(); this.config.open = false; $E.removeListener(document, 'keyup', this._keyPress);*/ } else { if(selectOpen) { selectBoxes[selectOpen].activate(); selectOpen = 0; } this.config.container.align('tl','bl'); selectOpen = this.id; var sel = this.element.dom.options.selectedIndex; var selValue = this.element.dom.options[sel].innerHTML; menuTPL = YAHOO.ext.DomHelper.createTemplate( { tag: 'a', selIndex: '{1}', cls: '{0}', html: '{2}'} ); var html = ''; var ops = this.element.getChildrenByTagName('option'); for (var i = 0; i < ops.length; i++) { var opt = [] opt[0] = ''; if(i == sel) { opt[0] = 'selected'; } opt[1] = i; opt[2] = ops[i].dom.innerHTML; html += menuTPL.applyTemplate(opt); } getEl(this.menuid).update(html); // add the click handeler to the li's var lis = getEl(this.menuid).getChildrenByTagName('a'); for(var i in lis) { lis[i].mon('click', this.select, this); if(YAHOO.ext.util.Browser.isIE) { lis[i].mon('mouseover', function() { if(!this.hasClass('selected')) { this.addClass('selected'); } }); lis[i].mon('mouseout', function(e) { var targ = e.getTarget(); if(getEl(targ.id).hasClass('selected') && sel != targ.getAttribute('selindex')) { getEl(targ.id).removeClass('selected'); } }, sel); } } this.fireEvent('onShow', this, e); getEl(this.menuid).show(); this.open = true; } if(e) e.preventDefault(); }, select : function(e){ var t = e.getTarget(); this.fireEvent('onSelect', this, e); var selected = t.getAttribute('selindex'); this.element.dom.options.selectedIndex = selected; var lis = getEl(this.menuid).getChildrenByTagName('a'); for(var i in lis) { lis[i].removeClass('selected'); } getEl(this.topid).update(t.innerHTML); getEl(t).addClass('selected'); this.fireEvent('onSelect', this, e); if(e) { this.activate(); e.preventDefault(); } } });