/*
Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
dojo._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dojox.widget.Standby"],["require","dojo.window"],["require","dojo.fx"],["require","dijit._Widget"],["require","dijit._Templated"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.widget.Standby"]){_4._hasResource["dojox.widget.Standby"]=true;_4.provide("dojox.widget.Standby");_4.require("dojo.window");_4.require("dojo.fx");_4.require("dijit._Widget");_4.require("dijit._Templated");_4.experimental("dojox.widget.Standby");_4.declare("dojox.widget.Standby",[_5._Widget,_5._Templated],{templateString:"
"+"
"+"
"+"
"+"
",_underlayNode:null,_imageNode:null,_textNode:null,_centerNode:null,image:_4.moduleUrl("dojox","widget/Standby/images/loading.gif").toString(),imageText:"Please Wait...",text:"Please wait...",centerIndicator:"image",_displayed:false,_resizeCheck:null,target:"",color:"#C0C0C0",duration:500,_started:false,_parent:null,zIndex:"auto",startup:function(_7){if(!this._started){if(typeof this.target==="string"){var w=_5.byId(this.target);if(w){this.target=w.domNode;}else{this.target=_4.byId(this.target);}}if(this.text){this._textNode.innerHTML=this.text;}if(this.centerIndicator==="image"){this._centerNode=this._imageNode;_4.attr(this._imageNode,"src",this.image);_4.attr(this._imageNode,"alt",this.imageText);}else{this._centerNode=this._textNode;}_4.style(this._underlayNode,{display:"none",backgroundColor:this.color});_4.style(this._centerNode,"display","none");this.connect(this._underlayNode,"onclick","_ignore");if(this.domNode.parentNode&&this.domNode.parentNode!=_4.body()){_4.body().appendChild(this.domNode);}if(_4.isIE==7){this._ieFixNode=_4.doc.createElement("div");_4.style(this._ieFixNode,{opacity:"0",zIndex:"-1000",position:"absolute",top:"-1000px"});_4.body().appendChild(this._ieFixNode);}}},show:function(){if(!this._displayed){this._displayed=true;this._size();this._disableOverflow();this._fadeIn();}},hide:function(){if(this._displayed){this._size();this._fadeOut();this._displayed=false;if(this._resizeCheck!==null){clearInterval(this._resizeCheck);this._resizeCheck=null;}}},isVisible:function(){return this._displayed;},onShow:function(){},onHide:function(){},uninitialize:function(){this._displayed=false;if(this._resizeCheck){clearInterval(this._resizeCheck);}_4.style(this._centerNode,"display","none");_4.style(this._underlayNode,"display","none");if(_4.isIE==7){_4.body().removeChild(this._ieFixNode);delete this._ieFixNode;}this.target=null;this._imageNode=null;this._textNode=null;this._centerNode=null;this.inherited(arguments);},_size:function(){if(this._displayed){var _8=_4.attr(_4.body(),"dir");if(_8){_8=_8.toLowerCase();}var _9;var _a=this._scrollerWidths();var _b=this.target;var _c=_4.style(this._centerNode,"display");_4.style(this._centerNode,"display","block");var _d=_4.position(_b,true);if(_b===_4.body()||_b===_4.doc){_d=_4.window.getBox();_d.x=_d.l;_d.y=_d.t;}var _e=_4.marginBox(this._centerNode);_4.style(this._centerNode,"display",_c);if(this._ieFixNode){_9=-this._ieFixNode.offsetTop/1000;_d.x=Math.floor((_d.x+0.9)/_9);_d.y=Math.floor((_d.y+0.9)/_9);_d.w=Math.floor((_d.w+0.9)/_9);_d.h=Math.floor((_d.h+0.9)/_9);}var zi=_4.style(_b,"zIndex");var _f=zi;var _10=zi;if(this.zIndex==="auto"){if(zi!="auto"){_f=parseInt(_f,10)+1;_10=parseInt(_10,10)+2;}else{var _11=_b.parentNode;var _12=-100000;while(_11&&_11!==_4.body()){zi=_4.style(_11,"zIndex");if(!zi||zi==="auto"){_11=_11.parentNode;}else{var _13=parseInt(zi,10);if(_12<_13){_12=_13;_f=_13+1;_10=_13+2;}_11=_11.parentNode;}}}}else{_f=parseInt(this.zIndex,10)+1;_10=parseInt(this.zIndex,10)+2;}_4.style(this._centerNode,"zIndex",_10);_4.style(this._underlayNode,"zIndex",_f);var pn=_b.parentNode;if(pn&&pn!==_4.body()&&_b!==_4.body()&&_b!==_4.doc){var obh=_d.h;var obw=_d.w;var _14=_4.position(pn,true);if(this._ieFixNode){_9=-this._ieFixNode.offsetTop/1000;_14.x=Math.floor((_14.x+0.9)/_9);_14.y=Math.floor((_14.y+0.9)/_9);_14.w=Math.floor((_14.w+0.9)/_9);_14.h=Math.floor((_14.h+0.9)/_9);}_14.w-=pn.scrollHeight>pn.clientHeight&&pn.clientHeight>0?_a.v:0;_14.h-=pn.scrollWidth>pn.clientWidth&&pn.clientWidth>0?_a.h:0;if(_8==="rtl"){if(_4.isOpera){_d.x+=pn.scrollHeight>pn.clientHeight&&pn.clientHeight>0?_a.v:0;_14.x+=pn.scrollHeight>pn.clientHeight&&pn.clientHeight>0?_a.v:0;}else{if(_4.isIE){_14.x+=pn.scrollHeight>pn.clientHeight&&pn.clientHeight>0?_a.v:0;}else{if(_4.isWebKit){}}}}if(_14.w<_d.w){_d.w=_d.w-_14.w;}if(_14.h<_d.h){_d.h=_d.h-_14.h;}var _15=_14.y;var _16=_14.y+_14.h;var _17=_d.y;var _18=_d.y+obh;var _19=_14.x;var _1a=_14.x+_14.w;var _1b=_d.x;var _1c=_d.x+obw;var _1d;if(_18>_15&&_17<_15){_d.y=_14.y;_1d=_15-_17;var _1e=obh-_1d;if(_1e<_14.h){_d.h=_1e;}else{_d.h-=2*(pn.scrollWidth>pn.clientWidth&&pn.clientWidth>0?_a.h:0);}}else{if(_17<_16&&_18>_16){_d.h=_16-_17;}else{if(_18<=_15||_17>=_16){_d.h=0;}}}if(_1c>_19&&_1b<_19){_d.x=_14.x;_1d=_19-_1b;var _1f=obw-_1d;if(_1f<_14.w){_d.w=_1f;}else{_d.w-=2*(pn.scrollHeight>pn.clientHeight&&pn.clientHeight>0?_a.w:0);}}else{if(_1b<_1a&&_1c>_1a){_d.w=_1a-_1b;}else{if(_1c<=_19||_1b>=_1a){_d.w=0;}}}}if(_d.h>0&&_d.w>0){_4.style(this._underlayNode,{display:"block",width:_d.w+"px",height:_d.h+"px",top:_d.y+"px",left:_d.x+"px"});var _20=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"];this._cloneStyles(_20);if(!_4.isIE){_20=["MozBorderRadius","MozBorderRadiusTopleft","MozBorderRadiusTopright","MozBorderRadiusBottomleft","MozBorderRadiusBottomright","WebkitBorderRadius","WebkitBorderTopLeftRadius","WebkitBorderTopRightRadius","WebkitBorderBottomLeftRadius","WebkitBorderBottomRightRadius"];this._cloneStyles(_20,this);}var _21=(_d.h/2)-(_e.h/2);var _22=(_d.w/2)-(_e.w/2);if(_d.h>=_e.h&&_d.w>=_e.w){_4.style(this._centerNode,{top:(_21+_d.y)+"px",left:(_22+_d.x)+"px",display:"block"});}else{_4.style(this._centerNode,"display","none");}}else{_4.style(this._underlayNode,"display","none");_4.style(this._centerNode,"display","none");}if(this._resizeCheck===null){var _23=this;this._resizeCheck=setInterval(function(){_23._size();},100);}}},_cloneStyles:function(_24){_4.forEach(_24,function(_25){_4.style(this._underlayNode,_25,_4.style(this.target,_25));},this);},_fadeIn:function(){var _26=this;var _27=_4.animateProperty({duration:_26.duration,node:_26._underlayNode,properties:{opacity:{start:0,end:0.75}}});var _28=_4.animateProperty({duration:_26.duration,node:_26._centerNode,properties:{opacity:{start:0,end:1}},onEnd:function(){_26.onShow();}});var _29=_4.fx.combine([_27,_28]);_29.play();},_fadeOut:function(){var _2a=this;var _2b=_4.animateProperty({duration:_2a.duration,node:_2a._underlayNode,properties:{opacity:{start:0.75,end:0}},onEnd:function(){_4.style(this.node,{"display":"none","zIndex":"-1000"});}});var _2c=_4.animateProperty({duration:_2a.duration,node:_2a._centerNode,properties:{opacity:{start:1,end:0}},onEnd:function(){_4.style(this.node,{"display":"none","zIndex":"-1000"});_2a.onHide();_2a._enableOverflow();}});var _2d=_4.fx.combine([_2b,_2c]);_2d.play();},_ignore:function(_2e){if(_2e){_4.stopEvent(_2e);}},_scrollerWidths:function(){var div=_4.doc.createElement("div");_4.style(div,{position:"absolute",opacity:0,overflow:"hidden",width:"50px",height:"50px",zIndex:"-100",top:"-200px",left:"-200px",padding:"0px",margin:"0px"});var _2f=_4.doc.createElement("div");_4.style(_2f,{width:"200px",height:"10px"});div.appendChild(_2f);_4.body().appendChild(div);var b=_4.contentBox(div);_4.style(div,"overflow","scroll");var a=_4.contentBox(div);_4.body().removeChild(div);return {v:b.w-a.w,h:b.h-a.h};},_setTextAttr:function(_30){this._textNode.innerHTML=_30;this.text=_30;},_setColorAttr:function(c){_4.style(this._underlayNode,"backgroundColor",c);this.color=c;},_setImageTextAttr:function(_31){_4.attr(this._imageNode,"alt",_31);this.imageText=_31;},_setImageAttr:function(url){_4.attr(this._imageNode,"src",url);this.image=url;},_setCenterIndicatorAttr:function(_32){this.centerIndicator=_32;if(_32==="image"){this._centerNode=this._imageNode;_4.style(this._textNode,"display","none");}else{this._centerNode=this._textNode;_4.style(this._imageNode,"display","none");}},_disableOverflow:function(){if(this.target===_4.body()||this.target===_4.doc){this._overflowDisabled=true;var _33=_4.body();if(_33.style&&_33.style.overflow){this._oldOverflow=_4.style(_33,"overflow");}else{this._oldOverflow="";}if(_4.isIE&&!_4.isQuirks){if(_33.parentNode&&_33.parentNode.style&&_33.parentNode.style.overflow){this._oldBodyParentOverflow=_33.parentNode.style.overflow;}else{try{this._oldBodyParentOverflow=_4.style(_33.parentNode,"overflow");}catch(e){this._oldBodyParentOverflow="scroll";}}_4.style(_33.parentNode,"overflow","hidden");}_4.style(_33,"overflow","hidden");}},_enableOverflow:function(){if(this._overflowDisabled){delete this._overflowDisabled;var _34=_4.body();if(_4.isIE&&!_4.isQuirks){_34.parentNode.style.overflow=this._oldBodyParentOverflow;delete this._oldBodyParentOverflow;}_4.style(_34,"overflow",this._oldOverflow);if(_4.isWebKit){var div=_4.create("div",{style:{height:"2px"}});_34.appendChild(div);setTimeout(function(){_34.removeChild(div);},0);}delete this._oldOverflow;}}});}}};});