ckeditor.js
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:259k
源码类别:

Ajax

开发平台:

Others

  1. /*
  2. Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
  3. For licensing, see LICENSE.html or http://ckeditor.com/license
  4. */
  5. (function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'97KD',version:'3.0',revision:'4148',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\/])ckeditor(?:_basic)?(?:_source)?.js(?:?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?://[^/]*/)[0]+d;else d=location.href.match(/^[^?]*/(?:)/)[0]+d;return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d)if(b[e]==undefined)b[e]=d[e];};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++)if(f[e].fn==d)return e;return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--)if(k[n].priority<=h){k.splice(n+1,0,m);return;}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d){var e=this;e._={instanceConfig:b,element:c};
  6. e.elementMode=d||0;a.event.call(e);e._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&(d.tagName.toLowerCase()!='textarea')){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c){if(typeof b!='object'){b=document.getElementById(b);if(!b)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,b,2);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([d.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*(100)+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair/(d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit/(d+)/)[1]);d.version=e;d.isCompatible=d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false;d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript';
  7. e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var h=g(e,f);a.add(h);return h;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f){return d(e,f,a.editor.appendTo);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f<e.length;f++){var g=null,h=e[f],i=h.name;if(!h.name&&!h.id)continue;if(typeof arguments[0]=='string'){var j=new RegExp('(?:^| )'+arguments[0]+'(?:$| )');if(!j.test(h.className))continue;}else if(typeof arguments[0]=='function'){g={};if(arguments[0](h,g)===false)continue;}this.replace(h,g);}};(function(){var e=function(){var f=a.loadFullCore,g=a.loadFullCoreTimeout;if(a.replaceByClassEnabled)a.replaceAll(a.replaceClass);a.status='basic_ready';if(f&&f._load)f();else if(g)setTimeout(function(){if(a.loadFullCore)a.loadFullCore();},g*1000);};if(window.addEventListener)window.addEventListener('load',e,false);else if(window.attachEvent)window.attachEvent('onload',e);})();a.status='basic_loaded';})();a.dom={};var d=a.dom;(function(){var e=[];a.tools={arrayCompare:function(f,g){if(!f&&!g)return true;if(!f||!g||f.length!=g.length)return false;for(var h=0;h<f.length;h++)if(f[h]!=g[h])return false;return true;},clone:function(f){var g;if(f&&f instanceof Array){g=[];for(var h=0;h<f.length;h++)g[h]=this.clone(f[h]);return g;}if(f===null||typeof f!='object'||f instanceof String||f instanceof Number||f instanceof Boolean||f instanceof Date)return f;g=new f.constructor();for(var i in f){var j=f[i];g[i]=this.clone(j);}return g;},extend:function(f){var g=arguments.length,h,i;if(typeof (h=arguments[g-1])=='boolean')g--;else if(typeof (h=arguments[g-2])=='boolean'){i=arguments[g-1];g-=2;}for(var j=1;j<g;j++){var k=arguments[j];for(var l in k)if(h===true||f[l]==undefined)if(!i||l in i)f[l]=k[l];}return f;},prototypedCopy:function(f){var g=function(){};g.prototype=f;return new g();},isArray:function(f){return!!f&&f instanceof Array;},cssStyleToDomStyle:function(f){if(f=='float')return 'cssFloat';else return f.replace(/-./g,function(g){return g.substr(1).toUpperCase();});},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'n');
  8. }:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g('  ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},getNextNumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ tnr]+)|(?:[ tnr]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ tnr]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ tnr]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++)if(f[h]===g)return h;return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){f.apply(g||this,arguments);})-1;},callFunction:function(f){var g=e[f];return g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var f=/^d+(?:.d+)?$/;return function(g){return g+(f.test(g)?'px':'');};})(),repeat:function(f,g){return new Array(g+1).join(f);}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};
  9. return{$block:x,$body:f({script:1},x),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},$listItem:{dd:1,dt:1,li:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:v,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,script:t,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:v,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r};})();var f=a.dtd;d.event=function(g){this.$=g;};d.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var h=this;var g=h.getKey();if(h.$.ctrlKey||h.$.metaKey)g+=1000;if(h.$.shiftKey)g+=2000;if(h.$.altKey)g+=4000;return g;},preventDefault:function(g){var h=this.$;if(h.preventDefault)h.preventDefault();else h.returnValue=false;if(g)if(h.stopPropagation)h.stopPropagation();else h.cancelBubble=true;},getTarget:function(){var g=this.$.target||this.$.srcElement;return g?new d.node(g):null;}};a.CTRL=1000;a.SHIFT=2000;a.ALT=4000;d.domObject=function(g){if(g)this.$=g;};d.domObject.prototype=(function(){var g=function(h,i){return function(j){if(typeof a!='undefined')h.fire(i,new d.event(j));};};return{getPrivate:function(){var h;if(!(h=this.getCustomData('_')))this.setCustomData('_',h={});return h;},on:function(h){var k=this;var i=k.getCustomData('_cke_nativeListeners');if(!i){i={};k.setCustomData('_cke_nativeListeners',i);}if(!i[h]){var j=i[h]=g(k,h);if(k.$.addEventListener)k.$.addEventListener(h,j,!!a.event.useCapture);else if(k.$.attachEvent)k.$.attachEvent('on'+h,j);}return a.event.prototype.on.apply(k,arguments);
  10. },removeListener:function(h){var k=this;a.event.prototype.removeListener.apply(k,arguments);if(!k.hasListeners(h)){var i=k.getCustomData('_cke_nativeListeners'),j=i&&i[h];if(j){if(k.$.removeEventListener)k.$.removeEventListener(h,j,false);else if(k.$.detachEvent)k.$.detachEvent('on'+h,j);delete i[h];}}}};})();(function(g){var h={};g.equals=function(i){return i&&i.$===this.$;};g.setCustomData=function(i,j){var k=this.getUniqueId(),l=h[k]||(h[k]={});l[i]=j;return this;};g.getCustomData=function(i){var j=this.$._cke_expando,k=j&&h[j];return k&&k[i];};g.removeCustomData=function(i){var j=this.$._cke_expando,k=j&&h[j],l=k&&k[i];if(typeof l!='undefined')delete k[i];return l||null;};g.getUniqueId=function(){return this.$._cke_expando||(this.$._cke_expando=e.getNextNumber());};a.event.implementOn(g);})(d.domObject.prototype);d.window=function(g){d.domObject.call(this,g);};d.window.prototype=new d.domObject();e.extend(d.window.prototype,{focus:function(){if(b.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||(0),height:(h?g.documentElement.clientHeight:g.body.clientHeight)||(0)};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!c&&i)h=i+':'+h;
  11. return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;})();}});d.node=function(h){if(h){switch(h.nodeType){case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_TEXT=3;a.NODE_COMMENT=8;a.NODE_DOCUMENT_FRAGMENT=11;a.POSITION_IDENTICAL=0;a.POSITION_DISCONNECTED=1;a.POSITION_FOLLOWING=2;a.POSITION_PRECEDING=4;a.POSITION_IS_CONTAINED=8;a.POSITION_CONTAINS=16;e.extend(d.node.prototype,{appendTo:function(h,i){h.append(this,i);return h;},clone:function(h,i){var j=this.$.cloneNode(h);if(!i){var k=function(l){if(l.nodeType!=1)return;l.removeAttribute('id',false);l.removeAttribute('_cke_expando',false);var m=l.childNodes;for(var n=0;n<m.length;n++)k(m[n]);};k(j);}return new d.node(j);},hasPrevious:function(){return!!this.$.previousSibling;},hasNext:function(){return!!this.$.nextSibling;},insertAfter:function(h){h.$.parentNode.insertBefore(this.$,h.$.nextSibling);return h;},insertBefore:function(h){h.$.parentNode.insertBefore(this.$,h.$);return h;},insertBeforeMe:function(h){this.$.parentNode.insertBefore(h.$,this.$);return h;},getAddress:function(h){var i=[],j=this.getDocument().$.documentElement,k=this.$;while(k&&k!=j){var l=k.parentNode,m=-1;for(var n=0;n<l.childNodes.length;n++){var o=l.childNodes[n];if(h&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(o==k)break;}i.unshift(m);k=k.parentNode;}return i;},getDocument:function(){var h=new g(this.$.ownerDocument||this.$.parentNode.ownerDocument);return(this.getDocument=function(){return h;})();},getIndex:function(){var h=this.$,i=h.parentNode&&h.parentNode.firstChild,j=-1;while(i){j++;if(i==h)return j;i=i.nextSibling;}return-1;},getNextSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getFirst&&this.getFirst(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getNext();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;
  12. l=m.getNext();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&i!=l.type)return l.getNextSourceNode(false,i,j);return l;},getPreviousSourceNode:function(h,i,j){if(j&&!j.call){var k=j;j=function(n){return!n.equals(k);};}var l=!h&&this.getLast&&this.getLast(),m;if(!l){if(this.type==1&&j&&j(this,true)===false)return null;l=this.getPrevious();}while(!l&&(m=(m||this).getParent())){if(j&&j(m,true)===false)return null;l=m.getPrevious();}if(!l)return null;if(j&&j(l)===false)return null;if(i&&l.type!=i)return l.getPreviousSourceNode(false,i,j);return l;},getPrevious:function(h){var i=this.$,j;do{i=i.previousSibling;j=i&&new d.node(i);}while(j&&h&&!h(j))return j;},getNext:function(h){var i=this.$,j;do{i=i.nextSibling;j=i&&new d.node(i);}while(j&&h&&!h(j))return j;},getParent:function(){var h=this.$.parentNode;return h&&h.nodeType==1?new d.node(h):null;},getParents:function(h){var i=this,j=[];do j[h?'push':'unshift'](i);while(i=i.getParent())return j;},getCommonAncestor:function(h){var j=this;if(h.equals(j))return j;if(h.contains&&h.contains(j))return h;var i=j.contains?j:j.getParent();do if(i.contains(h))return i;while(i=i.getParent())return null;},getPosition:function(h){var i=this.$,j=h.$;if(i.compareDocumentPosition)return i.compareDocumentPosition(j);if(i==j)return 0;if(this.type==1&&h.type==1){if(i.contains){if(i.contains(j))return 16+4;if(j.contains(i))return 8+2;}if('sourceIndex' in i)return i.sourceIndex<0||j.sourceIndex<0?1:i.sourceIndex<j.sourceIndex?4:2;}var k=this.getAddress(),l=h.getAddress(),m=Math.min(k.length,l.length);for(var n=0;n<=m-1;n++)if(k[n]!=l[n]){if(n<m)return k[n]<l[n]?4:2;break;}return k.length<l.length?16+4:8+2;},getAscendant:function(h,i){var j=this.$;if(!i)j=j.parentNode;while(j){if(j.nodeName&&j.nodeName.toLowerCase()==h)return new d.node(j);j=j.parentNode;}return null;},hasAscendant:function(h,i){var j=this.$;if(!i)j=j.parentNode;while(j){if(j.nodeName&&j.nodeName.toLowerCase()==h)return true;j=j.parentNode;}return false;},move:function(h,i){h.append(this.remove(),i);},remove:function(h){var i=this.$,j=i.parentNode;if(j){if(h)for(var k;k=i.firstChild;)j.insertBefore(i.removeChild(k),i);j.removeChild(i);}return this;},replace:function(h){this.insertBefore(h);h.remove();},trim:function(){this.ltrim();this.rtrim();},ltrim:function(){var k=this;var h;while(k.getFirst&&(h=k.getFirst())){if(h.type==3){var i=e.ltrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(j-i.length);k.$.removeChild(k.$.firstChild);
  13. }}break;}},rtrim:function(){var k=this;var h;while(k.getLast&&(h=k.getLast())){if(h.type==3){var i=e.rtrim(h.getText()),j=h.getLength();if(!i){h.remove();continue;}else if(i.length<j){h.split(i.length);k.$.lastChild.parentNode.removeChild(k.$.lastChild);}}break;}if(!c&&!b.opera){h=k.$.lastChild;if(h&&h.type==1&&h.nodeName.toLowerCase()=='br')h.parentNode.removeChild(h);}}});d.nodeList=function(h){this.$=h;};d.nodeList.prototype={count:function(){return this.$.length;},getItem:function(h){var i=this.$[h];return i?new d.node(i):null;}};d.element=function(h,i){if(typeof h=='string')h=(i?i.$:document).createElement(h);d.domObject.call(this,h);};var h=d.element;h.get=function(i){return i&&(i.$?i:new h(i));};h.prototype=new d.node();h.createFromHtml=function(i,j){var k=new h('div',j);k.setHtml(i);return k.getFirst().remove();};h.setMarker=function(i,j,k,l){var m=j.getCustomData('list_marker_id')||j.setCustomData('list_marker_id',e.getNextNumber()).getCustomData('list_marker_id'),n=j.getCustomData('list_marker_names')||j.setCustomData('list_marker_names',{}).getCustomData('list_marker_names');i[m]=j;n[k]=1;return j.setCustomData(k,l);};h.clearAllMarkers=function(i){for(var j in i)h.clearMarkers(i,i[j],true);};h.clearMarkers=function(i,j,k){var l=j.getCustomData('list_marker_names'),m=j.getCustomData('list_marker_id');for(var n in l)j.removeCustomData(n);j.removeCustomData('list_marker_names');if(k){j.removeCustomData('list_marker_id');delete i[m];}};e.extend(h.prototype,{type:1,addClass:function(i){var j=this.$.className;if(j){var k=new RegExp('(?:^|\s)'+i+'(?:\s|$)','');if(!k.test(j))j+=' '+i;}this.$.className=j||i;},removeClass:function(i){var j=this.getAttribute('class');if(j){var k=new RegExp('(?:^|\s+)'+i+'(?=\s|$)','i');if(k.test(j)){j=j.replace(k,'').replace(/^s+/,'');if(j)this.setAttribute('class',j);else this.removeAttribute('class');}}},hasClass:function(i){var j=new RegExp('(?:^|\s+)'+i+'(?=\s|$)','');return j.test(this.getAttribute('class'));},append:function(i,j){var k=this;if(typeof i=='string')i=k.getDocument().createElement(i);if(j)k.$.insertBefore(i.$,k.$.firstChild);else k.$.appendChild(i.$);return i;},appendHtml:function(i){var k=this;if(!k.$.childNodes.length)k.setHtml(i);else{var j=new h('div',k.getDocument());j.setHtml(i);j.moveChildren(k);}},appendText:function(i){if(this.$.text!=undefined)this.$.text+=i;else this.append(new d.text(i));},appendBogus:function(){var j=this;var i=j.getLast();while(i&&i.type==3&&!e.rtrim(i.getText()))i=i.getPrevious();
  14. if(!i||!i.is||!i.is('br'))j.append(b.opera?j.getDocument().createText(''):j.getDocument().createElement('br'));},breakParent:function(i){var l=this;var j=new d.range(l.getDocument());j.setStartAfter(l);j.setEndAfter(i);var k=j.extractContents();j.insertNode(l.remove());k.insertAfterNode(l);},contains:c||b.webkit?function(i){var j=this.$;return i.type!=1?j.contains(i.getParent().$):j!=i.$&&j.contains(i.$);}:function(i){return!!(this.$.compareDocumentPosition(i.$)&16);},focus:function(){try{this.$.focus();}catch(i){}},getHtml:function(){return this.$.innerHTML;},getOuterHtml:function(){var j=this;if(j.$.outerHTML)return j.$.outerHTML.replace(/<?[^>]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var l=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(l,j);if(k!==0&&l.$.tabIndex===0)k=null;return k;break;case 'checked':return l.$.checked;break;case 'style':return l.$.style.cssText;}return i.call(l,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i;}return(this.getName=function(){return i;})();},getValue:function(){return this.$.value;},getFirst:function(){var i=this.$.firstChild;
  15. return i?new d.node(i):null;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j<arguments.length;j++)if(arguments[j]==i)return true;return false;},isEditable:function(){var i=this.getName(),j=!f.$nonEditable[i]&&(f[i]||f.span);return j&&j['#'];},isIdentical:function(i){if(this.getName()!=i.getName())return false;var j=this.$.attributes,k=i.$.attributes,l=j.length,m=k.length;if(!c&&l!=m)return false;for(var n=0;n<l;n++){var o=j[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&(o.nodeValue!=i.getAttribute(o.nodeName)))return false;}if(c)for(n=0;n<m;n++){o=k[n];if((!c||o.specified&&o.nodeName!='_cke_expando')&&(o.nodeValue!=j.getAttribute(o.nodeName)))return false;}return true;},isVisible:function(){return this.$.offsetWidth&&this.$.style.visibility!='hidden';},hasAttributes:c&&(b.ie7Compat||b.ie6Compat)?function(){var i=this.$.attributes;for(var j=0;j<i.length;j++){var k=i[j];switch(k.nodeName){case 'class':if(this.getAttribute('class'))return true;case '_cke_expando':continue;default:if(k.specified)return true;}}return false;}:function(){var i=this.$.attributes;return i.length>1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex';i.call(this,j);};else return i;})(),removeAttributes:function(i){for(var j=0;j<i.length;j++)this.removeAttribute(i[j]);
  16. },removeStyle:function(i){var j=this;if(j.$.style.removeAttribute)j.$.style.removeAttribute(e.cssStyleToDomStyle(i));else j.setStyle(i,'');if(!j.$.style.cssText)j.removeAttribute('style');},setStyle:function(i,j){this.$.style[e.cssStyleToDomStyle(i)]=j;return this;},setStyles:function(i){for(var j in i)this.setStyle(j,i[j]);return this;},setOpacity:function(i){if(c){i=Math.round(i*100);this.setStyle('filter',i>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y;if(l>n||l<n-k)j.$.scrollTo(0,l);},setState:function(i){var j=this;switch(i){case 1:j.addClass('cke_on');j.removeClass('cke_off');
  17. j.removeClass('cke_disabled');break;case 0:j.addClass('cke_disabled');j.removeClass('cke_off');j.removeClass('cke_on');break;default:j.addClass('cke_off');j.removeClass('cke_on');j.removeClass('cke_disabled');break;}},getFrameDocument:function(){var i=this.$;try{i.contentWindow.document;}catch(j){i.src=i.src;if(c&&b.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l<k.length;l++){var m=k[l];if(m.specified||c&&m.nodeValue&&m.nodeName.toLowerCase()=='value'){var n=m.nodeName;if(n in j)continue;var o=p.getAttribute(n);if(o===null)o=m.nodeValue;i.setAttribute(n,o);}}if(p.$.style.cssText!=='')i.$.style.cssText=p.$.style.cssText;},renameNode:function(i){var l=this;if(l.getName()==i)return;var j=l.getDocument(),k=new h(i,j);l.copyAttributes(k);l.moveChildren(k);l.$.parentNode.replaceChild(k.$,l.$);k.$._cke_expando=l.$._cke_expando;l.$=k.$;},getChild:function(i){var j=this.$;if(!i.slice)j=j.childNodes[i];else while(i.length>0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;}});a.command=function(i,j){this.exec=function(k){if(this.state==0)return false;i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:a.getUrl('config.js'),autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',language:'',defaultLanguage:'en',enterMode:1,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',fullPage:false,height:200,plugins:'about,basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};
  18. var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getFirst().addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getFirst().removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-uk':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k)k=this.detect(l);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k){var l=this.languages,m=(navigator.userLanguage||navigator.language).toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),n=m[1],o=m[2];if(l[n+'-'+o])n=n+'-'+o;else if(!l[n])n=null;a.lang.detect=n?function(){return n;}:function(p){return p;};return n||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0)t(z);},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B<A.length;B++)A[B](y,z);},w=function(y){if(o!==true&&j[y]){u(y,true);return;}var z=k[y]||(k[y]=[]);z.push(u);if(z.length>1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};for(var x=0;x<q;x++)w(l[x]);},loadCode:function(l){var m=new h('script');m.setAttribute('type','text/javascript');m.appendText(l);m.appendTo(a.document.getHead());}};})();a.resourceManager=function(j,k){var l=this;
  19. l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';this.registered[j]=k||{};},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&k.file||this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++)if(!o[v[w]])s.push(v[w]);}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k);n.lang[l]=m;};(function(){var k={},l=function(m,n){var o=function(){k[m]=1;n();},p=new h('img');p.on('load',o);p.on('error',o);p.setAttribute('src',m);};a.imageCacher={load:function(m,n){var o=m.length,p=function(){if(--o===0)n();};for(var q=0;q<m.length;q++){var r=m[q];if(k[r])p();else l(r,p);}}};})();a.skins=(function(){var k={},l={},m={},n=function(o,p,q){var r=k[o],s=function(A){for(var B=0;B<A.length;B++)A[B]=a.getUrl(m[o]+A[B]);};if(!l[o]){var t=r.preload;if(t&&t.length>0){s(t);a.imageCacher.load(t,function(){l[o]=1;n(o,p,q);});return;}l[o]=1;}p=r[p];var u=!p||!!p._isLoaded;if(u)q&&q();else{var v=p._pending||(p._pending=[]);v.push(q);if(v.length>1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var A=0;A<v.length;A++)if(v[A])v[A]();
  20. }};if(!w){s(p.css);for(var z=0;z<p.css.length;z++)a.document.appendStyleSheet(p.css[z]);w=1;}if(!x){s(p.js);a.scriptLoader.load(p.js,function(){x=1;y();});}y();}};return{add:function(o,p){k[o]=p;p.skinPath=m[o]||(m[o]=a.getUrl('skins/'+o+'/'));},load:function(o,p,q){var r=o.skinName,s=o.skinPath;if(k[r]){n(r,p,q);var t=k[r];if(t.init)t.init(o);}else{m[r]=s;a.scriptLoader.load(s+'skin.js',function(){n(r,p,q);var u=k[r];if(u.init)u.init(o);});}}};})();a.themes=new a.resourceManager('themes/','theme');a.ui=function(k){if(k.ui)return k.ui;this._={handlers:{},items:{}};return this;};var k=a.ui;k.prototype={add:function(l,m,n){this._.items[l]={type:m,args:Array.prototype.slice.call(arguments,2)};},create:function(l){var m=this._.items[l],n=m&&this._.handlers[m.type];return n&&n.create.apply(this,m.args);},addHandler:function(l,m){this._.handlers[l]=m;}};(function(){var l=0,m=function(){var x='editor'+ ++l;return a.instances&&a.instances[x]?m():x;},n={},o=function(x){var y=x.config.customConfig;if(!y)return false;var z=n[y]||(n[y]={});if(z.fn){z.fn.call(x,x.config);if(x.config.customConfig==y||!o(x))x.fireOnce('customConfigLoaded');}else a.scriptLoader.load(y,function(){if(a.editorConfig)z.fn=a.editorConfig;else z.fn=function(){};o(x);});return true;},p=function(x,y){x.on('customConfigLoaded',function(){if(y){if(y.on)for(var z in y.on)x.on(z,y.on[z]);e.extend(x.config,y,true);delete x.config.on;}q(x);});if(y&&y.customConfig!=undefined)x.config.customConfig=y.customConfig;if(!o(x))x.fireOnce('customConfigLoaded');},q=function(x){var y=x.config.skin.split(','),z=y[0],A=a.getUrl(y[1]||'skins/'+z+'/');x.skinName=z;x.skinPath=A;x.skinClass='cke_skin_'+z;x.fireOnce('configLoaded');r(x);},r=function(x){a.lang.load(x.config.language,x.config.defaultLanguage,function(y,z){x.langCode=y;x.lang=e.prototypedCopy(z);if(b.gecko&&b.version<10900&&x.lang.dir=='rtl')x.lang.dir='ltr';s(x);});},s=function(x){var y=x.config,z=y.plugins,A=y.extraPlugins,B=y.removePlugins;if(A){var C=new RegExp('(?:^|,)(?:'+A.replace(/s*,s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');z+=','+A;}if(B){C=new RegExp('(?:^|,)(?:'+B.replace(/s*,s*/g,'|')+')(?=,|$)','g');z=z.replace(C,'');}j.load(z.split(','),function(D){var E=[],F=[],G=[];x.plugins=D;for(var H in D){var I=D[H],J=I.lang,K=j.getPath(H),L=null;I.path=K;if(J){L=e.indexOf(J,x.langCode)>=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js'));else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];
  21. for(var N=0;N<M.length;N++)for(var O=0;O<E.length;O++){var P=E[O];if(N===0&&F[O]&&P.lang)e.extend(x.lang,P.lang[F[O]]);if(P[M[N]])P[M[N]](x);}x.fire('pluginsLoaded');t(x);});});},t=function(x){a.skins.load(x,'editor',function(){u(x);});},u=function(x){var y=x.config.theme;a.themes.load(y,function(){var z=x.theme=a.themes.get(y);z.path=a.themes.getPath(y);z.build(x);if(x.config.autoUpdateElement)v(x);});},v=function(x){var y=x.element;if(x.elementMode==1&&y.is('textarea')){var z=y.$.form&&new h(y.$.form);if(z){function A(){x.updateElement();};z.on('submit',A);if(!z.$.submit.nodeName)z.$.submit=e.override(z.$.submit,function(B){return function(){x.updateElement();if(B.apply)B.apply(this,arguments);else B();};});x.on('destroy',function(){z.removeListener('submit',A);});}}};function w(){var x,y=this._.commands,z=this.mode;for(var A in y){x=y[A];x[x.modes[z]?'enable':'disable']();}};a.editor.prototype._init=function(){var z=this;var x=h.get(z._.element),y=z._.instanceConfig;delete z._.element;delete z._.instanceConfig;z._.commands={};z._.styles=[];z.element=x;z.name=x&&z.elementMode==1&&(x.getId()||x.getNameAtt())||m();if(z.name in a.instances)throw '[CKEDITOR.editor] The instance "'+z.name+'" already exists.';z.config=e.prototypedCopy(i);z.ui=new k(z);z.focusManager=new a.focusManager(z);a.fire('instanceCreated',null,z);z.on('mode',w,null,null,1);p(z,y);};})();e.extend(a.editor.prototype,{addCommand:function(l,m){return this._.commands[l]=new a.command(this,m);},addCss:function(l){this._.styles.push(l);},destroy:function(l){var m=this;if(!l)m.updateElement();m.theme.destroy(m);m.fire('destroy');a.remove(m);},execCommand:function(l,m){var n=this.getCommand(l),o={name:l,commandData:m,command:n};if(n&&n.state!=0)if(this.fire('beforeCommandExec',o)!==true){o.returnValue=n.exec(o.commandData);if(!n.async&&this.fire('afterCommandExec',o)!==true)return o.returnValue;}return false;},getCommand:function(l){return this._.commands[l];},getData:function(){var n=this;n.fire('beforeGetData');var l=n._.data;if(typeof l!='string'){var m=n.element;if(m&&n.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();else l='';}l={dataValue:l};n.fire('getData',l);return l.dataValue;},getSnapshot:function(){var l=this.fire('getSnapshot');if(typeof l!='string'){var m=this.element;if(m&&this.elementMode==1)l=m.is('textarea')?m.getValue():m.getHtml();}return l;},loadSnapshot:function(l){this.fire('loadSnapshot',l);},setData:function(l){var m={dataValue:l};this.fire('setData',m);this._.data=m.dataValue;
  22. this.fire('afterSetData',m);},insertHtml:function(l){this.fire('insertHtml',l);},insertElement:function(l){this.fire('insertElement',l);},checkDirty:function(){return this.mayBeDirty&&this._.previousValue!==this.getSnapshot();},resetDirty:function(){if(this.mayBeDirty)this._.previousValue=this.getSnapshot();},updateElement:function(){var m=this;var l=m.element;if(l&&m.elementMode==1)if(l.is('textarea'))l.setValue(m.getData());else l.setHtml(m.getData());}});a.on('loaded',function(){var l=a.editor._pending;if(l){delete a.editor._pending;for(var m=0;m<l.length;m++)l[m]._init();}});a.htmlParser=function(){this._={htmlPartsRegex:new RegExp("<(?:(?:\/([^>]+)>)|(?:!--([\S|\s]*?)-->)|(?:([^\s>]+)\s*((?:(?:[^"'>]+)|(?:"[^"]*")|(?:'[^']*'))*)\/?>))",'g')};};(function(){var l=/([w:]+)(?:(?:s*=s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^s>]+)))|(?=s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n)))return;if(typeof n!='string'){n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[trn ]{2,}|[trn]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o);}};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};
  23. };(function(){var l={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl);a.htmlParser.fragment.fromHtml=function(n,o){var p=new a.htmlParser(),q=[],r=new a.htmlParser.fragment(),s=[],t=r,u=false,v;function w(A){if(s.length>0)for(var B=0;B<s.length;B++){var C=s[B],D=C.name,E=f[D],F=t.name&&f[t.name];if((!F||F[D])&&(!A||!E||E[A]||!f[A])){C=C.clone();C.parent=t;t=C;s.splice(B,1);B--;}}};function x(A,B,C){B=B||t||r;if(o&&!B.type){var D,E;if(A.attributes&&(E=A.attributes._cke_real_element_type))D=E;else D=A.name;if(!(D in f.$body)){var F=t;t=B;p.onTagOpen(o,{});B=t;if(C)t=F;}}if(A._.isBlockLike&&A.name!='pre'){var G=A.children.length,H=A.children[G-1],I;if(H&&H.type==3)if(!(I=e.rtrim(H.value)))A.children.length=G-1;else H.value=I;}B.add(A);if(A.returnPoint){t=A.returnPoint;delete A.returnPoint;}};p.onTagOpen=function(A,B,C){var D=new a.htmlParser.element(A,B);if(D.isUnknown&&C)D.isEmpty=true;if(f.$removeEmpty[A]){s.push(D);return;}else if(A=='pre')u=true;else if(A=='br'&&u){t.add(new a.htmlParser.text('n'));return;}var E=t.name,F=E&&f[E]||(t._.isBlockLike?f.div:f.span);if(!D.isUnknown&&!t.isUnknown&&!F[A]){if(!E)return;var G=false;if(A==E)x(t,t.parent);else{if(m[E]){if(!v)v=t;}else{x(t,t.parent,true);if(!l[E])s.unshift(t);}G=true;}t=t.returnPoint||t.parent;if(G){p.onTagOpen.apply(this,arguments);return;}}w(A);D.parent=t;D.returnPoint=v;v=0;if(D.isEmpty)x(D);else t=D;};p.onTagClose=function(A){var B=0,C=[],D=t;while(D.type&&D.name!=A){if(!D._.isBlockLike){s.unshift(D);B++;}C.push(D);D=D.parent;}if(D.type){for(var E=0;E<C.length;E++){var F=C[E];x(F,F.parent);}t=D;if(t.name=='pre')u=false;x(D,D.parent);if(D==t)t=t.parent;}else{s.splice(0,B);B=0;}for(;B<s.length;B++)if(A==s[B].name){s.splice(B,1);B--;}};p.onText=function(A){if(!t._.hasInlineStarted&&!u){A=e.ltrim(A);if(A.length===0)return;}w();if(o&&!t.type)this.onTagOpen(o,{});if(!u)A=A.replace(/[trn ]{2,}|[trn]/g,' ');t.add(new a.htmlParser.text(A));};p.onCDATA=function(A){t.add(new a.htmlParser.cdata(A));};p.onComment=function(A){t.add(new a.htmlParser.comment(A));};p.parse(n);while(t.type){var y=t.parent,z=t;if(o&&!y.type&&!f.$body[z.name]){t=y;p.onTagOpen(o,{});y=t;}y.add(z);t=y;}return r;};a.htmlParser.fragment.prototype={add:function(n){var q=this;var o=q.children.length,p=o>0&&q.children[o-1]||null;if(p){if(n._.isBlockLike&&p.type==3){p.value=e.rtrim(p.value);if(p.value.length===0){q.children.pop();q.add(n);return;}}p.next=n;
  24. }n.previous=p;n.parent=q;q.children.push(n);q._.hasInlineStarted=n.type==3||n.type==1&&!n._.isBlockLike;},writeHtml:function(n,o){for(var p=0,q=this.children.length;p<q;p++)this.children[p].writeHtml(n,o);}};})();a.htmlParser.element=function(l,m){var q=this;q.name=l;q.attributes=m;q.children=[];var n=f,o=!!(n.$block[l]||n.$listItem[l]||n.$tableContent[l]),p=!!n.$empty[l];q.isEmpty=p;q.isUnknown=!n[l];q._={isBlockLike:o,hasInlineStarted:p||!o};};(function(){var l=function(m,n){m=m[0];n=n[0];return m<n?-1:m>n?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes;if(o._cke_replacedata){m.write(o._cke_replacedata);return;}var p=this,q=p.name,r,s;if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;if(p.name==q)break;q=p.name;if(!q){a.htmlParser.fragment.prototype.writeHtml.apply(p,arguments);return;}}o=p.attributes;}m.openTag(q,o);if(m.sortAttributes){var t=[];for(r in o){s=o[r];if(n&&(!(r=n.onAttributeName(r))||(s=n.onAttribute(p,r,s))===(false)))continue;t.push([r,s]);}t.sort(l);for(var u=0,v=t.length;u<v;u++){var w=t[u];m.attribute(w[0],w[1]);}}else for(r in o){s=o[r];if(n&&(!(r=n.onAttributeName(r))||(s=n.onAttribute(p,r,s))===(false)))continue;m.attribute(r,s);}m.openTagClose(q,p.isEmpty);if(!p.isEmpty){a.htmlParser.fragment.prototype.writeHtml.apply(p,arguments);m.closeTag(q);}}};})();(function(){a.htmlParser.filter=e.createClass({$:function(q){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};if(q)this.addRules(q,10);},proto:{addRules:function(q,r){var s=this;if(typeof r!='number')r=10;m(s._.elementNames,q.elementNames,r);m(s._.attributeNames,q.attributeNames,r);n(s._.elements,q.elements,r);n(s._.attributes,q.attributes,r);s._.text=o(s._.text,q.text,r)||s._.text;s._.comment=o(s._.comment,q.comment,r)||s._.comment;},onElementName:function(q){return l(q,this._.elementNames);},onAttributeName:function(q){return l(q,this._.attributeNames);},onText:function(q){var r=this._.text;return r?r.filter(q):q;},onComment:function(q){var r=this._.comment;return r?r.filter(q):q;},onElement:function(q){var v=this;var r=[v._.elements[q.name],v._.elements.$],s,t;for(var u=0;u<2;u++){s=r[u];if(s){t=s.filter(q,v);if(t===false)return null;if(t&&t!=q)return v.onElement(t);}}return q;},onAttribute:function(q,r,s){var t=this._.attributes[r];if(t){var u=t.filter(s,q,this);
  25. if(u===false)return false;if(typeof u!='undefined')return u;}return s;}}});function l(q,r){for(var s=0;q&&s<r.length;s++){var t=r[s];q=q.replace(t[0],t[1]);}return q;};function m(q,r,s){var t,u,v=q.length,w=r&&r.length;if(w){for(t=0;t<v&&q[t].pri<s;t++){}for(u=w-1;u>=0;u--){var x=r[u];x.pri=s;q.splice(t,0,x);}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s<this.length;s++){var t=this[s],u=t.apply(window,arguments);if(typeof u!='undefined'){if(u===false)return false;if(r&&u!=q)return u;}}return null;};})();a.htmlParser.basicWriter=e.createClass({$:function(){this._={output:[]};},proto:{openTag:function(l,m){this._.output.push('<',l);},openTagClose:function(l,m){if(m)this._.output.push(' />');else this._.output.push('>');},attribute:function(l,m){this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('</',l,'>');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('<!--',l,'-->');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q<r;q++){var s=p.getItem(q);if(s.type==1&&f.$block[s.getName()])return true;}return false;};d.elementPath=function(o){var u=this;var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;if(!q){if(!p&&l[t])p=s;if(m[t])if(!p&&t=='div'&&!n(s))p=s;else q=s;}r.push(s);if(t=='body')break;}s=s.getParent();}u.block=p;u.blockLimit=q;u.elements=r;};})();d.elementPath.prototype={compare:function(l){var m=this.elements,n=l&&l.elements;
  26. if(!n||m.length!=n.length)return false;for(var o=0;o<m.length;o++)if(!m[o].equals(n[o]))return false;return true;}};d.text=function(l,m){if(typeof l=='string')l=(m?m.$:document).createTextNode(l);this.$=l;};d.text.prototype=new d.node();e.extend(d.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},split:function(l){var q=this;if(c&&l==q.getLength()){var m=q.getDocument().createText('');m.insertAfter(q);return m;}var n=q.getDocument(),o=new d.text(q.$.splitText(l),n);if(b.ie8){var p=new d.text('',n);p.insertAfter(o);p.remove();}return o;},substring:function(l,m){if(typeof m!='number')return this.$.nodeValue.substr(l);else return this.$.nodeValue.substring(l,m);}});d.documentFragment=function(l){l=l||a.document;this.$=l.$.createDocumentFragment();};e.extend(d.documentFragment.prototype,h.prototype,{type:11,insertAfterNode:function(l){l=l.$;l.parentNode.insertBefore(this.$,l.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});(function(){function l(p,q){if(this._.end)return null;var r,s=this.range,t,u=this.guard,v=this.type,w=p?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;s.trim();if(s.collapsed){this.end();return null;}}if(!p&&!this._.guardLTR){var x=s.endContainer,y=x.getChild(s.endOffset);this._.guardLTR=function(C,D){return(!D||!x.equals(C))&&((!y||!C.equals(y))&&(C.type!=1||C.getName()!='body'));};}if(p&&!this._.guardRTL){var z=s.startContainer,A=s.startOffset>0&&z.getChild(s.startOffset-1);this._.guardRTL=function(C,D){return(!D||!z.equals(C))&&((!A||!C.equals(A))&&(C.type!=1||C.getName()!='body'));};}var B=p?this._.guardRTL:this._.guardLTR;if(u)t=function(C,D){if(B(C,D)===false)return false;return u(C);};else t=B;if(this.current)r=this.current[w](false,v,t);else if(p){r=s.endContainer;if(s.endOffset>0){r=r.getChild(s.endOffset-1);if(t(r)===false)r=null;}else r=t(r)===false?null:r.getPreviousSourceNode(true,v,t);}else{r=s.startContainer;r=r.getChild(s.startOffset);if(r){if(t(r)===false)r=null;}else r=t(s.startContainer)===false?null:s.startContainer.getNextSourceNode(true,v,t);}while(r&&!this._.end){this.current=r;if(!this.evaluator||this.evaluator(r)!==false){if(!q)return r;}else if(q&&this.evaluator)return false;r=r[w](false,v,t);}this.end();return this.current=null;};function m(p){var q,r=null;
  27. while(q=l.call(this,p))r=q;return r;};d.walker=e.createClass({$:function(p){this.range=p;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(p){var q=e.extend({},o,p||{});return n[this.getComputedStyle('display')]||q[this.getName()];};d.walker.blockBoundary=function(p){return function(q,r){return!(q.type==1&&q.isBlockBoundary(p));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(p){},d.walker.bookmark=function(p,q){function r(s){return s&&s.getName&&s.getName()=='span'&&s.hasAttribute('_fck_bookmark');};return function(s){var t,u;t=s&&!s.getName&&(u=s.getParent())&&(r(u));t=p?t:t||r(s);return q^t;};};d.walker.whitespaces=function(p){return function(q){var r=q&&q.type==3&&!e.trim(q.getText());return p^r;};};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(q){q.collapsed=q.startContainer&&q.endContainer&&q.startContainer.equals(q.endContainer)&&q.startOffset==q.endOffset;},m=function(q,r,s){q.optimizeBookmark();var t=q.startContainer,u=q.endContainer,v=q.startOffset,w=q.endOffset,x,y;if(u.type==3)u=u.split(w);else if(u.getChildCount()>0)if(w>=u.getChildCount()){u=u.append(q.document.createText(''));y=true;}else u=u.getChild(w);if(t.type==3){t.split(v);if(t.equals(u))u=t.getNext();}else if(!v){t=t.getFirst().insertBeforeMe(q.document.createText(''));x=true;}else if(v>=t.getChildCount()){t=t.append(q.document.createText(''));x=true;}else t=t.getChild(v).getPrevious();var z=t.getParents(),A=u.getParents(),B,C,D;for(B=0;B<z.length;B++){C=z[B];D=A[B];if(!C.equals(D))break;}var E=s,F,G,H,I;for(var J=B;J<z.length;J++){F=z[J];if(E&&!F.equals(t))G=E.append(F.clone());H=F.getNext();while(H){if(H.equals(A[J])||H.equals(u))break;I=H.getNext();if(r==2)E.append(H.clone(true));else{H.remove();if(r==1)E.append(H);
  28. }H=I;}if(E)E=G;}E=s;for(var K=B;K<A.length;K++){F=A[K];if(r>0&&!F.equals(u))G=E.append(F.clone());if(!z[K]||F.$.parentNode!=z[K].$.parentNode){H=F.getPrevious();while(H){if(H.equals(z[K])||H.equals(t))break;I=H.getPrevious();if(r==2)E.$.insertBefore(H.$.cloneNode(true),E.$.firstChild);else{H.remove();if(r==1)E.$.insertBefore(H.$,E.$.firstChild);}H=I;}}if(E)E=G;}if(r==2){var L=q.startContainer;if(L.type==3){L.$.data+=L.$.nextSibling.data;L.$.parentNode.removeChild(L.$.nextSibling);}var M=q.endContainer;if(M.type==3&&M.$.nextSibling){M.$.data+=M.$.nextSibling.data;M.$.parentNode.removeChild(M.$.nextSibling);}}else{if(C&&D&&(t.$.parentNode!=C.$.parentNode||u.$.parentNode!=D.$.parentNode)){var N=D.getIndex();if(x&&D.$.parentNode==t.$.parentNode)N--;q.setStart(D.getParent(),N);}q.collapse(true);}if(x)t.remove();if(y&&u.$.parentNode)u.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(q){var r=false,s=d.walker.bookmark(true);return function(t){if(s(t))return true;if(t.type==3){if(e.trim(t.getText()).length)return false;}else if(!n[t.getName()])if(!q&&!c&&t.getName()=='br'&&!r)r=true;else return false;return true;};};function p(q){return q.type!=3&&q.getName() in f.$removeEmpty||!e.trim(q.getText())||q.getParent().hasAttribute('_fck_bookmark');};d.range.prototype={clone:function(){var r=this;var q=new d.range(r.document);q.startContainer=r.startContainer;q.startOffset=r.startOffset;q.endContainer=r.endContainer;q.endOffset=r.endOffset;q.collapsed=r.collapsed;return q;},collapse:function(q){var r=this;if(q){r.endContainer=r.startContainer;r.endOffset=r.startOffset;}else{r.startContainer=r.endContainer;r.startOffset=r.endOffset;}r.collapsed=true;},cloneContents:function(){var q=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,q);return q;},deleteContents:function(){if(this.collapsed)return;m(this,0);},extractContents:function(){var q=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,q);return q;},createBookmark:function(q){var v=this;var r,s,t,u;r=v.document.createElement('span');r.setAttribute('_fck_bookmark',1);r.setStyle('display','none');r.setHtml('&nbsp;');if(q){t='cke_bm_'+e.getNextNumber();r.setAttribute('id',t+'S');}if(!v.collapsed){s=r.clone();s.setHtml('&nbsp;');if(q)s.setAttribute('id',t+'E');u=v.clone();u.collapse();u.insertNode(s);}u=v.clone();u.collapse(true);u.insertNode(r);if(s){v.setStartAfter(r);
  29. v.setEndBefore(s);}else v.moveToPosition(r,4);return{startNode:q?t+'S':r,endNode:q?t+'E':s,serializable:q};},createBookmark2:function(q){var x=this;var r=x.startContainer,s=x.endContainer,t=x.startOffset,u=x.endOffset,v,w;if(!r||!s)return{start:0,end:0};if(q){if(r.type==1){v=r.getChild(t);if(v&&v.type==3&&t>0&&v.getPrevious().type==3){r=v;t=0;}}while(r.type==3&&(w=r.getPrevious())&&(w.type==3)){r=w;t+=w.getLength();}if(!x.isCollapsed){if(s.type==1){v=s.getChild(u);if(v&&v.type==3&&u>0&&v.getPrevious().type==3){s=v;u=0;}}while(s.type==3&&(w=s.getPrevious())&&(w.type==3)){s=w;u+=w.getLength();}}}return{start:r.getAddress(q),end:x.isCollapsed?null:s.getAddress(q),startOffset:t,endOffset:u,normalized:q,is2:true};},moveToBookmark:function(q){var y=this;if(q.is2){var r=y.document.getByAddress(q.start,q.normalized),s=q.startOffset,t=q.end&&y.document.getByAddress(q.end,q.normalized),u=q.endOffset;y.setStart(r,s);if(t)y.setEnd(t,u);else y.collapse(true);}else{var v=q.serializable,w=v?y.document.getById(q.startNode):q.startNode,x=v?y.document.getById(q.endNode):q.endNode;y.setStartBefore(w);w.remove();if(x){y.setEndBefore(x);x.remove();}else y.collapse(true);}},getBoundaryNodes:function(){var v=this;var q=v.startContainer,r=v.endContainer,s=v.startOffset,t=v.endOffset,u;if(q.type==1){u=q.getChildCount();if(u>s)q=q.getChild(s);else if(u<1)q=q.getPreviousSourceNode();else{q=q.$;while(q.lastChild)q=q.lastChild;q=new d.node(q);q=q.getNextSourceNode()||q;}}if(r.type==1){u=r.getChildCount();if(u>t)r=r.getChild(t).getPreviousSourceNode(true);else if(u<1)r=r.getPreviousSourceNode();else{r=r.$;while(r.lastChild)r=r.lastChild;r=new d.node(r);}}if(q.getPosition(r)&2)q=r;return{startNode:q,endNode:r};},getCommonAncestor:function(q,r){var v=this;var s=v.startContainer,t=v.endContainer,u;if(s.equals(t)){if(q&&s.type==1&&v.startOffset==v.endOffset-1)u=s.getChild(v.startOffset);else u=s;}else u=s.getCommonAncestor(t);return r&&!u.is?u.getParent():u;},optimize:function(){var s=this;var q=s.startContainer,r=s.startOffset;if(q.type!=1)if(!r)s.setStartBefore(q);else if(r>=q.getLength())s.setStartAfter(q);q=s.endContainer;r=s.endOffset;if(q.type!=1)if(!r)s.setEndBefore(q);else if(r>=q.getLength())s.setEndAfter(q);},optimizeBookmark:function(){var s=this;var q=s.startContainer,r=s.endContainer;if(q.is&&q.is('span')&&q.hasAttribute('_fck_bookmark'))s.setStartAt(q,3);if(r&&r.is&&r.is('span')&&r.hasAttribute('_fck_bookmark'))s.setEndAt(r,4);},trim:function(q,r){var y=this;var s=y.startContainer,t=y.startOffset,u=y.collapsed;
  30. if((!q||u)&&(s&&s.type==3)){if(!t){t=s.getIndex();s=s.getParent();}else if(t>=s.getLength()){t=s.getIndex()+1;s=s.getParent();}else{var v=s.split(t);t=s.getIndex()+1;s=s.getParent();if(!u&&y.startContainer.equals(y.endContainer))y.setEnd(v,y.endOffset-y.startOffset);}y.setStart(s,t);if(u)y.collapse(true);}var w=y.endContainer,x=y.endOffset;if(!(r||u)&&w&&w.type==3){if(!x){x=w.getIndex();w=w.getParent();}else if(x>=w.getLength()){x=w.getIndex()+1;w=w.getParent();}else{w.split(x);x=w.getIndex()+1;w=w.getParent();}y.setEnd(w,x);}},enlarge:function(q){switch(q){case 1:if(this.collapsed)return;var r=this.getCommonAncestor(),s=this.document.getBody(),t,u,v,w,x,y=false,z,A,B=this.startContainer,C=this.startOffset;if(B.type==3){if(C){B=!e.trim(B.substring(0,C)).length&&B;y=!!B;}if(B)if(!(w=B.getPrevious()))v=B.getParent();}else{if(C)w=B.getChild(C-1)||B.getLast();if(!w)v=B;}while(v||w){if(v&&!w){if(!x&&v.equals(r))x=true;if(!s.contains(v))break;if(!y||v.getComputedStyle('display')!='inline'){y=false;if(x)t=v;else this.setStartBefore(v);}w=v.getPrevious();}while(w){z=false;if(w.type==3){A=w.getText();if(/[^sufeff]/.test(A))w=null;z=/[sufeff]$/.test(A);}else if(w.$.offsetWidth>0&&!w.getAttribute('_fck_bookmark'))if(y&&f.$removeEmpty[w.getName()]){A=w.getText();if(!/[^sufeff]/.test(A))w=null;else{var D=w.$.all||w.$.getElementsByTagName('*');for(var E=0,F;F=D[E++];)if(!f.$removeEmpty[F.nodeName.toLowerCase()]){w=null;break;}}if(w)z=!!A.length;}else w=null;if(z)if(y){if(x)t=v;else if(v)this.setStartBefore(v);}else y=true;if(w){var G=w.getPrevious();if(!v&&!G){v=w;w=null;break;}w=G;}else v=null;}if(v)v=v.getParent();}B=this.endContainer;C=this.endOffset;v=w=null;x=y=false;if(B.type==3){B=!e.trim(B.substring(C)).length&&B;y=!(B&&B.getLength());if(B)if(!(w=B.getNext()))v=B.getParent();}else{w=B.getChild(C);if(!w)v=B;}while(v||w){if(v&&!w){if(!x&&v.equals(r))x=true;if(!s.contains(v))break;if(!y||v.getComputedStyle('display')!='inline'){y=false;if(x)u=v;else if(v)this.setEndAfter(v);}w=v.getNext();}while(w){z=false;if(w.type==3){A=w.getText();if(/[^sufeff]/.test(A))w=null;z=/^[sufeff]/.test(A);}else if(w.$.offsetWidth>0&&!w.getAttribute('_fck_bookmark'))if(y&&f.$removeEmpty[w.getName()]){A=w.getText();if(!/[^sufeff]/.test(A))w=null;else{D=w.$.all||w.$.getElementsByTagName('*');for(E=0;F=D[E++];)if(!f.$removeEmpty[F.nodeName.toLowerCase()]){w=null;break;}}if(w)z=!!A.length;}else w=null;if(z)if(y)if(x)u=v;else this.setEndAfter(v);if(w){G=w.getNext();if(!v&&!G){v=w;
  31. w=null;break;}w=G;}else v=null;}if(v)v=v.getParent();}if(t&&u){r=t.contains(u)?u:t;this.setStartBefore(r);this.setEndAfter(r);}break;case 2:case 3:var H=new d.range(this.document);s=this.document.getBody();H.setStartAt(s,1);H.setEnd(this.startContainer,this.startOffset);var I=new d.walker(H),J,K,L=d.walker.blockBoundary(q==3?{br:1}:null),M=function(O){var P=L(O);if(!P)J=O;return P;},N=function(O){var P=M(O);if(!P&&O.is&&O.is('br'))K=O;return P;};I.guard=M;v=I.lastBackward();J=J||s;this.setStartAt(J,!J.is('br')&&(!v||J.contains(v))?1:4);H=this.clone();H.collapse();H.setEndAt(s,2);I=new d.walker(H);I.guard=q==3?N:M;J=null;v=I.lastForward();J=J||s;this.setEndAt(J,!J.is('br')&&(!v||J.contains(v))?2:3);if(K)this.setEndAfter(K);}},insertNode:function(q){var u=this;u.optimizeBookmark();u.trim(false,true);var r=u.startContainer,s=u.startOffset,t=r.getChild(s);if(t)q.insertBefore(t);else r.append(q);if(q.getParent().equals(u.endContainer))u.endOffset++;u.setStartBefore(q);},moveToPosition:function(q,r){this.setStartAt(q,r);this.collapse(true);},selectNodeContents:function(q){this.setStart(q,0);this.setEnd(q,q.type==3?q.getLength():q.getChildCount());},setStart:function(q,r){var s=this;s.startContainer=q;s.startOffset=r;if(!s.endContainer){s.endContainer=q;s.endOffset=r;}l(s);},setEnd:function(q,r){var s=this;s.endContainer=q;s.endOffset=r;if(!s.startContainer){s.startContainer=q;s.startOffset=r;}l(s);},setStartAfter:function(q){this.setStart(q.getParent(),q.getIndex()+1);},setStartBefore:function(q){this.setStart(q.getParent(),q.getIndex());},setEndAfter:function(q){this.setEnd(q.getParent(),q.getIndex()+1);},setEndBefore:function(q){this.setEnd(q.getParent(),q.getIndex());},setStartAt:function(q,r){var s=this;switch(r){case 1:s.setStart(q,0);break;case 2:if(q.type==3)s.setStart(q,q.getLength());else s.setStart(q,q.getChildCount());break;case 3:s.setStartBefore(q);break;case 4:s.setStartAfter(q);}l(s);},setEndAt:function(q,r){var s=this;switch(r){case 1:s.setEnd(q,0);break;case 2:if(q.type==3)s.setEnd(q,q.getLength());else s.setEnd(q,q.getChildCount());break;case 3:s.setEndBefore(q);break;case 4:s.setEndAfter(q);}l(s);},fixBlock:function(q,r){var u=this;var s=u.createBookmark(),t=u.document.createElement(r);u.collapse(q);u.enlarge(2);u.extractContents().appendTo(t);t.trim();if(!c)t.appendBogus();u.insertNode(t);u.moveToBookmark(s);return t;},splitBlock:function(q){var B=this;var r=new d.elementPath(B.startContainer),s=new d.elementPath(B.endContainer),t=r.blockLimit,u=s.blockLimit,v=r.block,w=s.block,x=null;
  32. if(!t.equals(u))return null;if(q!='br'){if(!v){v=B.fixBlock(true,q);w=new d.elementPath(B.endContainer).block;}if(!w)w=B.fixBlock(false,q);}var y=v&&B.checkStartOfBlock(),z=w&&B.checkEndOfBlock();B.deleteContents();if(v&&v.equals(w))if(z){x=new d.elementPath(B.startContainer);B.moveToPosition(w,4);w=null;}else if(y){x=new d.elementPath(B.startContainer);B.moveToPosition(v,3);v=null;}else{B.setEndAt(v,2);var A=B.extractContents();w=v.clone(false);A.appendTo(w);w.insertAfter(v);B.moveToPosition(v,4);if(!c&&!v.is('ul','ol'))v.appendBogus();}return{previousBlock:v,nextBlock:w,wasStartOfBlock:y,wasEndOfBlock:z,elementPath:x};},checkBoundaryOfElement:function(q,r){var s=this.clone();s[r==1?'setStartAt':'setEndAt'](q,r==1?1:2);var t=new d.walker(s),u=false;t.evaluator=p;return t[r==1?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var w=this;var q=w.startContainer,r=w.startOffset;if(r&&q.type==3){var s=e.ltrim(q.substring(0,r));if(s.length)return false;}w.trim();var t=new d.elementPath(w.startContainer),u=w.clone();u.collapse(true);u.setStartAt(t.block||t.blockLimit,1);var v=new d.walker(u);v.evaluator=o(true);return v.checkBackward();},checkEndOfBlock:function(){var w=this;var q=w.endContainer,r=w.endOffset;if(q.type==3){var s=e.rtrim(q.substring(r));if(s.length)return false;}w.trim();var t=new d.elementPath(w.endContainer),u=w.clone();u.collapse(false);u.setEndAt(t.block||t.blockLimit,2);var v=new d.walker(u);v.evaluator=o(false);return v.checkForward();},moveToElementEditStart:function(q){var r;while(q&&q.type==1){if(q.isEditable())r=q;else if(r)break;q=q.getFirst();}if(r){this.moveToPosition(r,1);return true;}else return false;},getEnclosedNode:function(){var q=this.clone(),r=new d.walker(q),s=d.walker.bookmark(true),t=d.walker.whitespaces(true),u=function(w){return t(w)&&s(w);};q.evaluator=u;var v=r.next();r.reset();return v&&v.equals(r.previous())?v:null;},getTouchedStartNode:function(){var q=this.startContainer;if(this.collapsed||q.type!=1)return q;return q.getChild(this.startOffset)||q;},getTouchedEndNode:function(){var q=this.endContainer;if(this.collapsed||q.type!=1)return q;return q.getChild(this.endOffset-1)||q;}};})();a.POSITION_AFTER_START=1;a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;(function(){var l=c&&b.version<7?a.basePath+'images/spacer.gif':'about:blank',m=h.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;background-image:url('+l+')"></div>',a.document);
  33. m.appendTo(a.document.getHead());if(b.hc=m.getComputedStyle('background-image')=='none')b.cssClass+=' cke_hc';m.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m<l.length;m++)a.add(l[m]);}});j.add('about',{init:function(l){var m=l.addCommand('about',new a.dialogCommand('about'));m.modes={wysiwyg:1,source:1};m.canUndo=false;l.ui.addButton('About',{label:l.lang.about.title,command:'about'});a.dialog.add('about',this.path+'dialogs/about.js');}});j.add('basicstyles',{requires:['styles','button'],init:function(l){var m=function(p,q,r,s){var t=new a.style(s);l.attachStyleStateChange(t,function(u){l.getCommand(r).setState(u);});l.addCommand(r,new a.styleCommand(t));l.ui.addButton(p,{label:q,command:r});},n=l.config,o=l.lang;m('Bold',o.bold,'bold',n.coreStyles_bold);m('Italic',o.italic,'italic',n.coreStyles_italic);m('Underline',o.underline,'underline',n.coreStyles_underline);m('Strike',o.strike,'strike',n.coreStyles_strike);m('Subscript',o.subscript,'subscript',n.coreStyles_subscript);m('Superscript',o.superscript,'superscript',n.coreStyles_superscript);}});i.coreStyles_bold={element:'strong',overrides:'b'};i.coreStyles_italic={element:'em',overrides:'i'};i.coreStyles_underline={element:'u'};i.coreStyles_strike={element:'strike'};i.coreStyles_subscript={element:'sub'};i.coreStyles_superscript={element:'sup'};(function(){function l(p,q){var r=q.block||q.blockLimit;if(!r||r.getName()=='body')return 2;if(r.getAscendant('blockquote',true))return 1;return 2;};function m(p){var q=p.editor,r=q.getCommand('blockquote');r.state=l(q,p.data.path);r.fire('state');};function n(p){for(var q=0,r=p.getChildCount(),s;q<r&&(s=p.getChild(q));q++)if(s.type==1&&s.isBlockBoundary())return false;return true;};var o={exec:function(p){var q=p.getCommand('blockquote').state,r=p.getSelection(),s=r&&r.getRanges()[0];if(!s)return;var t=r.createBookmarks();if(c){var u=t[0].startNode,v=t[0].endNode,w;if(u&&u.getParent().getName()=='blockquote'){w=u;while(w=w.getNext())if(w.type==1&&w.isBlockBoundary()){u.move(w,true);break;}}if(v&&v.getParent().getName()=='blockquote'){w=v;while(w=w.getPrevious())if(w.type==1&&w.isBlockBoundary()){v.move(w);break;}}}var x=s.createIterator(),y;if(q==2){var z=[];while(y=x.getNextParagraph())z.push(y);if(z.length<1){var A=p.document.createElement(p.config.enterMode==1?'p':'div'),B=t.shift();s.insertNode(A);A.append(new d.text('',p.document));s.moveToBookmark(B);s.selectNodeContents(A);
  34. s.collapse(true);B=s.createBookmark();z.push(A);t.unshift(B);}var C=z[0].getParent(),D=[];for(var E=0;E<z.length;E++){y=z[E];C=C.getCommonAncestor(y.getParent());}var F={table:1,tbody:1,tr:1,ol:1,ul:1};while(F[C.getName()])C=C.getParent();var G=null;while(z.length>0){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber();
  35. this._.editor=l;var p={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}},q=e.addFunction(p.execute,p),r=k.button._.instances.push(p)-1,s='',t=this.command;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(t){t=l.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;m.push('<span class="cke_button">','<a id="',o,'" class="',s,'" href="javascript:void('',(this.title||'').replace("'",''),'')" title="',this.title,'" tabindex="-1" hidefocus="true"');if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.cssText = this.style.cssText;"');m.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',r,', event);" onfocus="return CKEDITOR.ui.button._.focus(',r,', event);" onclick="CKEDITOR.tools.callFunction(',q,', this); return false;"><span class="cke_icon"');if(this.icon){var u=(this.iconOffset||0)*(-16);m.push(' style="background-image:url(',a.getUrl(this.icon),');background-position:0 '+u+'px;"');}m.push('></span><span class="cke_label">',this.label,'</span>');if(this.hasArrow)m.push('<span class="cke_buttonarrow"></span>');m.push('</a>','</span>');if(this.onRender)this.onRender();return p;},setState:function(l){var q=this;if(q._.state==l)return;var m=a.document.getById(q._.id);if(m){m.setState(l);var n=q.title,o=q._.editor.lang.common.unavailable,p=m.getChild(1);if(l==0)n=o.replace('%1',q.title);p.setHtml(n);}q._.state=l;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(q,r){var s=q.document,t=s.getBody(),u=false,v=function(){u=true;};t.on(r,v);s.$.execCommand(r);t.removeListener(r,v);return u;},m=c?function(q,r){return l(q,r);}:function(q,r){try{return q.document.$.execCommand(r);}catch(s){return false;}},n=function(q){this.type=q;this.canUndo=this.type=='cut';};n.prototype={exec:function(q,r){var s=m(q,this.type);if(!s)alert(q.lang.clipboard[this.type+'Error']);return s;}};var o=c?{exec:function(q,r){q.focus();if(!q.fire('beforePaste')&&!l(q,'paste'))q.openDialog('paste');
  36. }}:{exec:function(q){try{if(!q.fire('beforePaste')&&!q.document.$.execCommand('Paste',false,null))throw 0;}catch(r){q.openDialog('paste');}}},p=function(q){switch(q.data.keyCode){case 1000+86:case 2000+45:var r=this;r.fire('saveSnapshot');if(r.fire('beforePaste'))q.cancel();setTimeout(function(){r.fire('saveSnapshot');},0);return;case 1000+88:case 2000+46:r=this;r.fire('saveSnapshot');setTimeout(function(){r.fire('saveSnapshot');},0);}};j.add('clipboard',{init:function(q){function r(t,u,v,w){var x=q.lang[u];q.addCommand(u,v);q.ui.addButton(t,{label:x,command:u});if(q.addMenuItems)q.addMenuItem(u,{label:x,command:u,group:'clipboard',order:w});};r('Cut','cut',new n('cut'),1);r('Copy','copy',new n('copy'),4);r('Paste','paste',o,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));q.on('key',p,q);if(q.contextMenu){function s(t){return q.document.$.queryCommandEnabled(t)?2:0;};q.contextMenu.addListener(function(){return{cut:s('Cut'),copy:s('Cut'),paste:b.webkit?2:s('Paste')};});}}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(l){var m=l.config,n=l.lang.colorButton,o;if(!b.hc){p('TextColor','fore',n.textColorTitle);p('BGColor','back',n.bgColorTitle);}function p(r,s,t){l.ui.add(r,4,{label:t,title:t,className:'cke_button_'+r.toLowerCase(),modes:{wysiwyg:1},panel:{css:[a.getUrl(l.skinPath+'editor.css')]},onBlock:function(u,v){var w=u.addBlock(v);w.autoSize=true;w.element.addClass('cke_colorblock');w.element.setHtml(q(u,s));var x=w.keys;x[39]='next';x[9]='next';x[37]='prev';x[2000+9]='prev';x[32]='click';}});};function q(r,s){var t=[],u=m.colorButton_colors.split(','),v=e.addFunction(function(z,A){if(z=='?')return;l.focus();r.hide();var B=new a.style(m['colorButton_'+A+'Style'],z&&{color:z});l.fire('saveSnapshot');if(z)B.apply(l.document);else B.remove(l.document);l.fire('saveSnapshot');});t.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',n.auto,'" onclick="CKEDITOR.tools.callFunction(',v,",null,'",s,"');return false;" href="javascript:void('",n.auto,'')"><table cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" style="background-color:#000"></span></td><td colspan=7 align=center>',n.auto,'</td></tr></table></a><table cellspacing=0 cellpadding=0 width="100%">');for(var w=0;w<u.length;w++){if(w%8===0)t.push('</tr><tr>');var x=u[w],y=l.lang.colors[x]||x;t.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',y,'" onclick="CKEDITOR.tools.callFunction(',v,",'#",x,"','",s,"'); return false;" href="javascript:void('",y,'')"><span class="cke_colorbox" style="background-color:#',x,'"></span></a></td>');