(function(){var a=function(){this.toolbars=[];this.focusCommandExecuted=false;};a.prototype.focus=function(){for(var c=0,d;d=this.toolbars[c++];)for(var e=0,f;f=d.items[e++];){if(f.focus){f.focus();return;}}};var b={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(c){if(c.toolbox){c.toolbox.focusCommandExecuted=true;if(CKEDITOR.env.ie)setTimeout(function(){c.toolbox.focus();},100);else c.toolbox.focus();}}}};CKEDITOR.plugins.add('toolbar',{init:function(c){var d=function(e,f){var g,h,i,j=c.lang.dir=='rtl';switch(f){case j?37:39:case 9:do{g=e.next;if(!g){h=e.toolbar.next;i=h&&h.items.length;while(i===0){h=h.next;i=h&&h.items.length;}if(h)g=h.items[0];}e=g;}while(e&&!e.focus)if(e)e.focus();else c.toolbox.focus();return false;case j?39:37:case CKEDITOR.SHIFT+9:do{g=e.previous;if(!g){h=e.toolbar.previous;i=h&&h.items.length;while(i===0){h=h.previous;i=h&&h.items.length;}if(h)g=h.items[i-1];}e=g;}while(e&&!e.focus)if(e)e.focus();else{var k=c.toolbox.toolbars[c.toolbox.toolbars.length-1].items;k[k.length-1].focus();}return false;case 27:c.focus();return false;case 13:case 32:e.execute();return false;}return true;};c.on('themeSpace',function(e){if(e.data.space==c.config.toolbarLocation){c.toolbox=new a();var f='cke_'+CKEDITOR.tools.getNextNumber(),g=['<div class="cke_toolbox" role="toolbar" aria-labelledby="',f,'"'],h=c.config.toolbarStartupExpanded!==false,i;g.push(h?'>':' style="display:none">');g.push('<span id="',f,'" class="cke_voice_label">',c.lang.toolbar,'</span>');var j=c.toolbox.toolbars,k=c.config.toolbar instanceof Array?c.config.toolbar:c.config['toolbar_'+c.config.toolbar];for(var l=0;l<k.length;l++){var m=k[l];if(!m)continue;var n='cke_'+CKEDITOR.tools.getNextNumber(),o={id:n,items:[]};if(i){g.push('</div>');i=0;}if(m==='/'){g.push('<div class="cke_break"></div>');continue;}g.push('<span id="',n,'" class="cke_toolbar" role="presentation"><span class="cke_toolbar_start"></span>');var p=j.push(o)-1;if(p>0){o.previous=j[p-1];o.previous.next=o;}for(var q=0;q<m.length;q++){var r,s=m[q];if(s=='-')r=CKEDITOR.ui.separator;else r=c.ui.create(s);if(r){if(r.canGroup){if(!i){g.push('<span class="cke_toolgroup" role="presentation">');i=1;}}else if(i){g.push('</span>');i=0;}var t=r.render(c,g);p=o.items.push(t)-1;if(p>0){t.previous=o.items[p-1];t.previous.next=t;}t.toolbar=o;t.onkey=d;t.onfocus=function(){if(!c.toolbox.focusCommandExecuted)c.focus();};}}if(i){g.push('</span>');i=0;}g.push('<span class="cke_toolbar_end"></span></span>');}g.push('</div>');if(c.config.toolbarCanCollapse){var u=CKEDITOR.tools.addFunction(function(){c.execCommand('toolbarCollapse');
});c.on('destroy',function(){CKEDITOR.tools.removeFunction(u);});var v='cke_'+CKEDITOR.tools.getNextNumber();c.addCommand('toolbarCollapse',{exec:function(w){var x=CKEDITOR.document.getById(v),y=x.getPrevious(),z=w.getThemeSpace('contents'),A=y.getParent(),B=parseInt(z.$.style.height,10),C=A.$.offsetHeight,D=!y.isVisible();if(!D){y.hide();x.addClass('cke_toolbox_collapser_min');x.setAttribute('title',w.lang.toolbarExpand);}else{y.show();x.removeClass('cke_toolbox_collapser_min');x.setAttribute('title',w.lang.toolbarCollapse);}x.getFirst().setText(D?'▲':'◀');var E=A.$.offsetHeight-C;z.setStyle('height',B-E+'px');w.fire('resize');},modes:{wysiwyg:1,source:1}});g.push('<a title="'+(h?c.lang.toolbarCollapse:c.lang.toolbarExpand)+'" id="'+v+'" tabIndex="-1" class="cke_toolbox_collapser');if(!h)g.push(' cke_toolbox_collapser_min');g.push('" onclick="CKEDITOR.tools.callFunction('+u+')">','<span>&#9650;</span>','</a>');}e.data.html+=g.join('');}});c.addCommand('toolbarFocus',b.toolbarFocus);}});})();CKEDITOR.ui.separator={render:function(a,b){b.push('<span class="cke_separator" role="separator"></span>');return{};}};CKEDITOR.config.toolbarLocation='top';CKEDITOR.config.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];CKEDITOR.config.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];CKEDITOR.config.toolbar='Full';CKEDITOR.config.toolbarCanCollapse=true;
