/* Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'99GE',version:'3.0.1',revision:'4391',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d)if(b[e]==undefined)b[e]=d[e];};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e=0;n--)if(k[n].priority<=h){k.splice(n+1,0,m);return;}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.ELEMENT_MODE_NONE=0;a.ELEMENT_MODE_REPLACE=1;a.ELEMENT_MODE_APPENDTO=2;a.editor=function(b,c,d){var e=this;e._={instanceConfig:b,element:c}; e.elementMode=d||0;a.event.call(e);e._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getElementById(b);if(!d){var e=0,f=document.getElementsByName(b);while((d=f[e++])&&(d.tagName.toLowerCase()!='textarea')){}}if(!d)throw '[CKEDITOR.editor.replace] The element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendTo=function(b,c){if(typeof b!='object'){b=document.getElementById(b);if(!b)throw '[CKEDITOR.editor.appendTo] The element with id "'+b+'" was not found.';}return new a.editor(c,b,2);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireOnce:function(b,c){return a.event.prototype.fireOnce.call(this,b,c,this);}};a.event.implementOn(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexOf(' applewebkit/')>-1,air:b.indexOf(' adobeair/')>-1,mac:b.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',isCustomDomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='Gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parseFloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentMode;d.ie8Compat=document.documentMode==8;d.ie7Compat=e==7&&!document.documentMode||document.documentMode==7;d.ie6Compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*(100)+ +(f[2]||0);}}if(d.opera)e=parseFloat(c.version());if(d.air)e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.isCompatible=d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false;d.cssClass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssClass+=' cke_browser_quirks';if(d.ie){d.cssClass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssClass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssClass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementOn(a);a.loadFullCore=function(){if(a.status!='basic_ready'){a.loadFullCore._load=true;return;}delete a.loadFullCore;var e=document.createElement('script');e.type='text/javascript'; e.src=a.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(e);};a.loadFullCoreTimeout=0;a.replaceClass='ckeditor';a.replaceByClassEnabled=true;var d=function(e,f,g){if(b.isCompatible){if(a.loadFullCore)a.loadFullCore();var h=g(e,f);a.add(h);return h;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendTo=function(e,f){return d(e,f,a.editor.appendTo);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceAll=function(){var e=document.getElementsByTagName('textarea');for(var f=0;f'?function(k){return g(k).replace(/
/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g(' ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},getNextNumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h]*>/,'');var i=j.$.ownerDocument.createElement('div');i.appendChild(j.$.cloneNode(true));return i.innerHTML;},setHtml:function(i){return this.$.innerHTML=i;},setText:function(i){h.prototype.setText=this.$.innerText!=undefined?function(j){return this.$.innerText=j;}:function(j){return this.$.textContent=j;};return this.setText(i);},getAttribute:(function(){var i=function(j){return this.$.getAttribute(j,2);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){var l=this;switch(j){case 'class':j='className';break;case 'tabindex':var k=i.call(l,j);if(k!==0&&l.$.tabIndex===0)k=null;return k;break;case 'checked':return l.$.checked;break;case 'style':return l.$.style.cssText;}return i.call(l,j);};else return i;})(),getChildren:function(){return new d.nodeList(this.$.childNodes);},getComputedStyle:c?function(i){return this.$.currentStyle[e.cssStyleToDomStyle(i)];}:function(i){return this.getWindow().$.getComputedStyle(this.$,'').getPropertyValue(i);},getDtd:function(){var i=f[this.getName()];this.getDtd=function(){return i;};return i;},getElementsByTag:g.prototype.getElementsByTag,getTabIndex:c?function(){var i=this.$.tabIndex;if(i===0&&!f.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabIndex;if(i==undefined){i=parseInt(this.getAttribute('tabindex'),10);if(isNaN(i))i=-1;}return i;}:function(){return this.$.tabIndex;},getText:function(){return this.$.textContent||this.$.innerText||'';},getWindow:function(){return this.getDocument().getWindow();},getId:function(){return this.$.id||null;},getNameAtt:function(){return this.$.name||null;},getName:function(){var i=this.$.nodeName.toLowerCase();if(c){var j=this.$.scopeName;if(j!='HTML')i=j.toLowerCase()+':'+i; }return(this.getName=function(){return i;})();},getValue:function(){return this.$.value;},getFirst:function(){var i=this.$.firstChild;return i?new d.node(i):null;},getLast:function(i){var j=this.$.lastChild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getPrevious(i);return k;},getStyle:function(i){return this.$.style[e.cssStyleToDomStyle(i)];},is:function(){var i=this.getName();for(var j=0;j1||i.length==1&&i[0].nodeName!='_cke_expando';},hasAttribute:function(i){var j=this.$.attributes.getNamedItem(i);return!!(j&&j.specified);},hide:function(){this.setStyle('display','none');},moveChildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastChild)i.insertBefore(k.removeChild(l),i.firstChild);else while(l=k.firstChild)i.appendChild(k.removeChild(l));},show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var i=function(j,k){this.$.setAttribute(j,k);return this;};if(c&&(b.ie7Compat||b.ie6Compat))return function(j,k){var l=this;if(j=='class')l.$.className=k;else if(j=='style')l.$.style.cssText=k;else if(j=='tabindex')l.$.tabIndex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setAttributes:function(i){for(var j in i)this.setAttribute(j,i[j]);return this;},setValue:function(i){this.$.value=i;return this;},removeAttribute:(function(){var i=function(j){this.$.removeAttribute(j);};if(c&&(b.ie7Compat||b.ie6Compat))return function(j){if(j=='class')j='className';else if(j=='tabindex')j='tabIndex'; i.call(this,j);};else return i;})(),removeAttributes:function(i){for(var j=0;j=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+i+')');}else this.setStyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.MozUserSelect='none';}:b.webkit?function(){this.$.style.KhtmlUserSelect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:j.unselectable='on';}}},getPositionedAncestor:function(){var i=this;while(i.getName()!='html'){if(i.getComputedStyle('position')!='static')return i;i=i.getParent();}return null;},getDocumentPosition:function(i){var D=this;var j=0,k=0,l=D.getDocument().getBody(),m=D.getDocument().$.compatMode=='BackCompat',n=D.getDocument();if(document.documentElement.getBoundingClientRect){var o=D.$.getBoundingClientRect(),p=n.$,q=p.documentElement,r=q.clientTop||l.$.clientTop||0,s=q.clientLeft||l.$.clientLeft||0,t=true;if(c){var u=n.getDocumentElement().contains(D),v=n.getBody().contains(D);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollLeft||l.$.scrollLeft);j-=s;k=o.top+(!m&&q.scrollTop||l.$.scrollTop);k-=r;}}else{var w=D,x=null,y;while(w&&!(w.getName()=='body'||w.getName()=='html')){j+=w.$.offsetLeft-w.$.scrollLeft;k+=w.$.offsetTop-w.$.scrollTop;if(!w.equals(D)){j+=w.$.clientLeft||0;k+=w.$.clientTop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollLeft;k-=z.$.scrollTop;z=z.getParent();}x=w;w=(y=w.$.offsetParent)?new h(y):null;}}if(i){var A=D.getWindow(),B=i.getWindow();if(!A.equals(B)&&A.$.frameElement){var C=new h(A.$.frameElement).getDocumentPosition(i);j+=C.x;k+=C.y;}}if(!document.documentElement.getBoundingClientRect)if(b.gecko&&!m){j+=D.$.clientLeft?1:0;k+=D.$.clientTop?1:0;}return{x:j,y:k};},scrollIntoView:function(i){var o=this;var j=o.getWindow(),k=j.getViewPaneSize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetHeight||0;l+=parseInt(o.getComputedStyle('marginBottom')||0,10)||0;}var m=o.getDocumentPosition();l+=m.y;l=l<0?0:l;var n=j.getScrollPosition().y; if(l>n||lwindow.setTimeout(function(){window.close();},50);")');}return i&&new g(i.contentWindow.document);},copyAttributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l0&&j)j=j.childNodes[i.shift()];return j?new d.node(j):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(i){if(!i.data.getTarget().hasClass('cke_enable_context_menu'))i.data.preventDefault();});}});a.command=function(i,j){this.uiItems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorFocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorFocus:true,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setState(!i.preserveState||typeof i.previousState=='undefined'?2:i.previousState);},disable:function(){this.setState(0);},setState:function(i){var j=this;if(j.state==i)return false;j.previousState=j.state;j.state=i;j.fire('state');return true;},toggleState:function(){var i=this;if(i.state==2)i.setState(1);else if(i.state==1)i.setState(2);}};a.event.implementOn(a.command.prototype,true);a.ENTER_P=1;a.ENTER_BR=2;a.ENTER_DIV=3;a.config={customConfig:a.getUrl('config.js'),autoUpdateElement:true,baseHref:'',contentsCss:a.basePath+'contents.css',contentsLangDirection:'ltr',language:'',defaultLanguage:'en',enterMode:1,shiftEnterMode:2,corePlugins:'',docType:'',fullPage:false,height:200,plugins:'about,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j};return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getFirst().addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getFirst().removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-uk':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o){var p=typeof l=='string';if(p)l=[l];if(!n)n=a;var q=l.length,r=[],s=[],t=function(y){if(m)if(p)m.call(n,y);else m.call(n,r,s);};if(q===0){t(true);return;}var u=function(y,z){(z?r:s).push(y);if(--q<=0)t(z);},v=function(y,z){j[y]=1;var A=k[y];delete k[y];for(var B=0;B1)return;var A=new h('script');A.setAttributes({type:'text/javascript',src:y});if(m)if(c)A.$.onreadystatechange=function(){if(A.$.readyState=='loaded'||A.$.readyState=='complete'){A.$.onreadystatechange=null;v(y,true);}};else{A.$.onload=function(){setTimeout(function(){v(y,true);},0);};A.$.onerror=function(){v(y,false);};}A.appendTo(a.document.getHead());};for(var x=0;x0){s(t);a.imageCacher.load(t,function(){l[o]=1;n(o,p,q);});return;}l[o]=1;}p=r[p];var u=!p||!!p._isLoaded;if(u)q&&q();else{var v=p._pending||(p._pending=[]);v.push(q);if(v.length>1)return;var w=!p.css||!p.css.length,x=!p.js||!p.js.length,y=function(){if(w&&x){p._isLoaded=1;for(var A=0;A=0?x.langCode:J[0];if(!I.lang[L])G.push(a.getUrl(K+'lang/'+L+'.js')); else{e.extend(x.lang,I.lang[L]);L=null;}}F.push(L);E.push(I);}a.scriptLoader.load(G,function(){var M=['beforeInit','init','afterInit'];for(var N=0;N]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(n){var A=this;var o,p,q=0,r;while(o=A._.htmlPartsRegex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else A.onText(t);}q=A._.htmlPartsRegex.lastIndex;if(p=o[1]){p=p.toLowerCase();if(r&&f.$cdata[p]){A.onCDATA(r.join(''));r=null;}if(!r){A.onTagClose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.toLowerCase();var u={},v,w=o[4],x=!!(w&&w.charAt(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].toLowerCase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}A.onTagOpen(p,u,x);if(!r&&f.$cdata[p])r=[];continue;}if(p=o[2])A.onComment(p);}if(n.length>q)A.onText(n.substring(q,n.length));}};})();a.htmlParser.comment=function(l){this.value=l;this._={isBlockLike:false};};a.htmlParser.comment.prototype={type:8,writeHtml:function(l,m){var n=this.value;if(m){if(!(n=m.onComment(n)))return;if(typeof n!='string'){n.writeHtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlParser.text=function(m){this.value=m;this._={isBlockLike:false};};a.htmlParser.text.prototype={type:3,writeHtml:function(m,n){var o=this.value;if(n&&!(o=n.onText(o,this)))return;m.text(o); }};})();(function(){a.htmlParser.cdata=function(l){this.value=l;};a.htmlParser.cdata.prototype={type:3,writeHtml:function(l){l.write(this.value);}};})();a.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var l={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listItem;a.htmlParser.fragment.fromHtml=function(p,q){var r=new a.htmlParser(),s=[],t=new a.htmlParser.fragment(),u=[],v=t,w=false,x;function y(C){if(u.length>0)for(var D=0;D0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){for(var r=0,s=this.children.length;rn?1:0;};a.htmlParser.element.prototype={type:1,add:a.htmlParser.fragment.prototype.add,clone:function(){return new a.htmlParser.element(this.name,this.attributes);},writeHtml:function(m,n){var o=this.attributes;if(o._cke_replacedata){m.write(o._cke_replacedata);return;}var p=this,q=p.name,r,s;if(n){for(;;){if(!(q=n.onElementName(q)))return;p.name=q;if(!(p=n.onElement(p)))return;if(p.name==q)break;q=p.name;if(!q){a.htmlParser.fragment.prototype.writeHtml.apply(p,arguments);return;}}o=p.attributes;}m.openTag(q,o);if(m.sortAttributes){var t=[];for(r in o){s=o[r];if(n&&(!(r=n.onAttributeName(r))||(s=n.onAttribute(p,r,s))===(false)))continue;t.push([r,s]);}t.sort(l);for(var u=0,v=t.length;u=0;u--){var x=r[u];x.pri=s;q.splice(t,0,x);}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];},getHtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadFullCore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentInstance!=l){a.currentInstance=l;a.fire('currentInstance');}});l.on('blur',function(){if(a.currentInstance==l){a.currentInstance=null;a.fire('currentInstance');}});};a.remove=function(l){delete a.instances[l.name];};a.TRISTATE_ON=1;a.TRISTATE_OFF=2;a.TRISTATE_DISABLED=0;(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getChildren();for(var q=0,r=p.count();q0&&z.getChild(s.startOffset-1);this._.guardRTL=function(C,D){return(!D||!z.equals(C))&&((!A||!C.equals(A))&&(C.type!=1||C.getName()!='body'));};}var B=p?this._.guardRTL:this._.guardLTR;if(u)t=function(C,D){if(B(C,D)===false)return false;return u(C);};else t=B;if(this.current)r=this.current[w](false,v,t);else if(p){r=s.endContainer;if(s.endOffset>0){r=r.getChild(s.endOffset-1);if(t(r)===false)r=null;}else r=t(r)===false?null:r.getPreviousSourceNode(true,v,t);}else{r=s.startContainer; r=r.getChild(s.startOffset);if(r){if(t(r)===false)r=null;}else r=t(s.startContainer)===false?null:s.startContainer.getNextSourceNode(true,v,t);}while(r&&!this._.end){this.current=r;if(!this.evaluator||this.evaluator(r)!==false){if(!q)return r;}else if(q&&this.evaluator)return false;r=r[w](false,v,t);}this.end();return this.current=null;};function m(p){var q,r=null;while(q=l.call(this,p))r=q;return r;};d.walker=e.createClass({$:function(p){this.range=p;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkForward:function(){return l.call(this,false,true)!==false;},checkBackward:function(){return l.call(this,true,true)!==false;},lastForward:function(){return m.call(this);},lastBackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isBlockBoundary=function(p){var q=e.extend({},o,p||{});return n[this.getComputedStyle('display')]||q[this.getName()];};d.walker.blockBoundary=function(p){return function(q,r){return!(q.type==1&&q.isBlockBoundary(p));};};d.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};d.walker.bookmarkContents=function(p){},d.walker.bookmark=function(p,q){function r(s){return s&&s.getName&&s.getName()=='span'&&s.hasAttribute('_fck_bookmark');};return function(s){var t,u;t=s&&!s.getName&&(u=s.getParent())&&(r(u));t=p?t:t||r(s);return q^t;};};d.walker.whitespaces=function(p){return function(q){var r=q&&q.type==3&&!e.trim(q.getText());return p^r;};};})();d.range=function(l){var m=this;m.startContainer=null;m.startOffset=null;m.endContainer=null;m.endOffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(q){q.collapsed=q.startContainer&&q.endContainer&&q.startContainer.equals(q.endContainer)&&q.startOffset==q.endOffset;},m=function(q,r,s){q.optimizeBookmark();var t=q.startContainer,u=q.endContainer,v=q.startOffset,w=q.endOffset,x,y;if(u.type==3)u=u.split(w);else if(u.getChildCount()>0)if(w>=u.getChildCount()){u=u.append(q.document.createText(''));y=true;}else u=u.getChild(w);if(t.type==3){t.split(v);if(t.equals(u))u=t.getNext();}else if(!v){t=t.getFirst().insertBeforeMe(q.document.createText(''));x=true;}else if(v>=t.getChildCount()){t=t.append(q.document.createText(''));x=true;}else t=t.getChild(v).getPrevious(); var z=t.getParents(),A=u.getParents(),B,C,D;for(B=0;B0&&!F.equals(u))G=E.append(F.clone());if(!z[K]||F.$.parentNode!=z[K].$.parentNode){H=F.getPrevious();while(H){if(H.equals(z[K])||H.equals(t))break;I=H.getPrevious();if(r==2)E.$.insertBefore(H.$.cloneNode(true),E.$.firstChild);else{H.remove();if(r==1)E.$.insertBefore(H.$,E.$.firstChild);}H=I;}}if(E)E=G;}if(r==2){var L=q.startContainer;if(L.type==3){L.$.data+=L.$.nextSibling.data;L.$.parentNode.removeChild(L.$.nextSibling);}var M=q.endContainer;if(M.type==3&&M.$.nextSibling){M.$.data+=M.$.nextSibling.data;M.$.parentNode.removeChild(M.$.nextSibling);}}else{if(C&&D&&(t.$.parentNode!=C.$.parentNode||u.$.parentNode!=D.$.parentNode)){var N=D.getIndex();if(x&&D.$.parentNode==t.$.parentNode)N--;q.setStart(D.getParent(),N);}q.collapse(true);}if(x)t.remove();if(y&&u.$.parentNode)u.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(q){var r=false,s=d.walker.bookmark(true);return function(t){if(s(t))return true;if(t.type==3){if(e.trim(t.getText()).length)return false;}else if(!n[t.getName()])if(!q&&!c&&t.getName()=='br'&&!r)r=true;else return false;return true;};};function p(q){return q.type!=3&&q.getName() in f.$removeEmpty||!e.trim(q.getText())||q.getParent().hasAttribute('_fck_bookmark');};d.range.prototype={clone:function(){var r=this;var q=new d.range(r.document);q.startContainer=r.startContainer;q.startOffset=r.startOffset;q.endContainer=r.endContainer;q.endOffset=r.endOffset;q.collapsed=r.collapsed;return q;},collapse:function(q){var r=this;if(q){r.endContainer=r.startContainer;r.endOffset=r.startOffset;}else{r.startContainer=r.endContainer;r.startOffset=r.endOffset;}r.collapsed=true;},cloneContents:function(){var q=new d.documentFragment(this.document);if(!this.collapsed)m(this,2,q);return q;},deleteContents:function(){if(this.collapsed)return;m(this,0);},extractContents:function(){var q=new d.documentFragment(this.document);if(!this.collapsed)m(this,1,q);return q;},createBookmark:function(q){var v=this;var r,s,t,u;r=v.document.createElement('span'); r.setAttribute('_fck_bookmark',1);r.setStyle('display','none');r.setHtml(' ');if(q){t='cke_bm_'+e.getNextNumber();r.setAttribute('id',t+'S');}if(!v.collapsed){s=r.clone();s.setHtml(' ');if(q)s.setAttribute('id',t+'E');u=v.clone();u.collapse();u.insertNode(s);}u=v.clone();u.collapse(true);u.insertNode(r);if(s){v.setStartAfter(r);v.setEndBefore(s);}else v.moveToPosition(r,4);return{startNode:q?t+'S':r,endNode:q?t+'E':s,serializable:q};},createBookmark2:function(q){var x=this;var r=x.startContainer,s=x.endContainer,t=x.startOffset,u=x.endOffset,v,w;if(!r||!s)return{start:0,end:0};if(q){if(r.type==1){v=r.getChild(t);if(v&&v.type==3&&t>0&&v.getPrevious().type==3){r=v;t=0;}}while(r.type==3&&(w=r.getPrevious())&&(w.type==3)){r=w;t+=w.getLength();}if(!x.isCollapsed){if(s.type==1){v=s.getChild(u);if(v&&v.type==3&&u>0&&v.getPrevious().type==3){s=v;u=0;}}while(s.type==3&&(w=s.getPrevious())&&(w.type==3)){s=w;u+=w.getLength();}}}return{start:r.getAddress(q),end:x.isCollapsed?null:s.getAddress(q),startOffset:t,endOffset:u,normalized:q,is2:true};},moveToBookmark:function(q){var y=this;if(q.is2){var r=y.document.getByAddress(q.start,q.normalized),s=q.startOffset,t=q.end&&y.document.getByAddress(q.end,q.normalized),u=q.endOffset;y.setStart(r,s);if(t)y.setEnd(t,u);else y.collapse(true);}else{var v=q.serializable,w=v?y.document.getById(q.startNode):q.startNode,x=v?y.document.getById(q.endNode):q.endNode;y.setStartBefore(w);w.remove();if(x){y.setEndBefore(x);x.remove();}else y.collapse(true);}},getBoundaryNodes:function(){var v=this;var q=v.startContainer,r=v.endContainer,s=v.startOffset,t=v.endOffset,u;if(q.type==1){u=q.getChildCount();if(u>s)q=q.getChild(s);else if(u<1)q=q.getPreviousSourceNode();else{q=q.$;while(q.lastChild)q=q.lastChild;q=new d.node(q);q=q.getNextSourceNode()||q;}}if(r.type==1){u=r.getChildCount();if(u>t)r=r.getChild(t).getPreviousSourceNode(true);else if(u<1)r=r.getPreviousSourceNode();else{r=r.$;while(r.lastChild)r=r.lastChild;r=new d.node(r);}}if(q.getPosition(r)&2)q=r;return{startNode:q,endNode:r};},getCommonAncestor:function(q,r){var v=this;var s=v.startContainer,t=v.endContainer,u;if(s.equals(t)){if(q&&s.type==1&&v.startOffset==v.endOffset-1)u=s.getChild(v.startOffset);else u=s;}else u=s.getCommonAncestor(t);return r&&!u.is?u.getParent():u;},optimize:function(){var s=this;var q=s.startContainer,r=s.startOffset;if(q.type!=1)if(!r)s.setStartBefore(q);else if(r>=q.getLength())s.setStartAfter(q);q=s.endContainer;r=s.endOffset;if(q.type!=1)if(!r)s.setEndBefore(q); else if(r>=q.getLength())s.setEndAfter(q);},optimizeBookmark:function(){var s=this;var q=s.startContainer,r=s.endContainer;if(q.is&&q.is('span')&&q.hasAttribute('_fck_bookmark'))s.setStartAt(q,3);if(r&&r.is&&r.is('span')&&r.hasAttribute('_fck_bookmark'))s.setEndAt(r,4);},trim:function(q,r){var y=this;var s=y.startContainer,t=y.startOffset,u=y.collapsed;if((!q||u)&&(s&&s.type==3)){if(!t){t=s.getIndex();s=s.getParent();}else if(t>=s.getLength()){t=s.getIndex()+1;s=s.getParent();}else{var v=s.split(t);t=s.getIndex()+1;s=s.getParent();if(!u&&y.startContainer.equals(y.endContainer))y.setEnd(v,y.endOffset-y.startOffset);}y.setStart(s,t);if(u)y.collapse(true);}var w=y.endContainer,x=y.endOffset;if(!(r||u)&&w&&w.type==3){if(!x){x=w.getIndex();w=w.getParent();}else if(x>=w.getLength()){x=w.getIndex()+1;w=w.getParent();}else{w.split(x);x=w.getIndex()+1;w=w.getParent();}y.setEnd(w,x);}},enlarge:function(q){switch(q){case 1:if(this.collapsed)return;var r=this.getCommonAncestor(),s=this.document.getBody(),t,u,v,w,x,y=false,z,A,B=this.startContainer,C=this.startOffset;if(B.type==3){if(C){B=!e.trim(B.substring(0,C)).length&&B;y=!!B;}if(B)if(!(w=B.getPrevious()))v=B.getParent();}else{if(C)w=B.getChild(C-1)||B.getLast();if(!w)v=B;}while(v||w){if(v&&!w){if(!x&&v.equals(r))x=true;if(!s.contains(v))break;if(!y||v.getComputedStyle('display')!='inline'){y=false;if(x)t=v;else this.setStartBefore(v);}w=v.getPrevious();}while(w){z=false;if(w.type==3){A=w.getText();if(/[^\s\ufeff]/.test(A))w=null;z=/[\s\ufeff]$/.test(A);}else if(w.$.offsetWidth>0&&!w.getAttribute('_fck_bookmark'))if(y&&f.$removeEmpty[w.getName()]){A=w.getText();if(!/[^\s\ufeff]/.test(A))w=null;else{var D=w.$.all||w.$.getElementsByTagName('*');for(var E=0,F;F=D[E++];)if(!f.$removeEmpty[F.nodeName.toLowerCase()]){w=null;break;}}if(w)z=!!A.length;}else w=null;if(z)if(y){if(x)t=v;else if(v)this.setStartBefore(v);}else y=true;if(w){var G=w.getPrevious();if(!v&&!G){v=w;w=null;break;}w=G;}else v=null;}if(v)v=v.getParent();}B=this.endContainer;C=this.endOffset;v=w=null;x=y=false;if(B.type==3){B=!e.trim(B.substring(C)).length&&B;y=!(B&&B.getLength());if(B)if(!(w=B.getNext()))v=B.getParent();}else{w=B.getChild(C);if(!w)v=B;}while(v||w){if(v&&!w){if(!x&&v.equals(r))x=true;if(!s.contains(v))break;if(!y||v.getComputedStyle('display')!='inline'){y=false;if(x)u=v;else if(v)this.setEndAfter(v);}w=v.getNext();}while(w){z=false;if(w.type==3){A=w.getText();if(/[^\s\ufeff]/.test(A))w=null;z=/^[\s\ufeff]/.test(A);}else if(w.$.offsetWidth>0&&!w.getAttribute('_fck_bookmark'))if(y&&f.$removeEmpty[w.getName()]){A=w.getText(); if(!/[^\s\ufeff]/.test(A))w=null;else{D=w.$.all||w.$.getElementsByTagName('*');for(E=0;F=D[E++];)if(!f.$removeEmpty[F.nodeName.toLowerCase()]){w=null;break;}}if(w)z=!!A.length;}else w=null;if(z)if(y)if(x)u=v;else this.setEndAfter(v);if(w){G=w.getNext();if(!v&&!G){v=w;w=null;break;}w=G;}else v=null;}if(v)v=v.getParent();}if(t&&u){r=t.contains(u)?u:t;this.setStartBefore(r);this.setEndAfter(r);}break;case 2:case 3:var H=new d.range(this.document);s=this.document.getBody();H.setStartAt(s,1);H.setEnd(this.startContainer,this.startOffset);var I=new d.walker(H),J,K,L=d.walker.blockBoundary(q==3?{br:1}:null),M=function(O){var P=L(O);if(!P)J=O;return P;},N=function(O){var P=M(O);if(!P&&O.is&&O.is('br'))K=O;return P;};I.guard=M;v=I.lastBackward();J=J||s;this.setStartAt(J,!J.is('br')&&(!v||J.contains(v))?1:4);H=this.clone();H.collapse();H.setEndAt(s,2);I=new d.walker(H);I.guard=q==3?N:M;J=null;v=I.lastForward();J=J||s;this.setEndAt(J,!J.is('br')&&(!v||J.contains(v))?2:3);if(K)this.setEndAfter(K);}},insertNode:function(q){var u=this;u.optimizeBookmark();u.trim(false,true);var r=u.startContainer,s=u.startOffset,t=r.getChild(s);if(t)q.insertBefore(t);else r.append(q);if(q.getParent().equals(u.endContainer))u.endOffset++;u.setStartBefore(q);},moveToPosition:function(q,r){this.setStartAt(q,r);this.collapse(true);},selectNodeContents:function(q){this.setStart(q,0);this.setEnd(q,q.type==3?q.getLength():q.getChildCount());},setStart:function(q,r){var s=this;s.startContainer=q;s.startOffset=r;if(!s.endContainer){s.endContainer=q;s.endOffset=r;}l(s);},setEnd:function(q,r){var s=this;s.endContainer=q;s.endOffset=r;if(!s.startContainer){s.startContainer=q;s.startOffset=r;}l(s);},setStartAfter:function(q){this.setStart(q.getParent(),q.getIndex()+1);},setStartBefore:function(q){this.setStart(q.getParent(),q.getIndex());},setEndAfter:function(q){this.setEnd(q.getParent(),q.getIndex()+1);},setEndBefore:function(q){this.setEnd(q.getParent(),q.getIndex());},setStartAt:function(q,r){var s=this;switch(r){case 1:s.setStart(q,0);break;case 2:if(q.type==3)s.setStart(q,q.getLength());else s.setStart(q,q.getChildCount());break;case 3:s.setStartBefore(q);break;case 4:s.setStartAfter(q);}l(s);},setEndAt:function(q,r){var s=this;switch(r){case 1:s.setEnd(q,0);break;case 2:if(q.type==3)s.setEnd(q,q.getLength());else s.setEnd(q,q.getChildCount());break;case 3:s.setEndBefore(q);break;case 4:s.setEndAfter(q);}l(s);},fixBlock:function(q,r){var u=this;var s=u.createBookmark(),t=u.document.createElement(r); u.collapse(q);u.enlarge(2);u.extractContents().appendTo(t);t.trim();if(!c)t.appendBogus();u.insertNode(t);u.moveToBookmark(s);return t;},splitBlock:function(q){var B=this;var r=new d.elementPath(B.startContainer),s=new d.elementPath(B.endContainer),t=r.blockLimit,u=s.blockLimit,v=r.block,w=s.block,x=null;if(!t.equals(u))return null;if(q!='br'){if(!v){v=B.fixBlock(true,q);w=new d.elementPath(B.endContainer).block;}if(!w)w=B.fixBlock(false,q);}var y=v&&B.checkStartOfBlock(),z=w&&B.checkEndOfBlock();B.deleteContents();if(v&&v.equals(w))if(z){x=new d.elementPath(B.startContainer);B.moveToPosition(w,4);w=null;}else if(y){x=new d.elementPath(B.startContainer);B.moveToPosition(v,3);v=null;}else{B.setEndAt(v,2);var A=B.extractContents();w=v.clone(false);A.appendTo(w);w.insertAfter(v);B.moveToPosition(v,4);if(!c&&!v.is('ul','ol'))v.appendBogus();}return{previousBlock:v,nextBlock:w,wasStartOfBlock:y,wasEndOfBlock:z,elementPath:x};},checkBoundaryOfElement:function(q,r){var s=this.clone();s[r==1?'setStartAt':'setEndAt'](q,r==1?1:2);var t=new d.walker(s),u=false;t.evaluator=p;return t[r==1?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var w=this;var q=w.startContainer,r=w.startOffset;if(r&&q.type==3){var s=e.ltrim(q.substring(0,r));if(s.length)return false;}w.trim();var t=new d.elementPath(w.startContainer),u=w.clone();u.collapse(true);u.setStartAt(t.block||t.blockLimit,1);var v=new d.walker(u);v.evaluator=o(true);return v.checkBackward();},checkEndOfBlock:function(){var w=this;var q=w.endContainer,r=w.endOffset;if(q.type==3){var s=e.rtrim(q.substring(r));if(s.length)return false;}w.trim();var t=new d.elementPath(w.endContainer),u=w.clone();u.collapse(false);u.setEndAt(t.block||t.blockLimit,2);var v=new d.walker(u);v.evaluator=o(false);return v.checkForward();},moveToElementEditStart:function(q){var r;while(q&&q.type==1){if(q.isEditable())r=q;else if(r)break;q=q.getFirst();}if(r){this.moveToPosition(r,1);return true;}else return false;},getEnclosedNode:function(){var q=this.clone(),r=new d.walker(q),s=d.walker.bookmark(true),t=d.walker.whitespaces(true),u=function(w){return t(w)&&s(w);};q.evaluator=u;var v=r.next();r.reset();return v&&v.equals(r.previous())?v:null;},getTouchedStartNode:function(){var q=this.startContainer;if(this.collapsed||q.type!=1)return q;return q.getChild(this.startOffset)||q;},getTouchedEndNode:function(){var q=this.endContainer;if(this.collapsed||q.type!=1)return q;return q.getChild(this.endOffset-1)||q;}};})();a.POSITION_AFTER_START=1; a.POSITION_BEFORE_END=2;a.POSITION_BEFORE_START=3;a.POSITION_AFTER_END=4;a.ENLARGE_ELEMENT=1;a.ENLARGE_BLOCK_CONTENTS=2;a.ENLARGE_LIST_ITEM_CONTENTS=3;a.START=1;a.END=2;a.STARTEND=3;(function(){var l=c&&b.version<7?a.basePath+'images/spacer.gif':'about:blank',m=h.createFromHtml('
',a.document);m.appendTo(a.document.getHead());try{b.hc=m.getComputedStyle('background-image')=='none';}catch(n){b.hc=false;}if(b.hc)b.cssClass+=' cke_hc';m.remove();})();j.load(i.corePlugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m0){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler); }});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber();this._.editor=l;var p={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}},q=e.addFunction(p.execute,p),r=k.button._.instances.push(p)-1,s='',t=this.command;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(t){t=l.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;m.push('','',this.label,'');if(this.hasArrow)m.push('');m.push('','');if(this.onRender)this.onRender();return p;},setState:function(l){var q=this;if(q._.state==l)return;var m=a.document.getById(q._.id);if(m){m.setState(l);var n=q.title,o=q._.editor.lang.common.unavailable,p=m.getChild(1);if(l==0)n=o.replace('%1',q.title);p.setHtml(n);}q._.state=l;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(q,r){var s=q.document,t=s.getBody(),u=false,v=function(){u=true;};t.on(r,v);s.$.execCommand(r);t.removeListener(r,v); return u;},m=c?function(q,r){return l(q,r);}:function(q,r){try{return q.document.$.execCommand(r);}catch(s){return false;}},n=function(q){this.type=q;this.canUndo=this.type=='cut';};n.prototype={exec:function(q,r){var s=m(q,this.type);if(!s)alert(q.lang.clipboard[this.type+'Error']);return s;}};var o=c?{exec:function(q,r){q.focus();if(!q.fire('beforePaste')&&!l(q,'paste'))q.openDialog('paste');}}:{exec:function(q){try{if(!q.fire('beforePaste')&&!q.document.$.execCommand('Paste',false,null))throw 0;}catch(r){q.openDialog('paste');}}},p=function(q){switch(q.data.keyCode){case 1000+86:case 2000+45:var r=this;r.fire('saveSnapshot');if(r.fire('beforePaste'))q.cancel();setTimeout(function(){r.fire('saveSnapshot');},0);return;case 1000+88:case 2000+46:r=this;r.fire('saveSnapshot');setTimeout(function(){r.fire('saveSnapshot');},0);}};j.add('clipboard',{init:function(q){function r(t,u,v,w){var x=q.lang[u];q.addCommand(u,v);q.ui.addButton(t,{label:x,command:u});if(q.addMenuItems)q.addMenuItem(u,{label:x,command:u,group:'clipboard',order:w});};r('Cut','cut',new n('cut'),1);r('Copy','copy',new n('copy'),4);r('Paste','paste',o,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));q.on('key',p,q);if(q.contextMenu){function s(t){return q.document.$.queryCommandEnabled(t)?2:0;};q.contextMenu.addListener(function(){return{cut:s('Cut'),copy:s('Cut'),paste:b.webkit?2:s('Paste')};});}}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(l){var m=l.config,n=l.lang.colorButton,o;if(!b.hc){p('TextColor','fore',n.textColorTitle);p('BGColor','back',n.bgColorTitle);}function p(r,s,t){l.ui.add(r,4,{label:t,title:t,className:'cke_button_'+r.toLowerCase(),modes:{wysiwyg:1},panel:{css:[a.getUrl(l.skinPath+'editor.css')]},onBlock:function(u,v){var w=u.addBlock(v);w.autoSize=true;w.element.addClass('cke_colorblock');w.element.setHtml(q(u,s));var x=w.keys;x[39]='next';x[9]='next';x[37]='prev';x[2000+9]='prev';x[32]='click';}});};function q(r,s){var t=[],u=m.colorButton_colors.split(','),v=e.addFunction(function(z,A){if(z=='?')return;l.focus();r.hide();var B=new a.style(m['colorButton_'+A+'Style'],z&&{color:z});l.fire('saveSnapshot');if(z)B.apply(l.document);else B.remove(l.document);l.fire('saveSnapshot');});t.push('
',n.auto,'
'); for(var w=0;w');var x=u[w],y=l.lang.colors[x]||x;t.push('');}if(m.colorButton_enableMore)t.push('');t.push('
",n.more,'
');return t.join('');};}});i.colorButton_enableMore=false;i.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';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(l){l.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],beforeInit:function(l){l.contextMenu=new j.contextMenu(l);l.addCommand('contextMenu',{exec:function(){l.contextMenu.show(l.document.getBody());}});}});j.contextMenu=e.createClass({$:function(l){this.id='cke_'+e.getNextNumber();this.editor=l;this._.listeners=[];this._.functionId=e.addFunction(function(m){this._.panel.hide();l.focus();l.execCommand(m);},this);},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor;if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q);p.onClick=e.bind(function(z){var A=true;p.hide();if(c)p.onEscape();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);A=false;},this);p.onEscape=function(){q.focus();if(c)q.getSelection().unlock(true);};}var r=this._.listeners,s=[],t=this.editor.getSelection(),u=t&&t.getStartElement();if(c)t.lock();p.onHide=e.bind(function(){p.onHide=null;if(c)q.getSelection().unlock();this.onHide&&this.onHide();},this);for(var v=0;v ';j.add('elementspath',{requires:['selection'],init:function(n){var o='cke_path_'+n.name,p,q=function(){if(!p)p=a.document.getById(o);return p;},r='cke_elementspath_'+e.getNextNumber()+'_';n._.elementsPath={idBase:r};n.on('themeSpace',function(s){if(s.data.space=='bottom')s.data.html+='
'+m+'
';});n.on('selectionChange',function(s){var t=b,u=s.data.selection,v=u.getStartElement(),w=[],x=this._.elementsPath.list=[];while(v){var y=x.push(v)-1,z;if(v.getAttribute('_cke_real_element_type'))z=v.getAttribute('_cke_real_element_type');else z=v.getName();var A='';if(t.opera||t.gecko&&t.mac)A+=' onkeypress="return false;"';if(t.gecko)A+=' onblur="this.style.cssText = this.style.cssText;"';w.unshift('',z,'');if(z=='body')break;v=v.getParent();}q().setHtml(w.join('')+m);});n.on('contentDomUnload',function(){q().setHtml(m);});n.addCommand('elementsPathFocus',l.toolbarFocus);}});})();a._.elementsPath={click:function(l,m){var n=a.instances[l];n.focus();var o=n._.elementsPath.list[m];n.getSelection().selectElement(o);return false;},keydown:function(l,m,n){var o=k.button._.instances[m],p=a.instances[l],q=p._.elementsPath.idBase,r;n=new d.event(n);switch(n.getKeystroke()){case 37:case 9:r=a.document.getById(q+(m+1));if(!r)r=a.document.getById(q+'0');r.focus();return false;case 39:case 2000+9:r=a.document.getById(q+(m-1));if(!r)r=a.document.getById(q+(p._.elementsPath.list.length-1));r.focus();return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m);return false;}return true;}};(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(s){var t=s.specialKeys; t[13]=o;t[2000+13]=n;}});var l,m=/^h[1-6]$/;function n(s){l=1;return o(s,s.config.shiftEnterMode);};function o(s,t){if(s.mode!='wysiwyg')return false;if(!t)t=s.config.enterMode;setTimeout(function(){s.fire('saveSnapshot');if(t==2||s.getSelection().getStartElement().hasAscendant('pre',true))q(s,t);else p(s,t);l=0;},0);return true;};function p(s,t,u){u=u||r(s);var v=u.document,w=t==3?'div':'p',x=u.splitBlock(w);if(!x)return;var y=x.previousBlock,z=x.nextBlock,A=x.wasStartOfBlock,B=x.wasEndOfBlock,C;if(z){C=z.getParent();if(C.is('li')){z.breakParent(C);z.move(z.getNext(),true);}}else if(y&&(C=y.getParent())&&(C.is('li'))){y.breakParent(C);u.moveToElementEditStart(y.getNext());y.move(y.getPrevious());}if(!A&&!B){if(z.is('li')&&(C=z.getFirst())&&(C.is&&C.is('ul','ol')))z.insertBefore(v.createText('\xa0'),C);if(z)u.moveToElementEditStart(z);}else{if(A&&B&&y.is('li')){s.execCommand('outdent');return;}var D;if(y){if(!l&&!m.test(y.getName()))D=y.clone();}else if(z)D=z.clone();if(!D)D=v.createElement(w);var E=x.elementPath;if(E)for(var F=0,G=E.elements.length;F0;u--)t[u].deleteContents();return t[0];};})();(function(){var l='nbsp,gt,lt,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',m='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',n='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 o(p){var q={},r=[],s={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};p=p.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(x,y){q[s[y]]='&'+y+';';r.push(s[y]);return '';});p=p.split(',');var t=document.createElement('div'),u;t.innerHTML='&'+p.join(';&')+';';u=t.innerHTML;t=null;for(var v=0;v'+C+'',C);}},onClick:function(B){m.focus();m.fire('saveSnapshot');var C=w[B];if(this.getValue()==B)C.remove(m.document);else C.apply(m.document);m.fire('saveSnapshot');},onRender:function(){m.on('selectionChange',function(B){var C=this.getValue(),D=B.data.path,E=D.elements;for(var F=0,G;F'+t+'',t);}},onClick:function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);l.fire('saveSnapshot');},onRender:function(){l.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path;for(var v in p)if(p[v].checkActive(u)){if(v!=t)this.setValue(v,l.lang.format['tag_'+v]);return;}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}}); if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form'))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName();if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2};if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(M){var N=M.children.length,O=M.children[N-1];while(O&&O.type==3&&!e.trim(O.value))O=M.children[--N];return O;};function o(M,N){var O=M.children,P=n(M);if(P){if((N||!c)&&(P.type==1&&P.name=='br'))O.pop();if(P.type==3&&l.test(P.value))O.pop();}};function p(M){var N=n(M);return!N||N.type==1&&N.name=='br';};function q(M){o(M,true);if(p(M))if(c)M.add(new a.htmlParser.text('\xa0'));else M.add(new a.htmlParser.element('br',{}));};function r(M){o(M);if(p(M))M.add(new a.htmlParser.text('\xa0'));};var s=f,t=e.extend({},s.$block,s.$listItem,s.$tableContent);for(var u in t)if(!('br' in s[u]))delete t[u];delete t.pre;var v={attributeNames:[[/^on/,'_cke_pa_on']]},w={elements:{}};for(u in t)w.elements[u]=q;var x={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^_cke_(saved|pa)_/,''],[/^_cke.*/,'']],elements:{$:function(M){var N=M.attributes;if(N){var O=['name','href','src'],P;for(var Q=0;Q]+)))/gi;function A(M){return M.replace(z,'$& _cke_saved_$1');};var B=/<(style)(?=[ >])[^>]*>[^<]*<\/\1>/gi,C=/([^<]*)<\/cke:encoded>/gi,D=/(<\/?)((?:object|embed|param).*?>)/gi,E=//gi;function F(M){return ''+encodeURIComponent(M)+'';};function G(M){return M.replace(B,F);};function H(M){return M.replace(D,'$1cke:$2');};function I(M){return M.replace(E,'');};function J(M,N){return decodeURIComponent(N);};function K(M){return M.replace(C,J);};function L(M,N){var O=[],P=/<\!--\{cke_temp\}(\d*?)-->/g,Q=[//g,//gi,//gi].concat(N);for(var R=0;R';});M=M.replace(P,function(S,T){return '';});return M;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(M){var N=M.dataProcessor=new a.htmlDataProcessor(M);N.writer.forceSimpleAmpersand=M.config.forceSimpleAmpersand;N.dataFilter.addRules(v);N.dataFilter.addRules(w);N.htmlFilter.addRules(x);N.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(M){var N=this;N.editor=M;N.writer=new a.htmlWriter();N.dataFilter=new a.htmlParser.filter();N.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(M,N){M=L(M,this.editor.config.protectedSource);M=A(M);if(c)M=G(M);M=H(M);M=I(M);var O=document.createElement('div');O.innerHTML='a'+M;M=O.innerHTML.substr(1);if(c)M=K(M);var P=a.htmlParser.fragment.fromHtml(M,N),Q=new a.htmlParser.basicWriter();P.writeHtml(Q,this.dataFilter);return Q.getHtml(true);},toDataFormat:function(M,N){var O=this.writer,P=a.htmlParser.fragment.fromHtml(M,N);O.reset();P.writeHtml(O,this.htmlFilter);return O.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m}); if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement'))return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1};function m(r,s){r.getCommand(this.name).setState(s);};function n(r){var C=this;var s=r.data.path.elements,t,u,v=r.editor;for(var w=0;wG;A++)F[A].indent+=B;var H=j.list.arrayToList(F,E,null,r.config.enterMode,0);if(this.name=='outdent'){var I;if((I=t.getParent())&&(I.is('li'))){var J=H.listNode.getChildren(),K=[],L=J.count(),M;for(A=L-1;A>=0;A--)if((M=J.getItem(A))&&(M.is&&M.is('li')))K.push(M);}}if(H)H.listNode.replace(t);if(K&&K.length)for(A=0;A0;if(u.useIndentClasses){u.classNameRegex=new RegExp('(?:^|\\s+)('+r.config.indentClasses.join('|')+')(?=$|\\s)');u.indentClassMap={};for(var t=0;t=0;w--){u=s[w].createIterator();while(v=u.getNextParagraph()){v.removeAttribute('align');if(t){var x=v.$.className=e.ltrim(v.$.className.replace(y.cssClassRegex,''));if(y.state==2&&!y.isDefaultAlign)v.addClass(t);else if(!x)v.removeAttribute('class');}else if(y.state==2&&!y.isDefaultAlign)v.setStyle('text-align',y.value);else v.removeStyle('text-align');}}p.focus();p.forceNextSelectionCheck();q.selectBookmarks(r);}};j.add('justify',{init:function(p){var q=new o(p,'justifyleft','left'),r=new o(p,'justifycenter','center'),s=new o(p,'justifyright','right'),t=new o(p,'justifyblock','justify');p.addCommand('justifyleft',q);p.addCommand('justifycenter',r);p.addCommand('justifyright',s);p.addCommand('justifyblock',t);p.ui.addButton('JustifyLeft',{label:p.lang.justify.left,command:'justifyleft'});p.ui.addButton('JustifyCenter',{label:p.lang.justify.center,command:'justifycenter'});p.ui.addButton('JustifyRight',{label:p.lang.justify.right,command:'justifyright'});p.ui.addButton('JustifyBlock',{label:p.lang.justify.block,command:'justifyblock'});p.on('selectionChange',e.bind(n,q));p.on('selectionChange',e.bind(n,s));p.on('selectionChange',e.bind(n,r));p.on('selectionChange',e.bind(n,t));},requires:['domiterator']});})();e.extend(i,{justifyClasses:null});j.add('keystrokes',{beforeInit:function(l){l.keystrokeHandler=new a.keystrokeHandler(l);l.specialKeys={};},init:function(l){var m=l.config.keystrokes,n=l.config.blockedKeystrokes,o=l.keystrokeHandler.keystrokes,p=l.keystrokeHandler.blockedKeystrokes;for(var q=0;qw[y-1].indent+1){var C=w[y-1].indent+1-w[y].indent,D=w[y].indent;while(w[y]&&w[y].indent>=D){w[y].indent+=C;y++;}y--;}var E=j.list.arrayToList(w,v,null,t.config.enterMode),F=E.listNode,G,H;function I(K){if((G=F[K?'getFirst':'getLast']())&&(!(G.is&&G.isBlockBoundary())&&(H=u.root[K?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&(!(H.is&&H.isBlockBoundary({br:1})))))t.document.createElement('br')[K?'insertBefore':'insertAfter'](G);};I(true);I();var J=u.root.getParent();F.replace(u.root);};function s(t,u){this.name=t;this.type=u;};s.prototype={exec:function(t){t.focus();var u=t.document,v=t.getSelection(),w=v&&v.getRanges();if(!w||w.length<1)return;if(this.state==2){var x=u.getBody();x.trim();if(!x.getFirst()){var y=u.createElement(t.config.enterMode==1?'p':t.config.enterMode==3?'div':'br');y.appendTo(x);w=[new d.range(u)];if(y.is('br')){w[0].setStartBefore(y);w[0].setEndAfter(y);}else w[0].selectNodeContents(y);v.selectRanges(w);}else{var z=w.length==1&&w[0],A=z&&z.getEnclosedNode();if(A&&A.is&&this.type==A.getName())n.call(this,t,1);}}var B=v.createBookmarks(true),C=[],D={};while(w.length>0){z=w.shift();var E=z.getBoundaryNodes(),F=E.startNode,G=E.endNode;if(F.type==1&&F.getName()=='td')z.setStartAt(E.startNode,1);if(G.type==1&&G.getName()=='td')z.setEndAt(E.endNode,2); var H=z.createIterator(),I;H.forceBrBreak=this.state==2;while(I=H.getNextParagraph()){var J=new d.elementPath(I),K=null,L=false,M=J.blockLimit,N;for(var O=0;O0){P=C.shift();if(this.state==2){if(l[P.root.getName()])p.call(this,t,P,D,R);else q.call(this,t,P,R);}else if(this.state==1&&l[P.root.getName()])r.call(this,t,P,D);}for(O=0;O0)for(var s=r.length-1;s>=0;s--){var t=r[s][0],u=r[s][1];if(u)t.insertBefore(u);else t.appendTo(q);}};function n(q,r){var s=l(q),t={},u=q.$;if(!r){t['class']=u.className||'';u.className='';}t.inline=u.style.cssText||'';if(!r)u.style.cssText='position: static; overflow: visible';m(s);return t;};function o(q,r){var s=l(q),t=q.$;if('class' in r)t.className=r['class'];if('inline' in r)t.style.cssText=r.inline;m(s);};function p(q,r){return function(){var s=q.getViewPaneSize();r.resize(s.width,s.height,null,true);};};j.add('maximize',{init:function(q){var r=q.lang,s=a.document,t=s.getWindow(),u,v,w,x=p(t,q),y=2;q.addCommand('maximize',{modes:{wysiwyg:1,source:1},editorFocus:false,exec:function(){var M=this; var z=q.container.getChild([0,0]),A=q.getThemeSpace('contents');if(q.mode=='wysiwyg'){var B=q.getSelection();u=B&&B.getRanges();v=t.getScrollPosition();}else{var C=q.textarea.$;u=!c&&[C.selectionStart,C.selectionEnd];v=[C.scrollLeft,C.scrollTop];}if(M.state==2){t.on('resize',x);w=t.getScrollPosition();var D=q.container;while(D=D.getParent()){D.setCustomData('maximize_saved_styles',n(D));D.setStyle('z-index',q.config.baseFloatZIndex-1);}A.setCustomData('maximize_saved_styles',n(A,true));z.setCustomData('maximize_saved_styles',n(z,true));if(c)s.$.documentElement.style.overflow=s.getBody().$.style.overflow='hidden';else s.getBody().setStyles({overflow:'hidden',width:'0px',height:'0px'});t.$.scrollTo(0,0);var E=t.getViewPaneSize();z.setStyle('position','absolute');z.$.offsetLeft;z.setStyles({'z-index':q.config.baseFloatZIndex-1,left:'0px',top:'0px'});q.resize(E.width,E.height,null,true);var F=z.getDocumentPosition();z.setStyles({left:-1*F.x+'px',top:-1*F.y+'px'});z.addClass('cke_maximized');}else if(M.state==1){t.removeListener('resize',x);var G=[A,z];for(var H=0;H ');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);}}};j.add('pastefromword',{init:function(l){l.addCommand('pastefromword',new a.dialogCommand('pastefromword'));l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});a.dialog.add('pastefromword',this.path+'dialogs/pastefromword.js');}});i.pasteFromWordIgnoreFontFace=true;i.pasteFromWordRemoveStyle=false;i.pasteFromWordKeepsStructure=false;(function(){var l={exec:function(n){if(a.getClipboardData()===false||!window.clipboardData){n.openDialog('pastetext');return;}n.insertText(window.clipboardData.getData('Text'));}};j.add('pastetext',{init:function(n){var o='pastetext',p=n.addCommand(o,l);n.ui.addButton('PasteText',{label:n.lang.pasteText.button,command:o});a.dialog.add(o,a.getUrl(this.path+'dialogs/pastetext.js'));if(n.config.forcePasteAsPlainText)n.on('beforePaste',function(q){if(n.mode=='wysiwyg'){setTimeout(function(){p.exec();},0);q.cancel();}},null,null,20);},requires:['clipboard']});var m;a.getClipboardData=function(){if(!c)return false;var n=a.document,o=n.getBody();if(!m){m=n.createElement('div',{attributes:{id:'cke_hiddenDiv'},styles:{position:'absolute',visibility:'hidden',overflow:'hidden',width:'1px',height:'1px'}});m.setHtml('');m.appendTo(o);}var p=false,q=function(){p=true;};o.on('paste',q);var r=o.$.createTextRange();r.moveToElementText(m.$);r.execCommand('Paste');var s=m.getHtml();m.setHtml('');o.removeListener('paste',q);return p&&s;};})();a.editor.prototype.insertText=function(l){l=e.htmlEncode(l); l=l.replace(/(?:\r\n)|\n|\r/g,'
');this.insertHtml(l);};i.forcePasteAsPlainText=false;j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/(2),10),p=parseInt((window.screen.width-m)/(2),10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=b.isCustomDomain();if(n.config.fullPage)o=n.getData();else{var q='0?'':'';if(r.getAttribute('id'))q+='id="'+r.getAttribute('id')+'" ';if(r.getAttribute('class'))q+='class="'+r.getAttribute('class')+'" ';q+='>';o=n.config.docType+''+''+s+''+n.lang.preview+''+''+''+q+n.getData()+'';}var t=640,u=420,v=80;try{var w=window.screen;t=Math.round(w.width*0.8);u=Math.round(w.height*0.7);v=Math.round(w.width*0.1);}catch(z){}var x='';if(p){window._cke_htmlToLoad=o;x='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var y=window.open(x,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+t+',height='+u+',left='+v);if(!p){y.document.write(o);y.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print'); },canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=l.getSelection().getRanges();for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createBookmark(),s=r.startNode,t=r.endNode,u=function(x){var y=new d.elementPath(x),z=y.elements;for(var A=1,B;B=z[A];A++){if(B.equals(y.block)||B.equals(y.blockLimit))break;if(m.test(B.getName()))x.breakParent(B);}};u(s);u(t);var v=s.getNextSourceNode(true,1);while(v){if(v.equals(t))break;var w=v.getNextSourceNode(false,1);if(v.getName()!='img'||!v.getAttribute('_cke_protected_html'))if(m.test(v.getName()))v.remove(true);else v.removeAttributes(n);v=w;}q.moveToBookmark(r);}l.getSelection().selectRanges(o);}}}};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(l){var m=l.config;if(m.resize_enabled){var n=null,o,p;function q(t){var u=t.data.$.screenX-o.x,v=t.data.$.screenY-o.y,w=p.width+u*(l.lang.dir=='rtl'?-1:1),x=p.height+v;l.resize(Math.max(m.resize_minWidth,Math.min(w,m.resize_maxWidth)),Math.max(m.resize_minHeight,Math.min(x,m.resize_maxHeight)));};function r(t){a.document.removeListener('mousemove',q);a.document.removeListener('mouseup',r);if(l.document){l.document.removeListener('mousemove',q);l.document.removeListener('mouseup',r);}};var s=e.addFunction(function(t){if(!n)n=l.getResizable();p={width:n.$.offsetWidth||0,height:n.$.offsetHeight||0};o={x:t.screenX,y:t.screenY};a.document.on('mousemove',q);a.document.on('mouseup',r);if(l.document){l.document.on('mousemove',q);l.document.on('mouseup',r);}});l.on('themeSpace',function(t){if(t.data.space=='bottom')t.data.html+='
';},l,null,100);}}});i.resize_minWidth=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form; if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l);o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='',n=function(){var r=this,s=function(){var v={};v.srcNodeRef=r.document.getWindow().$.frameElement;v.assocApp='CKEDITOR.'+a.version+'@'+a.revision;v.customerid=r.config.scayt_customerid||'1:11111111111111111111111111111111111111';v.customDictionaryName=r.config.scayt_customDictionaryName;v.userDictionaryName=r.config.scayt_userDictionaryName;v.defLang=r.scayt_defLang;if(a._scaytParams)for(var w in a._scaytParams)v[w]=a._scaytParams[w];var x=new window.scayt(v),y=o.instances[r.name];if(y){x.sLang=y.sLang;x.option(y.option());x.paused=y.paused;}o.instances[r.name]=x;try{x.setDisabled(x.paused===false);}catch(z){}r.fire('showScaytState');};r.on('contentDom',s);r.on('contentDomUnload',function(){var v=a.document.getElementsByTag('script'),w=/^dojoIoScript(\d+)$/i,x=/^https?:\/\/svc\.spellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var y=0;y=0){this.setState(0);r.on('showScaytState',function(){this.removeListener();this.setState(o.isScaytEnabled(r)?1:2);},this);o.loadEngine(r);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(r){r.config.menu_groups='scayt_suggest,scayt_moresuggest,scayt_control,'+r.config.menu_groups;},init:function(r){var s={},t={},u=r.addCommand(l,q);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var v='scaytButton';r.addMenuGroup(v);r.addMenuItems({scaytToggle:{label:r.lang.scayt.enable,command:l,group:v},scaytOptions:{label:r.lang.scayt.options,group:v,onClick:function(){m='options';r.openDialog(l);}},scaytLangs:{label:r.lang.scayt.langs,group:v,onClick:function(){m='langs';r.openDialog(l);}},scaytAbout:{label:r.lang.scayt.about,group:v,onClick:function(){m='about';r.openDialog(l);}}});r.ui.add('Scayt',5,{label:r.lang.scayt.title,title:r.lang.scayt.title,className:'cke_button_scayt',onRender:function(){u.on('state',function(){this.setState(u.state);},this);},onMenu:function(){var x=o.isScaytEnabled(r);r.getMenuItem('scaytToggle').label=r.lang.scayt[x?'disable':'enable'];return{scaytToggle:2,scaytOptions:x?2:0,scaytLangs:x?2:0,scaytAbout:x?2:0};}});if(r.contextMenu&&r.addMenuItems)r.contextMenu.addListener(function(x){if(!(o.isScaytEnabled(r)&&x))return null;var y=o.getScayt(r),z=y.getWord(x.$);if(!z)return null;var A=y.getLang(),B={},C=window.scayt.getSuggestion(z,A);if(!C||!C.length)return null;for(i in s){delete r._.menuItems[i];delete r._.commands[i];}for(i in t){delete r._.menuItems[i];delete r._.commands[i];}s={};t={};var D=false;for(var E=0,F=C.length;E',o.name,'');return p.join('');};function n(o,p){var q=o.type,r=p.type;return q==r?0:q==3?-1:r==3?1:r==1?1:-1;};})();i.stylesCombo_stylesSet='default';j.add('table',{init:function(l){var m=j.table,n=l.lang.table;l.addCommand('table',new a.dialogCommand('table'));l.addCommand('tableProperties',new a.dialogCommand('tableProperties'));l.ui.addButton('Table',{label:n.toolbar,command:'table'});a.dialog.add('table',this.path+'dialogs/table.js');a.dialog.add('tableProperties',this.path+'dialogs/table.js');if(l.addMenuItems)l.addMenuItems({table:{label:n.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:n.deleteTable,command:'tableDelete',group:'table',order:1}});if(l.contextMenu)l.contextMenu.addListener(function(o,p){if(!o)return null; var q=o.is('table')||o.hasAscendant('table');if(q)return{tabledelete:2,table:2};return null;});}});(function(){function l(y,z){if(c)y.removeAttribute(z);else delete y[z];};var m=/^(?:td|th)$/;function n(y){var z=y.createBookmarks(),A=y.getRanges(),B=[],C={};function D(L){if(B.length>0)return;if(L.type==1&&m.test(L.getName())&&!L.getCustomData('selected_cell')){h.setMarker(C,L,'selected_cell',true);B.push(L);}};for(var E=0;EE)E=C;if(D._cke_colScanned)continue;if(y[B][C-1]==D)D.colSpan++;if(y[B][C+1]!=D)D._cke_colScanned=1;}for(B=0;B<=E;B++)for(C=0;C=0;B--)if(A[B])s(A[B]);}else if(y instanceof h){var D=y.getAscendant('table');if(D.$.rows.length==1)D.remove();else y.remove();}};function t(y,z){var A=y.getStartElement(),B=A.getAscendant('td',true)||A.getAscendant('th',true);if(!B)return;var C=B.getAscendant('table'),D=B.$.cellIndex;for(var E=0;E=0;A--)if(z[A])u(z[A]);}else if(y instanceof h){var B=y.getAscendant('table'),C=y.$.cellIndex;for(A=B.$.rows.length-1;A>=0;A--){var D=new h(B.$.rows[A]);if(!C&&D.$.cells.length==1){s(D);continue;}if(D.$.cells[C])D.$.removeChild(D.$.cells[C]);}}};function v(y,z){var A=y.getStartElement(),B=A.getAscendant('td',true)||A.getAscendant('th',true);if(!B)return;var C=B.clone();if(!c)C.appendBogus();if(z)C.insertBefore(B);else C.insertAfter(B);};function w(y){if(y instanceof d.selection){var z=n(y);for(var A=z.length-1;A>=0;A--)w(z[A]);}else if(y instanceof h)if(y.getParent().getChildCount()==1)y.getParent().remove();else y.remove();};var x={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};j.tabletools={init:function(y){var z=y.lang.table;y.addCommand('cellProperties',new a.dialogCommand('cellProperties'));a.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');y.addCommand('tableDelete',{exec:function(A){var B=A.getSelection(),C=B&&B.getStartElement(),D=C&&C.getAscendant('table',true);if(!D)return;B.selectElement(D);var E=B.getRanges()[0];E.collapse();B.selectRanges([E]);if(D.getParent().getChildCount()==1)D.getParent().remove();else D.remove();}});y.addCommand('rowDelete',{exec:function(A){var B=A.getSelection();s(B);}});y.addCommand('rowInsertBefore',{exec:function(A){var B=A.getSelection();r(B,true);}});y.addCommand('rowInsertAfter',{exec:function(A){var B=A.getSelection();r(B);}});y.addCommand('columnDelete',{exec:function(A){var B=A.getSelection();u(B);}});y.addCommand('columnInsertBefore',{exec:function(A){var B=A.getSelection();t(B,true);}});y.addCommand('columnInsertAfter',{exec:function(A){var B=A.getSelection();t(B);}});y.addCommand('cellDelete',{exec:function(A){var B=A.getSelection();w(B);}});y.addCommand('cellInsertBefore',{exec:function(A){var B=A.getSelection(); v(B,true);}});y.addCommand('cellInsertAfter',{exec:function(A){var B=A.getSelection();v(B);}});if(y.addMenuItems)y.addMenuItems({tablecell:{label:z.cell.menu,group:'tablecell',order:1,getItems:function(){var A=n(y.getSelection());return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_properties:A.length>0?2:0};}},tablecell_insertBefore:{label:z.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:z.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:z.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_properties:{label:z.cell.title,group:'tablecellproperties',command:'cellProperties',order:20},tablerow:{label:z.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};}},tablerow_insertBefore:{label:z.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:z.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:z.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:z.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:z.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:z.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:z.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(y.contextMenu)y.contextMenu.addListener(function(A,B){if(!A)return null;while(A){if(A.getName() in x)return{tablecell:2,tablerow:2,tablecolumn:2};A=A.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={exec:function(n){n.container.focusNext(true);}},m={exec:function(n){n.container.focusPrevious(true);}};j.add('tab',{requires:['keystrokes'],init:function(n){var o=n.keystrokeHandler.keystrokes;o[9]='tab';o[2000+9]='shiftTab';var p=n.config.tabSpaces,q='';while(p--)q+='\xa0';n.addCommand('tab',{exec:function(r){if(!r.fire('tab'))if(q.length>0)r.insertHtml(q); else return r.execCommand('blur');return true;}});n.addCommand('shiftTab',{exec:function(r){if(!r.fire('shiftTab'))return r.execCommand('blurBack');return true;}});n.addCommand('blur',l);n.addCommand('blurBack',m);}});})();h.prototype.focusNext=function(l){var u=this;var m=u.$,n=u.getTabIndex(),o,p,q,r,s,t;if(n<=0){s=u.getNextSourceNode(l,1);while(s){if(s.isVisible()&&s.getTabIndex()===0){q=s;break;}s=s.getNextSourceNode(false,1);}}else{s=u.getDocument().getBody().getFirst();while(s=s.getNextSourceNode(false,1)){if(!o)if(!p&&s.equals(u)){p=true;if(l){if(!(s=s.getNextSourceNode(true,1)))break;o=1;}}else if(p&&!u.contains(s))o=1;if(!s.isVisible()||(t=s.getTabIndex())<(0))continue;if(o&&t==n){q=s;break;}if(t>n&&(!q||!r||tr){q=t;r=s;}}else{if(o&&s==n){q=t;break;}if(sr)){q=t;r=s;}}}if(q)q.focus();};i.tabSpaces=0;(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];)if(q.focus){q.focus();return;}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){switch(q){case 39:case 9:while((p=p.next||p.toolbar.next&&p.toolbar.next.items[0])&&(!p.focus)){}if(p)p.focus(); else n.toolbox.focus();return false;case 37:case 2000+9:while((p=p.previous||p.toolbar.previous&&p.toolbar.previous.items[p.toolbar.previous.items.length-1])&&(!p.focus)){}if(p)p.focus();else{var r=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;r[r.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q=['
':' style="display:none">');var t=n.toolbox.toolbars,u=n.config.toolbar instanceof Array?n.config.toolbar:n.config['toolbar_'+n.config.toolbar];for(var v=0;v');s=0;}if(w==='/'){q.push('
');continue;}q.push('');var z=t.push(y)-1;if(z>0){y.previous=t[z-1];y.previous.next=y;}for(var A=0;A');s=1;}}else if(s){q.push('');s=0;}var D=B.render(n,q);z=y.items.push(D)-1;if(z>0){D.previous=y.items[z-1];D.previous.next=D;}D.toolbar=y;D.onkey=o;D.onfocus=function(){if(!n.toolbox.focusCommandExecuted)n.focus();};}}if(s){q.push('');s=0;}q.push('');}q.push('
');if(n.config.toolbarCanCollapse){var E=e.addFunction(function(){n.execCommand('toolbarCollapse');}),F='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(G){var H=a.document.getById(F),I=H.getPrevious(),J=G.getThemeSpace('contents'),K=I.getParent(),L=parseInt(J.$.style.height,10),M=K.$.offsetHeight;if(I.isVisible()){I.hide();H.addClass('cke_toolbox_collapser_min');}else{I.show();H.removeClass('cke_toolbox_collapser_min');}var N=K.$.offsetHeight-M;J.setStyle('height',L-N+'px');},modes:{wysiwyg:1,source:1}});q.push('');}p.data.html+=q.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']]; i.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'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];i.toolbar='Full';i.toolbarCanCollapse=true;i.toolbarStartupExpanded=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(n){var o=new m(n),p=n.addCommand('undo',{exec:function(){if(o.undo()){n.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),q=n.addCommand('redo',{exec:function(){if(o.redo()){n.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});o.onChange=function(){p.setState(o.undoable()?2:0);q.setState(o.redoable()?2:0);};function r(s){if(o.enabled&&s.data.command.canUndo!==false)o.save();};n.on('beforeCommandExec',r);n.on('afterCommandExec',r);n.on('saveSnapshot',function(){o.save();});n.on('contentDom',function(){n.document.on('keydown',function(s){if(!s.data.$.ctrlKey&&!s.data.$.metaKey)o.type(s);});});n.on('beforeModeUnload',function(){n.mode=='wysiwyg'&&o.save(true);});n.on('mode',function(){o.enabled=n.mode=='wysiwyg';o.onChange();});n.ui.addButton('Undo',{label:n.lang.undo,command:'undo'});n.ui.addButton('Redo',{label:n.lang.redo,command:'redo'});n.resetUndo=function(){o.reset();n.fire('saveSnapshot');};}});function l(n){var p=this;var o=n.getSelection();p.contents=n.getSnapshot();p.bookmarks=o&&o.createBookmarks2(true);if(c)p.contents=p.contents.replace(/\s+_cke_expando=".*?"/g,'');};l.prototype={equals:function(n,o){if(this.contents!=n.contents)return false;if(o)return true;var p=this.bookmarks,q=n.bookmarks;if(p||q){if(!p||!q||p.length!=q.length)return false;for(var r=0;r25){this.save();this.modifiersCount=1;}}else if(!u){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save();this.typesCount=1;}}this.typing=true;},reset:function(){var n=this;n.lastKeystroke=0;n.snapshots=[];n.index=-1;n.limit=n.editor.config.undoStackSize;n.currentImage=null;n.hasUndo=false;n.hasRedo=false;n.resetType();},resetType:function(){var n=this;n.typing=false;delete n.lastKeystroke;n.typesCount=0;n.modifiersCount=0;},fireChange:function(){var n=this;n.hasUndo=!!n.getNextImage(true);n.hasRedo=!!n.getNextImage(false);n.resetType();n.onChange();},save:function(n,o,p){var r=this;var q=r.snapshots;if(!o)o=new l(r.editor);if(r.currentImage&&o.equals(r.currentImage,n))return false;q.splice(r.index+1,q.length-r.index-1);if(q.length==r.limit)q.shift();r.index=q.push(o)-1;r.currentImage=o;if(p!==false)r.fireChange();return true;},restoreImage:function(n){var p=this;p.editor.loadSnapshot(n.contents);if(n.bookmarks)p.editor.getSelection().selectBookmarks(n.bookmarks);else if(c){var o=p.editor.document.getBody().$.createTextRange();o.collapse(true);o.select();}p.index=n.index;p.currentImage=n;p.fireChange();},getNextImage:function(n){var s=this;var o=s.snapshots,p=s.currentImage,q,r;if(p)if(n)for(r=s.index-1;r>=0;r--){q=o[r];if(!p.equals(q,true)){q.index=r;return q;}}else for(r=s.index+1;r]*>\s*(?:]*>| | )\s*(:?<\/\1>)?\s*$/gi;function n(r){var w=this;if(w.mode=='wysiwyg'){w.focus();var s=w.getSelection(),t=r.data;if(w.dataProcessor)t=w.dataProcessor.toHtml(t); if(c){var u=s.isLocked;if(u)s.unlock();var v=s.getNative();if(v.type=='Control')v.clear();v.createRange().pasteHTML(t);if(u)w.getSelection().lock();}else w.document.$.execCommand('inserthtml',false,t);}};function o(r){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var s=r.data,t=s.getName(),u=f.$block[t],v=this.getSelection(),w=v.getRanges(),x=v.isLocked;if(x)v.unlock();var y,z,A,B;for(var C=w.length-1;C>=0;C--){y=w[C];y.deleteContents();z=!C&&s||s.clone(true);var D,E;if(u)while((D=y.getCommonAncestor(false,true))&&((E=f[D.getName()])&&(!(E&&E[t]))))if(y.checkStartOfBlock()&&y.checkEndOfBlock()){y.setStartBefore(D);y.collapse(true);D.remove();}else y.splitBlock();y.insertNode(z);if(!A)A=z;}y.moveToPosition(A,4);var F=A.getNextSourceNode(true);if(F&&F.type==1)y.moveToElementEditStart(F);v.selectRanges([y]);if(x)this.getSelection().lock();e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function p(r){if(!r.checkDirty())setTimeout(function(){r.resetDirty();});};function q(r){var s=r.editor,t=r.data.path,u=t.blockLimit,v=r.data.selection,w=v.getRanges()[0],x=s.document.getBody(),y=s.config.enterMode;if(y!=2&&w.collapsed&&u.getName()=='body'&&!t.block){p(s);var z=v.createBookmarks(),A=w.fixBlock(true,s.config.enterMode==3?'div':'p');if(c){var B=A.getElementsByTag('br'),C;for(var D=0;D':'br');x.append(M);}};j.add('wysiwygarea',{requires:['editingblock'],init:function(r){var s=r.config.enterMode!=2?r.config.enterMode==3?'div':'p':false;r.on('editingBlockReady',function(){var t,u,v,w,x,y,z,A=b.isCustomDomain(),B=function(){if(v)v.remove();if(u)u.remove();y=0;var E='void( '+(b.gecko?'setTimeout':'')+'( function(){'+'document.open();'+(c&&A?'document.domain="'+document.domain+'";':'')+'document.write( window.parent[ "_cke_htmlToLoad_'+r.name+'" ] );'+'document.close();'+'window.parent[ "_cke_htmlToLoad_'+r.name+'" ] = null;'+'}'+(b.gecko?', 0 )':')()')+' )';if(b.opera)E='void(0);';v=h.createFromHtml(''); var F=r.lang.editorTitle.replace('%1',r.name);if(b.gecko){v.on('load',function(G){G.removeListener();D(v.$.contentWindow);});t.setAttributes({role:'region',title:F});v.setAttributes({role:'region',title:' '});}else if(b.webkit){v.setAttribute('title',F);v.setAttribute('name',F);}else if(c){u=h.createFromHtml('
'+''+e.htmlEncode(F)+''+'
',a.document);v.appendTo(u);u.appendTo(t);}if(!c)t.append(v);},C='',D=function(E){if(y)return;y=1;var F=E.document,G=F.body,H=F.getElementById('cke_actscrpt');H.parentNode.removeChild(H);delete a._['contentDomReady'+r.name];G.spellcheck=!r.config.disableNativeSpellChecker;if(c){G.hideFocus=true;G.disabled=true;G.contentEditable=true;G.removeAttribute('disabled');}else F.designMode='on';try{F.execCommand('enableObjectResizing',false,!r.config.disableObjectResizing);}catch(K){}try{F.execCommand('enableInlineTableEditing',false,!r.config.disableNativeTableHandles);}catch(L){}E=r.window=new d.window(E);F=r.document=new g(F);if(!(c||b.opera))F.on('mousedown',function(M){var N=M.data.getTarget();if(N.is('img','hr','input','textarea','select'))r.getSelection().selectElement(N);});if(b.webkit){F.on('click',function(M){if(M.data.getTarget().is('input','select'))M.data.preventDefault();});F.on('mouseup',function(M){if(M.data.getTarget().is('input','textarea'))M.data.preventDefault();});}var I=c||b.webkit?E:F;I.on('blur',function(){r.focusManager.blur();});I.on('focus',function(){if(b.gecko){var M=G;while(M.firstChild)M=M.firstChild;if(!M.nextSibling&&'BR'==M.tagName&&M.hasAttribute('_moz_editor_bogus_node')){var N=F.$.createEvent('KeyEvents');N.initKeyEvent('keypress',true,true,E.$,false,false,false,false,0,32);F.$.dispatchEvent(N);var O=F.getBody().getFirst();if(r.config.enterMode==2)F.createElement('br',{attributes:{_moz_dirty:''}}).replace(O);else O.remove();}}r.focusManager.focus();});var J=r.keystrokeHandler;if(J)J.attach(F);if(c)r.on('key',function(M){var N=M.data.keyCode==8&&r.getSelection().getSelectedElement();if(N){r.fire('saveSnapshot');N.remove();r.fire('saveSnapshot');M.cancel();}});if(r.contextMenu)r.contextMenu.addTarget(F);setTimeout(function(){r.fire('contentDom');if(z){r.mode='wysiwyg'; r.fire('mode');z=false;}w=false;if(x){r.focus();x=false;}setTimeout(function(){r.fire('dataReady');},0);if(c)setTimeout(function(){if(r.document){var M=r.document.$.body;M.runtimeStyle.marginBottom='0px';M.runtimeStyle.marginBottom='';}},1000);},0);};r.addMode('wysiwyg',{load:function(E,F,G){t=E;if(c&&b.quirks)E.setStyle('position','relative');r.mayBeDirty=true;z=true;if(G)this.loadSnapshotData(F);else this.loadData(F);},loadData:function(E){w=true;if(r.dataProcessor)E=r.dataProcessor.toHtml(E,s);E=r.config.docType+''+''+''+''+''+''+E+''+''+C;window['_cke_htmlToLoad_'+r.name]=E;a._['contentDomReady'+r.name]=D;B();if(b.opera){var F=v.$.contentWindow.document;F.open();F.write(E);F.close();}},getData:function(){var E=v.getFrameDocument().getBody().getHtml();if(r.dataProcessor)E=r.dataProcessor.toDataFormat(E,s);if(r.config.ignoreEmptyParagraph)E=E.replace(m,'');return E;},getSnapshotData:function(){return v.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(E){v.getFrameDocument().getBody().setHtml(E);},unload:function(E){r.window=r.document=v=t=x=null;r.fire('contentDomUnload');},focus:function(){if(w)x=true;else if(r.window){r.window.focus();r.selectionChange();}}});r.on('insertHtml',n,null,null,20);r.on('insertElement',o,null,null,20);r.on('selectionChange',q,null,null,1);});}});})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{init:function(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;j.add('styles',{requires:['selection']});a.editor.prototype.attachStyleStateChange=function(l,m){var n=this._.styleStateChangeCallbacks;if(!n){n=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(o){for(var p=0;p'+N+'';else L.setHtml(N);M.remove();};function t(L){var M=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,N=L.getName(),O=u(L.getOuterHtml(),M,function(Q,R,S){return R+''+S+'
';}),P=[];O.replace(/
([\s\S]*?)<\/pre>/gi,function(Q,R){P.push(R);});return P;};function u(L,M,N){var O='',P='';L=L.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(Q,R,S){R&&(O=R);S&&(P=S);return '';});return O+L.replace(M,N)+P;};function v(L,M){var N=new d.documentFragment(M.getDocument());for(var O=0;O');P=P.replace(/[ \t]{2,}/g,function(R){return e.repeat(' ',R.length-1)+' ';});var Q=M.clone();Q.setHtml(P);N.append(Q);}return N;};function w(L,M){var N=L.getHtml();N=u(N,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');N=N.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');N=N.replace(/([ \t\n\r]+| )/g,' ');N=N.replace(/]*>/gi,'\n');if(c){var O=L.getDocument().createElement('div');O.append(M);M.$.outerHTML='
'+N+'
';M=O.getFirst().remove();}else M.setHtml(N);return M;};function x(L,M){var N=L._.definition,O=N.attributes,P=N.styles,Q=I(L);function R(){for(var T in O){if(T=='class'&&M.getAttribute(T)!=O[T])continue;M.removeAttribute(T);}};R();for(var S in P)M.removeStyle(S);O=Q[M.getName()];if(O)R();A(M);};function y(L,M){var N=L._.definition,O=N.attributes,P=N.styles,Q=I(L),R=M.getElementsByTag(L.element);for(var S=R.count();--S>=0;)x(L,R.getItem(S));for(var T in Q)if(T!=L.element){R=M.getElementsByTag(T);for(S=R.count()-1;S>=0;S--){var U=R.getItem(S);z(U,Q[T]);}}};function z(L,M){var N=M&&M.attributes;if(N)for(var O=0;O0)F+=(E.$.offsetHeight||0)-(E.$.clientHeight||0);E.setStyle('height',F+'px');t._.currentBlock.element.setStyle('display','none').removeStyle('display');};if(t.isLoaded)D();else t.onLoad=D;}else v.getFirst().removeStyle('height');e.setTimeout(function(){if(x.voiceLabel)if(b.gecko){var E=w.getParent();E.setAttribute('role','region');E.setAttribute('title',x.voiceLabel);w.setAttribute('role','region');w.setAttribute('title',' ');}if(c&&b.quirks)w.focus();else w.$.contentWindow.focus();if(c&&!b.quirks)this.allowBlur(true);},0,this);},0,this);this.visible=1;if(this.onShow)this.onShow.call(this);m=false;},hide:function(){var o=this;if(o.visible&&(!o.onHide||o.onHide.call(o)!==true)){o.hideChild();o.element.setStyle('display','none');o.visible=0;}},allowBlur:function(o){var p=this._.panel;if(o!=undefined)p.allowBlur=o;return p.allowBlur;},showAsChild:function(o,p,q,r,s,t){if(this._.activeChild==o&&o._.panel._.offsetParentId==q.getId())return;this.hideChild();o.onHide=e.bind(function(){e.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=o;this._.focused=false;o.showBlock(p,q,r,s,t);if(b.ie7Compat||b.ie8&&b.ie6Compat)setTimeout(function(){o.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var o=this._.activeChild;if(o){delete o.onHide;delete this._.activeChild;o.hide();}}}});})();j.add('menu',{beforeInit:function(l){var m=l.config.menu_groups.split(','),n={};for(var o=0;o'],y=q.length,z=y&&q[0].group;for(var A=0;A');z=B.group;}B.render(this,A,x);}x.push('');t.setHtml(x.join(''));if(this.parent)this.parent._.panel.showAsChild(s,this.id,m,n,o,p);else s.showBlock(this.id,m,n,o,p);r.fire('menuShow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuItem=e.createClass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,className:'cke_button_'+m}); o.group=l._.menuGroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var t=this;var o=l.id+String(m),p=typeof t.state=='undefined'?2:t.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=t.label;if(p==0)r=t.editor.lang.common.unavailable.replace('%1',r);if(t.className)q+=' '+t.className;n.push(''+'');if(t.getItems)n.push('');n.push(r,'');}}});i.menu_subMenuDelay=400;i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea';(function(){function l(){var v=this;try{var s=v.getSelection();if(!s)return;var t=s.getStartElement(),u=new d.elementPath(t);if(!u.compare(v._.selectionPreviousPath)){v._.selectionPreviousPath=u;v.fire('selectionChange',{selection:s,path:u,element:t});}}catch(w){}};var m,n;function o(){n=true;if(m)return;p.call(this);m=e.setTimeout(p,200,this);};function p(){m=null;if(n){e.setTimeout(l,0,this);n=false;}};var q={exec:function(s){switch(s.mode){case 'wysiwyg':s.document.$.execCommand('SelectAll',false,null);break;case 'source':}},canUndo:false};j.add('selection',{init:function(s){s.on('contentDom',function(){var t=s.document;if(c){var u,v;t.on('focusin',function(){if(u){try{u.select();}catch(y){}u=null;}});s.window.on('focus',function(){v=true;x();});s.document.on('beforedeactivate',function(){v=false;s.document.$.execCommand('Unselect');});t.on('mousedown',w);t.on('mouseup',function(){v=true;setTimeout(function(){x(true);},0);});t.on('keydown',w);t.on('keyup',function(){v=true;x();});t.on('selectionchange',x);function w(){v=false;};function x(y){if(v){var z=s.document,A=z&&z.$.selection;if(y&&A&&A.type=='None')if(!z.$.queryCommandEnabled('InsertImage')){e.setTimeout(x,50,this,true); return;}u=A&&A.createRange();o.call(s);}};}else{t.on('mouseup',o,s);t.on('keyup',o,s);}});s.addCommand('selectAll',q);s.ui.addButton('SelectAll',{label:s.lang.selectAll,command:'selectAll'});s.selectionChange=o;}});a.editor.prototype.getSelection=function(){return this.document&&this.document.getSelection();};a.editor.prototype.forceNextSelectionCheck=function(){delete this._.selectionPreviousPath;};g.prototype.getSelection=function(){var s=new d.selection(this);return!s||s.isInvalid?null:s;};a.SELECTION_NONE=1;a.SELECTION_TEXT=2;a.SELECTION_ELEMENT=3;d.selection=function(s){var v=this;var t=s.getCustomData('cke_locked_selection');if(t)return t;v.document=s;v.isLocked=false;v._={cache:{}};if(c){var u=v.getNative().createRange();if(!u||u.item&&u.item(0).ownerDocument!=v.document.$||u.parentElement&&u.parentElement().ownerDocument!=v.document.$)v.isInvalid=true;}return v;};var r={img:1,hr:1,li:1,table:1,tr:1,td: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};d.selection.prototype={getNative:c?function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.$.selection);}:function(){return this._.cache.nativeSel||(this._.cache.nativeSel=this.document.getWindow().$.getSelection());},getType:c?function(){var s=this._.cache;if(s.type)return s.type;var t=1;try{var u=this.getNative(),v=u.type;if(v=='Text')t=2;if(v=='Control')t=3;if(u.createRange().parentElement)t=2;}catch(w){}return s.type=t;}:function(){var s=this._.cache;if(s.type)return s.type;var t=2,u=this.getNative();if(!u)t=1;else if(u.rangeCount==1){var v=u.getRangeAt(0),w=v.startContainer;if(w==v.endContainer&&w.nodeType==1&&v.endOffset-v.startOffset==1&&r[w.childNodes[v.startOffset].nodeName.toLowerCase()])t=3;}return s.type=t;},getRanges:c?(function(){var s=function(t,u){t=t.duplicate();t.collapse(u);var v=t.parentElement(),w=v.childNodes,x;for(var y=0;y0)break;else if(A===0)return{container:v,offset:y};x=null;}}if(!x){x=t.duplicate();x.moveToElementText(v);x.collapse(false);}x.setEndPoint('StartToStart',t);var B=x.text.replace(/(\r\n|\r)/g,'\n').length;while(B>0)B-=w[--y].nodeValue.length;if(B===0)return{container:v,offset:y};else return{container:w[y],offset:-B};};return function(){var E=this;var t=E._.cache;if(t.ranges)return t.ranges;var u=E.getNative(),v=u&&u.createRange(),w=E.getType(),x; if(!u)return[];if(w==2){x=new d.range(E.document);var y=s(v,true);x.setStart(new d.node(y.container),y.offset);y=s(v);x.setEnd(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=E._.cache.ranges=[];for(var A=0;A=0){o.collapse(true);m.setEnd(o.endContainer.$,o.endOffset);}else throw p;}var n=o.document.getSelection().getNative();n.removeAllRanges();n.addRange(m);};(function(){var l={elements:{$:function(m){var n=m.attributes._cke_realelement,o=n&&new a.htmlParser.fragment.fromHtml(decodeURIComponent(n)),p=o&&o.children[0];if(p){var q=m.attributes.style;if(q){var r=/(?:^|\s)width\s*:\s*(\d+)/.exec(q),s=r&&r[1];r=/(?:^|\s)height\s*:\s*(\d+)/.exec(q);var t=r&&r[1];if(s)p.attributes.width=s;if(t)p.attributes.height=t;}}return p;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterInit:function(m){var n=m.dataProcessor,o=n&&n.htmlFilter;if(o)o.addRules(l);}});})();a.editor.prototype.createFakeElement=function(l,m,n,o){var p=this.lang.fakeobjects,q={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(l.getOuterHtml()),alt:p[n]||p.unknown};if(n)q._cke_real_element_type=n;if(o)q._cke_resizable=o;return this.document.createElement('img',{attributes:q});};a.editor.prototype.createFakeParserElement=function(l,m,n,o){var p=new a.htmlParser.basicWriter();l.writeHtml(p);var q=p.getHtml(),r=this.lang.fakeobjects,s={'class':m,src:a.getUrl('images/spacer.gif'),_cke_realelement:encodeURIComponent(q),alt:r[n]||r.unknown};if(n)s._cke_real_element_type=n;if(o)s._cke_resizable=o;return new a.htmlParser.element('img',s);};a.editor.prototype.restoreRealElement=function(l){var m=decodeURIComponent(l.getAttribute('_cke_realelement'));return h.createFromHtml(m,this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeInit:function(l){l.ui.addHandler(3,k.richCombo.handler);}});a.UI_RICHCOMBO=3;k.richCombo=e.createClass({$:function(l){var n=this;e.extend(n,l,{title:l.label,modes:{wysiwyg:1}});var m=n.panel||{};delete n.panel;n.id=e.getNextNumber();n.document=m&&m.parent&&m.parent.getDocument()||a.document;m.className=(m.className||'')+(' cke_rcombopanel');n._={panelDefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richCombo(l);}}},proto:{renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n='cke_'+this.id,o=e.addFunction(function(r){var u=this;var s=u._;if(s.state==0)return;u.createPanel(l);if(s.on){s.panel.hide();return;}if(!s.committed){s.list.commit(); s.committed=1;}var t=u.getValue();if(t)s.list.mark(t);else s.list.unmarkAll();s.panel.showBlock(u.id,new h(r),4);},this),p={id:n,combo:this,focus:function(){var r=a.document.getById(n).getChild(1);r.focus();},execute:o};l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);var q=e.addFunction(function(r,s){r=new d.event(r);var t=r.getKeystroke();switch(t){case 13:case 32:case 40:e.callFunction(o,s);break;default:p.onkey(p,t);}r.preventDefault();});m.push('','',this.label,''+(this.voiceLabel?this.voiceLabel+' ':'')+''+''+this.label+''+''+''+''+''+'');if(this.onRender)this.onRender();return p;},createPanel:function(l){if(this._.panel)return;var m=this._.panelDefinition,n=m.parent||a.document.getBody(),o=new k.floatPanel(l,n,m),p=o.addListBlock(this.id,this.multiSelect),q=this;o.onShow=function(){if(q.className)this.element.getFirst().addClass(q.className+'_panel');q.setState(1);p.focus(!q.multiSelect&&q.getValue());q._.on=1;if(q.onOpen)q.onOpen();};o.onHide=function(){if(q.className)this.element.getFirst().removeClass(q.className+'_panel');q.setState(2);q._.on=0;if(q.onClose)q.onClose();};o.onEscape=function(){o.hide();q.document.getById('cke_'+q.id).getFirst().getNext().focus();};p.onClick=function(r,s){q.document.getWindow().focus();if(q.onClick)q.onClick.call(q,r,s);if(s)q.setValue(r,q._.items[r]);else q.setValue('');o.hide();};this._.panel=o;this._.list=p;o.getBlock(this.id).onHide=function(){q._.on=0;q.setState(2);};if(this.init)this.init();},setValue:function(l,m){var o=this;o._.value=l;var n=o.document.getById('cke_'+o.id+'_text');if(!l){m=o.label;n.addClass('cke_inline_label');}else n.removeClass('cke_inline_label');n.setHtml(typeof m!='undefined'?m:l);},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(l){this._.list.mark(l); },hideItem:function(l){this._.list.hideItem(l);},hideGroup:function(l){this._.list.hideGroup(l);},showAll:function(){this._.list.showAll();},add:function(l,m,n){this._.items[l]=n||l;this._.list.add(l,m,n);},startGroup:function(l){this._.list.startGroup(l);},commit:function(){this._.list.commit();},setState:function(l){var m=this;if(m._.state==l)return;m.document.getById('cke_'+m.id).setState(l);m._.state=l;}}});k.prototype.addRichCombo=function(l,m){this.add(l,3,m);};j.add('htmlwriter');a.htmlWriter=e.createClass({base:a.htmlParser.basicWriter,$:function(){var n=this;n.base();n.indentationChars='\t';n.selfClosingEnd=' />';n.lineBreakChars='\n';n.forceSimpleAmpersand=false;n.sortAttributes=true;n._.indent=false;n._.indentation='';n._.rules={};var l=f;for(var m in e.extend({},l.$block,l.$listItem,l.$tableContent))n.setRules(m,{indent:true,breakBeforeOpen:true,breakAfterOpen:true,breakBeforeClose:!l[m]['#'],breakAfterClose:true});n.setRules('br',{breakAfterOpen:true});n.setRules('pre',{indent:false});},proto:{openTag:function(l,m){var o=this;var n=o._.rules[l];if(o._.indent)o.indentation();else if(n&&n.breakBeforeOpen){o.lineBreak();o.indentation();}o._.output.push('<',l);},openTagClose:function(l,m){var o=this;var n=o._.rules[l];if(m)o._.output.push(o.selfClosingEnd);else{o._.output.push('>');if(n&&n.indent)o._.indentation+=o.indentationChars;}if(n&&n.breakAfterOpen)o.lineBreak();},attribute:function(l,m){if(this.forceSimpleAmpersand)m=m.replace(/&/,'&');this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationChars.length);if(n._.indent)n.indentation();else if(m&&m.breakBeforeClose){n.lineBreak();n.indentation();}n._.output.push('');if(m&&m.breakAfterClose)n.lineBreak();},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.lineBreakChars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setRules:function(l,m){this._.rules[l]=m;}}});j.add('menubutton',{requires:['button','contextmenu'],beforeInit:function(l){l.ui.addHandler(5,k.menuButton.handler);}});a.UI_MENUBUTTON=5;(function(){var l=function(m){var n=this._;if(n.state===0)return;n.previousState=n.state;var o=n.menu;if(!o){o=n.menu=new j.contextMenu(m); o.onHide=e.bind(function(){this.setState(n.previousState);},this);if(this.onMenu)o.addListener(this.onMenu);}if(n.on){o.hide();return;}this.setState(1);o.show(a.document.getById(this._.id),4);};k.menuButton=e.createClass({base:k.button,$:function(m){var n=m.panel;delete m.panel;this.base(m);this.hasArrow=true;this.click=l;},statics:{handler:{create:function(m){return new k.menuButton(m);}}}});})();j.add('dialog',{requires:['dialogui']});a.DIALOG_RESIZE_NONE=0;a.DIALOG_RESIZE_WIDTH=1;a.DIALOG_RESIZE_HEIGHT=2;a.DIALOG_RESIZE_BOTH=3;(function(){function l(L){return!!this._.tabs[L][0].$.offsetHeight;};function m(){var P=this;var L=P._.currentTabId,M=P._.tabIdList.length,N=e.indexOf(P._.tabIdList,L)+M;for(var O=N-1;O>N-M;O--)if(l.call(P,P._.tabIdList[O%M]))return P._.tabIdList[O%M];return null;};function n(){var P=this;var L=P._.currentTabId,M=P._.tabIdList.length,N=e.indexOf(P._.tabIdList,L);for(var O=N+1;O0?M:0)+('px'),top:(N>0?N:0)+('px')});};})(),getPosition:function(){return e.extend({},this._.position);},show:function(){if(this._.editor.mode=='wysiwyg'&&c)this._.editor.getSelection().lock();var L=this._.element,M=this.definition;if(!(L.getParent()&&L.getParent().equals(a.document.getBody())))L.appendTo(a.document.getBody());else return;if(b.gecko&&b.version<10900){var N=this.parts.dialog;N.setStyle('position','absolute');setTimeout(function(){N.setStyle('position','fixed');},0);}this.resize(M.minWidth,M.minHeight);this.selectPage(this.definition.contents[0].id);this.reset();if(a.dialog._.currentZIndex===null)a.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',a.dialog._.currentZIndex+=10);if(a.dialog._.currentTop===null){a.dialog._.currentTop=this;this._.parentDialog=null;A(this._.editor);a.document.on('keydown',D);a.document.on('keyup',E);for(var O in {keyup:1,keydown:1,keypress:1})a.document.on(O,K);}else{this._.parentDialog=a.dialog._.currentTop;var P=this._.parentDialog.getElement().getFirst();P.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2);a.dialog._.currentTop=this;}F(this,this,'\x1b',null,function(){this.getButton('cancel')&&this.getButton('cancel').click(); });this._.hasFocus=false;e.setTimeout(function(){var Q=a.document.getWindow().getViewPaneSize(),R=this.getSize();this.move((Q.width-M.minWidth)/(2),(Q.height-R.height)/(2));this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});this.fire('show',{});this.foreach(function(S){S.setInitValue&&S.setInitValue();});},100,this);},foreach:function(L){var O=this;for(var M in O._.contents)for(var N in O._.contents[M])L(O._.contents[M][N]);return O;},reset:(function(){var L=function(M){if(M.reset)M.reset();};return function(){this.foreach(L);return this;};})(),setupContent:function(){var L=arguments;this.foreach(function(M){if(M.setup)M.setup.apply(M,L);});},commitContent:function(){var L=arguments;this.foreach(function(M){if(M.commit)M.commit.apply(M,L);});},hide:function(){this.fire('hide',{});var L=this._.element;if(!L.getParent())return;L.remove();this.parts.dialog.setStyle('visibility','hidden');G(this);if(!this._.parentDialog)B();else{var M=this._.parentDialog.getElement().getFirst();M.setStyle('z-index',parseInt(M.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}a.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){a.dialog._.currentZIndex=null;a.document.removeListener('keydown',D);a.document.removeListener('keyup',E);a.document.removeListener('keypress',E);for(var N in {keyup:1,keydown:1,keypress:1})a.document.removeListener(N,K);var O=this._.editor;O.focus();if(O.mode=='wysiwyg'&&c)O.getSelection().unlock(true);}else a.dialog._.currentZIndex-=10;this.foreach(function(P){P.resetInitValue&&P.resetInitValue();});},addPage:function(L){var V=this;var M=[],N=L.label?' title="'+e.htmlEncode(L.label)+'"':'',O=L.elements,P=a.dialog._.uiElementBuilders.vbox.build(V,{type:'vbox',className:'cke_dialog_page_contents',children:L.elements,expand:!!L.expand,padding:L.padding,style:L.style||'width: 100%; height: 100%;'},M),Q=h.createFromHtml(M.join('')),R=h.createFromHtml(['0?' cke_last':'cke_first',N,!!L.hidden?' style="display:none"':'',' id="',L.id+'_',e.getNextNumber(),'" href="javascript:void(0)"',' hidefocus="true">',L.label,''].join(''));if(V._.pageCount===0)V.parts.dialog.addClass('cke_single_page');else V.parts.dialog.removeClass('cke_single_page');V._.tabs[L.id]=[R,Q];V._.tabIdList.push(L.id);V._.pageCount++;V._.lastTab=R;var S=V._.contents[L.id]={},T,U=P.getChild();while(T=U.shift()){S[T.id]=T;if(typeof T.getChild=='function')U.push.apply(U,T.getChild());}Q.setAttribute('name',L.id); Q.appendTo(V.parts.contents);R.unselectable();V.parts.tabs.append(R);if(L.accessKey){F(V,V,'CTRL+'+L.accessKey,I,H);V._.accessKeyMap['CTRL+'+L.accessKey]=L.id;}},selectPage:function(L){var Q=this;for(var M in Q._.tabs){var N=Q._.tabs[M][0],O=Q._.tabs[M][1];if(M!=L){N.removeClass('cke_dialog_tab_selected');O.hide();}}var P=Q._.tabs[L];P[0].addClass('cke_dialog_tab_selected');P[1].show();Q._.currentTabId=L;Q._.currentTabIndex=e.indexOf(Q._.tabIdList,L);},hidePage:function(L){var M=this._.tabs[L]&&this._.tabs[L][0];if(!M)return;M.hide();},showPage:function(L){var M=this._.tabs[L]&&this._.tabs[L][0];if(!M)return;M.show();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(L,M){return this._.contents[L][M];},getValueOf:function(L,M){return this.getContentElement(L,M).getValue();},setValueOf:function(L,M,N){return this.getContentElement(L,M).setValue(N);},getButton:function(L){return this._.buttons[L];},click:function(L){return this._.buttons[L].click();},disableButton:function(L){return this._.buttons[L].disable();},enableButton:function(L){return this._.buttons[L].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement();},addFocusable:function(L,M){var O=this;if(typeof M=='undefined'){M=O._.focusList.length;O._.focusList.push(new p(O,L,M));}else{O._.focusList.splice(M,0,new p(O,L,M));for(var N=M+1;NW.width-V.width-Q)ab=W.width-V.width+R[1];else ab=N.x;if(N.y+R[0]W.height-V.height-Q)ac=W.height-V.height+R[2];else ac=N.y;L.move(ab,ac);U.data.preventDefault();};function T(U){a.document.removeListener('mousemove',S);a.document.removeListener('mouseup',T);if(b.ie6Compat){var V=z.getChild(0).getFrameDocument();V.removeListener('mousemove',S);V.removeListener('mouseup',T);}};L.parts.title.on('mousedown',function(U){L._.updateSize=true;M={x:U.data.$.screenX,y:U.data.$.screenY};a.document.on('mousemove',S);a.document.on('mouseup',T);N=L.getPosition();if(b.ie6Compat){var V=z.getChild(0).getFrameDocument();V.on('mousemove',S); V.on('mouseup',T);}U.data.preventDefault();},L);};function x(L){var M=L.definition,N=M.minWidth||0,O=M.minHeight||0,P=M.resizable,Q=o[L.getParentEditor().skinName].margins||[0,0,0,0];function R(ac,ad){ac.y+=ad;};function S(ac,ad){ac.x2+=ad;};function T(ac,ad){ac.y2+=ad;};function U(ac,ad){ac.x+=ad;};var V=null,W=null,X=L._.editor.config.magnetDistance,Y=['tl','t','tr','l','r','bl','b','br'];function Z(ac){var ad=ac.listenerData.part,ae=L.getSize();W=L.getPosition();e.extend(W,{x2:W.x+ae.width,y2:W.y+ae.height});V={x:ac.data.$.screenX,y:ac.data.$.screenY};a.document.on('mousemove',aa,L,{part:ad});a.document.on('mouseup',ab,L,{part:ad});if(b.ie6Compat){var af=z.getChild(0).getFrameDocument();af.on('mousemove',aa,L,{part:ad});af.on('mouseup',ab,L,{part:ad});}ac.data.preventDefault();};function aa(ac){var ad=ac.data.$.screenX,ae=ac.data.$.screenY,af=ad-V.x,ag=ae-V.y,ah=a.document.getWindow().getViewPaneSize(),ai=ac.listenerData.part;if(ai.search('t')!=-1)R(W,ag);if(ai.search('l')!=-1)U(W,af);if(ai.search('b')!=-1)T(W,ag);if(ai.search('r')!=-1)S(W,af);V={x:ad,y:ae};var aj,ak,al,am;if(W.x+Q[3]ah.width-X)al=ah.width+Q[1];else if(ai.search('r')!=-1&&W.x2-W.xah.height-X)am=ah.height+Q[2];else if(ai.search('b')!=-1&&W.y2-W.y'];if(b.ie6Compat){var O=b.isCustomDomain();N.push('');}N.push('');z=h.createFromHtml(N.join(''));}var P=z,Q=function(){var U=M.getViewPaneSize(); P.setStyles({width:U.width+'px',height:U.height+'px'});},R=function(){var U=M.getScrollPosition(),V=a.dialog._.currentTop;P.setStyles({left:U.x+'px',top:U.y+'px'});do{var W=V.getPosition();V.move(W.x,W.y);}while(V=V._.parentDialog)};y=Q;M.on('resize',Q);Q();if(b.ie6Compat){var S=function(){R();arguments.callee.prevScrollHandler.apply(this,arguments);};M.$.setTimeout(function(){S.prevScrollHandler=window.onscroll||(function(){});window.onscroll=S;},0);R();}var T=L.config.dialog_backgroundCoverOpacity;P.setOpacity(typeof T!='undefined'?T:0.5);P.appendTo(a.document.getBody());},B=function(){if(!z)return;var L=a.document.getWindow();z.remove();L.removeListener('resize',y);if(b.ie6Compat)L.$.setTimeout(function(){var M=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=M||null;},0);y=null;},C={},D=function(L){var M=L.data.$.ctrlKey||L.data.$.metaKey,N=L.data.$.altKey,O=L.data.$.shiftKey,P=String.fromCharCode(L.data.$.keyCode),Q=C[(M?'CTRL+':'')+(N?'ALT+':'')+(O?'SHIFT+':'')+P];if(!Q||!Q.length)return;Q=Q[Q.length-1];Q.keydown&&Q.keydown.call(Q.uiElement,Q.dialog,Q.key);L.data.preventDefault();},E=function(L){var M=L.data.$.ctrlKey||L.data.$.metaKey,N=L.data.$.altKey,O=L.data.$.shiftKey,P=String.fromCharCode(L.data.$.keyCode),Q=C[(M?'CTRL+':'')+(N?'ALT+':'')+(O?'SHIFT+':'')+P];if(!Q||!Q.length)return;Q=Q[Q.length-1];Q.keyup&&Q.keyup.call(Q.uiElement,Q.dialog,Q.key);L.data.preventDefault();},F=function(L,M,N,O,P){var Q=C[N]||(C[N]=[]);Q.push({uiElement:L,dialog:M,key:N,keyup:P||L.accessKeyUp,keydown:O||L.accessKeyDown});},G=function(L){for(var M in C){var N=C[M];for(var O=N.length-1;O>=0;O--)if(N[O].dialog==L||N[O].uiElement==L)N.splice(O,1);if(N.length===0)delete C[M];}},H=function(L,M){if(L._.accessKeyMap[M])L.selectPage(L._.accessKeyMap[M]);},I=function(L,M){},J={27:1,13:1},K=function(L){if(L.data.getKeystroke() in J)L.data.stopPropagation();};(function(){k.dialog={uiElement:function(L,M,N,O,P,Q,R){if(arguments.length<4)return;var S=(O.call?O(M):O)||('div'),T=['<',S,' '],U=(P&&P.call?P(M):P)||({}),V=(Q&&Q.call?Q(M):Q)||({}),W=(R&&R.call?R(L,M):R)||(''),X=this.domId=V.id||e.getNextNumber()+'_uiElement',Y=this.id=M.id,Z;V.id=X;var aa={};if(M.type)aa['cke_dialog_ui_'+M.type]=1;if(M.className)aa[M.className]=1;var ab=V['class']&&V['class'].split?V['class'].split(' '):[];for(Z=0;Z=0;Z--)if(ad[Z]==='')ad.splice(Z,1);if(ad.length>0)V.style=(V.style?V.style+'; ':'')+(ad.join('; '));for(Z in V)T.push(Z+'="'+e.htmlEncode(V[Z])+'" ');T.push('>',W,'');N.push(T.join(''));(this._||(this._={})).dialog=L;if(typeof M.isChanged=='boolean')this.isChanged=function(){return M.isChanged;};if(typeof M.isChanged=='function')this.isChanged=M.isChanged;a.event.implementOn(this);this.registerEvents(M);if(this.accessKeyUp&&this.accessKeyDown&&M.accessKey)F(this,L,'CTRL+'+M.accessKey);var ae=this;L.on('load',function(){if(ae.getInputElement())ae.getInputElement().on('focus',function(){L._.tabBarMode=false;L._.hasFocus=true;ae.fire('focus');},ae);});if(this.keyboardFocusable){this.focusIndex=L._.focusList.push(this)-1;this.on('focus',function(){L._.currentFocusIndex=ae.focusIndex;});}e.extend(this,M);},hbox:function(L,M,N,O,P){if(arguments.length<4)return;this._||(this._={});var Q=this._.children=M,R=P&&P.widths||null,S=P&&P.height||null,T={},U,V=function(){var W=[''];for(U=0;U0)W.push('style="'+Y.join('; ')+'" ');W.push('>',N[U],'');}W.push('');return W.join('');};k.dialog.uiElement.call(this,L,P||{type:'hbox'},O,'table',T,P&&P.align&&{align:P.align}||null,V);},vbox:function(L,M,N,O,P){if(arguments.length<3)return;this._||(this._={});var Q=this._.children=M,R=P&&P.width||null,S=P&&P.heights||null,T=function(){var U=['');for(var V=0;V'); }U.push('
0)U.push('style="',W.join('; '),'" ');U.push(' class="cke_dialog_ui_vbox_child">',N[V],'
');return U.join('');};k.dialog.uiElement.call(this,L,P||{type:'vbox'},O,'div',null,null,T);}};})();k.dialog.uiElement.prototype={getElement:function(){return a.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(L){this.getInputElement().setValue(L);this.fire('change',{value:L});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var O=this;var L=O.getInputElement(),M=L,N;while((M=M.getParent())&&(M.$.className.search('cke_dialog_page_contents')==-1)){}if(!M)return O;N=M.getAttribute('name');if(O._.dialog._.currentTabId!=N)O._.dialog.selectPage(N);return O;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(L){var M=/^on([A-Z]\w+)/,N,O=function(Q,R,S,T){R.on('load',function(){Q.getInputElement().on(S,T,Q);});};for(var P in L){if(!(N=P.match(M)))continue;if(this.eventProcessors[P])this.eventProcessors[P].call(this,this._.dialog,L[P]);else O(this,this._.dialog,N[1].toLowerCase(),L[P]);}return this;},eventProcessors:{onLoad:function(L,M){L.on('load',M,this);},onShow:function(L,M){L.on('show',M,this);},onHide:function(L,M){L.on('hide',M,this);}},accessKeyDown:function(L,M){this.focus();},accessKeyUp:function(L,M){},disable:function(){var L=this.getInputElement();L.setAttribute('disabled','true');L.addClass('cke_disabled');},enable:function(){var L=this.getInputElement();L.removeAttribute('disabled');L.removeClass('cke_disabled');},isEnabled:function(){return!this.getInputElement().getAttribute('disabled');},isVisible:function(){return!!this.getInputElement().$.offsetHeight;},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uiElement(),{getChild:function(L){var M=this;if(arguments.length<1)return M._.children.concat();if(!L.splice)L=[L];if(L.length<2)return M._.children[L[0]];else return M._.children[L[0]]&&M._.children[L[0]].getChild?M._.children[L[0]].getChild(L.slice(1,L.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var L={build:function(M,N,O){var P=N.children,Q,R=[],S=[];for(var T=0;T';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true;l(n).loadData(n.getData()); m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removeListener('mode',arguments.callee);});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(l(n).getData());m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=l(n).getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)l(n).loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();var p=n.container;if(b.webkit&&b.version<528){var q=n.config.tabIndex||n.element.getAttribute('tabindex')||0;p=p.append(h.createFromHtml(''));}p.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=l(this);o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=l(this,n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupMode='wysiwyg';i.startupFocus=false;i.editingBlock=true;j.add('panel',{beforeInit:function(l){l.ui.addHandler(2,k.panel.handler);}});a.UI_PANEL=2;k.panel=function(l,m){var n=this;if(m)e.extend(n,m);e.extend(n,{className:'',css:[]});n.id=e.getNextNumber();n.document=l;n._={blocks:{}};};k.panel.handler={create:function(l){return new k.panel(l);}};k.panel.prototype={renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var o=this;var n='cke_'+o.id;m.push('');return n;},getHolderElement:function(){var l=this._.holder;if(!l){if(this.forceIFrame||this.css.length){var m=this.document.getById('cke_'+this.id+'_frame'),n=m.getParent(),o=n.getAttribute('dir'),p=n.getParent().getAttribute('class'),q=n.getParent().getAttribute('lang'),r=m.getFrameDocument(); r.$.open();if(b.isCustomDomain())r.$.domain=document.domain;var s=e.addFunction(e.bind(function(u){this.isLoaded=true;if(this.onLoad)this.onLoad();},this));r.$.write(''+''+''+''+''+''+''+'');r.$.close();var t=r.getWindow();t.$.CKEDITOR=a;r.on('keydown',function(u){var w=this;var v=u.data.getKeystroke();if(w._.onKeyDown&&w._.onKeyDown(v)===false){u.data.preventDefault();return;}if(v==27)w.onEscape&&w.onEscape();},this);l=r.getBody();}else l=this.document.getById('cke_'+this.id);this._.holder=l;}return l;},addBlock:function(l,m){var n=this;m=n._.blocks[l]=m||new k.panel.block(n.getHolderElement());if(!n._.currentBlock)n.showBlock(l);return m;},getBlock:function(l){return this._.blocks[l];},showBlock:function(l){var p=this;var m=p._.blocks,n=m[l],o=p._.currentBlock;if(o)o.hide();p._.currentBlock=n;n._.focusIndex=-1;p._.onKeyDown=n.onKeyDown&&e.bind(n.onKeyDown,n);n.show();return n;}};k.panel.block=e.createClass({$:function(l){var m=this;m.element=l.append(l.getDocument().createElement('div',{attributes:{'class':'cke_panel_block'},styles:{display:'none'}}));m.keys={};m._.focusIndex=-1;m.element.disableContextMenu();},_:{},proto:{show:function(){this.element.setStyle('display','');},hide:function(){var l=this;if(!l.onHide||l.onHide.call(l)!==true)l.element.setStyle('display','none');},onKeyDown:function(l){var q=this;var m=q.keys[l];switch(m){case 'next':var n=q._.focusIndex,o=q.element.getElementsByTag('a'),p;while(p=o.getItem(++n))if(p.getAttribute('_cke_focus')&&p.$.offsetWidth){q._.focusIndex=n;p.focus();break;}return false;case 'prev':n=q._.focusIndex;o=q.element.getElementsByTag('a');while(n>0&&(p=o.getItem(--n)))if(p.getAttribute('_cke_focus')&&p.$.offsetWidth){q._.focusIndex=n;p.focus();break;}return false;case 'click':n=q._.focusIndex;p=n>=0&&q.element.getElementsByTag('a').getItem(n);if(p)p.$.click?p.$.click():p.$.onclick();return false;}return true;}}});j.add('listblock',{requires:['panel'],onLoad:function(){k.panel.prototype.addListBlock=function(l,m){return this.addBlock(l,new k.listBlock(this.getHolderElement(),m));};k.listBlock=e.createClass({base:k.panel.block,$:function(l,m){var o=this; o.base(l);o.multiSelect=!!m;var n=o.keys;n[40]='next';n[9]='next';n[38]='prev';n[2000+9]='prev';n[32]='click';o._.pendingHtml=[];o._.items={};o._.groups={};},_:{close:function(){if(this._.started){this._.pendingHtml.push('');delete this._.started;}},getClick:function(){if(!this._.click)this._.click=e.addFunction(function(l){var n=this;var m=true;if(n.multiSelect)m=n.toggle(l);else n.mark(l);if(n.onClick)n.onClick(l,m);},this);return this._.click;}},proto:{add:function(l,m,n){var q=this;var o=q._.pendingHtml,p='cke_'+e.getNextNumber();if(!q._.started){o.push('
    ');q._.started=1;}q._.items[l]=p;o.push('
  • ",m||l,'
  • ');},startGroup:function(l){this._.close();var m='cke_'+e.getNextNumber();this._.groups[l]=m;this._.pendingHtml.push('

    ',l,'

    ');},commit:function(){var l=this;l._.close();l.element.appendHtml(l._.pendingHtml.join(''));l._.pendingHtml=[];},toggle:function(l){var m=this.isMarked(l);if(m)this.unmark(l);else this.mark(l);return!m;},hideGroup:function(l){var m=this.element.getDocument().getById(this._.groups[l]),n=m&&m.getNext();if(m){m.setStyle('display','none');if(n&&n.getName()=='ul')n.setStyle('display','none');}},hideItem:function(l){this.element.getDocument().getById(this._.items[l]).setStyle('display','none');},showAll:function(){var l=this._.items,m=this._.groups,n=this.element.getDocument();for(var o in l)n.getById(l[o]).setStyle('display','');for(var p in m){var q=n.getById(m[p]),r=q.getNext();q.setStyle('display','');if(r&&r.getName()=='ul')r.setStyle('display','');}},mark:function(l){var m=this;if(!m.multiSelect)m.unmarkAll();m.element.getDocument().getById(m._.items[l]).addClass('cke_selected');},unmark:function(l){this.element.getDocument().getById(this._.items[l]).removeClass('cke_selected');},unmarkAll:function(){var l=this._.items,m=this.element.getDocument();for(var n in l)m.getById(l[n]).removeClass('cke_selected');},isMarked:function(l){return this.element.getDocument().getById(this._.items[l]).hasClass('cke_selected');},focus:function(l){this._.focusIndex=-1;if(l){var m=this.element.getDocument().getById(this._.items[l]).getFirst(),n=this.element.getElementsByTag('a'),o,p=-1;while(o=n.getItem(++p))if(o.equals(m)){this._.focusIndex=p;break;}setTimeout(function(){m.focus(); },0);}}}});}});j.add('dialogui');(function(){var l=function(s){var v=this;v._||(v._={});v._['default']=v._.initValue=s['default']||'';var t=[v._];for(var u=1;u',t.label,'','
    ',v(s,t),'
    ');else{var A={type:'hbox',widths:t.widths,padding:0,children:[{type:'html',html:''+e.htmlEncode(t.label)+''},{type:'html',html:''+v(s,t)+''}]};a.dialog._.uiElementBuilders.hbox.build(s,A,z);}return z.join('');};k.dialog.uiElement.call(this,s,t,u,'div',null,null,y);},textInput:function(s,t,u){if(arguments.length<3)return;l.call(this,t);var v=this._.inputId=e.getNextNumber()+'_textInput',w={'class':'cke_dialog_ui_input_'+t.type,id:v,type:'text'},x;if(t.validate)this.validate=t.validate;if(t.maxLength)w.maxlength=t.maxLength;if(t.size)w.size=t.size;var y=this,z=false;s.on('load',function(){y.getInputElement().on('keydown',function(B){if(B.data.getKeystroke()==13)z=true;});y.getInputElement().on('keyup',function(B){if(B.data.getKeystroke()==13&&z){s.getButton('ok')&&s.getButton('ok').click();z=false;}},null,null,1000);});var A=function(){var B=['
    ');return B.join('');};k.dialog.labeledElement.call(this,s,t,u,A);},textarea:function(s,t,u){if(arguments.length<3)return;l.call(this,t);var v=this,w=this._.inputId=e.getNextNumber()+'_textarea',x={};if(t.validate)this.validate=t.validate;x.rows=t.rows||5;x.cols=t.cols||20;var y=function(){var z=['
    ');return z.join('');};k.dialog.labeledElement.call(this,s,t,u,y);},checkbox:function(s,t,u){if(arguments.length<3)return;var v=l.call(this,t,{'default':!!t['default']});if(t.validate)this.validate=t.validate;var w=function(){var x=e.extend({},t,{id:t.id?t.id+'_checkbox':e.getNextNumber()+'_checkbox'},true),y=[],z={'class':'cke_dialog_ui_checkbox_input',type:'checkbox'};r(x);if(t['default'])z.checked='checked';v.checkbox=new k.dialog.uiElement(s,x,y,'input',null,z);y.push(' ');return y.join('');};k.dialog.uiElement.call(this,s,t,u,'span',null,null,w);},radio:function(s,t,u){if(arguments.length<3)return;l.call(this,t);if(!this._['default'])this._['default']=this._.initValue=t.items[0][1];if(t.validate)this.validate=t.valdiate;var v=[],w=this,x=function(){var y=[],z=[],A={'class':'cke_dialog_ui_radio_item'},B=t.id?t.id+'_radio':e.getNextNumber()+'_radio';for(var C=0;C'+e.htmlEncode(t.label)+'');},select:function(s,t,u){if(arguments.length<3)return;var v=l.call(this,t);if(t.validate)this.validate=t.validate;var w=function(){var x=e.extend({},t,{id:t.id?t.id+'_select':e.getNextNumber()+'_select'},true),y=[],z=[],A={'class':'cke_dialog_ui_input_select'};if(t.size!=undefined)A.size=t.size;if(t.multiple!=undefined)A.multiple=t.multiple;r(x);for(var B=0,C;B ',e.htmlEncode(C[0]));v.select=new k.dialog.uiElement(s,x,y,'select',null,A,z.join(''));return y.join('');};k.dialog.labeledElement.call(this,s,t,u,w);},file:function(s,t,u){if(arguments.length<3)return;if(t['default']===undefined)t['default']='';var v=e.extend(l.call(this,t),{definition:t,buttons:[]});if(t.validate)this.validate=t.validate;var w=function(){v.frameId=e.getNextNumber()+'_fileInput';var x=b.isCustomDomain(),y=['');return y.join('');};s.on('load',function(){var x=a.document.getById(v.frameId),y=x.getParent();y.addClass('cke_dialog_ui_input_file');});k.dialog.labeledElement.call(this,s,t,u,w);},fileButton:function(s,t,u){if(arguments.length<3)return;var v=l.call(this,t),w=this;if(t.validate)this.validate=t.validate;var x=e.extend({},t),y=x.onClick;x.className=(x.className?x.className+' ':'')+('cke_dialog_ui_button');x.onClick=function(z){var A=t['for'];if(!y||y.call(this,z)!==false){s.getContentElement(A[0],A[1]).submit();this.disable();}};s.on('load',function(){s.getContentElement(t['for'][0],t['for'][1])._.buttons.push(w);});k.dialog.button.call(this,s,x,u);},html:(function(){var s=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,u=/\/$/;return function(v,w,x){if(arguments.length<3)return;var y=[],z,A=w.html,B,C;if(A.charAt(0)!='<')A=''+A+'';if(w.focus){var D=this.focus;this.focus=function(){D.call(this);w.focus.call(this);this.fire('focus');};if(w.isFocusable){var E=this.isFocusable;this.isFocusable=E;}this.keyboardFocusable=true;}k.dialog.uiElement.call(this,v,w,y,'span',null,null,''); z=y.join('');B=z.match(s);C=A.match(t)||['','',''];if(u.test(C[1])){C[1]=C[1].slice(0,-1);C[2]='/'+C[2];}x.push([C[1],' ',B[1]||'',C[2]].join(''));};})()},true);k.dialog.html.prototype=new k.dialog.uiElement();k.dialog.labeledElement.prototype=e.extend(new k.dialog.uiElement(),{setLabel:function(s){var t=a.document.getById(this._.labelId);if(t.getChildCount()<1)new d.text(s,a.document).appendTo(t);else t.getChild(0).$.nodeValue=s;return this;},getLabel:function(){var s=a.document.getById(this._.labelId);if(!s||s.getChildCount()<1)return '';else return s.getChild(0).getText();},eventProcessors:p},true);k.dialog.button.prototype=e.extend(new k.dialog.uiElement(),{click:function(){var s=this;if(!s._.disabled)return s.fire('click',{dialog:s._.dialog});s.getElement().$.blur();return false;},enable:function(){this._.disabled=false;var s=this.getElement();s&&s.removeClass('disabled');},disable:function(){this._.disabled=true;this.getElement().addClass('disabled');},isVisible:function(){return!!this.getElement().$.firstChild.offsetHeight;},isEnabled:function(){return!this._.disabled;},eventProcessors:e.extend({},k.dialog.uiElement.prototype.eventProcessors,{onClick:function(s,t){this.on('click',t);}},true),accessKeyUp:function(){this.click();},accessKeyDown:function(){this.focus();},keyboardFocusable:true},true);k.dialog.textInput.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return a.document.getById(this._.inputId);},focus:function(){var s=this.selectParentTab();setTimeout(function(){var t=s.getInputElement();t&&t.$.focus();},0);},select:function(){var s=this.selectParentTab();setTimeout(function(){var t=s.getInputElement();if(t){t.$.focus();t.$.select();}},0);},accessKeyUp:function(){this.select();},setValue:function(s){s=s||'';return k.dialog.uiElement.prototype.setValue.call(this,s);},keyboardFocusable:true},o,true);k.dialog.textarea.prototype=new k.dialog.textInput();k.dialog.select.prototype=e.extend(new k.dialog.labeledElement(),{getInputElement:function(){return this._.select.getElement();},add:function(s,t,u){var v=new h('option',this.getDialog().getParentEditor().document),w=this.getInputElement().$;v.$.text=s;v.$.value=t===undefined||t===null?s:t;if(u===undefined||u===null){if(c)w.add(v.$);else w.add(v.$,null);}else w.add(v.$,u);return this;},remove:function(s){var t=this.getInputElement().$;t.remove(s);return this;},clear:function(){var s=this.getInputElement().$;while(s.length>0)s.remove(0);return this;},keyboardFocusable:true},o,true); k.dialog.checkbox.prototype=e.extend(new k.dialog.uiElement(),{getInputElement:function(){return this._.checkbox.getElement();},setValue:function(s){this.getInputElement().$.checked=s;this.fire('change',{value:s});},getValue:function(){return this.getInputElement().$.checked;},accessKeyUp:function(){this.setValue(!this.getValue());},eventProcessors:{onChange:function(s,t){if(!c)return p.onChange.apply(this,arguments);else{s.on('load',function(){var u=this._.checkbox.getElement();u.on('propertychange',function(v){v=v.data.$;if(v.propertyName=='checked')this.fire('change',{value:u.$.checked});},this);},this);this.on('change',t);}return null;}},keyboardFocusable:true},o,true);k.dialog.radio.prototype=e.extend(new k.dialog.uiElement(),{setValue:function(s){var t=this._.children,u;for(var v=0;v0?new h(s.$.forms[0].elements[0]):this.getElement();},submit:function(){this.getInputElement().getParent().$.submit();return this;},getAction:function(s){return this.getInputElement().getParent().$.action;},reset:function(){var s=a.document.getById(this._.frameId),t=s.getFrameDocument(),u=this._.definition,v=this._.buttons;function w(){t.$.open();if(b.isCustomDomain())t.$.domain=document.domain;var x='';if(u.size)x=u.size-(c?7:0);t.$.write(['','
    ','','
    ',''].join('')); t.$.close();for(var y=0;y'+'
    ',q,'
    ',r,'
    ',s,'
    '].join('')); x.getChild([0,0,0,0,0]).unselectable();x.getChild([0,0,0,0,2]).unselectable();if(p==1)x.insertAfter(o);else o.append(x);l.container=x;x.disableContextMenu();l.fireOnce('themeLoaded');l.fireOnce('uiReady');},buildDialog:function(l){var m=e.getNextNumber(),n=h.createFromHtml(['
    X
    ',c?'':'','
    '].join('').replace(/#/g,'_'+m).replace(/%/g,'cke_dialog_')),o=n.getChild([0,0]);o.getChild(0).unselectable();o.getChild(1).unselectable();return{element:n,parts:{dialog:n.getChild(0),title:o.getChild(0),close:o.getChild(1),tabs:o.getChild(2),contents:o.getChild(3),footer:o.getChild(4)}};},destroy:function(l){var m=l.container,n=l.panels;if(c){m.setStyle('display','none');var o=document.body.createTextRange();o.moveToElementText(m.$);try{o.select();}catch(q){}}if(m)m.remove();for(var p=0;n&&p