/*
Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var e={timestamp:'B37D54V',version:'3.5.3',revision:'6655',_:{},status:'unloaded',basePath:(function(){var h=window.CKEDITOR_BASEPATH||'';if(!h){var i=document.getElementsByTagName('script');for(var j=0;j<i.length;j++){var k=i[j].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(k){h=k[1];break;}}}if(h.indexOf(':/')==-1)if(h.indexOf('/')===0)h=location.href.match(/^.*?:\/\/[^\/]*/)[0]+h;else h=location.href.match(/^[^\?]*\/(?:)/)[0]+h;if(!h)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return h;})(),getUrl:function(h){if(h.indexOf(':/')==-1&&h.indexOf('/')!==0)h=this.basePath+h;if(this.timestamp&&h.charAt(h.length-1)!='/'&&!/[&?]t=/.test(h))h+=(h.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return h;}},f=window.CKEDITOR_GETURL;if(f){var g=e.getUrl;e.getUrl=function(h){return f.call(e,h)||g.call(e,h);};}return e;})();var e=CKEDITOR;if(!e.event){e.event=function(){};e.event.implementOn=function(f){var g=e.event.prototype;for(var h in g){if(f[h]==undefined)f[h]=g[h];}};e.event.prototype=(function(){var f=function(h){var i=h.getPrivate&&h.getPrivate()||h._||(h._={});return i.events||(i.events={});},g=function(h){this.name=h;this.listeners=[];};g.prototype={getListenerIndex:function(h){for(var i=0,j=this.listeners;i<j.length;i++){if(j[i].fn==h)return i;}return-1;}};return{on:function(h,i,j,k,l){var m=f(this),n=m[h]||(m[h]=new g(h));if(n.getListenerIndex(i)<0){var o=n.listeners;if(!j)j=this;if(isNaN(l))l=10;var p=this,q=function(s,t,u,v){var w={name:h,sender:this,editor:s,data:t,listenerData:k,stop:u,cancel:v,removeListener:function(){p.removeListener(h,i);}};i.call(j,w);return w.data;};q.fn=i;q.priority=l;for(var r=o.length-1;r>=0;r--){if(o[r].priority<=l){o.splice(r+1,0,q);return;}}o.unshift(q);}},fire:(function(){var h=false,i=function(){h=true;},j=false,k=function(){j=true;};return function(l,m,n){var o=f(this)[l],p=h,q=j;h=j=false;if(o){var r=o.listeners;if(r.length){r=r.slice(0);for(var s=0;s<r.length;s++){var t=r[s].call(this,n,m,i,k);if(typeof t!='undefined')m=t;if(h||j)break;}}}var u=j||(typeof m=='undefined'?false:m);h=p;j=q;return u;};})(),fireOnce:function(h,i,j){var k=this.fire(h,i,j);delete f(this)[h];return k;},removeListener:function(h,i){var j=f(this)[h];if(j){var k=j.getListenerIndex(i);if(k>=0)j.listeners.splice(k,1);}},hasListeners:function(h){var i=f(this)[h];
return i&&i.listeners.length>0;}};})();}if(!e.editor){e.ELEMENT_MODE_NONE=0;e.ELEMENT_MODE_REPLACE=1;e.ELEMENT_MODE_APPENDTO=2;e.editor=function(f,g,h,i){var j=this;j._={instanceConfig:f,element:g,data:i};j.elementMode=h||0;e.event.call(j);j._init();};e.editor.replace=function(f,g){var h=f;if(typeof h!='object'){h=document.getElementById(f);if(h&&h.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})h=null;if(!h){var i=0,j=document.getElementsByName(f);while((h=j[i++])&&h.tagName.toLowerCase()!='textarea'){}}if(!h)throw '[CKEDITOR.editor.replace] The element with id or name "'+f+'" was not found.';}h.style.visibility='hidden';return new e.editor(g,h,1);};e.editor.appendTo=function(f,g,h){var i=f;if(typeof i!='object'){i=document.getElementById(f);if(!i)throw '[CKEDITOR.editor.appendTo] The element with id "'+f+'" was not found.';}return new e.editor(g,i,2,h);};e.editor.prototype={_init:function(){var f=e.editor._pending||(e.editor._pending=[]);f.push(this);},fire:function(f,g){return e.event.prototype.fire.call(this,f,g,this);},fireOnce:function(f,g){return e.event.prototype.fireOnce.call(this,f,g,this);}};e.event.implementOn(e.editor.prototype,true);}if(!e.env)e.env=(function(){var f=navigator.userAgent.toLowerCase(),g=window.opera,h={ie:/*@cc_on!@*/false,opera:!!g&&g.version,webkit:f.indexOf(' applewebkit/')>-1,air:f.indexOf(' adobeair/')>-1,mac:f.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:f.indexOf('mobile')>-1,isCustomDomain:function(){if(!this.ie)return false;var k=document.domain,l=window.location.hostname;return k!=l&&k!='['+l+']';}};h.gecko=navigator.product=='Gecko'&&!h.webkit&&!h.opera;var i=0;if(h.ie){i=parseFloat(f.match(/msie (\d+)/)[1]);h.ie8=!!document.documentMode;h.ie8Compat=document.documentMode==8;h.ie9Compat=document.documentMode==9;h.ie7Compat=i==7&&!document.documentMode||document.documentMode==7;h.ie6Compat=i<7||h.quirks;}if(h.gecko){var j=f.match(/rv:([\d\.]+)/);if(j){j=j[1].split('.');i=j[0]*10000+(j[1]||0)*100+ +(j[2]||0);}}if(h.opera)i=parseFloat(g.version());if(h.air)i=parseFloat(f.match(/ adobeair\/(\d+)/)[1]);if(h.webkit)i=parseFloat(f.match(/ applewebkit\/(\d+)/)[1]);h.version=i;h.isCompatible=!h.mobile&&(h.ie&&i>=6||h.gecko&&i>=10801||h.opera&&i>=9.5||h.air&&i>=1||h.webkit&&i>=522||false);h.cssClass='cke_browser_'+(h.ie?'ie':h.gecko?'gecko':h.opera?'opera':h.webkit?'webkit':'unknown');if(h.quirks)h.cssClass+=' cke_browser_quirks';if(h.ie){h.cssClass+=' cke_browser_ie'+(h.version<7?'6':h.version>=8?document.documentMode:'7');
if(h.quirks)h.cssClass+=' cke_browser_iequirks';}if(h.gecko&&i<10900)h.cssClass+=' cke_browser_gecko18';if(h.air)h.cssClass+=' cke_browser_air';return h;})();var f=e.env;var g=f.ie;if(e.status=='unloaded')(function(){e.event.implementOn(e);e.loadFullCore=function(){if(e.status!='basic_ready'){e.loadFullCore._load=1;return;}delete e.loadFullCore;var i=document.createElement('script');i.type='text/javascript';i.src=e.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(i);};e.loadFullCoreTimeout=0;e.replaceClass='ckeditor';e.replaceByClassEnabled=1;var h=function(i,j,k,l){if(f.isCompatible){if(e.loadFullCore)e.loadFullCore();var m=k(i,j,l);e.add(m);return m;}return null;};e.replace=function(i,j){return h(i,j,e.editor.replace);};e.appendTo=function(i,j,k){return h(i,j,e.editor.appendTo,k);};e.add=function(i){var j=this._.pending||(this._.pending=[]);j.push(i);};e.replaceAll=function(){var i=document.getElementsByTagName('textarea');for(var j=0;j<i.length;j++){var k=null,l=i[j];if(!l.name&&!l.id)continue;if(typeof arguments[0]=='string'){var m=new RegExp('(?:^|\\s)'+arguments[0]+'(?:$|\\s)');if(!m.test(l.className))continue;}else if(typeof arguments[0]=='function'){k={};if(arguments[0](l,k)===false)continue;}this.replace(l,k);}};(function(){var i=function(){var j=e.loadFullCore,k=e.loadFullCoreTimeout;if(e.replaceByClassEnabled)e.replaceAll(e.replaceClass);e.status='basic_ready';if(j&&j._load)j();else if(k)setTimeout(function(){if(e.loadFullCore)e.loadFullCore();},k*1000);};if(window.addEventListener)window.addEventListener('load',i,false);else if(window.attachEvent)window.attachEvent('onload',i);})();e.status='basic_loaded';})();e.dom={};var h=e.dom;(function(){var i=[];e.on('reset',function(){i=[];});e.tools={arrayCompare:function(j,k){if(!j&&!k)return true;if(!j||!k||j.length!=k.length)return false;for(var l=0;l<j.length;l++){if(j[l]!=k[l])return false;}return true;},clone:function(j){var k;if(j&&j instanceof Array){k=[];for(var l=0;l<j.length;l++)k[l]=this.clone(j[l]);return k;}if(j===null||typeof j!='object'||j instanceof String||j instanceof Number||j instanceof Boolean||j instanceof Date||j instanceof RegExp)return j;k=new j.constructor();for(var m in j){var n=j[m];k[m]=this.clone(n);}return k;},capitalize:function(j){return j.charAt(0).toUpperCase()+j.substring(1).toLowerCase();},extend:function(j){var k=arguments.length,l,m;if(typeof (l=arguments[k-1])=='boolean')k--;else if(typeof (l=arguments[k-2])=='boolean'){m=arguments[k-1];
k-=2;}for(var n=1;n<k;n++){var o=arguments[n];for(var p in o){if(l===true||j[p]==undefined)if(!m||p in m)j[p]=o[p];}}return j;},prototypedCopy:function(j){var k=function(){};k.prototype=j;return new k();},isArray:function(j){return!!j&&j instanceof Array;},isEmpty:function(j){for(var k in j){if(j.hasOwnProperty(k))return false;}return true;},cssStyleToDomStyle:(function(){var j=document.createElement('div').style,k=typeof j.cssFloat!='undefined'?'cssFloat':typeof j.styleFloat!='undefined'?'styleFloat':'float';return function(l){if(l=='float')return k;else return l.replace(/-./g,function(m){return m.substr(1).toUpperCase();});};})(),buildStyleHtml:function(j){j=[].concat(j);var k,l=[];for(var m=0;m<j.length;m++){k=j[m];if(/@import|[{}]/.test(k))l.push('<style>'+k+'</style>');else l.push('<link type="text/css" rel=stylesheet href="'+k+'">');}return l.join('');},htmlEncode:function(j){var k=function(o){var p=new h.element('span');p.setText(o);return p.getHtml();},l=k('\n').toLowerCase()=='<br>'?function(o){return k(o).replace(/<br>/gi,'\n');}:k,m=k('>')=='>'?function(o){return l(o).replace(/>/g,'&gt;');}:l,n=k('  ')=='&nbsp; '?function(o){return m(o).replace(/&nbsp;/g,' ');}:m;this.htmlEncode=n;return this.htmlEncode(j);},htmlEncodeAttr:function(j){return j.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/g,'&gt;');},getNextNumber:(function(){var j=0;return function(){return++j;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(j,k){return k(j);},setTimeout:function(j,k,l,m,n){if(!n)n=window;if(!l)l=n;return n.setTimeout(function(){if(m)j.apply(l,[].concat(m));else j.apply(l);},k||0);},trim:(function(){var j=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(k){return k.replace(j,'');};})(),ltrim:(function(){var j=/^[ \t\n\r]+/g;return function(k){return k.replace(j,'');};})(),rtrim:(function(){var j=/[ \t\n\r]+$/g;return function(k){return k.replace(j,'');};})(),indexOf:Array.prototype.indexOf?function(j,k){return j.indexOf(k);}:function(j,k){for(var l=0,m=j.length;l<m;l++){if(j[l]===k)return l;}return-1;},bind:function(j,k){return function(){return j.apply(k,arguments);};},createClass:function(j){var k=j.$,l=j.base,m=j.privates||j._,n=j.proto,o=j.statics;if(m){var p=k;k=function(){var t=this;var q=t._||(t._={});for(var r in m){var s=m[r];q[r]=typeof s=='function'?e.tools.bind(s,t):s;}p.apply(t,arguments);};}if(l){k.prototype=this.prototypedCopy(l.prototype);k.prototype['constructor']=k;k.prototype.base=function(){this.base=l.prototype.base;
l.apply(this,arguments);this.base=arguments.callee;};}if(n)this.extend(k.prototype,n,true);if(o)this.extend(k,o,true);return k;},addFunction:function(j,k){return i.push(function(){return j.apply(k||this,arguments);})-1;},removeFunction:function(j){i[j]=null;},callFunction:function(j){var k=i[j];return k&&k.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var j=/^\d+(?:\.\d+)?$/;return function(k){return k+(j.test(k)?'px':'');};})(),repeat:function(j,k){return new Array(k+1).join(j);},tryThese:function(){var j;for(var k=0,l=arguments.length;k<l;k++){var m=arguments[k];try{j=m();break;}catch(n){}}return j;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var i=e.tools;e.dtd=(function(){var j=i.extend,k={isindex:1,fieldset:1},l={input:1,button:1,select:1,textarea:1,label:1},m=j({a:1},l),n=j({iframe:1},m),o={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},p={ins:1,del:1,script:1,style:1},q=j({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},p),r=j({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},q),s=j({p:1},r),t=j({iframe:1},r,l),u={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},v=j({a:1},t),w={tr:1},x={'#':1},y=j({param:1},u),z=j({form:1},k,n,o,s),A={li:1},B={style:1,script:1},C={base:1,link:1,meta:1,title:1},D=j(C,B),E={head:1,body:1},F={html:1},G={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};return{$nonBodyContent:j(F,E,C),$block:G,$blockLimit:{body:1,div:1,td:1,th:1,caption:1,form:1},$inline:v,$body:j({script:1,style:1},G),$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},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param: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},html:E,head:D,style:x,script:x,body:z,base:{},link:{},meta:{},title:x,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:z,td:z,br:{},th:z,center:z,kbd:v,button:j(s,o),basefont:{},h5:v,h4:v,samp:v,h6:v,ol:A,h1:v,h3:v,option:x,h2:v,form:j(k,n,o,s),select:{optgroup:1,option:1},font:v,ins:v,menu:A,abbr:v,label:v,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:v,script:x,tfoot:w,cite:v,li:z,input:{},iframe:z,strong:v,textarea:x,noframes:z,big:v,small:v,span:v,hr:{},dt:v,sub:v,optgroup:{option:1},param:{},bdo:v,'var':v,div:z,object:y,sup:v,dd:z,strike:v,area:{},dir:A,map:j({area:1,form:1,p:1},k,p,o),applet:y,dl:{dt:1,dd:1},del:v,isindex:{},fieldset:j({legend:1},u),thead:w,ul:A,acronym:v,b:v,a:t,blockquote:z,caption:v,i:v,u:v,tbody:w,s:v,address:j(n,s),tt:v,legend:v,q:v,pre:j(q,m),p:v,em:v,dfn:v};
})();var j=e.dtd;h.event=function(k){this.$=k;};h.event.prototype={getKey:function(){return this.$.keyCode||this.$.which;},getKeystroke:function(){var l=this;var k=l.getKey();if(l.$.ctrlKey||l.$.metaKey)k+=1000;if(l.$.shiftKey)k+=2000;if(l.$.altKey)k+=4000;return k;},preventDefault:function(k){var l=this.$;if(l.preventDefault)l.preventDefault();else l.returnValue=false;if(k)this.stopPropagation();},stopPropagation:function(){var k=this.$;if(k.stopPropagation)k.stopPropagation();else k.cancelBubble=true;},getTarget:function(){var k=this.$.target||this.$.srcElement;return k?new h.node(k):null;}};e.CTRL=1000;e.SHIFT=2000;e.ALT=4000;h.domObject=function(k){if(k)this.$=k;};h.domObject.prototype=(function(){var k=function(l,m){return function(n){if(typeof e!='undefined')l.fire(m,new h.event(n));};};return{getPrivate:function(){var l;if(!(l=this.getCustomData('_')))this.setCustomData('_',l={});return l;},on:function(l){var o=this;var m=o.getCustomData('_cke_nativeListeners');if(!m){m={};o.setCustomData('_cke_nativeListeners',m);}if(!m[l]){var n=m[l]=k(o,l);if(o.$.attachEvent)o.$.attachEvent('on'+l,n);else if(o.$.addEventListener)o.$.addEventListener(l,n,!!e.event.useCapture);}return e.event.prototype.on.apply(o,arguments);},removeListener:function(l){var o=this;e.event.prototype.removeListener.apply(o,arguments);if(!o.hasListeners(l)){var m=o.getCustomData('_cke_nativeListeners'),n=m&&m[l];if(n){if(o.$.detachEvent)o.$.detachEvent('on'+l,n);else if(o.$.removeEventListener)o.$.removeEventListener(l,n,false);delete m[l];}}},removeAllListeners:function(){var o=this;var l=o.getCustomData('_cke_nativeListeners');for(var m in l){var n=l[m];if(o.$.detachEvent)o.$.detachEvent('on'+m,n);else if(o.$.removeEventListener)o.$.removeEventListener(m,n,false);delete l[m];}}};})();(function(k){var l={};e.on('reset',function(){l={};});k.equals=function(m){return m&&m.$===this.$;};k.setCustomData=function(m,n){var o=this.getUniqueId(),p=l[o]||(l[o]={});p[m]=n;return this;};k.getCustomData=function(m){var n=this.$['data-cke-expando'],o=n&&l[n];return o&&o[m];};k.removeCustomData=function(m){var n=this.$['data-cke-expando'],o=n&&l[n],p=o&&o[m];if(typeof p!='undefined')delete o[m];return p||null;};k.clearCustomData=function(){this.removeAllListeners();var m=this.$['data-cke-expando'];m&&delete l[m];};k.getUniqueId=function(){return this.$['data-cke-expando']||(this.$['data-cke-expando']=i.getNextNumber());};e.event.implementOn(k);})(h.domObject.prototype);h.window=function(k){h.domObject.call(this,k);
};h.window.prototype=new h.domObject();i.extend(h.window.prototype,{focus:function(){if(f.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var k=this.$.document,l=k.compatMode=='CSS1Compat';return{width:(l?k.documentElement.clientWidth:k.body.clientWidth)||0,height:(l?k.documentElement.clientHeight:k.body.clientHeight)||0};},getScrollPosition:function(){var k=this.$;if('pageXOffset' in k)return{x:k.pageXOffset||0,y:k.pageYOffset||0};else{var l=k.document;return{x:l.documentElement.scrollLeft||l.body.scrollLeft||0,y:l.documentElement.scrollTop||l.body.scrollTop||0};}}});h.document=function(k){h.domObject.call(this,k);};var k=h.document;k.prototype=new h.domObject();i.extend(k.prototype,{appendStyleSheet:function(l){if(this.$.createStyleSheet)this.$.createStyleSheet(l);else{var m=new h.element('link');m.setAttributes({rel:'stylesheet',type:'text/css',href:l});this.getHead().append(m);}},appendStyleText:function(l){var o=this;if(o.$.createStyleSheet){var m=o.$.createStyleSheet('');m.cssText=l;}else{var n=new h.element('style',o);n.append(new h.text(l,o));o.getHead().append(n);}},createElement:function(l,m){var n=new h.element(l,this);if(m){if(m.attributes)n.setAttributes(m.attributes);if(m.styles)n.setStyles(m.styles);}return n;},createText:function(l){return new h.text(l,this);},focus:function(){this.getWindow().focus();},getById:function(l){var m=this.$.getElementById(l);return m?new h.element(m):null;},getByAddress:function(l,m){var n=this.$.documentElement;for(var o=0;n&&o<l.length;o++){var p=l[o];if(!m){n=n.childNodes[p];continue;}var q=-1;for(var r=0;r<n.childNodes.length;r++){var s=n.childNodes[r];if(m===true&&s.nodeType==3&&s.previousSibling&&s.previousSibling.nodeType==3)continue;q++;if(q==p){n=s;break;}}}return n?new h.node(n):null;},getElementsByTag:function(l,m){if(!(g&&!(document.documentMode>8))&&m)l=m+':'+l;return new h.nodeList(this.$.getElementsByTagName(l));},getHead:function(){var l=this.$.getElementsByTagName('head')[0];if(!l)l=this.getDocumentElement().append(new h.element('head'),true);else l=new h.element(l);return(this.getHead=function(){return l;})();},getBody:function(){var l=new h.element(this.$.body);return(this.getBody=function(){return l;})();},getDocumentElement:function(){var l=new h.element(this.$.documentElement);return(this.getDocumentElement=function(){return l;})();},getWindow:function(){var l=new h.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return l;
})();},write:function(l){var m=this;m.$.open('text/html','replace');f.isCustomDomain()&&(m.$.domain=document.domain);m.$.write(l);m.$.close();}});h.node=function(l){if(l){switch(l.nodeType){case 9:return new k(l);case 1:return new h.element(l);case 3:return new h.text(l);}h.domObject.call(this,l);}return this;};h.node.prototype=new h.domObject();e.NODE_ELEMENT=1;e.NODE_DOCUMENT=9;e.NODE_TEXT=3;e.NODE_COMMENT=8;e.NODE_DOCUMENT_FRAGMENT=11;e.POSITION_IDENTICAL=0;e.POSITION_DISCONNECTED=1;e.POSITION_FOLLOWING=2;e.POSITION_PRECEDING=4;e.POSITION_IS_CONTAINED=8;e.POSITION_CONTAINS=16;i.extend(h.node.prototype,{appendTo:function(l,m){l.append(this,m);return l;},clone:function(l,m){var n=this.$.cloneNode(l),o=function(p){if(p.nodeType!=1)return;if(!m)p.removeAttribute('id',false);p.removeAttribute('data-cke-expando',false);if(l){var q=p.childNodes;for(var r=0;r<q.length;r++)o(q[r]);}};o(n);return new h.node(n);},hasPrevious:function(){return!!this.$.previousSibling;},hasNext:function(){return!!this.$.nextSibling;},insertAfter:function(l){l.$.parentNode.insertBefore(this.$,l.$.nextSibling);return l;},insertBefore:function(l){l.$.parentNode.insertBefore(this.$,l.$);return l;},insertBeforeMe:function(l){this.$.parentNode.insertBefore(l.$,this.$);return l;},getAddress:function(l){var m=[],n=this.getDocument().$.documentElement,o=this.$;while(o&&o!=n){var p=o.parentNode;if(p)m.unshift(this.getIndex.call({$:o},l));o=p;}return m;},getDocument:function(){return new k(this.$.ownerDocument||this.$.parentNode.ownerDocument);},getIndex:function(l){var m=this.$,n=0;while(m=m.previousSibling){if(l&&m.nodeType==3&&(!m.nodeValue.length||m.previousSibling&&m.previousSibling.nodeType==3))continue;n++;}return n;},getNextSourceNode:function(l,m,n){if(n&&!n.call){var o=n;n=function(r){return!r.equals(o);};}var p=!l&&this.getFirst&&this.getFirst(),q;if(!p){if(this.type==1&&n&&n(this,true)===false)return null;p=this.getNext();}while(!p&&(q=(q||this).getParent())){if(n&&n(q,true)===false)return null;p=q.getNext();}if(!p)return null;if(n&&n(p)===false)return null;if(m&&m!=p.type)return p.getNextSourceNode(false,m,n);return p;},getPreviousSourceNode:function(l,m,n){if(n&&!n.call){var o=n;n=function(r){return!r.equals(o);};}var p=!l&&this.getLast&&this.getLast(),q;if(!p){if(this.type==1&&n&&n(this,true)===false)return null;p=this.getPrevious();}while(!p&&(q=(q||this).getParent())){if(n&&n(q,true)===false)return null;p=q.getPrevious();}if(!p)return null;if(n&&n(p)===false)return null;if(m&&p.type!=m)return p.getPreviousSourceNode(false,m,n);
return p;},getPrevious:function(l){var m=this.$,n;do{m=m.previousSibling;n=m&&new h.node(m);}while(n&&l&&!l(n));return n;},getNext:function(l){var m=this.$,n;do{m=m.nextSibling;n=m&&new h.node(m);}while(n&&l&&!l(n));return n;},getParent:function(){var l=this.$.parentNode;return l&&l.nodeType==1?new h.node(l):null;},getParents:function(l){var m=this,n=[];do n[l?'push':'unshift'](m);while(m=m.getParent());return n;},getCommonAncestor:function(l){var n=this;if(l.equals(n))return n;if(l.contains&&l.contains(n))return l;var m=n.contains?n:n.getParent();do{if(m.contains(l))return m;}while(m=m.getParent());return null;},getPosition:function(l){var m=this.$,n=l.$;if(m.compareDocumentPosition)return m.compareDocumentPosition(n);if(m==n)return 0;if(this.type==1&&l.type==1){if(m.contains){if(m.contains(n))return 16+4;if(n.contains(m))return 8+2;}if('sourceIndex' in m)return m.sourceIndex<0||n.sourceIndex<0?1:m.sourceIndex<n.sourceIndex?4:2;}var o=this.getAddress(),p=l.getAddress(),q=Math.min(o.length,p.length);for(var r=0;r<=q-1;r++){if(o[r]!=p[r]){if(r<q)return o[r]<p[r]?4:2;break;}}return o.length<p.length?16+4:8+2;},getAscendant:function(l,m){var n=this.$;if(!m)n=n.parentNode;while(n){if(n.nodeName&&n.nodeName.toLowerCase()==l)return new h.node(n);n=n.parentNode;}return null;},hasAscendant:function(l,m){var n=this.$;if(!m)n=n.parentNode;while(n){if(n.nodeName&&n.nodeName.toLowerCase()==l)return true;n=n.parentNode;}return false;},move:function(l,m){l.append(this.remove(),m);},remove:function(l){var m=this.$,n=m.parentNode;if(n){if(l)for(var o;o=m.firstChild;)n.insertBefore(m.removeChild(o),m);n.removeChild(m);}return this;},replace:function(l){this.insertBefore(l);l.remove();},trim:function(){this.ltrim();this.rtrim();},ltrim:function(){var o=this;var l;while(o.getFirst&&(l=o.getFirst())){if(l.type==3){var m=i.ltrim(l.getText()),n=l.getLength();if(!m){l.remove();continue;}else if(m.length<n){l.split(n-m.length);o.$.removeChild(o.$.firstChild);}}break;}},rtrim:function(){var o=this;var l;while(o.getLast&&(l=o.getLast())){if(l.type==3){var m=i.rtrim(l.getText()),n=l.getLength();if(!m){l.remove();continue;}else if(m.length<n){l.split(m.length);o.$.lastChild.parentNode.removeChild(o.$.lastChild);}}break;}if(!g&&!f.opera){l=o.$.lastChild;if(l&&l.type==1&&l.nodeName.toLowerCase()=='br')l.parentNode.removeChild(l);}},isReadOnly:function(){var l=this;while(l){if(l.type==1){if(l.is('body')||!!l.data('cke-editable'))break;if(l.getAttribute('contentEditable')=='false')return l;
else if(l.getAttribute('contentEditable')=='true')break;}l=l.getParent();}return false;}});h.nodeList=function(l){this.$=l;};h.nodeList.prototype={count:function(){return this.$.length;},getItem:function(l){var m=this.$[l];return m?new h.node(m):null;}};h.element=function(l,m){if(typeof l=='string')l=(m?m.$:document).createElement(l);h.domObject.call(this,l);};var l=h.element;l.get=function(m){return m&&(m.$?m:new l(m));};l.prototype=new h.node();l.createFromHtml=function(m,n){var o=new l('div',n);o.setHtml(m);return o.getFirst().remove();};l.setMarker=function(m,n,o,p){var q=n.getCustomData('list_marker_id')||n.setCustomData('list_marker_id',i.getNextNumber()).getCustomData('list_marker_id'),r=n.getCustomData('list_marker_names')||n.setCustomData('list_marker_names',{}).getCustomData('list_marker_names');m[q]=n;r[o]=1;return n.setCustomData(o,p);};l.clearAllMarkers=function(m){for(var n in m)l.clearMarkers(m,m[n],1);};l.clearMarkers=function(m,n,o){var p=n.getCustomData('list_marker_names'),q=n.getCustomData('list_marker_id');for(var r in p)n.removeCustomData(r);n.removeCustomData('list_marker_names');if(o){n.removeCustomData('list_marker_id');delete m[q];}};i.extend(l.prototype,{type:1,addClass:function(m){var n=this.$.className;if(n){var o=new RegExp('(?:^|\\s)'+m+'(?:\\s|$)','');if(!o.test(n))n+=' '+m;}this.$.className=n||m;},removeClass:function(m){var n=this.getAttribute('class');if(n){var o=new RegExp('(?:^|\\s+)'+m+'(?=\\s|$)','i');if(o.test(n)){n=n.replace(o,'').replace(/^\s+/,'');if(n)this.setAttribute('class',n);else this.removeAttribute('class');}}},hasClass:function(m){var n=new RegExp('(?:^|\\s+)'+m+'(?=\\s|$)','');return n.test(this.getAttribute('class'));},append:function(m,n){var o=this;if(typeof m=='string')m=o.getDocument().createElement(m);if(n)o.$.insertBefore(m.$,o.$.firstChild);else o.$.appendChild(m.$);return m;},appendHtml:function(m){var o=this;if(!o.$.childNodes.length)o.setHtml(m);else{var n=new l('div',o.getDocument());n.setHtml(m);n.moveChildren(o);}},appendText:function(m){if(this.$.text!=undefined)this.$.text+=m;else this.append(new h.text(m));},appendBogus:function(){var o=this;var m=o.getLast();while(m&&m.type==3&&!i.rtrim(m.getText()))m=m.getPrevious();if(!m||!m.is||!m.is('br')){var n=f.opera?o.getDocument().createText(''):o.getDocument().createElement('br');f.gecko&&n.setAttribute('type','_moz');o.append(n);}},breakParent:function(m){var p=this;var n=new h.range(p.getDocument());n.setStartAfter(p);n.setEndAfter(m);var o=n.extractContents();
n.insertNode(p.remove());o.insertAfterNode(p);},contains:g||f.webkit?function(m){var n=this.$;return m.type!=1?n.contains(m.getParent().$):n!=m.$&&n.contains(m.$);}:function(m){return!!(this.$.compareDocumentPosition(m.$)&16);},focus:(function(){function m(){try{this.$.focus();}catch(n){}};return function(n){if(n)i.setTimeout(m,100,this);else m.call(this);};})(),getHtml:function(){var m=this.$.innerHTML;return g?m.replace(/<\?[^>]*>/g,''):m;},getOuterHtml:function(){var n=this;if(n.$.outerHTML)return n.$.outerHTML.replace(/<\?[^>]*>/,'');var m=n.$.ownerDocument.createElement('div');m.appendChild(n.$.cloneNode(true));return m.innerHTML;},setHtml:function(m){return this.$.innerHTML=m;},setText:function(m){l.prototype.setText=this.$.innerText!=undefined?function(n){return this.$.innerText=n;}:function(n){return this.$.textContent=n;};return this.setText(m);},getAttribute:(function(){var m=function(n){return this.$.getAttribute(n,2);};if(g&&(f.ie7Compat||f.ie6Compat))return function(n){var r=this;switch(n){case 'class':n='className';break;case 'tabindex':var o=m.call(r,n);if(o!==0&&r.$.tabIndex===0)o=null;return o;break;case 'checked':var p=r.$.attributes.getNamedItem(n),q=p.specified?p.nodeValue:r.$.checked;return q?'checked':null;case 'hspace':case 'value':return r.$[n];case 'style':return r.$.style.cssText;}return m.call(r,n);};else return m;})(),getChildren:function(){return new h.nodeList(this.$.childNodes);},getComputedStyle:g?function(m){return this.$.currentStyle[i.cssStyleToDomStyle(m)];}:function(m){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(m);},getDtd:function(){var m=j[this.getName()];this.getDtd=function(){return m;};return m;},getElementsByTag:k.prototype.getElementsByTag,getTabIndex:g?function(){var m=this.$.tabIndex;if(m===0&&!j.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)m=-1;return m;}:f.webkit?function(){var m=this.$.tabIndex;if(m==undefined){m=parseInt(this.getAttribute('tabindex'),10);if(isNaN(m))m=-1;}return m;}: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 m=this.$.nodeName.toLowerCase();if(g&&!(document.documentMode>8)){var n=this.$.scopeName;if(n!='HTML')m=n.toLowerCase()+':'+m;}return(this.getName=function(){return m;})();},getValue:function(){return this.$.value;
},getFirst:function(m){var n=this.$.firstChild,o=n&&new h.node(n);if(o&&m&&!m(o))o=o.getNext(m);return o;},getLast:function(m){var n=this.$.lastChild,o=n&&new h.node(n);if(o&&m&&!m(o))o=o.getPrevious(m);return o;},getStyle:function(m){return this.$.style[i.cssStyleToDomStyle(m)];},is:function(){var m=this.getName();for(var n=0;n<arguments.length;n++){if(arguments[n]==m)return true;}return false;},isEditable:function(){var m=this.getName(),n=!j.$nonEditable[m]&&(j[m]||j.span);return n&&n['#'];},isIdentical:function(m){if(this.getName()!=m.getName())return false;var n=this.$.attributes,o=m.$.attributes,p=n.length,q=o.length;for(var r=0;r<p;r++){var s=n[r];if(s.nodeName=='_moz_dirty')continue;if((!g||s.specified&&s.nodeName!='data-cke-expando')&&s.nodeValue!=m.getAttribute(s.nodeName))return false;}if(g)for(r=0;r<q;r++){s=o[r];if(s.specified&&s.nodeName!='data-cke-expando'&&s.nodeValue!=this.getAttribute(s.nodeName))return false;}return true;},isVisible:function(){var m=!!this.$.offsetHeight&&this.getComputedStyle('visibility')!='hidden',n,o;if(m&&(f.webkit||f.opera)){n=this.getWindow();if(!n.equals(e.document.getWindow())&&(o=n.$.frameElement))m=new l(o).isVisible();}return m;},isEmptyInlineRemoveable:function(){if(!j.$removeEmpty[this.getName()])return false;var m=this.getChildren();for(var n=0,o=m.count();n<o;n++){var p=m.getItem(n);if(p.type==1&&p.data('cke-bookmark'))continue;if(p.type==1&&!p.isEmptyInlineRemoveable()||p.type==3&&i.trim(p.getText()))return false;}return true;},hasAttributes:g&&(f.ie7Compat||f.ie6Compat)?function(){var m=this.$.attributes;for(var n=0;n<m.length;n++){var o=m[n];switch(o.nodeName){case 'class':if(this.getAttribute('class'))return true;case 'data-cke-expando':continue;default:if(o.specified)return true;}}return false;}:function(){var m=this.$.attributes,n=m.length,o={'data-cke-expando':1,_moz_dirty:1};return n>0&&(n>2||!o[m[0].nodeName]||n==2&&!o[m[1].nodeName]);},hasAttribute:function(m){var n=this.$.attributes.getNamedItem(m);return!!(n&&n.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(m,n){var o=this.$;m=m.$;if(o==m)return;var p;if(n)while(p=o.lastChild)m.insertBefore(o.removeChild(p),m.firstChild);else while(p=o.firstChild)m.appendChild(o.removeChild(p));},mergeSiblings:(function(){function m(n,o,p){if(o&&o.type==1){var q=[];while(o.data('cke-bookmark')||o.isEmptyInlineRemoveable()){q.push(o);o=p?o.getNext():o.getPrevious();if(!o||o.type!=1)return;}if(n.isIdentical(o)){var r=p?n.getLast():n.getFirst();
while(q.length)q.shift().move(n,!p);o.moveChildren(n,!p);o.remove();if(r&&r.type==1)r.mergeSiblings();}}};return function(n){var o=this;if(!(n===false||j.$removeEmpty[o.getName()]||o.is('a')))return;m(o,o.getNext(),true);m(o,o.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var m=function(n,o){this.$.setAttribute(n,o);return this;};if(g&&(f.ie7Compat||f.ie6Compat))return function(n,o){var p=this;if(n=='class')p.$.className=o;else if(n=='style')p.$.style.cssText=o;else if(n=='tabindex')p.$.tabIndex=o;else if(n=='checked')p.$.checked=o;else m.apply(p,arguments);return p;};else return m;})(),setAttributes:function(m){for(var n in m)this.setAttribute(n,m[n]);return this;},setValue:function(m){this.$.value=m;return this;},removeAttribute:(function(){var m=function(n){this.$.removeAttribute(n);};if(g&&(f.ie7Compat||f.ie6Compat))return function(n){if(n=='class')n='className';else if(n=='tabindex')n='tabIndex';m.call(this,n);};else return m;})(),removeAttributes:function(m){if(i.isArray(m))for(var n=0;n<m.length;n++)this.removeAttribute(m[n]);else for(var o in m)m.hasOwnProperty(o)&&this.removeAttribute(o);},removeStyle:function(m){var n=this;n.setStyle(m,'');if(n.$.style.removeAttribute)n.$.style.removeAttribute(i.cssStyleToDomStyle(m));if(!n.$.style.cssText)n.removeAttribute('style');},setStyle:function(m,n){this.$.style[i.cssStyleToDomStyle(m)]=n;return this;},setStyles:function(m){for(var n in m)this.setStyle(n,m[n]);return this;},setOpacity:function(m){if(g){m=Math.round(m*100);this.setStyle('filter',m>=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+m+')');}else this.setStyle('opacity',m);},unselectable:f.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(m){m.data.preventDefault();});}:f.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(m){m.data.preventDefault();});}:function(){if(g||f.opera){var m=this.$,n,o=0;m.unselectable='on';while(n=m.all[o++])switch(n.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:n.unselectable='on';}}},getPositionedAncestor:function(){var m=this;while(m.getName()!='html'){if(m.getComputedStyle('position')!='static')return m;m=m.getParent();}return null;},getDocumentPosition:function(m){var H=this;var n=0,o=0,p=H.getDocument().getBody(),q=H.getDocument().$.compatMode=='BackCompat',r=H.getDocument();if(document.documentElement.getBoundingClientRect){var s=H.$.getBoundingClientRect(),t=r.$,u=t.documentElement,v=u.clientTop||p.$.clientTop||0,w=u.clientLeft||p.$.clientLeft||0,x=true;
if(g){var y=r.getDocumentElement().contains(H),z=r.getBody().contains(H);x=q&&z||!q&&y;}if(x){n=s.left+(!q&&u.scrollLeft||p.$.scrollLeft);n-=w;o=s.top+(!q&&u.scrollTop||p.$.scrollTop);o-=v;}}else{var A=H,B=null,C;while(A&&!(A.getName()=='body'||A.getName()=='html')){n+=A.$.offsetLeft-A.$.scrollLeft;o+=A.$.offsetTop-A.$.scrollTop;if(!A.equals(H)){n+=A.$.clientLeft||0;o+=A.$.clientTop||0;}var D=B;while(D&&!D.equals(A)){n-=D.$.scrollLeft;o-=D.$.scrollTop;D=D.getParent();}B=A;A=(C=A.$.offsetParent)?new l(C):null;}}if(m){var E=H.getWindow(),F=m.getWindow();if(!E.equals(F)&&E.$.frameElement){var G=new l(E.$.frameElement).getDocumentPosition(m);n+=G.x;o+=G.y;}}if(!document.documentElement.getBoundingClientRect)if(f.gecko&&!q){n+=H.$.clientLeft?1:0;o+=H.$.clientTop?1:0;}return{x:n,y:o};},scrollIntoView:function(m){var s=this;var n=s.getWindow(),o=n.getViewPaneSize().height,p=o*-1;if(m)p+=o;else{p+=s.$.offsetHeight||0;p+=parseInt(s.getComputedStyle('marginBottom')||0,10)||0;}var q=s.getDocumentPosition();p+=q.y;p=p<0?0:p;var r=n.getScrollPosition().y;if(p>r||p<r-o)n.$.scrollTo(0,p);},setState:function(m){var n=this;switch(m){case 1:n.addClass('cke_on');n.removeClass('cke_off');n.removeClass('cke_disabled');break;case 0:n.addClass('cke_disabled');n.removeClass('cke_off');n.removeClass('cke_on');break;default:n.addClass('cke_off');n.removeClass('cke_on');n.removeClass('cke_disabled');break;}},getFrameDocument:function(){var m=this.$;try{m.contentWindow.document;}catch(n){m.src=m.src;if(g&&f.version<7)window.showModalDialog('javascript:document.write("<script>window.setTimeout(function(){window.close();},50);</script>")');}return m&&new k(m.contentWindow.document);},copyAttributes:function(m,n){var t=this;var o=t.$.attributes;n=n||{};for(var p=0;p<o.length;p++){var q=o[p],r=q.nodeName.toLowerCase(),s;if(r in n)continue;if(r=='checked'&&(s=t.getAttribute(r)))m.setAttribute(r,s);else if(q.specified||g&&q.nodeValue&&r=='value'){s=t.getAttribute(r);if(s===null)s=q.nodeValue;m.setAttribute(r,s);}}if(t.$.style.cssText!=='')m.$.style.cssText=t.$.style.cssText;},renameNode:function(m){var p=this;if(p.getName()==m)return;var n=p.getDocument(),o=new l(m,n);p.copyAttributes(o);p.moveChildren(o);p.getParent()&&p.$.parentNode.replaceChild(o.$,p.$);o.$['data-cke-expando']=p.$['data-cke-expando'];p.$=o.$;},getChild:function(m){var n=this.$;if(!m.slice)n=n.childNodes[m];else while(m.length>0&&n)n=n.childNodes[m.shift()];return n?new h.node(n):null;},getChildCount:function(){return this.$.childNodes.length;
},disableContextMenu:function(){this.on('contextmenu',function(m){if(!m.data.getTarget().hasClass('cke_enable_context_menu'))m.data.preventDefault();});},getDirection:function(m){return m?this.getComputedStyle('direction'):this.getStyle('direction')||this.getAttribute('dir');},data:function(m,n){m='data-'+m;if(n===undefined)return this.getAttribute(m);else if(n===false)this.removeAttribute(m);else this.setAttribute(m,n);return null;}});(function(){var m={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']};function n(o){var p=0;for(var q=0,r=m[o].length;q<r;q++)p+=parseInt(this.getComputedStyle(m[o][q])||0,10)||0;return p;};l.prototype.setSize=function(o,p,q){if(typeof p=='number'){if(q&&!(g&&f.quirks))p-=n.call(this,o);this.setStyle(o,p+'px');}};l.prototype.getSize=function(o,p){var q=Math.max(this.$['offset'+i.capitalize(o)],this.$['client'+i.capitalize(o)])||0;if(p)q-=n.call(this,o);return q;};})();e.command=function(m,n){this.uiItems=[];this.exec=function(o){if(this.state==0)return false;if(this.editorFocus)m.focus();return n.exec.call(this,m,o)!==false;};i.extend(this,n,{modes:{wysiwyg:1},editorFocus:1,state:2});e.event.call(this);};e.command.prototype={enable:function(){var m=this;if(m.state==0)m.setState(!m.preserveState||typeof m.previousState=='undefined'?2:m.previousState);},disable:function(){this.setState(0);},setState:function(m){var n=this;if(n.state==m)return false;n.previousState=n.state;n.state=m;n.fire('state');return true;},toggleState:function(){var m=this;if(m.state==2)m.setState(1);else if(m.state==1)m.setState(2);}};e.event.implementOn(e.command.prototype,true);e.ENTER_P=1;e.ENTER_BR=2;e.ENTER_DIV=3;e.config={customConfig:'config.js',autoUpdateElement:true,baseHref:'',contentsCss:e.basePath+'contents.css',contentsLangDirection:'ui',contentsLanguage:'',language:'',defaultLanguage:'en',enterMode:1,forceEnterMode:false,shiftEnterMode:2,corePlugins:'',docType:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};
var m=e.config;e.focusManager=function(n){if(n.focusManager)return n.focusManager;this.hasFocus=false;this._={editor:n};return this;};e.focusManager.prototype={focus:function(){var o=this;if(o._.timer)clearTimeout(o._.timer);if(!o.hasFocus){if(e.currentInstance)e.currentInstance.focusManager.forceBlur();var n=o._.editor;n.container.getChild(1).addClass('cke_focus');o.hasFocus=true;n.fire('focus');}},blur:function(){var n=this;if(n._.timer)clearTimeout(n._.timer);n._.timer=setTimeout(function(){delete n._.timer;n.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var n=this._.editor;n.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;n.fire('blur');}}};(function(){var n={};e.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':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(o,p,q){if(typeof e.vbphrase=='object')q(o,e.vbphrase);else{if(!o||!e.lang.languages[o])o=this.detect(p,o);if(!this[o])e.scriptLoader.load(e.getUrl('lang/'+o+'.js'),function(){q(o,this[o]);},this);else q(o,this[o]);}},detect:function(o,p){var q=this.languages;p=p||navigator.userLanguage||navigator.language;var r=p.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),s=r[1],t=r[2];if(q[s+'-'+t])s=s+'-'+t;else if(!q[s])s=null;e.lang.detect=s?function(){return s;}:function(u){return u;};return s||o;}};})();e.scriptLoader=(function(){var n={},o={};return{load:function(p,q,r,s){var t=typeof p=='string';if(t)p=[p];if(!r)r=e;var u=p.length,v=[],w=[],x=function(C){if(q)if(t)q.call(r,C);else q.call(r,v,w);};if(u===0){x(true);return;}var y=function(C,D){(D?v:w).push(C);if(--u<=0){s&&e.document.getDocumentElement().removeStyle('cursor');x(D);}},z=function(C,D){n[C]=1;var E=o[C];delete o[C];for(var F=0;F<E.length;F++)E[F](C,D);},A=function(C){if(n[C]){y(C,true);return;}var D=o[C]||(o[C]=[]);D.push(y);if(D.length>1)return;var E=new l('script');E.setAttributes({type:'text/javascript',src:C});if(q)if(g)E.$.onreadystatechange=function(){if(E.$.readyState=='loaded'||E.$.readyState=='complete'){E.$.onreadystatechange=null;z(C,true);}};else{E.$.onload=function(){setTimeout(function(){z(C,true);},0);};E.$.onerror=function(){z(C,false);};}E.appendTo(e.document.getHead());};s&&e.document.getDocumentElement().setStyle('cursor','wait');for(var B=0;
B<u;B++)A(p[B]);}};})();e.resourceManager=function(n,o){var p=this;p.basePath=n;p.fileName=o;p.registered={};p.loaded={};p.externals={};p._={waitingList:{}};};e.resourceManager.prototype={add:function(n,o){if(this.registered[n])throw '[CKEDITOR.resourceManager.add] The resource name "'+n+'" is already registered.';e.fire(n+i.capitalize(this.fileName)+'Ready',this.registered[n]=o||{});},get:function(n){return this.registered[n]||null;},getPath:function(n){var o=this.externals[n];return e.getUrl(o&&o.dir||this.basePath+n+'/');},getFilePath:function(n){var o=this.externals[n];return e.getUrl(this.getPath(n)+(o&&typeof o.file=='string'?o.file:this.fileName+'.js'));},addExternal:function(n,o,p){n=n.split(',');for(var q=0;q<n.length;q++){var r=n[q];this.externals[r]={dir:o,file:p};}},load:function(n,o,p){if(!i.isArray(n))n=n?[n]:[];var q=this.loaded,r=this.registered,s=[],t={},u={};for(var v=0;v<n.length;v++){var w=n[v];if(!w)continue;if(!q[w]&&!r[w]){var x=this.getFilePath(w);s.push(x);if(!(x in t))t[x]=[];t[x].push(w);}else u[w]=this.get(w);}e.scriptLoader.load(s,function(y,z){if(z.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+t[z[0]].join(',')+'" was not found at "'+z[0]+'".';for(var A=0;A<y.length;A++){var B=t[y[A]];for(var C=0;C<B.length;C++){var D=B[C];u[D]=this.get(D);q[D]=1;}}o.call(p,u);},this);}};e.plugins=new e.resourceManager('plugins/','plugin');var n=e.plugins;n.load=i.override(n.load,function(o){return function(p,q,r){var s={},t=function(u){o.call(this,u,function(v){i.extend(s,v);var w=[];for(var x in v){var y=v[x],z=y&&y.requires;if(z)for(var A=0;A<z.length;A++){if(!s[z[A]])w.push(z[A]);}}if(w.length)t.call(this,w);else{for(x in s){y=s[x];if(y.onLoad&&!y.onLoad._called){y.onLoad();y.onLoad._called=1;}}if(q)q.call(r||window,s);}},this);};t.call(this,p);};});n.setLang=function(o,p,q){var r=this.get(o),s=r.langEntries||(r.langEntries={}),t=r.lang||(r.lang=[]);if(i.indexOf(t,p)==-1)t.push(p);s[p]=q;};e.skins=(function(){var o={},p={},q=function(r,s,t,u){var v=o[s];if(!r.skin){r.skin=v;if(v.init)v.init(r);}var w=function(F){for(var G=0;G<F.length;G++)F[G]=e.getUrl(p[s]+F[G]);};function x(F,G){return F.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(H,I,J,K){if(/^\/|^\w?:/.test(J))return H;else return 'url('+G+I+J+K+')';});};t=v[t];var y=!t||!!t._isLoaded;if(y)u&&u();else{var z=t._pending||(t._pending=[]);z.push(u);if(z.length>1)return;var A=!t.css||!t.css.length,B=!t.js||!t.js.length,C=function(){if(A&&B){t._isLoaded=1;for(var F=0;
F<z.length;F++){if(z[F])z[F]();}}};if(!A){var D=t.css;if(i.isArray(D)){w(D);for(var E=0;E<D.length;E++)e.document.appendStyleSheet(D[E]);}else{D=x(D,e.getUrl(p[s]));e.document.appendStyleText(D);}t.css=D;A=1;}if(!B){w(t.js);e.scriptLoader.load(t.js,function(){B=1;C();});}C();}};return{add:function(r,s){o[r]=s;s.skinPath=p[r]||(p[r]=e.getUrl('skins/'+r+'/'));},load:function(r,s,t){var u=r.skinName,v=r.skinPath;if(o[u])q(r,u,s,t);else{p[u]=v;e.scriptLoader.load(e.getUrl(v+'skin.js'),function(){q(r,u,s,t);});}}};})();e.themes=new e.resourceManager('themes/','theme');e.ui=function(o){if(o.ui)return o.ui;this._={handlers:{},items:{},editor:o};return this;};var o=e.ui;o.prototype={add:function(p,q,r){this._.items[p]={type:q,command:r.command||null,args:Array.prototype.slice.call(arguments,2)};},create:function(p){var u=this;var q=u._.items[p],r=q&&u._.handlers[q.type],s=q&&q.command&&u._.editor.getCommand(q.command),t=r&&r.create.apply(u,q.args);if(s)s.uiItems.push(t);return t;},addHandler:function(p,q){this._.handlers[p]=q;}};e.event.implementOn(o);(function(){var p=0,q=function(){var B='editor'+ ++p;return e.instances&&e.instances[B]?q():B;},r={},s=function(B){var C=B.config.customConfig;if(!C)return false;C=e.getUrl(C);var D=r[C]||(r[C]={});if(D.fn){D.fn.call(B,B.config);if(e.getUrl(B.config.customConfig)==C||!s(B))B.fireOnce('customConfigLoaded');}else e.scriptLoader.load(C,function(){if(e.editorConfig)D.fn=e.editorConfig;else D.fn=function(){};s(B);});return true;},t=function(B,C){B.on('customConfigLoaded',function(){if(C){if(C.on)for(var D in C.on)B.on(D,C.on[D]);i.extend(B.config,C,true);delete B.config.on;}u(B);});if(C&&C.customConfig!=undefined)B.config.customConfig=C.customConfig;if(!s(B))B.fireOnce('customConfigLoaded');},u=function(B){var C=B.config.skin.split(','),D=C[0],E=e.getUrl(C[1]||'skins/'+D+'/');B.skinName=D;B.skinPath=E;B.skinClass='cke_skin_'+D;B.tabIndex=B.config.tabIndex||B.element.getAttribute('tabindex')||0;B.fireOnce('configLoaded');x(B);},v=function(B){e.lang.load(B.config.language,B.config.defaultLanguage,function(C,D){B.langCode=C;B.lang=i.prototypedCopy(D);if(f.gecko&&f.version<10900&&B.lang.dir=='rtl')B.lang.dir='ltr';var E=B.config;E.contentsLangDirection=='ui'&&(E.contentsLangDirection=B.lang.dir);w(B);});},w=function(B){var C=B.config,D=C.plugins,E=C.extraPlugins,F=C.removePlugins;if(E){var G=new RegExp('(?:^|,)(?:'+E.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');D=D.replace(G,'');D+=','+E;}if(F){G=new RegExp('(?:^|,)(?:'+F.replace(/\s*,\s*/g,'|')+')(?=,|$)','g');
D=D.replace(G,'');}f.air&&(D+=',adobeair');n.load(D.split(','),function(H){var I=[],J=[],K=[];B.plugins=H;for(var L in H){var M=H[L],N=M.lang,O=n.getPath(L),P=null;M.path=O;if(N){P=i.indexOf(N,B.langCode)>=0?B.langCode:N[0];if(!M.langEntries||!M.langEntries[P])K.push(e.getUrl(O+'lang/'+P+'.js'));else{i.extend(B.lang,M.langEntries[P]);P=null;}}J.push(P);I.push(M);}e.scriptLoader.load(K,function(){var Q=['beforeInit','init','afterInit'];for(var R=0;R<Q.length;R++)for(var S=0;S<I.length;S++){var T=I[S];if(R===0&&J[S]&&T.lang)i.extend(B.lang,T.langEntries[J[S]]);if(T[Q[R]])T[Q[R]](B);}B.fire('pluginsLoaded');y(B);});});},x=function(B){e.skins.load(B,'editor',function(){v(B);});},y=function(B){var C=B.config.theme;e.themes.load(C,function(){var D=B.theme=e.themes.get(C);D.path=e.themes.getPath(C);D.build(B);if(B.config.autoUpdateElement)z(B);});},z=function(B){var C=B.element;if(B.elementMode==1&&C.is('textarea')){var D=C.$.form&&new l(C.$.form);if(D){function E(){B.updateElement();};D.on('submit',E);if(!D.$.submit.nodeName&&!D.$.submit.length)D.$.submit=i.override(D.$.submit,function(F){return function(){B.updateElement();if(F.apply)F.apply(this,arguments);else F();};});B.on('destroy',function(){D.removeListener('submit',E);});}}};function A(){var B,C=this._.commands,D=this.mode;for(var E in C){B=C[E];B[B.startDisabled?'disable':B.modes[D]?'enable':'disable']();}};e.editor.prototype._init=function(){var D=this;var B=l.get(D._.element),C=D._.instanceConfig;delete D._.element;delete D._.instanceConfig;D._.commands={};D._.styles=[];D.element=B;D.name=B&&D.elementMode==1&&(B.getId()||B.getNameAtt())||q();if(D.name in e.instances)throw '[CKEDITOR.editor] The instance "'+D.name+'" already exists.';D.id=i.getNextId();D.config=i.prototypedCopy(m);D.ui=new o(D);D.focusManager=new e.focusManager(D);e.fire('instanceCreated',null,D);D.on('mode',A,null,null,1);t(D,C);};})();i.extend(e.editor.prototype,{addCommand:function(p,q){return this._.commands[p]=new e.command(this,q);},addCss:function(p){this._.styles.push(p);},destroy:function(p){var q=this;if(!p)q.updateElement();q.fire('destroy');q.theme&&q.theme.destroy(q);e.remove(q);e.fire('instanceDestroyed',null,q);},execCommand:function(p,q){var r=this.getCommand(p),s={name:p,commandData:q,command:r};if(r&&r.state!=0)if(this.fire('beforeCommandExec',s)!==true){s.returnValue=r.exec(s.commandData);if(!r.async&&this.fire('afterCommandExec',s)!==true)return s.returnValue;}return false;},getCommand:function(p){return this._.commands[p];
},getData:function(){var r=this;r.fire('beforeGetData');var p=r._.data;if(typeof p!='string'){var q=r.element;if(q&&r.elementMode==1)p=q.is('textarea')?q.getValue():q.getHtml();else p='';}p={dataValue:p};r.fire('getData',p);return p.dataValue;},getSnapshot:function(){var p=this.fire('getSnapshot');if(typeof p!='string'){var q=this.element;if(q&&this.elementMode==1)p=q.is('textarea')?q.getValue():q.getHtml();}return p;},loadSnapshot:function(p){this.fire('loadSnapshot',p);},setData:function(p,q,r){if(q)this.on('dataReady',function(t){t.removeListener();q.call(t.editor);});var s={dataValue:p};!r&&this.fire('setData',s);this._.data=s.dataValue;!r&&this.fire('afterSetData',s);},insertHtml:function(p){this.fire('insertHtml',p);},insertText:function(p){this.fire('insertText',p);},insertElement:function(p){this.fire('insertElement',p);},checkDirty:function(){return this.mayBeDirty&&this._.previousValue!==this.getSnapshot();},resetDirty:function(){if(this.mayBeDirty)this._.previousValue=this.getSnapshot();},updateElement:function(){var r=this;var p=r.element;if(p&&r.elementMode==1){var q=r.getData();if(r.config.htmlEncodeOutput)q=i.htmlEncode(q);if(p.is('textarea'))p.setValue(q);else p.setHtml(q);}}});e.on('loaded',function(){var p=e.editor._pending;if(p){delete e.editor._pending;for(var q=0;q<p.length;q++)p[q]._init();}});e.htmlParser=function(){this._={htmlPartsRegex:new RegExp("<(?:(?:\\/([^>]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var p=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,q={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};e.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(r){var E=this;var s,t,u=0,v;while(s=E._.htmlPartsRegex.exec(r)){var w=s.index;if(w>u){var x=r.substring(u,w);if(v)v.push(x);else E.onText(x);}u=E._.htmlPartsRegex.lastIndex;if(t=s[1]){t=t.toLowerCase();if(v&&j.$cdata[t]){E.onCDATA(v.join(''));v=null;}if(!v){E.onTagClose(t);continue;}}if(v){v.push(s[0]);continue;}if(t=s[3]){t=t.toLowerCase();if(/="/.test(t))continue;var y={},z,A=s[4],B=!!(A&&A.charAt(A.length-1)=='/');if(A)while(z=p.exec(A)){var C=z[1].toLowerCase(),D=z[2]||z[3]||z[4]||'';if(!D&&q[C])y[C]=C;else y[C]=D;}E.onTagOpen(t,y,B);if(!v&&j.$cdata[t])v=[];continue;}if(t=s[2])E.onComment(t);
}if(r.length>u)E.onText(r.substring(u,r.length));}};})();e.htmlParser.comment=function(p){this.value=p;this._={isBlockLike:false};};e.htmlParser.comment.prototype={type:8,writeHtml:function(p,q){var r=this.value;if(q){if(!(r=q.onComment(r,this)))return;if(typeof r!='string'){r.parent=this.parent;r.writeHtml(p,q);return;}}p.comment(r);}};(function(){var p=/[\t\r\n ]{2,}|[\t\r\n]/g;e.htmlParser.text=function(q){this.value=q;this._={isBlockLike:false};};e.htmlParser.text.prototype={type:3,writeHtml:function(q,r){var s=this.value;if(r&&!(s=r.onText(s,this)))return;q.text(s);}};})();(function(){e.htmlParser.cdata=function(p){this.value=p;};e.htmlParser.cdata.prototype={type:3,writeHtml:function(p){p.write(this.value);}};})();e.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var p=i.extend({table:1,ul:1,ol:1,dl:1},j.table,j.ul,j.ol,j.dl),q={ol:1,ul:1},r=i.extend({},{html:1},j.html,j.body,j.head,{style:1,script:1});e.htmlParser.fragment.fromHtml=function(s,t,u){var v=new e.htmlParser(),w=u||new e.htmlParser.fragment(),x=[],y=[],z=w,A=false;function B(E){var F;if(x.length>0)for(var G=0;G<x.length;G++){var H=x[G],I=H.name,J=j[I],K=z.name&&j[z.name];if((!K||K[I])&&(!E||!J||J[E]||!j[E])){if(!F){C();F=1;}H=H.clone();H.parent=z;z=H;x.splice(G,1);G--;}}};function C(){while(y.length)z.add(y.shift());};function D(E,F,G){if(E.previous!==undefined)return;F=F||z||w;var H=z;if(t&&(!F.type||F.name=='body')){var I,J;if(E.attributes&&(J=E.attributes['data-cke-real-element-type']))I=J;else I=E.name;if(I&&!(I in j.$body||I=='body'||E.isOrphan)){z=F;v.onTagOpen(t,{});E.returnPoint=F=z;}}if(E._.isBlockLike&&E.name!='pre'){var K=E.children.length,L=E.children[K-1],M;if(L&&L.type==3)if(!(M=i.rtrim(L.value)))E.children.length=K-1;else L.value=M;}F.add(E);if(E.returnPoint){z=E.returnPoint;delete E.returnPoint;}else z=G?F:H;};v.onTagOpen=function(E,F,G,H){var I=new e.htmlParser.element(E,F);if(I.isUnknown&&G)I.isEmpty=true;I.isOptionalClose=H;if(j.$removeEmpty[E]){x.push(I);return;}else if(E=='pre')A=true;else if(E=='br'&&A){z.add(new e.htmlParser.text('\n'));return;}if(E=='br'){y.push(I);return;}while(1){var J=z.name,K=J?j[J]||(z._.isBlockLike?j.div:j.span):r;if(!I.isUnknown&&!z.isUnknown&&!K[E]){if(z.isOptionalClose)v.onTagClose(J);else if(E in q&&J in q){var L=z.children,M=L[L.length-1];if(!(M&&M.name=='li'))D(M=new e.htmlParser.element('li'),z);!I.returnPoint&&(I.returnPoint=z);z=M;}else if(E in j.$listItem&&J!=E)v.onTagOpen(E=='li'?'ul':'dl',{},0,1);
else if(J in p&&J!=E){!I.returnPoint&&(I.returnPoint=z);z=z.parent;}else{if(J in j.$inline)x.unshift(z);if(z.parent)D(z,z.parent,1);else{I.isOrphan=1;break;}}}else break;}B(E);C();I.parent=z;if(I.isEmpty)D(I);else z=I;};v.onTagClose=function(E){for(var F=x.length-1;F>=0;F--){if(E==x[F].name){x.splice(F,1);return;}}var G=[],H=[],I=z;while(I!=w&&I.name!=E){if(!I._.isBlockLike)H.unshift(I);G.push(I);I=I.returnPoint||I.parent;}if(I!=w){for(F=0;F<G.length;F++){var J=G[F];D(J,J.parent);}z=I;if(z.name=='pre')A=false;if(I._.isBlockLike)C();D(I,I.parent);if(I==z)z=z.parent;x=x.concat(H);}if(E=='body')t=false;};v.onText=function(E){if(!z._.hasInlineStarted&&!A){E=i.ltrim(E);if(E.length===0)return;}C();B();if(t&&(!z.type||z.name=='body')&&i.trim(E))this.onTagOpen(t,{},0,1);if(!A)E=E.replace(/[\t\r\n ]{2,}|[\t\r\n]/g,' ');z.add(new e.htmlParser.text(E));};v.onCDATA=function(E){z.add(new e.htmlParser.cdata(E));};v.onComment=function(E){C();B();z.add(new e.htmlParser.comment(E));};v.parse(s);C(!g&&1);while(z!=w)D(z,z.parent,1);return w;};e.htmlParser.fragment.prototype={add:function(s){var v=this;var t=v.children.length,u=t>0&&v.children[t-1]||null;if(u){if(s._.isBlockLike&&u.type==3){u.value=i.rtrim(u.value);if(u.value.length===0){v.children.pop();v.add(s);return;}}u.next=s;}s.previous=u;s.parent=v;v.children.push(s);v._.hasInlineStarted=s.type==3||s.type==1&&!s._.isBlockLike;},writeHtml:function(s,t){var u;this.filterChildren=function(){var v=new e.htmlParser.basicWriter();this.writeChildrenHtml.call(this,v,t,true);var w=v.getHtml();this.children=new e.htmlParser.fragment.fromHtml(w).children;u=1;};!this.name&&t&&t.onFragment(this);this.writeChildrenHtml(s,u?null:t);},writeChildrenHtml:function(s,t){for(var u=0;u<this.children.length;u++)this.children[u].writeHtml(s,t);}};})();e.htmlParser.element=function(p,q){var w=this;w.name=p;w.attributes=q||(q={});w.children=[];var r=q['data-cke-real-element-type']||p||'',s=r.match(/^cke:(.*)/);s&&(r=s[1]);var t=j,u=!!(t.$nonBodyContent[r]||t.$block[r]||t.$listItem[r]||t.$tableContent[r]||t.$nonEditable[r]||r=='br'),v=!!t.$empty[p];w.isEmpty=v;w.isUnknown=!t[p];w._={isBlockLike:u,hasInlineStarted:v||!u};};(function(){var p=function(q,r){q=q[0];r=r[0];return q<r?-1:q>r?1:0;};e.htmlParser.element.prototype={type:1,add:e.htmlParser.fragment.prototype.add,clone:function(){return new e.htmlParser.element(this.name,this.attributes);},writeHtml:function(q,r){var s=this.attributes,t=this,u=t.name,v,w,x,y;t.filterChildren=function(){if(!y){var D=new e.htmlParser.basicWriter();
e.htmlParser.fragment.prototype.writeChildrenHtml.call(t,D,r);t.children=new e.htmlParser.fragment.fromHtml(D.getHtml(),0,t.clone()).children;y=1;}};if(r){for(;;){if(!(u=r.onElementName(u)))return;t.name=u;if(!(t=r.onElement(t)))return;t.parent=this.parent;if(t.name==u)break;if(t.type!=1){t.writeHtml(q,r);return;}u=t.name;if(!u){this.writeChildrenHtml.call(t,q,y?null:r);return;}}s=t.attributes;}q.openTag(u,s);var z=[];for(var A=0;A<2;A++)for(v in s){w=v;x=s[v];if(A==1)z.push([v,x]);else if(r){for(;;){if(!(w=r.onAttributeName(v))){delete s[v];break;}else if(w!=v){delete s[v];v=w;continue;}else break;}if(w)if((x=r.onAttribute(t,w,x))===false)delete s[w];else s[w]=x;}}if(q.sortAttributes)z.sort(p);var B=z.length;for(A=0;A<B;A++){var C=z[A];q.attribute(C[0],C[1]);}q.openTagClose(u,t.isEmpty);if(!t.isEmpty){this.writeChildrenHtml.call(t,q,y?null:r);q.closeTag(u);}},writeChildrenHtml:function(q,r){e.htmlParser.fragment.prototype.writeChildrenHtml.apply(this,arguments);}};})();(function(){e.htmlParser.filter=i.createClass({$:function(u){this._={elementNames:[],attributeNames:[],elements:{$length:0},attributes:{$length:0}};if(u)this.addRules(u,10);},proto:{addRules:function(u,v){var w=this;if(typeof v!='number')v=10;q(w._.elementNames,u.elementNames,v);q(w._.attributeNames,u.attributeNames,v);r(w._.elements,u.elements,v);r(w._.attributes,u.attributes,v);w._.text=s(w._.text,u.text,v)||w._.text;w._.comment=s(w._.comment,u.comment,v)||w._.comment;w._.root=s(w._.root,u.root,v)||w._.root;},onElementName:function(u){return p(u,this._.elementNames);},onAttributeName:function(u){return p(u,this._.attributeNames);},onText:function(u){var v=this._.text;return v?v.filter(u):u;},onComment:function(u,v){var w=this._.comment;return w?w.filter(u,v):u;},onFragment:function(u){var v=this._.root;return v?v.filter(u):u;},onElement:function(u){var z=this;var v=[z._.elements['^'],z._.elements[u.name],z._.elements.$],w,x;for(var y=0;y<3;y++){w=v[y];if(w){x=w.filter(u,z);if(x===false)return null;if(x&&x!=u)return z.onNode(x);if(u.parent&&!u.name)break;}}return u;},onNode:function(u){var v=u.type;return v==1?this.onElement(u):v==3?new e.htmlParser.text(this.onText(u.value)):v==8?new e.htmlParser.comment(this.onComment(u.value)):null;},onAttribute:function(u,v,w){var x=this._.attributes[v];if(x){var y=x.filter(w,u,this);if(y===false)return false;if(typeof y!='undefined')return y;}return w;}}});function p(u,v){for(var w=0;u&&w<v.length;w++){var x=v[w];u=u.replace(x[0],x[1]);}return u;};function q(u,v,w){if(typeof v=='function')v=[v];
var x,y,z=u.length,A=v&&v.length;if(A){for(x=0;x<z&&u[x].pri<w;x++){}for(y=A-1;y>=0;y--){var B=v[y];if(B){B.pri=w;u.splice(x,0,B);}}}};function r(u,v,w){if(v)for(var x in v){var y=u[x];u[x]=s(y,v[x],w);if(!y)u.$length++;}};function s(u,v,w){if(v){v.pri=w;if(u){if(!u.splice){if(u.pri>w)u=[v,u];else u=[u,v];u.filter=t;}else q(u,v,w);return u;}else{v.filter=v;return v;}}};function t(u){var v=u.type||u instanceof e.htmlParser.fragment;for(var w=0;w<this.length;w++){if(v)var x=u.type,y=u.name;var z=this[w],A=z.apply(window,arguments);if(A===false)return A;if(v){if(A&&(A.name!=y||A.type!=x))return A;}else if(typeof A!='string')return A;A!=undefined&&(u=A);}return u;};})();e.htmlParser.basicWriter=i.createClass({$:function(){this._={output:[]};},proto:{openTag:function(p,q){this._.output.push('<',p);},openTagClose:function(p,q){if(q)this._.output.push(' />');else this._.output.push('>');},attribute:function(p,q){if(typeof q=='string')q=i.htmlEncodeAttr(q);this._.output.push(' ',p,'="',q,'"');},closeTag:function(p){this._.output.push('</',p,'>');},text:function(p){this._.output.push(p);},comment:function(p){this._.output.push('<!--',p,'-->');},write:function(p){this._.output.push(p);},reset:function(){this._.output=[];this._.indent=false;},getHtml:function(p){var q=this._.output.join('');if(p)this.reset();return q;}}});delete e.loadFullCore;e.instances={};e.document=new k(document);e.add=function(p){e.instances[p.name]=p;p.on('focus',function(){if(e.currentInstance!=p){e.currentInstance=p;e.fire('currentInstance');}});p.on('blur',function(){if(e.currentInstance==p){e.currentInstance=null;e.fire('currentInstance');}});};e.remove=function(p){delete e.instances[p.name];};e.on('instanceDestroyed',function(){if(i.isEmpty(this.instances))e.fire('reset');});e.TRISTATE_ON=1;e.TRISTATE_OFF=2;e.TRISTATE_DISABLED=0;h.comment=i.createClass({base:h.node,$:function(p,q){if(typeof p=='string')p=(q?q.$:document).createComment(p);this.base(p);},proto:{type:8,getOuterHtml:function(){return '<!--'+this.$.nodeValue+'-->';}}});(function(){var p={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,dd:1,legend:1},q={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1,fieldset:1},r=function(s){var t=s.getChildren();for(var u=0,v=t.count();u<v;u++){var w=t.getItem(u);if(w.type==1&&j.$block[w.getName()])return true;}return false;};h.elementPath=function(s){var y=this;var t=null,u=null,v=[],w=s;while(w){if(w.type==1){if(!y.lastElement)y.lastElement=w;var x=w.getName();
if(g&&w.$.scopeName!='HTML')x=w.$.scopeName.toLowerCase()+':'+x;if(!u){if(!t&&p[x])t=w;if(q[x])if(!t&&x=='div'&&!r(w))t=w;else u=w;}v.push(w);if(x=='body')break;}w=w.getParent();}y.block=t;y.blockLimit=u;y.elements=v;};})();h.elementPath.prototype={compare:function(p){var q=this.elements,r=p&&p.elements;if(!r||q.length!=r.length)return false;for(var s=0;s<q.length;s++){if(!q[s].equals(r[s]))return false;}return true;},contains:function(p){var q=this.elements;for(var r=0;r<q.length;r++){if(q[r].getName() in p)return q[r];}return null;}};h.text=function(p,q){if(typeof p=='string')p=(q?q.$:document).createTextNode(p);this.$=p;};h.text.prototype=new h.node();i.extend(h.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},setText:function(p){this.$.nodeValue=p;},split:function(p){var u=this;if(g&&p==u.getLength()){var q=u.getDocument().createText('');q.insertAfter(u);return q;}var r=u.getDocument(),s=new h.text(u.$.splitText(p),r);if(f.ie8){var t=new h.text('',r);t.insertAfter(s);t.remove();}return s;},substring:function(p,q){if(typeof q!='number')return this.$.nodeValue.substr(p);else return this.$.nodeValue.substring(p,q);}});h.documentFragment=function(p){p=p||e.document;this.$=p.$.createDocumentFragment();};i.extend(h.documentFragment.prototype,l.prototype,{type:11,insertAfterNode:function(p){p=p.$;p.parentNode.insertBefore(this.$,p.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 p(w,x){if(this._.end)return null;var y,z=this.range,A,B=this.guard,C=this.type,D=w?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;z.trim();if(z.collapsed){this.end();return null;}}if(!w&&!this._.guardLTR){var E=z.endContainer,F=E.getChild(z.endOffset);this._.guardLTR=function(J,K){return(!K||!E.equals(J))&&(!F||!J.equals(F))&&(J.type!=1||!K||J.getName()!='body');};}if(w&&!this._.guardRTL){var G=z.startContainer,H=z.startOffset>0&&G.getChild(z.startOffset-1);this._.guardRTL=function(J,K){return(!K||!G.equals(J))&&(!H||!J.equals(H))&&(J.type!=1||!K||J.getName()!='body');};}var I=w?this._.guardRTL:this._.guardLTR;if(B)A=function(J,K){if(I(J,K)===false)return false;return B(J,K);};else A=I;if(this.current)y=this.current[D](false,C,A);else if(w){y=z.endContainer;if(z.endOffset>0){y=y.getChild(z.endOffset-1);
if(A(y)===false)y=null;}else y=A(y,true)===false?null:y.getPreviousSourceNode(true,C,A);}else{y=z.startContainer;y=y.getChild(z.startOffset);if(y){if(A(y)===false)y=null;}else y=A(z.startContainer,true)===false?null:z.startContainer.getNextSourceNode(true,C,A);}while(y&&!this._.end){this.current=y;if(!this.evaluator||this.evaluator(y)!==false){if(!x)return y;}else if(x&&this.evaluator)return false;y=y[D](false,C,A);}this.end();return this.current=null;};function q(w){var x,y=null;while(x=p.call(this,w))y=x;return y;};h.walker=i.createClass({$:function(w){this.range=w;this._={};},proto:{end:function(){this._.end=1;},next:function(){return p.call(this);},previous:function(){return p.call(this,1);},checkForward:function(){return p.call(this,0,1)!==false;},checkBackward:function(){return p.call(this,1,1)!==false;},lastForward:function(){return q.call(this);},lastBackward:function(){return q.call(this,1);},reset:function(){delete this.current;this._={};}}});var r={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};l.prototype.isBlockBoundary=function(w){var x=i.extend({},j.$block,w||{});return this.getComputedStyle('float')=='none'&&r[this.getComputedStyle('display')]||x[this.getName()];};h.walker.blockBoundary=function(w){return function(x,y){return!(x.type==1&&x.isBlockBoundary(w));};};h.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};h.walker.bookmark=function(w,x){function y(z){return z&&z.getName&&z.getName()=='span'&&z.data('cke-bookmark');};return function(z){var A,B;A=z&&!z.getName&&(B=z.getParent())&&y(B);A=w?A:A||y(z);return!!(x^A);};};h.walker.whitespaces=function(w){return function(x){var y=x&&x.type==3&&!i.trim(x.getText());return!!(w^y);};};h.walker.invisible=function(w){var x=h.walker.whitespaces();return function(y){var z=x(y)||y.is&&!y.$.offsetHeight;return!!(w^z);};};h.walker.nodeType=function(w,x){return function(y){return!!(x^y.type==w);};};var s=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,t=h.walker.whitespaces(),u=h.walker.bookmark(),v=function(w){return u(w)||t(w)||w.type==1&&w.getName() in j.$inline&&!(w.getName() in j.$empty);};l.prototype.getBogus=function(){var w=this;do w=w.getPreviousSourceNode();while(v(w));if(w&&(!g?w.is&&w.is('br'):w.getText&&s.test(w.getText())))return w;return false;};})();h.range=function(p){var q=this;q.startContainer=null;q.startOffset=null;q.endContainer=null;q.endOffset=null;
q.collapsed=true;q.document=p;};(function(){var p=function(x){x.collapsed=x.startContainer&&x.endContainer&&x.startContainer.equals(x.endContainer)&&x.startOffset==x.endOffset;},q=function(x,y,z,A){x.optimizeBookmark();var B=x.startContainer,C=x.endContainer,D=x.startOffset,E=x.endOffset,F,G;if(C.type==3)C=C.split(E);else if(C.getChildCount()>0)if(E>=C.getChildCount()){C=C.append(x.document.createText(''));G=true;}else C=C.getChild(E);if(B.type==3){B.split(D);if(B.equals(C))C=B.getNext();}else if(!D){B=B.getFirst().insertBeforeMe(x.document.createText(''));F=true;}else if(D>=B.getChildCount()){B=B.append(x.document.createText(''));F=true;}else B=B.getChild(D).getPrevious();var H=B.getParents(),I=C.getParents(),J,K,L;for(J=0;J<H.length;J++){K=H[J];L=I[J];if(!K.equals(L))break;}var M=z,N,O,P,Q;for(var R=J;R<H.length;R++){N=H[R];if(M&&!N.equals(B))O=M.append(N.clone());P=N.getNext();while(P){if(P.equals(I[R])||P.equals(C))break;Q=P.getNext();if(y==2)M.append(P.clone(true));else{P.remove();if(y==1)M.append(P);}P=Q;}if(M)M=O;}M=z;for(var S=J;S<I.length;S++){N=I[S];if(y>0&&!N.equals(C))O=M.append(N.clone());if(!H[S]||N.$.parentNode!=H[S].$.parentNode){P=N.getPrevious();while(P){if(P.equals(H[S])||P.equals(B))break;Q=P.getPrevious();if(y==2)M.$.insertBefore(P.$.cloneNode(true),M.$.firstChild);else{P.remove();if(y==1)M.$.insertBefore(P.$,M.$.firstChild);}P=Q;}}if(M)M=O;}if(y==2){var T=x.startContainer;if(T.type==3){T.$.data+=T.$.nextSibling.data;T.$.parentNode.removeChild(T.$.nextSibling);}var U=x.endContainer;if(U.type==3&&U.$.nextSibling){U.$.data+=U.$.nextSibling.data;U.$.parentNode.removeChild(U.$.nextSibling);}}else{if(K&&L&&(B.$.parentNode!=K.$.parentNode||C.$.parentNode!=L.$.parentNode)){var V=L.getIndex();if(F&&L.$.parentNode==B.$.parentNode)V--;if(A&&K.type==1){var W=l.createFromHtml('<span data-cke-bookmark="1" style="display:none">&nbsp;</span>',x.document);W.insertAfter(K);K.mergeSiblings(false);x.moveToBookmark({startNode:W});}else x.setStart(L.getParent(),V);}x.collapse(true);}if(F)B.remove();if(G&&C.$.parentNode)C.remove();},r={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 s(x){var y=false,z=h.walker.bookmark(true);return function(A){if(z(A))return true;if(A.type==3){if(i.trim(A.getText()).length)return false;}else if(A.type==1)if(!r[A.getName()])if(!x&&!g&&A.getName()=='br'&&!y)y=true;else return false;return true;};};function t(x){return x.type!=3&&x.getName() in j.$removeEmpty||!i.trim(x.getText())||!!x.getParent().data('cke-bookmark');
};var u=new h.walker.whitespaces(),v=new h.walker.bookmark();function w(x){return!u(x)&&!v(x);};h.range.prototype={clone:function(){var y=this;var x=new h.range(y.document);x.startContainer=y.startContainer;x.startOffset=y.startOffset;x.endContainer=y.endContainer;x.endOffset=y.endOffset;x.collapsed=y.collapsed;return x;},collapse:function(x){var y=this;if(x){y.endContainer=y.startContainer;y.endOffset=y.startOffset;}else{y.startContainer=y.endContainer;y.startOffset=y.endOffset;}y.collapsed=true;},cloneContents:function(){var x=new h.documentFragment(this.document);if(!this.collapsed)q(this,2,x);return x;},deleteContents:function(x){if(this.collapsed)return;q(this,0,null,x);},extractContents:function(x){var y=new h.documentFragment(this.document);if(!this.collapsed)q(this,1,y,x);return y;},createBookmark:function(x){var D=this;var y,z,A,B,C=D.collapsed;y=D.document.createElement('span');y.data('cke-bookmark',1);y.setStyle('display','none');y.setHtml('&nbsp;');if(x){A='cke_bm_'+i.getNextNumber();y.setAttribute('id',A+'S');}if(!C){z=y.clone();z.setHtml('&nbsp;');if(x)z.setAttribute('id',A+'E');B=D.clone();B.collapse();B.insertNode(z);}B=D.clone();B.collapse(true);B.insertNode(y);if(z){D.setStartAfter(y);D.setEndBefore(z);}else D.moveToPosition(y,4);return{startNode:x?A+'S':y,endNode:x?A+'E':z,serializable:x,collapsed:C};},createBookmark2:function(x){var F=this;var y=F.startContainer,z=F.endContainer,A=F.startOffset,B=F.endOffset,C=F.collapsed,D,E;if(!y||!z)return{start:0,end:0};if(x){if(y.type==1){D=y.getChild(A);if(D&&D.type==3&&A>0&&D.getPrevious().type==3){y=D;A=0;}if(D&&D.type==1)A=D.getIndex(1);}while(y.type==3&&(E=y.getPrevious())&&E.type==3){y=E;A+=E.getLength();}if(!C){if(z.type==1){D=z.getChild(B);if(D&&D.type==3&&B>0&&D.getPrevious().type==3){z=D;B=0;}if(D&&D.type==1)B=D.getIndex(1);}while(z.type==3&&(E=z.getPrevious())&&E.type==3){z=E;B+=E.getLength();}}}return{start:y.getAddress(x),end:C?null:z.getAddress(x),startOffset:A,endOffset:B,normalized:x,collapsed:C,is2:true};},moveToBookmark:function(x){var F=this;if(x.is2){var y=F.document.getByAddress(x.start,x.normalized),z=x.startOffset,A=x.end&&F.document.getByAddress(x.end,x.normalized),B=x.endOffset;F.setStart(y,z);if(A)F.setEnd(A,B);else F.collapse(true);}else{var C=x.serializable,D=C?F.document.getById(x.startNode):x.startNode,E=C?F.document.getById(x.endNode):x.endNode;F.setStartBefore(D);D.remove();if(E){F.setEndBefore(E);E.remove();}else F.collapse(true);}},getBoundaryNodes:function(){var C=this;
var x=C.startContainer,y=C.endContainer,z=C.startOffset,A=C.endOffset,B;if(x.type==1){B=x.getChildCount();if(B>z)x=x.getChild(z);else if(B<1)x=x.getPreviousSourceNode();else{x=x.$;while(x.lastChild)x=x.lastChild;x=new h.node(x);x=x.getNextSourceNode()||x;}}if(y.type==1){B=y.getChildCount();if(B>A)y=y.getChild(A).getPreviousSourceNode(true);else if(B<1)y=y.getPreviousSourceNode();else{y=y.$;while(y.lastChild)y=y.lastChild;y=new h.node(y);}}if(x.getPosition(y)&2)x=y;return{startNode:x,endNode:y};},getCommonAncestor:function(x,y){var C=this;var z=C.startContainer,A=C.endContainer,B;if(z.equals(A)){if(x&&z.type==1&&C.startOffset==C.endOffset-1)B=z.getChild(C.startOffset);else B=z;}else B=z.getCommonAncestor(A);return y&&!B.is?B.getParent():B;},optimize:function(){var z=this;var x=z.startContainer,y=z.startOffset;if(x.type!=1)if(!y)z.setStartBefore(x);else if(y>=x.getLength())z.setStartAfter(x);x=z.endContainer;y=z.endOffset;if(x.type!=1)if(!y)z.setEndBefore(x);else if(y>=x.getLength())z.setEndAfter(x);},optimizeBookmark:function(){var z=this;var x=z.startContainer,y=z.endContainer;if(x.is&&x.is('span')&&x.data('cke-bookmark'))z.setStartAt(x,3);if(y&&y.is&&y.is('span')&&y.data('cke-bookmark'))z.setEndAt(y,4);},trim:function(x,y){var F=this;var z=F.startContainer,A=F.startOffset,B=F.collapsed;if((!x||B)&&z&&z.type==3){if(!A){A=z.getIndex();z=z.getParent();}else if(A>=z.getLength()){A=z.getIndex()+1;z=z.getParent();}else{var C=z.split(A);A=z.getIndex()+1;z=z.getParent();if(F.startContainer.equals(F.endContainer))F.setEnd(C,F.endOffset-F.startOffset);else if(z.equals(F.endContainer))F.endOffset+=1;}F.setStart(z,A);if(B){F.collapse(true);return;}}var D=F.endContainer,E=F.endOffset;if(!(y||B)&&D&&D.type==3){if(!E){E=D.getIndex();D=D.getParent();}else if(E>=D.getLength()){E=D.getIndex()+1;D=D.getParent();}else{D.split(E);E=D.getIndex()+1;D=D.getParent();}F.setEnd(D,E);}},enlarge:function(x,y){switch(x){case 1:if(this.collapsed)return;var z=this.getCommonAncestor(),A=this.document.getBody(),B,C,D,E,F,G=false,H,I,J=this.startContainer,K=this.startOffset;if(J.type==3){if(K){J=!i.trim(J.substring(0,K)).length&&J;G=!!J;}if(J)if(!(E=J.getPrevious()))D=J.getParent();}else{if(K)E=J.getChild(K-1)||J.getLast();if(!E)D=J;}while(D||E){if(D&&!E){if(!F&&D.equals(z))F=true;if(!A.contains(D))break;if(!G||D.getComputedStyle('display')!='inline'){G=false;if(F)B=D;else this.setStartBefore(D);}E=D.getPrevious();}while(E){H=false;if(E.type==3){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;
H=/[\s\ufeff]$/.test(I);}else if((E.$.offsetWidth>0||y&&E.is('br'))&&!E.data('cke-bookmark'))if(G&&j.$removeEmpty[E.getName()]){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;else{var L=E.$.all||E.$.getElementsByTagName('*');for(var M=0,N;N=L[M++];){if(!j.$removeEmpty[N.nodeName.toLowerCase()]){E=null;break;}}}if(E)H=!!I.length;}else E=null;if(H)if(G){if(F)B=D;else if(D)this.setStartBefore(D);}else G=true;if(E){var O=E.getPrevious();if(!D&&!O){D=E;E=null;break;}E=O;}else D=null;}if(D)D=D.getParent();}J=this.endContainer;K=this.endOffset;D=E=null;F=G=false;if(J.type==3){J=!i.trim(J.substring(K)).length&&J;G=!(J&&J.getLength());if(J)if(!(E=J.getNext()))D=J.getParent();}else{E=J.getChild(K);if(!E)D=J;}while(D||E){if(D&&!E){if(!F&&D.equals(z))F=true;if(!A.contains(D))break;if(!G||D.getComputedStyle('display')!='inline'){G=false;if(F)C=D;else if(D)this.setEndAfter(D);}E=D.getNext();}while(E){H=false;if(E.type==3){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;H=/^[\s\ufeff]/.test(I);}else if((E.$.offsetWidth>0||y&&E.is('br'))&&!E.data('cke-bookmark'))if(G&&j.$removeEmpty[E.getName()]){I=E.getText();if(/[^\s\ufeff]/.test(I))E=null;else{L=E.$.all||E.$.getElementsByTagName('*');for(M=0;N=L[M++];){if(!j.$removeEmpty[N.nodeName.toLowerCase()]){E=null;break;}}}if(E)H=!!I.length;}else E=null;if(H)if(G)if(F)C=D;else this.setEndAfter(D);if(E){O=E.getNext();if(!D&&!O){D=E;E=null;break;}E=O;}else D=null;}if(D)D=D.getParent();}if(B&&C){z=B.contains(C)?C:B;this.setStartBefore(z);this.setEndAfter(z);}break;case 2:case 3:var P=new h.range(this.document);A=this.document.getBody();P.setStartAt(A,1);P.setEnd(this.startContainer,this.startOffset);var Q=new h.walker(P),R,S,T=h.walker.blockBoundary(x==3?{br:1}:null),U=function(W){var X=T(W);if(!X)R=W;return X;},V=function(W){var X=U(W);if(!X&&W.is&&W.is('br'))S=W;return X;};Q.guard=U;D=Q.lastBackward();R=R||A;this.setStartAt(R,!R.is('br')&&(!D&&this.checkStartOfBlock()||D&&R.contains(D))?1:4);P=this.clone();P.collapse();P.setEndAt(A,2);Q=new h.walker(P);Q.guard=x==3?V:U;R=null;D=Q.lastForward();R=R||A;this.setEndAt(R,!D&&this.checkEndOfBlock()||D&&R.contains(D)?2:3);if(S)this.setEndAfter(S);}},shrink:function(x,y){if(!this.collapsed){x=x||2;var z=this.clone(),A=this.startContainer,B=this.endContainer,C=this.startOffset,D=this.endOffset,E=this.collapsed,F=1,G=1;if(A&&A.type==3)if(!C)z.setStartBefore(A);else if(C>=A.getLength())z.setStartAfter(A);else{z.setStartBefore(A);F=0;}if(B&&B.type==3)if(!D)z.setEndBefore(B);else if(D>=B.getLength())z.setEndAfter(B);
else{z.setEndAfter(B);G=0;}var H=new h.walker(z),I=h.walker.bookmark();H.evaluator=function(M){return M.type==(x==1?1:3);};var J;H.guard=function(M,N){if(I(M))return true;if(x==1&&M.type==3)return false;if(N&&M.equals(J))return false;if(!N&&M.type==1)J=M;return true;};if(F){var K=H[x==1?'lastForward':'next']();K&&this.setStartAt(K,y?1:3);}if(G){H.reset();var L=H[x==1?'lastBackward':'previous']();L&&this.setEndAt(L,y?2:4);}return!!(F||G);}},insertNode:function(x){var B=this;B.optimizeBookmark();B.trim(false,true);var y=B.startContainer,z=B.startOffset,A=y.getChild(z);if(A)x.insertBefore(A);else y.append(x);if(x.getParent().equals(B.endContainer))B.endOffset++;B.setStartBefore(x);},moveToPosition:function(x,y){this.setStartAt(x,y);this.collapse(true);},selectNodeContents:function(x){this.setStart(x,0);this.setEnd(x,x.type==3?x.getLength():x.getChildCount());},setStart:function(x,y){var z=this;if(x.type==1&&j.$empty[x.getName()])y=x.getIndex(),x=x.getParent();z.startContainer=x;z.startOffset=y;if(!z.endContainer){z.endContainer=x;z.endOffset=y;}p(z);},setEnd:function(x,y){var z=this;if(x.type==1&&j.$empty[x.getName()])y=x.getIndex()+1,x=x.getParent();z.endContainer=x;z.endOffset=y;if(!z.startContainer){z.startContainer=x;z.startOffset=y;}p(z);},setStartAfter:function(x){this.setStart(x.getParent(),x.getIndex()+1);},setStartBefore:function(x){this.setStart(x.getParent(),x.getIndex());},setEndAfter:function(x){this.setEnd(x.getParent(),x.getIndex()+1);},setEndBefore:function(x){this.setEnd(x.getParent(),x.getIndex());},setStartAt:function(x,y){var z=this;switch(y){case 1:z.setStart(x,0);break;case 2:if(x.type==3)z.setStart(x,x.getLength());else z.setStart(x,x.getChildCount());break;case 3:z.setStartBefore(x);break;case 4:z.setStartAfter(x);}p(z);},setEndAt:function(x,y){var z=this;switch(y){case 1:z.setEnd(x,0);break;case 2:if(x.type==3)z.setEnd(x,x.getLength());else z.setEnd(x,x.getChildCount());break;case 3:z.setEndBefore(x);break;case 4:z.setEndAfter(x);}p(z);},fixBlock:function(x,y){var B=this;var z=B.createBookmark(),A=B.document.createElement(y);B.collapse(x);B.enlarge(2);B.extractContents().appendTo(A);A.trim();if(!g)A.appendBogus();B.insertNode(A);B.moveToBookmark(z);return A;},splitBlock:function(x){var H=this;var y=new h.elementPath(H.startContainer),z=new h.elementPath(H.endContainer),A=y.blockLimit,B=z.blockLimit,C=y.block,D=z.block,E=null;if(!A.equals(B))return null;if(x!='br'){if(!C){C=H.fixBlock(true,x);D=new h.elementPath(H.endContainer).block;}if(!D)D=H.fixBlock(false,x);
}var F=C&&H.checkStartOfBlock(),G=D&&H.checkEndOfBlock();H.deleteContents();if(C&&C.equals(D))if(G){E=new h.elementPath(H.startContainer);H.moveToPosition(D,4);D=null;}else if(F){E=new h.elementPath(H.startContainer);H.moveToPosition(C,3);C=null;}else{D=H.splitElement(C);if(!g&&!C.is('ul','ol'))C.appendBogus();}return{previousBlock:C,nextBlock:D,wasStartOfBlock:F,wasEndOfBlock:G,elementPath:E};},splitElement:function(x){var A=this;if(!A.collapsed)return null;A.setEndAt(x,2);var y=A.extractContents(),z=x.clone(false);y.appendTo(z);z.insertAfter(x);A.moveToPosition(x,4);return z;},checkBoundaryOfElement:function(x,y){var z=y==1,A=this.clone();A.collapse(z);A[z?'setStartAt':'setEndAt'](x,z?1:2);var B=new h.walker(A);B.evaluator=t;return B[z?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var D=this;var x=D.startContainer,y=D.startOffset;if(y&&x.type==3){var z=i.ltrim(x.substring(0,y));if(z.length)return false;}D.trim();var A=new h.elementPath(D.startContainer),B=D.clone();B.collapse(true);B.setStartAt(A.block||A.blockLimit,1);var C=new h.walker(B);C.evaluator=s(true);return C.checkBackward();},checkEndOfBlock:function(){var D=this;var x=D.endContainer,y=D.endOffset;if(x.type==3){var z=i.rtrim(x.substring(y));if(z.length)return false;}D.trim();var A=new h.elementPath(D.endContainer),B=D.clone();B.collapse(false);B.setEndAt(A.block||A.blockLimit,2);var C=new h.walker(B);C.evaluator=s(false);return C.checkForward();},checkReadOnly:(function(){function x(y,z){while(y){if(y.type==1)if(y.getAttribute('contentEditable')=='false'&&!y.data('cke-editable'))return 0;else if(y.is('body')||y.getAttribute('contentEditable')=='true'&&(y.contains(z)||y.equals(z)))break;y=y.getParent();}return 1;};return function(){var y=this.startContainer,z=this.endContainer;return!(x(y,z)&&x(z,y));};})(),moveToElementEditablePosition:function(x,y){var z;if(j.$empty[x.getName()])return false;while(x&&x.type==1){z=x.isEditable();if(z)this.moveToPosition(x,y?2:1);else if(j.$inline[x.getName()]){this.moveToPosition(x,y?4:3);return true;}if(j.$empty[x.getName()])x=x[y?'getPrevious':'getNext'](w);else x=x[y?'getLast':'getFirst'](w);if(x&&x.type==3){this.moveToPosition(x,y?4:3);return true;}}return z;},moveToElementEditStart:function(x){return this.moveToElementEditablePosition(x);},moveToElementEditEnd:function(x){return this.moveToElementEditablePosition(x,true);},getEnclosedNode:function(){var x=this.clone();x.optimize();if(x.startContainer.type!=1||x.endContainer.type!=1)return null;
var y=new h.walker(x),z=h.walker.bookmark(true),A=h.walker.whitespaces(true),B=function(D){return A(D)&&z(D);};x.evaluator=B;var C=y.next();y.reset();return C&&C.equals(y.previous())?C:null;},getTouchedStartNode:function(){var x=this.startContainer;if(this.collapsed||x.type!=1)return x;return x.getChild(this.startOffset)||x;},getTouchedEndNode:function(){var x=this.endContainer;if(this.collapsed||x.type!=1)return x;return x.getChild(this.endOffset-1)||x;}};})();e.POSITION_AFTER_START=1;e.POSITION_BEFORE_END=2;e.POSITION_BEFORE_START=3;e.POSITION_AFTER_END=4;e.ENLARGE_ELEMENT=1;e.ENLARGE_BLOCK_CONTENTS=2;e.ENLARGE_LIST_ITEM_CONTENTS=3;e.START=1;e.END=2;e.STARTEND=3;e.SHRINK_ELEMENT=1;e.SHRINK_TEXT=2;(function(){h.rangeList=function(r){if(r instanceof h.rangeList)return r;if(!r)r=[];else if(r instanceof h.range)r=[r];return i.extend(r,p);};var p={createIterator:function(){var r=this,s=h.walker.bookmark(),t=function(w){return!(w.is&&w.is('tr'));},u=[],v;return{getNextRange:function(w){v=v==undefined?0:v+1;var x=r[v];if(x&&r.length>1){if(!v)for(var y=r.length-1;y>=0;y--)u.unshift(r[y].createBookmark(true));if(w){var z=0;while(r[v+z+1]){var A=x.document,B=0,C=A.getById(u[z].endNode),D=A.getById(u[z+1].startNode),E;while(1){E=C.getNextSourceNode(false);if(!D.equals(E)){if(s(E)||E.type==1&&E.isBlockBoundary()){C=E;continue;}}else B=1;break;}if(!B)break;z++;}}x.moveToBookmark(u.shift());while(z--){E=r[++v];E.moveToBookmark(u.shift());x.setEnd(E.endContainer,E.endOffset);}}return x;}};},createBookmarks:function(r){var w=this;var s=[],t;for(var u=0;u<w.length;u++){s.push(t=w[u].createBookmark(r,true));for(var v=u+1;v<w.length;v++){w[v]=q(t,w[v]);w[v]=q(t,w[v],true);}}return s;},createBookmarks2:function(r){var s=[];for(var t=0;t<this.length;t++)s.push(this[t].createBookmark2(r));return s;},moveToBookmarks:function(r){for(var s=0;s<this.length;s++)this[s].moveToBookmark(r[s]);}};function q(r,s,t){var u=r.serializable,v=s[t?'endContainer':'startContainer'],w=t?'endOffset':'startOffset',x=u?s.document.getById(r.startNode):r.startNode,y=u?s.document.getById(r.endNode):r.endNode;if(v.equals(x.getPrevious())){s.startOffset=s.startOffset-v.getLength()-y.getPrevious().getLength();v=y.getNext();}else if(v.equals(y.getPrevious())){s.startOffset=s.startOffset-v.getLength();v=y.getNext();}v.equals(x.getParent())&&s[w]++;v.equals(y.getParent())&&s[w]++;s[t?'endContainer':'startContainer']=v;return s;};})();(function(){if(f.webkit){f.hc=false;return;}var p=l.createFromHtml('<div style="width:0px;height:0px;position:absolute;left:-10000px;border: 1px solid;border-color: red blue;"></div>',e.document);
p.appendTo(e.document.getHead());try{f.hc=p.getComputedStyle('border-top-color')==p.getComputedStyle('border-right-color');}catch(q){f.hc=false;}if(f.hc)f.cssClass+=' cke_hc';p.remove();})();n.load(m.corePlugins.split(','),function(){e.status='loaded';e.fire('loaded');var p=e._.pending;if(p){delete e._.pending;for(var q=0;q<p.length;q++)e.add(p[q]);}});if(g)try{document.execCommand('BackgroundImageCache',false,true);}catch(p){}e.skins.add('kama',(function(){var q='cke_ui_color';return{editor:{css:['editor.css']},dialog:{css:['dialog.css']},templates:{css:['templates.css']},margins:[0,0,0,0],init:function(r){if(r.config.width&&!isNaN(r.config.width))r.config.width-=12;var s=[],t=/\$color/g,u='/* UI Color Support */.cke_skin_kama .cke_menuitem .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover .cke_label,.cke_skin_kama .cke_menuitem a:focus .cke_label,.cke_skin_kama .cke_menuitem a:active .cke_label{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_label,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_label{\tbackground-color: transparent !important;}.cke_skin_kama .cke_menuitem a.cke_disabled:hover .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:focus .cke_icon_wrapper,.cke_skin_kama .cke_menuitem a.cke_disabled:active .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuitem a.cke_disabled .cke_icon_wrapper{\tbackground-color: $color !important;\tborder-color: $color !important;}.cke_skin_kama .cke_menuseparator{\tbackground-color: $color !important;}.cke_skin_kama .cke_menuitem a:hover,.cke_skin_kama .cke_menuitem a:focus,.cke_skin_kama .cke_menuitem a:active{\tbackground-color: $color !important;}';if(f.webkit){u=u.split('}').slice(0,-1);for(var v=0;v<u.length;v++)u[v]=u[v].split('{');}function w(z){var A=z.getById(q);if(!A){A=z.getHead().append('style');A.setAttribute('id',q);A.setAttribute('type','text/css');}return A;};function x(z,A,B){var C,D,E;for(var F=0;F<z.length;F++){if(f.webkit)for(D=0;D<A.length;D++){E=A[D][1];for(C=0;C<B.length;C++)E=E.replace(B[C][0],B[C][1]);
z[F].$.sheet.addRule(A[D][0],E);}else{E=A;for(C=0;C<B.length;C++)E=E.replace(B[C][0],B[C][1]);if(g)z[F].$.styleSheet.cssText+=E;else z[F].$.innerHTML+=E;}}};var y=/\$color/g;i.extend(r,{uiColor:null,getUiColor:function(){return this.uiColor;},setUiColor:function(z){var A,B=w(e.document),C='.'+r.id,D=[C+' .cke_wrapper',C+'_dialog .cke_dialog_contents',C+'_dialog a.cke_dialog_tab',C+'_dialog .cke_dialog_footer'].join(','),E='background-color: $color !important;';if(f.webkit)A=[[D,E]];else A=D+'{'+E+'}';return(this.setUiColor=function(F){var G=[[y,F]];r.uiColor=F;x([B],A,G);x(s,u,G);})(z);}});r.on('menuShow',function(z){var A=z.data[0],B=A.element.getElementsByTag('iframe').getItem(0).getFrameDocument();if(!B.getById('cke_ui_color')){var C=w(B);s.push(C);var D=r.getUiColor();if(D)x([C],u,[[y,D]]);}});if(r.config.uiColor)r.setUiColor(r.config.uiColor);}};})());(function(){e.dialog?q():e.on('dialogPluginReady',q);function q(){e.dialog.on('resize',function(r){var s=r.data,t=s.width,u=s.height,v=s.dialog,w=v.parts.contents;if(s.skin!='kama')return;w.setStyles({width:t+'px',height:u+'px'});});};})();n.add('basicstyles',{requires:['styles','button'],init:function(q){var r=function(u,v,w,x){var y=new e.style(x);q.attachStyleStateChange(y,function(z){q.getCommand(w).setState(z);});q.addCommand(w,new e.styleCommand(y));q.ui.addButton(u,{label:v,command:w});},s=q.config,t=q.lang;r('Bold',t.bold,'bold',s.coreStyles_bold);r('Italic',t.italic,'italic',s.coreStyles_italic);r('Underline',t.underline,'underline',s.coreStyles_underline);r('Strike',t.strike,'strike',s.coreStyles_strike);r('Subscript',t.subscript,'subscript',s.coreStyles_subscript);r('Superscript',t.superscript,'superscript',s.coreStyles_superscript);}});m.coreStyles_bold={element:'strong',overrides:'b'};m.coreStyles_italic={element:'em',overrides:'i'};m.coreStyles_underline={element:'u'};m.coreStyles_strike={element:'strike'};m.coreStyles_subscript={element:'sub'};m.coreStyles_superscript={element:'sup'};n.add('button',{beforeInit:function(q){q.ui.addHandler(1,o.button.handler);}});e.UI_BUTTON=1;o.button=function(q){i.extend(this,q,{title:q.label,className:q.className||q.command&&'cke_button_'+q.command||'',click:q.click||(function(r){r.execCommand(q.command);})});this._={};};o.button.handler={create:function(q){return new o.button(q);}};o.button._={instances:[],keydown:function(q,r){var s=o.button._.instances[q];if(s.onkey){r=new h.event(r);return s.onkey(s,r.getKeystroke())!==false;}},focus:function(q,r){var s=o.button._.instances[q],t;
if(s.onfocus)t=s.onfocus(s,new h.event(r))!==false;if(f.gecko&&f.version<10900)r.preventBubble();return t;}};(function(){var q=i.addFunction(o.button._.keydown,o.button._),r=i.addFunction(o.button._.focus,o.button._);o.button.prototype={canGroup:true,render:function(s,t){var u=f,v=this._.id=i.getNextId(),w='',x=this.command,y,z;this._.editor=s;var A={id:v,button:this,editor:s,focus:function(){var D=e.document.getById(v);D.focus();},execute:function(){this.button.click(s);}};A.clickFn=y=i.addFunction(A.execute,A);A.index=z=o.button._.instances.push(A)-1;if(this.modes){var B={};s.on('beforeModeUnload',function(){B[s.mode]=this._.state;},this);s.on('mode',function(){var D=s.mode;this.setState(this.modes[D]?B[D]!=undefined?B[D]:2:0);},this);}else if(x){x=s.getCommand(x);if(x){x.on('state',function(){this.setState(x.state);},this);w+='cke_'+(x.state==1?'on':x.state==0?'disabled':'off');}}if(!x)w+='cke_off';if(this.className)w+=' '+this.className;t.push('<span class="cke_button'+(this.icon&&this.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">','<a id="',v,'" class="',w,'"',u.gecko&&u.version>=10900&&!u.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+v+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(u.opera||u.gecko&&u.mac)t.push(' onkeypress="return false;"');if(u.gecko)t.push(' onblur="this.style.cssText = this.style.cssText;"');t.push(' onkeydown="return CKEDITOR.tools.callFunction(',q,', ',z,', event);" onfocus="return CKEDITOR.tools.callFunction(',r,', ',z,', event);" onclick="CKEDITOR.tools.callFunction(',y,', this); return false;"><span class="cke_icon"');if(this.icon){var C=(this.iconOffset||0)*-16;t.push(' style="background-image:url(',e.getUrl(this.icon),');background-position:0 '+C+'px;"');}t.push('>&nbsp;</span><span id="',v,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)t.push('<span class="cke_buttonarrow">'+(f.hc?'&#9660;':'&nbsp;')+'</span>');t.push('</a>','</span>');if(this.onRender)this.onRender();return A;},setState:function(s){if(this._.state==s)return false;this._.state=s;var t=e.document.getById(this._.id);if(t){t.setState(s);s==0?t.setAttribute('aria-disabled',true):t.removeAttribute('aria-disabled');s==1?t.setAttribute('aria-pressed',true):t.removeAttribute('aria-pressed');return true;}else return false;}};})();o.prototype.addButton=function(q,r){this.add(q,1,r);};e.on('reset',function(){o.button._.instances=[];
});(function(){var q=function(C,D){var E=C.document,F=E.getBody(),G=0,H=function(){G=1;};F.on(D,H);(f.version>7?E.$:E.$.selection.createRange()).execCommand(D);F.removeListener(D,H);return G;},r=g?function(C,D){return q(C,D);}:function(C,D){try{return C.document.$.execCommand(D,false,null);}catch(E){return false;}},s=function(C){var D=this;D.type=C;D.canUndo=D.type=='cut';D.startDisabled=true;};s.prototype={exec:function(C,D){this.type=='cut'&&x(C);var E=r(C,this.type);if(!E)alert(C.lang.clipboard[this.type+'Error']);return E;}};var t={canUndo:false,exec:g?function(C){C.focus();if(!C.document.getBody().fire('beforepaste')&&!q(C,'paste')){C.fire('pasteDialog');return false;}}:function(C){try{if(!C.document.getBody().fire('beforepaste')&&!C.document.$.execCommand('Paste',false,null))throw 0;}catch(D){setTimeout(function(){C.fire('pasteDialog');},0);return false;}}},u=function(C){if(this.mode!='wysiwyg')return;switch(C.data.keyCode){case 1000+86:case 2000+45:var D=this.document.getBody();if(!g&&D.fire('beforepaste'))C.cancel();else if(f.opera||f.gecko&&f.version<10900)D.fire('paste');return;case 1000+88:case 2000+46:var E=this;this.fire('saveSnapshot');setTimeout(function(){E.fire('saveSnapshot');},0);}};function v(C){C.cancel();};function w(C,D,E){var F=this.document;if(F.getById('cke_pastebin'))return;if(D=='text'&&C.data&&C.data.$.clipboardData){var G=C.data.$.clipboardData.getData('text/plain');if(G){C.data.preventDefault();E(G);return;}}var H=this.getSelection(),I=new h.range(F),J=new l(D=='text'?'textarea':f.webkit?'body':'div',F);J.setAttribute('id','cke_pastebin');f.webkit&&J.append(F.createText('\xa0'));F.getBody().append(J);J.setStyles({position:'absolute',top:H.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});J.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var K=H.createBookmarks();this.on('selectionChange',v,null,null,0);if(D=='text'){if(g){var L=F.getBody().$.createTextRange();L.moveToElementText(J.$);L.execCommand('Paste');C.data.preventDefault();}else J.$.focus();}else{I.setStartAt(J,1);I.setEndAt(J,2);I.select(true);}var M=this;window.setTimeout(function(){D=='text'&&f.gecko&&M.focusGrabber.focus();J.remove();M.removeListener('selectionChange',v);var N;J=f.webkit&&(N=J.getFirst())&&N.is&&N.hasClass('Apple-style-span')?N:J;H.selectBookmarks(K);E(J['get'+(D=='text'?'Value':'Html')]());},0);};function x(C){if(!g||f.quirks)return;var D=C.getSelection(),E;if(D.getType()==3&&(E=D.getSelectedElement())){var F=D.getRanges()[0],G=C.document.createText('');
G.insertBefore(E);F.setStartBefore(G);F.setEndAfter(E);D.selectRanges([F]);setTimeout(function(){if(E.getParent()){G.remove();D.selectElement(E);}},0);}};var y;function z(C,D){g&&(y=1);var E=D.document.$.queryCommandEnabled(C)?2:0;y=0;return E;};var A;function B(){var D=this;if(D.mode!='wysiwyg')return;D.getCommand('cut').setState(A?0:z('Cut',D));D.getCommand('copy').setState(z('Copy',D));var C=A?0:f.webkit?2:z('Paste',D);D.fire('pasteState',C);};n.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(C){C.on('paste',function(F){var G=F.data;if(G.html)C.insertHtml(G.html);else if(G.text)C.insertText(G.text);setTimeout(function(){C.fire('afterPaste');},0);},null,null,1000);C.on('pasteDialog',function(F){setTimeout(function(){C.openDialog('paste');},0);});C.on('pasteState',function(F){C.getCommand('paste').setState(F.data);});function D(F,G,H,I){var J=C.lang[G];C.addCommand(G,H);C.ui.addButton(F,{label:J,command:G});if(C.addMenuItems)C.addMenuItem(G,{label:J,command:G,group:'clipboard',order:I});};D('Cut','cut',new s('cut'),1);D('Copy','copy',new s('copy'),4);D('Paste','paste',t,8);e.dialog.add('paste',e.getUrl(this.path+'dialogs/paste.js'));C.on('key',u,C);var E=C.config.forcePasteAsPlainText?'text':'html';C.on('contentDom',function(){var F=C.document.getBody();F.on(E=='text'&&g||f.webkit?'paste':'beforepaste',function(G){if(y)return;w.call(C,G,E,function(H){if(!i.trim(H.toLowerCase().replace(/<span[^>]+data-cke-bookmark[^<]*?<\/span>/g,'')))return;var I={};I[E]=H;C.fire('paste',I);});});F.on('contextmenu',function(){y=1;setTimeout(function(){y=0;},10);});F.on('beforecut',function(){!y&&x(C);});F.on('mouseup',function(){setTimeout(function(){B.call(C);},0);},C);F.on('keyup',B,C);});C.on('selectionChange',function(F){A=F.data.selection.getRanges()[0].checkReadOnly();B.call(C);});if(C.contextMenu)C.contextMenu.addListener(function(F,G){var H=G.getRanges()[0].checkReadOnly();return{cut:!H&&z('Cut',C),copy:z('Copy',C),paste:!H&&(f.webkit?2:z('Paste',C))};});}});})();n.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(q){var r=q.config,s=q.lang.colorButton,t;if(!f.hc){u('TextColor','fore',s.textColorTitle);u('BGColor','back',s.bgColorTitle);}function u(x,y,z){var A=i.getNextId()+'_colorBox';q.ui.add(x,4,{label:z,title:z,className:'cke_button_'+x.toLowerCase(),modes:{wysiwyg:1},panel:{css:q.skin.editor.css,attributes:{role:'listbox','aria-label':s.panelTitle}},onBlock:function(B,C){C.autoSize=true;C.element.addClass('cke_colorblock');
C.element.setHtml(v(B,y,A));C.element.getDocument().getBody().setStyle('overflow','hidden');o.fire('ready',this);var D=C.keys,E=q.lang.dir=='rtl';D[E?37:39]='next';D[40]='next';D[9]='next';D[E?39:37]='prev';D[38]='prev';D[2000+9]='prev';D[32]='click';},onOpen:function(){var B=q.getSelection(),C=B&&B.getStartElement(),D=new h.elementPath(C),E;C=D.block||D.blockLimit||q.document.getBody();do E=C&&C.getComputedStyle(y=='back'?'background-color':'color')||'transparent';while(y=='back'&&E=='transparent'&&C&&(C=C.getParent()));if(!E||E=='transparent')E='#ffffff';this._.panel._.iframe.getFrameDocument().getById(A).setStyle('background-color',E);}});};function v(x,y,z){var A=[],B=r.colorButton_colors.split(','),C=B.length+(r.colorButton_enableMore?2:1),D=i.addFunction(function(J,K){if(J=='?'){var L=arguments.callee;function M(O){this.removeListener('ok',M);this.removeListener('cancel',M);O.name=='ok'&&L(this.getContentElement('picker','selectedColor').getValue(),K);};q.openDialog('colordialog',function(){this.on('ok',M);this.on('cancel',M);});return;}q.focus();x.hide();q.fire('saveSnapshot');new e.style(r['colorButton_'+K+'Style'],{color:'inherit'}).remove(q.document);if(J){var N=r['colorButton_'+K+'Style'];N.childRule=K=='back'?function(O){return w(O);}:function(O){return O.getName()!='a'||w(O);};new e.style(N,{color:J}).apply(q.document);}q.fire('saveSnapshot');});A.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',s.auto,'" onclick="CKEDITOR.tools.callFunction(',D,",null,'",y,"');return false;\" href=\"javascript:void('",s.auto,'\')" role="option" aria-posinset="1" aria-setsize="',C,'"><table role="presentation" cellspacing=0 cellpadding=0 width="100%"><tr><td><span class="cke_colorbox" id="',z,'"></span></td><td colspan=7 align=center>',s.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var E=0;E<B.length;E++){if(E%8===0)A.push('</tr><tr>');var F=B[E].split('/'),G=F[0],H=F[1]||G;if(!F[1])G='#'+G.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var I=q.lang.colors[H]||H;A.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',I,'" onclick="CKEDITOR.tools.callFunction(',D,",'",G,"','",y,"'); return false;\" href=\"javascript:void('",I,'\')" role="option" aria-posinset="',E+2,'" aria-setsize="',C,'"><span class="cke_colorbox" style="background-color:#',H,'"></span></a></td>');}if(r.colorButton_enableMore===undefined||r.colorButton_enableMore)A.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',s.more,'" onclick="CKEDITOR.tools.callFunction(',D,",'?','",y,"');return false;\" href=\"javascript:void('",s.more,"')\"",' role="option" aria-posinset="',C,'" aria-setsize="',C,'">',s.more,'</a></td>');
A.push('</tr></table>');return A.join('');};function w(x){return x.getAttribute('contentEditable')=='false'||x.getAttribute('data-nostyle');};}});m.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';m.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};m.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){n.colordialog={init:function(q){q.addCommand('colordialog',new e.dialogCommand('colordialog'));e.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};n.add('colordialog',n.colordialog);})();(function(){n.add('div',{requires:['editingblock','domiterator','styles'],init:function(q){var r=q.lang.div;q.addCommand('creatediv',new e.dialogCommand('creatediv'));q.addCommand('editdiv',new e.dialogCommand('editdiv'));q.addCommand('removediv',{exec:function(s){var t=s.getSelection(),u=t&&t.getRanges(),v,w=t.createBookmarks(),x,y=[];function z(B){var C=new h.elementPath(B),D=C.blockLimit,E=D.is('div')&&D;if(E&&!E.data('cke-div-added')){y.push(E);E.data('cke-div-added');}};for(var A=0;A<u.length;A++){v=u[A];if(v.collapsed)z(t.getStartElement());else{x=new h.walker(v);x.evaluator=z;x.lastForward();}}for(A=0;A<y.length;A++)y[A].remove(true);t.selectBookmarks(w);}});q.ui.addButton('CreateDiv',{label:r.toolbar,command:'creatediv'});if(q.addMenuItems){q.addMenuItems({editdiv:{label:r.edit,command:'editdiv',group:'div',order:1},removediv:{label:r.remove,command:'removediv',group:'div',order:5}});if(q.contextMenu)q.contextMenu.addListener(function(s,t){if(!s||s.isReadOnly())return null;var u=new h.elementPath(s),v=u.blockLimit;if(v&&v.getAscendant('div',true))return{editdiv:2,removediv:2};return null;});}e.dialog.add('creatediv',this.path+'dialogs/div.js');e.dialog.add('editdiv',this.path+'dialogs/div.js');}});})();(function(){n.add('enterkey',{requires:['keystrokes','indent'],init:function(x){var y=x.specialKeys;y[13]=v;y[2000+13]=u;}});n.enterkey={enterBlock:function(x,y,z,A){z=z||w(x);if(!z)return;var B=z.document;if(z.checkStartOfBlock()&&z.checkEndOfBlock()){var C=new h.elementPath(z.startContainer),D=C.block;if(D&&(D.is('li')||D.getParent().is('li'))){x.execCommand('outdent');return;}}var E=y==3?'div':'p',F=z.splitBlock(E);if(!F)return;
var G=F.previousBlock,H=F.nextBlock,I=F.wasStartOfBlock,J=F.wasEndOfBlock,K;if(H){K=H.getParent();if(K.is('li')){H.breakParent(K);H.move(H.getNext(),1);}}else if(G&&(K=G.getParent())&&K.is('li')){G.breakParent(K);K=G.getNext();z.moveToElementEditStart(K);G.move(G.getPrevious());}if(!I&&!J){if(H.is('li')&&(K=H.getFirst(h.walker.invisible(true)))&&K.is&&K.is('ul','ol'))(g?B.createText('\xa0'):B.createElement('br')).insertBefore(K);if(H)z.moveToElementEditStart(H);}else{var L,M;if(G){if(G.is('li')||!t.test(G.getName())){L=G.clone();L.is('li')&&L.removeAttribute('value');}}else if(H)L=H.clone();if(!L){if(K&&K.is('li'))L=K;else{L=B.createElement(E);if(G&&(M=G.getDirection()))L.setAttribute('dir',M);}}else if(A&&!L.is('li'))L.renameNode(E);var N=F.elementPath;if(N)for(var O=0,P=N.elements.length;O<P;O++){var Q=N.elements[O];if(Q.equals(N.block)||Q.equals(N.blockLimit))break;if(j.$removeEmpty[Q.getName()]){Q=Q.clone();L.moveChildren(Q);L.append(Q);}}if(!g)L.appendBogus();if(!L.getParent())z.insertNode(L);if(g&&I&&(!J||!G.getChildCount())){z.moveToElementEditStart(J?G:L);z.select();}z.moveToElementEditStart(I&&!J?H:L);}if(!g)if(H){var R=B.createElement('span');R.setHtml('&nbsp;');z.insertNode(R);R.scrollIntoView();z.deleteContents();}else L.scrollIntoView();z.select();},enterBr:function(x,y,z,A){z=z||w(x);if(!z)return;var B=z.document,C=y==3?'div':'p',D=z.checkEndOfBlock(),E=new h.elementPath(x.getSelection().getStartElement()),F=E.block,G=F&&E.block.getName(),H=false;if(!A&&G=='li'){s(x,y,z,A);return;}if(!A&&D&&t.test(G)){var I,J;if(J=F.getDirection()){I=B.createElement('div');I.setAttribute('dir',J);I.insertAfter(F);z.setStart(I,0);}else{B.createElement('br').insertAfter(F);if(f.gecko)B.createText('').insertAfter(F);z.setStartAt(F.getNext(),g?3:1);}}else{var K;H=G=='pre';if(H&&!f.gecko)K=B.createText(g?'\r':'\n');else K=B.createElement('br');z.deleteContents();z.insertNode(K);if(g)z.setStartAt(K,4);else{B.createText('\ufeff').insertAfter(K);if(D)K.getParent().appendBogus();K.getNext().$.nodeValue='';z.setStartAt(K.getNext(),1);var L=null;if(!f.gecko){L=B.createElement('span');L.setHtml('&nbsp;');}else L=B.createElement('br');L.insertBefore(K.getNext());L.scrollIntoView();L.remove();}}z.collapse(true);z.select(H);}};var q=n.enterkey,r=q.enterBr,s=q.enterBlock,t=/^h[1-6]$/;function u(x){if(x.mode!='wysiwyg')return false;if(x.getSelection().getStartElement().hasAscendant('pre',true)){setTimeout(function(){s(x,x.config.enterMode,null,true);},0);return true;}else return v(x,x.config.shiftEnterMode,1);
};function v(x,y,z){z=x.config.forceEnterMode||z;if(x.mode!='wysiwyg')return false;if(!y)y=x.config.enterMode;setTimeout(function(){x.fire('saveSnapshot');if(y==2||x.getSelection().getStartElement().hasAscendant('pre',1))r(x,y,null,z);else s(x,y,null,z);},0);return true;};function w(x){var y=x.getSelection().getRanges(true);for(var z=y.length-1;z>0;z--)y[z].deleteContents();return y[0];};})();(function(){var q='nbsp,gt,lt',r='quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',s='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',t='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';function u(v,w){var x={},y=[],z={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};v=v.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(E,F){var G=w?'&'+F+';':z[F],H=w?z[F]:'&'+F+';';x[G]=H;y.push(G);return '';});if(!w&&v){v=v.split(',');var A=document.createElement('div'),B;A.innerHTML='&'+v.join(';&')+';';B=A.innerHTML;A=null;for(var C=0;C<B.length;C++){var D=B.charAt(C);x[D]='&'+v[C]+';';y.push(D);}}x.regex=y.join(w?'|':'');return x;};n.add('entities',{afterInit:function(v){var w=v.config,x=v.dataProcessor,y=x&&x.htmlFilter;if(y){var z=q;if(w.entities){z+=','+r;if(w.entities_latin)z+=','+s;if(w.entities_greek)z+=','+t;if(w.entities_additional)z+=','+w.entities_additional;
}var A=u(z),B='['+A.regex+']';delete A.regex;if(w.entities&&w.entities_processNumerical)B='[^ -~]|'+B;B=new RegExp(B,'g');function C(G){return w.entities_processNumerical=='force'||!A[G]?'&#'+G.charCodeAt(0)+';':A[G];};var D=u([q,'shy'].join(','),true),E=new RegExp(D.regex,'g');function F(G){return D[G];};y.addRules({text:function(G){return G.replace(E,F).replace(B,C);}});}}});})();m.entities=true;m.entities_latin=true;m.entities_greek=true;m.entities_additional='#39';(function(){function q(r,s,t,u,v,w,x){var y=r.config,z=v.split(';'),A=[],B={};for(var C=0;C<z.length;C++){var D=z[C];if(D){D=D.split('/');var E={},F=z[C]=D[0];E[t]=A[C]=D[1]||F;B[F]=new e.style(x,E);B[F]._.definition.name=F;}else z.splice(C--,1);}r.ui.addRichCombo(s,{label:u.label,title:u.panelTitle,className:'cke_'+(t=='size'?'fontSize':'font'),panel:{css:r.skin.editor.css.concat(y.contentsCss),multiSelect:false,attributes:{'aria-label':u.panelTitle}},init:function(){this.startGroup(u.panelTitle);for(var G=0;G<z.length;G++){var H=z[G];this.add(H,B[H].buildPreview(),H);}},onClick:function(G){r.focus();r.fire('saveSnapshot');var H=B[G];if(this.getValue()==G)H.remove(r.document);else H.apply(r.document);r.fire('saveSnapshot');},onRender:function(){r.on('selectionChange',function(G){var H=this.getValue(),I=G.data.path,J=I.elements;for(var K=0,L;K<J.length;K++){L=J[K];for(var M in B){if(B[M].checkElementRemovable(L,true)){if(M!=H)this.setValue(M);return;}}}this.setValue('',w);},this);}});};n.add('font',{requires:['richcombo','styles'],init:function(r){var s=r.config;q(r,'Font','family',r.lang.font,s.font_names,s.font_defaultLabel,s.font_style);q(r,'FontSize','size',r.lang.fontSize,s.fontSize_sizes,s.fontSize_defaultLabel,s.fontSize_style);}});})();m.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';m.font_defaultLabel='';m.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};m.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';m.fontSize_defaultLabel='';m.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};
n.add('format',{requires:['richcombo','styles'],init:function(q){var r=q.config,s=q.lang.format,t=r.format_tags.split(';'),u={};for(var v=0;v<t.length;v++){var w=t[v];u[w]=new e.style(r['format_'+w]);u[w]._.enterMode=q.config.enterMode;}q.ui.addRichCombo('Format',{label:s.label,title:s.panelTitle,className:'cke_format',panel:{css:q.skin.editor.css.concat(r.contentsCss),multiSelect:false,attributes:{'aria-label':s.panelTitle}},init:function(){this.startGroup(s.panelTitle);for(var x in u){var y=s['tag_'+x];this.add(x,'<'+x+'>'+y+'</'+x+'>',y);}},onClick:function(x){q.focus();q.fire('saveSnapshot');var y=u[x],z=new h.elementPath(q.getSelection().getStartElement());y[y.checkActive(z)?'remove':'apply'](q.document);setTimeout(function(){q.fire('saveSnapshot');},0);},onRender:function(){q.on('selectionChange',function(x){var y=this.getValue(),z=x.data.path;for(var A in u){if(u[A].checkActive(z)){if(A!=y)this.setValue(A,q.lang.format['tag_'+A]);return;}}this.setValue('');},this);}});}});m.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';m.format_p={element:'p'};m.format_div={element:'div'};m.format_pre={element:'pre'};m.format_address={element:'address'};m.format_h1={element:'h1'};m.format_h2={element:'h2'};m.format_h3={element:'h3'};m.format_h4={element:'h4'};m.format_h5={element:'h5'};m.format_h6={element:'h6'};n.add('forms',{init:function(q){var r=q.lang;q.addCss('form{border: 1px dotted #FF0000;padding: 2px;}\n');q.addCss('img.cke_hidden{background-image: url('+e.getUrl(this.path+'images/hiddenfield.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 16px !important;'+'height: 16px !important;'+'}');var s=function(u,v,w){q.addCommand(v,new e.dialogCommand(v));q.ui.addButton(u,{label:r.common[u.charAt(0).toLowerCase()+u.slice(1)],command:v});e.dialog.add(v,w);},t=this.path+'dialogs/';s('Form','form',t+'form.js');s('Checkbox','checkbox',t+'checkbox.js');s('Radio','radio',t+'radio.js');s('TextField','textfield',t+'textfield.js');s('Textarea','textarea',t+'textarea.js');s('Select','select',t+'select.js');s('Button','button',t+'button.js');s('ImageButton','imagebutton',n.getPath('image')+'dialogs/image.js');s('HiddenField','hiddenfield',t+'hiddenfield.js');if(q.addMenuItems)q.addMenuItems({form:{label:r.form.menu,command:'form',group:'form'},checkbox:{label:r.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:r.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:r.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:r.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:r.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:r.button.title,command:'button',group:'button'},select:{label:r.select.title,command:'select',group:'select'},textarea:{label:r.textarea.title,command:'textarea',group:'textarea'}});
if(q.contextMenu){q.contextMenu.addListener(function(u){if(u&&u.hasAscendant('form',true)&&!u.isReadOnly())return{form:2};});q.contextMenu.addListener(function(u){if(u&&!u.isReadOnly()){var v=u.getName();if(v=='select')return{select:2};if(v=='textarea')return{textarea:2};if(v=='input')switch(u.getAttribute('type')){case 'button':case 'submit':case 'reset':return{button:2};case 'checkbox':return{checkbox:2};case 'radio':return{radio:2};case 'image':return{imagebutton:2};default:return{textfield:2};}if(v=='img'&&u.data('cke-real-element-type')=='hiddenfield')return{hiddenfield:2};}});}q.on('doubleclick',function(u){var v=u.data.element;if(v.is('form'))u.data.dialog='form';else if(v.is('select'))u.data.dialog='select';else if(v.is('textarea'))u.data.dialog='textarea';else if(v.is('img')&&v.data('cke-real-element-type')=='hiddenfield')u.data.dialog='hiddenfield';else if(v.is('input'))switch(v.getAttribute('type')){case 'button':case 'submit':case 'reset':u.data.dialog='button';break;case 'checkbox':u.data.dialog='checkbox';break;case 'radio':u.data.dialog='radio';break;case 'image':u.data.dialog='imagebutton';break;default:u.data.dialog='textfield';break;}});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.htmlFilter,t=r&&r.dataFilter;if(g)s&&s.addRules({elements:{input:function(u){var v=u.attributes,w=v.type;if(!w)v.type='text';if(w=='checkbox'||w=='radio')v.value=='on'&&delete v.value;}}});if(t)t.addRules({elements:{input:function(u){if(u.attributes.type=='hidden')return q.createFakeParserElement(u,'cke_hidden','hiddenfield');}}});},requires:['image','fakeobjects']});if(g)l.prototype.hasAttribute=function(q){var t=this;var r=t.$.attributes.getNamedItem(q);if(t.getName()=='input')switch(q){case 'class':return t.$.className.length>0;case 'checked':return!!t.$.checked;case 'value':var s=t.getAttribute('type');return s=='checkbox'||s=='radio'?t.$.value!='on':t.$.value;}return!!(r&&r.specified);};(function(){var q={canUndo:false,exec:function(s){s.insertElement(s.document.createElement('hr'));}},r='horizontalrule';n.add(r,{init:function(s){s.addCommand(r,q);s.ui.addButton('HorizontalRule',{label:s.lang.horizontalrule,command:r});}});})();(function(){var q=/^[\t\r\n ]*(?:&nbsp;|\xa0)$/,r='{cke_protected}';function s(X){var Y=X.children.length,Z=X.children[Y-1];while(Z&&Z.type==3&&!i.trim(Z.value))Z=X.children[--Y];return Z;};function t(X,Y){var Z=X.children,aa=s(X);if(aa){if((Y||!g)&&aa.type==1&&aa.name=='br')Z.pop();if(aa.type==3&&q.test(aa.value))Z.pop();}};function u(X,Y,Z){if(!Y&&(!Z||typeof Z=='function'&&Z(X)===false))return false;
if(Y&&g&&(document.documentMode>7||X.name in j.tr||X.name in j.$listItem))return false;var aa=s(X);return!aa||aa&&(aa.type==1&&aa.name=='br'||X.name=='form'&&aa.name=='input');};function v(X,Y){return function(Z){t(Z,!X);if(u(Z,!X,Y))if(X||g)Z.add(new e.htmlParser.text('\xa0'));else Z.add(new e.htmlParser.element('br',{}));};};var w=j,x=['caption','colgroup','col','thead','tfoot','tbody'],y=i.extend({},w.$block,w.$listItem,w.$tableContent);for(var z in y){if(!('br' in w[z]))delete y[z];}delete y.pre;var A={elements:{a:function(X){var Y=X.attributes;if(Y&&Y['data-cke-saved-name'])Y['class']=(Y['class']?Y['class']+' ':'')+'cke_anchor';}},attributeNames:[[/^on/,'data-cke-pa-on']]},B={elements:{}};for(z in y)B.elements[z]=v();var C={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(X){var Y=X.attributes;if(Y){if(Y['data-cke-temp'])return false;var Z=['name','href','src'],aa;for(var ab=0;ab<Z.length;ab++){aa='data-cke-saved-'+Z[ab];aa in Y&&delete Y[Z[ab]];}}return X;},table:function(X){var Y=X.children;Y.sort(function(Z,aa){return Z.type==1&&aa.type==Z.type?i.indexOf(x,Z.name)>i.indexOf(x,aa.name)?1:-1:0;});},embed:function(X){var Y=X.parent;if(Y&&Y.name=='object'){var Z=Y.attributes.width,aa=Y.attributes.height;Z&&(X.attributes.width=Z);aa&&(X.attributes.height=aa);}},param:function(X){X.children=[];X.isEmpty=true;return X;},a:function(X){if(!(X.children.length||X.attributes.name||X.attributes['data-cke-saved-name']))return false;},span:function(X){if(X.attributes['class']=='Apple-style-span')delete X.name;},pre:function(X){g&&t(X);},html:function(X){delete X.attributes.contenteditable;delete X.attributes['class'];},body:function(X){delete X.attributes.spellcheck;delete X.attributes.contenteditable;},style:function(X){var Y=X.children[0];Y&&Y.value&&(Y.value=i.trim(Y.value));if(!X.attributes.type)X.attributes.type='text/css';},title:function(X){var Y=X.children[0];Y&&(Y.value=X.attributes['data-cke-title']||'');}},attributes:{'class':function(X,Y){return i.ltrim(X.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(g)C.attributes.style=function(X,Y){return X.replace(/(^|;)([^\:]+)/g,function(Z){return Z.toLowerCase();});};function D(X){var Y=X.attributes;if(Y.contenteditable!='false')Y['data-cke-editable']=Y.contenteditable?'true':1;Y.contenteditable='false';};function E(X){var Y=X.attributes;switch(Y['data-cke-editable']){case 'true':Y.contenteditable='true';
break;case '1':delete Y.contenteditable;break;}};for(z in {input:1,textarea:1}){A.elements[z]=D;C.elements[z]=E;}var F=/<(a|area|img|input)\b([^>]*)>/gi,G=/\b(href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,H=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,I=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,J=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,K=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,L=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function M(X){return X.replace(F,function(Y,Z,aa){return '<'+Z+aa.replace(G,function(ab,ac){if(aa.indexOf('data-cke-saved-'+ac)==-1)return ' data-cke-saved-'+ab+' '+ab;return ab;})+'>';});};function N(X){return X.replace(H,function(Y){return '<cke:encoded>'+encodeURIComponent(Y)+'</cke:encoded>';});};function O(X){return X.replace(I,function(Y,Z){return decodeURIComponent(Z);});};function P(X){return X.replace(J,'$1cke:$2');};function Q(X){return X.replace(K,'$1$2');};function R(X){return X.replace(L,'<cke:$1$2></cke:$1>');};function S(X){return X.replace(/(<pre\b[^>]*>)(\r\n|\n)/g,'$1$2$2');};function T(X){return X.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(Y){return '<!--'+r+'{C}'+encodeURIComponent(Y).replace(/--/g,'%2D%2D')+'-->';});};function U(X){return X.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(Y,Z){return decodeURIComponent(Z);});};function V(X,Y){var Z=Y._.dataStore;return X.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(aa,ab){return decodeURIComponent(ab);}).replace(/\{cke_protected_(\d+)\}/g,function(aa,ab){return Z&&Z[ab]||'';});};function W(X,Y){var Z=[],aa=Y.config.protectedSource,ab=Y._.dataStore||(Y._.dataStore={id:1}),ac=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,ad=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(aa);X=X.replace(/<!--[\s\S]*?-->/g,function(af){return '<!--{cke_tempcomment}'+(Z.push(af)-1)+'-->';});for(var ae=0;ae<ad.length;ae++)X=X.replace(ad[ae],function(af){af=af.replace(ac,function(ag,ah,ai){return Z[ai];});return/cke_temp(comment)?/.test(af)?af:'<!--{cke_temp}'+(Z.push(af)-1)+'-->';});X=X.replace(ac,function(af,ag,ah){return '<!--'+r+(ag?'{C}':'')+encodeURIComponent(Z[ah]).replace(/--/g,'%2D%2D')+'-->';});return X.replace(/(['"]).*?\1/g,function(af){return af.replace(/<!--\{cke_protected\}([\s\S]+?)-->/g,function(ag,ah){ab[ab.id]=decodeURIComponent(ah);return '{cke_protected_'+ab.id++ +'}';});});};n.add('htmldataprocessor',{requires:['htmlwriter'],init:function(X){var Y=X.dataProcessor=new e.htmlDataProcessor(X);
Y.writer.forceSimpleAmpersand=X.config.forceSimpleAmpersand;Y.dataFilter.addRules(A);Y.dataFilter.addRules(B);Y.htmlFilter.addRules(C);var Z={elements:{}};for(z in y)Z.elements[z]=v(true,X.config.fillEmptyBlocks);Y.htmlFilter.addRules(Z);},onLoad:function(){!('fillEmptyBlocks' in m)&&(m.fillEmptyBlocks=1);}});e.htmlDataProcessor=function(X){var Y=this;Y.editor=X;Y.writer=new e.htmlWriter();Y.dataFilter=new e.htmlParser.filter();Y.htmlFilter=new e.htmlParser.filter();};e.htmlDataProcessor.prototype={toHtml:function(X,Y){X=W(X,this.editor);X=M(X);X=N(X);X=P(X);X=R(X);X=S(X);var Z=new l('div');Z.setHtml('a'+X);X=Z.getHtml().substr(1);X=Q(X);X=O(X);X=U(X);var aa=e.htmlParser.fragment.fromHtml(X,Y),ab=new e.htmlParser.basicWriter();aa.writeHtml(ab,this.dataFilter);X=ab.getHtml(true);X=T(X);return X;},toDataFormat:function(X,Y){var Z=this.writer,aa=e.htmlParser.fragment.fromHtml(X,Y);Z.reset();aa.writeHtml(Z,this.htmlFilter);var ab=Z.getHtml(true);ab=U(ab);ab=V(ab,this.editor);return ab;}};})();(function(){function q(r,s){var t=r.createFakeParserElement(s,'cke_iframe','iframe',true),u=t.attributes.style||'',v=s.attributes.width,w=s.attributes.height;if(typeof v!='undefined')u+='width:'+i.cssLength(v)+';';if(typeof w!='undefined')u+='height:'+i.cssLength(w)+';';t.attributes.style=u;return t;};n.add('iframe',{requires:['dialog','fakeobjects'],init:function(r){var s='iframe',t=r.lang.iframe;e.dialog.add(s,this.path+'dialogs/iframe.js');r.addCommand(s,new e.dialogCommand(s));r.addCss('img.cke_iframe{background-image: url('+e.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');r.ui.addButton('Iframe',{label:t.toolbar,command:s});r.on('doubleclick',function(u){var v=u.data.element;if(v.is('img')&&v.data('cke-real-element-type')=='iframe')u.data.dialog='iframe';});if(r.addMenuItems)r.addMenuItems({iframe:{label:t.title,command:'iframe',group:'image'}});if(r.contextMenu)r.contextMenu.addListener(function(u,v){if(u&&u.is('img')&&u.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(r){var s=r.dataProcessor,t=s&&s.dataFilter;if(t)t.addRules({elements:{iframe:function(u){return q(r,u);}}});}});})();n.add('image',{init:function(q){var r='image';e.dialog.add(r,this.path+'dialogs/image.js');q.addCommand(r,new e.dialogCommand(r));q.ui.addButton('Image',{label:q.lang.common.image,command:r});q.on('doubleclick',function(s){var t=s.data.element;
if(t.is('img')&&!t.data('cke-realelement')&&!t.isReadOnly())s.data.dialog='image';});if(q.addMenuItems)q.addMenuItems({image:{label:q.lang.image.menu,command:'image',group:'image'}});if(q.contextMenu)q.contextMenu.addListener(function(s,t){if(!s||!s.is('img')||s.data('cke-realelement')||s.isReadOnly())return null;return{image:2};});}});m.image_removeLinkByEmptyURL=true;(function(){var q={ol:1,ul:1},r=h.walker.whitespaces(true),s=h.walker.bookmark(false,true);function t(x){var F=this;var y=x.editor,z=x.data.path,A=z&&z.contains(q),B=z.block||z.blockLimit;if(A)return F.setState(2);if(!F.useIndentClasses&&F.name=='indent')return F.setState(2);if(!B)return F.setState(0);if(F.useIndentClasses){var C=B.$.className.match(F.classNameRegex),D=0;if(C){C=C[1];D=F.indentClassMap[C];}if(F.name=='outdent'&&!D||F.name=='indent'&&D==y.config.indentClasses.length)return F.setState(0);return F.setState(2);}else{var E=parseInt(B.getStyle(v(B)),10);if(isNaN(E))E=0;if(E<=0)return F.setState(0);return F.setState(2);}};function u(x,y){var A=this;A.name=y;A.useIndentClasses=x.config.indentClasses&&x.config.indentClasses.length>0;if(A.useIndentClasses){A.classNameRegex=new RegExp('(?:^|\\s+)('+x.config.indentClasses.join('|')+')(?=$|\\s)');A.indentClassMap={};for(var z=0;z<x.config.indentClasses.length;z++)A.indentClassMap[x.config.indentClasses[z]]=z+1;}A.startDisabled=y=='outdent';};function v(x,y){return(y||x.getComputedStyle('direction'))=='ltr'?'margin-left':'margin-right';};function w(x){return x.type=1&&x.is('li');};u.prototype={exec:function(x){var y=this,z={};function A(Q){var R=G.startContainer,S=G.endContainer;while(R&&!R.getParent().equals(Q))R=R.getParent();while(S&&!S.getParent().equals(Q))S=S.getParent();if(!R||!S)return;var T=R,U=[],V=false;while(!V){if(T.equals(S))V=true;U.push(T);T=T.getNext();}if(U.length<1)return;var W=Q.getParents(true);for(var X=0;X<W.length;X++){if(W[X].getName&&q[W[X].getName()]){Q=W[X];break;}}var Y=y.name=='indent'?1:-1,Z=U[0],aa=U[U.length-1],ab=n.list.listToArray(Q,z),ac=ab[aa.getCustomData('listarray_index')].indent;for(X=Z.getCustomData('listarray_index');X<=aa.getCustomData('listarray_index');X++){ab[X].indent+=Y;var ad=ab[X].parent;ab[X].parent=new l(ad.getName(),ad.getDocument());}for(X=aa.getCustomData('listarray_index')+1;X<ab.length&&ab[X].indent>ac;X++)ab[X].indent+=Y;var ae=n.list.arrayToList(ab,z,null,x.config.enterMode,Q.getDirection());if(y.name=='outdent'){var af;if((af=Q.getParent())&&af.is('li')){var ag=ae.listNode.getChildren(),ah=[],ai=ag.count(),aj;
for(X=ai-1;X>=0;X--){if((aj=ag.getItem(X))&&aj.is&&aj.is('li'))ah.push(aj);}}}if(ae)ae.listNode.replace(Q);if(ah&&ah.length)for(X=0;X<ah.length;X++){var ak=ah[X],al=ak;while((al=al.getNext())&&al.is&&al.getName() in q){if(g&&!ak.getFirst(function(am){return r(am)&&s(am);}))ak.append(G.document.createText('\xa0'));ak.append(al);}ak.insertAfter(af);}};function B(){var Q=G.createIterator(),R=x.config.enterMode;Q.enforceRealBlocks=true;Q.enlargeBr=R!=2;var S;while(S=Q.getNextParagraph(R==1?'p':'div'))C(S);};function C(Q,R){if(Q.getCustomData('indent_processed'))return false;if(y.useIndentClasses){var S=Q.$.className.match(y.classNameRegex),T=0;if(S){S=S[1];T=y.indentClassMap[S];}if(y.name=='outdent')T--;else T++;if(T<0)return false;T=Math.min(T,x.config.indentClasses.length);T=Math.max(T,0);Q.$.className=i.ltrim(Q.$.className.replace(y.classNameRegex,''));if(T>0)Q.addClass(x.config.indentClasses[T-1]);}else{var U=v(Q,R),V=parseInt(Q.getStyle(U),10);if(isNaN(V))V=0;var W=x.config.indentOffset||40;V+=(y.name=='indent'?1:-1)*W;if(V<0)return false;V=Math.max(V,0);V=Math.ceil(V/W)*W;Q.setStyle(U,V?V+(x.config.indentUnit||'px'):'');if(Q.getAttribute('style')==='')Q.removeAttribute('style');}l.setMarker(z,Q,'indent_processed',1);return true;};var D=x.getSelection(),E=D.createBookmarks(1),F=D&&D.getRanges(1),G,H=F.createIterator();while(G=H.getNextRange()){var I=G.getCommonAncestor(),J=I;while(J&&!(J.type==1&&q[J.getName()]))J=J.getParent();if(!J){var K=G.getEnclosedNode();if(K&&K.type==1&&K.getName() in q){G.setStartAt(K,1);G.setEndAt(K,2);J=K;}}if(J&&G.startContainer.type==1&&G.startContainer.getName() in q){var L=new h.walker(G);L.evaluator=w;G.startContainer=L.next();}if(J&&G.endContainer.type==1&&G.endContainer.getName() in q){L=new h.walker(G);L.evaluator=w;G.endContainer=L.previous();}if(J){var M=J.getFirst(w),N=!!M.getNext(w),O=G.startContainer,P=M.equals(O)||M.contains(O);if(!(P&&(y.name=='indent'||y.useIndentClasses||parseInt(J.getStyle(v(J)),10))&&C(J,!N&&M.getDirection())))A(J);}else B();}l.clearAllMarkers(z);x.forceNextSelectionCheck();D.selectBookmarks(E);}};n.add('indent',{init:function(x){var y=x.addCommand('indent',new u(x,'indent')),z=x.addCommand('outdent',new u(x,'outdent'));x.ui.addButton('Indent',{label:x.lang.indent,command:'indent'});x.ui.addButton('Outdent',{label:x.lang.outdent,command:'outdent'});x.on('selectionChange',i.bind(t,y));x.on('selectionChange',i.bind(t,z));if(f.ie6Compat||f.ie7Compat)x.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');
x.on('dirChanged',function(A){var B=new h.range(x.document);B.setStartBefore(A.data.node);B.setEndAfter(A.data.node);var C=new h.walker(B),D;while(D=C.next()){if(D.type==1){if(!D.equals(A.data.node)&&D.getDirection()){B.setStartAfter(D);C=new h.walker(B);continue;}var E=x.config.indentClasses;if(E){var F=A.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var G=0;G<E.length;G++){if(D.hasClass(E[G]+F[0])){D.removeClass(E[G]+F[0]);D.addClass(E[G]+F[1]);}}}var H=D.getStyle('margin-right'),I=D.getStyle('margin-left');H?D.setStyle('margin-left',H):D.removeStyle('margin-left');I?D.setStyle('margin-right',I):D.removeStyle('margin-right');}}});},requires:['domiterator','list']});})();(function(){function q(v,w){var x=w.block||w.blockLimit;if(!x||x.getName()=='body')return 2;return r(x,v.config.useComputedState)==this.value?1:2;};function r(v,w){w=w===undefined||w;var x;if(w)x=v.getComputedStyle('text-align');else{while(!v.hasAttribute||!(v.hasAttribute('align')||v.getStyle('text-align'))){var y=v.getParent();if(!y)break;v=y;}x=v.getStyle('text-align')||v.getAttribute('align')||'';}x&&(x=x.replace(/-moz-|-webkit-|start|auto/i,''));!x&&w&&(x=v.getComputedStyle('direction')=='rtl'?'right':'left');return x;};function s(v){var w=v.editor.getCommand(this.name);w.state=q.call(this,v.editor,v.data.path);w.fire('state');};function t(v,w,x){var z=this;z.name=w;z.value=x;var y=v.config.justifyClasses;if(y){switch(x){case 'left':z.cssClassName=y[0];break;case 'center':z.cssClassName=y[1];break;case 'right':z.cssClassName=y[2];break;case 'justify':z.cssClassName=y[3];break;}z.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+y.join('|')+')(?=$|\\s)');}};function u(v){var w=v.editor,x=new h.range(w.document);x.setStartBefore(v.data.node);x.setEndAfter(v.data.node);var y=new h.walker(x),z;while(z=y.next()){if(z.type==1){if(!z.equals(v.data.node)&&z.getDirection()){x.setStartAfter(z);y=new h.walker(x);continue;}var A=w.config.justifyClasses;if(A)if(z.hasClass(A[0])){z.removeClass(A[0]);z.addClass(A[2]);}else if(z.hasClass(A[2])){z.removeClass(A[2]);z.addClass(A[0]);}var B='text-align',C=z.getStyle(B);if(C=='left')z.setStyle(B,'right');else if(C=='right')z.setStyle(B,'left');}}};t.prototype={exec:function(v){var H=this;var w=v.getSelection(),x=v.config.enterMode;if(!w)return;var y=w.createBookmarks(),z=w.getRanges(true),A=H.cssClassName,B,C,D=v.config.useComputedState;D=D===undefined||D;for(var E=z.length-1;E>=0;E--){B=z[E].createIterator();B.enlargeBr=x!=2;while(C=B.getNextParagraph(x==1?'p':'div')){C.removeAttribute('align');
C.removeStyle('text-align');var F=A&&(C.$.className=i.ltrim(C.$.className.replace(H.cssClassRegex,''))),G=H.state==2&&(!D||r(C,true)!=H.value);if(A){if(G)C.addClass(A);else if(!F)C.removeAttribute('class');}else if(G)C.setStyle('text-align',H.value);}}v.focus();v.forceNextSelectionCheck();w.selectBookmarks(y);}};n.add('justify',{init:function(v){var w=new t(v,'justifyleft','left'),x=new t(v,'justifycenter','center'),y=new t(v,'justifyright','right'),z=new t(v,'justifyblock','justify');v.addCommand('justifyleft',w);v.addCommand('justifycenter',x);v.addCommand('justifyright',y);v.addCommand('justifyblock',z);v.ui.addButton('JustifyLeft',{label:v.lang.justify.left,command:'justifyleft'});v.ui.addButton('JustifyCenter',{label:v.lang.justify.center,command:'justifycenter'});v.ui.addButton('JustifyRight',{label:v.lang.justify.right,command:'justifyright'});v.ui.addButton('JustifyBlock',{label:v.lang.justify.block,command:'justifyblock'});v.on('selectionChange',i.bind(s,w));v.on('selectionChange',i.bind(s,y));v.on('selectionChange',i.bind(s,x));v.on('selectionChange',i.bind(s,z));v.on('dirChanged',u);},requires:['domiterator']});})();n.add('keystrokes',{beforeInit:function(q){q.keystrokeHandler=new e.keystrokeHandler(q);q.specialKeys={};},init:function(q){var r=q.config.keystrokes,s=q.config.blockedKeystrokes,t=q.keystrokeHandler.keystrokes,u=q.keystrokeHandler.blockedKeystrokes;for(var v=0;v<r.length;v++)t[r[v][0]]=r[v][1];for(v=0;v<s.length;v++)u[s[v]]=1;}});e.keystrokeHandler=function(q){var r=this;if(q.keystrokeHandler)return q.keystrokeHandler;r.keystrokes={};r.blockedKeystrokes={};r._={editor:q};return r;};(function(){var q,r=function(t){t=t.data;var u=t.getKeystroke(),v=this.keystrokes[u],w=this._.editor;q=w.fire('key',{keyCode:u})===true;if(!q){if(v){var x={from:'keystrokeHandler'};q=w.execCommand(v,x)!==false;}if(!q){var y=w.specialKeys[u];q=y&&y(w)===true;if(!q)q=!!this.blockedKeystrokes[u];}}if(q)t.preventDefault(true);return!q;},s=function(t){if(q){q=false;t.data.preventDefault(true);}};e.keystrokeHandler.prototype={attach:function(t){t.on('keydown',r,this);if(f.opera||f.gecko&&f.mac)t.on('keypress',s,this);}};})();m.blockedKeystrokes=[1000+66,1000+73,1000+85];m.keystrokes=[[4000+121,'toolbarFocus'],[4000+122,'elementsPathFocus'],[2000+121,'contextMenu'],[1000+2000+121,'contextMenu'],[1000+90,'undo'],[1000+89,'redo'],[1000+2000+90,'redo'],[1000+76,'link'],[1000+66,'bold'],[1000+73,'italic'],[1000+85,'underline'],[4000+(g||f.webkit?189:109),'toolbarCollapse'],[4000+48,'a11yHelp']];
(function(){var q={ol:1,ul:1},r=/^[\n\r\t ]*$/,s=h.walker.whitespaces(),t=h.walker.bookmark(),u=function(I){return!(s(I)||t(I));};n.list={listToArray:function(I,J,K,L,M){if(!q[I.getName()])return[];if(!L)L=0;if(!K)K=[];for(var N=0,O=I.getChildCount();N<O;N++){var P=I.getChild(N);if(P.type==1&&P.getName() in j.$list)n.list.listToArray(P,J,K,L+1);if(P.$.nodeName.toLowerCase()!='li')continue;var Q={parent:I,indent:L,element:P,contents:[]};if(!M){Q.grandparent=I.getParent();if(Q.grandparent&&Q.grandparent.$.nodeName.toLowerCase()=='li')Q.grandparent=Q.grandparent.getParent();}else Q.grandparent=M;if(J)l.setMarker(J,P,'listarray_index',K.length);K.push(Q);for(var R=0,S=P.getChildCount(),T;R<S;R++){T=P.getChild(R);if(T.type==1&&q[T.getName()])n.list.listToArray(T,J,K,L+1,Q.grandparent);else Q.contents.push(T);}}return K;},arrayToList:function(I,J,K,L,M){if(!K)K=0;if(!I||I.length<K+1)return null;var N=I[K].parent.getDocument(),O=new h.documentFragment(N),P=null,Q=K,R=Math.max(I[K].indent,0),S=null,T,U=L==1?'p':'div';while(1){var V=I[Q];if(V.indent==R){if(!P||I[Q].parent.getName()!=P.getName()){P=I[Q].parent.clone(false,1);M&&P.setAttribute('dir',M);O.append(P);}S=P.append(V.element.clone(0,1));for(var W=0;W<V.contents.length;W++)S.append(V.contents[W].clone(1,1));Q++;}else if(V.indent==Math.max(R,0)+1){var X=V.element.getDirection(1),Y=I[Q-1].element.getDirection(1),Z=n.list.arrayToList(I,null,Q,L,Y!=X?X:null);if(!S.getChildCount()&&g&&!(N.$.documentMode>7))S.append(N.createText('\xa0'));S.append(Z.listNode);Q=Z.nextIndex;}else if(V.indent==-1&&!K&&V.grandparent){if(q[V.grandparent.getName()]){S=V.element.clone(false,true);T=V.element.getDirection(1);V.grandparent.getDirection(1)!=T&&S.setAttribute('dir',T);}else if(M||V.element.hasAttributes()||L!=2){S=N.createElement(U);V.element.copyAttributes(S,{type:1,value:1});T=V.element.getDirection()||M;T&&S.setAttribute('dir',T);if(!M&&L==2&&!S.hasAttributes())S=new h.documentFragment(N);}else S=new h.documentFragment(N);for(W=0;W<V.contents.length;W++)S.append(V.contents[W].clone(1,1));if(S.type==11&&Q!=I.length-1){var aa=S.getLast();if(aa&&aa.type==1&&aa.getAttribute('type')=='_moz')aa.remove();if(!(aa=S.getLast(u)&&aa.type==1&&aa.getName() in j.$block))S.append(N.createElement('br'));}if(S.type==1&&S.getName()==U&&S.$.firstChild){S.trim();var ab=S.getFirst();if(ab.type==1&&ab.isBlockBoundary()){var ac=new h.documentFragment(N);S.moveChildren(ac);S=ac;}}var ad=S.$.nodeName.toLowerCase();if(!g&&(ad=='div'||ad=='p'))S.appendBogus();
O.append(S);P=null;Q++;}else return null;if(I.length<=Q||Math.max(I[Q].indent,0)<R)break;}if(J){var ae=O.getFirst();while(ae){if(ae.type==1)l.clearMarkers(J,ae);ae=ae.getNextSourceNode();}}return{listNode:O,nextIndex:Q};}};function v(I){var J=I.data.path,K=J.blockLimit,L=J.elements,M,N;for(N=0;N<L.length&&(M=L[N])&&!M.equals(K);N++){if(q[L[N].getName()])return this.setState(this.type==L[N].getName()?1:2);}return this.setState(2);};function w(I,J,K,L){var M=n.list.listToArray(J.root,K),N=[];for(var O=0;O<J.contents.length;O++){var P=J.contents[O];P=P.getAscendant('li',true);if(!P||P.getCustomData('list_item_processed'))continue;N.push(P);l.setMarker(K,P,'list_item_processed',true);}var Q=J.root,R=Q.getDocument().createElement(this.type);Q.copyAttributes(R,{start:1,type:1});R.removeStyle('list-style-type');for(O=0;O<N.length;O++){var S=N[O].getCustomData('listarray_index');M[S].parent=R;}var T=n.list.arrayToList(M,K,null,I.config.enterMode),U,V=T.listNode.getChildCount();for(O=0;O<V&&(U=T.listNode.getChild(O));O++){if(U.getName()==this.type)L.push(U);}T.listNode.replace(J.root);};var x=/^h[1-6]$/;function y(I,J,K){var L=J.contents,M=J.root.getDocument(),N=[];if(L.length==1&&L[0].equals(J.root)){var O=M.createElement('div');L[0].moveChildren&&L[0].moveChildren(O);L[0].append(O);L[0]=O;}var P=J.contents[0].getParent();for(var Q=0;Q<L.length;Q++)P=P.getCommonAncestor(L[Q].getParent());var R=I.config.useComputedState,S,T;R=R===undefined||R;for(Q=0;Q<L.length;Q++){var U=L[Q],V;while(V=U.getParent()){if(V.equals(P)){N.push(U);if(!T&&U.getDirection())T=1;var W=U.getDirection(R);if(S!==null)if(S&&S!=W)S=null;else S=W;break;}U=V;}}if(N.length<1)return;var X=N[N.length-1].getNext(),Y=M.createElement(this.type);K.push(Y);var Z,aa;while(N.length){Z=N.shift();aa=M.createElement('li');if(Z.is('pre')||x.test(Z.getName()))Z.appendTo(aa);else{if(S&&Z.getDirection()){Z.removeStyle('direction');Z.removeAttribute('dir');}Z.copyAttributes(aa);Z.moveChildren(aa);Z.remove();}aa.appendTo(Y);}if(S&&T)Y.setAttribute('dir',S);if(X)Y.insertBefore(X);else Y.appendTo(P);};function z(I,J,K){var L=n.list.listToArray(J.root,K),M=[];for(var N=0;N<J.contents.length;N++){var O=J.contents[N];O=O.getAscendant('li',true);if(!O||O.getCustomData('list_item_processed'))continue;M.push(O);l.setMarker(K,O,'list_item_processed',true);}var P=null;for(N=0;N<M.length;N++){var Q=M[N].getCustomData('listarray_index');L[Q].indent=-1;P=Q;}for(N=P+1;N<L.length;N++){if(L[N].indent>L[N-1].indent+1){var R=L[N-1].indent+1-L[N].indent,S=L[N].indent;
while(L[N]&&L[N].indent>=S){L[N].indent+=R;N++;}N--;}}var T=n.list.arrayToList(L,K,null,I.config.enterMode,J.root.getAttribute('dir')),U=T.listNode,V,W;function X(Y){if((V=U[Y?'getFirst':'getLast']())&&!(V.is&&V.isBlockBoundary())&&(W=J.root[Y?'getPrevious':'getNext'](h.walker.whitespaces(true)))&&!(W.is&&W.isBlockBoundary({br:1})))I.document.createElement('br')[Y?'insertBefore':'insertAfter'](V);};X(true);X();U.replace(J.root);};function A(I,J){this.name=I;this.type=J;};A.prototype={exec:function(I){var J=I.document,K=I.config,L=I.getSelection(),M=L&&L.getRanges(true);if(!M||M.length<1)return;if(this.state==2){var N=J.getBody();if(!N.getFirst(u)){K.enterMode==2?N.appendBogus():M[0].fixBlock(1,K.enterMode==1?'p':'div');L.selectRanges(M);}else{var O=M.length==1&&M[0],P=O&&O.getEnclosedNode();if(P&&P.is&&this.type==P.getName())this.setState(1);}}var Q=L.createBookmarks(true),R=[],S={},T=M.createIterator(),U=0;while((O=T.getNextRange())&&++U){var V=O.getBoundaryNodes(),W=V.startNode,X=V.endNode;if(W.type==1&&W.getName()=='td')O.setStartAt(V.startNode,1);if(X.type==1&&X.getName()=='td')O.setEndAt(V.endNode,2);var Y=O.createIterator(),Z;Y.forceBrBreak=this.state==2;while(Z=Y.getNextParagraph()){if(Z.getCustomData('list_block'))continue;else l.setMarker(S,Z,'list_block',1);var aa=new h.elementPath(Z),ab=aa.elements,ac=ab.length,ad=null,ae=0,af=aa.blockLimit,ag;for(var ah=ac-1;ah>=0&&(ag=ab[ah]);ah--){if(q[ag.getName()]&&af.contains(ag)){af.removeCustomData('list_group_object_'+U);var ai=ag.getCustomData('list_group_object');if(ai)ai.contents.push(Z);else{ai={root:ag,contents:[Z]};R.push(ai);l.setMarker(S,ag,'list_group_object',ai);}ae=1;break;}}if(ae)continue;var aj=af;if(aj.getCustomData('list_group_object_'+U))aj.getCustomData('list_group_object_'+U).contents.push(Z);else{ai={root:aj,contents:[Z]};l.setMarker(S,aj,'list_group_object_'+U,ai);R.push(ai);}}}var ak=[];while(R.length>0){ai=R.shift();if(this.state==2){if(q[ai.root.getName()])w.call(this,I,ai,S,ak);else y.call(this,I,ai,ak);}else if(this.state==1&&q[ai.root.getName()])z.call(this,I,ai,S);}for(ah=0;ah<ak.length;ah++){ad=ak[ah];var al,am=this;(al=function(an){var ao=ad[an?'getPrevious':'getNext'](h.walker.whitespaces(true));if(ao&&ao.getName&&ao.getName()==am.type){ao.remove();ao.moveChildren(ad,an);}})();al(1);}l.clearAllMarkers(S);L.selectBookmarks(Q);I.focus();}};var B=j,C=/[\t\r\n ]*(?:&nbsp;|\xa0)$/;function D(I,J){var K,L=I.children,M=L.length;for(var N=0;N<M;N++){K=L[N];if(K.name&&K.name in J)return N;
}return M;};function E(I){return function(J){var K=J.children,L=D(J,B.$list),M=K[L],N=M&&M.previous,O;if(N&&(N.name&&N.name=='br'||N.value&&(O=N.value.match(C)))){var P=N;if(!(O&&O.index)&&P==K[0])K[0]=I||g?new e.htmlParser.text('\xa0'):new e.htmlParser.element('br',{});else if(P.name=='br')K.splice(L-1,1);else P.value=P.value.replace(C,'');}};};var F={elements:{}};for(var G in B.$listItem)F.elements[G]=E();var H={elements:{}};for(G in B.$listItem)H.elements[G]=E(true);n.add('list',{init:function(I){var J=I.addCommand('numberedlist',new A('numberedlist','ol')),K=I.addCommand('bulletedlist',new A('bulletedlist','ul'));I.ui.addButton('NumberedList',{label:I.lang.numberedlist,command:'numberedlist'});I.ui.addButton('BulletedList',{label:I.lang.bulletedlist,command:'bulletedlist'});I.on('selectionChange',i.bind(v,J));I.on('selectionChange',i.bind(v,K));},afterInit:function(I){var J=I.dataProcessor;if(J){J.dataFilter.addRules(F);J.htmlFilter.addRules(H);}},requires:['domiterator']});})();(function(){n.liststyle={requires:['dialog'],init:function(q){q.addCommand('numberedListStyle',new e.dialogCommand('numberedListStyle'));e.dialog.add('numberedListStyle',this.path+'dialogs/liststyle.js');q.addCommand('bulletedListStyle',new e.dialogCommand('bulletedListStyle'));e.dialog.add('bulletedListStyle',this.path+'dialogs/liststyle.js');if(q.addMenuItems){q.addMenuGroup('list',108);q.addMenuItems({numberedlist:{label:q.lang.list.numberedTitle,group:'list',command:'numberedListStyle'},bulletedlist:{label:q.lang.list.bulletedTitle,group:'list',command:'bulletedListStyle'}});}if(q.contextMenu)q.contextMenu.addListener(function(r,s){if(!r||r.isReadOnly())return null;while(r){var t=r.getName();if(t=='ol')return{numberedlist:2};else if(t=='ul')return{bulletedlist:2};r=r.getParent();}return null;});}};n.add('liststyle',n.liststyle);})();(function(){function q(w){if(!w||w.type!=1||w.getName()!='form')return[];var x=[],y=['style','className'];for(var z=0;z<y.length;z++){var A=y[z],B=w.$.elements.namedItem(A);if(B){var C=new l(B);x.push([C,C.nextSibling]);C.remove();}}return x;};function r(w,x){if(!w||w.type!=1||w.getName()!='form')return;if(x.length>0)for(var y=x.length-1;y>=0;y--){var z=x[y][0],A=x[y][1];if(A)z.insertBefore(A);else z.appendTo(w);}};function s(w,x){var y=q(w),z={},A=w.$;if(!x){z['class']=A.className||'';A.className='';}z.inline=A.style.cssText||'';if(!x)A.style.cssText='position: static; overflow: visible';r(y);return z;};function t(w,x){var y=q(w),z=w.$;if('class' in x)z.className=x['class'];
if('inline' in x)z.style.cssText=x.inline;r(y);};function u(w){var x=e.instances;for(var y in x){var z=x[y];if(z.mode=='wysiwyg'){var A=z.document.getBody();A.setAttribute('contentEditable',false);A.setAttribute('contentEditable',true);}}if(w.focusManager.hasFocus){w.toolbox.focus();w.focus();}};function v(w){if(!g||f.version>6)return null;var x=l.createFromHtml('<iframe frameborder="0" tabindex="-1" src="javascript:void((function(){document.open();'+(f.isCustomDomain()?"document.domain='"+this.getDocument().$.domain+"';":'')+'document.close();'+'})())"'+' style="display:block;position:absolute;z-index:-1;'+'progid:DXImageTransform.Microsoft.Alpha(opacity=0);'+'"></iframe>');return w.append(x,true);};n.add('maximize',{init:function(w){var x=w.lang,y=e.document,z=y.getWindow(),A,B,C,D;function E(){var G=z.getViewPaneSize();D&&D.setStyles({width:G.width+'px',height:G.height+'px'});w.resize(G.width,G.height,null,true);};var F=2;w.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var G=w.container.getChild(1),H=w.getThemeSpace('contents');if(w.mode=='wysiwyg'){var I=w.getSelection();A=I&&I.getRanges();B=z.getScrollPosition();}else{var J=w.textarea.$;A=!g&&[J.selectionStart,J.selectionEnd];B=[J.scrollLeft,J.scrollTop];}if(this.state==2){z.on('resize',E);C=z.getScrollPosition();var K=w.container;while(K=K.getParent()){K.setCustomData('maximize_saved_styles',s(K));K.setStyle('z-index',w.config.baseFloatZIndex-1);}H.setCustomData('maximize_saved_styles',s(H,true));G.setCustomData('maximize_saved_styles',s(G,true));var L={overflow:f.webkit?'':'hidden',width:0,height:0};y.getDocumentElement().setStyles(L);!f.gecko&&y.getDocumentElement().setStyle('position','fixed');!(f.gecko&&f.quirks)&&y.getBody().setStyles(L);g?setTimeout(function(){z.$.scrollTo(0,0);},0):z.$.scrollTo(0,0);G.setStyle('position',f.gecko&&f.quirks?'fixed':'absolute');G.$.offsetLeft;G.setStyles({'z-index':w.config.baseFloatZIndex-1,left:'0px',top:'0px'});D=v(G);G.addClass('cke_maximized');E();var M=G.getDocumentPosition();G.setStyles({left:-1*M.x+'px',top:-1*M.y+'px'});f.gecko&&u(w);}else if(this.state==1){z.removeListener('resize',E);var N=[H,G];for(var O=0;O<N.length;O++){t(N[O],N[O].getCustomData('maximize_saved_styles'));N[O].removeCustomData('maximize_saved_styles');}K=w.container;while(K=K.getParent()){t(K,K.getCustomData('maximize_saved_styles'));K.removeCustomData('maximize_saved_styles');}g?setTimeout(function(){z.$.scrollTo(C.x,C.y);},0):z.$.scrollTo(C.x,C.y);
G.removeClass('cke_maximized');if(f.webkit){G.setStyle('display','inline');setTimeout(function(){G.setStyle('display','block');},0);}if(D){D.remove();D=null;}w.fire('resize');}this.toggleState();var P=this.uiItems[0];if(P){var Q=this.state==2?x.maximize:x.minimize,R=w.element.getDocument().getById(P._.id);R.getChild(1).setHtml(Q);R.setAttribute('title',Q);R.setAttribute('href','javascript:void("'+Q+'");');}if(w.mode=='wysiwyg'){if(A){f.gecko&&u(w);w.getSelection().selectRanges(A);var S=w.getSelection().getStartElement();S&&S.scrollIntoView(true);}else z.$.scrollTo(B.x,B.y);}else{if(A){J.selectionStart=A[0];J.selectionEnd=A[1];}J.scrollLeft=B[0];J.scrollTop=B[1];}A=B=null;F=this.state;},canUndo:false});w.ui.addButton('Maximize',{label:x.maximize,command:'maximize'});w.on('mode',function(){var G=w.getCommand('maximize');G.setState(G.state==0?0:F);},null,null,100);}});})();(function(){n.add('pastefromword',{init:function(q){var r=0,s=function(t){t&&t.removeListener();r&&setTimeout(function(){r=0;},0);};q.addCommand('pastefromword',{canUndo:false,exec:function(){r=1;if(q.execCommand('paste')===false){q.on('dialogShow',function(t){t.removeListener();t.data.on('cancel',s);});q.on('dialogHide',function(t){t.data.removeListener('cancel',s);});}q.on('afterPaste',s);}});q.ui.addButton('PasteFromWord',{label:q.lang.pastefromword.toolbar,command:'pastefromword'});q.on('pasteState',function(t){q.getCommand('pastefromword').setState(t.data);});q.on('paste',function(t){var u=t.data,v;if((v=u.html)&&(r||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(v))){var w=this.loadFilterRules(function(){if(w)q.fire('paste',u);else if(!q.config.pasteFromWordPromptCleanup||r||confirm(q.lang.pastefromword.confirmCleanup))u.html=e.cleanWord(v,q);});w&&t.cancel();}},this);},loadFilterRules:function(q){var r=e.cleanWord;if(r)q();else{var s=e.getUrl(m.pasteFromWordCleanupFile||this.path+'filter/default.js');e.scriptLoader.load(s,q,null,true);}return!r;},requires:['clipboard']});})();(function(){var q={exec:function(r){var s=i.tryThese(function(){var t=window.clipboardData.getData('Text');if(!t)throw 0;return t;});if(!s){r.openDialog('pastetext');return false;}else r.fire('paste',{text:s});return true;}};n.add('pastetext',{init:function(r){var s='pastetext',t=r.addCommand(s,q);r.ui.addButton('PasteText',{label:r.lang.pasteText.button,command:s});e.dialog.add(s,e.getUrl(this.path+'dialogs/pastetext.js'));if(r.config.forcePasteAsPlainText)r.on('beforeCommandExec',function(u){if(u.data.name=='paste'){r.execCommand('pastetext');
u.cancel();}},null,null,0);r.on('pasteState',function(u){r.getCommand('pastetext').setState(u.data);});},requires:['clipboard']});})();n.add('popup');i.extend(e.editor.prototype,{popup:function(q,r,s,t){r=r||'80%';s=s||'70%';if(typeof r=='string'&&r.length>1&&r.substr(r.length-1,1)=='%')r=parseInt(window.screen.width*parseInt(r,10)/100,10);if(typeof s=='string'&&s.length>1&&s.substr(s.length-1,1)=='%')s=parseInt(window.screen.height*parseInt(s,10)/100,10);if(r<640)r=640;if(s<420)s=420;var u=parseInt((window.screen.height-s)/2,10),v=parseInt((window.screen.width-r)/2,10);t=(t||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+r+',height='+s+',top='+u+',left='+v;var w=window.open('',null,t,true);if(!w)return false;try{w.moveTo(v,u);w.resizeTo(r,s);w.focus();w.location.href=q;}catch(x){w=window.open(q,null,t,true);}return true;}});n.add('resize',{init:function(q){var r=q.config,s=q.element.getDirection(1);!r.resize_dir&&(r.resize_dir='both');r.resize_maxWidth==undefined&&(r.resize_maxWidth=3000);r.resize_maxHeight==undefined&&(r.resize_maxHeight=3000);r.resize_minWidth==undefined&&(r.resize_minWidth=750);r.resize_minHeight==undefined&&(r.resize_minHeight=250);if(r.resize_enabled!==false){var t=null,u,v,w=(r.resize_dir=='both'||r.resize_dir=='horizontal')&&r.resize_minWidth!=r.resize_maxWidth,x=(r.resize_dir=='both'||r.resize_dir=='vertical')&&r.resize_minHeight!=r.resize_maxHeight;function y(B){var C=B.data.$.screenX-u.x,D=B.data.$.screenY-u.y,E=v.width,F=v.height,G=E+C*(s=='rtl'?-1:1),H=F+D;if(w)E=Math.max(r.resize_minWidth,Math.min(G,r.resize_maxWidth));if(x)F=Math.max(r.resize_minHeight,Math.min(H,r.resize_maxHeight));q.resize(w?E:null,x?F:null);};function z(B){e.document.removeListener('mousemove',y);e.document.removeListener('mouseup',z);if(q.document){q.document.removeListener('mousemove',y);q.document.removeListener('mouseup',z);}};var A=i.addFunction(function(B){if(!t)t=q.getResizable();v={width:t.$.offsetWidth||0,height:t.$.offsetHeight||0};u={x:B.screenX,y:B.screenY};r.resize_minWidth>v.width&&(r.resize_minWidth=v.width);r.resize_minHeight>v.height&&(r.resize_minHeight=v.height);e.document.on('mousemove',y);e.document.on('mouseup',z);if(q.document){q.document.on('mousemove',y);q.document.on('mouseup',z);}});q.on('destroy',function(){i.removeFunction(A);});q.on('themeSpace',function(B){if(B.data.space=='bottom'){var C='';if(w&&!x)C=' cke_resizer_horizontal';if(!w&&x)C=' cke_resizer_vertical';
var D='<div class="cke_resizer'+C+' cke_resizer_'+s+'"'+' title="'+i.htmlEncode(q.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+A+', event)"'+'></div>';s=='ltr'&&C=='ltr'?B.data.html+=D:B.data.html=D+B.data.html;}},q,null,100);}}});(function(){var q='scaytcheck',r='';function s(x,y){var z=0,A;for(A in y){if(y[A]==x){z=1;break;}}return z;};var t=function(){var x=this,y=function(){var C=x.config,D={};D.srcNodeRef=x.document.getWindow().$.frameElement;D.assocApp='CKEDITOR.'+e.version+'@'+e.revision;D.customerid=C.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';D.customDictionaryIds=C.scayt_customDictionaryIds||'';D.userDictionaryName=C.scayt_userDictionaryName||'';D.sLang=C.scayt_sLang||'en_US';D.onLoad=function(){if(!(g&&f.version<8))this.addStyle(this.selectorCss(),'padding-bottom: 2px !important;');if(x.focusManager.hasFocus&&!u.isControlRestored(x))this.focus();};D.onBeforeChange=function(){if(u.getScayt(x)&&!x.checkDirty())setTimeout(function(){x.resetDirty();},0);};var E=window.scayt_custom_params;if(typeof E=='object')for(var F in E)D[F]=E[F];if(u.getControlId(x))D.id=u.getControlId(x);var G=new window.scayt(D);G.afterMarkupRemove.push(function(I){new l(I,G.document).mergeSiblings();});var H=u.instances[x.name];if(H){G.sLang=H.sLang;G.option(H.option());G.paused=H.paused;}u.instances[x.name]=G;try{G.setDisabled(u.isPaused(x)===false);}catch(I){}x.fire('showScaytState');};x.on('contentDom',y);x.on('contentDomUnload',function(){var C=e.document.getElementsByTag('script'),D=/^dojoIoScript(\d+)$/i,E=/^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var F=0;F<C.count();F++){var G=C.getItem(F),H=G.getId(),I=G.getAttribute('src');if(H&&I&&H.match(D)&&I.match(E))G.remove();}});x.on('beforeCommandExec',function(C){if((C.data.name=='source'||C.data.name=='newpage')&&x.mode=='wysiwyg'){var D=u.getScayt(x);if(D){u.setPaused(x,!D.disabled);u.setControlId(x,D.id);D.destroy(true);delete u.instances[x.name];}}else if(C.data.name=='source'&&x.mode=='source')u.markControlRestore(x);});x.on('afterCommandExec',function(C){if(!u.isScaytEnabled(x))return;if(x.mode=='wysiwyg'&&(C.data.name=='undo'||C.data.name=='redo'))window.setTimeout(function(){u.getScayt(x).refresh();},10);});x.on('destroy',function(C){var D=C.editor,E=u.getScayt(D);if(!E)return;delete u.instances[D.name];u.setControlId(D,E.id);E.destroy(true);});x.on('afterSetData',function(){if(u.isScaytEnabled(x))window.setTimeout(function(){var C=u.getScayt(x);
C&&C.refresh();},10);});x.on('insertElement',function(){var C=u.getScayt(x);if(u.isScaytEnabled(x)){if(g)x.getSelection().unlock(true);window.setTimeout(function(){C.focus();C.refresh();},10);}},this,null,50);x.on('insertHtml',function(){var C=u.getScayt(x);if(u.isScaytEnabled(x)){if(g)x.getSelection().unlock(true);window.setTimeout(function(){C.focus();C.refresh();},10);}},this,null,50);x.on('scaytDialog',function(C){C.data.djConfig=window.djConfig;C.data.scayt_control=u.getScayt(x);C.data.tab=r;C.data.scayt=window.scayt;});var z=x.dataProcessor,A=z&&z.htmlFilter;if(A)A.addRules({elements:{span:function(C){if(C.attributes['data-scayt_word']&&C.attributes['data-scaytid']){delete C.name;return C;}}}});var B=n.undo.Image.prototype;B.equals=i.override(B.equals,function(C){return function(D){var I=this;var E=I.contents,F=D.contents,G=u.getScayt(I.editor);if(G&&u.isScaytReady(I.editor)){I.contents=G.reset(E)||'';D.contents=G.reset(F)||'';}var H=C.apply(I,arguments);I.contents=E;D.contents=F;return H;};});if(x.document)y();};n.scayt={engineLoaded:false,instances:{},controlInfo:{},setControlInfo:function(x,y){if(x&&x.name&&typeof this.controlInfo[x.name]!='object')this.controlInfo[x.name]={};for(var z in y)this.controlInfo[x.name][z]=y[z];},isControlRestored:function(x){if(x&&x.name&&this.controlInfo[x.name])return this.controlInfo[x.name].restored;return false;},markControlRestore:function(x){this.setControlInfo(x,{restored:true});},setControlId:function(x,y){this.setControlInfo(x,{id:y});},getControlId:function(x){if(x&&x.name&&this.controlInfo[x.name]&&this.controlInfo[x.name].id)return this.controlInfo[x.name].id;return null;},setPaused:function(x,y){this.setControlInfo(x,{paused:y});},isPaused:function(x){if(x&&x.name&&this.controlInfo[x.name])return this.controlInfo[x.name].paused;return undefined;},getScayt:function(x){return this.instances[x.name];},isScaytReady:function(x){return this.engineLoaded===true&&'undefined'!==typeof window.scayt&&this.getScayt(x);},isScaytEnabled:function(x){var y=this.getScayt(x);return y?y.disabled===false:false;},getUiTabs:function(x){var y=[],z=x.config.scayt_uiTabs||'1,1,1';z=z.split(',');z[3]='1';for(var A=0;A<4;A++)y[A]=typeof window.scayt!='undefined'&&typeof window.scayt.uiTags!='undefined'?parseInt(z[A],10)&&window.scayt.uiTags[A]:parseInt(z[A],10);return y;},loadEngine:function(x){if(f.gecko&&f.version<10900||f.opera||f.air)return x.fire('showScaytState');if(this.engineLoaded===true)return t.apply(x);else if(this.engineLoaded==-1)return e.on('scaytReady',function(){t.apply(x);
});e.on('scaytReady',t,x);e.on('scaytReady',function(){this.engineLoaded=true;},this,null,0);this.engineLoaded=-1;var y=document.location.protocol;y=y.search(/https?:/)!=-1?y:'http:';var z='svc.spellchecker.net/scayt26/loader__base.js',A=x.config.scayt_srcUrl||y+'//'+z,B=u.parseUrl(A).path+'/';if(window.scayt==undefined){e._djScaytConfig={baseUrl:B,addOnLoad:[function(){e.fireOnce('scaytReady');}],isDebug:false};e.document.getHead().append(e.document.createElement('script',{attributes:{type:'text/javascript',async:'true',src:A}}));}else e.fireOnce('scaytReady');return null;},parseUrl:function(x){var y;if(x.match&&(y=x.match(/(.*)[\/\\](.*?\.\w+)$/)))return{path:y[1],file:y[2]};else return x;}};var u=n.scayt,v=function(x,y,z,A,B,C,D){x.addCommand(A,B);x.addMenuItem(A,{label:z,command:A,group:C,order:D});},w={preserveState:true,editorFocus:false,canUndo:false,exec:function(x){if(u.isScaytReady(x)){var y=u.isScaytEnabled(x);this.setState(y?2:1);var z=u.getScayt(x);z.focus();z.setDisabled(y);}else if(!x.config.scayt_autoStartup&&u.engineLoaded>=0){this.setState(0);u.loadEngine(x);}}};n.add('scayt',{requires:['menubutton'],beforeInit:function(x){var y=x.config.scayt_contextMenuItemsOrder||'suggest|moresuggest|control',z='';y=y.split('|');if(y&&y.length)for(var A=0;A<y.length;A++)z+='scayt_'+y[A]+(y.length!=parseInt(A,10)+1?',':'');x.config.menu_groups=z+','+x.config.menu_groups;},init:function(x){var y=x.dataProcessor&&x.dataProcessor.dataFilter,z={elements:{span:function(I){var J=I.attributes;if(J&&J['data-scaytid'])delete I.name;}}};y&&y.addRules(z);var A={},B={},C=x.addCommand(q,w);e.dialog.add(q,e.getUrl(this.path+'dialogs/options.js'));var D=u.getUiTabs(x),E='scaytButton';x.addMenuGroup(E);var F={},G=x.lang.scayt;F.scaytToggle={label:G.enable,command:q,group:E};if(D[0]==1)F.scaytOptions={label:G.options,group:E,onClick:function(){r='options';x.openDialog(q);}};if(D[1]==1)F.scaytLangs={label:G.langs,group:E,onClick:function(){r='langs';x.openDialog(q);}};if(D[2]==1)F.scaytDict={label:G.dictionariesTab,group:E,onClick:function(){r='dictionaries';x.openDialog(q);}};F.scaytAbout={label:x.lang.scayt.about,group:E,onClick:function(){r='about';x.openDialog(q);}};x.addMenuItems(F);x.ui.add('Scayt',5,{label:G.title,title:f.opera?G.opera_title:G.title,className:'cke_button_scayt',modes:{wysiwyg:1},onRender:function(){C.on('state',function(){this.setState(C.state);},this);},onMenu:function(){var I=u.isScaytEnabled(x);x.getMenuItem('scaytToggle').label=G[I?'disable':'enable'];
var J=u.getUiTabs(x);return{scaytToggle:2,scaytOptions:I&&J[0]?2:0,scaytLangs:I&&J[1]?2:0,scaytDict:I&&J[2]?2:0,scaytAbout:I&&J[3]?2:0};}});if(x.contextMenu&&x.addMenuItems)x.contextMenu.addListener(function(I,J){if(!u.isScaytEnabled(x)||J.getRanges()[0].checkReadOnly())return null;var K=u.getScayt(x),L=K.getScaytNode();if(!L)return null;var M=K.getWord(L);if(!M)return null;var N=K.getLang(),O={},P=window.scayt.getSuggestion(M,N);if(!P||!P.length)return null;for(i in A){delete x._.menuItems[i];delete x._.commands[i];}for(i in B){delete x._.menuItems[i];delete x._.commands[i];}A={};B={};var Q=x.config.scayt_moreSuggestions||'on',R=false,S=x.config.scayt_maxSuggestions;typeof S!='number'&&(S=5);!S&&(S=P.length);var T=x.config.scayt_contextCommands||'all';T=T.split('|');for(var U=0,V=P.length;U<V;U+=1){var W='scayt_suggestion_'+P[U].replace(' ','_'),X=(function(ab,ac){return{exec:function(){K.replace(ab,ac);}};})(L,P[U]);if(U<S){v(x,'button_'+W,P[U],W,X,'scayt_suggest',U+1);O[W]=2;B[W]=2;}else if(Q=='on'){v(x,'button_'+W,P[U],W,X,'scayt_moresuggest',U+1);A[W]=2;R=true;}}if(R){x.addMenuItem('scayt_moresuggest',{label:G.moreSuggestions,group:'scayt_moresuggest',order:10,getItems:function(){return A;}});B.scayt_moresuggest=2;}if(s('all',T)||s('ignore',T)){var Y={exec:function(){K.ignore(L);}};v(x,'ignore',G.ignore,'scayt_ignore',Y,'scayt_control',1);B.scayt_ignore=2;}if(s('all',T)||s('ignoreall',T)){var Z={exec:function(){K.ignoreAll(L);}};v(x,'ignore_all',G.ignoreAll,'scayt_ignore_all',Z,'scayt_control',2);B.scayt_ignore_all=2;}if(s('all',T)||s('add',T)){var aa={exec:function(){window.scayt.addWordToUserDictionary(L);}};v(x,'add_word',G.addWord,'scayt_add_word',aa,'scayt_control',3);B.scayt_add_word=2;}if(K.fireOnContextMenu)K.fireOnContextMenu(x);return B;});var H=function(){x.removeListener('showScaytState',H);if(!f.opera&&!f.air)C.setState(u.isScaytEnabled(x)?1:2);else C.setState(0);};x.on('showScaytState',H);if(f.opera||f.air)x.on('instanceReady',function(){H();});if(x.config.scayt_autoStartup)x.on('instanceReady',function(){u.loadEngine(x);});},afterInit:function(x){var y,z=function(A){if(A.hasAttribute('data-scaytid'))return false;};if(x._.elementsPath&&(y=x._.elementsPath.filters))y.push(z);x.addRemoveFormatFilter&&x.addRemoveFormatFilter(z);}});})();n.add('smiley',{requires:['dialog'],init:function(q){q.config.smiley_path=q.config.smiley_path||this.path+'images/';q.addCommand('smiley',new e.dialogCommand('smiley'));q.ui.addButton('Smiley',{label:q.lang.smiley.toolbar,command:'smiley'});
e.dialog.add('smiley',this.path+'dialogs/smiley.js');}});m.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];m.smiley_descriptions=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angel','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(function(){n.add('stylescombo',{requires:['richcombo','styles'],init:function(r){var s=r.config,t=r.lang.stylesCombo,u={},v=[];function w(x){r.getStylesSet(function(y){if(!v.length){var z,A;for(var B=0,C=y.length;B<C;B++){var D=y[B];A=D.name;z=u[A]=new e.style(D);z._name=A;z._.enterMode=s.enterMode;v.push(z);}v.sort(q);}x&&x();});};r.ui.addRichCombo('Styles',{label:t.label,title:t.panelTitle,className:'cke_styles',panel:{css:r.skin.editor.css.concat(s.contentsCss),multiSelect:true,attributes:{'aria-label':t.panelTitle}},init:function(){var x=this;w(function(){var y,z,A,B,C,D;for(C=0,D=v.length;C<D;C++){y=v[C];z=y._name;B=y.type;if(B!=A){x.startGroup(t['panelTitle'+String(B)]);A=B;}x.add(z,y.type==3?z:y.buildPreview(),z);}x.commit();x.onOpen();});},onClick:function(x){r.focus();r.fire('saveSnapshot');var y=u[x],z=r.getSelection(),A=new h.elementPath(z.getStartElement());y[y.checkActive(A)?'remove':'apply'](r.document);r.fire('saveSnapshot');},onRender:function(){r.on('selectionChange',function(x){var y=this.getValue(),z=x.data.path,A=z.elements;for(var B=0,C=A.length,D;B<C;B++){D=A[B];for(var E in u){if(u[E].checkElementRemovable(D,true)){if(E!=y)this.setValue(E);return;}}}this.setValue('');},this);},onOpen:function(){var E=this;if(g||f.webkit)r.focus();var x=r.getSelection(),y=x.getSelectedElement(),z=new h.elementPath(y||x.getStartElement()),A=[0,0,0,0];E.showAll();E.unmarkAll();for(var B in u){var C=u[B],D=C.type;if(C.checkActive(z))E.mark(B);else if(D==3&&!C.checkApplicable(z)){E.hideItem(B);A[D]--;}A[D]++;}if(!A[1])E.hideGroup(t['panelTitle'+String(1)]);if(!A[2])E.hideGroup(t['panelTitle'+String(2)]);if(!A[3])E.hideGroup(t['panelTitle'+String(3)]);}});r.on('instanceReady',function(){w();});}});function q(r,s){var t=r.type,u=s.type;return t==u?0:t==3?-1:u==3?1:u==1?1:-1;};})();(function(){var q=/^(?:td|th)$/;
function r(K){var L=K.createBookmarks(),M=K.getRanges(),N=[],O={};function P(X){if(N.length>0)return;if(X.type==1&&q.test(X.getName())&&!X.getCustomData('selected_cell')){l.setMarker(O,X,'selected_cell',true);N.push(X);}};for(var Q=0;Q<M.length;Q++){var R=M[Q];if(R.collapsed){var S=R.getCommonAncestor(),T=S.getAscendant('td',true)||S.getAscendant('th',true);if(T)N.push(T);}else{var U=new h.walker(R),V;U.guard=P;while(V=U.next()){var W=V.getParent();if(W&&q.test(W.getName())&&!W.getCustomData('selected_cell')){l.setMarker(O,W,'selected_cell',true);N.push(W);}}}}l.clearAllMarkers(O);K.selectBookmarks(L);return N;};function s(K){var L=0,M=K.length-1,N={},O,P,Q;while(O=K[L++])l.setMarker(N,O,'delete_cell',true);L=0;while(O=K[L++]){if((P=O.getPrevious())&&!P.getCustomData('delete_cell')||(P=O.getNext())&&!P.getCustomData('delete_cell')){l.clearAllMarkers(N);return P;}}l.clearAllMarkers(N);Q=K[0].getParent();if(Q=Q.getPrevious())return Q.getLast();Q=K[M].getParent();if(Q=Q.getNext())return Q.getChild(0);return null;};function t(K,L){var M=r(K),N=M[0],O=N.getAscendant('table'),P=N.getDocument(),Q=M[0].getParent(),R=Q.$.rowIndex,S=M[M.length-1],T=S.getParent().$.rowIndex+S.$.rowSpan-1,U=new l(O.$.rows[T]),V=L?R:T,W=L?Q:U,X=i.buildTableMap(O),Y=X[V],Z=L?X[V-1]:X[V+1],aa=X[0].length,ab=P.createElement('tr');for(var ac=0;ac<aa;ac++){var ad;if(Y[ac].rowSpan>1&&Z&&Y[ac]==Z[ac]){ad=Y[ac];ad.rowSpan+=1;}else{ad=new l(Y[ac]).clone();ad.removeAttribute('rowSpan');!g&&ad.appendBogus();ab.append(ad);ad=ad.$;}ac+=ad.colSpan-1;}L?ab.insertBefore(W):ab.insertAfter(W);};function u(K){if(K instanceof h.selection){var L=r(K),M=L[0],N=M.getAscendant('table'),O=i.buildTableMap(N),P=L[0].getParent(),Q=P.$.rowIndex,R=L[L.length-1],S=R.getParent().$.rowIndex+R.$.rowSpan-1,T=[];for(var U=Q;U<=S;U++){var V=O[U],W=new l(N.$.rows[U]);for(var X=0;X<V.length;X++){var Y=new l(V[X]),Z=Y.getParent().$.rowIndex;if(Y.$.rowSpan==1)Y.remove();else{Y.$.rowSpan-=1;if(Z==U){var aa=O[U+1];aa[X-1]?Y.insertAfter(new l(aa[X-1])):new l(N.$.rows[U+1]).append(Y,1);}}X+=Y.$.colSpan-1;}T.push(W);}var ab=N.$.rows,ac=new l(ab[g?S+1:Q]||ab[Q-1]||N.$.parentNode);for(U=T.length;U>=0;U--)u(T[U]);return ac;}else if(K instanceof l){N=K.getAscendant('table');if(N.$.rows.length==1)N.remove();else K.remove();}return null;};function v(K,L){var M=K.getParent(),N=M.$.cells,O=0;for(var P=0;P<N.length;P++){var Q=N[P];O+=L?1:Q.colSpan;if(Q==K.$)break;}return O-1;};function w(K,L){var M=L?Infinity:0;for(var N=0;N<K.length;N++){var O=v(K[N],L);
if(L?O<M:O>M)M=O;}return M;};function x(K,L){var M=r(K),N=M[0],O=N.getAscendant('table'),P=w(M,1),Q=w(M),R=L?P:Q,S=i.buildTableMap(O),T=[],U=[],V=S.length;for(var W=0;W<V;W++){T.push(S[W][R]);var X=L?S[W][R-1]:S[W][R+1];X&&U.push(X);}for(W=0;W<V;W++){var Y;if(T[W].colSpan>1&&U.length&&U[W]==T[W]){Y=T[W];Y.colSpan+=1;}else{Y=new l(T[W]).clone();Y.removeAttribute('colSpan');!g&&Y.appendBogus();Y[L?'insertBefore':'insertAfter'].call(Y,new l(T[W]));Y=Y.$;}W+=Y.rowSpan-1;}};function y(K){var L=r(K),M=L[0],N=L[L.length-1],O=M.getAscendant('table'),P=i.buildTableMap(O),Q,R,S=[];for(var T=0,U=P.length;T<U;T++)for(var V=0,W=P[T].length;V<W;V++){if(P[T][V]==M.$)Q=V;if(P[T][V]==N.$)R=V;}for(T=Q;T<=R;T++)for(V=0;V<P.length;V++){var X=P[V],Y=new l(O.$.rows[V]),Z=new l(X[T]);if(Z.$.colSpan==1)Z.remove();else Z.$.colSpan-=1;V+=Z.$.rowSpan-1;if(!Y.$.cells.length)S.push(Y);}var aa=O.$.rows[0]&&O.$.rows[0].cells,ab=new l(aa[Q]||(Q?aa[Q-1]:O.$.parentNode));if(S.length==U)O.remove();return ab;};function z(K){var L=[],M=K[0]&&K[0].getAscendant('table'),N,O,P,Q;for(N=0,O=K.length;N<O;N++)L.push(K[N].$.cellIndex);L.sort();for(N=1,O=L.length;N<O;N++){if(L[N]-L[N-1]>1){P=L[N-1]+1;break;}}if(!P)P=L[0]>0?L[0]-1:L[L.length-1]+1;var R=M.$.rows;for(N=0,O=R.length;N<O;N++){Q=R[N].cells[P];if(Q)break;}return Q?new l(Q):M.getPrevious();};function A(K,L){var M=K.getStartElement(),N=M.getAscendant('td',1)||M.getAscendant('th',1);if(!N)return;var O=N.clone();if(!g)O.appendBogus();if(L)O.insertBefore(N);else O.insertAfter(N);};function B(K){if(K instanceof h.selection){var L=r(K),M=L[0]&&L[0].getAscendant('table'),N=s(L);for(var O=L.length-1;O>=0;O--)B(L[O]);if(N)D(N,true);else if(M)M.remove();}else if(K instanceof l){var P=K.getParent();if(P.getChildCount()==1)P.remove();else K.remove();}};function C(K){var L=K.getBogus();L&&L.remove();K.trim();};function D(K,L){var M=new h.range(K.getDocument());if(!M['moveToElementEdit'+(L?'End':'Start')](K)){M.selectNodeContents(K);M.collapse(L?false:true);}M.select(true);};function E(K,L,M){var N=K[L];if(typeof M=='undefined')return N;for(var O=0;N&&O<N.length;O++){if(M.is&&N[O]==M.$)return O;else if(O==M)return new l(N[O]);}return M.is?-1:null;};function F(K,L,M){var N=[];for(var O=0;O<K.length;O++){var P=K[O];if(typeof M=='undefined')N.push(P[L]);else if(M.is&&P[L]==M.$)return O;else if(O==M)return new l(P[L]);}return typeof M=='undefined'?N:M.is?-1:null;};function G(K,L,M){var N=r(K),O;if((L?N.length!=1:N.length<2)||(O=K.getCommonAncestor())&&O.type==1&&O.is('table'))return false;
var P,Q=N[0],R=Q.getAscendant('table'),S=i.buildTableMap(R),T=S.length,U=S[0].length,V=Q.getParent().$.rowIndex,W=E(S,V,Q);if(L){var X;try{var Y=parseInt(Q.getAttribute('rowspan'),10)||1,Z=parseInt(Q.getAttribute('colspan'),10)||1;X=S[L=='up'?V-Y:L=='down'?V+Y:V][L=='left'?W-Z:L=='right'?W+Z:W];}catch(ar){return false;}if(!X||Q.$==X)return false;N[L=='up'||L=='left'?'unshift':'push'](new l(X));}var aa=Q.getDocument(),ab=V,ac=0,ad=0,ae=!M&&new h.documentFragment(aa),af=0;for(var ag=0;ag<N.length;ag++){P=N[ag];var ah=P.getParent(),ai=P.getFirst(),aj=P.$.colSpan,ak=P.$.rowSpan,al=ah.$.rowIndex,am=E(S,al,P);af+=aj*ak;ad=Math.max(ad,am-W+aj);ac=Math.max(ac,al-V+ak);if(!M){if(C(P),P.getChildren().count()){if(al!=ab&&ai&&!(ai.isBlockBoundary&&ai.isBlockBoundary({br:1}))){var an=ae.getLast(h.walker.whitespaces(true));if(an&&!(an.is&&an.is('br')))ae.append('br');}P.moveChildren(ae);}ag?P.remove():P.setHtml('');}ab=al;}if(!M){ae.moveChildren(Q);if(!g)Q.appendBogus();if(ad>=U)Q.removeAttribute('rowSpan');else Q.$.rowSpan=ac;if(ac>=T)Q.removeAttribute('colSpan');else Q.$.colSpan=ad;var ao=new h.nodeList(R.$.rows),ap=ao.count();for(ag=ap-1;ag>=0;ag--){var aq=ao.getItem(ag);if(!aq.$.cells.length){aq.remove();ap++;continue;}}return Q;}else return ac*ad==af;};function H(K,L){var M=r(K);if(M.length>1)return false;else if(L)return true;var N=M[0],O=N.getParent(),P=O.getAscendant('table'),Q=i.buildTableMap(P),R=O.$.rowIndex,S=E(Q,R,N),T=N.$.rowSpan,U,V,W,X;if(T>1){V=Math.ceil(T/2);W=Math.floor(T/2);X=R+V;var Y=new l(P.$.rows[X]),Z=E(Q,X),aa;U=N.clone();for(var ab=0;ab<Z.length;ab++){aa=Z[ab];if(aa.parentNode==Y.$&&ab>S){U.insertBefore(new l(aa));break;}else aa=null;}if(!aa)Y.append(U,true);}else{W=V=1;Y=O.clone();Y.insertAfter(O);Y.append(U=N.clone());var ac=E(Q,R);for(var ad=0;ad<ac.length;ad++)ac[ad].rowSpan++;}if(!g)U.appendBogus();N.$.rowSpan=V;U.$.rowSpan=W;if(V==1)N.removeAttribute('rowSpan');if(W==1)U.removeAttribute('rowSpan');return U;};function I(K,L){var M=r(K);if(M.length>1)return false;else if(L)return true;var N=M[0],O=N.getParent(),P=O.getAscendant('table'),Q=i.buildTableMap(P),R=O.$.rowIndex,S=E(Q,R,N),T=N.$.colSpan,U,V,W;if(T>1){V=Math.ceil(T/2);W=Math.floor(T/2);}else{W=V=1;var X=F(Q,S);for(var Y=0;Y<X.length;Y++)X[Y].colSpan++;}U=N.clone();U.insertAfter(N);if(!g)U.appendBogus();N.$.colSpan=V;U.$.colSpan=W;if(V==1)N.removeAttribute('colSpan');if(W==1)U.removeAttribute('colSpan');return U;};var J={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};n.tabletools={init:function(K){var L=K.lang.table;
K.addCommand('cellProperties',new e.dialogCommand('cellProperties'));e.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');K.addCommand('tableDelete',{exec:function(M){var N=M.getSelection(),O=N&&N.getStartElement(),P=O&&O.getAscendant('table',1);if(!P)return;var Q=P.getParent();if(Q.getChildCount()==1&&!Q.is('body','td','th'))P=Q;var R=new h.range(M.document);R.moveToPosition(P,3);P.remove();R.select();}});K.addCommand('rowDelete',{exec:function(M){var N=M.getSelection();D(u(N));}});K.addCommand('rowInsertBefore',{exec:function(M){var N=M.getSelection();t(N,true);}});K.addCommand('rowInsertAfter',{exec:function(M){var N=M.getSelection();t(N);}});K.addCommand('columnDelete',{exec:function(M){var N=M.getSelection(),O=y(N);O&&D(O,true);}});K.addCommand('columnInsertBefore',{exec:function(M){var N=M.getSelection();x(N,true);}});K.addCommand('columnInsertAfter',{exec:function(M){var N=M.getSelection();x(N);}});K.addCommand('cellDelete',{exec:function(M){var N=M.getSelection();B(N);}});K.addCommand('cellMerge',{exec:function(M){D(G(M.getSelection()),true);}});K.addCommand('cellMergeRight',{exec:function(M){D(G(M.getSelection(),'right'),true);}});K.addCommand('cellMergeDown',{exec:function(M){D(G(M.getSelection(),'down'),true);}});K.addCommand('cellVerticalSplit',{exec:function(M){D(H(M.getSelection()));}});K.addCommand('cellHorizontalSplit',{exec:function(M){D(I(M.getSelection()));}});K.addCommand('cellInsertBefore',{exec:function(M){var N=M.getSelection();A(N,true);}});K.addCommand('cellInsertAfter',{exec:function(M){var N=M.getSelection();A(N);}});if(K.addMenuItems)K.addMenuItems({tablecell:{label:L.cell.menu,group:'tablecell',order:1,getItems:function(){var M=K.getSelection(),N=r(M);return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_merge:G(M,null,true)?2:0,tablecell_merge_right:G(M,'right',true)?2:0,tablecell_merge_down:G(M,'down',true)?2:0,tablecell_split_vertical:H(M,true)?2:0,tablecell_split_horizontal:I(M,true)?2:0,tablecell_properties:N.length>0?2:0};}},tablecell_insertBefore:{label:L.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:L.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:L.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_merge:{label:L.cell.merge,group:'tablecell',command:'cellMerge',order:16},tablecell_merge_right:{label:L.cell.mergeRight,group:'tablecell',command:'cellMergeRight',order:17},tablecell_merge_down:{label:L.cell.mergeDown,group:'tablecell',command:'cellMergeDown',order:18},tablecell_split_horizontal:{label:L.cell.splitHorizontal,group:'tablecell',command:'cellHorizontalSplit',order:19},tablecell_split_vertical:{label:L.cell.splitVertical,group:'tablecell',command:'cellVerticalSplit',order:20},tablecell_properties:{label:L.cell.title,group:'tablecellproperties',command:'cellProperties',order:21},tablerow:{label:L.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};
}},tablerow_insertBefore:{label:L.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:L.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:L.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:L.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:L.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:L.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:L.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(K.contextMenu)K.contextMenu.addListener(function(M,N){if(!M||M.isReadOnly())return null;while(M){if(M.getName() in J)return{tablecell:2,tablerow:2,tablecolumn:2};M=M.getParent();}return null;});},getSelectedCells:r};n.add('tabletools',n.tabletools);})();i.buildTableMap=function(q){var r=q.$.rows,s=-1,t=[];for(var u=0;u<r.length;u++){s++;!t[s]&&(t[s]=[]);var v=-1;for(var w=0;w<r[u].cells.length;w++){var x=r[u].cells[w];v++;while(t[s][v])v++;var y=isNaN(x.colSpan)?1:x.colSpan,z=isNaN(x.rowSpan)?1:x.rowSpan;for(var A=0;A<z;A++){if(!t[s+A])t[s+A]=[];for(var B=0;B<y;B++)t[s+A][v+B]=r[u].cells[w];}v+=y-1;}}return t;};(function(){var q={editorFocus:false,modes:{wysiwyg:1,source:1}},r={exec:function(u){u.container.focusNext(true,u.tabIndex);}},s={exec:function(u){u.container.focusPrevious(true,u.tabIndex);}};function t(u){return{editorFocus:false,canUndo:false,modes:{wysiwyg:1},exec:function(v){if(v.focusManager.hasFocus){var w=v.getSelection(),x=w.getCommonAncestor(),y;if(y=x.getAscendant('td',true)||x.getAscendant('th',true)){var z=new h.range(v.document),A=i.tryThese(function(){var H=y.getParent(),I=H.$.cells[y.$.cellIndex+(u?-1:1)];I.parentNode.parentNode;return I;},function(){var H=y.getParent(),I=H.getAscendant('table'),J=I.$.rows[H.$.rowIndex+(u?-1:1)];return J.cells[u?J.cells.length-1:0];});if(!(A||u)){var B=y.getAscendant('table').$,C=y.getParent().$.cells,D=new l(B.insertRow(-1),v.document);for(var E=0,F=C.length;E<F;E++){var G=D.append(new l(C[E],v.document).clone(false,false));!g&&G.appendBogus();}z.moveToElementEditStart(D);}else if(A){A=new l(A);z.moveToElementEditStart(A);if(!(z.checkStartOfBlock()&&z.checkEndOfBlock()))z.selectNodeContents(A);}else return true;z.select(true);return true;
}}return false;}};};n.add('tab',{requires:['keystrokes'],init:function(u){var v=u.config.enableTabKeyTools!==false,w=u.config.tabSpaces||0,x='';while(w--)x+='\xa0';if(x)u.on('key',function(y){if(y.data.keyCode==9){u.insertHtml(x);y.cancel();}});if(v)u.on('key',function(y){if(y.data.keyCode==9&&u.execCommand('selectNextCell')||y.data.keyCode==2000+9&&u.execCommand('selectPreviousCell'))y.cancel();});if(f.webkit||f.gecko)u.on('key',function(y){var z=y.data.keyCode;if(z==9&&!x){y.cancel();u.execCommand('blur');}if(z==2000+9){u.execCommand('blurBack');y.cancel();}});u.addCommand('blur',i.extend(r,q));u.addCommand('blurBack',i.extend(s,q));u.addCommand('selectNextCell',t());u.addCommand('selectPreviousCell',t(true));}});})();l.prototype.focusNext=function(q,r){var A=this;var s=A.$,t=r===undefined?A.getTabIndex():r,u,v,w,x,y,z;if(t<=0){y=A.getNextSourceNode(q,1);while(y){if(y.isVisible()&&y.getTabIndex()===0){w=y;break;}y=y.getNextSourceNode(false,1);}}else{y=A.getDocument().getBody().getFirst();while(y=y.getNextSourceNode(false,1)){if(!u)if(!v&&y.equals(A)){v=true;if(q){if(!(y=y.getNextSourceNode(true,1)))break;u=1;}}else if(v&&!A.contains(y))u=1;if(!y.isVisible()||(z=y.getTabIndex())<0)continue;if(u&&z==t){w=y;break;}if(z>t&&(!w||!x||z<x)){w=y;x=z;}else if(!w&&z===0){w=y;x=z;}}}if(w)w.focus();};l.prototype.focusPrevious=function(q,r){var A=this;var s=A.$,t=r===undefined?A.getTabIndex():r,u,v,w,x=0,y,z=A.getDocument().getBody().getLast();while(z=z.getPreviousSourceNode(false,1)){if(!u)if(!v&&z.equals(A)){v=true;if(q){if(!(z=z.getPreviousSourceNode(true,1)))break;u=1;}}else if(v&&!A.contains(z))u=1;if(!z.isVisible()||(y=z.getTabIndex())<0)continue;if(t<=0){if(u&&y===0){w=z;break;}if(y>x){w=z;x=y;}}else{if(u&&y==t){w=z;break;}if(y<t&&(!w||y>x)){w=z;x=y;}}}if(w)w.focus();};(function(){n.add('templates',{requires:['dialog'],init:function(s){e.dialog.add('templates',e.getUrl(this.path+'dialogs/templates.js'));s.addCommand('templates',new e.dialogCommand('templates'));s.ui.addButton('Templates',{label:s.lang.templates.button,command:'templates'});}});var q={},r={};e.addTemplates=function(s,t){q[s]=t;};e.getTemplates=function(s){return q[s];};e.loadTemplates=function(s,t){var u=[];for(var v=0,w=s.length;v<w;v++){if(!r[s[v]]){u.push(s[v]);r[s[v]]=1;}}if(u.length)e.scriptLoader.load(u,t);else setTimeout(t,0);};})();m.templates_files=[e.getUrl('plugins/templates/templates/default.js')];m.templates_replaceContent=true;(function(){var q=function(){this.toolbars=[];this.focusCommandExecuted=false;
};q.prototype.focus=function(){for(var s=0,t;t=this.toolbars[s++];)for(var u=0,v;v=t.items[u++];){if(v.focus){v.focus();return;}}};var r={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(s){if(s.toolbox){s.toolbox.focusCommandExecuted=true;if(g||f.air)setTimeout(function(){s.toolbox.focus();},100);else s.toolbox.focus();}}}};n.add('toolbar',{init:function(s){var t=function(u,v){var w,x,y,z=s.lang.dir=='rtl';switch(v){case z?37:39:case 9:do{w=u.next;if(!w){x=u.toolbar.next;y=x&&x.items.length;while(y===0){x=x.next;y=x&&x.items.length;}if(x)w=x.items[0];}u=w;}while(u&&!u.focus);if(u)u.focus();else s.toolbox.focus();return false;case z?39:37:case 2000+9:do{w=u.previous;if(!w){x=u.toolbar.previous;y=x&&x.items.length;while(y===0){x=x.previous;y=x&&x.items.length;}if(x)w=x.items[y-1];}u=w;}while(u&&!u.focus);if(u)u.focus();else{var A=s.toolbox.toolbars[s.toolbox.toolbars.length-1].items;A[A.length-1].focus();}return false;case 27:s.focus();return false;case 13:case 32:u.execute();return false;}return true;};s.on('themeSpace',function(u){if(u.data.space==s.config.toolbarLocation){s.toolbox=new q();var v=i.getNextId(),w=['<div class="cke_toolbox" role="toolbar" aria-labelledby="',v,'" onmousedown="return false;"'],x=s.config.toolbarStartupExpanded!==false,y;w.push(x?'>':' style="display:none">');w.push('<span id="',v,'" class="cke_voice_label">',s.lang.toolbar,'</span>');var z=s.toolbox.toolbars,A=s.config.toolbar instanceof Array?s.config.toolbar:s.config['toolbar_'+s.config.toolbar];for(var B=0;B<A.length;B++){var C=A[B];if(!C)continue;var D=i.getNextId(),E={id:D,items:[]};if(y){w.push('</div>');y=0;}if(C==='/'){w.push('<div class="cke_break"></div>');continue;}w.push('<span id="',D,'" class="cke_toolbar" role="presentation"><span class="cke_toolbar_start"></span>');var F=z.push(E)-1;if(F>0){E.previous=z[F-1];E.previous.next=E;}for(var G=0;G<C.length;G++){var H,I=C[G];if(I=='-')H=o.separator;else H=s.ui.create(I);if(H){if(H.canGroup){if(!y){w.push('<span class="cke_toolgroup" role="presentation">');y=1;}}else if(y){w.push('</span>');y=0;}var J=H.render(s,w);F=E.items.push(J)-1;if(F>0){J.previous=E.items[F-1];J.previous.next=J;}J.toolbar=E;J.onkey=t;J.onfocus=function(){if(!s.toolbox.focusCommandExecuted)s.focus();};}}if(y){w.push('</span>');y=0;}w.push('<span class="cke_toolbar_end"></span></span>');}w.push('</div>');if(s.config.toolbarCanCollapse){var K=i.addFunction(function(){s.execCommand('toolbarCollapse');});s.on('destroy',function(){i.removeFunction(K);
});var L=i.getNextId();s.addCommand('toolbarCollapse',{exec:function(M){var N=e.document.getById(L),O=N.getPrevious(),P=M.getThemeSpace('contents'),Q=O.getParent(),R=parseInt(P.$.style.height,10),S=Q.$.offsetHeight,T=!O.isVisible();if(!T){O.hide();N.addClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarExpand);}else{O.show();N.removeClass('cke_toolbox_collapser_min');N.setAttribute('title',M.lang.toolbarCollapse);}N.getFirst().setText(T?'▲':'◀');var U=Q.$.offsetHeight-S;P.setStyle('height',R-U+'px');M.fire('resize');},modes:{wysiwyg:1,source:1}});w.push('<a title="'+(x?s.lang.toolbarCollapse:s.lang.toolbarExpand)+'" id="'+L+'" tabIndex="-1" class="cke_toolbox_collapser');if(!x)w.push(' cke_toolbox_collapser_min');w.push('" onclick="CKEDITOR.tools.callFunction('+K+')">','<span>&#9650;</span>','</a>');}u.data.html+=w.join('');}});s.on('destroy',function(){var u,v=0,w,x,y;u=this.toolbox.toolbars;for(;v<u.length;v++){x=u[v].items;for(w=0;w<x.length;w++){y=x[w];if(y.clickFn)i.removeFunction(y.clickFn);if(y.keyDownFn)i.removeFunction(y.keyDownFn);if(y.index)o.button._.instances[y.index]=null;}}});s.addCommand('toolbarFocus',r.toolbarFocus);}});})();o.separator={render:function(q,r){r.push('<span class="cke_separator" role="separator"></span>');return{};}};m.toolbarLocation='top';m.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];m.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'],['BidiLtr','BidiRtl'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];m.toolbar='Full';m.toolbarCanCollapse=true;(function(){var q={table:1,pre:1},r=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,s=h.walker.whitespaces(true);function t(H){return H.getName() in q||H.isBlockBoundary()&&j.$empty[H.getName()];
};function u(H){return function(I){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');H.call(this,I.data);i.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};};function v(H){var N=this;if(N.dataProcessor)H=N.dataProcessor.toHtml(H);var I=N.getSelection(),J=I.getRanges()[0];if(J.checkReadOnly())return;if(g){var K=I.isLocked;if(K)I.unlock();var L=I.getNative();if(L.type=='Control')L.clear();else if(I.getType()==2){J=I.getRanges()[0];var M=J&&J.endContainer;if(M&&M.type==1&&M.getAttribute('contenteditable')=='false'&&J.checkBoundaryOfElement(M,2)){J.setEndAfter(J.endContainer);J.deleteContents();}}try{L.createRange().pasteHTML(H);}catch(O){}if(K)N.getSelection().lock();}else if(H)N.document.$.execCommand('inserthtml',false,H);if(f.webkit){I=N.getSelection();I.scrollIntoView();}};function w(H){var I=this.getSelection(),J=I.getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,K=J==2,L=i.htmlEncode(H.replace(/\r\n|\r/g,'\n'));L=L.replace(/^[ \t]+|[ \t]+$/g,function(R,S,T){if(R.length==1)return '&nbsp;';else if(!S)return i.repeat('&nbsp;',R.length-1)+' ';else return ' '+i.repeat('&nbsp;',R.length-1);});L=L.replace(/[ \t]{2,}/g,function(R){return i.repeat('&nbsp;',R.length-1)+' ';});var M=J==1?'p':'div';if(!K)L=L.replace(/(\n{2})([\s\S]*?)(?:$|\1)/g,function(R,S,T){return '<'+M+'>'+T+'</'+M+'>';});L=L.replace(/\n/g,'<br>');if(!(K||g))L=L.replace(new RegExp('<br>(?=</'+M+'>)'),function(R){return i.repeat(R,2);});if(f.gecko||f.webkit){var N=new h.elementPath(I.getStartElement()),O=[];for(var P=0;P<N.elements.length;P++){var Q=N.elements[P].getName();if(Q in j.$inline)O.unshift(N.elements[P].getOuterHtml().match(/^<.*?>/));else if(Q in j.$block)break;}L=O.join('')+L;}v.call(this,L);};function x(H){var I=this.getSelection(),J=I.getRanges(),K=H.getName(),L=j.$block[K],M=I.isLocked;if(M)I.unlock();var N,O,P,Q;for(var R=J.length-1;R>=0;R--){N=J[R];if(!N.checkReadOnly()){N.deleteContents(1);O=!R&&H||H.clone(1);var S,T;if(L)while((S=N.getCommonAncestor(0,1))&&(T=j[S.getName()])&&!(T&&T[K])){if(S.getName() in j.span)N.splitElement(S);else if(N.checkStartOfBlock()&&N.checkEndOfBlock()){N.setStartBefore(S);N.collapse(true);S.remove();}else N.splitBlock();}N.insertNode(O);if(!P)P=O;}}if(P){N.moveToPosition(P,4);if(L){var U=P.getNext(s),V=U&&U.type==1&&U.getName();if(V&&j.$block[V]&&j[V]['#'])N.moveToElementEditStart(U);}}I.selectRanges([N]);if(M)this.getSelection().lock();};function y(H){if(!H.checkDirty())setTimeout(function(){H.resetDirty();
},0);};var z=h.walker.whitespaces(true),A=h.walker.bookmark(false,true);function B(H){return z(H)&&A(H);};function C(H){return H.type==3&&i.trim(H.getText()).match(/^(?:&nbsp;|\xa0)$/);};function D(H){if(H.isLocked){H.unlock();setTimeout(function(){H.lock();},0);}};function E(H){return H.getOuterHtml().match(r);};z=h.walker.whitespaces(true);function F(H){var I=H.window,J=H.document,K=H.document.getBody(),L=K.getFirst(),M=K.getChildren().count();if(!M||M==1&&L.type==1&&L.hasAttribute('_moz_editor_bogus_node')){y(H);var N=H.element.getDocument(),O=N.getDocumentElement(),P=O.$.scrollTop,Q=O.$.scrollLeft,R=J.$.createEvent('KeyEvents');R.initKeyEvent('keypress',true,true,I.$,false,false,false,false,0,32);J.$.dispatchEvent(R);if(P!=O.$.scrollTop||Q!=O.$.scrollLeft)N.getWindow().$.scrollTo(Q,P);M&&K.getFirst().remove();J.getBody().appendBogus();var S=new h.range(J);S.setStartAt(K,1);S.select();}};function G(H){var I=H.editor,J=H.data.path,K=J.blockLimit,L=H.data.selection,M=L.getRanges()[0],N=I.document.getBody(),O=I.config.enterMode;if(f.gecko){F(I);var P=J.block||J.blockLimit,Q=P&&P.getLast(B);if(P&&!(Q&&Q.type==1&&Q.isBlockBoundary())&&!P.is('pre')&&!P.getBogus()){I.fire('updateSnapshot');y(I);P.appendBogus();}}if(O!=2&&M.collapsed&&K.getName()=='body'&&!J.block){I.fire('updateSnapshot');y(I);g&&D(L);var R=M.fixBlock(true,I.config.enterMode==3?'div':'p');if(g){var S=R.getFirst(B);S&&C(S)&&S.remove();}if(E(R)){var T=R.getNext(z);if(T&&T.type==1&&!t(T)){M.moveToElementEditStart(T);R.remove();}else{T=R.getPrevious(z);if(T&&T.type==1&&!t(T)){M.moveToElementEditEnd(T);R.remove();}}}M.select();H.cancel();}var U=new h.range(I.document),V=new h.walker(U);U.selectNodeContents(N);V.evaluator=function(X){return X.type==1&&X.getName() in q;};V.guard=function(X,Y){return!(X.type==3&&z(X)||Y);};if(V.previous()){I.fire('updateSnapshot');y(I);g&&D(L);var W;if(O!=2)W=N.append(new l(O==1?'p':'div'));else W=N;if(!g)W.appendBogus();}};n.add('wysiwygarea',{requires:['editingblock'],init:function(H){var I=H.config.enterMode!=2?H.config.enterMode==3?'div':'p':false,J=H.lang.editorTitle.replace('%1',H.name),K;H.on('editingBlockReady',function(){var Q,R,S,T,U,V,W=f.isCustomDomain(),X=function(aa){if(R)R.remove();var ab='document.open();'+(W?'document.domain="'+document.domain+'";':'')+'document.close();';ab=f.air?'javascript:void(0)':g?'javascript:void(function(){'+encodeURIComponent(ab)+'}())':'';R=l.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" title="'+J+'"'+' src="'+ab+'"'+' tabIndex="'+(f.webkit?-1:H.tabIndex)+'"'+' allowTransparency="true"'+'></iframe>');
if(document.location.protocol=='chrome:')e.event.useCapture=true;R.on('load',function(af){U=1;af.removeListener();var ag=R.getFrameDocument();ag.write(aa);f.air&&Z(ag.getWindow().$);});if(document.location.protocol=='chrome:')e.event.useCapture=false;var ac=H.element,ad=f.gecko&&!ac.isVisible(),ae={};if(ad){ac.show();ae={position:ac.getStyle('position'),top:ac.getStyle('top')};ac.setStyles({position:'absolute',top:'-3000px'});}Q.append(R);if(ad)setTimeout(function(){ac.hide();ac.setStyles(ae);},1000);};K=i.addFunction(Z);var Y='<script id="cke_actscrpt" type="text/javascript" data-cke-temp="1">'+(W?'document.domain="'+document.domain+'";':'')+'window.parent.CKEDITOR.tools.callFunction( '+K+', window );'+'</script>';function Z(aa){if(!U)return;U=0;H.fire('ariaWidget',R);var ab=aa.document,ac=ab.body,ad=ab.getElementById('cke_actscrpt');ad&&ad.parentNode.removeChild(ad);ac.spellcheck=!H.config.disableNativeSpellChecker;if(g){ac.hideFocus=true;ac.disabled=true;ac.contentEditable=true;ac.removeAttribute('disabled');}else setTimeout(function(){if(f.gecko&&f.version>=10900||f.opera)ab.$.body.contentEditable=true;else if(f.webkit)ab.$.body.parentNode.contentEditable=true;else ab.$.designMode='on';},0);f.gecko&&i.setTimeout(F,0,null,H);aa=H.window=new h.window(aa);ab=H.document=new k(ab);ab.on('dblclick',function(aj){var ak=aj.data.getTarget(),al={element:ak,dialog:''};H.fire('doubleclick',al);al.dialog&&H.openDialog(al.dialog);});g&&ab.on('click',function(aj){var ak=aj.data.getTarget();if(ak.is('input')){var al=ak.getAttribute('type');if(al=='submit'||al=='reset')aj.data.preventDefault();}});if(!(g||f.opera))ab.on('mousedown',function(aj){var ak=aj.data.getTarget();if(ak.is('img','hr','input','textarea','select'))H.getSelection().selectElement(ak);});if(f.gecko)ab.on('mouseup',function(aj){if(aj.data.$.button==2){var ak=aj.data.getTarget();if(!ak.getOuterHtml().replace(r,'')){var al=new h.range(ab);al.moveToElementEditStart(ak);al.select(true);}}});ab.on('click',function(aj){aj=aj.data;if(aj.getTarget().is('a')&&aj.$.button!=2)aj.preventDefault();});if(f.webkit){ab.on('mousedown',function(){ag=1;});ab.on('click',function(aj){if(aj.data.getTarget().is('input','select'))aj.data.preventDefault();});ab.on('mouseup',function(aj){if(aj.data.getTarget().is('input','textarea'))aj.data.preventDefault();});}if(g&&ab.$.compatMode=='CSS1Compat'||f.gecko||f.opera){var ae=ab.getDocumentElement();ae.on('mousedown',function(aj){if(aj.data.getTarget().equals(ae)){if(f.gecko&&f.version>=10900)O();
P.focus();}});}var af=g?R:aa;af.on('blur',function(){H.focusManager.blur();});var ag;af.on('focus',function(){var aj=H.document;if(f.gecko&&f.version>=10900)O();else if(f.opera)aj.getBody().focus();else if(f.webkit)if(!ag){H.document.getDocumentElement().focus();ag=1;}H.focusManager.focus();});var ah=H.keystrokeHandler;if(ah)ah.attach(ab);if(g){ab.getDocumentElement().addClass(ab.$.compatMode);ab.on('keydown',function(aj){var ak=aj.data.getKeystroke();if(ak in {8:1,46:1}){var al=H.getSelection(),am=al.getSelectedElement();if(am){H.fire('saveSnapshot');var an=al.getRanges()[0].createBookmark();am.remove();al.selectBookmarks([an]);H.fire('saveSnapshot');aj.data.preventDefault();}}});if(ab.$.compatMode=='CSS1Compat'){var ai={33:1,34:1};ab.on('keydown',function(aj){if(aj.data.getKeystroke() in ai)setTimeout(function(){H.getSelection().scrollIntoView();},0);});}H.config.enterMode!=1&&ab.on('selectionchange',function(){if(ab.getBody()&&H.getSelection()&&H.getSelection().getRanges()){var aj=ab.getBody();range=H.getSelection().getRanges()[0];}else return;if(aj.getHtml().match(/^<p>&nbsp;<\/p>$/i)&&range.startContainer.equals(aj))setTimeout(function(){if(H.getSelection()&&H.getSelection().getRanges()){range=H.getSelection().getRanges()[0];if(!range.startContainer.equals('body')){aj.getFirst().remove(1);range.moveToElementEditEnd(aj);range.select(1);}}},0);});}if(H.contextMenu)H.contextMenu.addTarget(ab,H.config.browserContextMenuOnCtrl!==false);setTimeout(function(){H.fire('contentDom');if(V){H.mode='wysiwyg';H.fire('mode');V=false;}S=false;if(T){H.focus();T=false;}setTimeout(function(){H.fire('dataReady');},0);try{H.document.$.execCommand('enableInlineTableEditing',false,!H.config.disableNativeTableHandles);}catch(aj){}if(H.config.disableObjectResizing)try{H.document.$.execCommand('enableObjectResizing',false,false);}catch(ak){H.document.getBody().on(g?'resizestart':'resize',function(al){al.data.preventDefault();});}if(g)setTimeout(function(){if(H.document){var al=H.document.$.body;al.runtimeStyle.marginBottom='0px';al.runtimeStyle.marginBottom='';}},1000);},0);};H.addMode('wysiwyg',{load:function(aa,ab,ac){Q=aa;if(g&&f.quirks)aa.setStyle('position','relative');H.mayBeDirty=true;V=true;if(ac)this.loadSnapshotData(ab);else this.loadData(ab);},loadData:function(aa){S=true;H._.dataStore={id:1};var ab=H.config,ac=ab.fullPage,ad=ab.docType,ae='<style type="text/css" data-cke-temp="1">'+H._.styles.join('\n')+'</style>';!ac&&(ae=i.buildStyleHtml(H.config.contentsCss)+ae);
var af=ab.baseHref?'<base href="'+ab.baseHref+'" data-cke-temp="1" />':'';if(ac)aa=aa.replace(/<!DOCTYPE[^>]*>/i,function(ag){H.docType=ad=ag;return '';});if(H.dataProcessor)aa=H.dataProcessor.toHtml(aa,I);if(ac){if(!/<body[\s|>]/.test(aa))aa='<body>'+aa;if(!/<html[\s|>]/.test(aa))aa='<html>'+aa+'</html>';if(!/<head[\s|>]/.test(aa))aa=aa.replace(/<html[^>]*>/,'$&<head><title></title></head>');else if(!/<title[\s|>]/.test(aa))aa=aa.replace(/<head[^>]*>/,'$&<title></title>');af&&(aa=aa.replace(/<head>/,'$&'+af));aa=aa.replace(/<\/head\s*>/,ae+'$&');aa=ad+aa;}else aa=ab.docType+'<html dir="'+ab.contentsLangDirection+'"'+' lang="'+(ab.contentsLanguage||H.langCode)+'">'+'<head>'+'<title>'+J+'</title>'+af+ae+'</head>'+'<body'+(ab.bodyId?' id="'+ab.bodyId+'"':'')+(ab.bodyClass?' class="'+ab.bodyClass+'"':'')+'>'+aa+'</html>';if(f.gecko)aa=aa.replace(/<br \/>(?=\s*<\/(:?html|body)>)/,'$&<br type="_moz" />');aa+=Y;this.onDispose();X(aa);},getData:function(){var aa=H.config,ab=aa.fullPage,ac=ab&&H.docType,ad=R.getFrameDocument(),ae=ab?ad.getDocumentElement().getOuterHtml():ad.getBody().getHtml();if(f.gecko)ae=ae.replace(/<br>(?=\s*(:?$|<\/body>))/,'');if(H.dataProcessor)ae=H.dataProcessor.toDataFormat(ae,I);if(aa.ignoreEmptyParagraph)ae=ae.replace(r,function(af,ag){return ag;});if(ac)ae=ac+'\n'+ae;return ae;},getSnapshotData:function(){return R.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(aa){R.getFrameDocument().getBody().setHtml(aa);},onDispose:function(){if(!H.document)return;H.document.getDocumentElement().clearCustomData();H.document.getBody().clearCustomData();H.window.clearCustomData();H.document.clearCustomData();R.clearCustomData();R.remove();},unload:function(aa){this.onDispose();H.window=H.document=R=Q=T=null;H.fire('contentDomUnload');},focus:function(){var aa=H.window;if(S)T=true;else if(f.opera&&H.document){var ab=H.window.$.frameElement;ab.blur(),ab.focus();H.document.getBody().focus();H.selectionChange();}else if(!f.opera&&aa){f.air?setTimeout(function(){aa.focus();},0):aa.focus();H.selectionChange();}}});H.on('insertHtml',u(v),null,null,20);H.on('insertElement',u(x),null,null,20);H.on('insertText',u(w),null,null,20);H.on('selectionChange',G,null,null,1);});var L;H.on('contentDom',function(){var Q=H.document.getElementsByTag('title').getItem(0);Q.data('cke-title',H.document.$.title);H.document.$.title=J;});if(e.document.$.documentMode>=8){H.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var M=[];for(var N in j.$removeEmpty)M.push('html.CSS1Compat '+N+'[contenteditable=false]');
H.addCss(M.join(',')+'{ display:inline-block;}');}else if(f.gecko)H.addCss('html { height: 100% !important; }');function O(Q){i.tryThese(function(){H.document.$.designMode='on';setTimeout(function(){H.document.$.designMode='off';if(e.currentInstance==H)H.document.getBody().focus();},50);},function(){H.document.$.designMode='off';var R=H.document.getBody();R.setAttribute('contentEditable',false);R.setAttribute('contentEditable',true);!Q&&O(1);});};if(f.gecko||g||f.opera){var P;H.on('uiReady',function(){P=H.container.append(l.createFromHtml('<span tabindex="-1" style="position:absolute;" role="presentation"></span>'));P.on('focus',function(){H.focus();});H.focusGrabber=P;});H.on('destroy',function(){i.removeFunction(K);P.clearCustomData();delete H.focusGrabber;});}H.on('insertElement',function(Q){var R=Q.data;if(R.type==1&&(R.is('input')||R.is('textarea'))){if(!R.isReadOnly())R.data('cke-editable',R.hasAttribute('contenteditable')?'true':'1');R.setAttribute('contentEditable',false);}});}});if(f.gecko)(function(){var H=document.body;if(!H)window.addEventListener('load',arguments.callee,false);else{var I=H.getAttribute('onpageshow');H.setAttribute('onpageshow',(I?I+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();');}})();})();m.disableObjectResizing=false;m.disableNativeTableHandles=true;m.disableNativeSpellChecker=true;m.ignoreEmptyParagraph=true;n.add('wsc',{requires:['dialog'],init:function(q){var r='checkspell',s=q.addCommand(r,new e.dialogCommand(r));s.modes={wysiwyg:!f.opera&&!f.air&&document.domain==window.location.hostname};q.ui.addButton('SpellChecker',{label:q.lang.spellCheck.toolbar,command:r});e.dialog.add(r,this.path+'dialogs/wsc.js');}});m.wsc_customerId=m.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';m.wsc_customLoaderScript=m.wsc_customLoaderScript||null;e.DIALOG_RESIZE_NONE=0;e.DIALOG_RESIZE_WIDTH=1;e.DIALOG_RESIZE_HEIGHT=2;e.DIALOG_RESIZE_BOTH=3;(function(){var q=i.cssLength;function r(T){return!!this._.tabs[T][0].$.offsetHeight;};function s(){var X=this;var T=X._.currentTabId,U=X._.tabIdList.length,V=i.indexOf(X._.tabIdList,T)+U;for(var W=V-1;W>V-U;W--){if(r.call(X,X._.tabIdList[W%U]))return X._.tabIdList[W%U];}return null;};function t(){var X=this;var T=X._.currentTabId,U=X._.tabIdList.length,V=i.indexOf(X._.tabIdList,T);
for(var W=V+1;W<V+U;W++){if(r.call(X,X._.tabIdList[W%U]))return X._.tabIdList[W%U];}return null;};function u(T,U){var V=T.$.getElementsByTagName('input');for(var W=0,X=V.length;W<X;W++){var Y=new l(V[W]);if(Y.getAttribute('type').toLowerCase()=='text')if(U){Y.setAttribute('value',Y.getCustomData('fake_value')||'');Y.removeCustomData('fake_value');}else{Y.setCustomData('fake_value',Y.getAttribute('value'));Y.setAttribute('value','');}}};e.dialog=function(T,U){var V=e.dialog._.dialogDefinitions[U],W=i.clone(w),X=T.config.dialog_buttonsOrder||'OS',Y=T.lang.dir;if(X=='OS'&&f.mac||X=='rtl'&&Y=='ltr'||X=='ltr'&&Y=='rtl')W.buttons.reverse();V=i.extend(V(T),W);V=i.clone(V);V=new A(this,V);var Z=e.document,aa=T.theme.buildDialog(T);this._={editor:T,element:aa.element,name:U,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:false,focusList:[],currentFocusIndex:0,hasFocus:false};this.parts=aa.parts;i.setTimeout(function(){T.fire('ariaWidget',this.parts.contents);},0,this);var ab={position:f.ie6Compat?'absolute':'fixed',top:0,visibility:'hidden'};ab[Y=='rtl'?'right':'left']=0;this.parts.dialog.setStyles(ab);e.event.call(this);this.definition=V=e.fire('dialogDefinition',{name:U,definition:V},T).definition;var ac={};if(!('removeDialogTabs' in T._)&&T.config.removeDialogTabs){var ad=T.config.removeDialogTabs.split(';');for(i=0;i<ad.length;i++){var ae=ad[i].split(':');if(ae.length==2){var af=ae[0];if(!ac[af])ac[af]=[];ac[af].push(ae[1]);}}T._.removeDialogTabs=ac;}if(T._.removeDialogTabs&&(ac=T._.removeDialogTabs[U]))for(i=0;i<ac.length;i++)V.removeContents(ac[i]);if(V.onLoad)this.on('load',V.onLoad);if(V.onShow)this.on('show',V.onShow);if(V.onHide)this.on('hide',V.onHide);if(V.onOk)this.on('ok',function(as){T.fire('saveSnapshot');setTimeout(function(){T.fire('saveSnapshot');},0);if(V.onOk.call(this,as)===false)as.data.hide=false;});if(V.onCancel)this.on('cancel',function(as){if(V.onCancel.call(this,as)===false)as.data.hide=false;});var ag=this,ah=function(as){var at=ag._.contents,au=false;for(var av in at)for(var aw in at[av]){au=as.call(this,at[av][aw]);if(au)return;}};this.on('ok',function(as){ah(function(at){if(at.validate){var au=at.validate(this);if(typeof au=='string'){alert(au);au=false;}if(au===false){if(at.select)at.select();else at.focus();as.data.hide=false;as.stop();return true;}}});},this,null,0);this.on('cancel',function(as){ah(function(at){if(at.isChanged()){if(!confirm(T.lang.common.confirmCancel))as.data.hide=false;
return true;}});},this,null,0);this.parts.close.on('click',function(as){if(this.fire('cancel',{hide:true}).hide!==false)this.hide();as.data.preventDefault();},this);function ai(){var as=ag._.focusList;as.sort(function(av,aw){if(av.tabIndex!=aw.tabIndex)return aw.tabIndex-av.tabIndex;else return av.focusIndex-aw.focusIndex;});var at=as.length;for(var au=0;au<at;au++)as[au].focusIndex=au;};function aj(as){var at=ag._.focusList,au=as?1:-1;if(at.length<1)return;var av=ag._.currentFocusIndex;try{at[av].getInputElement().$.blur();}catch(ay){}var aw=(av+au+at.length)%at.length,ax=aw;while(!at[ax].isFocusable()){ax=(ax+au+at.length)%at.length;if(ax==aw)break;}at[ax].focus();if(at[ax].type=='text')at[ax].select();};this.changeFocus=aj;var ak;function al(as){var ax=this;if(ag!=e.dialog._.currentTop)return;var at=as.data.getKeystroke(),au=T.lang.dir=='rtl';ak=0;if(at==9||at==2000+9){var av=at==2000+9;if(ag._.tabBarMode){var aw=av?s.call(ag):t.call(ag);ag.selectPage(aw);ag._.tabs[aw][0].focus();}else aj(!av);ak=1;}else if(at==4000+121&&!ag._.tabBarMode&&ag.getPageCount()>1){ag._.tabBarMode=true;ag._.tabs[ag._.currentTabId][0].focus();ak=1;}else if((at==37||at==39)&&ag._.tabBarMode){aw=at==(au?39:37)?s.call(ag):t.call(ag);ag.selectPage(aw);ag._.tabs[aw][0].focus();ak=1;}else if((at==13||at==32)&&ag._.tabBarMode){ax.selectPage(ax._.currentTabId);ax._.tabBarMode=false;ax._.currentFocusIndex=-1;aj(true);ak=1;}if(ak){as.stop();as.data.preventDefault();}};function am(as){ak&&as.data.preventDefault();};var an=this._.element;this.on('show',function(){an.on('keydown',al,this,null,0);if(f.opera||f.gecko&&f.mac)an.on('keypress',am,this);});this.on('hide',function(){an.removeListener('keydown',al);if(f.opera||f.gecko&&f.mac)an.removeListener('keypress',am);});this.on('iframeAdded',function(as){var at=new k(as.data.iframe.$.contentWindow.document);at.on('keydown',al,this,null,0);});this.on('show',function(){var aw=this;ai();if(T.config.dialog_startupFocusTab&&ag._.pageCount>1){ag._.tabBarMode=true;ag._.tabs[ag._.currentTabId][0].focus();}else if(!aw._.hasFocus){aw._.currentFocusIndex=-1;if(V.onFocus){var as=V.onFocus.call(aw);as&&as.focus();}else aj(true);if(aw._.editor.mode=='wysiwyg'&&g){var at=T.document.$.selection,au=at.createRange();if(au)if(au.parentElement&&au.parentElement().ownerDocument==T.document.$||au.item&&au.item(0).ownerDocument==T.document.$){var av=document.body.createTextRange();av.moveToElementText(aw.getElement().getFirst().$);av.collapse(true);av.select();}}}},this,null,4294967295);
if(f.ie6Compat)this.on('load',function(as){var at=this.getElement(),au=at.getFirst();au.remove();au.appendTo(at);},this);C(this);D(this);new h.text(V.title,e.document).appendTo(this.parts.title);for(var ao=0;ao<V.contents.length;ao++){var ap=V.contents[ao];ap&&this.addPage(ap);}this.parts.tabs.on('click',function(as){var av=this;var at=as.data.getTarget();if(at.hasClass('cke_dialog_tab')){var au=at.$.id;av.selectPage(au.substring(4,au.lastIndexOf('_')));if(av._.tabBarMode){av._.tabBarMode=false;av._.currentFocusIndex=-1;aj(true);}as.data.preventDefault();}},this);var aq=[],ar=e.dialog._.uiElementBuilders.hbox.build(this,{type:'hbox',className:'cke_dialog_footer_buttons',widths:[],children:V.buttons},aq).getChild();this.parts.footer.setHtml(aq.join(''));for(ao=0;ao<ar.length;ao++)this._.buttons[ar[ao].id]=ar[ao];};function v(T,U,V){this.element=U;this.focusIndex=V;this.tabIndex=0;this.isFocusable=function(){return!U.getAttribute('disabled')&&U.isVisible();};this.focus=function(){T._.currentFocusIndex=this.focusIndex;this.element.focus();};U.on('keydown',function(W){if(W.data.getKeystroke() in {32:1,13:1})this.fire('click');});U.on('focus',function(){this.fire('mouseover');});U.on('blur',function(){this.fire('mouseout');});};e.dialog.prototype={destroy:function(){this.hide();this._.element.remove();},resize:(function(){return function(T,U){var V=this;if(V._.contentSize&&V._.contentSize.width==T&&V._.contentSize.height==U)return;e.dialog.fire('resize',{dialog:V,skin:V._.editor.skinName,width:T,height:U},V._.editor);V.fire('resize',{skin:V._.editor.skinName,width:T,height:U},V._.editor);if(V._.editor.lang.dir=='rtl'&&V._.position)V._.position.x=e.document.getWindow().getViewPaneSize().width-V._.contentSize.width-parseInt(V._.element.getFirst().getStyle('right'),10);V._.contentSize={width:T,height:U};};})(),getSize:function(){var T=this._.element.getFirst();return{width:T.$.offsetWidth||0,height:T.$.offsetHeight||0};},move:(function(){var T;return function(U,V,W){var ad=this;var X=ad._.element.getFirst(),Y=ad._.editor.lang.dir=='rtl';if(T===undefined)T=X.getComputedStyle('position')=='fixed';if(T&&ad._.position&&ad._.position.x==U&&ad._.position.y==V)return;ad._.position={x:U,y:V};if(!T){var Z=e.document.getWindow().getScrollPosition();U+=Z.x;V+=Z.y;}if(Y){var aa=ad.getSize(),ab=e.document.getWindow().getViewPaneSize();U=ab.width-aa.width-U;}var ac={top:(V>0?V:0)+'px'};ac[Y?'right':'left']=(U>0?U:0)+'px';X.setStyles(ac);W&&(ad._.moved=1);};})(),getPosition:function(){return i.extend({},this._.position);
},show:function(){var T=this._.element,U=this.definition;if(!(T.getParent()&&T.getParent().equals(e.document.getBody())))T.appendTo(e.document.getBody());else T.setStyle('display','block');if(f.gecko&&f.version<10900){var V=this.parts.dialog;V.setStyle('position','absolute');setTimeout(function(){V.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||U.width||U.minWidth,this._.contentSize&&this._.contentSize.height||U.height||U.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(e.dialog._.currentZIndex===null)e.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',e.dialog._.currentZIndex+=10);if(e.dialog._.currentTop===null){e.dialog._.currentTop=this;this._.parentDialog=null;H(this._.editor);T.on('keydown',L);T.on(f.opera?'keypress':'keyup',M);for(var W in {keyup:1,keydown:1,keypress:1})T.on(W,S);}else{this._.parentDialog=e.dialog._.currentTop;var X=this._.parentDialog.getElement().getFirst();X.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);e.dialog._.currentTop=this;}N(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click();});this._.hasFocus=false;i.setTimeout(function(){this.layout();this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});o.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(Y){Y.setInitValue&&Y.setInitValue();});},100,this);},layout:function(){var V=this;var T=e.document.getWindow().getViewPaneSize(),U=V.getSize();V.move(V._.moved?V._.position.x:(T.width-U.width)/2,V._.moved?V._.position.y:(T.height-U.height)/2);},foreach:function(T){var W=this;for(var U in W._.contents)for(var V in W._.contents[U])T(W._.contents[U][V]);return W;},reset:(function(){var T=function(U){if(U.reset)U.reset(1);};return function(){this.foreach(T);return this;};})(),setupContent:function(){var T=arguments;this.foreach(function(U){if(U.setup)U.setup.apply(U,T);});},commitContent:function(){var T=arguments;this.foreach(function(U){if(U.commit)U.commit.apply(U,T);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);var T=this._.element;T.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');O(this);while(e.dialog._.currentTop!=this)e.dialog._.currentTop.hide();if(!this._.parentDialog)I();else{var U=this._.parentDialog.getElement().getFirst();U.setStyle('z-index',parseInt(U.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));
}e.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){e.dialog._.currentZIndex=null;T.removeListener('keydown',L);T.removeListener(f.opera?'keypress':'keyup',M);for(var V in {keyup:1,keydown:1,keypress:1})T.removeListener(V,S);var W=this._.editor;W.focus();if(W.mode=='wysiwyg'&&g){var X=W.getSelection();X&&X.unlock(true);}}else e.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(Y){Y.resetInitValue&&Y.resetInitValue();});},addPage:function(T){var af=this;var U=[],V=T.label?' title="'+i.htmlEncode(T.label)+'"':'',W=T.elements,X=e.dialog._.uiElementBuilders.vbox.build(af,{type:'vbox',className:'cke_dialog_page_contents',children:T.elements,expand:!!T.expand,padding:T.padding,style:T.style||'width: 100%;height:100%'},U),Y=l.createFromHtml(U.join(''));Y.setAttribute('role','tabpanel');var Z=f,aa='cke_'+T.id+'_'+i.getNextNumber(),ab=l.createFromHtml(['<a class="cke_dialog_tab"',af._.pageCount>0?' cke_last':'cke_first',V,!!T.hidden?' style="display:none"':'',' id="',aa,'"',Z.gecko&&Z.version>=10900&&!Z.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',T.label,'</a>'].join(''));Y.setAttribute('aria-labelledby',aa);af._.tabs[T.id]=[ab,Y];af._.tabIdList.push(T.id);!T.hidden&&af._.pageCount++;af._.lastTab=ab;af.updateStyle();var ac=af._.contents[T.id]={},ad,ae=X.getChild();while(ad=ae.shift()){ac[ad.id]=ad;if(typeof ad.getChild=='function')ae.push.apply(ae,ad.getChild());}Y.setAttribute('name',T.id);Y.appendTo(af.parts.contents);ab.unselectable();af.parts.tabs.append(ab);if(T.accessKey){N(af,af,'CTRL+'+T.accessKey,Q,P);af._.accessKeyMap['CTRL+'+T.accessKey]=T.id;}},selectPage:function(T){if(this._.currentTabId==T)return;if(this.fire('selectPage',{page:T,currentPage:this._.currentTabId})===true)return;for(var U in this._.tabs){var V=this._.tabs[U][0],W=this._.tabs[U][1];if(U!=T){V.removeClass('cke_dialog_tab_selected');W.hide();}W.setAttribute('aria-hidden',U!=T);}var X=this._.tabs[T];X[0].addClass('cke_dialog_tab_selected');if(f.ie6Compat||f.ie7Compat){u(X[1]);X[1].show();setTimeout(function(){u(X[1],1);},0);}else X[1].show();this._.currentTabId=T;this._.currentTabIndex=i.indexOf(this._.tabIdList,T);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(T){var V=this;var U=V._.tabs[T]&&V._.tabs[T][0];if(!U||V._.pageCount==1||!U.isVisible())return;else if(T==V._.currentTabId)V.selectPage(s.call(V));U.hide();V._.pageCount--;
V.updateStyle();},showPage:function(T){var V=this;var U=V._.tabs[T]&&V._.tabs[T][0];if(!U)return;U.show();V._.pageCount++;V.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(T,U){var V=this._.contents[T];return V&&V[U];},getValueOf:function(T,U){return this.getContentElement(T,U).getValue();},setValueOf:function(T,U,V){return this.getContentElement(T,U).setValue(V);},getButton:function(T){return this._.buttons[T];},click:function(T){return this._.buttons[T].click();},disableButton:function(T){return this._.buttons[T].disable();},enableButton:function(T){return this._.buttons[T].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(T,U){var W=this;if(typeof U=='undefined'){U=W._.focusList.length;W._.focusList.push(new v(W,T,U));}else{W._.focusList.splice(U,0,new v(W,T,U));for(var V=U+1;V<W._.focusList.length;V++)W._.focusList[V].focusIndex++;}}};i.extend(e.dialog,{add:function(T,U){if(!this._.dialogDefinitions[T]||typeof U=='function')this._.dialogDefinitions[T]=U;},exists:function(T){return!!this._.dialogDefinitions[T];},getCurrent:function(){return e.dialog._.currentTop;},okButton:(function(){var T=function(U,V){V=V||{};return i.extend({id:'ok',type:'button',label:U.lang.common.ok,'class':'cke_dialog_ui_button_ok',onClick:function(W){var X=W.data.dialog;if(X.fire('ok',{hide:true}).hide!==false)X.hide();}},V,true);};T.type='button';T.override=function(U){return i.extend(function(V){return T(V,U);},{type:'button'},true);};return T;})(),cancelButton:(function(){var T=function(U,V){V=V||{};return i.extend({id:'cancel',type:'button',label:U.lang.common.cancel,'class':'cke_dialog_ui_button_cancel',onClick:function(W){var X=W.data.dialog;if(X.fire('cancel',{hide:true}).hide!==false)X.hide();}},V,true);};T.type='button';T.override=function(U){return i.extend(function(V){return T(V,U);},{type:'button'},true);};return T;})(),addUIElement:function(T,U){this._.uiElementBuilders[T]=U;}});e.dialog._={uiElementBuilders:{},dialogDefinitions:{},currentTop:null,currentZIndex:null};e.event.implementOn(e.dialog);e.event.implementOn(e.dialog.prototype,true);var w={resizable:3,minWidth:600,minHeight:400,buttons:[e.dialog.okButton,e.dialog.cancelButton]},x=function(T,U,V){for(var W=0,X;X=T[W];W++){if(X.id==U)return X;if(V&&X[V]){var Y=x(X[V],U,V);
if(Y)return Y;}}return null;},y=function(T,U,V,W,X){if(V){for(var Y=0,Z;Z=T[Y];Y++){if(Z.id==V){T.splice(Y,0,U);return U;}if(W&&Z[W]){var aa=y(Z[W],U,V,W,true);if(aa)return aa;}}if(X)return null;}T.push(U);return U;},z=function(T,U,V){for(var W=0,X;X=T[W];W++){if(X.id==U)return T.splice(W,1);if(V&&X[V]){var Y=z(X[V],U,V);if(Y)return Y;}}return null;},A=function(T,U){this.dialog=T;var V=U.contents;for(var W=0,X;X=V[W];W++)V[W]=X&&new B(T,X);i.extend(this,U);};A.prototype={getContents:function(T){return x(this.contents,T);},getButton:function(T){return x(this.buttons,T);},addContents:function(T,U){return y(this.contents,T,U);},addButton:function(T,U){return y(this.buttons,T,U);},removeContents:function(T){z(this.contents,T);},removeButton:function(T){z(this.buttons,T);}};function B(T,U){this._={dialog:T};i.extend(this,U);};B.prototype={get:function(T){return x(this.elements,T,'children');},add:function(T,U){return y(this.elements,T,U,'children');},remove:function(T){z(this.elements,T,'children');}};function C(T){var U=null,V=null,W=T.getElement().getFirst(),X=T.getParentEditor(),Y=X.config.dialog_magnetDistance,Z=X.skin.margins||[0,0,0,0];if(typeof Y=='undefined')Y=20;function aa(ac){var ad=T.getSize(),ae=e.document.getWindow().getViewPaneSize(),af=ac.data.$.screenX,ag=ac.data.$.screenY,ah=af-U.x,ai=ag-U.y,aj,ak;U={x:af,y:ag};V.x+=ah;V.y+=ai;if(V.x+Z[3]<Y)aj=-Z[3];else if(V.x-Z[1]>ae.width-ad.width-Y)aj=ae.width-ad.width+(X.lang.dir=='rtl'?0:Z[1]);else aj=V.x;if(V.y+Z[0]<Y)ak=-Z[0];else if(V.y-Z[2]>ae.height-ad.height-Y)ak=ae.height-ad.height+Z[2];else ak=V.y;T.move(aj,ak,1);ac.data.preventDefault();};function ab(ac){e.document.removeListener('mousemove',aa);e.document.removeListener('mouseup',ab);if(f.ie6Compat){var ad=G.getChild(0).getFrameDocument();ad.removeListener('mousemove',aa);ad.removeListener('mouseup',ab);}};T.parts.title.on('mousedown',function(ac){U={x:ac.data.$.screenX,y:ac.data.$.screenY};e.document.on('mousemove',aa);e.document.on('mouseup',ab);V=T.getPosition();if(f.ie6Compat){var ad=G.getChild(0).getFrameDocument();ad.on('mousemove',aa);ad.on('mouseup',ab);}ac.data.preventDefault();},T);};function D(T){var U=T.definition,V=U.resizable;if(V==0)return;var W=T.getParentEditor(),X,Y,Z,aa,ab,ac,ad=i.addFunction(function(ag){ab=T.getSize();var ah=T.parts.contents,ai=ah.$.getElementsByTagName('iframe').length;if(ai){ac=l.createFromHtml('<div class="cke_dialog_resize_cover" style="height: 100%; position: absolute; width: 100%;"></div>');ah.append(ac);
}Y=ab.height-T.parts.contents.getSize('height',!(f.gecko||f.opera||g&&f.quirks));X=ab.width-T.parts.contents.getSize('width',1);aa={x:ag.screenX,y:ag.screenY};Z=e.document.getWindow().getViewPaneSize();e.document.on('mousemove',ae);e.document.on('mouseup',af);if(f.ie6Compat){var aj=G.getChild(0).getFrameDocument();aj.on('mousemove',ae);aj.on('mouseup',af);}ag.preventDefault&&ag.preventDefault();});T.on('load',function(){var ag='';if(V==1)ag=' cke_resizer_horizontal';else if(V==2)ag=' cke_resizer_vertical';var ah=l.createFromHtml('<div class="cke_resizer'+ag+' cke_resizer_'+W.lang.dir+'"'+' title="'+i.htmlEncode(W.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+ad+', event )"></div>');T.parts.footer.append(ah,1);});W.on('destroy',function(){i.removeFunction(ad);});function ae(ag){var ah=W.lang.dir=='rtl',ai=(ag.data.$.screenX-aa.x)*(ah?-1:1),aj=ag.data.$.screenY-aa.y,ak=ab.width,al=ab.height,am=ak+ai*(T._.moved?1:2),an=al+aj*(T._.moved?1:2),ao=T._.element.getFirst(),ap=ah&&ao.getComputedStyle('right'),aq=T.getPosition();if(aq.y+an>Z.height)an=Z.height-aq.y;if((ah?ap:aq.x)+am>Z.width)am=Z.width-(ah?ap:aq.x);if(V==1||V==3)ak=Math.max(U.minWidth||0,am-X);if(V==2||V==3)al=Math.max(U.minHeight||0,an-Y);T.resize(ak,al);if(!T._.moved)T.layout();ag.data.preventDefault();};function af(){e.document.removeListener('mouseup',af);e.document.removeListener('mousemove',ae);if(ac){ac.remove();ac=null;}if(f.ie6Compat){var ag=G.getChild(0).getFrameDocument();ag.removeListener('mouseup',af);ag.removeListener('mousemove',ae);}};};var E,F={},G;function H(T){var U=e.document.getWindow(),V=T.config,W=V.dialog_backgroundCoverColor||'white',X=V.dialog_backgroundCoverOpacity,Y=V.baseFloatZIndex,Z=i.genKey(W,X,Y),aa=F[Z];if(!aa){var ab=['<div tabIndex="-1" style="position: ',f.ie6Compat?'absolute':'fixed','; z-index: ',Y,'; top: 0px; left: 0px; ',!f.ie6Compat?'background-color: '+W:'','" class="cke_dialog_background_cover">'];if(f.ie6Compat){var ac=f.isCustomDomain(),ad="<html><body style=\\'background-color:"+W+";\\'></body></html>";ab.push('<iframe hidefocus="true" frameborder="0" id="cke_dialog_background_iframe" src="javascript:');ab.push('void((function(){document.open();'+(ac?"document.domain='"+document.domain+"';":'')+"document.write( '"+ad+"' );"+'document.close();'+'})())');ab.push('" style="position:absolute;left:0;top:0;width:100%;height: 100%;progid:DXImageTransform.Microsoft.Alpha(opacity=0)"></iframe>');}ab.push('</div>');aa=l.createFromHtml(ab.join(''));aa.setOpacity(X!=undefined?X:0.5);
aa.appendTo(e.document.getBody());F[Z]=aa;}else aa.show();G=aa;var ae=function(){var ah=U.getViewPaneSize();aa.setStyles({width:ah.width+'px',height:ah.height+'px'});},af=function(){var ah=U.getScrollPosition(),ai=e.dialog._.currentTop;aa.setStyles({left:ah.x+'px',top:ah.y+'px'});if(ai)do{var aj=ai.getPosition();ai.move(aj.x,aj.y);}while(ai=ai._.parentDialog)};E=ae;U.on('resize',ae);ae();if(!(f.mac&&f.webkit))aa.focus();if(f.ie6Compat){var ag=function(){af();arguments.callee.prevScrollHandler.apply(this,arguments);};U.$.setTimeout(function(){ag.prevScrollHandler=window.onscroll||(function(){});window.onscroll=ag;},0);af();}};function I(){if(!G)return;var T=e.document.getWindow();G.hide();T.removeListener('resize',E);if(f.ie6Compat)T.$.setTimeout(function(){var U=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=U||null;},0);E=null;};function J(){for(var T in F)F[T].remove();F={};};var K={},L=function(T){var U=T.data.$.ctrlKey||T.data.$.metaKey,V=T.data.$.altKey,W=T.data.$.shiftKey,X=String.fromCharCode(T.data.$.keyCode),Y=K[(U?'CTRL+':'')+(V?'ALT+':'')+(W?'SHIFT+':'')+X];if(!Y||!Y.length)return;Y=Y[Y.length-1];Y.keydown&&Y.keydown.call(Y.uiElement,Y.dialog,Y.key);T.data.preventDefault();},M=function(T){var U=T.data.$.ctrlKey||T.data.$.metaKey,V=T.data.$.altKey,W=T.data.$.shiftKey,X=String.fromCharCode(T.data.$.keyCode),Y=K[(U?'CTRL+':'')+(V?'ALT+':'')+(W?'SHIFT+':'')+X];if(!Y||!Y.length)return;Y=Y[Y.length-1];if(Y.keyup){Y.keyup.call(Y.uiElement,Y.dialog,Y.key);T.data.preventDefault();}},N=function(T,U,V,W,X){var Y=K[V]||(K[V]=[]);Y.push({uiElement:T,dialog:U,key:V,keyup:X||T.accessKeyUp,keydown:W||T.accessKeyDown});},O=function(T){for(var U in K){var V=K[U];for(var W=V.length-1;W>=0;W--){if(V[W].dialog==T||V[W].uiElement==T)V.splice(W,1);}if(V.length===0)delete K[U];}},P=function(T,U){if(T._.accessKeyMap[U])T.selectPage(T._.accessKeyMap[U]);},Q=function(T,U){},R={27:1,13:1},S=function(T){if(T.data.getKeystroke() in R)T.data.stopPropagation();};(function(){o.dialog={uiElement:function(T,U,V,W,X,Y,Z){if(arguments.length<4)return;var aa=(W.call?W(U):W)||'div',ab=['<',aa,' '],ac=(X&&X.call?X(U):X)||{},ad=(Y&&Y.call?Y(U):Y)||{},ae=(Z&&Z.call?Z.call(this,T,U):Z)||'',af=this.domId=ad.id||i.getNextId()+'_uiElement',ag=this.id=U.id,ah;ad.id=af;var ai={};if(U.type)ai['cke_dialog_ui_'+U.type]=1;if(U.className)ai[U.className]=1;var aj=ad['class']&&ad['class'].split?ad['class'].split(' '):[];for(ah=0;ah<aj.length;ah++){if(aj[ah])ai[aj[ah]]=1;}var ak=[];
for(ah in ai)ak.push(ah);ad['class']=ak.join(' ');if(U.title)ad.title=U.title;var al=(U.style||'').split(';');for(ah in ac)al.push(ah+':'+ac[ah]);if(U.hidden)al.push('display:none');for(ah=al.length-1;ah>=0;ah--){if(al[ah]==='')al.splice(ah,1);}if(al.length>0)ad.style=(ad.style?ad.style+'; ':'')+al.join('; ');for(ah in ad)ab.push(ah+'="'+i.htmlEncode(ad[ah])+'" ');ab.push('>',ae,'</',aa,'>');V.push(ab.join(''));(this._||(this._={})).dialog=T;if(typeof U.isChanged=='boolean')this.isChanged=function(){return U.isChanged;};if(typeof U.isChanged=='function')this.isChanged=U.isChanged;e.event.implementOn(this);this.registerEvents(U);if(this.accessKeyUp&&this.accessKeyDown&&U.accessKey)N(this,T,'CTRL+'+U.accessKey);var am=this;T.on('load',function(){if(am.getInputElement())am.getInputElement().on('focus',function(){T._.tabBarMode=false;T._.hasFocus=true;am.fire('focus');},am);});if(this.keyboardFocusable){this.tabIndex=U.tabIndex||0;this.focusIndex=T._.focusList.push(this)-1;this.on('focus',function(){T._.currentFocusIndex=am.focusIndex;});}i.extend(this,U);},hbox:function(T,U,V,W,X){if(arguments.length<4)return;this._||(this._={});var Y=this._.children=U,Z=X&&X.widths||null,aa=X&&X.height||null,ab={},ac,ad=function(){var af=['<tbody><tr class="cke_dialog_ui_hbox">'];for(ac=0;ac<V.length;ac++){var ag='cke_dialog_ui_hbox_child',ah=[];if(ac===0)ag='cke_dialog_ui_hbox_first';if(ac==V.length-1)ag='cke_dialog_ui_hbox_last';af.push('<td class="',ag,'" role="presentation" ');if(Z){if(Z[ac])ah.push('width:'+q(Z[ac]));}else ah.push('width:'+Math.floor(100/V.length)+'%');if(aa)ah.push('height:'+q(aa));if(X&&X.padding!=undefined)ah.push('padding:'+q(X.padding));if(ah.length>0)af.push('style="'+ah.join('; ')+'" ');af.push('>',V[ac],'</td>');}af.push('</tr></tbody>');return af.join('');},ae={role:'presentation'};X&&X.align&&(ae.align=X.align);o.dialog.uiElement.call(this,T,X||{type:'hbox'},W,'table',ab,ae,ad);},vbox:function(T,U,V,W,X){if(arguments.length<3)return;this._||(this._={});var Y=this._.children=U,Z=X&&X.width||null,aa=X&&X.heights||null,ab=function(){var ac=['<table role="presentation" cellspacing="0" border="0" '];ac.push('style="');if(X&&X.expand)ac.push('height:100%;');ac.push('width:'+q(Z||'100%'),';');ac.push('"');ac.push('align="',i.htmlEncode(X&&X.align||(T.getParentEditor().lang.dir=='ltr'?'left':'right')),'" ');ac.push('><tbody>');for(var ad=0;ad<V.length;ad++){var ae=[];ac.push('<tr><td role="presentation" ');if(Z)ae.push('width:'+q(Z||'100%'));if(aa)ae.push('height:'+q(aa[ad]));
else if(X&&X.expand)ae.push('height:'+Math.floor(100/V.length)+'%');if(X&&X.padding!=undefined)ae.push('padding:'+q(X.padding));if(ae.length>0)ac.push('style="',ae.join('; '),'" ');ac.push(' class="cke_dialog_ui_vbox_child">',V[ad],'</td></tr>');}ac.push('</tbody></table>');return ac.join('');};o.dialog.uiElement.call(this,T,X||{type:'vbox'},W,'div',null,{role:'presentation'},ab);}};})();o.dialog.uiElement.prototype={getElement:function(){return e.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(T,U){this.getInputElement().setValue(T);!U&&this.fire('change',{value:T});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var W=this;var T=W.getInputElement(),U=T,V;while((U=U.getParent())&&U.$.className.search('cke_dialog_page_contents')==-1){}if(!U)return W;V=U.getAttribute('name');if(W._.dialog._.currentTabId!=V)W._.dialog.selectPage(V);return W;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(T){var U=/^on([A-Z]\w+)/,V,W=function(Y,Z,aa,ab){Z.on('load',function(){Y.getInputElement().on(aa,ab,Y);});};for(var X in T){if(!(V=X.match(U)))continue;if(this.eventProcessors[X])this.eventProcessors[X].call(this,this._.dialog,T[X]);else W(this,this._.dialog,V[1].toLowerCase(),T[X]);}return this;},eventProcessors:{onLoad:function(T,U){T.on('load',U,this);},onShow:function(T,U){T.on('show',U,this);},onHide:function(T,U){T.on('hide',U,this);}},accessKeyDown:function(T,U){this.focus();},accessKeyUp:function(T,U){},disable:function(){var T=this.getInputElement();T.setAttribute('disabled','true');T.addClass('cke_disabled');},enable:function(){var T=this.getInputElement();T.removeAttribute('disabled');T.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};o.dialog.hbox.prototype=i.extend(new o.dialog.uiElement(),{getChild:function(T){var U=this;if(arguments.length<1)return U._.children.concat();if(!T.splice)T=[T];if(T.length<2)return U._.children[T[0]];else return U._.children[T[0]]&&U._.children[T[0]].getChild?U._.children[T[0]].getChild(T.slice(1,T.length)):null;}},true);o.dialog.vbox.prototype=new o.dialog.hbox();(function(){var T={build:function(U,V,W){var X=V.children,Y,Z=[],aa=[];
for(var ab=0;ab<X.length&&(Y=X[ab]);ab++){var ac=[];Z.push(ac);aa.push(e.dialog._.uiElementBuilders[Y.type].build(U,Y,ac));}return new o.dialog[V.type](U,aa,Z,W,V);}};e.dialog.addUIElement('hbox',T);e.dialog.addUIElement('vbox',T);})();e.dialogCommand=function(T){this.dialogName=T;};e.dialogCommand.prototype={exec:function(T){T.openDialog(this.dialogName);},canUndo:false,editorFocus:g||f.webkit};(function(){var T=/^([a]|[^a])+$/,U=/^\d*$/,V=/^\d*(?:\.\d+)?$/;e.VALIDATE_OR=1;e.VALIDATE_AND=2;e.dialog.validate={functions:function(){return function(){var ac=this;var W=ac&&ac.getValue?ac.getValue():arguments[0],X=undefined,Y=2,Z=[],aa;for(aa=0;aa<arguments.length;aa++){if(typeof arguments[aa]=='function')Z.push(arguments[aa]);else break;}if(aa<arguments.length&&typeof arguments[aa]=='string'){X=arguments[aa];aa++;}if(aa<arguments.length&&typeof arguments[aa]=='number')Y=arguments[aa];var ab=Y==2?true:false;for(aa=0;aa<Z.length;aa++){if(Y==2)ab=ab&&Z[aa](W);else ab=ab||Z[aa](W);}if(!ab){if(X!==undefined)alert(X);if(ac&&(ac.select||ac.focus))ac.select||ac.focus();return false;}return true;};},regex:function(W,X){return function(){var Z=this;var Y=Z&&Z.getValue?Z.getValue():arguments[0];if(!W.test(Y)){if(X!==undefined)alert(X);if(Z&&(Z.select||Z.focus))if(Z.select)Z.select();else Z.focus();return false;}return true;};},notEmpty:function(W){return this.regex(T,W);},integer:function(W){return this.regex(U,W);},number:function(W){return this.regex(V,W);},equals:function(W,X){return this.functions(function(Y){return Y==W;},X);},notEqual:function(W,X){return this.functions(function(Y){return Y!=W;},X);}};e.on('instanceDestroyed',function(W){if(i.isEmpty(e.instances)){var X;while(X=e.dialog._.currentTop)X.hide();J();}var Y=W.editor._.storedDialogs;for(var Z in Y)Y[Z].destroy();});})();i.extend(e.editor.prototype,{openDialog:function(T,U){if(this.mode=='wysiwyg'&&g){var V=this.getSelection();V&&V.lock();}var W=e.dialog._.dialogDefinitions[T],X=this.skin.dialog;if(e.dialog._.currentTop===null)H(this);if(typeof W=='function'&&X._isLoaded){var Y=this._.storedDialogs||(this._.storedDialogs={}),Z=Y[T]||(Y[T]=new e.dialog(this,T));U&&U.call(Z,Z);Z.show();return Z;}else if(W=='failed'){I();throw new Error('[CKEDITOR.dialog.openDialog] Dialog "'+T+'" failed when loading definition.');}var aa=this;function ab(ad){var ae=e.dialog._.dialogDefinitions[T],af=aa.skin.dialog;if(!af._isLoaded||ac&&typeof ad=='undefined')return;if(typeof ae!='function')e.dialog._.dialogDefinitions[T]='failed';
aa.openDialog(T,U);};if(typeof W=='string'){var ac=1;e.scriptLoader.load(e.getUrl(W),ab,null,0,1);}e.skins.load(this,'dialog',ab);return null;}});})();n.add('dialog',{requires:['dialogui']});n.add('styles',{requires:['selection'],init:function(q){q.on('contentDom',function(){q.document.setCustomData('cke_includeReadonly',!q.config.disableReadonlyStyling);});}});e.editor.prototype.attachStyleStateChange=function(q,r){var s=this._.styleStateChangeCallbacks;if(!s){s=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(t){for(var u=0;u<s.length;u++){var v=s[u],w=v.style.checkActive(t.data.path)?1:2;v.fn.call(this,w);}});}s.push({style:q,fn:r});};e.STYLE_BLOCK=1;e.STYLE_INLINE=2;e.STYLE_OBJECT=3;(function(){var q={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1},r={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,th:1,ul:1,dl:1,dt:1,dd:1,form:1},s=/\s*(?:;\s*|$)/,t=/#\((.+?)\)/g,u=h.walker.bookmark(0,1),v=h.walker.whitespaces(1);e.style=function(X,Y){if(Y){X=i.clone(X);P(X.attributes,Y);P(X.styles,Y);}var Z=this.element=(X.element||'*').toLowerCase();this.type=q[Z]?1:r[Z]?3:2;this._={definition:X};};e.style.prototype={apply:function(X){W.call(this,X,false);},remove:function(X){W.call(this,X,true);},applyToRange:function(X){var Y=this;return(Y.applyToRange=Y.type==2?x:Y.type==1?B:Y.type==3?z:null).call(Y,X);},removeFromRange:function(X){var Y=this;return(Y.removeFromRange=Y.type==2?y:Y.type==1?C:Y.type==3?A:null).call(Y,X);},applyToObject:function(X){O(X,this);},checkActive:function(X){var ab=this;switch(ab.type){case 1:return ab.checkElementRemovable(X.block||X.blockLimit,true);case 3:case 2:var Y=X.elements;for(var Z=0,aa;Z<Y.length;Z++){aa=Y[Z];if(ab.type==2&&(aa==X.block||aa==X.blockLimit))continue;if(ab.type==3&&!(aa.getName() in r))continue;if(ab.checkElementRemovable(aa,true))return true;}}return false;},checkApplicable:function(X){switch(this.type){case 2:case 1:break;case 3:return X.lastElement.getAscendant(this.element,true);}return true;},checkElementRemovable:function(X,Y){if(!X)return false;var Z=this._.definition,aa;if(X.getName()==this.element){if(!Y&&!X.hasAttributes())return true;aa=Q(Z);if(aa._length){for(var ab in aa){if(ab=='_length')continue;var ac=X.getAttribute(ab)||'';if(ab=='style'?V(aa[ab],T(ac,false)):aa[ab]==ac){if(!Y)return true;}else if(Y)return false;}if(Y)return true;}else return true;}var ad=R(this)[X.getName()];if(ad){if(!(aa=ad.attributes))return true;for(var ae=0;ae<aa.length;ae++){ab=aa[ae][0];
var af=X.getAttribute(ab);if(af){var ag=aa[ae][1];if(ag===null||typeof ag=='string'&&af==ag||ag.test(af))return true;}}}return false;},buildPreview:function(){var X=this._.definition,Y=[],Z=X.element;if(Z=='bdo')Z='span';Y=['<',Z];var aa=X.attributes;if(aa)for(var ab in aa)Y.push(' ',ab,'="',aa[ab],'"');var ac=e.style.getStyleText(X);if(ac)Y.push(' style="',ac,'"');Y.push('>',X.name,'</',Z,'>');return Y.join('');}};e.style.getStyleText=function(X){var Y=X._ST;if(Y)return Y;Y=X.styles;var Z=X.attributes&&X.attributes.style||'',aa='';if(Z.length)Z=Z.replace(s,';');for(var ab in Y){var ac=Y[ab],ad=(ab+':'+ac).replace(s,';');if(ac=='inherit')aa+=ad;else Z+=ad;}if(Z.length)Z=T(Z);Z+=aa;return X._ST=Z;};function w(X){var Y,Z;while(X=X.getParent()){if(X.getName()=='body')break;if(X.getAttribute('data-nostyle'))Y=X;else if(!Z){var aa=X.getAttribute('contentEditable');if(aa=='false')Y=X;else if(aa=='true')Z=1;}}return Y;};function x(X){var aB=this;var Y=X.document;if(X.collapsed){var Z=N(aB,Y);X.insertNode(Z);X.moveToPosition(Z,2);return;}var aa=aB.element,ab=aB._.definition,ac,ad=ab.includeReadonly;if(ad==undefined)ad=Y.getCustomData('cke_includeReadonly');var ae=j[aa]||(ac=true,j.span);X.enlarge(1,1);X.trim();var af=X.createBookmark(),ag=af.startNode,ah=af.endNode,ai=ag,aj,ak=w(ag),al=w(ah);if(ak)ai=ak.getNextSourceNode(true);if(al)ah=al;if(ai.getPosition(ah)==2)ai=0;while(ai){var am=false;if(ai.equals(ah)){ai=null;am=true;}else{var an=ai.type,ao=an==1?ai.getName():null,ap=ao&&ai.getAttribute('contentEditable')=='false',aq=ao&&ai.getAttribute('data-nostyle');if(ao&&ai.data('cke-bookmark')){ai=ai.getNextSourceNode(true);continue;}if(!ao||ae[ao]&&!aq&&(!ap||ad)&&(ai.getPosition(ah)|4|0|8)==4+0+8&&(!ab.childRule||ab.childRule(ai))){var ar=ai.getParent();if(ar&&((ar.getDtd()||j.span)[aa]||ac)&&(!ab.parentRule||ab.parentRule(ar))){if(!aj&&(!ao||!j.$removeEmpty[ao]||(ai.getPosition(ah)|4|0|8)==4+0+8)){aj=new h.range(Y);aj.setStartBefore(ai);}if(an==3||ap||an==1&&!ai.getChildCount()){var as=ai,at;while((am=!as.getNext(u))&&(at=as.getParent(),ae[at.getName()])&&(at.getPosition(ag)|2|0|8)==2+0+8&&(!ab.childRule||ab.childRule(at)))as=at;aj.setEndAfter(as);}}else am=true;}else am=true;ai=ai.getNextSourceNode(aq||ap);}if(am&&aj&&!aj.collapsed){var au=N(aB,Y),av=au.hasAttributes(),aw=aj.getCommonAncestor(),ax={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},ay,az,aA;while(au&&aw){if(aw.getName()==aa){for(ay in ab.attributes){if(ax.blockedAttrs[ay]||!(aA=aw.getAttribute(az)))continue;
if(au.getAttribute(ay)==aA)ax.attrs[ay]=1;else ax.blockedAttrs[ay]=1;}for(az in ab.styles){if(ax.blockedStyles[az]||!(aA=aw.getStyle(az)))continue;if(au.getStyle(az)==aA)ax.styles[az]=1;else ax.blockedStyles[az]=1;}}aw=aw.getParent();}for(ay in ax.attrs)au.removeAttribute(ay);for(az in ax.styles)au.removeStyle(az);if(av&&!au.hasAttributes())au=null;if(au){aj.extractContents().appendTo(au);K(aB,au);aj.insertNode(au);au.mergeSiblings();if(!g)au.$.normalize();}else{au=new l('span');aj.extractContents().appendTo(au);aj.insertNode(au);K(aB,au);au.remove(true);}aj=null;}}X.moveToBookmark(af);X.shrink(2);};function y(X){X.enlarge(1,1);var Y=X.createBookmark(),Z=Y.startNode;if(X.collapsed){var aa=new h.elementPath(Z.getParent()),ab;for(var ac=0,ad;ac<aa.elements.length&&(ad=aa.elements[ac]);ac++){if(ad==aa.block||ad==aa.blockLimit)break;if(this.checkElementRemovable(ad)){var ae;if(X.collapsed&&(X.checkBoundaryOfElement(ad,2)||(ae=X.checkBoundaryOfElement(ad,1)))){ab=ad;ab.match=ae?'start':'end';}else{ad.mergeSiblings();if(ad.getName()==this.element)J(this,ad);else L(ad,R(this)[ad.getName()]);}}}if(ab){var af=Z;for(ac=0;true;ac++){var ag=aa.elements[ac];if(ag.equals(ab))break;else if(ag.match)continue;else ag=ag.clone();ag.append(af);af=ag;}af[ab.match=='start'?'insertBefore':'insertAfter'](ab);}}else{var ah=Y.endNode,ai=this;function aj(){var am=new h.elementPath(Z.getParent()),an=new h.elementPath(ah.getParent()),ao=null,ap=null;for(var aq=0;aq<am.elements.length;aq++){var ar=am.elements[aq];if(ar==am.block||ar==am.blockLimit)break;if(ai.checkElementRemovable(ar))ao=ar;}for(aq=0;aq<an.elements.length;aq++){ar=an.elements[aq];if(ar==an.block||ar==an.blockLimit)break;if(ai.checkElementRemovable(ar))ap=ar;}if(ap)ah.breakParent(ap);if(ao)Z.breakParent(ao);};aj();var ak=Z.getNext();while(!ak.equals(ah)){var al=ak.getNextSourceNode();if(ak.type==1&&this.checkElementRemovable(ak)){if(ak.getName()==this.element)J(this,ak);else L(ak,R(this)[ak.getName()]);if(al.type==1&&al.contains(Z)){aj();al=Z.getNext();}}ak=al;}}X.moveToBookmark(Y);};function z(X){var Y=X.getCommonAncestor(true,true),Z=Y.getAscendant(this.element,true);Z&&O(Z,this);};function A(X){var Y=X.getCommonAncestor(true,true),Z=Y.getAscendant(this.element,true);if(!Z)return;var aa=this,ab=aa._.definition,ac=ab.attributes,ad=e.style.getStyleText(ab);if(ac)for(var ae in ac)Z.removeAttribute(ae,ac[ae]);if(ab.styles)for(var af in ab.styles){if(!ab.styles.hasOwnProperty(af))continue;Z.removeStyle(af);}};function B(X){var Y=X.createBookmark(true),Z=X.createIterator();
Z.enforceRealBlocks=true;if(this._.enterMode)Z.enlargeBr=this._.enterMode!=2;var aa,ab=X.document,ac;while(aa=Z.getNextParagraph()){var ad=N(this,ab,aa);D(aa,ad);}X.moveToBookmark(Y);};function C(X){var ac=this;var Y=X.createBookmark(1),Z=X.createIterator();Z.enforceRealBlocks=true;Z.enlargeBr=ac._.enterMode!=2;var aa;while(aa=Z.getNextParagraph()){if(ac.checkElementRemovable(aa))if(aa.is('pre')){var ab=ac._.enterMode==2?null:X.document.createElement(ac._.enterMode==1?'p':'div');ab&&aa.copyAttributes(ab);D(aa,ab);}else J(ac,aa,1);}X.moveToBookmark(Y);};function D(X,Y){var Z=!Y;if(Z){Y=X.getDocument().createElement('div');X.copyAttributes(Y);}var aa=Y&&Y.is('pre'),ab=X.is('pre'),ac=aa&&!ab,ad=!aa&&ab;if(ac)Y=I(X,Y);else if(ad)Y=H(Z?[X.getHtml()]:F(X),Y);else X.moveChildren(Y);Y.replace(X);if(aa)E(Y);else if(Z)M(Y);};function E(X){var Y;if(!((Y=X.getPrevious(v))&&Y.is&&Y.is('pre')))return;var Z=G(Y.getHtml(),/\n$/,'')+'\n\n'+G(X.getHtml(),/^\n/,'');if(g)X.$.outerHTML='<pre>'+Z+'</pre>';else X.setHtml(Z);Y.remove();};function F(X){var Y=/(\S\s*)\n(?:\s|(<span[^>]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,Z=X.getName(),aa=G(X.getOuterHtml(),Y,function(ac,ad,ae){return ad+'</pre>'+ae+'<pre>';}),ab=[];aa.replace(/<pre\b.*?>([\s\S]*?)<\/pre>/gi,function(ac,ad){ab.push(ad);});return ab;};function G(X,Y,Z){var aa='',ab='';X=X.replace(/(^<span[^>]+data-cke-bookmark.*?\/span>)|(<span[^>]+data-cke-bookmark.*?\/span>$)/gi,function(ac,ad,ae){ad&&(aa=ad);ae&&(ab=ae);return '';});return aa+X.replace(Y,Z)+ab;};function H(X,Y){var Z;if(X.length>1)Z=new h.documentFragment(Y.getDocument());for(var aa=0;aa<X.length;aa++){var ab=X[aa];ab=ab.replace(/(\r\n|\r)/g,'\n');ab=G(ab,/^[ \t]*\n/,'');ab=G(ab,/\n$/,'');ab=G(ab,/^[ \t]+|[ \t]+$/g,function(ad,ae,af){if(ad.length==1)return '&nbsp;';else if(!ae)return i.repeat('&nbsp;',ad.length-1)+' ';else return ' '+i.repeat('&nbsp;',ad.length-1);});ab=ab.replace(/\n/g,'<br>');ab=ab.replace(/[ \t]{2,}/g,function(ad){return i.repeat('&nbsp;',ad.length-1)+' ';});if(Z){var ac=Y.clone();ac.setHtml(ab);Z.append(ac);}else Y.setHtml(ab);}return Z||Y;};function I(X,Y){var Z=X.getBogus();Z&&Z.remove();var aa=X.getHtml();aa=G(aa,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');aa=aa.replace(/[ \t\r\n]*(<br[^>]*>)[ \t\r\n]*/gi,'$1');aa=aa.replace(/([ \t\n\r]+|&nbsp;)/g,' ');aa=aa.replace(/<br\b[^>]*>/gi,'\n');if(g){var ab=X.getDocument().createElement('div');ab.append(Y);Y.$.outerHTML='<pre>'+aa+'</pre>';Y.copyAttributes(ab.getFirst());Y=ab.getFirst().remove();}else Y.setHtml(aa);
return Y;};function J(X,Y){var Z=X._.definition,aa=i.extend({},Z.attributes,R(X)[Y.getName()]),ab=Z.styles,ac=i.isEmpty(aa)&&i.isEmpty(ab);for(var ad in aa){if((ad=='class'||X._.definition.fullMatch)&&Y.getAttribute(ad)!=S(ad,aa[ad]))continue;ac=Y.hasAttribute(ad);Y.removeAttribute(ad);}for(var ae in ab){if(X._.definition.fullMatch&&Y.getStyle(ae)!=S(ae,ab[ae],true))continue;ac=ac||!!Y.getStyle(ae);Y.removeStyle(ae);}if(ac)!j.$block[Y.getName()]||X._.enterMode==2&&!Y.hasAttributes()?M(Y):Y.renameNode(X._.enterMode==1?'p':'div');};function K(X,Y){var Z=X._.definition,aa=Z.attributes,ab=Z.styles,ac=R(X),ad=Y.getElementsByTag(X.element);for(var ae=ad.count();--ae>=0;)J(X,ad.getItem(ae));for(var af in ac){if(af!=X.element){ad=Y.getElementsByTag(af);for(ae=ad.count()-1;ae>=0;ae--){var ag=ad.getItem(ae);L(ag,ac[af]);}}}};function L(X,Y){var Z=Y&&Y.attributes;if(Z)for(var aa=0;aa<Z.length;aa++){var ab=Z[aa][0],ac;if(ac=X.getAttribute(ab)){var ad=Z[aa][1];if(ad===null||ad.test&&ad.test(ac)||typeof ad=='string'&&ac==ad)X.removeAttribute(ab);}}M(X);};function M(X){if(!X.hasAttributes())if(j.$block[X.getName()]){var Y=X.getPrevious(v),Z=X.getNext(v);if(Y&&(Y.type==3||!Y.isBlockBoundary({br:1})))X.append('br',1);if(Z&&(Z.type==3||!Z.isBlockBoundary({br:1})))X.append('br');X.remove(true);}else{var aa=X.getFirst(),ab=X.getLast();X.remove(true);if(aa){aa.type==1&&aa.mergeSiblings();if(ab&&!aa.equals(ab)&&ab.type==1)ab.mergeSiblings();}}};function N(X,Y,Z){var aa,ab=X._.definition,ac=X.element;if(ac=='*')ac='span';aa=new l(ac,Y);if(Z)Z.copyAttributes(aa);aa=O(aa,X);if(Y.getCustomData('doc_processing_style')&&aa.hasAttribute('id'))aa.removeAttribute('id');else Y.setCustomData('doc_processing_style',1);return aa;};function O(X,Y){var Z=Y._.definition,aa=Z.attributes,ab=e.style.getStyleText(Z);if(aa)for(var ac in aa)X.setAttribute(ac,aa[ac]);if(ab)X.setAttribute('style',ab);return X;};function P(X,Y){for(var Z in X)X[Z]=X[Z].replace(t,function(aa,ab){return Y[ab];});};function Q(X){var Y=X._AC;if(Y)return Y;Y={};var Z=0,aa=X.attributes;if(aa)for(var ab in aa){Z++;Y[ab]=aa[ab];}var ac=e.style.getStyleText(X);if(ac){if(!Y.style)Z++;Y.style=ac;}Y._length=Z;return X._AC=Y;};function R(X){if(X._.overrides)return X._.overrides;var Y=X._.overrides={},Z=X._.definition.overrides;if(Z){if(!i.isArray(Z))Z=[Z];for(var aa=0;aa<Z.length;aa++){var ab=Z[aa],ac,ad,ae;if(typeof ab=='string')ac=ab.toLowerCase();else{ac=ab.element?ab.element.toLowerCase():X.element;ae=ab.attributes;}ad=Y[ac]||(Y[ac]={});
if(ae){var af=ad.attributes=ad.attributes||[];for(var ag in ae)af.push([ag.toLowerCase(),ae[ag]]);}}}return Y;};function S(X,Y,Z){var aa=new l('span');aa[Z?'setStyle':'setAttribute'](X,Y);return aa[Z?'getStyle':'getAttribute'](X);};function T(X,Y){var Z;if(Y!==false){var aa=new l('span');aa.setAttribute('style',X);Z=aa.getAttribute('style')||'';}else Z=X;return Z.replace(/\s*([;:])\s*/,'$1').replace(/([^\s;])$/,'$1;').replace(/,\s+/g,',').replace(/\"/g,'').toLowerCase();};function U(X){var Y={};X.replace(/&quot;/g,'"').replace(/\s*([^ :;]+)\s*:\s*([^;]+)\s*(?=;|$)/g,function(Z,aa,ab){Y[aa]=ab;});return Y;};function V(X,Y){typeof X=='string'&&(X=U(X));typeof Y=='string'&&(Y=U(Y));for(var Z in X){if(!(Z in Y&&(Y[Z]==X[Z]||X[Z]=='inherit'||Y[Z]=='inherit')))return false;}return true;};function W(X,Y){var Z=X.getSelection(),aa=Z.getRanges(),ab=Y?this.removeFromRange:this.applyToRange,ac,ad=aa.createIterator();while(ac=ad.getNextRange())ab.call(this,ac);Z.selectRanges(aa);X.removeCustomData('doc_processing_style');};})();e.styleCommand=function(q){this.style=q;};e.styleCommand.prototype.exec=function(q){var s=this;q.focus();var r=q.document;if(r)if(s.state==2)s.style.apply(r);else if(s.state==1)s.style.remove(r);return!!r;};e.stylesSet=new e.resourceManager('','stylesSet');e.addStylesSet=i.bind(e.stylesSet.add,e.stylesSet);e.loadStylesSet=function(q,r,s){e.stylesSet.addExternal(q,r,'');e.stylesSet.load(q,s);};e.editor.prototype.getStylesSet=function(q){if(!this._.stylesDefinitions){var r=this,s=r.config.stylesCombo_stylesSet||r.config.stylesSet||'default';if(s instanceof Array){r._.stylesDefinitions=s;q(s);return;}var t=s.split(':'),u=t[0],v=t[1],w=n.registered.styles.path;e.stylesSet.addExternal(u,v?t.slice(1).join(':'):w+'styles/'+u+'.js','');e.stylesSet.load(u,function(x){r._.stylesDefinitions=x[u];q(r._.stylesDefinitions);});}else q(this._.stylesDefinitions);};n.add('domiterator');(function(){function q(w){var x=this;if(arguments.length<1)return;x.range=w;x.forceBrBreak=0;x.enlargeBr=1;x.enforceRealBlocks=0;x._||(x._={});};var r=/^[\r\n\t ]+$/,s=h.walker.bookmark(false,true),t=h.walker.whitespaces(true),u=function(w){return s(w)&&t(w);};function v(w,x,y){var z=w.getNextSourceNode(x,null,y);while(!s(z))z=z.getNextSourceNode(x,null,y);return z;};q.prototype={getNextParagraph:function(w){var W=this;var x,y,z,A,B,C;if(!W._.lastNode){y=W.range.clone();y.shrink(1,true);A=y.endContainer.hasAscendant('pre',true)||y.startContainer.hasAscendant('pre',true);y.enlarge(W.forceBrBreak&&!A||!W.enlargeBr?3:2);
var D=new h.walker(y),E=h.walker.bookmark(true,true);D.evaluator=E;W._.nextNode=D.next();D=new h.walker(y);D.evaluator=E;var F=D.previous();W._.lastNode=F.getNextSourceNode(true);if(W._.lastNode&&W._.lastNode.type==3&&!i.trim(W._.lastNode.getText())&&W._.lastNode.getParent().isBlockBoundary()){var G=new h.range(y.document);G.moveToPosition(W._.lastNode,4);if(G.checkEndOfBlock()){var H=new h.elementPath(G.endContainer),I=H.block||H.blockLimit;W._.lastNode=I.getNextSourceNode(true);}}if(!W._.lastNode){W._.lastNode=W._.docEndMarker=y.document.createText('');W._.lastNode.insertAfter(F);}y=null;}var J=W._.nextNode;F=W._.lastNode;W._.nextNode=null;while(J){var K=0,L=J.hasAscendant('pre'),M=J.type!=1,N=0;if(!M){var O=J.getName();if(J.isBlockBoundary(W.forceBrBreak&&!L&&{br:1})){if(O=='br')M=1;else if(!y&&!J.getChildCount()&&O!='hr'){x=J;z=J.equals(F);break;}if(y){y.setEndAt(J,3);if(O!='br')W._.nextNode=J;}K=1;}else{if(J.getFirst()){if(!y){y=new h.range(W.range.document);y.setStartAt(J,3);}J=J.getFirst();continue;}M=1;}}else if(J.type==3)if(r.test(J.getText()))M=0;if(M&&!y){y=new h.range(W.range.document);y.setStartAt(J,3);}z=(!K||M)&&J.equals(F);if(y&&!K)while(!J.getNext(u)&&!z){var P=J.getParent();if(P.isBlockBoundary(W.forceBrBreak&&!L&&{br:1})){K=1;M=0;z=z||P.equals(F);y.setEndAt(P,2);break;}J=P;M=1;z=J.equals(F);N=1;}if(M)y.setEndAt(J,4);J=v(J,N,F);z=!J;if(z||K&&y)break;}if(!x){if(!y){W._.docEndMarker&&W._.docEndMarker.remove();W._.nextNode=null;return null;}var Q=new h.elementPath(y.startContainer),R=Q.blockLimit,S={div:1,th:1,td:1};x=Q.block;if(!x&&!W.enforceRealBlocks&&S[R.getName()]&&y.checkStartOfBlock()&&y.checkEndOfBlock())x=R;else if(!x||W.enforceRealBlocks&&x.getName()=='li'){x=W.range.document.createElement(w||'p');y.extractContents().appendTo(x);x.trim();y.insertNode(x);B=C=true;}else if(x.getName()!='li'){if(!y.checkStartOfBlock()||!y.checkEndOfBlock()){x=x.clone(false);y.extractContents().appendTo(x);x.trim();var T=y.splitBlock();B=!T.wasStartOfBlock;C=!T.wasEndOfBlock;y.insertNode(x);}}else if(!z)W._.nextNode=x.equals(F)?null:v(y.getBoundaryNodes().endNode,1,F);}if(B){var U=x.getPrevious();if(U&&U.type==1)if(U.getName()=='br')U.remove();else if(U.getLast()&&U.getLast().$.nodeName.toLowerCase()=='br')U.getLast().remove();}if(C){var V=x.getLast();if(V&&V.type==1&&V.getName()=='br')if(g||V.getPrevious(s)||V.getNext(s))V.remove();}if(!W._.nextNode)W._.nextNode=z||x.equals(F)?null:v(x,1,F);return x;}};h.range.prototype.createIterator=function(){return new q(this);
};})();n.add('panelbutton',{requires:['button'],beforeInit:function(q){q.ui.addHandler(4,o.panelButton.handler);}});e.UI_PANELBUTTON=4;(function(){var q=function(r){var t=this;var s=t._;if(s.state==0)return;t.createPanel(r);if(s.on){s.panel.hide();return;}s.panel.showBlock(t._.id,t.document.getById(t._.id),4);};o.panelButton=i.createClass({base:o.button,$:function(r){var t=this;var s=r.panel;delete r.panel;t.base(r);t.document=s&&s.parent&&s.parent.getDocument()||e.document;s.block={attributes:s.attributes};t.hasArrow=true;t.click=q;t._={panelDefinition:s};},statics:{handler:{create:function(r){return new o.panelButton(r);}}},proto:{createPanel:function(r){var s=this._;if(s.panel)return;var t=this._.panelDefinition||{},u=this._.panelDefinition.block,v=t.parent||e.document.getBody(),w=this._.panel=new o.floatPanel(r,v,t),x=w.addBlock(s.id,u),y=this;w.onShow=function(){if(y.className)this.element.getFirst().addClass(y.className+'_panel');y.setState(1);s.on=1;if(y.onOpen)y.onOpen();};w.onHide=function(z){if(y.className)this.element.getFirst().removeClass(y.className+'_panel');y.setState(y.modes&&y.modes[r.mode]?2:0);s.on=0;if(!z&&y.onClose)y.onClose();};w.onEscape=function(){w.hide();y.document.getById(s.id).focus();};if(this.onBlock)this.onBlock(w,x);x.onHide=function(){s.on=0;y.setState(2);};}}});})();n.add('floatpanel',{requires:['panel']});(function(){var q={},r=false;function s(t,u,v,w,x){var y=i.genKey(u.getUniqueId(),v.getUniqueId(),t.skinName,t.lang.dir,t.uiColor||'',w.css||'',x||''),z=q[y];if(!z){z=q[y]=new o.panel(u,w);z.element=v.append(l.createFromHtml(z.renderHtml(t),u));z.element.setStyles({display:'none',position:'absolute'});}return z;};o.floatPanel=i.createClass({$:function(t,u,v,w){v.forceIFrame=1;var x=u.getDocument(),y=s(t,x,u,v,w||0),z=y.element,A=z.getFirst().getFirst();this.element=z;this._={panel:y,parentElement:u,definition:v,document:x,iframe:A,children:[],dir:t.lang.dir};t.on('mode',function(){this.hide();},this);},proto:{addBlock:function(t,u){return this._.panel.addBlock(t,u);},addListBlock:function(t,u){return this._.panel.addListBlock(t,u);},getBlock:function(t){return this._.panel.getBlock(t);},showBlock:function(t,u,v,w,x){var y=this._.panel,z=y.showBlock(t);this.allowBlur(false);r=1;var A=this.element,B=this._.iframe,C=this._.definition,D=u.getDocumentPosition(A.getDocument()),E=this._.dir=='rtl',F=D.x+(w||0),G=D.y+(x||0);if(E&&(v==1||v==4))F+=u.$.offsetWidth;else if(!E&&(v==2||v==3))F+=u.$.offsetWidth-1;if(v==3||v==4)G+=u.$.offsetHeight-1;
this._.panel._.offsetParentId=u.getId();A.setStyles({top:G+'px',left:0,display:''});A.setOpacity(0);A.getFirst().removeStyle('width');if(!this._.blurSet){var H=g?B:new h.window(B.$.contentWindow);e.event.useCapture=true;H.on('blur',function(I){var K=this;if(!K.allowBlur())return;var J;if(g&&!K.allowBlur()||(J=I.data.getTarget())&&J.getName&&J.getName()!='iframe')return;if(K.visible&&!K._.activeChild&&!r)K.hide();},this);H.on('focus',function(){this._.focused=true;this.hideChild();this.allowBlur(true);},this);e.event.useCapture=false;this._.blurSet=1;}y.onEscape=i.bind(function(I){if(this.onEscape&&this.onEscape(I)===false)return false;},this);i.setTimeout(function(){if(E)F-=A.$.offsetWidth;var I=i.bind(function(){var J=A.getFirst();if(z.autoSize){var K=z.element.$;if(f.gecko||f.opera)K=K.parentNode;if(g)K=K.document.body;var L=K.scrollWidth;if(g&&f.quirks&&L>0)L+=(J.$.offsetWidth||0)-(J.$.clientWidth||0);L+=4;J.setStyle('width',L+'px');z.element.addClass('cke_frameLoaded');var M=z.element.$.scrollHeight;if(g&&f.quirks&&M>0)M+=(J.$.offsetHeight||0)-(J.$.clientHeight||0);J.setStyle('height',M+'px');y._.currentBlock.element.setStyle('display','none').removeStyle('display');}else J.removeStyle('height');var N=y.element,O=N.getWindow(),P=O.getScrollPosition(),Q=O.getViewPaneSize(),R={height:N.$.offsetHeight,width:N.$.offsetWidth};if(E?F<0:F+R.width>Q.width+P.x)F+=R.width*(E?1:-1);if(G+R.height>Q.height+P.y)G-=R.height;if(g){var S=new l(A.$.offsetParent),T=S;if(T.getName()=='html')T=T.getDocument().getBody();if(T.getComputedStyle('direction')=='rtl')if(f.ie8Compat)F-=A.getDocument().getDocumentElement().$.scrollLeft*2;else F-=S.$.scrollWidth-S.$.clientWidth;}var U=A.getFirst(),V;if(V=U.getCustomData('activePanel'))V.onHide&&V.onHide.call(this,1);U.setCustomData('activePanel',this);A.setStyles({top:G+'px',left:F+'px'});A.setOpacity(1);},this);y.isLoaded?I():y.onLoad=I;i.setTimeout(function(){B.$.contentWindow.focus();this.allowBlur(true);},0,this);},f.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);r=0;},hide:function(){var t=this;if(t.visible&&(!t.onHide||t.onHide.call(t)!==true)){t.hideChild();t.element.setStyle('display','none');t.visible=0;t.element.getFirst().removeCustomData('activePanel');}},allowBlur:function(t){var u=this._.panel;if(t!=undefined)u.allowBlur=t;return u.allowBlur;},showAsChild:function(t,u,v,w,x,y){if(this._.activeChild==t&&t._.panel._.offsetParentId==v.getId())return;this.hideChild();t.onHide=i.bind(function(){i.setTimeout(function(){if(!this._.focused)this.hide();
},0,this);},this);this._.activeChild=t;this._.focused=false;t.showBlock(u,v,w,x,y);if(f.ie7Compat||f.ie8&&f.ie6Compat)setTimeout(function(){t.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var t=this._.activeChild;if(t){delete t.onHide;delete this._.activeChild;t.hide();}}}});e.on('instanceDestroyed',function(){var t=i.isEmpty(e.instances);for(var u in q){var v=q[u];if(t)v.destroy();else v.element.hide();}t&&(q={});});})();n.add('menu',{beforeInit:function(q){var r=q.config.menu_groups.split(','),s=q._.menuGroups={},t=q._.menuItems={};for(var u=0;u<r.length;u++)s[r[u]]=u+1;q.addMenuGroup=function(v,w){s[v]=w||100;};q.addMenuItem=function(v,w){if(s[w.group])t[v]=new e.menuItem(this,v,w);};q.addMenuItems=function(v){for(var w in v)this.addMenuItem(w,v[w]);};q.getMenuItem=function(v){return t[v];};},requires:['floatpanel']});(function(){e.menu=i.createClass({$:function(r,s){var v=this;s=v._.definition=s||{};v.id=i.getNextId();v.editor=r;v.items=[];v._.listeners=[];v._.level=s.level||1;var t=i.extend({},s.panel,{css:r.skin.editor.css,level:v._.level-1,block:{}}),u=t.block.attributes=t.attributes||{};!u.role&&(u.role='menu');v._.panelDefinition=t;},_:{onShow:function(){var z=this;var r=z.editor.getSelection();if(g)r&&r.lock();var s=r&&r.getStartElement(),t=z._.listeners,u=[];z.removeAll();for(var v=0;v<t.length;v++){var w=t[v](s,r);if(w)for(var x in w){var y=z.editor.getMenuItem(x);if(y){y.state=w[x];z.add(y);}}}},onClick:function(r){this.hide();if(r.onClick)r.onClick();else if(r.command)this.editor.execCommand(r.command);},onEscape:function(r){var s=this.parent;if(s){s._.panel.hideChild();var t=s._.panel._.panel._.currentBlock,u=t._.focusIndex;t._.markItem(u);}else if(r==27){this.hide();this.editor.focus();}return false;},onHide:function(){if(g){var r=this.editor.getSelection();r&&r.unlock();}this.onHide&&this.onHide();},showSubMenu:function(r){var z=this;var s=z._.subMenu,t=z.items[r],u=t.getItems&&t.getItems();if(!u){z._.panel.hideChild();return;}var v=z._.panel.getBlock(z.id);v._.focusIndex=r;if(s)s.removeAll();else{s=z._.subMenu=new e.menu(z.editor,i.extend({},z._.definition,{level:z._.level+1},true));s.parent=z;s._.onClick=i.bind(z._.onClick,z);}for(var w in u){var x=z.editor.getMenuItem(w);if(x){x.state=u[w];s.add(x);}}var y=z._.panel.getBlock(z.id).element.getDocument().getById(z.id+String(r));s.show(y,2);}},proto:{add:function(r){if(!r.order)r.order=this.items.length;this.items.push(r);},removeAll:function(){this.items=[];},show:function(r,s,t,u){if(!this.parent){this._.onShow();
if(!this.items.length)return;}s=s||(this.editor.lang.dir=='rtl'?2:1);var v=this.items,w=this.editor,x=this._.panel,y=this._.element;if(!x){x=this._.panel=new o.floatPanel(this.editor,e.document.getBody(),this._.panelDefinition,this._.level);x.onEscape=i.bind(function(J){if(this._.onEscape(J)===false)return false;},this);x.onHide=i.bind(function(){this._.onHide&&this._.onHide();},this);var z=x.addBlock(this.id,this._.panelDefinition.block);z.autoSize=true;var A=z.keys;A[40]='next';A[9]='next';A[38]='prev';A[2000+9]='prev';A[32]='click';A[w.lang.dir=='rtl'?37:39]='click';y=this._.element=z.element;y.addClass(w.skinClass);var B=y.getDocument();B.getBody().setStyle('overflow','hidden');B.getElementsByTag('html').getItem(0).setStyle('overflow','hidden');this._.itemOverFn=i.addFunction(function(J){var K=this;clearTimeout(K._.showSubTimeout);K._.showSubTimeout=i.setTimeout(K._.showSubMenu,w.config.menu_subMenuDelay||400,K,[J]);},this);this._.itemOutFn=i.addFunction(function(J){clearTimeout(this._.showSubTimeout);},this);this._.itemClickFn=i.addFunction(function(J){var L=this;var K=L.items[J];if(K.state==0){L.hide();return;}if(K.getItems)L._.showSubMenu(J);else L._.onClick(K);},this);}q(v);var C=w.container.getChild(1),D=C.hasClass('cke_mixed_dir_content')?' cke_mixed_dir_content':'',E=['<div class="cke_menu'+D+'" role="presentation">'],F=v.length,G=F&&v[0].group;for(var H=0;H<F;H++){var I=v[H];if(G!=I.group){E.push('<div class="cke_menuseparator" role="separator"></div>');G=I.group;}I.render(this,H,E);}E.push('</div>');y.setHtml(E.join(''));o.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(x,this.id,r,s,t,u);else x.showBlock(this.id,r,s,t,u);w.fire('menuShow',[x]);},addListener:function(r){this._.listeners.push(r);},hide:function(){var r=this;r._.onHide&&r._.onHide();r._.panel&&r._.panel.hide();}}});function q(r){r.sort(function(s,t){if(s.group<t.group)return-1;else if(s.group>t.group)return 1;return s.order<t.order?-1:s.order>t.order?1:0;});};e.menuItem=i.createClass({$:function(r,s,t){var u=this;i.extend(u,t,{order:0,className:'cke_button_'+s});u.group=r._.menuGroups[u.group];u.editor=r;u.name=s;},proto:{render:function(r,s,t){var A=this;var u=r.id+String(s),v=typeof A.state=='undefined'?2:A.state,w=' cke_'+(v==1?'on':v==0?'disabled':'off'),x=A.label;if(A.className)w+=' '+A.className;var y=A.getItems;t.push('<span class="cke_menuitem'+(A.icon&&A.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">'+'<a id="',u,'" class="',w,'" href="javascript:void(\'',(A.label||'').replace("'",''),'\')" title="',A.label,'" tabindex="-1"_cke_focus=1 hidefocus="true" role="menuitem"'+(y?'aria-haspopup="true"':'')+(v==0?'aria-disabled="true"':'')+(v==1?'aria-pressed="true"':''));
if(f.opera||f.gecko&&f.mac)t.push(' onkeypress="return false;"');if(f.gecko)t.push(' onblur="this.style.cssText = this.style.cssText;"');var z=(A.iconOffset||0)*-16;t.push(' onmouseover="CKEDITOR.tools.callFunction(',r._.itemOverFn,',',s,');" onmouseout="CKEDITOR.tools.callFunction(',r._.itemOutFn,',',s,');" onclick="CKEDITOR.tools.callFunction(',r._.itemClickFn,',',s,'); return false;"><span class="cke_icon_wrapper"><span class="cke_icon"'+(A.icon?' style="background-image:url('+e.getUrl(A.icon)+');background-position:0 '+z+'px;"':'')+'></span></span>'+'<span class="cke_label">');if(y)t.push('<span class="cke_menuarrow">','<span>&#',A.editor.lang.dir=='rtl'?'9668':'9658',';</span>','</span>');t.push(x,'</span></a></span>');}}});})();m.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var q=function(s,t){return s._.modes&&s._.modes[t||s.mode];},r;n.add('editingblock',{init:function(s){if(!s.config.editingBlock)return;s.on('themeSpace',function(t){if(t.data.space=='contents')t.data.html+='<br>';});s.on('themeLoaded',function(){s.fireOnce('editingBlockReady');});s.on('uiReady',function(){s.setMode(s.config.startupMode);});s.on('afterSetData',function(){if(!r){function t(){r=true;q(s).loadData(s.getData());r=false;};if(s.mode)t();else s.on('mode',function(){t();s.removeListener('mode',arguments.callee);});}});s.on('beforeGetData',function(){if(!r&&s.mode){r=true;s.setData(q(s).getData(),null,1);r=false;}});s.on('getSnapshot',function(t){if(s.mode)t.data=q(s).getSnapshotData();});s.on('loadSnapshot',function(t){if(s.mode)q(s).loadSnapshotData(t.data);});s.on('mode',function(t){t.removeListener();f.webkit&&s.container.on('focus',function(){s.focus();});if(s.config.startupFocus)s.focus();setTimeout(function(){s.fireOnce('instanceReady');e.fire('instanceReady',null,s);},0);});s.on('destroy',function(){var t=this;if(t.mode)t._.modes[t.mode].unload(t.getThemeSpace('contents'));});}});e.editor.prototype.mode='';e.editor.prototype.addMode=function(s,t){t.name=s;(this._.modes||(this._.modes={}))[s]=t;};e.editor.prototype.setMode=function(s){this.fire('beforeSetMode',{newMode:s});var t,u=this.getThemeSpace('contents'),v=this.checkDirty();if(this.mode){if(s==this.mode)return;this.fire('beforeModeUnload');var w=q(this);t=w.getData();w.unload(u);this.mode='';}u.setHtml('');var x=q(this,s);if(!x)throw '[CKEDITOR.editor.setMode] Unknown mode "'+s+'".';
if(!v)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});x.load(u,typeof t!='string'?this.getData():t);};e.editor.prototype.focus=function(){this.forceNextSelectionCheck();var s=q(this);if(s)s.focus();};})();m.startupMode='wysiwyg';m.editingBlock=true;(function(){function q(){var F=this;try{var C=F.getSelection();if(!C||!C.document.getWindow().$)return;var D=C.getStartElement(),E=new h.elementPath(D);if(!E.compare(F._.selectionPreviousPath)){F._.selectionPreviousPath=E;F.fire('selectionChange',{selection:C,path:E,element:D});}}catch(G){}};var r,s;function t(){s=true;if(r)return;u.call(this);r=i.setTimeout(u,200,this);};function u(){r=null;if(s){i.setTimeout(q,0,this);s=false;}};function v(C){function D(G){return G&&G.type==1&&G.getName() in j.$removeEmpty;};var E=C.startContainer,F=C.startOffset;if(E.type==3)return false;return!i.trim(E.getHtml())?D(E):D(E.getChild(F-1))||D(E.getChild(F));};var w={modes:{wysiwyg:1,source:1},exec:function(C){switch(C.mode){case 'wysiwyg':C.document.$.execCommand('SelectAll',false,null);C.forceNextSelectionCheck();C.selectionChange();break;case 'source':var D=C.textarea.$;if(g)D.createTextRange().execCommand('SelectAll');else{D.selectionStart=0;D.selectionEnd=D.value.length;}D.focus();}},canUndo:false};function x(C){A(C);var D=C.createText('​');C.setCustomData('cke-fillingChar',D);return D;};function y(C){return C&&C.getCustomData('cke-fillingChar');};function z(C){var D=C&&y(C);if(D)if(D.getCustomData('ready'))A(C);else D.setCustomData('ready',1);};function A(C){var D=C&&C.removeCustomData('cke-fillingChar');if(D){D.setText(D.getText().replace(/\u200B/g,''));D=0;}};n.add('selection',{init:function(C){if(f.webkit){C.on('selectionChange',function(){z(C.document);});C.on('beforeSetMode',function(){A(C.document);});C.on('key',function(H){switch(H.data.keyCode){case 13:case 2000+13:case 37:case 39:case 8:A(C.document);}},null,null,10);var D,E;function F(){var H=C.document,I=y(H);if(I){var J=H.$.defaultView.getSelection();if(J.type=='Caret'&&J.anchorNode==I.$)E=1;D=I.getText();I.setText(D.replace(/\u200B/g,''));}};function G(){var H=C.document,I=y(H);if(I){I.setText(D);if(E){H.$.defaultView.getSelection().setPosition(I.$,I.getLength());E=0;}}};C.on('beforeUndoImage',F);C.on('afterUndoImage',G);C.on('beforeGetData',F,null,null,0);C.on('getData',G);}C.on('contentDom',function(){var H=C.document,I=H.getBody(),J=H.getDocumentElement();if(g){var K,L,M=1;I.on('focusin',function(Q){if(Q.data.$.srcElement.nodeName!='BODY')return;
if(K){if(M){try{K.select();}catch(S){}var R=H.getCustomData('cke_locked_selection');if(R){R.unlock();R.lock();}}K=null;}});I.on('focus',function(){L=1;P();});I.on('beforedeactivate',function(Q){if(Q.data.$.toElement)return;L=0;M=1;});if(g&&f.version<8)C.on('blur',function(Q){try{C.document&&C.document.$.selection.empty();}catch(R){}});J.on('mousedown',function(){M=0;});J.on('mouseup',function(){M=1;});if(g&&(f.ie7Compat||f.version<8||f.quirks))J.on('click',function(Q){if(Q.data.getTarget().getName()=='html')C.getSelection().getRanges()[0].select();});var N;I.on('mousedown',function(Q){if(Q.data.$.button==2){var R=C.document.$.selection;if(R.type=='None')N=C.window.getScrollPosition();}O();});I.on('mouseup',function(Q){if(Q.data.$.button==2&&N){C.document.$.documentElement.scrollLeft=N.x;C.document.$.documentElement.scrollTop=N.y;}N=null;L=1;setTimeout(function(){P(true);},0);});I.on('keydown',O);I.on('keyup',function(){L=1;P();});H.on('selectionchange',P);function O(){L=0;};function P(Q){if(L){var R=C.document,S=C.getSelection(),T=S&&S.getNative();if(Q&&T&&T.type=='None')if(!R.$.queryCommandEnabled('InsertImage')){i.setTimeout(P,50,this,true);return;}var U;if(T&&T.type&&T.type!='Control'&&(U=T.createRange())&&(U=U.parentElement())&&(U=U.nodeName)&&U.toLowerCase() in {input:1,textarea:1})return;K=T&&S.getRanges()[0];t.call(C);}};}else{H.on('mouseup',t,C);H.on('keyup',t,C);}});C.on('contentDomUnload',C.forceNextSelectionCheck,C);C.addCommand('selectAll',w);C.ui.addButton('SelectAll',{label:C.lang.selectAll,command:'selectAll'});C.selectionChange=t;}});e.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};e.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};k.prototype.getSelection=function(){var C=new h.selection(this);return!C||C.isInvalid?null:C;};e.SELECTION_NONE=1;e.SELECTION_TEXT=2;e.SELECTION_ELEMENT=3;h.selection=function(C){var F=this;var D=C.getCustomData('cke_locked_selection');if(D)return D;F.document=C;F.isLocked=0;F._={cache:{}};if(g){var E=F.getNative().createRange();if(!E||E.item&&E.item(0).ownerDocument!=F.document.$||E.parentElement&&E.parentElement().ownerDocument!=F.document.$)F.isInvalid=true;}return F;};var B={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,th:1,thead:1,tfoot:1};h.selection.prototype={getNative:g?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);
}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:g?function(){var C=this._.cache;if(C.type)return C.type;var D=1;try{var E=this.getNative(),F=E.type;if(F=='Text')D=2;if(F=='Control')D=3;if(E.createRange().parentElement)D=2;}catch(G){}return C.type=D;}:function(){var C=this._.cache;if(C.type)return C.type;var D=2,E=this.getNative();if(!E)D=1;else if(E.rangeCount==1){var F=E.getRangeAt(0),G=F.startContainer;if(G==F.endContainer&&G.nodeType==1&&F.endOffset-F.startOffset==1&&B[G.childNodes[F.startOffset].nodeName.toLowerCase()])D=3;}return C.type=D;},getRanges:(function(){var C=g?(function(){function D(F){return new h.node(F).getIndex();};var E=function(F,G){F=F.duplicate();F.collapse(G);var H=F.parentElement(),I=H.ownerDocument;if(!H.hasChildNodes())return{container:H,offset:0};var J=H.children,K,L,M=F.duplicate(),N=0,O=J.length-1,P=-1,Q,R;while(N<=O){P=Math.floor((N+O)/2);K=J[P];M.moveToElementText(K);Q=M.compareEndPoints('StartToStart',F);if(Q>0)O=P-1;else if(Q<0)N=P+1;else if(f.ie9Compat&&K.tagName=='BR'){var S='cke_range_marker';F.execCommand('CreateBookmark',false,S);K=I.getElementsByName(S)[0];var T=D(K);H.removeChild(K);return{container:H,offset:T};}else return{container:H,offset:D(K)};}if(P==-1||P==J.length-1&&Q<0){M.moveToElementText(H);M.setEndPoint('StartToStart',F);R=M.text.replace(/(\r\n|\r)/g,'\n').length;J=H.childNodes;if(!R){K=J[J.length-1];if(K.nodeType==1)return{container:H,offset:J.length};else return{container:K,offset:K.nodeValue.length};}var U=J.length;while(R>0)R-=J[--U].nodeValue.length;return{container:J[U],offset:-R};}else{M.collapse(Q>0?true:false);M.setEndPoint(Q>0?'StartToStart':'EndToStart',F);R=M.text.replace(/(\r\n|\r)/g,'\n').length;if(!R)return{container:H,offset:D(K)+(Q>0?0:1)};while(R>0)try{L=K[Q>0?'previousSibling':'nextSibling'];R-=L.nodeValue.length;K=L;}catch(V){return{container:H,offset:D(K)};}return{container:K,offset:Q>0?-R:K.nodeValue.length+R};}};return function(){var P=this;var F=P.getNative(),G=F&&F.createRange(),H=P.getType(),I;if(!F)return[];if(H==2){I=new h.range(P.document);var J=E(G,true);I.setStart(new h.node(J.container),J.offset);J=E(G);I.setEnd(new h.node(J.container),J.offset);if(I.endContainer.getPosition(I.startContainer)&4&&I.endOffset<=I.startContainer.getIndex())I.collapse();return[I];}else if(H==3){var K=[];for(var L=0;L<G.length;L++){var M=G.item(L),N=M.parentNode,O=0;I=new h.range(P.document);for(;O<N.childNodes.length&&N.childNodes[O]!=M;
O++){}I.setStart(new h.node(N),O);I.setEnd(new h.node(N),O+1);K.push(I);}return K;}return[];};})():function(){var D=[],E,F=this.document,G=this.getNative();if(!G)return D;if(!G.rangeCount){E=new h.range(F);E.moveToElementEditStart(F.getBody());D.push(E);}for(var H=0;H<G.rangeCount;H++){var I=G.getRangeAt(H);E=new h.range(F);E.setStart(new h.node(I.startContainer),I.startOffset);E.setEnd(new h.node(I.endContainer),I.endOffset);D.push(E);}return D;};return function(D){var E=this._.cache;if(E.ranges&&!D)return E.ranges;else if(!E.ranges)E.ranges=new h.rangeList(C.call(this));if(D){var F=E.ranges;for(var G=0;G<F.length;G++){var H=F[G],I=H.getCommonAncestor();if(I.isReadOnly())F.splice(G,1);if(H.collapsed)continue;var J=H.startContainer,K=H.endContainer,L=H.startOffset,M=H.endOffset,N=H.clone(),O;if(O=J.isReadOnly())H.setStartAfter(O);if(J&&J.type==3)if(L>=J.getLength())N.setStartAfter(J);else N.setStartBefore(J);if(K&&K.type==3)if(!M)N.setEndBefore(K);else N.setEndAfter(K);var P=new h.walker(N);P.evaluator=function(Q){if(Q.type==1&&Q.isReadOnly()){var R=H.clone();H.setEndBefore(Q);if(H.collapsed)F.splice(G--,1);if(!(Q.getPosition(N.endContainer)&16)){R.setStartAfter(Q);if(!R.collapsed)F.splice(G+1,0,R);}return true;}return false;};P.next();}}return E.ranges;};})(),getStartElement:function(){var J=this;var C=J._.cache;if(C.startElement!==undefined)return C.startElement;var D,E=J.getNative();switch(J.getType()){case 3:return J.getSelectedElement();case 2:var F=J.getRanges()[0];if(F){if(!F.collapsed){F.optimize();while(1){var G=F.startContainer,H=F.startOffset;if(H==(G.getChildCount?G.getChildCount():G.getLength())&&!G.isBlockBoundary())F.setStartAfter(G);else break;}D=F.startContainer;if(D.type!=1)return D.getParent();D=D.getChild(F.startOffset);if(!D||D.type!=1)D=F.startContainer;else{var I=D.getFirst();while(I&&I.type==1){D=I;I=I.getFirst();}}}else{D=F.startContainer;if(D.type!=1)D=D.getParent();}D=D.$;}}return C.startElement=D?new l(D):null;},getSelectedElement:function(){var C=this._.cache;if(C.selectedElement!==undefined)return C.selectedElement;var D=this,E=i.tryThese(function(){return D.getNative().createRange().item(0);},function(){var F=D.getRanges()[0],G,H;for(var I=2;I&&!((G=F.getEnclosedNode())&&G.type==1&&B[G.getName()]&&(H=G));I--)F.shrink(1);return H.$;});return C.selectedElement=E?new l(E):null;},lock:function(){var C=this;C.getRanges();C.getStartElement();C.getSelectedElement();C._.cache.nativeSel={};C.isLocked=1;C.document.setCustomData('cke_locked_selection',C);
},unlock:function(C){var H=this;var D=H.document,E=D.getCustomData('cke_locked_selection');if(E){D.setCustomData('cke_locked_selection',null);if(C){var F=E.getSelectedElement(),G=!F&&E.getRanges();H.isLocked=0;H.reset();D.getBody().focus();if(F)H.selectElement(F);else H.selectRanges(G);}}if(!E||!C){H.isLocked=0;H.reset();}},reset:function(){this._.cache={};},selectElement:function(C){var E=this;if(E.isLocked){var D=new h.range(E.document);D.setStartBefore(C);D.setEndAfter(C);E._.cache.selectedElement=C;E._.cache.startElement=C;E._.cache.ranges=new h.rangeList(D);E._.cache.type=3;return;}D=new h.range(C.getDocument());D.setStartBefore(C);D.setEndAfter(C);D.select();E.document.fire('selectionchange');E.reset();},selectRanges:function(C){var Q=this;if(Q.isLocked){Q._.cache.selectedElement=null;Q._.cache.startElement=C[0]&&C[0].getTouchedStartNode();Q._.cache.ranges=new h.rangeList(C);Q._.cache.type=2;return;}if(g){if(C.length>1){var D=C[C.length-1];C[0].setEnd(D.endContainer,D.endOffset);C.length=1;}if(C[0])C[0].select();Q.reset();}else{var E=Q.getNative();if(!E)return;if(C.length){E.removeAllRanges();f.webkit&&A(Q.document);}for(var F=0;F<C.length;F++){if(F<C.length-1){var G=C[F],H=C[F+1],I=G.clone();I.setStart(G.endContainer,G.endOffset);I.setEnd(H.startContainer,H.startOffset);if(!I.collapsed){I.shrink(1,true);var J=I.getCommonAncestor(),K=I.getEnclosedNode();if(J.isReadOnly()||K&&K.isReadOnly()){H.setStart(G.startContainer,G.startOffset);C.splice(F--,1);continue;}}}var L=C[F],M=Q.document.$.createRange(),N=L.startContainer;if(L.collapsed&&(f.opera||f.gecko&&f.version<10900)&&N.type==1&&!N.getChildCount())N.appendText('');if(L.collapsed&&f.webkit&&v(L)){var O=x(Q.document);L.insertNode(O);var P=O.getNext();if(P&&!O.getPrevious()&&P.type==1&&P.getName()=='br'){A(Q.document);L.moveToPosition(P,3);}else L.moveToPosition(O,4);}M.setStart(L.startContainer.$,L.startOffset);try{M.setEnd(L.endContainer.$,L.endOffset);}catch(R){if(R.toString().indexOf('NS_ERROR_ILLEGAL_VALUE')>=0){L.collapse(1);M.setEnd(L.endContainer.$,L.endOffset);}else throw R;}E.addRange(M);}Q.reset();}},createBookmarks:function(C){return this.getRanges().createBookmarks(C);},createBookmarks2:function(C){return this.getRanges().createBookmarks2(C);},selectBookmarks:function(C){var D=[];for(var E=0;E<C.length;E++){var F=new h.range(this.document);F.moveToBookmark(C[E]);D.push(F);}this.selectRanges(D);return this;},getCommonAncestor:function(){var C=this.getRanges(),D=C[0].startContainer,E=C[C.length-1].endContainer;
return D.getCommonAncestor(E);},scrollIntoView:function(){var C=this.getStartElement();C.scrollIntoView();}};})();(function(){var q=h.walker.whitespaces(true),r=/\ufeff|\u00a0/,s={table:1,tbody:1,tr:1};h.range.prototype.select=g?function(t){var E=this;var u=E.collapsed,v,w,x,y=E.getEnclosedNode();if(y)try{x=E.document.$.body.createControlRange();x.addElement(y.$);x.select();return;}catch(F){}if(E.startContainer.type==1&&E.startContainer.getName() in s||E.endContainer.type==1&&E.endContainer.getName() in s)E.shrink(1,true);var z=E.createBookmark(),A=z.startNode,B;if(!u)B=z.endNode;x=E.document.$.body.createTextRange();x.moveToElementText(A.$);x.moveStart('character',1);if(B){var C=E.document.$.body.createTextRange();C.moveToElementText(B.$);x.setEndPoint('EndToEnd',C);x.moveEnd('character',-1);}else{var D=A.getNext(q);v=!(D&&D.getText&&D.getText().match(r))&&(t||!A.hasPrevious()||A.getPrevious().is&&A.getPrevious().is('br'));w=E.document.createElement('span');w.setHtml('&#65279;');w.insertBefore(A);if(v)E.document.createText('\ufeff').insertBefore(A);}E.setStartBefore(A);A.remove();if(u){if(v){x.moveStart('character',-1);x.select();E.document.$.selection.clear();}else x.select();E.moveToPosition(w,3);w.remove();}else{E.setEndBefore(B);B.remove();x.select();}E.document.fire('selectionchange');}:function(){this.document.getSelection().selectRanges([this]);};})();(function(){var q={elements:{$:function(r){var s=r.attributes,t=s&&s['data-cke-realelement'],u=t&&new e.htmlParser.fragment.fromHtml(decodeURIComponent(t)),v=u&&u.children[0];if(v&&r.attributes['data-cke-resizable']){var w=r.attributes.style;if(w){var x=/(?:^|\s)width\s*:\s*(\d+)/i.exec(w),y=x&&x[1];x=/(?:^|\s)height\s*:\s*(\d+)/i.exec(w);var z=x&&x[1];if(y)v.attributes.width=y;if(z)v.attributes.height=z;}}return v;}}};n.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(r){var s=r.dataProcessor,t=s&&s.htmlFilter;if(t)t.addRules(q);}});})();e.editor.prototype.createFakeElement=function(q,r,s,t){var u=this.lang.fakeobjects,v=u[s]||u.unknown,w={'class':r,src:e.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(q.getOuterHtml()),'data-cke-real-node-type':q.type,alt:v,title:v,align:q.getAttribute('align')||''};if(s)w['data-cke-real-element-type']=s;if(t)w['data-cke-resizable']=t;return this.document.createElement('img',{attributes:w});};e.editor.prototype.createFakeParserElement=function(q,r,s,t){var u=this.lang.fakeobjects,v=u[s]||u.unknown,w,x=new e.htmlParser.basicWriter();
q.writeHtml(x);w=x.getHtml();var y={'class':r,src:e.getUrl('images/spacer.gif'),'data-cke-realelement':encodeURIComponent(w),'data-cke-real-node-type':q.type,alt:v,title:v,align:q.attributes.align||''};if(s)y['data-cke-real-element-type']=s;if(t)y['data-cke-resizable']=t;return new e.htmlParser.element('img',y);};e.editor.prototype.restoreRealElement=function(q){if(q.data('cke-real-node-type')!=1)return null;return l.createFromHtml(decodeURIComponent(q.data('cke-realelement')),this.document);};n.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(q){q.ui.addHandler(3,o.richCombo.handler);}});e.UI_RICHCOMBO=3;o.richCombo=i.createClass({$:function(q){var s=this;i.extend(s,q,{title:q.label,modes:{wysiwyg:1}});var r=s.panel||{};delete s.panel;s.id=i.getNextNumber();s.document=r&&r.parent&&r.parent.getDocument()||e.document;r.className=(r.className||'')+' cke_rcombopanel';r.block={multiSelect:r.multiSelect,attributes:r.attributes};s._={panelDefinition:r,items:{},state:2};},statics:{handler:{create:function(q){return new o.richCombo(q);}}},proto:{renderHtml:function(q){var r=[];this.render(q,r);return r.join('');},render:function(q,r){var s=f,t='cke_'+this.id,u=i.addFunction(function(x){var A=this;var y=A._;if(y.state==0)return;A.createPanel(q);if(y.on){y.panel.hide();return;}A.commit();var z=A.getValue();if(z)y.list.mark(z);else y.list.unmarkAll();y.panel.showBlock(A.id,new l(x),4);},this),v={id:t,combo:this,focus:function(){var x=e.document.getById(t).getChild(1);x.focus();},clickFn:u};q.on('mode',function(){this.setState(this.modes[q.mode]?2:0);this.setValue('');},this);var w=i.addFunction(function(x,y){x=new h.event(x);var z=x.getKeystroke();switch(z){case 13:case 32:case 40:i.callFunction(u,y);break;default:v.onkey(v,z);}x.preventDefault();});v.keyDownFn=w;r.push('<span class="cke_rcombo">','<span id=',t);if(this.className)r.push(' class="',this.className,' cke_off"');r.push('>','<span id="'+t+'_label" class=cke_label>',this.label,'</span>','<a hidefocus=true title="',this.title,'" tabindex="-1"',s.gecko&&s.version>=10900&&!s.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',t,'_label" aria-describedby="',t,'_text" aria-haspopup="true"');if(f.opera||f.gecko&&f.mac)r.push(' onkeypress="return false;"');if(f.gecko)r.push(' onblur="this.style.cssText = this.style.cssText;"');r.push(' onkeydown="CKEDITOR.tools.callFunction( ',w,', event, this );" onclick="CKEDITOR.tools.callFunction(',u,', this); return false;"><span><span id="'+t+'_text" class="cke_text cke_inline_label">'+this.label+'</span>'+'</span>'+'<span class=cke_openbutton><span class=cke_icon>'+(f.hc?'&#9660;':f.air?'&nbsp;':'')+'</span></span>'+'</a>'+'</span>'+'</span>');
if(this.onRender)this.onRender();return v;},createPanel:function(q){if(this._.panel)return;var r=this._.panelDefinition,s=this._.panelDefinition.block,t=r.parent||e.document.getBody(),u=new o.floatPanel(q,t,r),v=u.addListBlock(this.id,s),w=this;u.onShow=function(){if(w.className)this.element.getFirst().addClass(w.className+'_panel');w.setState(1);v.focus(!w.multiSelect&&w.getValue());w._.on=1;if(w.onOpen)w.onOpen();};u.onHide=function(x){if(w.className)this.element.getFirst().removeClass(w.className+'_panel');w.setState(w.modes&&w.modes[q.mode]?2:0);w._.on=0;if(!x&&w.onClose)w.onClose();};u.onEscape=function(){u.hide();w.document.getById('cke_'+w.id).getFirst().getNext().focus();};v.onClick=function(x,y){w.document.getWindow().focus();if(w.onClick)w.onClick.call(w,x,y);if(y)w.setValue(x,w._.items[x]);else w.setValue('');u.hide();};this._.panel=u;this._.list=v;u.getBlock(this.id).onHide=function(){w._.on=0;w.setState(2);};if(this.init)this.init();},setValue:function(q,r){var t=this;t._.value=q;var s=t.document.getById('cke_'+t.id+'_text');if(s){if(!(q||r)){r=t.label;s.addClass('cke_inline_label');}else s.removeClass('cke_inline_label');s.setHtml(typeof r!='undefined'?r:q);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(q){this._.list.mark(q);},hideItem:function(q){this._.list.hideItem(q);},hideGroup:function(q){this._.list.hideGroup(q);},showAll:function(){this._.list.showAll();},add:function(q,r,s){this._.items[q]=s||q;this._.list.add(q,r,s);},startGroup:function(q){this._.list.startGroup(q);},commit:function(){var q=this;if(!q._.committed){q._.list.commit();q._.committed=1;o.fire('ready',q);}q._.committed=1;},setState:function(q){var r=this;if(r._.state==q)return;r.document.getById('cke_'+r.id).setState(q);r._.state=q;}}});o.prototype.addRichCombo=function(q,r){this.add(q,3,r);};n.add('htmlwriter');e.htmlWriter=i.createClass({base:e.htmlParser.basicWriter,$:function(){var s=this;s.base();s.indentationChars='\t';s.selfClosingEnd=' />';s.lineBreakChars='\n';s.forceSimpleAmpersand=0;s.sortAttributes=1;s._.indent=0;s._.indentation='';s._.inPre=0;s._.rules={};var q=j;for(var r in i.extend({},q.$nonBodyContent,q.$block,q.$listItem,q.$tableContent))s.setRules(r,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!q[r]['#'],breakAfterClose:1});s.setRules('br',{breakAfterOpen:1});s.setRules('title',{indent:0,breakAfterOpen:0});s.setRules('style',{indent:0,breakBeforeClose:1});s.setRules('pre',{indent:0});
},proto:{openTag:function(q,r){var t=this;var s=t._.rules[q];if(t._.indent)t.indentation();else if(s&&s.breakBeforeOpen){t.lineBreak();t.indentation();}t._.output.push('<',q);},openTagClose:function(q,r){var t=this;var s=t._.rules[q];if(r)t._.output.push(t.selfClosingEnd);else{t._.output.push('>');if(s&&s.indent)t._.indentation+=t.indentationChars;}if(s&&s.breakAfterOpen)t.lineBreak();q=='pre'&&(t._.inPre=1);},attribute:function(q,r){if(typeof r=='string'){this.forceSimpleAmpersand&&(r=r.replace(/&amp;/g,'&'));r=i.htmlEncodeAttr(r);}this._.output.push(' ',q,'="',r,'"');},closeTag:function(q){var s=this;var r=s._.rules[q];if(r&&r.indent)s._.indentation=s._.indentation.substr(s.indentationChars.length);if(s._.indent)s.indentation();else if(r&&r.breakBeforeClose){s.lineBreak();s.indentation();}s._.output.push('</',q,'>');q=='pre'&&(s._.inPre=0);if(r&&r.breakAfterClose)s.lineBreak();},text:function(q){var r=this;if(r._.indent){r.indentation();!r._.inPre&&(q=i.ltrim(q));}r._.output.push(q);},comment:function(q){if(this._.indent)this.indentation();this._.output.push('<!--',q,'-->');},lineBreak:function(){var q=this;if(!q._.inPre&&q._.output.length>0)q._.output.push(q.lineBreakChars);q._.indent=1;},indentation:function(){var q=this;if(!q._.inPre)q._.output.push(q._.indentation);q._.indent=0;},setRules:function(q,r){var s=this._.rules[q];if(s)i.extend(s,r,true);else this._.rules[q]=r;}}});n.add('menubutton',{requires:['button','menu'],beforeInit:function(q){q.ui.addHandler(5,o.menuButton.handler);}});e.UI_MENUBUTTON=5;(function(){var q=function(r){var s=this._;if(s.state===0)return;s.previousState=s.state;var t=s.menu;if(!t){t=s.menu=new e.menu(r,{panel:{className:r.skinClass+' cke_contextmenu',attributes:{'aria-label':r.lang.common.options}}});t.onHide=i.bind(function(){this.setState(this.modes&&this.modes[r.mode]?s.previousState:0);},this);if(this.onMenu)t.addListener(this.onMenu);}if(s.on){t.hide();return;}this.setState(1);t.show(e.document.getById(this._.id),4);};o.menuButton=i.createClass({base:o.button,$:function(r){var s=r.panel;delete r.panel;this.base(r);this.hasArrow=true;this.click=q;},statics:{handler:{create:function(r){return new o.menuButton(r);}}}});})();n.add('dialogui');(function(){var q=function(y){var B=this;B._||(B._={});B._['default']=B._.initValue=y['default']||'';B._.required=y.required||false;var z=[B._];for(var A=1;A<arguments.length;A++)z.push(arguments[A]);z.push(true);i.extend.apply(i,z);return B._;},r={build:function(y,z,A){return new o.dialog.textInput(y,z,A);
}},s={build:function(y,z,A){return new o.dialog[z.type](y,z,A);}},t={build:function(y,z,A){var B=z.children,C,D=[],E=[];for(var F=0;F<B.length&&(C=B[F]);F++){var G=[];D.push(G);E.push(e.dialog._.uiElementBuilders[C.type].build(y,C,G));}return new o.dialog[z.type](y,E,D,A,z);}},u={isChanged:function(){return this.getValue()!=this.getInitValue();},reset:function(y){this.setValue(this.getInitValue(),y);},setInitValue:function(){this._.initValue=this.getValue();},resetInitValue:function(){this._.initValue=this._['default'];},getInitValue:function(){return this._.initValue;}},v=i.extend({},o.dialog.uiElement.prototype.eventProcessors,{onChange:function(y,z){if(!this._.domOnChangeRegistered){y.on('load',function(){this.getInputElement().on('change',function(){if(!y.parts.dialog.isVisible())return;this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',z);}},true),w=/^on([A-Z]\w+)/,x=function(y){for(var z in y){if(w.test(z)||z=='title'||z=='type')delete y[z];}return y;};i.extend(o.dialog,{labeledElement:function(y,z,A,B){if(arguments.length<4)return;var C=q.call(this,z);C.labelId=i.getNextId()+'_label';var D=this._.children=[],E=function(){var F=[],G=z.required?' cke_required':'';if(z.labelLayout!='horizontal')F.push('<label class="cke_dialog_ui_labeled_label'+G+'" ',' id="'+C.labelId+'"',' for="'+C.inputId+'"',' style="'+z.labelStyle+'">',z.label,'</label>','<div class="cke_dialog_ui_labeled_content" role="presentation">',B.call(this,y,z),'</div>');else{var H={type:'hbox',widths:z.widths,padding:0,children:[{type:'html',html:'<label class="cke_dialog_ui_labeled_label'+G+'"'+' id="'+C.labelId+'"'+' for="'+C.inputId+'"'+' style="'+z.labelStyle+'">'+i.htmlEncode(z.label)+'</span>'},{type:'html',html:'<span class="cke_dialog_ui_labeled_content">'+B.call(this,y,z)+'</span>'}]};e.dialog._.uiElementBuilders.hbox.build(y,H,F);}return F.join('');};o.dialog.uiElement.call(this,y,z,A,'div',null,{role:'presentation'},E);},textInput:function(y,z,A){if(arguments.length<3)return;q.call(this,z);var B=this._.inputId=i.getNextId()+'_textInput',C={'class':'cke_dialog_ui_input_'+z.type,id:B,type:'text'},D;if(z.validate)this.validate=z.validate;if(z.maxLength)C.maxlength=z.maxLength;if(z.size)C.size=z.size;if(z.controlStyle)C.style=z.controlStyle;var E=this,F=false;y.on('load',function(){E.getInputElement().on('keydown',function(H){if(H.data.getKeystroke()==13)F=true;});E.getInputElement().on('keyup',function(H){if(H.data.getKeystroke()==13&&F){y.getButton('ok')&&setTimeout(function(){y.getButton('ok').click();
},0);F=false;}},null,null,1000);});var G=function(){var H=['<div class="cke_dialog_ui_input_',z.type,'" role="presentation"'];if(z.width)H.push('style="width:'+z.width+'" ');H.push('><input ');C['aria-labelledby']=this._.labelId;this._.required&&(C['aria-required']=this._.required);for(var I in C)H.push(I+'="'+C[I]+'" ');H.push(' /></div>');return H.join('');};o.dialog.labeledElement.call(this,y,z,A,G);},textarea:function(y,z,A){if(arguments.length<3)return;q.call(this,z);var B=this,C=this._.inputId=i.getNextId()+'_textarea',D={};if(z.validate)this.validate=z.validate;D.rows=z.rows||5;D.cols=z.cols||20;var E=function(){D['aria-labelledby']=this._.labelId;this._.required&&(D['aria-required']=this._.required);var F=['<div class="cke_dialog_ui_input_textarea" role="presentation"><textarea class="cke_dialog_ui_input_textarea" id="',C,'" '];for(var G in D)F.push(G+'="'+i.htmlEncode(D[G])+'" ');F.push('>',i.htmlEncode(B._['default']),'</textarea></div>');return F.join('');};o.dialog.labeledElement.call(this,y,z,A,E);},checkbox:function(y,z,A){if(arguments.length<3)return;var B=q.call(this,z,{'default':!!z['default']});if(z.validate)this.validate=z.validate;var C=function(){var D=i.extend({},z,{id:z.id?z.id+'_checkbox':i.getNextId()+'_checkbox'},true),E=[],F=i.getNextId()+'_label',G={'class':'cke_dialog_ui_checkbox_input',type:'checkbox','aria-labelledby':F};x(D);if(z['default'])G.checked='checked';if(typeof D.controlStyle!='undefined')D.style=D.controlStyle;B.checkbox=new o.dialog.uiElement(y,D,E,'input',null,G);E.push(' <label id="',F,'" for="',G.id,'">',i.htmlEncode(z.label),'</label>');return E.join('');};o.dialog.uiElement.call(this,y,z,A,'span',null,null,C);},radio:function(y,z,A){if(arguments.length<3)return;q.call(this,z);if(!this._['default'])this._['default']=this._.initValue=z.items[0][1];if(z.validate)this.validate=z.valdiate;var B=[],C=this,D=function(){var E=[],F=[],G={'class':'cke_dialog_ui_radio_item','aria-labelledby':this._.labelId},H=z.id?z.id+'_radio':i.getNextId()+'_radio';for(var I=0;I<z.items.length;I++){var J=z.items[I],K=J[2]!==undefined?J[2]:J[0],L=J[1]!==undefined?J[1]:J[0],M=i.getNextId()+'_radio_input',N=M+'_label',O=i.extend({},z,{id:M,title:null,type:null},true),P=i.extend({},O,{title:K},true),Q={type:'radio','class':'cke_dialog_ui_radio_input',name:H,value:L,'aria-labelledby':N},R=[];if(C._['default']==L)Q.checked='checked';x(O);x(P);if(typeof O.controlStyle!='undefined')O.style=O.controlStyle;B.push(new o.dialog.uiElement(y,O,R,'input',null,Q));
R.push(' ');new o.dialog.uiElement(y,P,R,'label',null,{id:N,'for':Q.id},J[0]);E.push(R.join(''));}new o.dialog.hbox(y,[],E,F);return F.join('');};o.dialog.labeledElement.call(this,y,z,A,D);this._.children=B;},button:function(y,z,A){if(!arguments.length)return;if(typeof z=='function')z=z(y.getParentEditor());q.call(this,z,{disabled:z.disabled||false});e.event.implementOn(this);var B=this;y.on('load',function(E){var F=this.getElement();(function(){F.on('click',function(G){B.fire('click',{dialog:B.getDialog()});G.data.preventDefault();});F.on('keydown',function(G){if(G.data.getKeystroke() in {32:1}){B.click();G.data.preventDefault();}});})();F.unselectable();},this);var C=i.extend({},z);delete C.style;var D=i.getNextId()+'_label';o.dialog.uiElement.call(this,y,C,A,'a',null,{style:z.style,href:'javascript:void(0)',title:z.label,hidefocus:'true','class':z['class'],role:'button','aria-labelledby':D},'<span id="'+D+'" class="cke_dialog_ui_button">'+i.htmlEncode(z.label)+'</span>');},select:function(y,z,A){if(arguments.length<3)return;var B=q.call(this,z);if(z.validate)this.validate=z.validate;B.inputId=i.getNextId()+'_select';var C=function(){var D=i.extend({},z,{id:z.id?z.id+'_select':i.getNextId()+'_select'},true),E=[],F=[],G={id:B.inputId,'class':'cke_dialog_ui_input_select','aria-labelledby':this._.labelId};if(z.size!=undefined)G.size=z.size;if(z.multiple!=undefined)G.multiple=z.multiple;x(D);for(var H=0,I;H<z.items.length&&(I=z.items[H]);H++)F.push('<option value="',i.htmlEncode(I[1]!==undefined?I[1]:I[0]),'" /> ',i.htmlEncode(I[0]));if(typeof D.controlStyle!='undefined')D.style=D.controlStyle;B.select=new o.dialog.uiElement(y,D,E,'select',null,G,F.join(''));return E.join('');};o.dialog.labeledElement.call(this,y,z,A,C);},file:function(y,z,A){if(arguments.length<3)return;if(z['default']===undefined)z['default']='';var B=i.extend(q.call(this,z),{definition:z,buttons:[]});if(z.validate)this.validate=z.validate;var C=function(){B.frameId=i.getNextId()+'_fileInput';var D=f.isCustomDomain(),E=['<iframe frameborder="0" allowtransparency="0" class="cke_dialog_ui_input_file" id="',B.frameId,'" title="',z.label,'" src="javascript:void('];E.push(D?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');E.push(')"></iframe>');return E.join('');};y.on('load',function(){var D=e.document.getById(B.frameId),E=D.getParent();E.addClass('cke_dialog_ui_input_file');});o.dialog.labeledElement.call(this,y,z,A,C);},fileButton:function(y,z,A){if(arguments.length<3)return;
var B=q.call(this,z),C=this;if(z.validate)this.validate=z.validate;var D=i.extend({},z),E=D.onClick;D.className=(D.className?D.className+' ':'')+'cke_dialog_ui_button';D.onClick=function(F){var G=z['for'];if(!E||E.call(this,F)!==false){y.getContentElement(G[0],G[1]).submit();this.disable();}};y.on('load',function(){y.getContentElement(z['for'][0],z['for'][1])._.buttons.push(C);});o.dialog.button.call(this,y,D,A);},html:(function(){var y=/^\s*<[\w:]+\s+([^>]*)?>/,z=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,A=/\/$/;return function(B,C,D){if(arguments.length<3)return;var E=[],F,G=C.html,H,I;if(G.charAt(0)!='<')G='<span>'+G+'</span>';var J=C.focus;if(J){var K=this.focus;this.focus=function(){K.call(this);typeof J=='function'&&J.call(this);this.fire('focus');};if(C.isFocusable){var L=this.isFocusable;this.isFocusable=L;}this.keyboardFocusable=true;}o.dialog.uiElement.call(this,B,C,E,'span',null,null,'');F=E.join('');H=F.match(y);I=G.match(z)||['','',''];if(A.test(I[1])){I[1]=I[1].slice(0,-1);I[2]='/'+I[2];}D.push([I[1],' ',H[1]||'',I[2]].join(''));};})(),fieldset:function(y,z,A,B,C){var D=C.label,E=function(){var F=[];D&&F.push('<legend>'+D+'</legend>');for(var G=0;G<A.length;G++)F.push(A[G]);return F.join('');};this._={children:z};o.dialog.uiElement.call(this,y,C,B,'fieldset',null,null,E);}},true);o.dialog.html.prototype=new o.dialog.uiElement();o.dialog.labeledElement.prototype=i.extend(new o.dialog.uiElement(),{setLabel:function(y){var z=e.document.getById(this._.labelId);if(z.getChildCount()<1)new h.text(y,e.document).appendTo(z);else z.getChild(0).$.nodeValue=y;return this;},getLabel:function(){var y=e.document.getById(this._.labelId);if(!y||y.getChildCount()<1)return '';else return y.getChild(0).getText();},eventProcessors:v},true);o.dialog.button.prototype=i.extend(new o.dialog.uiElement(),{click:function(){var y=this;if(!y._.disabled)return y.fire('click',{dialog:y._.dialog});y.getElement().$.blur();return false;},enable:function(){this._.disabled=false;var y=this.getElement();y&&y.removeClass('cke_disabled');},disable:function(){this._.disabled=true;this.getElement().addClass('cke_disabled');},isVisible:function(){return this.getElement().getFirst().isVisible();},isEnabled:function(){return!this._.disabled;},eventProcessors:i.extend({},o.dialog.uiElement.prototype.eventProcessors,{onClick:function(y,z){this.on('click',z);}},true),accessKeyUp:function(){this.click();},accessKeyDown:function(){this.focus();},keyboardFocusable:true},true);o.dialog.textInput.prototype=i.extend(new o.dialog.labeledElement(),{getInputElement:function(){return e.document.getById(this._.inputId);
},focus:function(){var y=this.selectParentTab();setTimeout(function(){var z=y.getInputElement();z&&z.$.focus();},0);},select:function(){var y=this.selectParentTab();setTimeout(function(){var z=y.getInputElement();if(z){z.$.focus();z.$.select();}},0);},accessKeyUp:function(){this.select();},setValue:function(y){!y&&(y='');return o.dialog.uiElement.prototype.setValue.apply(this,arguments);},keyboardFocusable:true},u,true);o.dialog.textarea.prototype=new o.dialog.textInput();o.dialog.select.prototype=i.extend(new o.dialog.labeledElement(),{getInputElement:function(){return this._.select.getElement();},add:function(y,z,A){var B=new l('option',this.getDialog().getParentEditor().document),C=this.getInputElement().$;B.$.text=y;B.$.value=z===undefined||z===null?y:z;if(A===undefined||A===null){if(g)C.add(B.$);else C.add(B.$,null);}else C.add(B.$,A);return this;},remove:function(y){var z=this.getInputElement().$;z.remove(y);return this;},clear:function(){var y=this.getInputElement().$;while(y.length>0)y.remove(0);return this;},keyboardFocusable:true},u,true);o.dialog.checkbox.prototype=i.extend(new o.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(y,z){this.getInputElement().$.checked=y;!z&&this.fire('change',{value:y});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(y,z){if(!g)return v.onChange.apply(this,arguments);else{y.on('load',function(){var A=this._.checkbox.getElement();A.on('propertychange',function(B){B=B.data.$;if(B.propertyName=='checked')this.fire('change',{value:A.$.checked});},this);},this);this.on('change',z);}return null;}},keyboardFocusable:true},u,true);o.dialog.radio.prototype=i.extend(new o.dialog.uiElement(),{setValue:function(y,z){var A=this._.children,B;for(var C=0;C<A.length&&(B=A[C]);C++)B.getElement().$.checked=B.getValue()==y;!z&&this.fire('change',{value:y});},getValue:function(){var y=this._.children;for(var z=0;z<y.length;z++){if(y[z].getElement().$.checked)return y[z].getValue();}return null;},accessKeyUp:function(){var y=this._.children,z;for(z=0;z<y.length;z++){if(y[z].getElement().$.checked){y[z].getElement().focus();return;}}y[0].getElement().focus();},eventProcessors:{onChange:function(y,z){if(!g)return v.onChange.apply(this,arguments);else{y.on('load',function(){var A=this._.children,B=this;for(var C=0;C<A.length;C++){var D=A[C].getElement();D.on('propertychange',function(E){E=E.data.$;
if(E.propertyName=='checked'&&this.$.checked)B.fire('change',{value:this.getAttribute('value')});});}},this);this.on('change',z);}return null;}},keyboardFocusable:true},u,true);o.dialog.file.prototype=i.extend(new o.dialog.labeledElement(),u,{getInputElement:function(){var y=e.document.getById(this._.frameId).getFrameDocument();return y.$.forms.length>0?new l(y.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(){return this.getInputElement().getParent().$.action;},registerEvents:function(y){var z=/^on([A-Z]\w+)/,A,B=function(D,E,F,G){D.on('formLoaded',function(){D.getInputElement().on(F,G,D);});};for(var C in y){if(!(A=C.match(z)))continue;if(this.eventProcessors[C])this.eventProcessors[C].call(this,this._.dialog,y[C]);else B(this,this._.dialog,A[1].toLowerCase(),y[C]);}return this;},reset:function(){var y=this._,z=e.document.getById(y.frameId),A=z.getFrameDocument(),B=y.definition,C=y.buttons,D=this.formLoadedNumber,E=this.formUnloadNumber,F=y.dialog._.editor.lang.dir,G=y.dialog._.editor.langCode;if(!D){D=this.formLoadedNumber=i.addFunction(function(){this.fire('formLoaded');},this);E=this.formUnloadNumber=i.addFunction(function(){this.getInputElement().clearCustomData();},this);this.getDialog()._.editor.on('destroy',function(){i.removeFunction(D);i.removeFunction(E);});}function H(){A.$.open();if(f.isCustomDomain())A.$.domain=document.domain;var I='';if(B.size)I=B.size-(g?7:0);A.$.write(['<html dir="'+F+'" lang="'+G+'"><head><title></title></head><body style="margin: 0; overflow: hidden; background: transparent;">','<form enctype="multipart/form-data" method="POST" dir="'+F+'" lang="'+G+'" action="',i.htmlEncode(B.action),'">','<input type="file" name="',i.htmlEncode(B.id||'cke_upload'),'" size="',i.htmlEncode(I>0?I:''),'" />','</form>','</body></html>','<script>window.parent.CKEDITOR.tools.callFunction('+D+');','window.onbeforeunload = function() {window.parent.CKEDITOR.tools.callFunction('+E+')}</script>'].join(''));A.$.close();for(var J=0;J<C.length;J++)C[J].enable();};if(f.gecko)setTimeout(H,500);else H();},getValue:function(){return this.getInputElement().$.value||'';},setInitValue:function(){this._.initValue='';},eventProcessors:{onChange:function(y,z){if(!this._.domOnChangeRegistered){this.on('formLoaded',function(){this.getInputElement().on('change',function(){this.fire('change',{value:this.getValue()});},this);},this);this._.domOnChangeRegistered=true;}this.on('change',z);
}},keyboardFocusable:true},true);o.dialog.fileButton.prototype=new o.dialog.button();o.dialog.fieldset.prototype=i.clone(o.dialog.hbox.prototype);e.dialog.addUIElement('text',r);e.dialog.addUIElement('password',r);e.dialog.addUIElement('textarea',s);e.dialog.addUIElement('checkbox',s);e.dialog.addUIElement('radio',s);e.dialog.addUIElement('button',s);e.dialog.addUIElement('select',s);e.dialog.addUIElement('file',s);e.dialog.addUIElement('fileButton',s);e.dialog.addUIElement('html',s);e.dialog.addUIElement('fieldset',t);})();n.add('panel',{beforeInit:function(q){q.ui.addHandler(2,o.panel.handler);}});e.UI_PANEL=2;o.panel=function(q,r){var s=this;if(r)i.extend(s,r);i.extend(s,{className:'',css:[]});s.id=i.getNextId();s.document=q;s._={blocks:{}};};o.panel.handler={create:function(q){return new o.panel(q);}};o.panel.prototype={renderHtml:function(q){var r=[];this.render(q,r);return r.join('');},render:function(q,r){var t=this;var s=t.id;r.push('<div class="',q.skinClass,'" lang="',q.langCode,'" role="presentation" style="display:none;z-index:'+(q.config.baseFloatZIndex+1)+'">'+'<div'+' id=',s,' dir=',q.lang.dir,' role="presentation" class="cke_panel cke_',q.lang.dir);if(t.className)r.push(' ',t.className);r.push('">');if(t.forceIFrame||t.css.length){r.push('<iframe id="',s,'_frame" frameborder="0" role="application" src="javascript:void(');r.push(f.isCustomDomain()?"(function(){document.open();document.domain='"+document.domain+"';"+'document.close();'+'})()':'0');r.push(')"></iframe>');}r.push('</div></div>');return s;},getHolderElement:function(){var q=this._.holder;if(!q){if(this.forceIFrame||this.css.length){var r=this.document.getById(this.id+'_frame'),s=r.getParent(),t=s.getAttribute('dir'),u=s.getParent().getAttribute('class'),v=s.getParent().getAttribute('lang'),w=r.getFrameDocument(),x=i.addFunction(i.bind(function(A){this.isLoaded=true;if(this.onLoad)this.onLoad();},this)),y='<!DOCTYPE html><html dir="'+t+'" class="'+u+'_container" lang="'+v+'">'+'<head>'+'<style>.'+u+'_container{visibility:hidden}</style>'+'</head>'+'<body class="cke_'+t+' cke_panel_frame '+f.cssClass+'" style="margin:0;padding:0"'+' onload="( window.CKEDITOR || window.parent.CKEDITOR ).tools.callFunction('+x+');"></body>'+i.buildStyleHtml(this.css)+'</html>';w.write(y);var z=w.getWindow();z.$.CKEDITOR=e;w.on('key'+(f.opera?'press':'down'),function(A){var D=this;var B=A.data.getKeystroke(),C=D.document.getById(D.id).getAttribute('dir');if(D._.onKeyDown&&D._.onKeyDown(B)===false){A.data.preventDefault();
return;}if(B==27||B==(C=='rtl'?39:37))if(D.onEscape&&D.onEscape(B)===false)A.data.preventDefault();},this);q=w.getBody();q.unselectable();f.air&&i.callFunction(x);}else q=this.document.getById(this.id);this._.holder=q;}return q;},addBlock:function(q,r){var s=this;r=s._.blocks[q]=r instanceof o.panel.block?r:new o.panel.block(s.getHolderElement(),r);if(!s._.currentBlock)s.showBlock(q);return r;},getBlock:function(q){return this._.blocks[q];},showBlock:function(q){var r=this._.blocks,s=r[q],t=this._.currentBlock,u=this.forceIFrame?this.document.getById(this.id+'_frame'):this._.holder;u.getParent().getParent().disableContextMenu();if(t){u.removeAttributes(t.attributes);t.hide();}this._.currentBlock=s;u.setAttributes(s.attributes);e.fire('ariaWidget',u);s._.focusIndex=-1;this._.onKeyDown=s.onKeyDown&&i.bind(s.onKeyDown,s);s.onMark=function(v){u.setAttribute('aria-activedescendant',v.getId()+'_option');};s.onUnmark=function(){u.removeAttribute('aria-activedescendant');};s.show();return s;},destroy:function(){this.element&&this.element.remove();}};o.panel.block=i.createClass({$:function(q,r){var s=this;s.element=q.append(q.getDocument().createElement('div',{attributes:{tabIndex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(r)i.extend(s,r);if(!s.attributes.title)s.attributes.title=s.attributes['aria-label'];s.keys={};s._.focusIndex=-1;s.element.disableContextMenu();},_:{markItem:function(q){var t=this;if(q==-1)return;var r=t.element.getElementsByTag('a'),s=r.getItem(t._.focusIndex=q);if(f.webkit||f.opera)s.getDocument().getWindow().focus();s.focus();t.onMark&&t.onMark(s);}},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var q=this;if(!q.onHide||q.onHide.call(q)!==true)q.element.setStyle('display','none');},onKeyDown:function(q){var v=this;var r=v.keys[q];switch(r){case 'next':var s=v._.focusIndex,t=v.element.getElementsByTag('a'),u;while(u=t.getItem(++s)){if(u.getAttribute('_cke_focus')&&u.$.offsetWidth){v._.focusIndex=s;u.focus();break;}}return false;case 'prev':s=v._.focusIndex;t=v.element.getElementsByTag('a');while(s>0&&(u=t.getItem(--s))){if(u.getAttribute('_cke_focus')&&u.$.offsetWidth){v._.focusIndex=s;u.focus();break;}}return false;case 'click':s=v._.focusIndex;u=s>=0&&v.element.getElementsByTag('a').getItem(s);if(u)u.$.click?u.$.click():u.$.onclick();return false;}return true;}}});n.add('listblock',{requires:['panel'],onLoad:function(){o.panel.prototype.addListBlock=function(q,r){return this.addBlock(q,new o.listBlock(this.getHolderElement(),r));
};o.listBlock=i.createClass({base:o.panel.block,$:function(q,r){var u=this;r=r||{};var s=r.attributes||(r.attributes={});(u.multiSelect=!!r.multiSelect)&&(s['aria-multiselectable']=true);!s.role&&(s.role='listbox');u.base.apply(u,arguments);var t=u.keys;t[40]='next';t[9]='next';t[38]='prev';t[2000+9]='prev';t[32]='click';u._.pendingHtml=[];u._.items={};u._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('</ul>');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=i.addFunction(function(q){var s=this;var r=true;if(s.multiSelect)r=s.toggle(q);else s.mark(q);if(s.onClick)s.onClick(q,r);},this);return this._.click;}},proto:{add:function(q,r,s){var v=this;var t=v._.pendingHtml,u=i.getNextId();if(!v._.started){t.push('<ul role="presentation" class=cke_panel_list>');v._.started=1;v._.size=v._.size||0;}v._.items[q]=u;t.push('<li id=',u,' class=cke_panel_listItem role=presentation><a id="',u,'_option" _cke_focus=1 hidefocus=true title="',s||q,'" href="javascript:void(\'',q,'\')" onclick="CKEDITOR.tools.callFunction(',v._.getClick(),",'",q,"'); return false;\"",' role="option" aria-posinset="'+ ++v._.size+'">',r||q,'</a></li>');},startGroup:function(q){this._.close();var r=i.getNextId();this._.groups[q]=r;this._.pendingHtml.push('<h1 role="presentation" id=',r,' class=cke_panel_grouptitle>',q,'</h1>');},commit:function(){var t=this;t._.close();t.element.appendHtml(t._.pendingHtml.join(''));var q=t._.items,r=t.element.getDocument();for(var s in q)r.getById(q[s]+'_option').setAttribute('aria-setsize',t._.size);delete t._.size;t._.pendingHtml=[];},toggle:function(q){var r=this.isMarked(q);if(r)this.unmark(q);else this.mark(q);return!r;},hideGroup:function(q){var r=this.element.getDocument().getById(this._.groups[q]),s=r&&r.getNext();if(r){r.setStyle('display','none');if(s&&s.getName()=='ul')s.setStyle('display','none');}},hideItem:function(q){this.element.getDocument().getById(this._.items[q]).setStyle('display','none');},showAll:function(){var q=this._.items,r=this._.groups,s=this.element.getDocument();for(var t in q)s.getById(q[t]).setStyle('display','');for(var u in r){var v=s.getById(r[u]),w=v.getNext();v.setStyle('display','');if(w&&w.getName()=='ul')w.setStyle('display','');}},mark:function(q){var t=this;if(!t.multiSelect)t.unmarkAll();var r=t._.items[q],s=t.element.getDocument().getById(r);s.addClass('cke_selected');t.element.getDocument().getById(r+'_option').setAttribute('aria-selected',true);t.element.setAttribute('aria-activedescendant',r+'_option');
t.onMark&&t.onMark(s);},unmark:function(q){var r=this;r.element.getDocument().getById(r._.items[q]).removeClass('cke_selected');r.onUnmark&&r.onUnmark(r._.items[q]);},unmarkAll:function(){var t=this;var q=t._.items,r=t.element.getDocument();for(var s in q)r.getById(q[s]).removeClass('cke_selected');t.onUnmark&&t.onUnmark();},isMarked:function(q){return this.element.getDocument().getById(this._.items[q]).hasClass('cke_selected');},focus:function(q){this._.focusIndex=-1;if(q){var r=this.element.getDocument().getById(this._.items[q]).getFirst(),s=this.element.getElementsByTag('a'),t,u=-1;while(t=s.getItem(++u)){if(t.equals(r)){this._.focusIndex=u;break;}}setTimeout(function(){r.focus();},0);}}}});}});e.themes.add('default',(function(){function q(r,s){var t,u;u=r.config.sharedSpaces;u=u&&u[s];u=u&&e.document.getById(u);if(u){var v='<span class="cke_shared " dir="'+r.lang.dir+'"'+'>'+'<span class="'+r.skinClass+' '+r.id+' cke_editor_'+r.name+'">'+'<span class="'+f.cssClass+'">'+'<span class="cke_wrapper cke_'+r.lang.dir+'">'+'<span class="cke_editor">'+'<div class="cke_'+s+'">'+'</div></span></span></span></span></span>',w=u.append(l.createFromHtml(v,u.getDocument()));if(u.getCustomData('cke_hasshared'))w.hide();else u.setCustomData('cke_hasshared',1);t=w.getChild([0,0,0,0]);!r.sharedSpaces&&(r.sharedSpaces={});r.sharedSpaces[s]=t;r.on('focus',function(){for(var x=0,y,z=u.getChildren();y=z.getItem(x);x++){if(y.type==1&&!y.equals(w)&&y.hasClass('cke_shared'))y.hide();}w.show();});r.on('destroy',function(){w.remove();});}return t;};return{build:function(r,s){var t=r.name,u=r.element,v=r.elementMode;if(!u||v==0)return;if(v==1)u.hide();var w=r.fire('themeSpace',{space:'top',html:''}).html,x=r.fire('themeSpace',{space:'contents',html:''}).html,y=r.fireOnce('themeSpace',{space:'bottom',html:''}).html,z=x&&r.config.height,A=r.config.tabIndex||r.element.getAttribute('tabindex')||0;if(!x)z='auto';else if(!isNaN(z))z+='px';var B='',C=r.config.width;if(C){if(!isNaN(C))C+='px';B+='width: '+C+';';}var D=w&&q(r,'top'),E=q(r,'bottom');D&&(D.setHtml(w),w='');E&&(E.setHtml(y),y='');var F=l.createFromHtml(['<span id="cke_',t,'" class="',r.skinClass,' ',r.id,' cke_editor_',t,'" dir="',r.lang.dir,'" title="',f.gecko?' ':'','" lang="',r.langCode,'"'+(f.webkit?' tabindex="'+A+'"':'')+' role="application"'+' aria-labelledby="cke_',t,'_arialbl"'+(B?' style="'+B+'"':'')+'>'+'<span id="cke_',t,'_arialbl" class="cke_voice_label">'+r.lang.editor+'</span>'+'<span class="',f.cssClass,'" role="presentation"><span class="cke_wrapper cke_',r.lang.dir,'" role="presentation"><table class="cke_editor" border="0" cellspacing="0" cellpadding="0" role="presentation"><tbody><tr',w?'':' style="display:none"',' role="presentation"><td id="cke_top_',t,'" class="cke_top" role="presentation">',w,'</td></tr><tr',x?'':' style="display:none"',' role="presentation"><td id="cke_contents_',t,'" class="cke_contents" style="height:',z,'" role="presentation">',x,'</td></tr><tr',y?'':' style="display:none"',' role="presentation"><td id="cke_bottom_',t,'" class="cke_bottom" role="presentation">',y,'</td></tr></tbody></table><style>.',r.skinClass,'{visibility:hidden;}</style></span></span></span>'].join(''));
F.getChild([1,0,0,0,0]).unselectable();F.getChild([1,0,0,0,2]).unselectable();if(v==1)F.insertAfter(u);else u.append(F);r.container=F;F.disableContextMenu();r.on('contentDirChanged',function(G){var H=(r.lang.dir!=G.data?'add':'remove')+'Class';F.getChild(1)[H]('cke_mixed_dir_content');var I=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];I&&I.getParent().getParent()[H]('cke_mixed_dir_content');});r.fireOnce('themeLoaded');r.fireOnce('uiReady');},buildDialog:function(r){var s=i.getNextNumber(),t=l.createFromHtml(['<div class="',r.id,'_dialog cke_editor_',r.name.replace('.','\\.'),'_dialog cke_skin_',r.skinName,'" dir="',r.lang.dir,'" lang="',r.langCode,'" role="dialog" aria-labelledby="%title#"><table class="cke_dialog',' '+f.cssClass,' cke_',r.lang.dir,'" style="position:absolute" role="presentation"><tr><td role="presentation"><div class="%body" role="presentation"><div id="%title#" class="%title" role="presentation"></div><a id="%close_button#" class="%close_button" href="javascript:void(0)" title="'+r.lang.common.close+'" role="button"><span class="cke_label">X</span></a>'+'<div id="%tabs#" class="%tabs" role="tablist"></div>'+'<table class="%contents" role="presentation">'+'<tr>'+'<td id="%contents#" class="%contents" role="presentation"></td>'+'</tr>'+'<tr>'+'<td id="%footer#" class="%footer" role="presentation"></td>'+'</tr>'+'</table>'+'</div>'+'<div id="%tl#" class="%tl"></div>'+'<div id="%tc#" class="%tc"></div>'+'<div id="%tr#" class="%tr"></div>'+'<div id="%ml#" class="%ml"></div>'+'<div id="%mr#" class="%mr"></div>'+'<div id="%bl#" class="%bl"></div>'+'<div id="%bc#" class="%bc"></div>'+'<div id="%br#" class="%br"></div>'+'</td></tr>'+'</table>',g?'':'<style>.cke_dialog{visibility:hidden;}</style>','</div>'].join('').replace(/#/g,'_'+s).replace(/%/g,'cke_dialog_')),u=t.getChild([0,0,0,0,0]),v=u.getChild(0),w=u.getChild(1);v.unselectable();w.unselectable();return{element:t,parts:{dialog:t.getChild(0),title:v,close:w,tabs:u.getChild(2),contents:u.getChild([3,0,0,0]),footer:u.getChild([3,0,1,0])}};},destroy:function(r){var s=r.container,t=r.element;if(s){s.clearCustomData();s.remove();}if(t){t.clearCustomData();r.elementMode==1&&t.show();delete r.element;}}};})());e.editor.prototype.getThemeSpace=function(q){var r='cke_'+q,s=this._[r]||(this._[r]=e.document.getById(r+'_'+this.name));return s;};e.editor.prototype.resize=function(q,r,s,t){var u=this.container,v=e.document.getById('cke_contents_'+this.name),w=t?u.getChild(1):u;f.webkit&&w.setStyle('display','none');
w.setSize('width',q,true);if(f.webkit){w.$.offsetWidth;w.setStyle('display','');}var x=s?0:(w.$.offsetHeight||0)-(v.$.clientHeight||0);v.setStyle('height',Math.max(r-x,0)+'px');this.fire('resize');};e.editor.prototype.getResizable=function(){return this.container;};e.editor.prototype.esInsertText=function(q){if(this.mode=='enhancedsource'){this.focus();this.fire('saveSnapshot');if(this.savedselection){this.savedselection.select();delete this.savedselection;}this.esInsertAtCursor(q);i.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};e.editor.prototype.esInsertAtCursor=function(q){var r=this.textarea.$,s=r.scrollTop;if(g){r.focus();sel=document.selection.createRange();sel.text=q;sel.select();}else if(r.selectionStart||r.selectionStart=='0'){var t=r.selectionStart,u=r.selectionEnd;r.value=r.value.substring(0,t)+q+r.value.substring(u,r.value.length);if(t==u)this.esSetSelectionRange(t+q.length,u+q.length);else this.esSetCaretToPos(t+q.length);}else r.value+=q;r.scrollTop=s;};e.editor.prototype.esWrapAroundSelection=function(q,r){var w=this;var s=w.textarea.$;if(w.savedselection)w.savedselection.select();var t=s.scrollTop;if(g){s.focus();sel=document.selection.createRange();sel.text=q+sel.text+r;sel.moveStart('character',-r.length);sel.moveEnd('character',-r.length);sel.select();}else if(s.selectionStart||s.selectionStart=='0'){var u=s.selectionStart,v=s.selectionEnd;s.value=s.value.substring(0,u)+q+s.value.substring(u,v)+r+s.value.substring(v,s.value.length);if(u==v)w.esSetCaretToPos(u+q.length);else w.esSetSelectionRange(u+q.length,v+q.length);}s.scrollTop=t;};e.editor.prototype.esGetSelectionText=function(){var q=this.textarea.$;if(g){q.focus();sel=document.selection.createRange();return sel.text;}else if(q.selectionStart||q.selectionStart=='0'){var r=q.selectionStart,s=q.selectionEnd;return q.value.substring(r,s);}};e.editor.prototype.esDeleteSelection=function(){var q=this.textarea.$,r=q.scrollTop;q.focus();if(g){var s=document.selection.createRange();document.selection.clear();}else if(q.selectionStart||q.selectionStart=='0'){var t=q.selectionStart,u=q.selectionEnd;q.value=q.value.substring(0,t)+q.value.substring(u,q.value.length);this.esSetCaretToPos(t);}q.scrollTop=r;};e.editor.prototype.esSetSelectionRange=function(q,r){var s=this.textarea.$;if(s.setSelectionRange){s.focus();s.setSelectionRange(q,r);}else if(s.createTextRange){var t=s.createTextRange();t.collapse(true);t.moveEnd('character',r);t.moveStart('character',q);t.select();}};e.editor.prototype.esSetCaretToPos=function(q){this.esSetSelectionRange(q,q);
};function a(q,r,s){for(var t=0;t<q.toolbox.toolbars.length;t++){var u=q.toolbox.toolbars[t];for(var v=0;v<u.items.length;v++){var w=u.items[v];if(r=='button'&&w.button&&w.button.label==s||r=='combo'&&w.combo&&w.combo.label==s)return w;}}};function b(q,r,s){var t=a(q,'button',r);if(t){var u=e.document.getById(t.id);u.setAttribute('title',s);}};function c(q,r,s){var t=a(q,'button',r);if(t)YAHOO.util.Dom.setStyle(t.id,'display',s);};function d(q){e.on('dialogDefinition',function(r){var s=r.data.name,t=r.data.definition;if(s=='smiley'){t.getContents('tab1').elements[0].html=t.getContents('tab1').elements[0].html.replace(/src="\.\/([a-z]+:\/\/)/gi,'src="$1');var u=t.getContents('tab1').elements[0].onClick;t.getContents('tab1').elements[0].onClick=i.override(u,function(v){return function(w){var x=w.data.getTarget(),y=x.getName();if(y=='a')x=x.getChild(0);else if(y!='img')return;var z=x.getAttribute('title');r.editor.insertHtml(z);this._.dialog.hide();w.data.preventDefault();};});}});};n.add('enhancedsourcearea',{requires:['editingblock','wysiwygarea'],saveSelection:function(q,r){r.savedselection=document.selection.createRange();},init:function(q){var r=n.enhancedsourcearea,s,t=e.document.getWindow();q.textarea=s=new l('textarea');if(g){YAHOO.util.Event.on(q.textarea.$,'keyup',this.saveSelection,q);YAHOO.util.Event.on(q.textarea.$,'click',this.saveSelection,q);YAHOO.util.Event.on(q.textarea.$,'select',this.saveSelection,q);}q.getSelection=i.override(q.getSelection,function(u){return function(){if(this.mode!='enhancedsourcearea')return u.call(this);else return new h.selection(document);};});d(q);q.on('editingBlockReady',function(){var u,v={};b(q,q.lang.source,q.lang.vbulletin.switch_editor_mode_source);c(q,q.lang.vbulletin.email,'none');q.addMode('enhancedsource',{load:function(w,x){c(q,q.lang.vbulletin.email,'');b(q,q.lang.source,q.lang.vbulletin.switch_editor_mode_wysiwyg);if(YAHOO.util.Dom.get(q.editorid+'_mode'))YAHOO.util.Dom.get(q.editorid+'_mode').value=0;if(g&&f.version<8)w.setStyle('position','relative');s.setAttributes({dir:q.config.contentsLangDirection,tabIndex:f.webkit?-1:q.tabIndex,role:'textbox','aria-label':q.lang.editorTitle.replace('%1',q.name)});s.addClass('cke_source');s.addClass('cke_enable_context_menu');this.setupCommandOverrides();var y={width:f.ie7Compat?'99%':'100%',height:'100%','min-width':'100%','max-width':'100%',resize:'none',outline:'none','text-align':q.config.contentsLangDirection=='ltr'?'left':'right'};if(g){y.width=w.$.clientHeight+'px';
y.height=w.$.clientWidth+'px';u=function(){s.hide();s.setStyle('height',w.$.clientHeight+'px');s.setStyle('width',w.$.clientWidth+'px');s.show();};q.on('resize',u);t.on('resize',u);setTimeout(u,0);}else s.on('mousedown',function(A){A.data.stopPropagation();});w.setHtml('');w.append(s);s.setStyles(y);q.fire('ariaWidget',s);s.on('blur',function(){q.focusManager.blur();});s.on('focus',function(){q.focusManager.focus();});q.mayBeDirty=true;this.loadData(x);var z=q.keystrokeHandler;if(z)z.attach(s);setTimeout(function(){q.mode='enhancedsource';q.getCommand('enhancedsource').setState(q.mode=='enhancedsource'?1:2);q.fire('mode');},f.gecko||f.webkit?100:0);},loadData:function(w){s.setValue(w);q.fire('dataReady');},loadSnapshotData:function(w){s.setValue(w);},getData:function(){return s.getValue();},getSnapshotData:function(){return s.getValue();},unload:function(w){b(q,q.lang.source,q.lang.vbulletin.switch_editor_mode_source);if(YAHOO.util.Dom.get(q.editorid+'_mode'))YAHOO.util.Dom.get(q.editorid+'_mode').value=1;c(q,q.lang.vbulletin.email,'none');this.restoreDefaultCommands();s.clearCustomData();s.remove();if(u){q.removeListener('resize',u);t.removeListener('resize',u);}if(g&&f.version<8)w.removeStyle('position');},focus:function(){s.focus();},setupCommandOverrides:function(){this.overrideCommands={bold:function(B){if(vB_Editor[B.editorid].get_button('bold'))B.esWrapAroundSelection('[B]','[/B]');},italic:function(B){if(vB_Editor[B.editorid].get_button('italic'))B.esWrapAroundSelection('[I]','[/I]');},underline:function(B){if(vB_Editor[B.editorid].get_button('underline'))B.esWrapAroundSelection('[U]','[/U]');},justifyleft:function(B){B.esWrapAroundSelection('[LEFT]','[/LEFT]');},justifycenter:function(B){B.esWrapAroundSelection('[CENTER]','[/CENTER]');},justifyright:function(B){B.esWrapAroundSelection('[RIGHT]','[/RIGHT]');},indent:function(B){B.esWrapAroundSelection('[INDENT]','[/INDENT]');},Quote:function(B){B.esWrapAroundSelection('[QUOTE]','[/QUOTE]');},Code:function(B){B.esWrapAroundSelection('[CODE]','[/CODE]');},Html:function(B){B.esWrapAroundSelection('[HTML]','[/HTML]');},Php:function(B){B.esWrapAroundSelection('[PHP]','[/PHP]');},subscript:function(B){B.esWrapAroundSelection('[SUB]','[/SUB]');},superscript:function(B){B.esWrapAroundSelection('[SUP]','[/SUP]');},horizontalrule:function(B){B.esInsertAtCursor('[HR][/HR]');},PageBreak:function(B){B.esInsertAtCursor('[PAGE][/PAGE]');},PreviewBreak:function(B){B.esInsertAtCursor('[PRBREAK][/PRBREAK]');},vbimage:function(B){var C=v.vbimage;
if(g){B.savedselection=document.selection.createRange();C.exec(B);}else C.exec(B);},iespell:function(B){try{eval("new ActiveXObject('ieSpell.ieSpellExtension').CheckDocumentNode(editor.textarea.$);");}catch(C){if(C.number==-2146827859&&confirm(B.lang.vbulletin.iespell_not_installed))window.open('http://www.iespell.com/download.php');}},videotag:function(B){var C=v.videotag;if(g){B.savedselection=document.selection.createRange();C.exec(B);}else C.exec(B);},numberedlist:function(B){var C=B.esGetSelectionText();B.esInsertAtCursor('[LIST=1]\n');if(C){var D=C.split('\n');for(var E in D)B.esInsertAtCursor('[*]'+D[E]+'\n');}else do{var F=prompt(B.config.vbulletin.phrase.enter_list_item,'');if(typeof F=='string')B.esInsertAtCursor('[*]'+F+'\n');}while(F)B.esInsertAtCursor('[/LIST]\n');},bulletedlist:function(B){var C=B.esGetSelectionText();B.esInsertAtCursor('[LIST]\n');if(C){var D=C.split('\n');for(var E in D)B.esInsertAtCursor('[*]'+D[E]+'\n');}else do{var F=prompt(B.config.vbulletin.phrase.enter_list_item,'');if(typeof F=='string')B.esInsertAtCursor('[*]'+F+'\n');}while(F)B.esInsertAtCursor('[/LIST]\n');},link:function(B){var C=prompt(B.lang.vbulletin.enter_link_url,'http://');if(typeof C=='string'&&C.length>0&&C!='http://'){var D=B.esGetSelectionText();if(D)B.esWrapAroundSelection('[URL="'+C+'"]','[/URL]');else B.esInsertAtCursor('[URL="'+C+'"]'+C+'[/URL]');}},Email:function(B){var C=prompt(B.lang.vbulletin.enter_the_email_address);if(typeof C=='string'&&C.length>0){var D=B.esGetSelectionText();if(D)B.esWrapAroundSelection('[EMAIL="'+C+'"]','[/EMAIL]');else B.esInsertAtCursor('[EMAIL="'+C+'"]'+C+'[/EMAIL]');}}};v.insertHtml=q.insertHtml;q.insertHtml=q.esInsertText;v.insertText=q.insertText;q.insertText=q.esInsertText;for(var w in this.overrideCommands){v[w]=q.getCommand(w);q.addCommand(w,{modes:{enhancedsource:1},exec:this.overrideCommands[w]});}for(var x in q.config.vbulletin.bbcodecache){var y=q.config.vbulletin.bbcodecache[x];v[y.title]=q.getCommand(y.title);q.addCommand(y.title,{tagname:y.bbcodetag.toUpperCase(),twoparams:y.twoparams,modes:{enhancedsource:1},exec:function(B){var D=this;if(D.twoparams=='1'){var C=prompt(B.lang.vbulletin.enter_tag_option.replace(/\%1\$s/,'['+D.tagname+']'));if(typeof C=='string'&&C.length>0)B.esWrapAroundSelection('['+D.tagname+'='+C+']','[/'+D.tagname+']');else B.esWrapAroundSelection('['+D.tagname+']','[/'+D.tagname+']');}else B.esWrapAroundSelection('['+D.tagname+']','[/'+D.tagname+']');}});}var z=a(q,'combo',q.lang.font.label);
if(z){z.combo.modes.enhancedsource=1;v.font=z.combo.onClick;z.combo.onClick=function(B,C){if(q.savedselection)q.savedselection.select();q.esWrapAroundSelection('[FONT='+B+']','[/FONT]');};}var A=a(q,'combo',q.lang.fontSize.label);if(A){A.combo.modes.enhancedsource=1;v.size=A.combo.onClick;A.combo.onClick=function(B,C){if(q.savedselection)q.savedselection.select();q.esWrapAroundSelection('[SIZE='+B+']','[/SIZE]');};}this.setupColorOverride();q.getCommand('smiley').modes.enhancedsource=1;q.getCommand('openAttachmentWindow').modes.enhancedsource=1;q.getCommand('vbimage').modes.enhancedsource=1;q.getCommand('videotag').modes.enhancedsource=1;q.getCommand('undo').modes.enhancedsource=1;q.getCommand('redo').modes.enhancedsource=1;q.getCommand('iespell').modes.enhancedsource=1;},setupColorOverride:function(){var w=a(q,'button',q.lang.colorButton.textColorTitle);if(w){w.button.modes.enhancedsource=1;delete w.button._.panel;e.vbtextcolor.applyLastColor=i.override(e.vbtextcolor.applyLastColor,function(z){return function(A){if(q.mode=='enhancedsource'&&e.vbtextcolor.lastColor){q.esWrapAroundSelection('[COLOR="'+e.vbtextcolor.lastColor+'"]','[/COLOR]');A.cancel();A.stop();A.data.preventDefault(true);return false;}else z.call(this,A);};});var x=e.document.getById(w.id),y=x.getChild(0);y.on('click',e.vbtextcolor.applyLastColor,null,null,0);w.button.onBlock=i.override(w.button.onBlock,function(z){return function(A,B){z.call(this,A,B);if(q.mode=='enhancedsource'){var C=i.addFunction(function(E,F){if(E!='?'){if(q.savedselection)q.savedselection.select();e.vbtextcolor.setLastColor(E);}else{var G=arguments.callee;function H(I){this.removeListener('ok',H);this.removeListener('cancel',H);if(I.name=='ok'){var J=this.getContentElement('picker','selectedColor').getValue();q.esWrapAroundSelection('[COLOR="'+J+'"]','[/COLOR]');}};q.openDialog('colordialog',function(){this.on('ok',H);this.on('cancel',H);});return;}if(E!=null)q.esWrapAroundSelection('[COLOR="'+E+'"]','[/COLOR]');}),D=B.element.getHtml();D=D.replace(/callFunction\(\d+/g,'callFunction('+C);B.element.setHtml(D);}};});}},restoreDefaultCommands:function(){for(var w in v){if(w=='insertHtml')q.insertHtml=v[w];else if(w=='insertText')q.insertText=v[w];else if(w=='font')a(q,'combo',q.lang.font.label).combo.onClick=v.font;else if(w=='size')a(q,'combo',q.lang.fontSize.label).combo.onClick=v.size;else q._.commands[w]=v[w];}var x=a(q,'button',q.lang.colorButton.textColorTitle);if(x)delete x.button._.panel;}});});q.addCommand('enhancedsource',r.commands.enhancedsource);
if(q.ui.addButton)q.ui.addButton('EnhancedSource',{label:q.lang.source,command:'enhancedsource'});q.on('mode',function(){q.getCommand('enhancedsource').setState(q.mode=='enhancedsource'?1:2);});setTimeout(function(){q.fire('enhancedReady');},0);}});n.enhancedsourcearea={commands:{enhancedsource:{modes:{wysiwyg:1,enhancedsource:1},editorFocus:false,exec:function(q){if(q.mode=='wysiwyg')q.fire('saveSnapshot');q.getCommand('enhancedsource').setState(0);q.setMode(q.mode=='enhancedsource'?'wysiwyg':'enhancedsource');},canUndo:false}}};(function(){var q=function(){};q.prototype={create:function(){return window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');},parseRequestData:function(s){var t=null;if(typeof s=='string')t=s;else if(typeof s=='object'){t=[];for(property in s){if(s[property])var u=PHP.urlencode(s[property]);else var u='';t.push(property+'='+u);}t=t.join('&');}return t;},open:function(s){var t=this.create();t.open(s.type,s.url,s.async);if(s.type&&s.type.toUpperCase()=='POST')t.setRequestHeader('Content-type','application/x-www-form-urlencoded');else s.type='GET';if((typeof s.async=='undefined'||s.async!=false)&&s.callback)t.onreadystatechange=s.callback;t.send(this.parseRequestData(s.data));return t;}};e.vbajax=new q();function r(s){try{s=decodeURI(s);}catch(v){}var t=s.match(/&#([0-9]+);/g);if(t)for(var u=0;typeof t[u]!='undefined';u++){if(submatch=t[u].match(/^&#([0-9]+);$/))s=s.replace(submatch[0],String.fromCharCode(submatch[1]));}return s;};n.add('bbcode',{init:function(s){var t=s.dataProcessor=new e.bbcodeDataProcessor(s);}});e.bbcodeDataProcessor=function(s){var t=this;t.editor=s;t.writer=new e.htmlWriter();t.dataFilter=new e.htmlParser.filter();t.htmlFilter=new e.htmlParser.filter();};e.bbcodeDataProcessor.prototype={doServerParse:function(s,t){var y=this;if(s.length>0){var u={towysiwyg:t,message:s,'do':'editorswitch',allowsmilie:1,parsetype:PHP.htmlspecialchars(y.editor.config.parsetype),securitytoken:y.editor.config.vbulletin.securitytoken};if(y.editor.config.ajax_extra)for(id in y.editor.config.ajax_extra)u[id]=y.editor.config.ajax_extra[id];var v=e.vbajax.open({url:'ajax.php',type:'POST',data:u,async:false,dataType:'xml'}).responseXML,w=fetch_tags(v,'message')[0];if(w&&w.firstChild)var x=r(v.getElementsByTagName('message')[0].firstChild.nodeValue);else x='';}else var x=s;return x;},toHtml:function(s,t){if(this.editor.hitServer!=false)s=this.doServerParse(s,1);s=s.replace(/<table(.*?)width=(["'])(.+?)\2/gi,function(u,v,w,x){if(!x.match(/%/))x+='px';
return '<table '+v+' style="width: '+x+'"';});s=s.replace(/<b>/gi,'<strong>');s=s.replace(/<\/b>/gi,'</strong>');s=s.replace(/<i>/gi,'<em>');s=s.replace(/<\/i>/gi,'</em>');return s;},toDataFormat:function(s,t,u){var y=this;s=s.replace(/<div.*>(.+?)<\/div>/gi,'');if(t=='p'){s=s.replace(/<br><\/p>/gi,'<br>');s=s.replace(/<p>/gi,'');}var v=y.editor.document.getElementsByTag('table');for(var w=0;w<v.count();w++){var x=v.getItem(w);x.setAttribute('width',x.getStyle('width').replace(/px/,''));}s=y.editor.document.getBody().getHtml();s=s.replace(/<a .*?_cke_saved_href=(["'])(.+?)\1.*?>(.+?)<\/a>/gi,'<a href="$2">$3</a>');if(!u){s=y.doServerParse(s,0);for(var w=0;w<y.editor.config.smiley_images.length;w++){path=y.editor.config.smiley_images[w].replace(/\//g,'\\/');text=y.editor.config.smiley_descriptions[w];s=s.replace(new RegExp('\\[IMG\\].*?'+PHP.preg_quote(path)+'\\[\\/IMG\\]','gi'),text);}}return s;},getAutoSaveData:function(){var s=/(^|<body\b[^>]*>)\s*<(p|div|address|h\d|center)[^>]*>\s*(?:<br[^>]*>|&nbsp;|\u00A0|&#160;)?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,t=this.editor.config.enterMode!=2?this.editor.config.enterMode==3?'div':'p':false,u=this.editor.document.getBody().getHtml();if(f.gecko)u=u.replace(/<br>(?=\s*(:?$|<\/body>))/,'');u=this.toDataFormat(u,t,true);if(this.editor.config.ignoreEmptyParagraph)u=u.replace(s,function(v,w){return w;});return u;}};})();(function(){function q(t,u,v){for(var w=0;w<t.toolbox.toolbars.length;w++){var x=t.toolbox.toolbars[w];for(var y=0;y<x.items.length;y++){var z=x.items[y];if(u=='button'&&z.button&&z.button.label==v)return z;}}};function r(t,u){this.editor=t;e.dialog.add('attachment',u+'dialogs/attachment.js?v='+SIMPLEVERSION);t.addCommand('openAttachmentConfig',new e.dialogCommand('attachment'));};function s(t,u){this.editor=t;this.attachmentConfig=u;};s.prototype={windows:[],exec:function(t){var v=this;v.content=m.content;if(AJAX_Compatible&&v.content.enhanced==1){var u=!t.config.nobbcode?v.content.insertinline:0;v.open_window('newattachment.php?'+SESSIONURL+'do=assetmanager&'+PHP.unhtmlspecialchars(v.content.values)+'&contenttypeid='+v.content.contenttypeid+'&poststarttime='+v.content.poststarttime+'&posthash='+v.content.posthash+'&insertinline='+u,725,520,v.content.contenttypeid+'_'+v.content.posthash);}else v.open_window('newattachment.php?'+SESSIONURL+PHP.unhtmlspecialchars(v.content.values)+'&contenttypeid='+v.content.contenttypeid+'&poststarttime='+v.content.poststarttime+'&posthash='+v.content.posthash,480,480,v.content.posthash);
},open_window:function(t,u,v,w){var x=this;if(x.windows[w]&&x.windows[w].closed==false)x.windows[w].focus();else x.windows[w]=openWindow(t,u,v,'Attach'+w);},insert_attachment:function(t,u){this.editor.insert_attachment(t,u);}};e.editor.prototype.insert_attachment=function(t,u){var A=this;var v=u!=0?'[ATTACH=CONFIG]'+t+'[/ATTACH]':'[ATTACH]'+t+'[/ATTACH]';if(A.mode=='wysiwyg'&&f.gecko&&parseInt(navigator.productSub)<=20100924&&parseInt(navigator.productSub)>=20100721){var w=A.dataProcessor.toHtml(v),x=A.getSelection(),y=x.createBookmarks(),z=new l('span');z.setHtml(w);z.insertBefore(y[0].startNode);z.remove(true);x.selectBookmarks(y);}else A.insertHtml(v);};n.add('attachment',{init:function(t){var u,v,w=new r(t,t.config.vbPluginPath+'attachment/'),x=new s(t,w);window.ckeattachment=x;t.addCommand('openAttachmentWindow',x);var y=function(F){t.execCommand('openAttachmentWindow');F.cancel();F.stop();F.data.preventDefault(true);return false;},z,A,B;t.on('instanceReady',function(F){B=q(t,'button',t.config.vbulletin.phrase.attachments);if(B){var G=e.document.getById(B.id);z=G.getChild(0);z.on('click',y,null,null,1);A=G.getChild(2);A.on('click',function(H){if(vB_Attachments.attachments.length==0||t.config.nobbcode)y(H);},null,null,1);B.button.onOpen=function(){if(u){u.element.setHtml(E());v.element.getFirst().addClass('cke_attach');}};}},this);var C=i.addFunction(function(F){t.insert_attachment(F);}),D=i.addFunction(function(){if(vB_Attachments)for(var F in vB_Attachments.attachments)t.insert_attachment(F);});function E(){var F=[];if(vB_Attachments){var G=0;for(var H in vB_Attachments.attachments){G++;F.push('<a href="" onclick="CKEDITOR.tools.callFunction(',C,', ',H,');return false;">');F.push(vB_Attachments.attachments[H].html);F.push('</a>');}if(G>1)F.push('<div class="attach_insert_all" onclick="CKEDITOR.tools.callFunction(',D,')">',t.lang.vbulletin.insert_all,'</div>');}return F.join('');};t.ui.add('Attach',4,{label:t.config.vbulletin.phrase.attachments,title:t.config.vbulletin.phrase.attachments,className:'cke_button_openAttachmentWindow',modes:{wysiwyg:1,enhancedsource:1},panel:{css:t.config.vbulletin.bburl+'/css.php?sheet=bbcode.css,editor.css,popupmenu.css,reset-fonts.css,vbulletin.css,vbulletin-chrome.css,vbulletin-formcontrols.css',attributes:{role:'listbox','aria-label':t.config.vbulletin.phrase.attachments},onLoad:function(){v=B.button._.panel;if(v)v.element.getFirst().addClass('cke_attach');}},onBlock:function(F,G){v=F;u=G;u.autoSize=true;u.element.addClass('editorpopupbody');
v.element.getFirst().addClass('cke_attach');u.element.getDocument().getBody().setStyle('overflow','hidden');if(u.element.getDocument().getHead().getChild(0))u.element.getDocument().getHead().getChild(0).remove();var H=u.keys,I=t.lang.dir=='rtl';H[I?37:39]='next';H[40]='next';H[9]='next';H[I?39:37]='prev';H[38]='prev';H[2000+9]='prev';H[32]='click';}});}});})();h.range.prototype.wrapSelectionWith=function(q,r){var v=this;var s,t,u;v.enlarge(1);s=l.createFromHtml(q,v.document);t=l.createFromHtml(r,v.document);u=v.clone();u.collapse();u.insertNode(t);if(v.collapsed)v.moveToPosition(t,3);u=v.clone();u.collapse(true);u.insertNode(s);if(v.collapsed)v.moveToPosition(s,4);if(!v.collapsed){v.setEndBefore(t);v.setStartAfter(s);}};e.editor.prototype.getSelectedText=function(){if(g)return this.getSelection().document.$.selection.createRange().text;else return this.getSelection().getNative();};e.editor.prototype.wrapSelectionWith=function(q,r){var u=this;if(u.mode=='wysiwyg'){if(g)u.focus();var s=u.getSelection().getRanges();for(var t=0;t<s.length;t++)s[t].wrapSelectionWith(q,r);u.getSelection().selectRanges(s);}else if(u.mode=='enhancedsource')u.esWrapAroundSelection(q,r);};n.add('codetags',{requires:['button'],init:function(q){var r=q.config.vbulletin.phrase,s=function(A,B,C,D,E){q.addCommand(A,{exec:function(G){if(D=='1'){var H=prompt(G.lang.vbulletin.enter_tag_option.replace(/\%1\$s/,'['+C+']'));if(typeof H=='string'&&H.length>0)G.wrapSelectionWith('['+C+'='+H+']','[/'+C+']');else G.wrapSelectionWith('['+C+']','[/'+C+']');}else G.wrapSelectionWith('['+C+']','[/'+C+']');}});var F={label:B,command:A};if(E)F.icon=E;q.ui.addButton(A,F);},t=function(A,B,C){q.addCommand(A,{exec:function(D){if(D.mode=='wysiwyg'){var E=D.document.getElementsByTag('hr');for(var F=0;F<E.count();F++){var G=E.getItem(F);if(G.hasClass('previewbreak')){alert(r.this_message_already_contains_a_preview_break);return;}}}D.insertHtml('['+C+'][/'+C+']');}});q.ui.addButton(A,{label:B,command:A});},u=function(A,B,C){q.addCommand(A,{exec:function(D){D.insertHtml('['+C+']'+D.getSelectedText()+'[/'+C+']');}});q.ui.addButton(A,{label:B,command:A});},v=function(A,B){q.addCommand(A,{exec:function(C){try{eval("new ActiveXObject('ieSpell.ieSpellExtension').CheckDocumentNode(editor.document.$.body);");}catch(D){if(D.number==-2146827859&&confirm(C.lang.vbulletin.iespell_not_installed))window.open('http://www.iespell.com/download.php');}}});q.ui.addButton(A,{label:B,command:A});},w=function(A,B){q.addCommand(A,{exec:function(C){}});
q.ui.addButton(A,{label:B,command:A});},r=q.config.vbulletin.phrase;s('Quote',r.wrap_quote_tags,'QUOTE');s('Code',r.wrap_code_tags,'CODE');s('Html',r.wrap_html_tags,'HTML');s('Php',r.wrap_php_tags,'PHP');t('PreviewBreak',r.insert_preview_break,'PRBREAK');u('PageBreak',r.insert_page_break,'PAGE');v('iespell',q.lang.vbulletin.spell_check);w('Email',q.lang.vbulletin.email);for(var x in q.config.vbulletin.bbcodecache){var y=q.config.vbulletin.bbcodecache[x],z=y.buttonimage;if(z.indexOf(':/')==-1&&z.indexOf('/')!==0)z=q.config.baseHref+z;s(y.title,r.wrap_x_tags.replace(/\%1\$s/,y.bbcodetag),y.bbcodetag.toUpperCase(),y.twoparams,z);}}});(function(){n.add('videotag',{init:function(q){var r='videotag';e.dialog.add(r,q.config.vbPluginPath+'videotag/dialogs/videotag.js?v='+SIMPLEVERSION);q.addCommand(r,new e.dialogCommand(r));q.ui.addButton('Video',{label:q.config.vbulletin.phrase.insert_video,command:r});}});})();(function(){n.add('tablebuttons',{requires:['tabletools'],init:function(q){var r=q.lang.table;q.ui.addButton('InsertRowBefore',{label:r.row.insertBefore,command:'vbRowInsertBefore'});q.addCommand('vbRowInsertBefore',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);if(!v)return;s.getCommand('rowInsertBefore').exec();}});q.ui.addButton('InsertRowAfter',{label:r.row.insertAfter,command:'vbRowInsertAfter'});q.addCommand('vbRowInsertAfter',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);if(!v)return;s.getCommand('rowInsertAfter').exec();}});q.ui.addButton('DeleteRow',{label:r.row.deleteRow,command:'vbRowDelete'});q.addCommand('vbRowDelete',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);if(!v)return;s.getCommand('rowDelete').exec();}});q.ui.addButton('InsertColumnBefore',{label:r.column.insertBefore,command:'vbColumnInsertBefore'});q.addCommand('vbColumnInsertBefore',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);if(!v)return;s.getCommand('columnInsertBefore').exec();}});q.ui.addButton('InsertColumnAfter',{label:r.column.insertAfter,command:'vbColumnInsertAfter'});q.addCommand('vbColumnInsertAfter',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);if(!v)return;s.getCommand('columnInsertAfter').exec();}});q.ui.addButton('DeleteColumn',{label:r.column.deleteColumn,command:'vbColumnDelete'});q.addCommand('vbColumnDelete',{exec:function(s){var t=s.getSelection(),u=t&&t.getStartElement(),v=u&&u.getAscendant('table',1);
if(!v)return;s.getCommand('columnDelete').exec();}});q.addCommand('vbTableProperties',{exec:function(s){if(g){s.selectedTable=null;var t=s.getSelection(),u=null;if(t){var v=t.getRanges();if(u=t.getSelectedElement())s.selectedTable=u.getAscendant('table',true);else if(v&&v.length>0){if(f.webkit)v[0].shrink(1);var w=v[0].getCommonAncestor(true);s.selectedTable=w.getAscendant('table',true);}}}s.getCommand('tableProperties').exec();}});q.ui.addButton('TableProperties',{label:r.menu,command:'vbTableProperties'});q.ui.addButton('DeleteTable',{label:r.deleteTable,command:'tableDelete'});}});})();(function(){n.add('smiliebox',{init:function(q){var r=YAHOO.util.Dom.getElementsByClassName('smiliebox');if(r.length>0)YAHOO.util.Dom.getElementsBy(function(s){return true;},'img',r[0],function(s){YAHOO.util.Event.addListener(s,'click',function(t){q.insertHtml(YAHOO.util.Dom.getAttribute(s,'alt'));});});}});})();(function(){var q={},r={};function s(u){u.button.click=i.override(u.button.click,function(v){return function(w){if(!q[u.id]||new Date().getTime()-q[u.id]>1500){q[u.id]=new Date().getTime();v.call(u.button,w);}};});};function t(){for(var u in o.button._.instances){if(!r[o.button._.instances[u].id]){s(o.button._.instances[u]);r[o.button._.instances[u].id]=1;}}};n.add('vbbutton',{requires:['button'],init:function(u){u.on('instanceReady',t,this);if(g)o.button.prototype.render=function(v,w){var x=f,y=this._.id=i.getNextId(),z='',A=this.command,B,C;this._.editor=v;var D={id:y,button:this,editor:v,focus:function(){var G=e.document.getById(y);G.focus();},execute:function(){this.button.click(v);}};D.clickFn=B=i.addFunction(D.execute,D);D.index=C=o.button._.instances.push(D)-1;if(this.modes){var E={};v.on('beforeModeUnload',function(){E[v.mode]=this._.state;},this);v.on('mode',function(){var G=v.mode;this.setState(this.modes[G]?E[G]!=undefined?E[G]:2:0);},this);}else if(A){A=v.getCommand(A);if(A){A.on('state',function(){this.setState(A.state);},this);z+='cke_'+(A.state==1?'on':A.state==0?'disabled':'off');}}if(!A)z+='cke_off';if(this.className)z+=' '+this.className;w.push('<span class="cke_button'+(this.icon&&this.icon.indexOf('.png')==-1?' cke_noalphafix':'')+'">','<a id="',y,'" class="',z,'"',x.gecko&&x.version>=10900&&!x.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+y+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(x.opera||x.gecko&&x.mac)w.push(' onkeypress="return false;"');
if(x.gecko)w.push(' onblur="this.style.cssText = this.style.cssText;"');w.push(' onkeydown="return CKEDITOR.ui.button._.keydown(',C,', event);" onfocus="return CKEDITOR.ui.button._.focus(',C,', event);" onclick="CKEDITOR.tools.callFunction(',B,', this); return false;"><span class="cke_icon"');if(this.icon){var F=(this.iconOffset||0)*-16;w.push(' style="background-image:url(',e.getUrl(this.icon),');background-position:0 '+F+'px;"');w.push('><span class="cke_icon_image custom">&nbsp;</span></span><span id="',y,'_label" class="cke_label">',this.label,'</span>');}else w.push('><span class="cke_icon_image">&nbsp;</span></span><span id="',y,'_label" class="cke_label">',this.label,'</span>');if(this.hasArrow)w.push('<span class="cke_buttonarrow">'+(f.hc?'&#9660;':'&nbsp;')+'</span>');w.push('</a>','</span>');if(this.onRender)this.onRender();return D;};}});})();(function(){n.add('vbimage',{init:function(q){q.on('doubleclick',function(s){s.cancel();s.stop();return false;},null,null,1);var r='vbimage';e.dialog.add(r,q.config.vbPluginPath+'vbimage/dialogs/image.js?v='+SIMPLEVERSION);q.addCommand(r,new e.dialogCommand(r));q.ui.addButton('Image',{label:q.lang.common.image,command:r});}});})();(function(){function q(r,s){s=s===undefined||s;var t;if(s)t=r.getComputedStyle('text-align');else{while(!r.hasAttribute||!(r.hasAttribute('align')||r.getStyle('text-align'))){var u=r.getParent();if(!u)break;r=u;}t=r.getStyle('text-align')||r.getAttribute('align')||'';}t&&(t=t.replace(/-moz-|-webkit-|start|auto/i,''));!t&&s&&(t=r.getComputedStyle('direction')=='rtl'?'right':'left');return t;};n.add('vbjustify',{requires:['justify'],init:function(r){var s=function(){var J=this;var x=r.getSelection(),y=r.config.enterMode;if(!x)return;var z=x.createBookmarks(),A=x.getRanges(true),B=J.cssClassName,C,D,E=r.config.useComputedState;E=E===undefined||E;for(var F=A.length-1;F>=0;F--){C=A[F].createIterator();C.enlargeBr=y!=2;while(D=C.getNextParagraph(y==1?'p':'div')){D.removeAttribute('align');D.removeStyle('text-align');var G=B&&(D.$.className=i.ltrim(D.$.className.replace(J.cssClassRegex,''))),H=J.state==2&&(!E||q(D,true)!=J.value);if(B){if(H)D.addClass(B);else if(!G)D.removeAttribute('class');}else if(H)if(D.getName()=='li'){var I=new l('p');I.setStyle('text-align',J.value);I.setStyle('margin',0);D.moveChildren(I);D.append(I);}else D.setStyle('text-align',J.value);}}r.focus();r.forceNextSelectionCheck();x.selectBookmarks(z);},t=r.getCommand('justifyleft'),u=r.getCommand('justifycenter'),v=r.getCommand('justifyright'),w=r.getCommand('justifyblock');
if(t)t.exec=s;if(u)u.exec=s;if(v)v.exec=s;if(w)w.exec=s;r.on('mode',function(){if(r.mode=='wysiwyg'){if(t)r.addCommand('justifyleft',t);if(u)r.addCommand('justifycenter',u);if(v)r.addCommand('justifyright',v);if(w)r.addCommand('justifyblock',w);}});}});})();n.add('vblink',{init:function(q){var r='vblink';q.addCommand('link',new e.dialogCommand('link'));q.addCommand('anchor',new e.dialogCommand('anchor'));q.addCommand('unlink',new e.unlinkCommand());q.ui.addButton('Link',{label:q.lang.link.toolbar,command:'link'});q.ui.addButton('Unlink',{label:q.lang.unlink,command:'unlink'});q.ui.addButton('Anchor',{label:q.lang.anchor.toolbar,command:'anchor'});e.dialog.add('link',q.config.vbPluginPath+'vblink/dialogs/link.js');e.dialog.add('anchor',q.config.vbPluginPath+'vblink/dialogs/anchor.js');var s=q.lang.dir=='rtl'?'right':'left';q.addCss('img.cke_anchor{background-image: url('+e.getUrl(q.config.vbPluginPath+'vblink/images/anchor.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 18px !important;'+'height: 18px !important;'+'}\n'+'a.cke_anchor'+'{'+'background-image: url('+e.getUrl(q.config.vbPluginPath+'vblink/images/anchor.gif')+');'+'background-position: '+s+' center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'padding-'+s+': 18px;'+'}');q.on('selectionChange',function(t){var u=q.getCommand('unlink'),v=t.data.path.lastElement&&t.data.path.lastElement.getAscendant('a',true);if(v&&v.getName()=='a'&&v.getAttribute('href'))u.setState(2);else u.setState(0);});q.on('doubleclick',function(t){var u=n.vblink.getSelectedLink(q)||t.data.element;if(!u.isReadOnly())if(u.is('a'))t.data.dialog=u.getAttribute('name')&&!u.getAttribute('href')?'anchor':'link';else if(u.is('img')&&u.data('cke-real-element-type')=='anchor')t.data.dialog='anchor';});if(q.addMenuItems)q.addMenuItems({anchor:{label:q.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:q.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:q.lang.unlink,command:'unlink',group:'link',order:5}});if(q.contextMenu)q.contextMenu.addListener(function(t,u){if(!t||t.isReadOnly())return null;var v=t.is('img')&&t.data('cke-real-element-type')=='anchor';if(!v){if(!(t=n.vblink.getSelectedLink(q)))return null;v=t.getAttribute('name')&&!t.getAttribute('href');}return v?{anchor:2}:{link:2,unlink:2};});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter;if(s)s.addRules({elements:{a:function(t){var u=t.attributes;if(u.name&&!u.href)return q.createFakeParserElement(t,'cke_anchor','anchor');
}}});},requires:['fakeobjects']});n.vblink={getSelectedLink:function(q){try{var r=q.getSelection();if(r.getType()==3){var s=r.getSelectedElement();if(s.is('a'))return s;}var t=r.getRanges(true)[0];t.shrink(2);var u=t.getCommonAncestor();return u.getAscendant('a',true);}catch(v){return null;}}};e.unlinkCommand=function(){};e.unlinkCommand.prototype={exec:function(q){var r=q.getSelection(),s=r.createBookmarks(),t=r.getRanges(),u,v;for(var w=0;w<t.length;w++){u=t[w].getCommonAncestor(true);v=u.getAscendant('a',true);if(!v)continue;t[w].selectNodeContents(v);}r.selectRanges(t);q.document.$.execCommand('unlink',false,null);r.selectBookmarks(s);},startDisabled:true};i.extend(m,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){n.add('vbremoveformat',{requires:['selection'],init:function(q){var r=q.addCommand('removeFormat',n.removeformat.commands.removeformat);r.modes={wysiwyg:1,enhancedsource:1};q.ui.addButton('RemoveFormat',{label:q.lang.removeFormat,command:'removeFormat'});q._.removeFormat={filters:[]};}});n.removeformat={commands:{removeformat:{exec:function(q){if(q.mode=='wysiwyg'){var r=q._.removeFormatRegex||(q._.removeFormatRegex=new RegExp('^(?:'+q.config.removeFormatTags.replace(/,/g,'|')+')$','i')),s=q._.removeAttributes||(q._.removeAttributes=q.config.removeFormatAttributes.split(',')),t=n.removeformat.filter,u=q.getSelection().getRanges(1),v=u.createIterator(),w;while(w=v.getNextRange()){if(!w.collapsed)w.enlarge(1);var x=w.createBookmark(),y=x.startNode,z=x.endNode,A,B=function(N){var O=new h.elementPath(N),P=O.elements;for(var Q=1,R;R=P[Q];Q++){if(R.equals(O.block)||R.equals(O.blockLimit))break;if(r.test(R.getName())&&t(q,R))N.breakParent(R);}};B(y);if(z){B(z);A=y.getNextSourceNode(true,1);while(A){if(A.equals(z))break;var C=A.getNextSourceNode(false,1);if(!(A.getName()=='img'&&A.data('cke-realelement'))&&t(q,A))if(r.test(A.getName()))A.remove(1);else{A.removeAttributes(s);q.fire('removeFormatCleanup',A);}A=C;}}w.moveToBookmark(x);}q.getSelection().selectRanges(u);}else{var D=function(N,O,P){if(N.setSelectionRange){N.focus();N.setSelectionRange(O,P);}else if(N.createTextRange){var Q=N.createTextRange();Q.collapse(true);Q.moveEnd('character',P);Q.moveStart('character',O);Q.select();}},E=function(N,O){D(N,O,O);},F=function(N,O,P){var Q='['+N+'=',R='[/'+N+']';if(typeof P=='undefined')P=-1;while((startindex=PHP.stripos(O,Q))!==false&&P!=0){P--;if((stopindex=PHP.stripos(O,R))!==false){var S=PHP.stripos(O,']',startindex);if(S!==false&&S>startindex&&S<stopindex){var T=O.substr(S+1,stopindex-S-1);
O=O.substr(0,startindex)+T+O.substr(stopindex+R.length);}else break;}else break;}return O;},G=function(N,O,P){var Q='['+N+']',R='[/'+N+']';if(typeof P=='undefined')P=-1;while((startindex=PHP.stripos(O,Q))!==false&&P!=0){P--;if((stopindex=PHP.stripos(O,R))!==false){var S=O.substr(startindex+Q.length,stopindex-startindex-Q.length);O=O.substr(0,startindex)+S+O.substr(stopindex+R.length);}else break;}return O;},H=function(N){var O=['b','i','u'],P=['font','color','size'];if(!N)return N;var Q;for(Q in O){if(YAHOO.lang.hasOwnProperty(O,Q))N=G(O[Q],N);}for(Q in P){if(YAHOO.lang.hasOwnProperty(P,Q))N=F(P[Q],N);}return N;},I=q.textarea.$;if(g){I.focus();sel=document.selection.createRange();var J=sel.text,K=H(J);sel.text=K;sel.moveStart('character',-K.length);sel.select();}else if(I.selectionStart||I.selectionStart=='0'){var L=I.selectionStart,M=I.selectionEnd,J=I.value.substring(L,M),K=H(J);I.value=I.value.substring(0,L)+K+I.value.substring(M,I.value.length);if(L==M)E(I,L);else D(I,L,L+K.length);}}}}},filter:function(q,r){var s=q._.removeFormat.filters;for(var t=0;t<s.length;t++){if(s[t](r)===false)return false;}return true;}};})();e.editor.prototype.addRemoveFormatFilter=function(q){this._.removeFormat.filters.push(q);};m.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';m.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';n.add('vbresize',{init:function(q){if(q.config.resize_enabled!==false)q.on('resize',function(){var r=e.document.getById('cke_contents_'+q.name),s=r.getStyle('height');if(s&&q.config.vbtype){expires=new Date();expires.setTime(expires.getTime()+31536000000);set_subcookie('editor_height',q.config.vbtype,s,expires);}});}});n.add('vbtable',{init:function(q){var r=n.table,s=q.lang.table;q.addCommand('table',new e.dialogCommand('table'));q.addCommand('tableProperties',new e.dialogCommand('tableProperties'));q.ui.addButton('Table',{label:s.toolbar,command:'table'});e.dialog.add('table',q.config.vbPluginPath+'vbtable/dialogs/table.js?v='+SIMPLEVERSION);e.dialog.add('tableProperties',q.config.vbPluginPath+'vbtable/dialogs/table.js?v='+SIMPLEVERSION);if(q.addMenuItems)q.addMenuItems({table:{label:s.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:s.deleteTable,command:'tableDelete',group:'table',order:1}});q.on('doubleclick',function(t){var u=t.data.element;if(u.is('table'))t.data.dialog='tableProperties';});if(q.contextMenu)q.contextMenu.addListener(function(t,u){if(!t||t.isReadOnly())return null;
var v=t.hasAscendant('table',1);if(v)return{tabledelete:2,table:2};return null;});}});(function(){function q(r,s,t){for(var u=0;u<r.toolbox.toolbars.length;u++){var v=r.toolbox.toolbars[u];for(var w=0;w<v.items.length;w++){var x=v.items[w];if(s=='button'&&x.button&&x.button.label==t)return x;}}};e.vbtextcolor={};n.add('vbtextcolor',{requires:['panelbutton','floatpanel','styles'],init:function(r){var s=r.config,t=r.lang.colorButton,u,v,w;r.on('instanceReady',function(A){var B=q(r,'button',r.lang.colorButton.textColorTitle);if(B){var C=e.document.getById(B.id);v=C.getChild(0);v.on('click',e.vbtextcolor.applyLastColor,null,null,1);w=C.getChild(2);}},this);if(!f.hc){x('TextColor','fore',t.textColorTitle);x('BGColor','back',t.bgColorTitle);}e.vbtextcolor.setLastColor=function(A){e.vbtextcolor.lastColor=A;if(w)if(A)w.setStyle('background-color',A);else w.removeStyle('background-color');};e.vbtextcolor.applyLastColor=function(A){if(e.vbtextcolor.lastColor){i.callFunction(u,e.vbtextcolor.lastColor,'fore');A.cancel();A.stop();A.data.preventDefault(true);return false;}};function x(A,B,C){var D=i.getNextId()+'_colorBox';r.ui.add(A,4,{label:C,title:C,className:'cke_button_'+A.toLowerCase(),modes:{wysiwyg:1},panel:{css:r.skin.editor.css,attributes:{role:'listbox','aria-label':t.panelTitle}},onBlock:function(E,F){F.autoSize=true;F.element.addClass('cke_colorblock');F.element.setHtml(y(E,B,D));F.element.getDocument().getBody().setStyle('overflow','hidden');o.fire('ready',this);var G=F.keys,H=r.lang.dir=='rtl';G[H?37:39]='next';G[40]='next';G[9]='next';G[H?39:37]='prev';G[38]='prev';G[2000+9]='prev';G[32]='click';},onOpen:function(){var E=r.getSelection(),F=E&&E.getStartElement(),G=new h.elementPath(F),H;if(r.mode=='wysiwyg'){F=G.block||G.blockLimit||r.document.getBody();do H=F&&F.getComputedStyle(B=='back'?'background-color':'color')||'transparent';while(B=='back'&&H=='transparent'&&F&&(F=F.getParent()))}if(!H||H=='transparent')H='#FFFFFF';this._.panel._.iframe.getFrameDocument().getById(D).setStyle('background-color',H);}});};function y(A,B,C){var D=[],E=s.colorButton_colors.split(','),F=E.length+(s.colorButton_enableMore?2:1);u=i.addFunction(function(L,M){if(L!='?')e.vbtextcolor.setLastColor(L);else{var N=arguments.callee;function O(Q){this.removeListener('ok',O);this.removeListener('cancel',O);Q.name=='ok'&&N(this.getContentElement('picker','selectedColor').getValue(),M);};r.openDialog('colordialog',function(){this.on('ok',O);this.on('cancel',O);});return;}r.focus();A.hide();
r.fire('saveSnapshot');new e.style(s['colorButton_'+M+'Style'],{color:'inherit'}).remove(r.document);if(L){var P=s['colorButton_'+M+'Style'];P.childRule=M=='back'?function(Q){return z(Q);}:function(Q){return Q.getName()!='a'||z(Q);};new e.style(P,{color:L}).apply(r.document);}r.fire('saveSnapshot');});D.push('<a class="cke_colorauto" _cke_focus=1 hidefocus=true title="',t.auto,'" onclick="CKEDITOR.tools.callFunction(',u,",null,'",B,"');return false;\" href=\"javascript:void('",t.auto,'\')" role="option" aria-posinset="1" aria-setsize="',F,'"'+(r.mode!='wysiwyg'?' style="display:none"':'')+'>'+'<table role="presentation" cellspacing=0 cellpadding=0 width="100%">'+'<tr>'+'<td>'+'<span class="cke_colorbox" id="',C,'"></span></td><td colspan=7 align=center>',t.auto,'</td></tr></table></a><table role="presentation" cellspacing=0 cellpadding=0 width="100%">');for(var G=0;G<E.length;G++){if(G%8===0)D.push('</tr><tr>');var H=E[G].split('/'),I=H[0],J=H[1]||I;if(!H[1])I='#'+I.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var K=r.lang.colors[J]||J;D.push('<td><a class="cke_colorbox" _cke_focus=1 hidefocus=true title="',K,'" onclick="CKEDITOR.tools.callFunction(',u,",'",I,"','",B,"'); return false;\" href=\"javascript:void('",K,'\')" role="option" aria-posinset="',G+2,'" aria-setsize="',F,'"><span class="cke_colorbox" style="background-color:#',J,'"></span></a></td>');}if(s.colorButton_enableMore===undefined||s.colorButton_enableMore)D.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',t.more,'" onclick="CKEDITOR.tools.callFunction(',u,",'?','",B,"');return false;\" href=\"javascript:void('",t.more,"')\"",' role="option" aria-posinset="',F,'" aria-setsize="',F,'">',t.more,'</a></td>');D.push('</tr></table>');return D.join('');};function z(A){return A.getAttribute('contentEditable')=='false'||A.getAttribute('data-nostyle');};}});m.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';m.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};m.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};})();(function(){n.add('vbundo',{requires:['selection','wysiwygarea','enhancedsourcearea'],init:function(w){var x=new s(w),y=w.addCommand('undo',{exec:function(){if(x.undo()){w.selectionChange();
this.fire('afterUndo');}},state:0,canUndo:false}),z=w.addCommand('redo',{exec:function(){if(x.redo()){w.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});x.onChange=function(){y.setState(x.undoable()?2:0);z.setState(x.redoable()?2:0);};function A(B){if(x.enabled&&B.data.command.canUndo!==false)x.save();};w.on('beforeCommandExec',A);w.on('afterCommandExec',A);w.on('saveSnapshot',function(){x.save();});w.on('enhancedReady',function(){w.textarea.on('keydown',function(B){if(!B.data.$.ctrlKey&&!B.data.$.metaKey)x.type(B);});});w.on('contentDom',function(){w.document.on('keydown',function(B){if(!B.data.$.ctrlKey&&!B.data.$.metaKey)x.type(B);});w.textarea.on('keydown',function(B){if(!B.data.$.ctrlKey&&!B.data.$.metaKey)x.type(B);});});w.on('beforeModeUnload',function(){(w.mode=='wysiwyg'||w.mode=='enhancedsource')&&x.save(true);});w.on('mode',function(){x.enabled=w.mode=='wysiwyg'||w.mode=='enhancedsource';x.reset();x.onChange();});w.ui.addButton('Undo',{label:w.lang.undo,command:'undo'});w.ui.addButton('Redo',{label:w.lang.redo,command:'redo'});w.resetUndo=function(){x.reset();w.fire('saveSnapshot');};w.on('updateSnapshot',function(){if(x.currentImage&&new q(w).equals(x.currentImage))setTimeout(function(){x.update();},0);});}});n.undo={};var q=n.undo.Image=function(w){this.editor=w;w.fire('beforeUndoImage');var x=w.getSnapshot(),y=x&&w.getSelection();g&&x&&(x=x.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=x;this.bookmarks=y&&y.createBookmarks2(true);w.fire('afterUndoImage');},r=/\b(?:href|src|name)="[^"]*?"/gi;q.prototype={equals:function(w,x){var y=this.contents,z=w.contents;if(g&&(f.ie7Compat||f.ie6Compat)){y=y.replace(r,'');z=z.replace(r,'');}if(y!=z)return false;if(x)return true;var A=this.bookmarks,B=w.bookmarks;if(A||B){if(!A||!B||A.length!=B.length)return false;for(var C=0;C<A.length;C++){var D=A[C],E=B[C];if(D.startOffset!=E.startOffset||D.endOffset!=E.endOffset||!i.arrayCompare(D.start,E.start)||!i.arrayCompare(D.end,E.end))return false;}}return true;}};function s(w){this.editor=w;this.reset();};var t={8:1,46:1},u={16:1,17:1,18:1},v={37:1,38:1,39:1,40:1};s.prototype={type:function(w){var x=w&&w.data.getKey(),y=x in u,z=x in t,A=this.lastKeystroke in t,B=z&&x==this.lastKeystroke,C=x in v,D=this.lastKeystroke in v,E=!z&&!C,F=z&&!B,G=!(y||this.typing)||E&&(A||D);if(G||F){var H=new q(this.editor);i.setTimeout(function(){var J=this;var I=J.editor.getSnapshot();if(g)I=I.replace(/\s+data-cke-expando=".*?"/g,'');if(H.contents!=I){J.typing=true;
if(!J.save(false,H,false))J.snapshots.splice(J.index+1,J.snapshots.length-J.index-1);J.hasUndo=true;J.hasRedo=false;J.typesCount=1;J.modifiersCount=1;J.onChange();}},0,this);}this.lastKeystroke=x;if(z){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save(false,null,false);this.modifiersCount=1;}}else if(!C){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var w=this;w.lastKeystroke=0;w.snapshots=[];w.index=-1;w.limit=w.editor.config.undoStackSize||20;w.currentImage=null;w.hasUndo=false;w.hasRedo=false;w.resetType();},resetType:function(){var w=this;w.typing=false;delete w.lastKeystroke;w.typesCount=0;w.modifiersCount=0;},fireChange:function(){var w=this;w.hasUndo=!!w.getNextImage(true);w.hasRedo=!!w.getNextImage(false);w.resetType();w.onChange();},save:function(w,x,y){var A=this;var z=A.snapshots;if(!x)x=new q(A.editor);if(x.contents===false)return false;if(A.currentImage&&x.equals(A.currentImage,w))return false;z.splice(A.index+1,z.length-A.index-1);if(z.length==A.limit)z.shift();A.index=z.push(x)-1;A.currentImage=x;if(y!==false)A.fireChange();return true;},restoreImage:function(w){var y=this;y.editor.loadSnapshot(w.contents);if(w.bookmarks)y.editor.getSelection().selectBookmarks(w.bookmarks);else if(g){var x=document.body.createTextRange();x.collapse(true);x.select();}y.index=w.index;y.update();y.fireChange();},getNextImage:function(w){var B=this;var x=B.snapshots,y=B.currentImage,z,A;if(y)if(w)for(A=B.index-1;A>=0;A--){z=x[A];if(!y.equals(z,true)){z.index=A;return z;}}else for(A=B.index+1;A<x.length;A++){z=x[A];if(!y.equals(z,true)){z.index=A;return z;}}return null;},redoable:function(){return this.enabled&&this.hasRedo;},undoable:function(){return this.enabled&&this.hasUndo;},undo:function(){var x=this;if(x.undoable()){x.save(true);var w=x.getNextImage(true);if(w)return x.restoreImage(w),true;}return false;},redo:function(){var x=this;if(x.redoable()){x.save(true);if(x.redoable()){var w=x.getNextImage(false);if(w)return x.restoreImage(w),true;}}return false;},update:function(){var w=this;w.snapshots.splice(w.index,1,w.currentImage=new q(w.editor));}};})();})();
