(function(){var a={editorFocus:false,modes:{wysiwyg:1,source:1}},b={exec:function(d){d.container.focusNext(true,d.tabIndex);}},c={exec:function(d){d.container.focusPrevious(true,d.tabIndex);}};CKEDITOR.plugins.add('tab',{requires:['keystrokes'],init:function(d){var e=d.config.tabSpaces||0,f='';while(e--)f+='\xa0';if(f)d.on('key',function(g){if(g.data.keyCode==9){d.insertHtml(f);g.cancel();}});if(CKEDITOR.env.webkit||CKEDITOR.env.gecko)d.on('key',function(g){var h=g.data.keyCode;if(h==9&&!f){g.cancel();d.execCommand('blur');}if(h==CKEDITOR.SHIFT+9){d.execCommand('blurBack');g.cancel();}});d.addCommand('blur',CKEDITOR.tools.extend(b,a));d.addCommand('blurBack',CKEDITOR.tools.extend(c,a));}});})();CKEDITOR.dom.element.prototype.focusNext=function(a,b){var k=this;var c=k.$,d=b===undefined?k.getTabIndex():b,e,f,g,h,i,j;if(d<=0){i=k.getNextSourceNode(a,CKEDITOR.NODE_ELEMENT);while(i){if(i.isVisible()&&i.getTabIndex()===0){g=i;break;}i=i.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT);}}else{i=k.getDocument().getBody().getFirst();while(i=i.getNextSourceNode(false,CKEDITOR.NODE_ELEMENT)){if(!e)if(!f&&i.equals(k)){f=true;if(a){if(!(i=i.getNextSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1;}}else if(f&&!k.contains(i))e=1;if(!i.isVisible()||(j=i.getTabIndex())<0)continue;if(e&&j==d){g=i;break;}if(j>d&&(!g||!h||j<h)){g=i;h=j;}else if(!g&&j===0){g=i;h=j;}}}if(g)g.focus();};CKEDITOR.dom.element.prototype.focusPrevious=function(a,b){var k=this;var c=k.$,d=b===undefined?k.getTabIndex():b,e,f,g,h=0,i,j=k.getDocument().getBody().getLast();while(j=j.getPreviousSourceNode(false,CKEDITOR.NODE_ELEMENT)){if(!e)if(!f&&j.equals(k)){f=true;if(a){if(!(j=j.getPreviousSourceNode(true,CKEDITOR.NODE_ELEMENT)))break;e=1;}}else if(f&&!k.contains(j))e=1;if(!j.isVisible()||(i=j.getTabIndex())<0)continue;if(d<=0){if(e&&i===0){g=j;break;}if(i>h){g=j;h=i;}}else{if(e&&i==d){g=j;break;}if(i<d&&(!g||i>h)){g=j;h=i;}}}if(g)g.focus();};
