/* JCE Editor - 2.4beta2 | 26 March 2014 | http://www.joomlacontenteditor.net | Copyright (C) 2006 - 2014 Ryan Demmer. All rights reserved | GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html */
(function(win){var doc=win.document,body=doc.body,domLoaded=false;function ready(){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);return WFWindowPopup._init();},false);}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",arguments.callee);return WFWindowPopup._init();}});if(document.documentElement.doScroll&&window==window.top){(function(){if(domLoaded)
return;try{document.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}
return WFWindowPopup._init();})();}}
if(window.attachEvent){window.attachEvent('onload',function(){return WFWindowPopup._init();});}}
var WFWindowPopup={init:function(width,height,click){this.width=parseInt(width);this.height=parseInt(height);this.click=!!click;if(!this.width&&!this.height){return;}
if(!domLoaded){return ready();}
this._init();},_init:function(){this.resize();if(this.click){this.noclick();}},resize:function(){var x,oh=0;var vw=win.innerWidth||doc.documentElement.clientWidth||body.clientWidth||0;var vh=win.innerHeight||doc.documentElement.clientHeight||body.clientHeight||0;var divs=doc.getElementsByTagName('div');for(x=0;x<divs.length;x++){if(divs[x].className=='contentheading'){oh=divs[x].offsetHeight;}}
win.resizeBy(vw-this.config.width,vh-(this.config.height+oh));this.center();},center:function(){var vw=win.innerWidth||doc.documentElement.clientWidth||body.clientWidth||0;var vh=win.innerHeight||doc.documentElement.clientHeight||body.clientHeight||0;var x=(screen.width-vw)/2;var y=(screen.height-vh)/2;win.moveTo(x,y);},noclick:function(){doc.onmousedown=function(e){e=e||win.event;if(/msie/i.test(navigator.userAgent)){if(e.button==2)
return false;}else{if(e.which==2||e.which==3){return false;}}};doc.oncontextmenu=function(){return false;};}};win.WFWindowPopup=WFWindowPopup;})(window);