//>>built
define("dijit/_editor/plugins/AlwaysShowToolbar","dojo/_base/declare,dojo/dom-class,dojo/dom-construct,dojo/dom-geometry,dojo/_base/lang,dojo/sniff,dojo/_base/window,../_Plugin".split(","),function(j,g,h,d,k,f,m,l){return j("dijit._editor.plugins.AlwaysShowToolbar",l,{_handleScroll:!0,setEditor:function(b){if(b.iframe)this.editor=b,b.onLoadDeferred.then(k.hitch(this,this.enable))},enable:function(b){this._updateHeight();this.connect(window,"onscroll","globalOnScrollHandler");this.connect(this.editor,
"onNormalizedDisplayChanged","_updateHeight");return b},_updateHeight:function(){var b=this.editor;if(b.isLoaded&&!b.height){var a=d.getMarginSize(b.editNode).h;if(f("opera"))a=b.editNode.scrollHeight;if(!a)a=d.getMarginSize(b.document.body).h;if(0!=a){if(7>=f("ie")&&this.editor.minHeight){var e=parseInt(this.editor.minHeight);a<e&&(a=e)}if(a!=this._lastHeight)this._lastHeight=a,d.setMarginBox(b.iframe,{h:this._lastHeight})}}},_lastHeight:0,globalOnScrollHandler:function(){var b=7>f("ie");if(this._handleScroll){var a=
this.editor.header;if(!this._scrollSetUp)this._scrollSetUp=!0,this._scrollThreshold=d.position(a,!0).y;var e=d.docScroll(this.editor.ownerDocument).y,c=a.style;if(e>this._scrollThreshold&&e<this._scrollThreshold+this._lastHeight){if(!this._fixEnabled){var i=d.getMarginSize(a);this.editor.iframe.style.marginTop=i.h+"px";b?(c.left=d.position(a).x,this._IEOriginalPos=a.previousSibling?["after",a.previousSibling]:a.nextSibling?["before",a.nextSibling]:["last",a.parentNode],this.editor.ownerDocumentBody.appendChild(a),
g.add(a,"dijitIEFixedToolbar")):(c.position="fixed",c.top="0px");d.setMarginBox(a,{w:i.w});c.zIndex=2E3;this._fixEnabled=!0}b=this.height?parseInt(this.editor.height):this.editor._lastHeight;c.display=e>this._scrollThreshold+b?"none":""}else if(this._fixEnabled){this.editor.iframe.style.marginTop="";c.position="";c.top="";c.zIndex="";c.display="";if(b)c.left="",g.remove(a,"dijitIEFixedToolbar"),this._IEOriginalPos?(h.place(a,this._IEOriginalPos[1],this._IEOriginalPos[0]),this._IEOriginalPos=null):
h.place(a,this.editor.iframe,"before");c.width="";this._fixEnabled=!1}}},destroy:function(){this._IEOriginalPos=null;this._handleScroll=!1;this.inherited(arguments);7>f("ie")&&g.remove(this.editor.header,"dijitIEFixedToolbar")}})});