function FullScreen(B,A){this.editor=B;B._superclean_on=false;cfg=B.config;cfg.registerButton("fullscreen",this._lc("Maximize/Minimize Editor"),[_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0],true,function(E,D,C){E._fullScreen()});cfg.addToolbarElement("fullscreen","popupeditor",0)}FullScreen._pluginInfo={name:"FullScreen",version:"1.0",developer:"James Sleeman",developer_url:"http://www.gogo.co.nz/",c_owner:"Gogo Internet Services",license:"htmlArea",sponsor:"Gogo Internet Services",sponsor_url:"http://www.gogo.co.nz/"};FullScreen.prototype._lc=function(A){return Xinha._lc(A,{url:_editor_url+"modules/FullScreen/lang/",context:"FullScreen"})};Xinha.prototype._fullScreen=function(){var C=this;function G(){if(!C._isFullScreen||C._sizing){return false}C._sizing=true;var L=Xinha.viewportSize();var M=L.y-C.config.fullScreenMargins[0]-C.config.fullScreenMargins[2];var K=L.x-C.config.fullScreenMargins[1]-C.config.fullScreenMargins[3];C.sizeEditor(K+"px",M+"px",true,true);C._sizing=false;if(C._toolbarObjects.fullscreen){C._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",9,0])}}function I(){if(C._isFullScreen||C._sizing){return false}C._sizing=true;C.initSize();C._sizing=false;if(C._toolbarObjects.fullscreen){C._toolbarObjects.fullscreen.swapImage([_editor_url+cfg.imgURL+"ed_buttons_main.gif",8,0])}}function A(){if(C._isFullScreen){window.scroll(0,0);window.setTimeout(A,150)}}if(typeof this._isFullScreen=="undefined"){this._isFullScreen=false;if(C.target!=C._iframe){Xinha._addEvent(window,"resize",G)}}if(Xinha.is_gecko){this.deactivateEditor()}if(this._isFullScreen){this._htmlArea.style.position="";if(!Xinha.is_ie){this._htmlArea.style.border=""}try{if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){var F=document.getElementsByTagName("html")}else{var F=document.getElementsByTagName("body")}F[0].style.overflow=""}catch(C){}this._isFullScreen=false;I();var E=this._htmlArea;while((E=E.parentNode)&&E.style){E.style.position=E._xinha_fullScreenOldPosition;E._xinha_fullScreenOldPosition=null}if(Xinha.ie_version<7){var D=document.getElementsByTagName("select");for(var B=0;B<D.length;++B){D[B].style.visibility="visible"}}window.scroll(this._unScroll.x,this._unScroll.y)}else{this._unScroll={x:(window.pageXOffset)?(window.pageXOffset):(document.documentElement)?document.documentElement.scrollLeft:document.body.scrollLeft,y:(window.pageYOffset)?(window.pageYOffset):(document.documentElement)?document.documentElement.scrollTop:document.body.scrollTop};var E=this._htmlArea;while((E=E.parentNode)&&E.style){E._xinha_fullScreenOldPosition=E.style.position;E.style.position="static"}if(Xinha.ie_version<7){var D=document.getElementsByTagName("select");var J,H;for(var B=0;B<D.length;++B){J=D[B];H=false;while(J=J.parentNode){if(J==this._htmlArea){H=true;break}}if(!H&&D[B].style.visibility!="hidden"){D[B].style.visibility="hidden"}}}window.scroll(0,0);this._htmlArea.style.position="absolute";this._htmlArea.style.zIndex=999;this._htmlArea.style.left=C.config.fullScreenMargins[3]+"px";this._htmlArea.style.top=C.config.fullScreenMargins[0]+"px";if(!Xinha.is_ie&&!Xinha.is_webkit){this._htmlArea.style.border="none"}this._isFullScreen=true;A();try{if(Xinha.is_ie&&document.compatMode=="CSS1Compat"){var F=document.getElementsByTagName("html")}else{var F=document.getElementsByTagName("body")}F[0].style.overflow="hidden"}catch(C){}G()}if(Xinha.is_gecko){this.activateEditor()}this.focusEditor()};