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