/* Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ (function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;if(!window.CKEDITOR)window.CKEDITOR=(function(){var f={timestamp:'D03G5XL',version:'3.6.6',revision:'7689',rnd:Math.floor(Math.random()*900)+100,_:{},status:'unloaded',basePath:(function(){var i=window.CKEDITOR_BASEPATH||'';if(!i){var j=document.getElementsByTagName('script');for(var k=0;k=0?'&':'?')+'t='+this.timestamp;return i;}},g=window.CKEDITOR_GETURL;if(g){var h=f.getUrl;f.getUrl=function(i){return g.call(f,i)||h.call(f,i);};}return f;})();var f=CKEDITOR;if(!f.event){f.event=function(){};f.event.implementOn=function(g){var h=f.event.prototype;for(var i in h){if(g[i]==undefined)g[i]=h[i];}};f.event.prototype=(function(){var g=function(i){var j=i.getPrivate&&i.getPrivate()||i._||(i._={});return j.events||(j.events={});},h=function(i){this.name=i;this.listeners=[];};h.prototype={getListenerIndex:function(i){for(var j=0,k=this.listeners;j=0;s--){if(p[s].priority<=m){p.splice(s+1,0,r);return;}}p.unshift(r);}},fire:(function(){var i=false,j=function(){i=true;},k=false,l=function(){k=true;};return function(m,n,o){var p=g(this)[m],q=i,r=k;i=k=false;if(p){var s=p.listeners;if(s.length){s=s.slice(0);for(var t=0;t=0)k.listeners.splice(l,1);}},hasListeners:function(i){var j=g(this)[i];return j&&j.listeners.length>0;}};})();}if(!f.editor){f.ELEMENT_MODE_NONE=0;f.ELEMENT_MODE_REPLACE=1;f.ELEMENT_MODE_APPENDTO=2;f.editor=function(g,h,i,j){var k=this;k._={instanceConfig:g,element:h,data:j};k.elementMode=i||0;f.event.call(k);k._init();};f.editor.replace=function(g,h){var i=g;if(typeof i!='object'){i=document.getElementById(g);if(i&&i.tagName.toLowerCase() in {style:1,script:1,base:1,link:1,meta:1,title:1})i=null;if(!i){var j=0,k=document.getElementsByName(g);while((i=k[j++])&&i.tagName.toLowerCase()!='textarea'){}}if(!i)throw '[CKEDITOR.editor.replace] The element with id or name "'+g+'" was not found.';}i.style.visibility='hidden';return new f.editor(h,i,1);};f.editor.appendTo=function(g,h,i){var j=g;if(typeof j!='object'){j=document.getElementById(g);if(!j)throw '[CKEDITOR.editor.appendTo] The element with id "'+g+'" was not found.';}return new f.editor(h,j,2,i);};f.editor.prototype={_init:function(){var g=f.editor._pending||(f.editor._pending=[]);g.push(this);},fire:function(g,h){return f.event.prototype.fire.call(this,g,h,this);},fireOnce:function(g,h){return f.event.prototype.fireOnce.call(this,g,h,this);}};f.event.implementOn(f.editor.prototype,true);}if(!f.env)f.env=(function(){var g=navigator.userAgent.toLowerCase(),h=window.opera,i={ie:/*@cc_on!@*/false,opera:!!h&&h.version,webkit:g.indexOf(' applewebkit/')>-1,air:g.indexOf(' adobeair/')>-1,mac:g.indexOf('macintosh')>-1,quirks:document.compatMode=='BackCompat',mobile:g.indexOf('mobile')>-1,iOS:/(ipad|iphone|ipod)/.test(g),isCustomDomain:function(){if(!this.ie)return false;var l=document.domain,m=window.location.hostname;return l!=m&&l!='['+m+']';},secure:location.protocol=='https:'};i.gecko=navigator.product=='Gecko'&&!i.webkit&&!i.opera;var j=0;if(i.ie){j=parseFloat(g.match(/msie (\d+)/)[1]);i.ie8=!!document.documentMode;i.ie8Compat=document.documentMode==8;i.ie9Compat=document.documentMode==9;i.ie7Compat=j==7&&!document.documentMode||document.documentMode==7;i.ie6Compat=j<7||i.quirks;}if(i.gecko){var k=g.match(/rv:([\d\.]+)/);if(k){k=k[1].split('.');j=k[0]*10000+(k[1]||0)*100+ +(k[2]||0);}}if(i.opera)j=parseFloat(h.version());if(i.air)j=parseFloat(g.match(/ adobeair\/(\d+)/)[1]);if(i.webkit)j=parseFloat(g.match(/ applewebkit\/(\d+)/)[1]);i.version=j;i.isCompatible=i.iOS&&j>=534||!i.mobile&&(i.ie&&j>=6||i.gecko&&j>=10801||i.opera&&j>=9.5||i.air&&j>=1||i.webkit&&j>=522||false);i.cssClass='cke_browser_'+(i.ie?'ie':i.gecko?'gecko':i.opera?'opera':i.webkit?'webkit':'unknown'); if(i.quirks)i.cssClass+=' cke_browser_quirks';if(i.ie){i.cssClass+=' cke_browser_ie'+(i.version<7?'6':i.version>=8?document.documentMode:'7');if(i.quirks)i.cssClass+=' cke_browser_iequirks';if(document.documentMode&&document.documentMode>=9)i.cssClass+=' cke_browser_ie9plus';}if(i.gecko&&j<10900)i.cssClass+=' cke_browser_gecko18';if(i.air)i.cssClass+=' cke_browser_air';return i;})();var g=f.env;var h=g.ie;if(f.status=='unloaded')(function(){f.event.implementOn(f);f.loadFullCore=function(){if(f.status!='basic_ready'){f.loadFullCore._load=1;return;}delete f.loadFullCore;var j=document.createElement('script');j.type='text/javascript';j.src=f.basePath+'ckeditor.js';document.getElementsByTagName('head')[0].appendChild(j);};f.loadFullCoreTimeout=0;f.replaceClass='ckeditor';f.replaceByClassEnabled=1;var i=function(j,k,l,m){if(g.isCompatible){if(f.loadFullCore)f.loadFullCore();var n=l(j,k,m);f.add(n);return n;}return null;};f.replace=function(j,k){return i(j,k,f.editor.replace);};f.appendTo=function(j,k,l){return i(j,k,f.editor.appendTo,l);};f.add=function(j){var k=this._.pending||(this._.pending=[]);k.push(j);};f.replaceAll=function(){var j=document.getElementsByTagName('textarea');for(var k=0;k'+l+'');else m.push('');}return m.join('');},htmlEncode:function(k){var l=function(p){var q=new i.element('span');q.setText(p);return q.getHtml();},m=l('\n').toLowerCase()=='
'?function(p){return l(p).replace(/
/gi,'\n');}:l,n=l('>')=='>'?function(p){return m(p).replace(/>/g,'>');}:m,o=l(' ')=='  '?function(p){return n(p).replace(/ /g,' ');}:n;this.htmlEncode=o;return this.htmlEncode(k);},htmlEncodeAttr:function(k){return k.replace(/"/g,'"').replace(//g,'>');},getNextNumber:(function(){var k=0;return function(){return++k;};})(),getNextId:function(){return 'cke_'+this.getNextNumber();},override:function(k,l){return l(k);},setTimeout:function(k,l,m,n,o){if(!o)o=window;if(!m)m=o;return o.setTimeout(function(){if(n)k.apply(m,[].concat(n));else k.apply(m);},l||0);},trim:(function(){var k=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(l){return l.replace(k,'');};})(),ltrim:(function(){var k=/^[ \t\n\r]+/g;return function(l){return l.replace(k,'');};})(),rtrim:(function(){var k=/[ \t\n\r]+$/g;return function(l){return l.replace(k,'');};})(),indexOf:Array.prototype.indexOf?function(k,l){return k.indexOf(l);}:function(k,l){for(var m=0,n=k.length;m',f.document);f.document.getBody().append(k);}if(!/%$/.test(l)){k.setStyle('width',l);return k.$.clientWidth;}return l;};})(),repeat:function(k,l){return new Array(l+1).join(k);},tryThese:function(){var k;for(var l=0,m=arguments.length;l8))&&n)m=n+':'+m;return new i.nodeList(this.$.getElementsByTagName(m));},getHead:function(){var m=this.$.getElementsByTagName('head')[0];if(!m)m=this.getDocumentElement().append(new i.element('head'),true);else m=new i.element(m);return(this.getHead=function(){return m;})();},getBody:function(){var m=new i.element(this.$.body);return(this.getBody=function(){return m;})();},getDocumentElement:function(){var m=new i.element(this.$.documentElement);return(this.getDocumentElement=function(){return m;})();},getWindow:function(){var m=new i.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return m;})();},write:function(m){var n=this;n.$.open('text/html','replace');g.isCustomDomain()&&(n.$.domain=document.domain);n.$.write(m);n.$.close();}});i.node=function(m){if(m){var n=m.nodeType==9?'document':m.nodeType==1?'element':m.nodeType==3?'text':m.nodeType==8?'comment':'domObject';return new i[n](m);}return this;};i.node.prototype=new i.domObject();f.NODE_ELEMENT=1; f.NODE_DOCUMENT=9;f.NODE_TEXT=3;f.NODE_COMMENT=8;f.NODE_DOCUMENT_FRAGMENT=11;f.POSITION_IDENTICAL=0;f.POSITION_DISCONNECTED=1;f.POSITION_FOLLOWING=2;f.POSITION_PRECEDING=4;f.POSITION_IS_CONTAINED=8;f.POSITION_CONTAINS=16;j.extend(i.node.prototype,{appendTo:function(m,n){m.append(this,n);return m;},clone:function(m,n){var o=this.$.cloneNode(m),p=function(q){if(q.nodeType!=1)return;if(!n)q.removeAttribute('id',false);q['data-cke-expando']=undefined;if(m){var r=q.childNodes;for(var s=0;s]*>/g,''):q;},getOuterHtml:function(){var r=this;if(r.$.outerHTML)return r.$.outerHTML.replace(/<\?[^>]*>/,'');var q=r.$.ownerDocument.createElement('div');q.appendChild(r.$.cloneNode(true));return q.innerHTML;},setHtml:function(q){return this.$.innerHTML=q;},setText:function(q){m.prototype.setText=this.$.innerText!=undefined?function(r){return this.$.innerText=r;}:function(r){return this.$.textContent=r;};return this.setText(q);},getAttribute:(function(){var q=function(r){return this.$.getAttribute(r,2);};if(h&&(g.ie7Compat||g.ie6Compat))return function(r){var v=this;switch(r){case 'class':r='className';break;case 'http-equiv':r='httpEquiv';break;case 'name':return v.$.name;case 'tabindex':var s=q.call(v,r);if(s!==0&&v.$.tabIndex===0)s=null;return s;break;case 'checked':var t=v.$.attributes.getNamedItem(r),u=t.specified?t.nodeValue:v.$.checked;return u?'checked':null;case 'hspace':case 'value':return v.$[r];case 'style':return v.$.style.cssText;case 'contenteditable':case 'contentEditable':return v.$.attributes.getNamedItem('contentEditable').specified?v.$.getAttribute('contentEditable'):null;}return q.call(v,r);};else return q;})(),getChildren:function(){return new i.nodeList(this.$.childNodes);},getComputedStyle:h?function(q){return this.$.currentStyle[j.cssStyleToDomStyle(q)];}:function(q){var r=this.getWindow().$.getComputedStyle(this.$,null);return r?r.getPropertyValue(q):'';},getDtd:function(){var q=k[this.getName()];this.getDtd=function(){return q;};return q;},getElementsByTag:l.prototype.getElementsByTag,getTabIndex:h?function(){var q=this.$.tabIndex;if(q===0&&!k.$tabIndex[this.getName()]&&parseInt(this.getAttribute('tabindex'),10)!==0)q=-1;return q;}:g.webkit?function(){var q=this.$.tabIndex;if(q==undefined){q=parseInt(this.getAttribute('tabindex'),10);if(isNaN(q))q=-1;}return q;}: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 q=this.$.nodeName.toLowerCase();if(h&&!(document.documentMode>8)){var r=this.$.scopeName;if(r!='HTML')q=r.toLowerCase()+':'+q;}return(this.getName=function(){return q; })();},getValue:function(){return this.$.value;},getFirst:function(q){var r=this.$.firstChild,s=r&&new i.node(r);if(s&&q&&!q(s))s=s.getNext(q);return s;},getLast:function(q){var r=this.$.lastChild,s=r&&new i.node(r);if(s&&q&&!q(s))s=s.getPrevious(q);return s;},getStyle:function(q){return this.$.style[j.cssStyleToDomStyle(q)];},is:function(){var q=this.getName();for(var r=0;r0&&(r>2||!s[q[0].nodeName]||r==2&&!s[q[1].nodeName]);},hasAttribute:(function(){function q(r){var s=this.$.attributes.getNamedItem(r);return!!(s&&s.specified);};return h&&g.version<8?function(r){if(r=='name')return!!this.$.name;return q.call(this,r);}:q;})(),hide:function(){this.setStyle('display','none');},moveChildren:function(q,r){var s=this.$; q=q.$;if(s==q)return;var t;if(r)while(t=s.lastChild)q.insertBefore(s.removeChild(t),q.firstChild);else while(t=s.firstChild)q.appendChild(s.removeChild(t));},mergeSiblings:(function(){function q(r,s,t){if(s&&s.type==1){var u=[];while(s.data('cke-bookmark')||s.isEmptyInlineRemoveable()){u.push(s);s=t?s.getNext():s.getPrevious();if(!s||s.type!=1)return;}if(r.isIdentical(s)){var v=t?r.getLast():r.getFirst();while(u.length)u.shift().move(r,!t);s.moveChildren(r,!t);s.remove();if(v&&v.type==1)v.mergeSiblings();}}};return function(r){var s=this;if(!(r===false||k.$removeEmpty[s.getName()]||s.is('a')))return;q(s,s.getNext(),true);q(s,s.getPrevious());};})(),show:function(){this.setStyles({display:'',visibility:''});},setAttribute:(function(){var q=function(r,s){this.$.setAttribute(r,s);return this;};if(h&&(g.ie7Compat||g.ie6Compat))return function(r,s){var t=this;if(r=='class')t.$.className=s;else if(r=='style')t.$.style.cssText=s;else if(r=='tabindex')t.$.tabIndex=s;else if(r=='checked')t.$.checked=s;else if(r=='contenteditable')q.call(t,'contentEditable',s);else q.apply(t,arguments);return t;};else if(g.ie8Compat&&g.secure)return function(r,s){if(r=='src'&&s.match(/^http:\/\//))try{q.apply(this,arguments);}catch(t){}else q.apply(this,arguments);return this;};else return q;})(),setAttributes:function(q){for(var r in q)this.setAttribute(r,q[r]);return this;},setValue:function(q){this.$.value=q;return this;},removeAttribute:(function(){var q=function(r){this.$.removeAttribute(r);};if(h&&(g.ie7Compat||g.ie6Compat))return function(r){if(r=='class')r='className';else if(r=='tabindex')r='tabIndex';else if(r=='contenteditable')r='contentEditable';q.call(this,r);};else return q;})(),removeAttributes:function(q){if(j.isArray(q))for(var r=0;r=100?'':'progid:DXImageTransform.Microsoft.Alpha(opacity='+q+')');}else this.setStyle('opacity',q); },unselectable:g.gecko?function(){this.$.style.MozUserSelect='none';this.on('dragstart',function(q){q.data.preventDefault();});}:g.webkit?function(){this.$.style.KhtmlUserSelect='none';this.on('dragstart',function(q){q.data.preventDefault();});}:function(){if(h||g.opera){var q=this.$,r=q.getElementsByTagName('*'),s,t=0;q.unselectable='on';while(s=r[t++])switch(s.tagName.toLowerCase()){case 'iframe':case 'textarea':case 'input':case 'select':break;default:s.unselectable='on';}}},getPositionedAncestor:function(){var q=this;while(q.getName()!='html'){if(q.getComputedStyle('position')!='static')return q;q=q.getParent();}return null;},getDocumentPosition:function(q){var L=this;var r=0,s=0,t=L.getDocument(),u=t.getBody(),v=t.$.compatMode=='BackCompat';if(document.documentElement.getBoundingClientRect){var w=L.$.getBoundingClientRect(),x=t.$,y=x.documentElement,z=y.clientTop||u.$.clientTop||0,A=y.clientLeft||u.$.clientLeft||0,B=true;if(h){var C=t.getDocumentElement().contains(L),D=t.getBody().contains(L);B=v&&D||!v&&C;}if(B){r=w.left+(!v&&y.scrollLeft||u.$.scrollLeft);r-=A;s=w.top+(!v&&y.scrollTop||u.$.scrollTop);s-=z;}}else{var E=L,F=null,G;while(E&&!(E.getName()=='body'||E.getName()=='html')){r+=E.$.offsetLeft-E.$.scrollLeft;s+=E.$.offsetTop-E.$.scrollTop;if(!E.equals(L)){r+=E.$.clientLeft||0;s+=E.$.clientTop||0;}var H=F;while(H&&!H.equals(E)){r-=H.$.scrollLeft;s-=H.$.scrollTop;H=H.getParent();}F=E;E=(G=E.$.offsetParent)?new m(G):null;}}if(q){var I=L.getWindow(),J=q.getWindow();if(!I.equals(J)&&I.$.frameElement){var K=new m(I.$.frameElement).getDocumentPosition(q);r+=K.x;s+=K.y;}}if(!document.documentElement.getBoundingClientRect)if(g.gecko&&!v){r+=L.$.clientLeft?1:0;s+=L.$.clientTop?1:0;}return{x:r,y:s};},scrollIntoView:function(q){var r=this.getParent();if(!r)return;do{var s=r.$.clientWidth&&r.$.clientWidth0)v(0,r===true?F.y:r===false?G.y:F.y<0?F.y:G.y);if(s&&(F.x<0||G.x>0))v(F.x<0?F.x:G.x,0);},setState:function(q){var r=this;switch(q){case 1:r.addClass('cke_on');r.removeClass('cke_off');r.removeClass('cke_disabled');break;case 0:r.addClass('cke_disabled');r.removeClass('cke_off');r.removeClass('cke_on');break;default:r.addClass('cke_off');r.removeClass('cke_on');r.removeClass('cke_disabled');break;}},getFrameDocument:function(){var q=this.$;try{q.contentWindow.document;}catch(r){q.src=q.src;if(h&&g.version<7)window.showModalDialog('javascript:document.write("")');}return q&&new l(q.contentWindow.document);},copyAttributes:function(q,r){var x=this;var s=x.$.attributes;r=r||{};for(var t=0;t0&&r)r=r.childNodes[q.shift()];return r?new i.node(r):null;},getChildCount:function(){return this.$.childNodes.length;},disableContextMenu:function(){this.on('contextmenu',function(q){if(!q.data.getTarget().hasClass('cke_enable_context_menu'))q.data.preventDefault();});},getDirection:function(q){var r=this;return q?r.getComputedStyle('direction')||r.getDirection()||r.getDocument().$.dir||r.getDocument().getBody().getDirection(1):r.getStyle('direction')||r.getAttribute('dir');},data:function(q,r){q='data-'+q;if(r===undefined)return this.getAttribute(q);else if(r===false)this.removeAttribute(q);else this.setAttribute(q,r);return null;}});var n={width:['border-left-width','border-right-width','padding-left','padding-right'],height:['border-top-width','border-bottom-width','padding-top','padding-bottom']}; function o(q){var r=['top','left','right','bottom'],s;if(q=='border')s=['color','style','width'];var t=[];for(var u=0;u',bodyId:'',bodyClass:'',fullPage:false,height:200,plugins:'about,a11yhelp,basicstyles,bidi,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,dialogadvtab,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,iframe,image,indent,justify,keystrokes,link,list,liststyle,maximize,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,showblocks,showborders,smiley,sourcearea,specialchar,stylescombo,tab,table,tabletools,templates,toolbar,undo,wsc,wysiwygarea',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000}; var n=f.config;f.focusManager=function(o){if(o.focusManager)return o.focusManager;this.hasFocus=false;this._={editor:o};return this;};f.focusManager.prototype={focus:function(){var p=this;if(p._.timer)clearTimeout(p._.timer);if(!p.hasFocus){if(f.currentInstance)f.currentInstance.focusManager.forceBlur();var o=p._.editor;o.container.getChild(1).addClass('cke_focus');p.hasFocus=true;o.fire('focus');}},blur:function(){var o=this;if(o._.timer)clearTimeout(o._.timer);o._.timer=setTimeout(function(){delete o._.timer;o.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var o=this._.editor;o.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;o.fire('blur');}}};(function(){var o={};f.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,ka:1,km:1,ko:1,ku: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,ug:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(p,q,r){if(!p||!f.lang.languages[p])p=this.detect(q,p);if(!this[p])f.scriptLoader.load(f.getUrl('lang/'+p+'.js'),function(){r(p,this[p]);},this);else r(p,this[p]);},detect:function(p,q){var r=this.languages;q=q||navigator.userLanguage||navigator.language||p;var s=q.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),t=s[1],u=s[2];if(r[t+'-'+u])t=t+'-'+u;else if(!r[t])t=null;f.lang.detect=t?function(){return t;}:function(v){return v;};return t||p;}};})();f.scriptLoader=(function(){var o={},p={};return{load:function(q,r,s,t){var u=typeof q=='string';if(u)q=[q];if(!s)s=f;var v=q.length,w=[],x=[],y=function(D){if(r)if(u)r.call(s,D);else r.call(s,w,x);};if(v===0){y(true);return;}var z=function(D,E){(E?w:x).push(D);if(--v<=0){t&&f.document.getDocumentElement().removeStyle('cursor');y(E);}},A=function(D,E){o[D]=1;var F=p[D];delete p[D];for(var G=0;G1)return;var F=new m('script');F.setAttributes({type:'text/javascript',src:D});if(r)if(h)F.$.onreadystatechange=function(){if(F.$.readyState=='loaded'||F.$.readyState=='complete'){F.$.onreadystatechange=null;A(D,true);}};else{F.$.onload=function(){setTimeout(function(){A(D,true);},0);};F.$.onerror=function(){A(D,false);};}F.appendTo(f.document.getHead());};t&&f.document.getDocumentElement().setStyle('cursor','wait');for(var C=0;C1)return;var B=!u.css||!u.css.length,C=!u.js||!u.js.length,D=function(){if(B&&C){u._isLoaded=1;for(var G=0;G=0?C.langCode:O[0];if(!N.langEntries||!N.langEntries[Q])L.push(f.getUrl(P+'lang/'+Q+'.js'));else{j.extend(C.lang,N.langEntries[Q]);Q=null;}}K.push(Q);J.push(N);}f.scriptLoader.load(L,function(){var R=['beforeInit','init','afterInit'];for(var S=0;S]+)>)|(?:!--([\\S|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:\"[^\"]*\")|(?:'[^']*')|[^\"'>])*)\\/?>))",'g')};};(function(){var q=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,r={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};f.htmlParser.prototype={onTagOpen:function(){},onTagClose:function(){},onText:function(){},onCDATA:function(){},onComment:function(){},parse:function(s){var F=this;var t,u,v=0,w;while(t=F._.htmlPartsRegex.exec(s)){var x=t.index;if(x>v){var y=s.substring(v,x);if(w)w.push(y);else F.onText(y);}v=F._.htmlPartsRegex.lastIndex;if(u=t[1]){u=u.toLowerCase();if(w&&k.$cdata[u]){F.onCDATA(w.join(''));w=null;}if(!w){F.onTagClose(u);continue;}}if(w){w.push(t[0]);continue;}if(u=t[3]){u=u.toLowerCase();if(/="/.test(u))continue; var z={},A,B=t[4],C=!!(B&&B.charAt(B.length-1)=='/');if(B)while(A=q.exec(B)){var D=A[1].toLowerCase(),E=A[2]||A[3]||A[4]||'';if(!E&&r[D])z[D]=D;else z[D]=E;}F.onTagOpen(u,z,C);if(!w&&k.$cdata[u])w=[];continue;}if(u=t[2])F.onComment(u);}if(s.length>v)F.onText(s.substring(v,s.length));}};})();f.htmlParser.comment=function(q){this.value=q;this._={isBlockLike:false};};f.htmlParser.comment.prototype={type:8,writeHtml:function(q,r){var s=this.value;if(r){if(!(s=r.onComment(s,this)))return;if(typeof s!='string'){s.parent=this.parent;s.writeHtml(q,r);return;}}q.comment(s);}};(function(){f.htmlParser.text=function(q){this.value=q;this._={isBlockLike:false};};f.htmlParser.text.prototype={type:3,writeHtml:function(q,r){var s=this.value;if(r&&!(s=r.onText(s,this)))return;q.text(s);}};})();(function(){f.htmlParser.cdata=function(q){this.value=q;};f.htmlParser.cdata.prototype={type:3,writeHtml:function(q){q.write(this.value);}};})();f.htmlParser.fragment=function(){this.children=[];this.parent=null;this._={isBlockLike:true,hasInlineStarted:false};};(function(){var q=j.extend({table:1,ul:1,ol:1,dl:1},k.table,k.ul,k.ol,k.dl),r=h&&g.version<8?{dd:1,dt:1}:{},s={ol:1,ul:1},t=j.extend({},{html:1},k.html,k.body,k.head,{style:1,script:1});function u(v){return v.name=='a'&&v.attributes.href||k.$removeEmpty[v.name];};f.htmlParser.fragment.fromHtml=function(v,w,x){var y=new f.htmlParser(),z=x||new f.htmlParser.fragment(),A=[],B=[],C=z,D=false,E=false;function F(I){var J;if(A.length>0)for(var K=0;K=0;J--){if(I==A[J].name){A.splice(J,1);return;}}var K=[],L=[],M=C;while(M!=z&&M.name!=I){if(!M._.isBlockLike)L.unshift(M);K.push(M);M=M.returnPoint||M.parent;}if(M!=z){for(J=0;J0?y.children[w-1]:null;if(x){if(v._.isBlockLike&&x.type==3){x.value=j.rtrim(x.value);if(x.value.length===0){y.children.pop();y.add(v);return;}}x.next=v;}v.previous=x;v.parent=y;y.children.splice(w,0,v);y._.hasInlineStarted=v.type==3||v.type==1&&!v._.isBlockLike;},writeHtml:function(v,w){var x;this.filterChildren=function(){var y=new f.htmlParser.basicWriter();this.writeChildrenHtml.call(this,y,w,true);var z=y.getHtml();this.children=new f.htmlParser.fragment.fromHtml(z).children;x=1;};!this.name&&w&&w.onFragment(this);this.writeChildrenHtml(v,x?null:w);},writeChildrenHtml:function(v,w){for(var x=0;xs?1:0;};f.htmlParser.element.prototype={type:1,add:f.htmlParser.fragment.prototype.add,clone:function(){return new f.htmlParser.element(this.name,this.attributes);},writeHtml:function(r,s){var t=this.attributes,u=this,v=u.name,w,x,y,z;u.filterChildren=function(){if(!z){var G=new f.htmlParser.basicWriter();f.htmlParser.fragment.prototype.writeChildrenHtml.call(u,G,s);u.children=new f.htmlParser.fragment.fromHtml(G.getHtml(),0,u.clone()).children;z=1;}};if(s){for(;;){if(!(v=s.onElementName(v)))return;u.name=v;if(!(u=s.onElement(u)))return;u.parent=this.parent;if(u.name==v)break;if(u.type!=1){u.writeHtml(r,s);return;}v=u.name;if(!v){for(var A=0,B=this.children.length;A=0;z--){var C=w[z];if(C){C.pri=x;v.splice(y,0,C);}}}};function s(v,w,x){if(w)for(var y in w){var z=v[y];v[y]=t(z,w[y],x);if(!z)v.$length++;}};function t(v,w,x){if(w){w.pri=x;if(v){if(!v.splice){if(v.pri>x)v=[w,v];else v=[v,w];v.filter=u;}else r(v,w,x);return v;}else{w.filter=w;return w;}}};function u(v){var w=v.type||v instanceof f.htmlParser.fragment;for(var x=0;x');else this._.output.push('>');},attribute:function(q,r){if(typeof r=='string')r=j.htmlEncodeAttr(r);this._.output.push(' ',q,'="',r,'"');},closeTag:function(q){this._.output.push('');},text:function(q){this._.output.push(q);},comment:function(q){this._.output.push('');},write:function(q){this._.output.push(q); },reset:function(){this._.output=[];this._.indent=false;},getHtml:function(q){var r=this._.output.join('');if(q)this.reset();return r;}}});delete f.loadFullCore;f.instances={};f.document=new l(document);f.add=function(q){f.instances[q.name]=q;q.on('focus',function(){if(f.currentInstance!=q){f.currentInstance=q;f.fire('currentInstance');}});q.on('blur',function(){if(f.currentInstance==q){f.currentInstance=null;f.fire('currentInstance');}});};f.remove=function(q){delete f.instances[q.name];};f.on('instanceDestroyed',function(){if(j.isEmpty(this.instances))f.fire('reset');});f.TRISTATE_ON=1;f.TRISTATE_OFF=2;f.TRISTATE_DISABLED=0;i.comment=function(q,r){if(typeof q=='string')q=(r?r.$:document).createComment(q);i.domObject.call(this,q);};i.comment.prototype=new i.node();j.extend(i.comment.prototype,{type:8,getOuterHtml:function(){return '';}});(function(){var q={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,dd:1,legend:1,caption:1},r={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,form:1,fieldset:1},s=function(t){var u=t.getChildren();for(var v=0,w=u.count();v0)A=A.getChild(E-1);else A=F(A,true)===false?null:A.getPreviousSourceNode(true,H,F);}else{A=B;if(A.type==1)if(!(A=A.getChild(D)))A=F(B,true)===false?null:B.getNextSourceNode(true,H,F);}if(A&&F(A)===false)A=null;}while(A&&!this._.end){this.current=A;if(!this.evaluator||this.evaluator(A)!==false){if(!y)return A;}else if(y&&this.evaluator)return false;A=A[I](false,H,F);}this.end();return this.current=null;};function r(x){var y,z=null;while(y=q.call(this,x))z=y;return z;};i.walker=j.createClass({$:function(x){this.range=x;this._={};},proto:{end:function(){this._.end=1;},next:function(){return q.call(this);},previous:function(){return q.call(this,1);},checkForward:function(){return q.call(this,0,1)!==false;},checkBackward:function(){return q.call(this,1,1)!==false;},lastForward:function(){return r.call(this);},lastBackward:function(){return r.call(this,1);},reset:function(){delete this.current;this._={};}}});var s={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};m.prototype.isBlockBoundary=function(x){var y=x?j.extend({},k.$block,x||{}):k.$block; return this.getComputedStyle('float')=='none'&&s[this.getComputedStyle('display')]||y[this.getName()];};i.walker.blockBoundary=function(x){return function(y,z){return!(y.type==1&&y.isBlockBoundary(x));};};i.walker.listItemBoundary=function(){return this.blockBoundary({br:1});};i.walker.bookmark=function(x,y){function z(A){return A&&A.getName&&A.getName()=='span'&&A.data('cke-bookmark');};return function(A){var B,C;B=A&&!A.getName&&(C=A.getParent())&&z(C);B=x?B:B||z(A);return!!(y^B);};};i.walker.whitespaces=function(x){return function(y){var z;if(y&&y.type==3)z=!j.trim(y.getText())||g.webkit&&y.getText()=='​';return!!(x^z);};};i.walker.invisible=function(x){var y=i.walker.whitespaces();return function(z){var A;if(y(z))A=1;else{if(z.type==3)z=z.getParent();A=!z.$.offsetHeight;}return!!(x^A);};};i.walker.nodeType=function(x,y){return function(z){return!!(y^z.type==x);};};i.walker.bogus=function(x){function y(z){return!u(z)&&!v(z);};return function(z){var A=!h?z.is&&z.is('br'):z.getText&&t.test(z.getText());if(A){var B=z.getParent(),C=z.getNext(y);A=B.isBlockBoundary()&&(!C||C.type==1&&C.isBlockBoundary());}return!!(x^A);};};var t=/^[\t\r\n ]*(?: |\xa0)$/,u=i.walker.whitespaces(),v=i.walker.bookmark(),w=function(x){return v(x)||u(x)||x.type==1&&x.getName() in k.$inline&&!(x.getName() in k.$empty);};m.prototype.getBogus=function(){var x=this;do x=x.getPreviousSourceNode();while(w(x))if(x&&(!h?x.is&&x.is('br'):x.getText&&t.test(x.getText())))return x;return false;};})();i.range=function(q){var r=this;r.startContainer=null;r.startOffset=null;r.endContainer=null;r.endOffset=null;r.collapsed=true;r.document=q;};(function(){var q=function(A){A.collapsed=A.startContainer&&A.endContainer&&A.startContainer.equals(A.endContainer)&&A.startOffset==A.endOffset;},r=function(A,B,C,D){A.optimizeBookmark();var E=A.startContainer,F=A.endContainer,G=A.startOffset,H=A.endOffset,I,J;if(F.type==3)F=F.split(H);else if(F.getChildCount()>0)if(H>=F.getChildCount()){F=F.append(A.document.createText(''));J=true;}else F=F.getChild(H);if(E.type==3){E.split(G);if(E.equals(F))F=E.getNext();}else if(!G){E=E.getFirst().insertBeforeMe(A.document.createText(''));I=true;}else if(G>=E.getChildCount()){E=E.append(A.document.createText(''));I=true;}else E=E.getChild(G).getPrevious();var K=E.getParents(),L=F.getParents(),M,N,O;for(M=0;M0&&!Q.equals(F))R=P.append(Q.clone());if(!K[V]||Q.$.parentNode!=K[V].$.parentNode){S=Q.getPrevious();while(S){if(S.equals(K[V])||S.equals(E))break;T=S.getPrevious();if(B==2)P.$.insertBefore(S.$.cloneNode(true),P.$.firstChild);else{S.remove();if(B==1)P.$.insertBefore(S.$,P.$.firstChild);}S=T;}}if(P)P=R;}if(B==2){var W=A.startContainer;if(W.type==3){W.$.data+=W.$.nextSibling.data;W.$.parentNode.removeChild(W.$.nextSibling);}var X=A.endContainer;if(X.type==3&&X.$.nextSibling){X.$.data+=X.$.nextSibling.data;X.$.parentNode.removeChild(X.$.nextSibling);}}else{if(N&&O&&(E.$.parentNode!=N.$.parentNode||F.$.parentNode!=O.$.parentNode)){var Y=O.getIndex();if(I&&O.$.parentNode==E.$.parentNode)Y--;if(D&&N.type==1){var Z=m.createFromHtml(' ',A.document);Z.insertAfter(N);N.mergeSiblings(false);A.moveToBookmark({startNode:Z});}else A.setStart(O.getParent(),Y);}A.collapse(true);}if(I)E.remove();if(J&&F.$.parentNode)F.remove();},s={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 t(){var A=false,B=i.walker.whitespaces(),C=i.walker.bookmark(true),D=i.walker.bogus();return function(E){if(C(E)||B(E))return true;if(D(E)&&!A){A=true;return true;}if(E.type==3&&(E.hasAscendant('pre')||j.trim(E.getText()).length))return false;if(E.type==1&&!s[E.getName()])return false;return true;};};var u=i.walker.bogus();function v(A){var B=i.walker.whitespaces(),C=i.walker.bookmark(1);return function(D){if(C(D)||B(D))return true;return!A&&u(D)||D.type==1&&D.getName() in k.$removeEmpty;};};var w=new i.walker.whitespaces(),x=new i.walker.bookmark(),y=/^[\t\r\n ]*(?: |\xa0)$/;function z(A){return!w(A)&&!x(A);};i.range.prototype={clone:function(){var B=this;var A=new i.range(B.document);A.startContainer=B.startContainer;A.startOffset=B.startOffset;A.endContainer=B.endContainer;A.endOffset=B.endOffset;A.collapsed=B.collapsed;return A;},collapse:function(A){var B=this;if(A){B.endContainer=B.startContainer;B.endOffset=B.startOffset;}else{B.startContainer=B.endContainer;B.startOffset=B.endOffset;}B.collapsed=true;},cloneContents:function(){var A=new i.documentFragment(this.document);if(!this.collapsed)r(this,2,A);return A;},deleteContents:function(A){if(this.collapsed)return; r(this,0,null,A);},extractContents:function(A){var B=new i.documentFragment(this.document);if(!this.collapsed)r(this,1,B,A);return B;},createBookmark:function(A){var G=this;var B,C,D,E,F=G.collapsed;B=G.document.createElement('span');B.data('cke-bookmark',1);B.setStyle('display','none');B.setHtml(' ');if(A){D='cke_bm_'+j.getNextNumber();B.setAttribute('id',D+(F?'C':'S'));}if(!F){C=B.clone();C.setHtml(' ');if(A)C.setAttribute('id',D+'E');E=G.clone();E.collapse();E.insertNode(C);}E=G.clone();E.collapse(true);E.insertNode(B);if(C){G.setStartAfter(B);G.setEndBefore(C);}else G.moveToPosition(B,4);return{startNode:A?D+(F?'C':'S'):B,endNode:A?D+'E':C,serializable:A,collapsed:F};},createBookmark2:function(A){var I=this;var B=I.startContainer,C=I.endContainer,D=I.startOffset,E=I.endOffset,F=I.collapsed,G,H;if(!B||!C)return{start:0,end:0};if(A){if(B.type==1){G=B.getChild(D);if(G&&G.type==3&&D>0&&G.getPrevious().type==3){B=G;D=0;}if(G&&G.type==1)D=G.getIndex(1);}while(B.type==3&&(H=B.getPrevious())&&H.type==3){B=H;D+=H.getLength();}if(!F){if(C.type==1){G=C.getChild(E);if(G&&G.type==3&&E>0&&G.getPrevious().type==3){C=G;E=0;}if(G&&G.type==1)E=G.getIndex(1);}while(C.type==3&&(H=C.getPrevious())&&H.type==3){C=H;E+=H.getLength();}}}return{start:B.getAddress(A),end:F?null:C.getAddress(A),startOffset:D,endOffset:E,normalized:A,collapsed:F,is2:true};},moveToBookmark:function(A){var I=this;if(A.is2){var B=I.document.getByAddress(A.start,A.normalized),C=A.startOffset,D=A.end&&I.document.getByAddress(A.end,A.normalized),E=A.endOffset;I.setStart(B,C);if(D)I.setEnd(D,E);else I.collapse(true);}else{var F=A.serializable,G=F?I.document.getById(A.startNode):A.startNode,H=F?I.document.getById(A.endNode):A.endNode;I.setStartBefore(G);G.remove();if(H){I.setEndBefore(H);H.remove();}else I.collapse(true);}},getBoundaryNodes:function(){var F=this;var A=F.startContainer,B=F.endContainer,C=F.startOffset,D=F.endOffset,E;if(A.type==1){E=A.getChildCount();if(E>C)A=A.getChild(C);else if(E<1)A=A.getPreviousSourceNode();else{A=A.$;while(A.lastChild)A=A.lastChild;A=new i.node(A);A=A.getNextSourceNode()||A;}}if(B.type==1){E=B.getChildCount();if(E>D)B=B.getChild(D).getPreviousSourceNode(true);else if(E<1)B=B.getPreviousSourceNode();else{B=B.$;while(B.lastChild)B=B.lastChild;B=new i.node(B);}}if(A.getPosition(B)&2)A=B;return{startNode:A,endNode:B};},getCommonAncestor:function(A,B){var F=this;var C=F.startContainer,D=F.endContainer,E;if(C.equals(D)){if(A&&C.type==1&&F.startOffset==F.endOffset-1)E=C.getChild(F.startOffset); else E=C;}else E=C.getCommonAncestor(D);return B&&!E.is?E.getParent():E;},optimize:function(){var C=this;var A=C.startContainer,B=C.startOffset;if(A.type!=1)if(!B)C.setStartBefore(A);else if(B>=A.getLength())C.setStartAfter(A);A=C.endContainer;B=C.endOffset;if(A.type!=1)if(!B)C.setEndBefore(A);else if(B>=A.getLength())C.setEndAfter(A);},optimizeBookmark:function(){var C=this;var A=C.startContainer,B=C.endContainer;if(A.is&&A.is('span')&&A.data('cke-bookmark'))C.setStartAt(A,3);if(B&&B.is&&B.is('span')&&B.data('cke-bookmark'))C.setEndAt(B,4);},trim:function(A,B){var I=this;var C=I.startContainer,D=I.startOffset,E=I.collapsed;if((!A||E)&&C&&C.type==3){if(!D){D=C.getIndex();C=C.getParent();}else if(D>=C.getLength()){D=C.getIndex()+1;C=C.getParent();}else{var F=C.split(D);D=C.getIndex()+1;C=C.getParent();if(I.startContainer.equals(I.endContainer))I.setEnd(F,I.endOffset-I.startOffset);else if(C.equals(I.endContainer))I.endOffset+=1;}I.setStart(C,D);if(E){I.collapse(true);return;}}var G=I.endContainer,H=I.endOffset;if(!(B||E)&&G&&G.type==3){if(!H){H=G.getIndex();G=G.getParent();}else if(H>=G.getLength()){H=G.getIndex()+1;G=G.getParent();}else{G.split(H);H=G.getIndex()+1;G=G.getParent();}I.setEnd(G,H);}},enlarge:function(A,B){switch(A){case 1:if(this.collapsed)return;var C=this.getCommonAncestor(),D=this.document.getBody(),E,F,G,H,I,J=false,K,L,M=this.startContainer,N=this.startOffset;if(M.type==3){if(N){M=!j.trim(M.substring(0,N)).length&&M;J=!!M;}if(M)if(!(H=M.getPrevious()))G=M.getParent();}else{if(N)H=M.getChild(N-1)||M.getLast();if(!H)G=M;}while(G||H){if(G&&!H){if(!I&&G.equals(C))I=true;if(!D.contains(G))break;if(!J||G.getComputedStyle('display')!='inline'){J=false;if(I)E=G;else this.setStartBefore(G);}H=G.getPrevious();}while(H){K=false;if(H.type==8){H=H.getPrevious();continue;}else if(H.type==3){L=H.getText();if(/[^\s\ufeff]/.test(L))H=null;K=/[\s\ufeff]$/.test(L);}else if((H.$.offsetWidth>0||B&&H.is('br'))&&!H.data('cke-bookmark'))if(J&&k.$removeEmpty[H.getName()]){L=H.getText();if(/[^\s\ufeff]/.test(L))H=null;else{var O=H.$.getElementsByTagName('*');for(var P=0,Q;Q=O[P++];){if(!k.$removeEmpty[Q.nodeName.toLowerCase()]){H=null;break;}}}if(H)K=!!L.length;}else H=null;if(K)if(J){if(I)E=G;else if(G)this.setStartBefore(G);}else J=true;if(H){var R=H.getPrevious();if(!G&&!R){G=H;H=null;break;}H=R;}else G=null;}if(G)G=G.getParent();}M=this.endContainer;N=this.endOffset;G=H=null;I=J=false;if(M.type==3){M=!j.trim(M.substring(N)).length&&M;J=!(M&&M.getLength());if(M)if(!(H=M.getNext()))G=M.getParent(); }else{H=M.getChild(N);if(!H)G=M;}while(G||H){if(G&&!H){if(!I&&G.equals(C))I=true;if(!D.contains(G))break;if(!J||G.getComputedStyle('display')!='inline'){J=false;if(I)F=G;else if(G)this.setEndAfter(G);}H=G.getNext();}while(H){K=false;if(H.type==3){L=H.getText();if(/[^\s\ufeff]/.test(L))H=null;K=/^[\s\ufeff]/.test(L);}else if(H.type==1){if((H.$.offsetWidth>0||B&&H.is('br'))&&!H.data('cke-bookmark'))if(J&&k.$removeEmpty[H.getName()]){L=H.getText();if(/[^\s\ufeff]/.test(L))H=null;else{O=H.$.getElementsByTagName('*');for(P=0;Q=O[P++];){if(!k.$removeEmpty[Q.nodeName.toLowerCase()]){H=null;break;}}}if(H)K=!!L.length;}else H=null;}else K=1;if(K)if(J)if(I)F=G;else this.setEndAfter(G);if(H){R=H.getNext();if(!G&&!R){G=H;H=null;break;}H=R;}else G=null;}if(G)G=G.getParent();}if(E&&F){C=E.contains(F)?F:E;this.setStartBefore(C);this.setEndAfter(C);}break;case 2:case 3:var S=new i.range(this.document);D=this.document.getBody();S.setStartAt(D,1);S.setEnd(this.startContainer,this.startOffset);var T=new i.walker(S),U,V,W=i.walker.blockBoundary(A==3?{br:1}:null),X=function(ad){var ae=W(ad);if(!ae)U=ad;return ae;},Y=function(ad){var ae=X(ad);if(!ae&&ad.is&&ad.is('br'))V=ad;return ae;};T.guard=X;G=T.lastBackward();U=U||D;this.setStartAt(U,!U.is('br')&&(!G&&this.checkStartOfBlock()||G&&U.contains(G))?1:4);if(A==3){var Z=this.clone();T=new i.walker(Z);var aa=i.walker.whitespaces(),ab=i.walker.bookmark();T.evaluator=function(ad){return!aa(ad)&&!ab(ad);};var ac=T.previous();if(ac&&ac.type==1&&ac.is('br'))return;}S=this.clone();S.collapse();S.setEndAt(D,2);T=new i.walker(S);T.guard=A==3?Y:X;U=null;G=T.lastForward();U=U||D;this.setEndAt(U,!G&&this.checkEndOfBlock()||G&&U.contains(G)?2:3);if(V)this.setEndAfter(V);}},shrink:function(A,B){if(!this.collapsed){A=A||2;var C=this.clone(),D=this.startContainer,E=this.endContainer,F=this.startOffset,G=this.endOffset,H=this.collapsed,I=1,J=1;if(D&&D.type==3)if(!F)C.setStartBefore(D);else if(F>=D.getLength())C.setStartAfter(D);else{C.setStartBefore(D);I=0;}if(E&&E.type==3)if(!G)C.setEndBefore(E);else if(G>=E.getLength())C.setEndAfter(E);else{C.setEndAfter(E);J=0;}var K=new i.walker(C),L=i.walker.bookmark();K.evaluator=function(P){return P.type==(A==1?1:3);};var M;K.guard=function(P,Q){if(L(P))return true;if(A==1&&P.type==3)return false;if(Q&&P.equals(M))return false;if(!Q&&P.type==1)M=P;return true;};if(I){var N=K[A==1?'lastForward':'next']();N&&this.setStartAt(N,B?1:3);}if(J){K.reset();var O=K[A==1?'lastBackward':'previous']();O&&this.setEndAt(O,B?2:4); }return!!(I||J);}},insertNode:function(A){var E=this;E.optimizeBookmark();E.trim(false,true);var B=E.startContainer,C=E.startOffset,D=B.getChild(C);if(D)A.insertBefore(D);else B.append(A);if(A.getParent().equals(E.endContainer))E.endOffset++;E.setStartBefore(A);},moveToPosition:function(A,B){this.setStartAt(A,B);this.collapse(true);},selectNodeContents:function(A){this.setStart(A,0);this.setEnd(A,A.type==3?A.getLength():A.getChildCount());},setStart:function(A,B){var C=this;if(A.type==1&&k.$empty[A.getName()])B=A.getIndex(),A=A.getParent();C.startContainer=A;C.startOffset=B;if(!C.endContainer){C.endContainer=A;C.endOffset=B;}q(C);},setEnd:function(A,B){var C=this;if(A.type==1&&k.$empty[A.getName()])B=A.getIndex()+1,A=A.getParent();C.endContainer=A;C.endOffset=B;if(!C.startContainer){C.startContainer=A;C.startOffset=B;}q(C);},setStartAfter:function(A){this.setStart(A.getParent(),A.getIndex()+1);},setStartBefore:function(A){this.setStart(A.getParent(),A.getIndex());},setEndAfter:function(A){this.setEnd(A.getParent(),A.getIndex()+1);},setEndBefore:function(A){this.setEnd(A.getParent(),A.getIndex());},setStartAt:function(A,B){var C=this;switch(B){case 1:C.setStart(A,0);break;case 2:if(A.type==3)C.setStart(A,A.getLength());else C.setStart(A,A.getChildCount());break;case 3:C.setStartBefore(A);break;case 4:C.setStartAfter(A);}q(C);},setEndAt:function(A,B){var C=this;switch(B){case 1:C.setEnd(A,0);break;case 2:if(A.type==3)C.setEnd(A,A.getLength());else C.setEnd(A,A.getChildCount());break;case 3:C.setEndBefore(A);break;case 4:C.setEndAfter(A);}q(C);},fixBlock:function(A,B){var E=this;var C=E.createBookmark(),D=E.document.createElement(B);E.collapse(A);E.enlarge(2);E.extractContents().appendTo(D);D.trim();if(!h)D.appendBogus();E.insertNode(D);E.moveToBookmark(C);return D;},splitBlock:function(A){var K=this;var B=new i.elementPath(K.startContainer),C=new i.elementPath(K.endContainer),D=B.blockLimit,E=C.blockLimit,F=B.block,G=C.block,H=null;if(!D.equals(E))return null;if(A!='br'){if(!F){F=K.fixBlock(true,A);G=new i.elementPath(K.endContainer).block;}if(!G)G=K.fixBlock(false,A);}var I=F&&K.checkStartOfBlock(),J=G&&K.checkEndOfBlock();K.deleteContents();if(F&&F.equals(G))if(J){H=new i.elementPath(K.startContainer);K.moveToPosition(G,4);G=null;}else if(I){H=new i.elementPath(K.startContainer);K.moveToPosition(F,3);F=null;}else{G=K.splitElement(F);if(!h&&!F.is('ul','ol'))F.appendBogus();}return{previousBlock:F,nextBlock:G,wasStartOfBlock:I,wasEndOfBlock:J,elementPath:H};},splitElement:function(A){var D=this; if(!D.collapsed)return null;D.setEndAt(A,2);var B=D.extractContents(),C=A.clone(false);B.appendTo(C);C.insertAfter(A);D.moveToPosition(A,4);return C;},checkBoundaryOfElement:function(A,B){var C=B==1,D=this.clone();D.collapse(C);D[C?'setStartAt':'setEndAt'](A,C?1:2);var E=new i.walker(D);E.evaluator=v(C);return E[C?'checkBackward':'checkForward']();},checkStartOfBlock:function(){var G=this;var A=G.startContainer,B=G.startOffset;if(h&&B&&A.type==3){var C=j.ltrim(A.substring(0,B));if(y.test(C))G.trim(0,1);}var D=new i.elementPath(G.startContainer),E=G.clone();E.collapse(true);E.setStartAt(D.block||D.blockLimit,1);var F=new i.walker(E);F.evaluator=t();return F.checkBackward();},checkEndOfBlock:function(){var G=this;var A=G.endContainer,B=G.endOffset;if(h&&A.type==3){var C=j.rtrim(A.substring(B));if(y.test(C))G.trim(1,0);}var D=new i.elementPath(G.endContainer),E=G.clone();E.collapse(false);E.setEndAt(D.block||D.blockLimit,2);var F=new i.walker(E);F.evaluator=t();return F.checkForward();},getPreviousNode:function(A,B,C){var D=this.clone();D.collapse(1);D.setStartAt(C||this.document.getBody(),1);var E=new i.walker(D);E.evaluator=A;E.guard=B;return E.previous();},getNextNode:function(A,B,C){var D=this.clone();D.collapse();D.setEndAt(C||this.document.getBody(),2);var E=new i.walker(D);E.evaluator=A;E.guard=B;return E.next();},checkReadOnly:(function(){function A(B,C){while(B){if(B.type==1)if(B.getAttribute('contentEditable')=='false'&&!B.data('cke-editable'))return 0;else if(B.is('html')||B.getAttribute('contentEditable')=='true'&&(B.contains(C)||B.equals(C)))break;B=B.getParent();}return 1;};return function(){var B=this.startContainer,C=this.endContainer;return!(A(B,C)&&A(C,B));};})(),moveToElementEditablePosition:function(A,B){function C(E,F){var G;if(E.type==1&&E.isEditable(false))G=E[B?'getLast':'getFirst'](z);if(!F&&!G)G=E[B?'getPrevious':'getNext'](z);return G;};if(A.type==1&&!A.isEditable(false)){this.moveToPosition(A,B?4:3);return true;}var D=0;while(A){if(A.type==3){if(B&&this.checkEndOfBlock()&&y.test(A.getText()))this.moveToPosition(A,3);else this.moveToPosition(A,B?4:3);D=1;break;}if(A.type==1)if(A.isEditable()){this.moveToPosition(A,B?2:1);D=1;}else if(B&&A.is('br')&&this.checkEndOfBlock())this.moveToPosition(A,3);A=C(A,D);}return!!D;},moveToElementEditStart:function(A){return this.moveToElementEditablePosition(A);},moveToElementEditEnd:function(A){return this.moveToElementEditablePosition(A,true);},getEnclosedNode:function(){var A=this.clone();A.optimize(); if(A.startContainer.type!=1||A.endContainer.type!=1)return null;var B=new i.walker(A),C=i.walker.bookmark(true),D=i.walker.whitespaces(true),E=function(G){return D(G)&&C(G);};A.evaluator=E;var F=B.next();B.reset();return F&&F.equals(B.previous())?F:null;},getTouchedStartNode:function(){var A=this.startContainer;if(this.collapsed||A.type!=1)return A;return A.getChild(this.startOffset)||A;},getTouchedEndNode:function(){var A=this.endContainer;if(this.collapsed||A.type!=1)return A;return A.getChild(this.endOffset-1)||A;}};})();f.POSITION_AFTER_START=1;f.POSITION_BEFORE_END=2;f.POSITION_BEFORE_START=3;f.POSITION_AFTER_END=4;f.ENLARGE_ELEMENT=1;f.ENLARGE_BLOCK_CONTENTS=2;f.ENLARGE_LIST_ITEM_CONTENTS=3;f.START=1;f.END=2;f.STARTEND=3;f.SHRINK_ELEMENT=1;f.SHRINK_TEXT=2;(function(){i.rangeList=function(s){if(s instanceof i.rangeList)return s;if(!s)s=[];else if(s instanceof i.range)s=[s];return j.extend(s,q);};var q={createIterator:function(){var s=this,t=i.walker.bookmark(),u=function(x){return!(x.is&&x.is('tr'));},v=[],w;return{getNextRange:function(x){w=w==undefined?0:w+1;var y=s[w];if(y&&s.length>1){if(!w)for(var z=s.length-1;z>=0;z--)v.unshift(s[z].createBookmark(true));if(x){var A=0;while(s[w+A+1]){var B=y.document,C=0,D=B.getById(v[A].endNode),E=B.getById(v[A+1].startNode),F;while(1){F=D.getNextSourceNode(false);if(!E.equals(F)){if(t(F)||F.type==1&&F.isBlockBoundary()){D=F;continue;}}else C=1;break;}if(!C)break;A++;}}y.moveToBookmark(v.shift());while(A--){F=s[++w];F.moveToBookmark(v.shift());y.setEnd(F.endContainer,F.endOffset);}}return y;}};},createBookmarks:function(s){var x=this;var t=[],u;for(var v=0;v',f.document);q.appendTo(f.document.getHead());try{g.hc=q.getComputedStyle('border-top-color')==q.getComputedStyle('border-right-color');}catch(r){g.hc=false;}if(g.hc)g.cssClass+=' cke_hc';q.remove();})();o.load(n.corePlugins.split(','),function(){f.status='loaded';f.fire('loaded');var q=f._.pending;if(q){delete f._.pending;for(var r=0;r0){E=F.shift();while(!E.getParent().equals(I))E=E.getParent();if(!E.equals(M))J.push(E);M=E;}while(J.length>0){E=J.shift();if(E.getName()=='blockquote'){var N=new i.documentFragment(v.document);while(E.getFirst()){N.append(E.getFirst().remove());F.push(N.getLast());}N.replace(E);}else F.push(E);}var O=v.document.createElement('blockquote');O.insertBefore(F[0]);while(F.length>0){E=F.shift();O.append(E);}}else if(w==1){var P=[],Q={};while(E=D.getNextParagraph()){var R=null,S=null;while(E.getParent()){if(E.getParent().getName()=='blockquote'){R=E.getParent();S=E;break;}E=E.getParent();}if(R&&S&&!S.getCustomData('blockquote_moveout')){P.push(S);m.setMarker(Q,S,'blockquote_moveout',true);}}m.clearAllMarkers(Q);var T=[],U=[];Q={};while(P.length>0){var V=P.shift();O=V.getParent();if(!V.getPrevious())V.remove().insertBefore(O);else if(!V.getNext())V.remove().insertAfter(O);else{V.breakParent(V.getParent());U.push(V.getNext());}if(!O.getCustomData('blockquote_processed')){U.push(O);m.setMarker(Q,O,'blockquote_processed',true);}T.push(V);}m.clearAllMarkers(Q);for(K=U.length-1;K>=0;K--){O=U[K];if(t(O))O.remove();}if(v.config.enterMode==2){var W=true;while(T.length){V=T.shift();if(V.getName()=='div'){N=new i.documentFragment(v.document);var X=W&&V.getPrevious()&&!(V.getPrevious().type==1&&V.getPrevious().isBlockBoundary());if(X)N.append(v.document.createElement('br'));var Y=V.getNext()&&!(V.getNext().type==1&&V.getNext().isBlockBoundary());while(V.getFirst())V.getFirst().remove().appendTo(N);if(Y)N.append(v.document.createElement('br'));N.replace(V);W=false;}}}}x.selectBookmarks(z);v.focus();}};o.add('blockquote',{init:function(v){v.addCommand('blockquote',u);v.ui.addButton('Blockquote',{label:v.lang.blockquote,command:'blockquote'});v.on('selectionChange',s);},requires:['domiterator']});})();o.add('button',{beforeInit:function(r){r.ui.addHandler(1,p.button.handler);}});f.UI_BUTTON='button';p.button=function(r){j.extend(this,r,{title:r.label,className:r.className||r.command&&'cke_button_'+r.command||'',click:r.click||(function(s){s.execCommand(r.command);})});this._={};};p.button.handler={create:function(r){return new p.button(r);}};(function(){p.button.prototype={render:function(r,s){var t=g,u=this._.id=j.getNextId(),v='',w=this.command,x;this._.editor=r; var y={id:u,button:this,editor:r,focus:function(){var E=f.document.getById(u);E.focus();},execute:function(){if(h&&g.version<7)j.setTimeout(function(){this.button.click(r);},0,this);else this.button.click(r);}},z=j.addFunction(function(E){if(y.onkey){E=new i.event(E);return y.onkey(y,E.getKeystroke())!==false;}}),A=j.addFunction(function(E){var F;if(y.onfocus)F=y.onfocus(y,new i.event(E))!==false;if(g.gecko&&g.version<10900)E.preventBubble();return F;});y.clickFn=x=j.addFunction(y.execute,y);if(this.modes){var B={};function C(){var E=r.mode;if(E){var F=this.modes[E]?B[E]!=undefined?B[E]:2:0;this.setState(r.readOnly&&!this.readOnly?0:F);}};r.on('beforeModeUnload',function(){if(r.mode&&this._.state!=0)B[r.mode]=this._.state;},this);r.on('mode',C,this);!this.readOnly&&r.on('readOnly',C,this);}else if(w){w=r.getCommand(w);if(w){w.on('state',function(){this.setState(w.state);},this);v+='cke_'+(w.state==1?'on':w.state==0?'disabled':'off');}}if(!w)v+='cke_off';if(this.className)v+=' '+this.className;s.push('','=10900&&!t.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'",'')+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+u+'_label"'+(this.hasArrow?' aria-haspopup="true"':''));if(t.opera||t.gecko&&t.mac)s.push(' onkeypress="return false;"');if(t.gecko)s.push(' onblur="this.style.cssText = this.style.cssText;"');s.push(' onkeydown="return CKEDITOR.tools.callFunction(',z,', event);" onfocus="return CKEDITOR.tools.callFunction(',A,', event);" '+(h?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',x,', this); return false;"> ',this.label,'');if(this.hasArrow)s.push(''+(g.hc?'▼':' ')+'');s.push('','');if(this.onRender)this.onRender();return y;},setState:function(r){if(this._.state==r)return false;this._.state=r;var s=f.document.getById(this._.id);if(s){s.setState(r);r==0?s.setAttribute('aria-disabled',true):s.removeAttribute('aria-disabled');r==1?s.setAttribute('aria-pressed',true):s.removeAttribute('aria-pressed');return true;}else return false;}};})(); p.prototype.addButton=function(r,s){this.add(r,1,s);};(function(){var r=function(D,E){var F=D.document,G=F.getBody(),H=false,I=function(){H=true;};G.on(E,I);(g.version>7?F.$:F.$.selection.createRange()).execCommand(E);G.removeListener(E,I);return H;},s=h?function(D,E){return r(D,E);}:function(D,E){try{return D.document.$.execCommand(E,false,null);}catch(F){return false;}},t=function(D){var E=this;E.type=D;E.canUndo=E.type=='cut';E.startDisabled=true;};t.prototype={exec:function(D,E){this.type=='cut'&&y(D);var F=s(D,this.type);if(!F)alert(D.lang.clipboard[this.type+'Error']);return F;}};var u={canUndo:false,exec:h?function(D){D.focus();if(!D.document.getBody().fire('beforepaste')&&!r(D,'paste')){D.fire('pasteDialog');return false;}}:function(D){try{if(!D.document.getBody().fire('beforepaste')&&!D.document.$.execCommand('Paste',false,null))throw 0;}catch(E){setTimeout(function(){D.fire('pasteDialog');},0);return false;}}},v=function(D){if(this.mode!='wysiwyg')return;switch(D.data.keyCode){case 1000+86:case 2000+45:var E=this.document.getBody();if(g.opera||g.gecko)E.fire('paste');return;case 1000+88:case 2000+46:var F=this;this.fire('saveSnapshot');setTimeout(function(){F.fire('saveSnapshot');},0);}};function w(D){D.cancel();};function x(D,E,F){var G=this.document;if(G.getById('cke_pastebin'))return;if(E=='text'&&D.data&&D.data.$.clipboardData){var H=D.data.$.clipboardData.getData('text/plain');if(H){D.data.preventDefault();F(H);return;}}var I=this.getSelection(),J=new i.range(G),K=new m(E=='text'?'textarea':g.webkit?'body':'div',G);K.setAttribute('id','cke_pastebin');g.webkit&&K.append(G.createText('\xa0'));G.getBody().append(K);K.setStyles({position:'absolute',top:I.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});K.setStyle(this.config.contentsLangDirection=='ltr'?'left':'right','-1000px');var L=I.createBookmarks();this.on('selectionChange',w,null,null,0);if(E=='text')K.$.focus();else{J.setStartAt(K,1);J.setEndAt(K,2);J.select(true);}var M=this;window.setTimeout(function(){M.document.getBody().focus();M.removeListener('selectionChange',w);if(g.ie7Compat){I.selectBookmarks(L);K.remove();}else{K.remove();I.selectBookmarks(L);}var N;K=g.webkit&&(N=K.getFirst())&&N.is&&N.hasClass('Apple-style-span')?N:K;F(K['get'+(E=='text'?'Value':'Html')]());},0);};function y(D){if(!h||g.quirks)return;var E=D.getSelection(),F;if(E.getType()==3&&(F=E.getSelectedElement())){var G=E.getRanges()[0],H=D.document.createText('');H.insertBefore(F); G.setStartBefore(H);G.setEndAfter(F);E.selectRanges([G]);setTimeout(function(){if(F.getParent()){H.remove();E.selectElement(F);}},0);}};var z,A;function B(D,E){var F;if(A&&D in {Paste:1,Cut:1})return 0;if(D=='Paste'){h&&(z=1);try{F=E.document.$.queryCommandEnabled(D)||g.webkit;}catch(I){}z=0;}else{var G=E.getSelection(),H=G&&G.getRanges();F=G&&!(H.length==1&&H[0].collapsed);}return F?2:0;};function C(){var E=this;if(E.mode!='wysiwyg')return;var D=B('Paste',E);E.getCommand('cut').setState(B('Cut',E));E.getCommand('copy').setState(B('Copy',E));E.getCommand('paste').setState(D);E.fire('pasteState',D);};o.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(D){D.on('paste',function(F){var G=F.data;if(G.html)D.insertHtml(G.html);else if(G.text)D.insertText(G.text);setTimeout(function(){D.fire('afterPaste');},0);},null,null,1000);D.on('pasteDialog',function(F){setTimeout(function(){D.openDialog('paste');},0);});D.on('pasteState',function(F){D.getCommand('paste').setState(F.data);});function E(F,G,H,I){var J=D.lang[G];D.addCommand(G,H);D.ui.addButton(F,{label:J,command:G});if(D.addMenuItems)D.addMenuItem(G,{label:J,command:G,group:'clipboard',order:I});};E('Cut','cut',new t('cut'),1);E('Copy','copy',new t('copy'),4);E('Paste','paste',u,8);f.dialog.add('paste',f.getUrl(this.path+'dialogs/paste.js'));D.on('key',v,D);D.on('contentDom',function(){var F=D.document.getBody();F.on(!h?'paste':'beforepaste',function(G){if(z)return;var H=G.data&&G.data.$;if(h&&H&&!H.ctrlKey)return;var I={mode:'html'};D.fire('beforePaste',I);x.call(D,G,I.mode,function(J){if(!(J=j.trim(J.replace(/]+data-cke-bookmark[^<]*?<\/span>/ig,''))))return;var K={};K[I.mode]=J;D.fire('paste',K);});});if(h){F.on('contextmenu',function(){z=1;setTimeout(function(){z=0;},0);});F.on('paste',function(G){if(!D.document.getById('cke_pastebin')){G.data.preventDefault();z=0;u.exec(D);}});}F.on('beforecut',function(){!z&&y(D);});F.on('mouseup',function(){setTimeout(function(){C.call(D);},0);},D);F.on('keyup',C,D);});D.on('selectionChange',function(F){A=F.data.selection.getRanges()[0].checkReadOnly();C.call(D);});if(D.contextMenu)D.contextMenu.addListener(function(F,G){var H=G.getRanges()[0].checkReadOnly();return{cut:B('Cut',D),copy:B('Copy',D),paste:B('Paste',D)};});}});})();o.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(r){var s=r.config,t=r.lang.colorButton,u;if(!g.hc){v('TextColor','fore',t.textColorTitle);v('BGColor','back',t.bgColorTitle);}function v(y,z,A){var B=j.getNextId()+'_colorBox'; r.ui.add(y,4,{label:A,title:A,className:'cke_button_'+y.toLowerCase(),modes:{wysiwyg:1},panel:{css:r.skin.editor.css,attributes:{role:'listbox','aria-label':t.panelTitle}},onBlock:function(C,D){D.autoSize=true;D.element.addClass('cke_colorblock');D.element.setHtml(w(C,z,B));D.element.getDocument().getBody().setStyle('overflow','hidden');p.fire('ready',this);var E=D.keys,F=r.lang.dir=='rtl';E[F?37:39]='next';E[40]='next';E[9]='next';E[F?39:37]='prev';E[38]='prev';E[2000+9]='prev';E[32]='click';},onOpen:function(){var C=r.getSelection(),D=C&&C.getStartElement(),E=new i.elementPath(D),F;D=E.block||E.blockLimit||r.document.getBody();do F=D&&D.getComputedStyle(z=='back'?'background-color':'color')||'transparent';while(z=='back'&&F=='transparent'&&D&&(D=D.getParent()))if(!F||F=='transparent')F='#ffffff';this._.panel._.iframe.getFrameDocument().getById(B).setStyle('background-color',F);}});};function w(y,z,A){var B=[],C=s.colorButton_colors.split(','),D=j.addFunction(function(J,K){if(J=='?'){var L=arguments.callee;function M(O){this.removeListener('ok',M);this.removeListener('cancel',M);O.name=='ok'&&L(this.getContentElement('picker','selectedColor').getValue(),K);};r.openDialog('colordialog',function(){this.on('ok',M);this.on('cancel',M);});return;}r.focus();y.hide(false);r.fire('saveSnapshot');new f.style(s['colorButton_'+K+'Style'],{color:'inherit'}).remove(r.document);if(J){var N=s['colorButton_'+K+'Style'];N.childRule=K=='back'?function(O){return x(O);}:function(O){return!(O.is('a')||O.getElementsByTag('a').count())||x(O);};new f.style(N,{color:J}).apply(r.document);}r.fire('saveSnapshot');});B.push('
',t.auto,'
');for(var E=0;E');var F=C[E].split('/'),G=F[0],H=F[1]||G;if(!F[1])G='#'+G.replace(/^(.)(.)(.)$/,'$1$1$2$2$3$3');var I=r.lang.colors[H]||H;B.push(''); }if(s.colorButton_enableMore===undefined||s.colorButton_enableMore)B.push('');B.push('
',t.more,'
');return B.join('');};function x(y){return y.getAttribute('contentEditable')=='false'||y.getAttribute('data-nostyle');};}});n.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';n.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};n.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};o.colordialog={requires:['dialog'],init:function(r){r.addCommand('colordialog',new f.dialogCommand('colordialog'));f.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};o.add('colordialog',o.colordialog);o.add('contextmenu',{requires:['menu'],onLoad:function(){o.contextMenu=j.createClass({base:f.menu,$:function(r){this.base.call(this,r,{panel:{className:r.skinClass+' cke_contextmenu',attributes:{'aria-label':r.lang.contextmenu.options}}});},proto:{addTarget:function(r,s){if(g.opera&&!('oncontextmenu' in document.body)){var t;r.on('mousedown',function(x){x=x.data;if(x.$.button!=2){if(x.getKeystroke()==1000+1)r.fire('contextmenu',x);return;}if(s&&(g.mac?x.$.metaKey:x.$.ctrlKey))return;var y=x.getTarget();if(!t){var z=y.getDocument();t=z.createElement('input');t.$.type='button';z.getBody().append(t);}t.setAttribute('style','position:absolute;top:'+(x.$.clientY-2)+'px;left:'+(x.$.clientX-2)+'px;width:5px;height:5px;opacity:0.01');});r.on('mouseup',function(x){if(t){t.remove();t=undefined;r.fire('contextmenu',x.data);}});}r.on('contextmenu',function(x){var y=x.data;if(s&&(g.webkit?u:g.mac?y.$.metaKey:y.$.ctrlKey))return;y.preventDefault();var z=y.getTarget().getDocument().getDocumentElement(),A=y.$.clientX,B=y.$.clientY;j.setTimeout(function(){this.open(z,null,A,B);},h?200:0,this);},this);if(g.opera)r.on('keypress',function(x){var y=x.data;if(y.$.keyCode===0)y.preventDefault();});if(g.webkit){var u,v=function(x){u=g.mac?x.data.$.metaKey:x.data.$.ctrlKey;},w=function(){u=0;};r.on('keydown',v);r.on('keyup',w); r.on('contextmenu',w);}},open:function(r,s,t,u){this.editor.focus();r=r||f.document.getDocumentElement();this.show(r,s,t,u);}}});},beforeInit:function(r){r.contextMenu=new o.contextMenu(r);r.addCommand('contextMenu',{exec:function(){r.contextMenu.open(r.document.getBody());}});}});(function(){function r(t){var u=this.att,v=t&&t.hasAttribute(u)&&t.getAttribute(u)||'';if(v!==undefined)this.setValue(v);};function s(){var t;for(var u=0;u ';o.add('elementspath',{requires:['selection'],init:function(t){var u='cke_path_'+t.name,v,w=function(){if(!v)v=f.document.getById(u);return v;},x='cke_elementspath_'+j.getNextNumber()+'_';t._.elementsPath={idBase:x,filters:[]};t.on('themeSpace',function(C){if(C.data.space=='bottom')C.data.html+=''+t.lang.elementsPath.eleLabel+''+'
'+s+'
';});function y(C){t.focus();var D=t._.elementsPath.list[C];if(D.is('body')){var E=new i.range(t.document);E.selectNodeContents(D);E.select();}else t.getSelection().selectElement(D);};var z=j.addFunction(y),A=j.addFunction(function(C,D){var E=t._.elementsPath.idBase,F;D=new i.event(D);var G=t.lang.dir=='rtl';switch(D.getKeystroke()){case G?39:37:case 9:F=f.document.getById(E+(C+1));if(!F)F=f.document.getById(E+'0');F.focus();return false;case G?37:39:case 2000+9:F=f.document.getById(E+(C-1));if(!F)F=f.document.getById(E+(t._.elementsPath.list.length-1));F.focus();return false;case 27:t.focus();return false;case 13:case 32:y(C);return false;}return true;});t.on('selectionChange',function(C){var D=g,E=C.data.selection,F=E.getStartElement(),G=[],H=C.editor,I=H._.elementsPath.list=[],J=H._.elementsPath.filters;while(F){var K=0,L;if(F.data('cke-display-name'))L=F.data('cke-display-name');else if(F.data('cke-real-element-type'))L=F.data('cke-real-element-type');else L=F.getName();for(var M=0;M',L,''+Q+'','');}if(L=='body')break;F=F.getParent();}var R=w();R.setHtml(G.join('')+s);H.fire('elementsPathUpdate',{space:R});});function B(){v&&v.setHtml(s);delete t._.elementsPath.list;};t.on('readOnly',B);t.on('contentDomUnload',B);t.addCommand('elementsPathFocus',r.toolbarFocus);}});})();(function(){o.add('enterkey',{requires:['keystrokes','indent'],init:function(y){y.addCommand('enter',{modes:{wysiwyg:1},editorFocus:false,exec:function(A){w(A);}});y.addCommand('shiftEnter',{modes:{wysiwyg:1},editorFocus:false,exec:function(A){v(A);}});var z=y.keystrokeHandler.keystrokes;z[13]='enter';z[2000+13]='shiftEnter';}});o.enterkey={enterBlock:function(y,z,A,B){A=A||x(y);if(!A)return;var C=A.document,D=A.checkStartOfBlock(),E=A.checkEndOfBlock(),F=new i.elementPath(A.startContainer),G=F.block;if(A.startContainer.$.nodeName=='BLOCKQUOTE'&&A.startContainer.$.className=='ipsBlockquote'&&G.getFirst().$.nodeName=='CITE'&&G.getFirst().$.className=='ipb')return;if(D&&E){if(G&&(G.is('li')||G.getParent().is('li'))){y.execCommand('outdent');return;}if(G&&G.getParent().is('blockquote')){G.breakParent(G.getParent());if(!G.getPrevious().getFirst(i.walker.invisible(1)))G.getPrevious().remove();if(!G.getNext().getFirst(i.walker.invisible(1)))G.getNext().remove();A.moveToElementEditStart(G);A.select();return;}}else if(G&&G.is('pre')){if(!E){s(y,z,A,B);return;}}else if(G&&k.$captionBlock[G.getName()]){s(y,z,A,B);return;}var H=z==3?'div':'p',I=A.splitBlock(H);if(!I)return;var J=I.previousBlock,K=I.nextBlock,L=I.wasStartOfBlock,M=I.wasEndOfBlock,N;if(K){N=K.getParent();if(N.is('li')){K.breakParent(N);K.move(K.getNext(),1);}}else if(J&&(N=J.getParent())&&N.is('li')){J.breakParent(N);N=J.getNext();A.moveToElementEditStart(N);J.move(J.getPrevious());}if(!L&&!M){if(K.is('li')&&(N=K.getFirst(i.walker.invisible(true)))&&N.is&&N.is('ul','ol'))(h?C.createText('\xa0'):C.createElement('br')).insertBefore(N);if(K)A.moveToElementEditStart(K);}else{var O,P;if(J){if(J.is('li')||!(u.test(J.getName())||J.is('pre')))O=J.clone(); }else if(K)O=K.clone();if(!O){if(N&&N.is('li'))O=N;else{O=C.createElement(H);if(J&&(P=J.getDirection()))O.setAttribute('dir',P);}}else if(B&&!O.is('li'))O.renameNode(H);var Q=I.elementPath;if(Q)for(var R=0,S=Q.elements.length;R0;A--)z[A].deleteContents();return z[0];};})();(function(){var r='nbsp,gt,lt,amp',s='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',t='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',u='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 v(w,x){var y={},z=[],A={nbsp:'\xa0',shy:'­',gt:'>',lt:'<',amp:'&',apos:"'",quot:'"'};w=w.replace(/\b(nbsp|shy|gt|lt|amp|apos|quot)(?:,|$)/g,function(F,G){var H=x?'&'+G+';':A[G],I=x?A[G]:'&'+G+';';y[H]=I;z.push(H);return '';});if(!x&&w){w=w.split(',');var B=document.createElement('div'),C;B.innerHTML='&'+w.join(';&')+';';C=B.innerHTML;B=null;for(var D=0;D0;case 'checked':return!!v.$.checked;case 'value':var u=v.getAttribute('type');return u=='checkbox'||u=='radio'?v.$.value!='on':v.$.value;}return r.apply(v,arguments);};});(function(){var r={canUndo:false,exec:function(t){var u=t.document.createElement('hr');t.insertElement(u);}},s='horizontalrule';o.add(s,{init:function(t){t.addCommand(s,r);t.ui.addButton('HorizontalRule',{label:t.lang.horizontalrule,command:s});}});})();(function(){var r=/^[\t\r\n ]*(?: |\xa0)$/,s='{cke_protected}';function t(Z){var aa=Z.children.length,ab=Z.children[aa-1];while(ab&&ab.type==3&&!j.trim(ab.value))ab=Z.children[--aa];return ab;};function u(Z){var aa=Z.parent;return aa?j.indexOf(aa.children,Z):-1;};function v(Z,aa){var ab=Z.children,ac=t(Z);if(ac){if((aa||!h)&&ac.type==1&&ac.name=='br')ab.pop();if(ac.type==3&&r.test(ac.value))ab.pop();}};function w(Z,aa,ab){if(!aa&&(!ab||typeof ab=='function'&&ab(Z)===false))return false;if(aa&&h&&(document.documentMode>7||Z.name in k.tr||Z.name in k.$listItem))return false;var ac=t(Z);return!ac||ac&&(ac.type==1&&ac.name=='br'||Z.name=='form'&&ac.name=='input');};function x(Z,aa){return function(ab){v(ab,!Z);if(w(ab,!Z,aa))if(Z||h)ab.add(new f.htmlParser.text('\xa0'));else ab.add(new f.htmlParser.element('br',{}));};};var y=k,z=['caption','colgroup','col','thead','tfoot','tbody'],A=j.extend({},y.$block,y.$listItem,y.$tableContent); for(var B in A){if(!('br' in y[B]))delete A[B];}delete A.pre;var C={elements:{},attributeNames:[[/^on/,'data-cke-pa-on']]},D={elements:{}};for(B in A)D.elements[B]=x();var E={elementNames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributeNames:[[/^data-cke-(saved|pa)-/,''],[/^data-cke-.*/,''],['hidefocus','']],elements:{$:function(Z){var aa=Z.attributes;if(aa){if(aa['data-cke-temp'])return false;var ab=['name','href','src'],ac;for(var ad=0;ad-1&&ae>-1&&ad!=ae)){ad=u(ab);ae=u(ac);}return ad>ae?1:-1;});},embed:function(Z){var aa=Z.parent;if(aa&&aa.name=='object'){var ab=aa.attributes.width,ac=aa.attributes.height;ab&&(Z.attributes.width=ab);ac&&(Z.attributes.height=ac);}},param:function(Z){Z.children=[];Z.isEmpty=true;return Z;},a:function(Z){if(!(Z.children.length||Z.attributes.name||Z.attributes['data-cke-saved-name']))return false;},span:function(Z){if(Z.attributes['class']=='Apple-style-span')delete Z.name;},pre:function(Z){h&&v(Z);},html:function(Z){delete Z.attributes.contenteditable;delete Z.attributes['class'];},body:function(Z){delete Z.attributes.spellcheck;delete Z.attributes.contenteditable;},style:function(Z){var aa=Z.children[0];aa&&aa.value&&(aa.value=j.trim(aa.value));if(!Z.attributes.type)Z.attributes.type='text/css';},title:function(Z){var aa=Z.children[0];aa&&(aa.value=Z.attributes['data-cke-title']||'');}},attributes:{'class':function(Z,aa){return j.ltrim(Z.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}}};if(h)E.attributes.style=function(Z,aa){return Z.replace(/(^|;)([^\:]+)/g,function(ab){return ab.toLowerCase();});};function F(Z){var aa=Z.attributes;if(aa.contenteditable!='false')aa['data-cke-editable']=aa.contenteditable?'true':1;aa.contenteditable='false';};function G(Z){var aa=Z.attributes;switch(aa['data-cke-editable']){case 'true':aa.contenteditable='true';break;case '1':delete aa.contenteditable;break;}};for(B in {input:1,textarea:1}){C.elements[B]=F;E.elements[B]=G;}var H=/<(a|area|img|input|source)\b([^>]*)>/gi,I=/\b(on\w+|href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+))/gi,J=/(?:])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,K=/([^<]*)<\/cke:encoded>/gi,L=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,M=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,N=/]*?)\/?>(?!\s*<\/cke:\1)/gi; function O(Z){return Z.replace(H,function(aa,ab,ac){return '<'+ab+ac.replace(I,function(ad,ae){if(!/^on/.test(ae)&&ac.indexOf('data-cke-saved-'+ae)==-1)return ' data-cke-saved-'+ad+' data-cke-'+f.rnd+'-'+ad;return ad;})+'>';});};function P(Z){return Z.replace(J,function(aa){return ''+encodeURIComponent(aa)+'';});};function Q(Z){return Z.replace(K,function(aa,ab){return decodeURIComponent(ab);});};function R(Z){return Z.replace(L,'$1cke:$2');};function S(Z){return Z.replace(M,'$1$2');};function T(Z){return Z.replace(N,'');};function U(Z){return Z.replace(/(]*>)(\r\n|\n)/g,'$1$2$2');};function V(Z){return Z.replace(//g,function(aa){return '';});};function W(Z){return Z.replace(//g,function(aa,ab){return decodeURIComponent(ab);});};function X(Z,aa){var ab=aa._.dataStore;return Z.replace(//g,function(ac,ad){return decodeURIComponent(ad);}).replace(/\{cke_protected_(\d+)\}/g,function(ac,ad){return ab&&ab[ad]||'';});};function Y(Z,aa){var ab=[],ac=aa.config.protectedSource,ad=aa._.dataStore||(aa._.dataStore={id:1}),ae=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,af=[//gi,//gi].concat(ac);Z=Z.replace(//g,function(ah){return '';});for(var ag=0;ag';});Z=Z.replace(ae,function(ah,ai,aj){return '';});return Z.replace(/(['"]).*?\1/g,function(ah){return ah.replace(//g,function(ai,aj){ad[ad.id]=decodeURIComponent(aj);return '{cke_protected_'+ad.id++ +'}';});});};o.add('htmldataprocessor',{requires:['htmlwriter'],init:function(Z){var aa=Z.dataProcessor=new f.htmlDataProcessor(Z);aa.writer.forceSimpleAmpersand=Z.config.forceSimpleAmpersand;aa.dataFilter.addRules(C);aa.dataFilter.addRules(D);aa.htmlFilter.addRules(E);var ab={elements:{}};for(B in A)ab.elements[B]=x(true,Z.config.fillEmptyBlocks);aa.htmlFilter.addRules(ab);},onLoad:function(){!('fillEmptyBlocks' in n)&&(n.fillEmptyBlocks=1);}});f.htmlDataProcessor=function(Z){var aa=this;aa.editor=Z;aa.writer=new f.htmlWriter(); aa.dataFilter=new f.htmlParser.filter();aa.htmlFilter=new f.htmlParser.filter();};f.htmlDataProcessor.prototype={toHtml:function(Z,aa){Z=Y(Z,this.editor);Z=O(Z);Z=P(Z);Z=R(Z);Z=T(Z);Z=U(Z);var ab=new m('div');ab.setHtml('a'+Z);Z=ab.getHtml().substr(1);Z=Z.replace(new RegExp(' data-cke-'+f.rnd+'-','ig'),' ');Z=S(Z);Z=Q(Z);Z=W(Z);var ac=f.htmlParser.fragment.fromHtml(Z,aa),ad=new f.htmlParser.basicWriter();ac.writeHtml(ad,this.dataFilter);Z=ad.getHtml(true);Z=V(Z);return Z;},toDataFormat:function(Z,aa){var ab=this.writer,ac=f.htmlParser.fragment.fromHtml(Z,aa);ab.reset();ac.writeHtml(ab,this.htmlFilter);var ad=ab.getHtml(true);ad=W(ad);ad=X(ad,this.editor);return ad;}};})();(function(){o.add('iframe',{requires:['dialog','fakeobjects'],init:function(r){var s='iframe',t=r.lang.iframe;f.dialog.add(s,this.path+'dialogs/iframe.js');r.addCommand(s,new f.dialogCommand(s));r.addCss('img.cke_iframe{background-image: url('+f.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');r.ui.addButton('Iframe',{label:t.toolbar,command:s});r.on('doubleclick',function(u){var v=u.data.element;if(v.is('img')&&v.data('cke-real-element-type')=='iframe')u.data.dialog='iframe';});if(r.addMenuItems)r.addMenuItems({iframe:{label:t.title,command:'iframe',group:'image'}});if(r.contextMenu)r.contextMenu.addListener(function(u,v){if(u&&u.is('img')&&u.data('cke-real-element-type')=='iframe')return{iframe:2};});},afterInit:function(r){var s=r.dataProcessor,t=s&&s.dataFilter;if(t)t.addRules({elements:{iframe:function(u){return r.createFakeParserElement(u,'cke_iframe','iframe',true);}}});}});})();(function(){o.add('image',{requires:['dialog'],init:function(t){var u='image';f.dialog.add(u,this.path+'dialogs/image.js');t.addCommand(u,new f.dialogCommand(u));t.ui.addButton('Image',{label:t.lang.common.image,command:u});t.on('doubleclick',function(v){var w=v.data.element;if(w.is('img')&&!w.data('cke-realelement')&&!w.isReadOnly())v.data.dialog='image';});if(t.addMenuItems)t.addMenuItems({image:{label:t.lang.image.menu,command:'image',group:'image'}});if(t.contextMenu)t.contextMenu.addListener(function(v,w){if(r(t,v))return{image:2};});},afterInit:function(t){u('left');u('right');u('center');u('block');function u(v){var w=t.getCommand('justify'+v);if(w){if(v=='left'||v=='right')w.on('exec',function(x){var y=r(t),z;if(y){z=s(y);if(z==v){y.removeStyle('float');if(v==s(y))y.removeAttribute('align'); }else y.setStyle('float',v);x.cancel();}});w.on('refresh',function(x){var y=r(t),z;if(y){z=s(y);this.setState(z==v?1:v=='right'||v=='left'?2:0);x.cancel();}});}};}});function r(t,u){if(!u){var v=t.getSelection();u=v.getType()==3&&v.getSelectedElement();}if(u&&u.is('img')&&!u.data('cke-realelement')&&!u.isReadOnly())return u;};function s(t){var u=t.getStyle('float');if(u=='inherit'||u=='none')u=0;if(!u)u=t.getAttribute('align');return u;};})();n.image_removeLinkByEmptyURL=true;(function(){var r={ol:1,ul:1},s=i.walker.whitespaces(true),t=i.walker.bookmark(false,true);function u(y){var G=this;if(y.editor.readOnly)return null;var z=y.editor,A=y.data.path,B=A&&A.contains(r),C=A.block||A.blockLimit;if(B)return G.setState(2);if(!G.useIndentClasses&&G.name=='indent')return G.setState(2);if(!C)return G.setState(0);if(G.useIndentClasses){var D=C.$.className.match(G.classNameRegex),E=0;if(D){D=D[1];E=G.indentClassMap[D];}if(G.name=='outdent'&&!E||G.name=='indent'&&E==z.config.indentClasses.length)return G.setState(0);return G.setState(2);}else{var F=parseInt(C.getStyle(w(C)),10);if(isNaN(F))F=0;if(F<=0)return G.setState(0);return G.setState(2);}};function v(y,z){var B=this;B.name=z;B.useIndentClasses=y.config.indentClasses&&y.config.indentClasses.length>0;if(B.useIndentClasses){B.classNameRegex=new RegExp('(?:^|\\s+)('+y.config.indentClasses.join('|')+')(?=$|\\s)');B.indentClassMap={};for(var A=0;A0){var ae=ac[Y].parent;ac[Y].parent=new m(ae.getName(),ae.getDocument());}}for(Y=ab.getCustomData('listarray_index')+1;Yad;Y++)ac[Y].indent+=Z;var af=o.list.arrayToList(ac,A,null,y.config.enterMode,R.getDirection()); if(z.name=='outdent'){var ag;if((ag=R.getParent())&&ag.is('li')){var ah=af.listNode.getChildren(),ai=[],aj=ah.count(),ak;for(Y=aj-1;Y>=0;Y--){if((ak=ah.getItem(Y))&&ak.is&&ak.is('li'))ai.push(ak);}}}if(af)af.listNode.replace(R);if(ai&&ai.length)for(Y=0;Y0)R.addClass(y.config.indentClasses[U-1]);}else{var V=w(R,S),W=parseInt(R.getStyle(V),10);if(isNaN(W))W=0;var X=y.config.indentOffset||40;W+=(z.name=='indent'?1:-1)*X;if(W<0)return false;W=Math.max(W,0);W=Math.ceil(W/X)*X;R.setStyle(V,W?W+(y.config.indentUnit||'px'):'');if(R.getAttribute('style')==='')R.removeAttribute('style');}m.setMarker(A,R,'indent_processed',1);return true;};var E=y.getSelection(),F=E.createBookmarks(1),G=E&&E.getRanges(1),H,I=G.createIterator();while(H=I.getNextRange()){var J=H.getCommonAncestor(),K=J;while(K&&!(K.type==1&&r[K.getName()]))K=K.getParent();if(!K){var L=H.getEnclosedNode();if(L&&L.type==1&&L.getName() in r){H.setStartAt(L,1);H.setEndAt(L,2);K=L;}}if(K&&H.startContainer.type==1&&H.startContainer.getName() in r){var M=new i.walker(H);M.evaluator=x;H.startContainer=M.next();}if(K&&H.endContainer.type==1&&H.endContainer.getName() in r){M=new i.walker(H);M.evaluator=x;H.endContainer=M.previous();}if(K){var N=K.getFirst(x),O=!!N.getNext(x),P=H.startContainer,Q=N.equals(P)||N.contains(P);if(!(Q&&(z.name=='indent'||z.useIndentClasses||parseInt(K.getStyle(w(K)),10))&&D(K,!O&&N.getDirection())))B(K);}else C();}m.clearAllMarkers(A);y.forceNextSelectionCheck();E.selectBookmarks(F);}};o.add('indent',{init:function(y){var z=y.addCommand('indent',new v(y,'indent')),A=y.addCommand('outdent',new v(y,'outdent'));y.ui.addButton('Indent',{label:y.lang.indent,command:'indent'});y.ui.addButton('Outdent',{label:y.lang.outdent,command:'outdent'});y.on('selectionChange',j.bind(u,z)); y.on('selectionChange',j.bind(u,A));if(g.ie6Compat||g.ie7Compat)y.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');y.on('dirChanged',function(B){var C=new i.range(y.document);C.setStartBefore(B.data.node);C.setEndAfter(B.data.node);var D=new i.walker(C),E;while(E=D.next()){if(E.type==1){if(!E.equals(B.data.node)&&E.getDirection()){C.setStartAfter(E);D=new i.walker(C);continue;}var F=y.config.indentClasses;if(F){var G=B.data.dir=='ltr'?['_rtl','']:['','_rtl'];for(var H=0;H=0;E--){B=z[E].createIterator();B.enlargeBr=x!=2;while(C=B.getNextParagraph(x==1?'p':'div')){C.removeAttribute('align'); C.removeStyle('text-align');var F=A&&(C.$.className=j.ltrim(C.$.className.replace(H.cssClassRegex,''))),G=H.state==2&&(!D||r(C,true)!=H.value);if(A){if(G)C.addClass(A);else if(!F)C.removeAttribute('class');}else if(G)C.setStyle('text-align',H.value);}}v.focus();v.forceNextSelectionCheck();w.selectBookmarks(y);},refresh:function(v){var w=v.block||v.blockLimit;this.setState(w.getName()!='body'&&r(w,this.editor.config.useComputedState)==this.value?1:2);}};o.add('justify',{init:function(v){var w=new t(v,'justifyleft','left'),x=new t(v,'justifycenter','center'),y=new t(v,'justifyright','right'),z=new t(v,'justifyblock','justify');v.addCommand('justifyleft',w);v.addCommand('justifycenter',x);v.addCommand('justifyright',y);v.addCommand('justifyblock',z);v.ui.addButton('JustifyLeft',{label:v.lang.justify.left,command:'justifyleft'});v.ui.addButton('JustifyCenter',{label:v.lang.justify.center,command:'justifycenter'});v.ui.addButton('JustifyRight',{label:v.lang.justify.right,command:'justifyright'});v.ui.addButton('JustifyBlock',{label:v.lang.justify.block,command:'justifyblock'});v.on('selectionChange',j.bind(s,w));v.on('selectionChange',j.bind(s,y));v.on('selectionChange',j.bind(s,x));v.on('selectionChange',j.bind(s,z));v.on('dirChanged',u);},requires:['domiterator']});})();o.add('keystrokes',{beforeInit:function(r){r.keystrokeHandler=new f.keystrokeHandler(r);r.specialKeys={};},init:function(r){var s=r.config.keystrokes,t=r.config.blockedKeystrokes,u=r.keystrokeHandler.keystrokes,v=r.keystrokeHandler.blockedKeystrokes;for(var w=0;w7))ad.append(Y.createText('\xa0'));ad.append(ak.listNode);ab=ak.nextIndex;}else if(ah.indent==-1&&!U&&ai){if(r[ai.getName()]){ad=ah.element.clone(false,true);if(ae!=ai.getDirection(1))ad.setAttribute('dir',ae);}else ad=new i.documentFragment(Y);var al=ai.getDirection(1)!=ae,am=ah.element,an=am.getAttribute('class'),ao=am.getAttribute('style'),ap=ad.type==11&&(V!=2||al||ao||an),aq,ar=ah.contents.length;for(X=0;XV[X-1].indent+1){var ab=V[X-1].indent+1-V[X].indent,ac=V[X].indent;while(V[X]&&V[X].indent>=ac){V[X].indent+=ab;X++;}X--;}}var ad=o.list.arrayToList(V,U,null,S.config.enterMode,T.root.getAttribute('dir')),ae=ad.listNode,af,ag;function ah(ai){if((af=ae[ai?'getFirst':'getLast']())&&!(af.is&&af.isBlockBoundary())&&(ag=T.root[ai?'getPrevious':'getNext'](i.walker.whitespaces(true)))&&!(ag.is&&ag.isBlockBoundary({br:1})))S.document.createElement('br')[ai?'insertBefore':'insertAfter'](af);};ah(true);ah();ae.replace(T.root);};function E(S,T){this.name=S;this.type=T;};var F=i.walker.nodeType(1);function G(S,T,U,V){var W,X;while(W=S[V?'getLast':'getFirst'](F)){if((X=W.getDirection(1))!==T.getDirection(1))W.setAttribute('dir',X);W.remove();U?W[V?'insertBefore':'insertAfter'](U):T.append(W,V);}};E.prototype={exec:function(S){var av=this;var T=S.document,U=S.config,V=S.getSelection(),W=V&&V.getRanges(true);if(!W||W.length<1)return;if(av.state==2){var X=T.getBody();if(!X.getFirst(v)){U.enterMode==2?X.appendBogus():W[0].fixBlock(1,U.enterMode==1?'p':'div');V.selectRanges(W);}else{var Y=W.length==1&&W[0],Z=Y&&Y.getEnclosedNode();if(Z&&Z.is&&av.type==Z.getName())av.setState(1);}}var aa=V.createBookmarks(true),ab=[],ac={},ad=W.createIterator(),ae=0;while((Y=ad.getNextRange())&&++ae){var af=Y.getBoundaryNodes(),ag=af.startNode,ah=af.endNode;if(ag.type==1&&ag.getName()=='td')Y.setStartAt(af.startNode,1);if(ah.type==1&&ah.getName()=='td')Y.setEndAt(af.endNode,2);var ai=Y.createIterator(),aj;ai.forceBrBreak=av.state==2;while(aj=ai.getNextParagraph()){if(aj.getCustomData('list_block'))continue;else m.setMarker(ac,aj,'list_block',1);var ak=new i.elementPath(aj),al=ak.elements,am=al.length,an=null,ao=0,ap=ak.blockLimit,aq;for(var ar=am-1;ar>=0&&(aq=al[ar]);ar--){if(r[aq.getName()]&&ap.contains(aq)){ap.removeCustomData('list_group_object_'+ae);var as=aq.getCustomData('list_group_object');if(as)as.contents.push(aj);else{as={root:aq,contents:[aj]};ab.push(as);m.setMarker(ac,aq,'list_group_object',as);}ao=1;break;}}if(ao)continue;var at=ap;if(at.getCustomData('list_group_object_'+ae))at.getCustomData('list_group_object_'+ae).contents.push(aj);else{as={root:at,contents:[aj]};m.setMarker(ac,at,'list_group_object_'+ae,as);ab.push(as);}}}var au=[];while(ab.length>0){as=ab.shift();if(av.state==2){if(r[as.root.getName()])A.call(av,S,as,ac,au);else C.call(av,S,as,au);}else if(av.state==1&&r[as.root.getName()])D.call(av,S,as,ac);}for(ar=0; ar0)for(var z=y.length-1;z>=0;z--){var A=y[z][0],B=y[z][1];if(B)A.insertBefore(B);else A.appendTo(x);}};function t(x,y){var z=r(x),A={},B=x.$;if(!y){A['class']=B.className||'';B.className='';}A.inline=B.style.cssText||'';if(!y)B.style.cssText='position: static; overflow: visible';s(z);return A;};function u(x,y){var z=r(x),A=x.$;if('class' in y)A.className=y['class'];if('inline' in y)A.style.cssText=y.inline;s(z);};function v(x){var y=f.instances;for(var z in y){var A=y[z];if(A.mode=='wysiwyg'&&!A.readOnly){var B=A.document.getBody();B.setAttribute('contentEditable',false);B.setAttribute('contentEditable',true);}}if(x.focusManager.hasFocus){x.toolbox.focus();x.focus();}};function w(x){if(!h||g.version>6)return null;var y=m.createFromHtml('');return x.append(y,true);};o.add('maximize',{init:function(x){var y=x.lang,z=f.document,A=z.getWindow(),B,C,D,E;function F(){var H=A.getViewPaneSize();E&&E.setStyles({width:H.width+'px',height:H.height+'px'});x.resize(H.width,H.height,null,true);};var G=2;x.addCommand('maximize',{modes:{wysiwyg:!g.iOS,source:!g.iOS},readOnly:1,editorFocus:false,exec:function(){var H=x.container.getChild(1),I=x.getThemeSpace('contents');if(x.mode=='wysiwyg'){var J=x.getSelection();B=J&&J.getRanges();C=A.getScrollPosition();}else{var K=x.textarea.$;B=!h&&[K.selectionStart,K.selectionEnd];C=[K.scrollLeft,K.scrollTop];}if(this.state==2){A.on('resize',F);D=A.getScrollPosition();var L=x.container;while(L=L.getParent()){L.setCustomData('maximize_saved_styles',t(L));L.setStyle('z-index',x.config.baseFloatZIndex-1);}I.setCustomData('maximize_saved_styles',t(I,true));H.setCustomData('maximize_saved_styles',t(H,true)); var M={overflow:g.webkit?'':'hidden',width:0,height:0};z.getDocumentElement().setStyles(M);!g.gecko&&z.getDocumentElement().setStyle('position','fixed');!(g.gecko&&g.quirks)&&z.getBody().setStyles(M);h?setTimeout(function(){A.$.scrollTo(0,0);},0):A.$.scrollTo(0,0);H.setStyle('position',g.gecko&&g.quirks?'fixed':'absolute');H.$.offsetLeft;H.setStyles({'z-index':x.config.baseFloatZIndex-1,left:'0px',top:'0px'});E=w(H);H.addClass('cke_maximized');F();var N=H.getDocumentPosition();H.setStyles({left:-1*N.x+'px',top:-1*N.y+'px'});g.gecko&&v(x);}else if(this.state==1){A.removeListener('resize',F);var O=[I,H];for(var P=0;P ');x.children.length=0;x.add(z);var A=x.attributes;delete A['aria-label'];delete A.contenteditable;delete A.title;}return y;}}},5);if(u)u.addRules({elements:{div:function(w){var x=w.attributes,y=x&&x.style,z=y&&w.children.length==1&&w.children[0],A=z&&z.name=='span'&&z.attributes.style;if(A&&/page-break-after\s*:\s*always/i.test(y)&&/display\s*:\s*none/i.test(A)){x.contenteditable='false';x['class']='cke_pagebreak';x['data-cke-display-name']='pagebreak';x['aria-label']=s;x.title=s;w.children.length=0;}}}});},requires:['fakeobjects']});o.pagebreakCmd={exec:function(r){var s=r.lang.pagebreakAlt,t=m.createFromHtml('
'+'
',r.document),u=r.getSelection().getRanges(true);r.fire('saveSnapshot');for(var v,w=u.length-1;w>=0;w--){v=u[w];if(w1&&s.substr(s.length-1,1)=='%')s=parseInt(window.screen.width*parseInt(s,10)/100,10);if(typeof t=='string'&&t.length>1&&t.substr(t.length-1,1)=='%')t=parseInt(window.screen.height*parseInt(t,10)/100,10);if(s<640)s=640;if(t<420)t=420;var v=parseInt((window.screen.height-t)/2,10),w=parseInt((window.screen.width-s)/2,10);u=(u||'location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes')+',width='+s+',height='+t+',top='+v+',left='+w;var x=window.open('',null,u,true);if(!x)return false;try{var y=navigator.userAgent.toLowerCase();if(y.indexOf(' chrome/')==-1){x.moveTo(w,v);x.resizeTo(s,t);}x.focus();x.location.href=r;}catch(z){x=window.open(r,null,u,true);}return true;}});(function(){var r,s={modes:{wysiwyg:1,source:1},canUndo:false,readOnly:1,exec:function(u){var v,w=u.config,x=w.baseHref?'':'',y=g.isCustomDomain();if(w.fullPage)v=u.getData().replace(//,'$&'+x).replace(/[^>]*(?=<\/title>)/,'$& — '+u.lang.preview);else{var z=''+''+x+''+u.lang.preview+''+j.buildStyleHtml(u.config.contentsCss)+''+z+u.getData()+''; }var B=640,C=420,D=80;try{var E=window.screen;B=Math.round(E.width*0.8);C=Math.round(E.height*0.7);D=Math.round(E.width*0.1);}catch(I){}var F='';if(y){window._cke_htmlToLoad=v;F='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}if(g.gecko){window._cke_htmlToLoad=v;F=r+'preview.html';}var G=window.open(F,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+B+',height='+C+',left='+D);if(!y&&!g.gecko){var H=G.document;H.open();H.write(v);H.close();g.webkit&&setTimeout(function(){H.body.innerHTML+='';},0);}}},t='preview';o.add(t,{init:function(u){r=this.path;u.addCommand(t,s);u.ui.addButton('Preview',{label:u.lang.preview,command:t});}});})();o.add('print',{init:function(r){var s='print',t=r.addCommand(s,o.print);r.ui.addButton('Print',{label:r.lang.print,command:s});}});o.print={exec:function(r){if(g.opera)return;else if(g.gecko)r.window.$.print();else r.document.$.execCommand('Print');},canUndo:false,readOnly:1,modes:{wysiwyg:!g.opera}};o.add('removeformat',{requires:['selection'],init:function(r){r.addCommand('removeFormat',o.removeformat.commands.removeformat);r.ui.addButton('RemoveFormat',{label:r.lang.removeFormat,command:'removeFormat'});r._.removeFormat={filters:[]};}});o.removeformat={commands:{removeformat:{exec:function(r){var s=r._.removeFormatRegex||(r._.removeFormatRegex=new RegExp('^(?:'+r.config.removeFormatTags.replace(/,/g,'|')+')$','i')),t=r._.removeAttributes||(r._.removeAttributes=r.config.removeFormatAttributes.split(',')),u=o.removeformat.filter,v=r.getSelection().getRanges(1),w=v.createIterator(),x;while(x=w.getNextRange()){if(!x.collapsed)x.enlarge(1);var y=x.createBookmark(),z=y.startNode,A=y.endNode,B,C=function(E){var F=new i.elementPath(E),G=F.elements;for(var H=1,I;I=G[H];H++){if(I.equals(F.block)||I.equals(F.blockLimit))break;if(s.test(I.getName())&&u(r,I))E.breakParent(I);}};C(z);if(A){C(A);B=z.getNextSourceNode(true,1);while(B){if(B.equals(A))break;var D=B.getNextSourceNode(false,1);if(!(B.getName()=='img'&&B.data('cke-realelement'))&&u(r,B))if(s.test(B.getName()))B.remove(1);else{B.removeAttributes(t);r.fire('removeFormatCleanup',B);}B=D;}}x.moveToBookmark(y);}r.getSelection().selectRanges(v);}}},filter:function(r,s){var t=r._.removeFormat.filters;for(var u=0;uw.width&&(s.resize_minWidth=w.width);s.resize_minHeight>w.height&&(s.resize_minHeight=w.height);f.document.on('mousemove',z);f.document.on('mouseup',A);if(r.document){r.document.on('mousemove',z);r.document.on('mouseup',A);}});r.on('destroy',function(){j.removeFunction(B);});r.on('themeSpace',function(C){if(C.data.space=='bottom'){var D='';if(x&&!y)D=' cke_resizer_horizontal';if(!x&&y)D=' cke_resizer_vertical';var E='
';t=='ltr'&&D=='ltr'?C.data.html+=E:C.data.html=E+C.data.html;}},r,null,100);}}});(function(){var r={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(t){var u=t.element.$.form;if(u)try{u.submit();}catch(v){if(u.submit.click)u.submit.click();}}},s='save';o.add(s,{init:function(t){var u=t.addCommand(s,r);u.modes={wysiwyg:!!t.element.$.form};t.ui.addButton('Save',{label:t.lang.save,command:s});}});})();(function(){var r='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;background-position: top %3;border: 1px dotted gray;padding-top: 8px;padding-%3: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',s=/%1/g,t=/%2/g,u=/%3/g,v={readOnly:1,preserveState:true,editorFocus:false,exec:function(w){this.toggleState(); this.refresh(w);},refresh:function(w){if(w.document){var x=this.state==1?'addClass':'removeClass';w.document.getBody()[x]('cke_show_blocks');}}};o.add('showblocks',{requires:['wysiwygarea'],init:function(w){var x=w.addCommand('showblocks',v);x.canUndo=false;if(w.config.startupOutlineBlocks)x.setState(1);w.addCss(r.replace(s,'background-image: url('+f.getUrl(this.path)+'images/block_').replace(t,'cke_show_blocks ').replace(u,w.lang.dir=='rtl'?'right':'left'));w.ui.addButton('ShowBlocks',{label:w.lang.showBlocks,command:'showblocks'});w.on('mode',function(){if(x.state!=0)x.refresh(w);});w.on('contentDom',function(){if(x.state!=0)x.refresh(w);});}});})();(function(){var r='cke_show_border',s,t=(g.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');s=t.replace(/%2/g,r).replace(/%1/g,'cke_show_borders ');var u={preserveState:true,editorFocus:false,readOnly:1,exec:function(v){this.toggleState();this.refresh(v);},refresh:function(v){if(v.document){var w=this.state==1?'addClass':'removeClass';v.document.getBody()[w]('cke_show_borders');}}};o.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(v){var w=v.addCommand('showborders',u);w.canUndo=false;if(v.config.startupShowBorders!==false)w.setState(1);v.addCss(s);v.on('mode',function(){if(w.state!=0)w.refresh(v);},null,null,100);v.on('contentDom',function(){if(w.state!=0)w.refresh(v);});v.on('removeFormatCleanup',function(x){var y=x.data;if(v.getCommand('showborders').state==1&&y.is('table')&&(!y.hasAttribute('border')||parseInt(y.getAttribute('border'),10)<=0))y.addClass(r);});},afterInit:function(v){var w=v.dataProcessor,x=w&&w.dataFilter,y=w&&w.htmlFilter;if(x)x.addRules({elements:{table:function(z){var A=z.attributes,B=A['class'],C=parseInt(A.border,10);if((!C||C<=0)&&(!B||B.indexOf(r)==-1))A['class']=(B||'')+' '+r;}}});if(y)y.addRules({elements:{table:function(z){var A=z.attributes,B=A['class'];B&&(A['class']=B.replace(r,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});f.on('dialogDefinition',function(v){var w=v.data.name;if(w=='table'||w=='tableProperties'){var x=v.data.definition,y=x.getContents('info'),z=y.get('txtBorder'),A=z.commit; z.commit=j.override(A,function(D){return function(E,F){D.apply(this,arguments);var G=parseInt(this.getValue(),10);F[!G||G<=0?'addClass':'removeClass'](r);};});var B=x.getContents('advanced'),C=B&&B.get('advCSSClasses');if(C){C.setup=j.override(C.setup,function(D){return function(){D.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});C.commit=j.override(C.commit,function(D){return function(E,F){D.apply(this,arguments);if(!parseInt(F.getAttribute('border'),10))F.addClass('cke_show_border');};});}}});})();o.add('sourcearea',{requires:['editingblock'],init:function(r){var s=o.sourcearea,t=f.document.getWindow();r.on('editingBlockReady',function(){var u,v;r.addMode('source',{load:function(w,x){if(h&&g.version<8)w.setStyle('position','relative');r.textarea=u=new m('textarea');u.setAttributes({dir:'ltr',tabIndex:g.webkit?-1:r.tabIndex,role:'textbox','aria-label':r.lang.editorTitle.replace('%1',r.name)});u.addClass('cke_source');u.addClass('cke_enable_context_menu');r.readOnly&&u.setAttribute('readOnly','readonly');var y={width:g.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(h){v=function(){u.hide();u.setStyle('height',w.$.clientHeight+'px');u.setStyle('width',w.$.clientWidth+'px');u.show();};r.on('resize',v);t.on('resize',v);setTimeout(v,0);}w.setHtml('');w.append(u);u.setStyles(y);r.fire('ariaWidget',u);u.on('blur',function(){r.focusManager.blur();});u.on('focus',function(){r.focusManager.focus();});r.mayBeDirty=true;this.loadData(x);var z=r.keystrokeHandler;if(z)z.attach(u);setTimeout(function(){r.mode='source';r.fire('mode',{previousMode:r._.previousMode});},g.gecko||g.webkit?100:0);},loadData:function(w){u.setValue(w);r.fire('dataReady');},getData:function(){return u.getValue();},getSnapshotData:function(){return u.getValue();},unload:function(w){u.clearCustomData();r.textarea=u=null;if(v){r.removeListener('resize',v);t.removeListener('resize',v);}if(h&&g.version<8)w.removeStyle('position');},focus:function(){u.focus();}});});r.on('readOnly',function(){if(r.mode=='source')if(r.readOnly)r.textarea.setAttribute('readOnly','readonly');else r.textarea.removeAttribute('readOnly');});r.addCommand('source',s.commands.source);if(r.ui.addButton)r.ui.addButton('Source',{label:r.lang.source,command:'source'});r.on('mode',function(){r.getCommand('source').setState(r.mode=='source'?1:2);});}});o.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:false,readOnly:1,exec:function(r){if(r.mode=='wysiwyg')r.fire('saveSnapshot'); r.getCommand('source').setState(0);r.setMode(r.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){o.add('stylescombo',{requires:['richcombo','styles'],init:function(s){var t=s.config,u=s.lang.stylesCombo,v={},w=[],x;function y(z){s.getStylesSet(function(A){if(!w.length){var B,C;for(var D=0,E=A.length;Du&&(!x||!y||Ay){x=A;y=z;}}else{if(v&&z==u){x=A;break;}if(zy)){x=A;y=z;}}}if(x)x.focus();};(function(){o.add('templates',{requires:['dialog'],init:function(t){f.dialog.add('templates',f.getUrl(this.path+'dialogs/templates.js'));t.addCommand('templates',new f.dialogCommand('templates'));t.ui.addButton('Templates',{label:t.lang.templates.button,command:'templates'});}});var r={},s={};f.addTemplates=function(t,u){r[t]=u;};f.getTemplates=function(t){return r[t];};f.loadTemplates=function(t,u){var v=[];for(var w=0,x=t.length; w':' style="display:none">');y.push('',t.lang.toolbars,'');var B=t.toolbox.toolbars,C=t.config.toolbar instanceof Array?t.config.toolbar:t.config['toolbar_'+t.config.toolbar];for(var D=0;D');A=0;}if(H==='/'){y.push('
');continue;}I=H.items||H;for(var J=0;J');G&&y.push('',G,''); y.push('');var N=B.push(F)-1;if(N>0){F.previous=B[N-1];F.previous.next=F;}}if(M){if(!A){y.push('');A=1;}}else if(A){y.push('');A=0;}var O=K.render(t,y);N=F.items.push(O)-1;if(N>0){O.previous=F.items[N-1];O.previous.next=O;}O.toolbar=F;O.onkey=v;O.onfocus=function(){if(!t.toolbox.focusCommandExecuted)t.focus();};}}if(A){y.push('');A=0;}if(F)y.push('');}y.push('');if(t.config.toolbarCanCollapse){var P=j.addFunction(function(){t.execCommand('toolbarCollapse');});t.on('destroy',function(){j.removeFunction(P);});var Q=j.getNextId();t.addCommand('toolbarCollapse',{readOnly:1,exec:function(R){var S=f.document.getById(Q),T=S.getPrevious(),U=R.getThemeSpace('contents'),V=T.getParent(),W=parseInt(U.$.style.height,10),X=V.$.offsetHeight,Y=!T.isVisible();if(!Y){T.hide();S.addClass('cke_toolbox_collapser_min');S.setAttribute('title',R.lang.toolbarExpand);}else{T.show();S.removeClass('cke_toolbox_collapser_min');S.setAttribute('title',R.lang.toolbarCollapse);}S.getFirst().setText(Y?'▲':'◀');var Z=V.$.offsetHeight-X;U.setStyle('height',W-Z+'px');R.fire('resize');},modes:{wysiwyg:1,source:1}});y.push('','','');}w.data.html+=y.join('');}});t.on('destroy',function(){var w,x=0,y,z,A;w=this.toolbox.toolbars;for(;x');return{};}};}});}});})();f.UI_SEPARATOR='separator';n.toolbarLocation='top';n.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];n.toolbar_Full=[{name:'document',items:['Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates']},{name:'clipboard',items:['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']},{name:'editing',items:['Find','Replace','-','SelectAll','-','SpellChecker','Scayt']},{name:'forms',items:['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField']},'/',{name:'basicstyles',items:['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']},{name:'paragraph',items:['NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl']},{name:'links',items:['Link','Unlink','Anchor']},{name:'insert',items:['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe']},'/',{name:'styles',items:['Styles','Format','Font','FontSize']},{name:'colors',items:['TextColor','BGColor']},{name:'tools',items:['Maximize','ShowBlocks','-','About']}]; n.toolbar='Full';n.toolbarCanCollapse=true;(function(){o.add('undo',{requires:['selection','wysiwygarea'],init:function(x){var y=new t(x),z=x.addCommand('undo',{exec:function(){if(y.undo()){x.selectionChange();this.fire('afterUndo');}},state:0,canUndo:false}),A=x.addCommand('redo',{exec:function(){if(y.redo()){x.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});y.onChange=function(){z.setState(y.undoable()?2:0);A.setState(y.redoable()?2:0);};function B(C){if(y.enabled&&C.data.command.canUndo!==false)y.save();};x.on('beforeCommandExec',B);x.on('afterCommandExec',B);x.on('saveSnapshot',function(C){y.save(C.data&&C.data.contentOnly);});x.on('contentDom',function(){x.document.on('keydown',function(C){if(!C.data.$.ctrlKey&&!C.data.$.metaKey)y.type(C);});});x.on('beforeModeUnload',function(){x.mode=='wysiwyg'&&y.save(true);});x.on('mode',function(){y.enabled=x.readOnly?false:x.mode=='wysiwyg';y.onChange();});x.ui.addButton('Undo',{label:x.lang.undo,command:'undo'});x.ui.addButton('Redo',{label:x.lang.redo,command:'redo'});x.resetUndo=function(){y.reset();x.fire('saveSnapshot');};x.on('updateSnapshot',function(){if(y.currentImage)y.update();});}});o.undo={};var r=o.undo.Image=function(x){this.editor=x;x.fire('beforeUndoImage');var y=x.getSnapshot(),z=y&&x.getSelection();h&&y&&(y=y.replace(/\s+data-cke-expando=".*?"/g,''));this.contents=y;this.bookmarks=z&&z.createBookmarks2(true);x.fire('afterUndoImage');},s=/\b(?:href|src|name)="[^"]*?"/gi;r.prototype={equals:function(x,y){var z=this.contents,A=x.contents;if(h&&(g.ie7Compat||g.ie6Compat)){z=z.replace(s,'');A=A.replace(s,'');}if(z!=A)return false;if(y)return true;var B=this.bookmarks,C=x.bookmarks;if(B||C){if(!B||!C||B.length!=C.length)return false;for(var D=0;D25){this.save(false,null,false);this.modifiersCount=1;}}else if(!D){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save(false,null,false);this.typesCount=1;}}},reset:function(){var x=this;x.lastKeystroke=0;x.snapshots=[];x.index=-1;x.limit=x.editor.config.undoStackSize||20;x.currentImage=null;x.hasUndo=false;x.hasRedo=false;x.resetType();},resetType:function(){var x=this;x.typing=false;delete x.lastKeystroke;x.typesCount=0;x.modifiersCount=0;},fireChange:function(){var x=this;x.hasUndo=!!x.getNextImage(true);x.hasRedo=!!x.getNextImage(false);x.resetType();x.onChange();},save:function(x,y,z){var B=this;var A=B.snapshots;if(!y)y=new r(B.editor);if(y.contents===false)return false;if(B.currentImage&&y.equals(B.currentImage,x))return false;A.splice(B.index+1,A.length-B.index-1);if(A.length==B.limit)A.shift();B.index=A.push(y)-1;B.currentImage=y;if(z!==false)B.fireChange();return true;},restoreImage:function(x){var B=this;var y=B.editor,z;if(x.bookmarks){y.focus();z=y.getSelection();}B.editor.loadSnapshot(x.contents);if(x.bookmarks)z.selectBookmarks(x.bookmarks);else if(h){var A=B.editor.document.getBody().$.createTextRange();A.collapse(true);A.select();}B.index=x.index;B.update();B.fireChange();},getNextImage:function(x){var C=this;var y=C.snapshots,z=C.currentImage,A,B;if(z)if(x)for(B=C.index-1;B>=0;B--){A=y[B];if(!z.equals(A,true)){A.index=B;return A;}}else for(B=C.index+1;B]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?:]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,s=i.walker.whitespaces(true),t=i.walker.bogus(true),u=function(J){return s(J)&&t(J);};function v(J){return J.isBlockBoundary()&&k.$empty[J.getName()];};function w(J){return function(K){if(this.mode=='wysiwyg'){this.focus(); var L=this.getSelection(),M=L.isLocked;M&&L.unlock();this.fire('saveSnapshot');J.call(this,K.data);M&&this.getSelection().lock();var N=this;setTimeout(function(){try{N.fire('saveSnapshot');}catch(O){setTimeout(function(){N.fire('saveSnapshot');},200);}},0);}};};function x(J){var S=this;if(S.dataProcessor)J=S.dataProcessor.toHtml(J);if(!J)return;var K=S.getSelection(),L=K.getRanges()[0];if(L.checkReadOnly())return;if(g.opera){var M=new i.elementPath(L.startContainer);if(M.block){var N=f.htmlParser.fragment.fromHtml(J,false).children;for(var O=0,P=N.length;O'+V+'';});N=N.replace(/\n/g,'
');if(!(M||h))N=N.replace(new RegExp('
(?=)'),function(T){return j.repeat(T,2);});if(g.gecko||g.webkit){var P=new i.elementPath(K.getStartElement()),Q=[];for(var R=0;R/));else if(S in k.$block)break;}N=Q.join('')+N;}x.call(this,N);};function z(J){var K=this.getSelection(),L=K.getRanges(),M=J.getName(),N=k.$block[M],O=K.isLocked;if(O)K.unlock();var P,Q,R,S;for(var T=L.length-1;T>=0;T--){P=L[T];if(!P.checkReadOnly()){P.deleteContents(1);Q=!T&&J||J.clone(1);var U,V;if(N)while((U=P.getCommonAncestor(0,1))&&(V=k[U.getName()])&&!(V&&V[M])){if(U.getName() in k.span)P.splitElement(U);else if(P.checkStartOfBlock()&&P.checkEndOfBlock()){P.setStartBefore(U);P.collapse(true);U.remove();}else P.splitBlock();}P.insertNode(Q); if(!R)R=Q;}}if(R){P.moveToPosition(R,4);if(N){var W=R.getNext(u),X=W&&W.type==1&&W.getName();if(X&&k.$block[X]){if(k[X]['#'])P.moveToElementEditStart(W);else P.moveToElementEditEnd(R);}else if(!W){W=P.fixBlock(true,this.config.enterMode==3?'div':'p');P.moveToElementEditStart(W);}}}K.selectRanges([P]);if(O)this.getSelection().lock();};function A(J){if(!J.checkDirty())setTimeout(function(){J.resetDirty();},0);};var B=i.walker.whitespaces(true),C=i.walker.bookmark(false,true);function D(J){return B(J)&&C(J);};function E(J){return J.type==3&&j.trim(J.getText()).match(/^(?: |\xa0)$/);};function F(J){if(J.isLocked){J.unlock();setTimeout(function(){J.lock();},0);}};function G(J){return J.getOuterHtml().match(r);};B=i.walker.whitespaces(true);function H(J){var K=J.window,L=J.document,M=J.document.getBody(),N=M.getFirst(),O=M.getChildren().count();if(!O||O==1&&N.type==1&&N.hasAttribute('_moz_editor_bogus_node')){A(J);var P=J.element.getDocument(),Q=P.getDocumentElement(),R=Q.$.scrollTop,S=Q.$.scrollLeft,T=L.$.createEvent('KeyEvents');T.initKeyEvent('keypress',true,true,K.$,false,false,false,false,0,32);L.$.dispatchEvent(T);if(R!=Q.$.scrollTop||S!=Q.$.scrollLeft)P.getWindow().$.scrollTo(S,R);O&&M.getFirst().remove();L.getBody().appendBogus();var U=new i.range(L);U.setStartAt(M,1);U.select();}};function I(J){var K=J.editor,L=J.data.path,M=L.blockLimit,N=J.data.selection,O=N.getRanges()[0],P=K.document.getBody(),Q=K.config.enterMode;if(g.gecko){var R=L.block||L.blockLimit,S=R&&R.getLast(D);if(R&&R.isBlockBoundary()&&!(S&&S.type==1&&S.isBlockBoundary())&&!R.is('pre')&&!R.getBogus())R.appendBogus();}if(K.config.autoParagraph!==false&&Q!=2&&O.collapsed&&M.getName()=='body'&&!L.block){var T=O.fixBlock(true,K.config.enterMode==3?'div':'p');if(h){var U=T.getFirst(D);U&&E(U)&&U.remove();}if(G(T)){var V=T.getNext(B);if(V&&V.type==1&&!v(V)){O.moveToElementEditStart(V);T.remove();}else{V=T.getPrevious(B);if(V&&V.type==1&&!v(V)){O.moveToElementEditEnd(V);T.remove();}}}O.select();J.cancel();}var W=new i.range(K.document);W.moveToElementEditEnd(K.document.getBody());var X=new i.elementPath(W.startContainer);if(!X.blockLimit.is('body')){var Y;if(Q!=2)Y=P.append(K.document.createElement(Q==1?'p':'div'));else Y=P;if(!h)Y.appendBogus();}};o.add('wysiwygarea',{requires:['editingblock'],init:function(J){var K=J.config.enterMode!=2&&J.config.autoParagraph!==false?J.config.enterMode==3?'div':'p':false,L=J.lang.editorTitle.replace('%1',J.name),M=J.lang.editorHelp;if(h)L+=', '+M;var N=f.document.getWindow(),O; J.on('editingBlockReady',function(){var R,S,T,U,V,W,X,Y=g.isCustomDomain(),Z=function(ac){if(S)S.remove();var ad='document.open();'+(Y?'document.domain="'+document.domain+'";':'')+'document.close();';ad=g.air?'javascript:void(0)':h?'javascript:void(function(){'+encodeURIComponent(ad)+'}())':'';var ae=j.getNextId();S=m.createFromHtml('');if(document.location.protocol=='chrome:')f.event.useCapture=true;S.on('load',function(af){V=1;af.removeListener();var ag=S.getFrameDocument();ag.write(ac);g.air&&ab(ag.getWindow().$);});if(document.location.protocol=='chrome:')f.event.useCapture=false;R.append(m.createFromHtml(''+M+''));R.append(S);if(g.webkit){X=function(){R.setStyle('width','100%');S.hide();S.setSize('width',R.getSize('width'));R.removeStyle('width');S.show();};N.on('resize',X);}};O=j.addFunction(ab);var aa='';function ab(ac){if(!V)return;V=0;J.fire('ariaWidget',S);var ad=ac.document,ae=ad.body,af=ad.getElementById('cke_actscrpt');af&&af.parentNode.removeChild(af);ae.spellcheck=!J.config.disableNativeSpellChecker;var ag=!J.readOnly;if(h){ae.hideFocus=true;ae.disabled=true;ae.contentEditable=ag;ae.removeAttribute('disabled');}else setTimeout(function(){if(g.gecko&&g.version>=10900||g.opera)ad.$.body.contentEditable=ag;else if(g.webkit)ad.$.body.parentNode.contentEditable=ag;else ad.$.designMode=ag?'off':'on';},0);ag&&g.gecko&&j.setTimeout(H,0,null,J);ac=J.window=new i.window(ac);ad=J.document=new l(ad);ag&&ad.on('dblclick',function(al){var am=al.data.getTarget(),an={element:am,dialog:''};J.fire('doubleclick',an);an.dialog&&J.openDialog(an.dialog);});h&&ad.on('click',function(al){var am=al.data.getTarget();if(am.is('input')){var an=am.getAttribute('type');if(an=='submit'||an=='reset')al.data.preventDefault();}});if(!(h||g.opera))ad.on('mousedown',function(al){var am=al.data.getTarget();if(am.is('img','hr','input','textarea','select'))J.getSelection().selectElement(am);});if(g.gecko)ad.on('mouseup',function(al){if(al.data.$.button==2){var am=al.data.getTarget();if(!am.getOuterHtml().replace(r,'')){var an=new i.range(ad);an.moveToElementEditStart(am); an.select(true);}}});ad.on('click',function(al){al=al.data;if(al.getTarget().is('a')&&al.$.button!=2)al.preventDefault();});if(g.webkit){ad.on('mousedown',function(){ai=1;});ad.on('click',function(al){if(al.data.getTarget().is('input','select'))al.data.preventDefault();});ad.on('mouseup',function(al){if(al.data.getTarget().is('input','textarea'))al.data.preventDefault();});}var ah=h?S:ac;ah.on('blur',function(){J.focusManager.blur();});var ai;ah.on('focus',function(){var al=J.document;if(g.gecko||g.opera)al.getBody().focus();else if(g.webkit)if(!ai){J.document.getDocumentElement().focus();ai=1;}J.focusManager.focus();});var aj=J.keystrokeHandler;aj.blockedKeystrokes[8]=!ag;aj.attach(ad);ad.getDocumentElement().addClass(ad.$.compatMode);J.on('key',function(al){if(J.mode!='wysiwyg')return;var am=al.data.keyCode;if(am in {8:1,46:1}){var an=J.getSelection(),ao=an.getSelectedElement(),ap=an.getRanges()[0],aq=new i.elementPath(ap.startContainer),ar,as,at,au=am==8;if(ao){J.fire('saveSnapshot');ap.moveToPosition(ao,3);ao.remove();ap.select();J.fire('saveSnapshot');al.cancel();}else if(ap.collapsed)if((ar=aq.block)&&ap[au?'checkStartOfBlock':'checkEndOfBlock']()&&(at=ar[au?'getPrevious':'getNext'](s))&&at.is('table')){J.fire('saveSnapshot');if(ap[au?'checkEndOfBlock':'checkStartOfBlock']())ar.remove();ap['moveToElementEdit'+(au?'End':'Start')](at);ap.select();J.fire('saveSnapshot');al.cancel();}else if(aq.blockLimit.is('td')&&(as=aq.blockLimit.getAscendant('table'))&&ap.checkBoundaryOfElement(as,au?1:2)&&(at=as[au?'getPrevious':'getNext'](s))){J.fire('saveSnapshot');ap['moveToElementEdit'+(au?'End':'Start')](at);if(ap.checkStartOfBlock()&&ap.checkEndOfBlock())at.remove();else ap.select();J.fire('saveSnapshot');al.cancel();}}if(am==33||am==34)if(g.gecko){var av=ad.getBody();if(ac.$.innerHeight>av.$.offsetHeight){ap=new i.range(ad);ap[am==33?'moveToElementEditStart':'moveToElementEditEnd'](av);ap.select();al.cancel();}}});if(h&&ad.$.compatMode=='CSS1Compat'){var ak={33:1,34:1};ad.on('keydown',function(al){if(al.data.getKeystroke() in ak)setTimeout(function(){J.getSelection().scrollIntoView();},0);});}if(h&&J.config.enterMode!=1)ad.on('selectionchange',function(){var al=ad.getBody(),am=J.getSelection(),an=am&&am.getRanges()[0];if(an&&al.getHtml().match(/^

 <\/p>$/i)&&an.startContainer.equals(al))setTimeout(function(){an=J.getSelection().getRanges()[0];if(!an.startContainer.equals('body')){al.getFirst().remove(1);an.moveToElementEditEnd(al);an.select(1);}},0);}); if(J.contextMenu)J.contextMenu.addTarget(ad,J.config.browserContextMenuOnCtrl!==false);setTimeout(function(){J.fire('contentDom');if(W){J.mode='wysiwyg';J.fire('mode',{previousMode:J._.previousMode});W=false;}T=false;if(U){J.focus();U=false;}setTimeout(function(){J.fire('dataReady');},0);try{J.document.$.execCommand('2D-position',false,true);}catch(al){}try{J.document.$.execCommand('enableInlineTableEditing',false,!J.config.disableNativeTableHandles);}catch(am){}if(J.config.disableObjectResizing)try{J.document.$.execCommand('enableObjectResizing',false,false);}catch(an){J.document.getBody().on(h?'resizestart':'resize',function(ao){ao.data.preventDefault();});}if(h)setTimeout(function(){if(J.document){var ao=J.document.$.body;ao.runtimeStyle.marginBottom='0px';ao.runtimeStyle.marginBottom='';}},1000);},0);};J.addMode('wysiwyg',{load:function(ac,ad,ae){R=ac;if(h&&g.quirks)ac.setStyle('position','relative');J.mayBeDirty=true;W=true;if(ae)this.loadSnapshotData(ad);else this.loadData(ad);},loadData:function(ac){T=true;J._.dataStore={id:1};var ad=J.config,ae=ad.fullPage,af=ad.docType,ag='';!ae&&(ag=j.buildStyleHtml(J.config.contentsCss)+ag);var ah=ad.baseHref?'':'';if(ae)ac=ac.replace(/]*>/i,function(ai){J.docType=af=ai;return '';}).replace(/<\?xml\s[^\?]*\?>/i,function(ai){J.xmlDeclaration=ai;return '';});if(J.dataProcessor)ac=J.dataProcessor.toHtml(ac,K);if(ae){if(!/]/.test(ac))ac=''+ac;if(!/]/.test(ac))ac=''+ac+'';if(!/]/.test(ac))ac=ac.replace(/]*>/,'$&');else if(!/]/.test(ac))ac=ac.replace(/]*>/,'$&');ah&&(ac=ac.replace(//,'$&'+ah));ac=ac.replace(/<\/head\s*>/,ag+'$&');ac=af+ac;}else ac=ad.docType+''+''+''+L+''+ah+ag+''+''+ac+'';if(g.gecko)ac=ac.replace(/
(?=\s*<\/(:?html|body)>)/,'$&
');ac+=aa;this.onDispose();Z(ac);},getData:function(){var ac=J.config,ad=ac.fullPage,ae=ad&&J.docType,af=ad&&J.xmlDeclaration,ag=S.getFrameDocument(),ah=ad?ag.getDocumentElement().getOuterHtml():ag.getBody().getHtml();if(g.gecko)ah=ah.replace(/
(?=\s*(:?$|<\/body>))/,'');if(J.dataProcessor)ah=J.dataProcessor.toDataFormat(ah,K); if(ac.ignoreEmptyParagraph)ah=ah.replace(r,function(ai,aj){return aj;});if(af)ah=af+'\n'+ah;if(ae)ah=ae+'\n'+ah;return ah;},getSnapshotData:function(){return S.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(ac){S.getFrameDocument().getBody().setHtml(ac);},onDispose:function(){if(!J.document)return;J.document.getDocumentElement().clearCustomData();J.document.getBody().clearCustomData();J.window.clearCustomData();J.document.clearCustomData();S.clearCustomData();S.remove();},unload:function(ac){this.onDispose();if(X)N.removeListener('resize',X);J.window=J.document=S=R=U=null;J.fire('contentDomUnload');},focus:function(){var ac=J.window;if(T)U=true;else if(ac){var ad=J.getSelection(),ae=ad&&ad.getNative();if(ae&&ae.type=='Control')return;g.air?setTimeout(function(){ac.focus();},0):ac.focus();J.selectionChange();}}});J.on('insertHtml',w(x),null,null,20);J.on('insertElement',w(z),null,null,20);J.on('insertText',w(y),null,null,20);J.on('selectionChange',function(ac){if(J.readOnly)return;var ad=J.getSelection();if(ad&&!ad.isLocked){var ae=J.checkDirty();J.fire('saveSnapshot',{contentOnly:1});I.call(this,ac);J.fire('updateSnapshot');!ae&&J.resetDirty();}},null,null,1);});J.on('contentDom',function(){var R=J.document.getElementsByTag('title').getItem(0);R.data('cke-title',J.document.$.title);h&&(J.document.$.title=L);});J.on('readOnly',function(){if(J.mode=='wysiwyg'){var R=J.getMode();R.loadData(R.getData());}});if(f.document.$.documentMode>=8){J.addCss('html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}');var P=[];for(var Q in k.$removeEmpty)P.push('html.CSS1Compat '+Q+'[contenteditable=false]');J.addCss(P.join(',')+'{ display:inline-block;}');}else if(g.gecko){J.addCss('html { height: 100% !important; }');J.addCss('img:-moz-broken { -moz-force-broken-image-icon : 1;\tmin-width : 24px; min-height : 24px; }');}J.addCss('html {\t_overflow-y: scroll; cursor: text;\t*cursor:auto;}');J.addCss('img, input, textarea { cursor: default;}');J.on('insertElement',function(R){var S=R.data;if(S.type==1&&(S.is('input')||S.is('textarea'))){var T=S.getAttribute('contenteditable')=='false';if(!T){S.data('cke-editable',S.hasAttribute('contenteditable')?'true':'1');S.setAttribute('contenteditable',false);}}});}});if(g.gecko)(function(){var J=document.body;if(!J)window.addEventListener('load',arguments.callee,false);else{var K=J.getAttribute('onpageshow');J.setAttribute('onpageshow',(K?K+';':'')+'event.persisted && (function(){'+'var allInstances = CKEDITOR.instances, editor, doc;'+'for ( var i in allInstances )'+'{'+'\teditor = allInstances[ i ];'+'\tdoc = editor.document;'+'\tif ( doc )'+'\t{'+'\t\tdoc.$.designMode = "off";'+'\t\tdoc.$.designMode = "on";'+'\t}'+'}'+'})();'); }})();})();n.disableObjectResizing=false;n.disableNativeTableHandles=true;n.disableNativeSpellChecker=true;n.ignoreEmptyParagraph=true;f.DIALOG_RESIZE_NONE=0;f.DIALOG_RESIZE_WIDTH=1;f.DIALOG_RESIZE_HEIGHT=2;f.DIALOG_RESIZE_BOTH=3;(function(){var r=j.cssLength;function s(W){return!!this._.tabs[W][0].$.offsetHeight;};function t(){var aa=this;var W=aa._.currentTabId,X=aa._.tabIdList.length,Y=j.indexOf(aa._.tabIdList,W)+X;for(var Z=Y-1;Z>Y-X;Z--){if(s.call(aa,aa._.tabIdList[Z%X]))return aa._.tabIdList[Z%X];}return null;};function u(){var aa=this;var W=aa._.currentTabId,X=aa._.tabIdList.length,Y=j.indexOf(aa._.tabIdList,W);for(var Z=Y+1;Z1){am._.tabBarMode=true;am._.tabs[am._.currentTabId][0].focus();ae=1;}else if((ax==37||ax==39)&&am._.tabBarMode){aB=ax==(ay?39:37)?t.call(am):u.call(am);am.selectPage(aB);am._.tabs[aB][0].focus();ae=1;}else if((ax==13||ax==32)&&am._.tabBarMode){aD.selectPage(aD._.currentTabId);aD._.tabBarMode=false;aD._.currentFocusIndex=-1;ap(1);ae=1;}else if(ax==13){var aC=aw.data.getTarget(); if(!aC.is('a','button','select','textarea')&&(!aC.is('input')||aC.$.type!='button')){az=aD.getButton('ok');az&&j.setTimeout(az.click,0,az);ae=1;}af=1;}else if(ax==27){az=aD.getButton('cancel');if(az)j.setTimeout(az.click,0,az);else if(aD.fire('cancel',{hide:true}).hide!==false)aD.hide();af=1;}else return;ar(aw);};function ar(aw){if(ae)aw.data.preventDefault(1);else if(af)aw.data.stopPropagation();};var as=this._.element;this.on('show',function(){as.on('keydown',aq,this);if(g.opera||g.gecko)as.on('keypress',ar,this);});this.on('hide',function(){as.removeListener('keydown',aq);if(g.opera||g.gecko)as.removeListener('keypress',ar);an(function(aw){x.apply(aw);});});this.on('iframeAdded',function(aw){var ax=new l(aw.data.iframe.$.contentWindow.document);ax.on('keydown',aq,this,null,0);});this.on('show',function(){var aA=this;ao();if(W.config.dialog_startupFocusTab&&am._.pageCount>1){am._.tabBarMode=true;am._.tabs[am._.currentTabId][0].focus();}else if(!aA._.hasFocus){aA._.currentFocusIndex=-1;if(Y.onFocus){var aw=Y.onFocus.call(aA);aw&&aw.focus();}else ap(1);if(aA._.editor.mode=='wysiwyg'&&h){var ax=W.document.$.selection,ay=ax.createRange();if(ay)if(ay.parentElement&&ay.parentElement().ownerDocument==W.document.$||ay.item&&ay.item(0).ownerDocument==W.document.$){var az=document.body.createTextRange();az.moveToElementText(aA.getElement().getFirst().$);az.collapse(true);az.select();}}}},this,null,4294967295);if(g.ie6Compat)this.on('load',function(aw){var ax=this.getElement(),ay=ax.getFirst();ay.remove();ay.appendTo(ax);},this);G(this);H(this);new i.text(Y.title,f.document).appendTo(this.parts.title);for(ad=0;ad0?X:0)+'px'};af[aa?'right':'left']=(W>0?W:0)+'px';Z.setStyles(af);Y&&(ag._.moved=1);},getPosition:function(){return j.extend({},this._.position);},show:function(){var W=this._.element,X=this.definition;if(!(W.getParent()&&W.getParent().equals(f.document.getBody())))W.appendTo(f.document.getBody());else W.setStyle('display','block');if(g.gecko&&g.version<10900){var Y=this.parts.dialog;Y.setStyle('position','absolute');setTimeout(function(){Y.setStyle('position','fixed');},0);}this.resize(this._.contentSize&&this._.contentSize.width||X.width||X.minWidth,this._.contentSize&&this._.contentSize.height||X.height||X.minHeight);this.reset();this.selectPage(this.definition.contents[0].id);if(f.dialog._.currentZIndex===null)f.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex;this._.element.getFirst().setStyle('z-index',f.dialog._.currentZIndex+=10);if(f.dialog._.currentTop===null){f.dialog._.currentTop=this;this._.parentDialog=null;M(this._.editor);}else{this._.parentDialog=f.dialog._.currentTop;var Z=this._.parentDialog.getElement().getFirst();Z.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2); f.dialog._.currentTop=this;}W.on('keydown',Q);W.on(g.opera?'keypress':'keyup',R);this._.hasFocus=false;j.setTimeout(function(){this.layout();z(this);this.parts.dialog.setStyle('visibility','');this.fireOnce('load',{});p.fire('ready',this);this.fire('show',{});this._.editor.fire('dialogShow',this);this.foreach(function(aa){aa.setInitValue&&aa.setInitValue();});},100,this);},layout:function(){var ac=this;var W=ac.parts.dialog,X=ac.getSize(),Y=f.document.getWindow(),Z=Y.getViewPaneSize(),aa=(Z.width-X.width)/2,ab=(Z.height-X.height)/2;if(!g.ie6Compat)if(X.height+(ab>0?ab:0)>Z.height||X.width+(aa>0?aa:0)>Z.width)W.setStyle('position','absolute');else W.setStyle('position','fixed');ac.move(ac._.moved?ac._.position.x:aa,ac._.moved?ac._.position.y:ab);},foreach:function(W){var Z=this;for(var X in Z._.contents)for(var Y in Z._.contents[X])W.call(Z,Z._.contents[X][Y]);return Z;},reset:(function(){var W=function(X){if(X.reset)X.reset(1);};return function(){this.foreach(W);return this;};})(),setupContent:function(){var W=arguments;this.foreach(function(X){if(X.setup)X.setup.apply(X,W);});},commitContent:function(){var W=arguments;this.foreach(function(X){if(h&&this._.currentFocusIndex==X.focusIndex)X.getInputElement().$.blur();if(X.commit)X.commit.apply(X,W);});},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire('hide',{});this._.editor.fire('dialogHide',this);this.selectPage(this._.tabIdList[0]);var W=this._.element;W.setStyle('display','none');this.parts.dialog.setStyle('visibility','hidden');T(this);while(f.dialog._.currentTop!=this)f.dialog._.currentTop.hide();if(!this._.parentDialog)N();else{var X=this._.parentDialog.getElement().getFirst();X.setStyle('z-index',parseInt(X.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2));}f.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){f.dialog._.currentZIndex=null;W.removeListener('keydown',Q);W.removeListener(g.opera?'keypress':'keyup',R);var Y=this._.editor;Y.focus();if(Y.mode=='wysiwyg'&&h){var Z=Y.getSelection();Z&&Z.unlock(true);}}else f.dialog._.currentZIndex-=10;delete this._.parentDialog;this.foreach(function(aa){aa.resetInitValue&&aa.resetInitValue();});},addPage:function(W){var ai=this;var X=[],Y=W.label?' title="'+j.htmlEncode(W.label)+'"':'',Z=W.elements,aa=f.dialog._.uiElementBuilders.vbox.build(ai,{type:'vbox',className:'cke_dialog_page_contents',children:W.elements,expand:!!W.expand,padding:W.padding,style:W.style||'width: 100%;height:100%'},X),ab=m.createFromHtml(X.join('')); ab.setAttribute('role','tabpanel');var ac=g,ad='cke_'+W.id+'_'+j.getNextNumber(),ae=m.createFromHtml(['0?' cke_last':'cke_first',Y,!!W.hidden?' style="display:none"':'',' id="',ad,'"',ac.gecko&&ac.version>=10900&&!ac.hc?'':' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',W.label,''].join(''));ab.setAttribute('aria-labelledby',ad);ai._.tabs[W.id]=[ae,ab];ai._.tabIdList.push(W.id);!W.hidden&&ai._.pageCount++;ai._.lastTab=ae;ai.updateStyle();var af=ai._.contents[W.id]={},ag,ah=aa.getChild();while(ag=ah.shift()){af[ag.id]=ag;if(typeof ag.getChild=='function')ah.push.apply(ah,ag.getChild());}ab.setAttribute('name',W.id);ab.appendTo(ai.parts.contents);ae.unselectable();ai.parts.tabs.append(ae);if(W.accessKey){S(ai,ai,'CTRL+'+W.accessKey,V,U);ai._.accessKeyMap['CTRL+'+W.accessKey]=W.id;}},selectPage:function(W){if(this._.currentTabId==W)return;if(this.fire('selectPage',{page:W,currentPage:this._.currentTabId})===true)return;for(var X in this._.tabs){var Y=this._.tabs[X][0],Z=this._.tabs[X][1];if(X!=W){Y.removeClass('cke_dialog_tab_selected');Z.hide();}Z.setAttribute('aria-hidden',X!=W);}var aa=this._.tabs[W];aa[0].addClass('cke_dialog_tab_selected');if(g.ie6Compat||g.ie7Compat){v(aa[1]);aa[1].show();setTimeout(function(){v(aa[1],1);},0);}else aa[1].show();this._.currentTabId=W;this._.currentTabIndex=j.indexOf(this._.tabIdList,W);},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?'add':'remove')+'Class']('cke_single_page');},hidePage:function(W){var Y=this;var X=Y._.tabs[W]&&Y._.tabs[W][0];if(!X||Y._.pageCount==1||!X.isVisible())return;else if(W==Y._.currentTabId)Y.selectPage(t.call(Y));X.hide();Y._.pageCount--;Y.updateStyle();},showPage:function(W){var Y=this;var X=Y._.tabs[W]&&Y._.tabs[W][0];if(!X)return;X.show();Y._.pageCount++;Y.updateStyle();},getElement:function(){return this._.element;},getName:function(){return this._.name;},getContentElement:function(W,X){var Y=this._.contents[W];return Y&&Y[X];},getValueOf:function(W,X){return this.getContentElement(W,X).getValue();},setValueOf:function(W,X,Y){return this.getContentElement(W,X).setValue(Y);},getButton:function(W){return this._.buttons[W];},click:function(W){return this._.buttons[W].click();},disableButton:function(W){return this._.buttons[W].disable();},enableButton:function(W){return this._.buttons[W].enable();},getPageCount:function(){return this._.pageCount;},getParentEditor:function(){return this._.editor;},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement(); },addFocusable:function(W,X){var Z=this;if(typeof X=='undefined'){X=Z._.focusList.length;Z._.focusList.push(new y(Z,W,X));}else{Z._.focusList.splice(X,0,new y(Z,W,X));for(var Y=X+1;Yah.width-ag.width-ab)am=ah.width-ag.width+(aa.lang.dir=='rtl'?0:ac[1]);else am=Y.x;if(Y.y+ac[0]ah.height-ag.height-ab)an=ah.height-ag.height+ac[2];else an=Y.y;W.move(am,an,1);af.data.preventDefault();};function ae(af){f.document.removeListener('mousemove',ad);f.document.removeListener('mouseup',ae);if(g.ie6Compat){var ag=K.getChild(0).getFrameDocument();ag.removeListener('mousemove',ad);ag.removeListener('mouseup',ae);}};W.parts.title.on('mousedown',function(af){X={x:af.data.$.screenX,y:af.data.$.screenY};f.document.on('mousemove',ad);f.document.on('mouseup',ae);Y=W.getPosition();if(g.ie6Compat){var ag=K.getChild(0).getFrameDocument();ag.on('mousemove',ad);ag.on('mouseup',ae);}af.data.preventDefault();},W);};function H(W){var X=W.definition,Y=X.resizable;if(Y==0)return;var Z=W.getParentEditor(),aa,ab,ac,ad,ae,af,ag=j.addFunction(function(aj){ae=W.getSize();var ak=W.parts.contents,al=ak.$.getElementsByTagName('iframe').length;if(al){af=m.createFromHtml('

');ak.append(af);}ab=ae.height-W.parts.contents.getSize('height',!(g.gecko||g.opera||h&&g.quirks));aa=ae.width-W.parts.contents.getSize('width',1);ad={x:aj.screenX,y:aj.screenY};ac=f.document.getWindow().getViewPaneSize();f.document.on('mousemove',ah);f.document.on('mouseup',ai);if(g.ie6Compat){var am=K.getChild(0).getFrameDocument();am.on('mousemove',ah);am.on('mouseup',ai);}aj.preventDefault&&aj.preventDefault();});W.on('load',function(){var aj='';if(Y==1)aj=' cke_resizer_horizontal';else if(Y==2)aj=' cke_resizer_vertical';var ak=m.createFromHtml('
');W.parts.footer.append(ak,1);});Z.on('destroy',function(){j.removeFunction(ag); });function ah(aj){var ak=Z.lang.dir=='rtl',al=(aj.data.$.screenX-ad.x)*(ak?-1:1),am=aj.data.$.screenY-ad.y,an=ae.width,ao=ae.height,ap=an+al*(W._.moved?1:2),aq=ao+am*(W._.moved?1:2),ar=W._.element.getFirst(),as=ak&&ar.getComputedStyle('right'),at=W.getPosition();if(at.y+aq>ac.height)aq=ac.height-at.y;if((ak?as:at.x)+ap>ac.width)ap=ac.width-(ak?as:at.x);if(Y==1||Y==3)an=Math.max(X.minWidth||0,ap-aa);if(Y==2||Y==3)ao=Math.max(X.minHeight||0,aq-ab);W.resize(an,ao);if(!W._.moved)W.layout();aj.data.preventDefault();};function ai(){f.document.removeListener('mouseup',ai);f.document.removeListener('mousemove',ah);if(af){af.remove();af=null;}if(g.ie6Compat){var aj=K.getChild(0).getFrameDocument();aj.removeListener('mouseup',ai);aj.removeListener('mousemove',ah);}};};var I,J={},K;function L(W){W.data.preventDefault(1);};function M(W){var X=f.document.getWindow(),Y=W.config,Z=Y.dialog_backgroundCoverColor||'white',aa=Y.dialog_backgroundCoverOpacity,ab=Y.baseFloatZIndex,ac=j.genKey(Z,aa,ab),ad=J[ac];if(!ad){var ae=['
'];if(g.ie6Compat){var af=g.isCustomDomain(),ag="";ae.push('');}ae.push('
');ad=m.createFromHtml(ae.join(''));ad.setOpacity(aa!=undefined?aa:0.5);ad.on('keydown',L);ad.on('keypress',L);ad.on('keyup',L);ad.appendTo(f.document.getBody());J[ac]=ad;}else ad.show();K=ad;var ah=function(){var ak=X.getViewPaneSize();ad.setStyles({width:ak.width+'px',height:ak.height+'px'});},ai=function(){var ak=X.getScrollPosition(),al=f.dialog._.currentTop;ad.setStyles({left:ak.x+'px',top:ak.y+'px'});if(al)do{var am=al.getPosition();al.move(am.x,am.y);}while(al=al._.parentDialog)};I=ah;X.on('resize',ah);ah();if(!(g.mac&&g.webkit))ad.focus();if(g.ie6Compat){var aj=function(){ai();arguments.callee.prevScrollHandler.apply(this,arguments);};X.$.setTimeout(function(){aj.prevScrollHandler=window.onscroll||(function(){});window.onscroll=aj;},0);ai();}};function N(){if(!K)return; var W=f.document.getWindow();K.hide();W.removeListener('resize',I);if(g.ie6Compat)W.$.setTimeout(function(){var X=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=X||null;},0);I=null;};function O(){for(var W in J)J[W].remove();J={};};var P={},Q=function(W){var X=W.data.$.ctrlKey||W.data.$.metaKey,Y=W.data.$.altKey,Z=W.data.$.shiftKey,aa=String.fromCharCode(W.data.$.keyCode),ab=P[(X?'CTRL+':'')+(Y?'ALT+':'')+(Z?'SHIFT+':'')+aa];if(!ab||!ab.length)return;ab=ab[ab.length-1];ab.keydown&&ab.keydown.call(ab.uiElement,ab.dialog,ab.key);W.data.preventDefault();},R=function(W){var X=W.data.$.ctrlKey||W.data.$.metaKey,Y=W.data.$.altKey,Z=W.data.$.shiftKey,aa=String.fromCharCode(W.data.$.keyCode),ab=P[(X?'CTRL+':'')+(Y?'ALT+':'')+(Z?'SHIFT+':'')+aa];if(!ab||!ab.length)return;ab=ab[ab.length-1];if(ab.keyup){ab.keyup.call(ab.uiElement,ab.dialog,ab.key);W.data.preventDefault();}},S=function(W,X,Y,Z,aa){var ab=P[Y]||(P[Y]=[]);ab.push({uiElement:W,dialog:X,key:Y,keyup:aa||W.accessKeyUp,keydown:Z||W.accessKeyDown});},T=function(W){for(var X in P){var Y=P[X];for(var Z=Y.length-1;Z>=0;Z--){if(Y[Z].dialog==W||Y[Z].uiElement==W)Y.splice(Z,1);}if(Y.length===0)delete P[X];}},U=function(W,X){if(W._.accessKeyMap[X])W.selectPage(W._.accessKeyMap[X]);},V=function(W,X){};(function(){p.dialog={uiElement:function(W,X,Y,Z,aa,ab,ac){if(arguments.length<4)return;var ad=(Z.call?Z(X):Z)||'div',ae=['<',ad,' '],af=(aa&&aa.call?aa(X):aa)||{},ag=(ab&&ab.call?ab(X):ab)||{},ah=(ac&&ac.call?ac.call(this,W,X):ac)||'',ai=this.domId=ag.id||j.getNextId()+'_uiElement',aj=this.id=X.id,ak;ag.id=ai;var al={};if(X.type)al['cke_dialog_ui_'+X.type]=1;if(X.className)al[X.className]=1;if(X.disabled)al.cke_disabled=1;var am=ag['class']&&ag['class'].split?ag['class'].split(' '):[];for(ak=0;ak=0;ak--){if(ao[ak]==='')ao.splice(ak,1);}if(ao.length>0)ag.style=(ag.style?ag.style+'; ':'')+ao.join('; ');for(ak in ag)ae.push(ak+'="'+j.htmlEncode(ag[ak])+'" ');ae.push('>',ah,'');Y.push(ae.join(''));(this._||(this._={})).dialog=W;if(typeof X.isChanged=='boolean')this.isChanged=function(){return X.isChanged;};if(typeof X.isChanged=='function')this.isChanged=X.isChanged; if(typeof X.setValue=='function')this.setValue=j.override(this.setValue,function(ar){return function(as){ar.call(this,X.setValue.call(this,as));};});if(typeof X.getValue=='function')this.getValue=j.override(this.getValue,function(ar){return function(){return X.getValue.call(this,ar.call(this));};});f.event.implementOn(this);this.registerEvents(X);if(this.accessKeyUp&&this.accessKeyDown&&X.accessKey)S(this,W,'CTRL+'+X.accessKey);var aq=this;W.on('load',function(){var ar=aq.getInputElement();if(ar){var as=aq.type in {checkbox:1,ratio:1}&&h&&g.version<8?'cke_dialog_ui_focused':'';ar.on('focus',function(){W._.tabBarMode=false;W._.hasFocus=true;aq.fire('focus');as&&this.addClass(as);});ar.on('blur',function(){aq.fire('blur');as&&this.removeClass(as);});}});if(this.keyboardFocusable){this.tabIndex=X.tabIndex||0;this.focusIndex=W._.focusList.push(this)-1;this.on('focus',function(){W._.currentFocusIndex=aq.focusIndex;});}j.extend(this,X);},hbox:function(W,X,Y,Z,aa){if(arguments.length<4)return;this._||(this._={});var ab=this._.children=X,ac=aa&&aa.widths||null,ad=aa&&aa.height||null,ae={},af,ag=function(){var ai=[''];for(af=0;af0)ai.push('style="'+ak.join('; ')+'" ');ai.push('>',Y[af],'');}ai.push('');return ai.join('');},ah={role:'presentation'};aa&&aa.align&&(ah.align=aa.align);p.dialog.uiElement.call(this,W,aa||{type:'hbox'},Z,'table',ae,ah,ag);},vbox:function(W,X,Y,Z,aa){if(arguments.length<3)return;this._||(this._={});var ab=this._.children=X,ac=aa&&aa.width||null,ad=aa&&aa.heights||null,ae=function(){var af=['');for(var ag=0;ag');}af.push('
0)af.push('style="',ah.join('; '),'" ');af.push(' class="cke_dialog_ui_vbox_child">',Y[ag],'
');return af.join('');};p.dialog.uiElement.call(this,W,aa||{type:'vbox'},Z,'div',null,{role:'presentation'},ae);}};})();p.dialog.uiElement.prototype={getElement:function(){return f.document.getById(this.domId);},getInputElement:function(){return this.getElement();},getDialog:function(){return this._.dialog;},setValue:function(W,X){this.getInputElement().setValue(W);!X&&this.fire('change',{value:W});return this;},getValue:function(){return this.getInputElement().getValue();},isChanged:function(){return false;},selectParentTab:function(){var Z=this;var W=Z.getInputElement(),X=W,Y;while((X=X.getParent())&&X.$.className.search('cke_dialog_page_contents')==-1){}if(!X)return Z;Y=X.getAttribute('name');if(Z._.dialog._.currentTabId!=Y)Z._.dialog.selectPage(Y);return Z;},focus:function(){this.selectParentTab().getInputElement().focus();return this;},registerEvents:function(W){var X=/^on([A-Z]\w+)/,Y,Z=function(ab,ac,ad,ae){ac.on('load',function(){ab.getInputElement().on(ad,ae,ab);});};for(var aa in W){if(!(Y=aa.match(X)))continue;if(this.eventProcessors[aa])this.eventProcessors[aa].call(this,this._.dialog,W[aa]);else Z(this,this._.dialog,Y[1].toLowerCase(),W[aa]);}return this;},eventProcessors:{onLoad:function(W,X){W.on('load',X,this);},onShow:function(W,X){W.on('show',X,this);},onHide:function(W,X){W.on('hide',X,this);}},accessKeyDown:function(W,X){this.focus();},accessKeyUp:function(W,X){},disable:function(){var W=this.getElement(),X=this.getInputElement();X.setAttribute('disabled','true');W.addClass('cke_disabled');},enable:function(){var W=this.getElement(),X=this.getInputElement();X.removeAttribute('disabled');W.removeClass('cke_disabled');},isEnabled:function(){return!this.getElement().hasClass('cke_disabled');},isVisible:function(){return this.getInputElement().isVisible();},isFocusable:function(){if(!this.isEnabled()||!this.isVisible())return false;return true;}};p.dialog.hbox.prototype=j.extend(new p.dialog.uiElement(),{getChild:function(W){var X=this;if(arguments.length<1)return X._.children.concat();if(!W.splice)W=[W];if(W.length<2)return X._.children[W[0]];else return X._.children[W[0]]&&X._.children[W[0]].getChild?X._.children[W[0]].getChild(W.slice(1,W.length)):null;}},true);p.dialog.vbox.prototype=new p.dialog.hbox(); (function(){var W={build:function(X,Y,Z){var aa=Y.children,ab,ac=[],ad=[];for(var ae=0;ae',Y||Z.name,'');return aa.join('');}};f.style.getStyleText=function(Y){var Z=Y._ST;if(Z)return Z;Z=Y.styles;var aa=Y.attributes&&Y.attributes.style||'',ab='';if(aa.length)aa=aa.replace(t,';');for(var ac in Z){var ad=Z[ac],ae=(ac+':'+ad).replace(t,';');if(ad=='inherit')ab+=ae;else aa+=ae;}if(aa.length)aa=U(aa);aa+=ab;return Y._ST=aa;};function x(Y){var Z,aa;while(Y=Y.getParent()){if(Y.getName()=='body')break;if(Y.getAttribute('data-nostyle'))Z=Y;else if(!aa){var ab=Y.getAttribute('contentEditable');if(ab=='false')Z=Y;else if(ab=='true')aa=1;}}return Z;};function y(Y){var aD=this;var Z=Y.document;if(Y.collapsed){var aa=O(aD,Z);Y.insertNode(aa);Y.moveToPosition(aa,2);return;}var ab=aD.element,ac=aD._.definition,ad,ae=ac.ignoreReadonly,af=ae||ac.includeReadonly;if(af==undefined)af=Z.getCustomData('cke_includeReadonly');var ag=k[ab]||(ad=true,k.span);Y.enlarge(1,1);Y.trim();var ah=Y.createBookmark(),ai=ah.startNode,aj=ah.endNode,ak=ai,al;if(!ae){var am=x(ai),an=x(aj);if(am)ak=am.getNextSourceNode(true);if(an)aj=an;}if(ak.getPosition(aj)==2)ak=0;while(ak){var ao=false;if(ak.equals(aj)){ak=null; ao=true;}else{var ap=ak.type,aq=ap==1?ak.getName():null,ar=aq&&ak.getAttribute('contentEditable')=='false',as=aq&&ak.getAttribute('data-nostyle');if(aq&&ak.data('cke-bookmark')){ak=ak.getNextSourceNode(true);continue;}if(!aq||ag[aq]&&!as&&(!ar||af)&&(ak.getPosition(aj)|4|0|8)==4+0+8&&(!ac.childRule||ac.childRule(ak))){var at=ak.getParent();if(at&&((at.getDtd()||k.span)[ab]||ad)&&(!ac.parentRule||ac.parentRule(at))){if(!al&&(!aq||!k.$removeEmpty[aq]||(ak.getPosition(aj)|4|0|8)==4+0+8)){al=new i.range(Z);al.setStartBefore(ak);}if(ap==3||ar||ap==1&&!ak.getChildCount()){var au=ak,av;while((ao=!au.getNext(v))&&(av=au.getParent(),ag[av.getName()])&&(av.getPosition(ai)|2|0|8)==2+0+8&&(!ac.childRule||ac.childRule(av)))au=av;al.setEndAfter(au);}}else ao=true;}else ao=true;ak=ak.getNextSourceNode(as||ar);}if(ao&&al&&!al.collapsed){var aw=O(aD,Z),ax=aw.hasAttributes(),ay=al.getCommonAncestor(),az={styles:{},attrs:{},blockedStyles:{},blockedAttrs:{}},aA,aB,aC;while(aw&&ay){if(ay.getName()==ab){for(aA in ac.attributes){if(az.blockedAttrs[aA]||!(aC=ay.getAttribute(aB)))continue;if(aw.getAttribute(aA)==aC)az.attrs[aA]=1;else az.blockedAttrs[aA]=1;}for(aB in ac.styles){if(az.blockedStyles[aB]||!(aC=ay.getStyle(aB)))continue;if(aw.getStyle(aB)==aC)az.styles[aB]=1;else az.blockedStyles[aB]=1;}}ay=ay.getParent();}for(aA in az.attrs)aw.removeAttribute(aA);for(aB in az.styles)aw.removeStyle(aB);if(ax&&!aw.hasAttributes())aw=null;if(aw){al.extractContents().appendTo(aw);L(aD,aw);al.insertNode(aw);aw.mergeSiblings();if(!h)aw.$.normalize();}else{aw=new m('span');al.extractContents().appendTo(aw);al.insertNode(aw);L(aD,aw);aw.remove(true);}al=null;}}Y.moveToBookmark(ah);Y.shrink(2);};function z(Y){Y.enlarge(1,1);var Z=Y.createBookmark(),aa=Z.startNode;if(Y.collapsed){var ab=new i.elementPath(aa.getParent()),ac;for(var ad=0,ae;ad'+aa+'';else Y.setHtml(aa);Z.remove();};function G(Y){var Z=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,aa=Y.getName(),ab=H(Y.getOuterHtml(),Z,function(ad,ae,af){return ae+''+af+'
';}),ac=[];ab.replace(/([\s\S]*?)<\/pre>/gi,function(ad,ae){ac.push(ae);});return ac;};function H(Y,Z,aa){var ab='',ac='';Y=Y.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(ad,ae,af){ae&&(ab=ae);
af&&(ac=af);return '';});return ab+Y.replace(Z,aa)+ac;};function I(Y,Z){var aa;if(Y.length>1)aa=new i.documentFragment(Z.getDocument());for(var ab=0;ab');ac=ac.replace(/[ \t]{2,}/g,function(ae){return j.repeat(' ',ae.length-1)+' ';});if(aa){var ad=Z.clone();ad.setHtml(ac);aa.append(ad);}else Z.setHtml(ac);}return aa||Z;};function J(Y,Z){var aa=Y.getBogus();aa&&aa.remove();var ab=Y.getHtml();ab=H(ab,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');ab=ab.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');ab=ab.replace(/([ \t\n\r]+| )/g,' ');ab=ab.replace(/]*>/gi,'\n');if(h){var ac=Y.getDocument().createElement('div');ac.append(Z);Z.$.outerHTML='
'+ab+'
';Z.copyAttributes(ac.getFirst());Z=ac.getFirst().remove();}else Z.setHtml(ab);return Z;};function K(Y,Z){var aa=Y._.definition,ab=aa.attributes,ac=aa.styles,ad=S(Y)[Z.getName()],ae=j.isEmpty(ab)&&j.isEmpty(ac);for(var af in ab){if((af=='class'||Y._.definition.fullMatch)&&Z.getAttribute(af)!=T(af,ab[af]))continue;ae=Z.hasAttribute(af);Z.removeAttribute(af);}for(var ag in ac){if(Y._.definition.fullMatch&&Z.getStyle(ag)!=T(ag,ac[ag],true))continue;ae=ae||!!Z.getStyle(ag);Z.removeStyle(ag);}M(Z,ad,r[Z.getName()]);if(ae)!k.$block[Z.getName()]||Y._.enterMode==2&&!Z.hasAttributes()?N(Z):Z.renameNode(Y._.enterMode==1?'p':'div');};function L(Y,Z){var aa=Y._.definition,ab=aa.attributes,ac=aa.styles,ad=S(Y),ae=Z.getElementsByTag(Y.element);for(var af=ae.count();--af>=0;)K(Y,ae.getItem(af));for(var ag in ad){if(ag!=Y.element){ae=Z.getElementsByTag(ag);for(af=ae.count()-1;af>=0;af--){var ah=ae.getItem(af);M(ah,ad[ag]);}}}};function M(Y,Z,aa){var ab=Z&&Z.attributes;if(ab)for(var ac=0;ac0)M+=(K.$.offsetWidth||0)-(K.$.clientWidth||0)+3;M+=4;K.setStyle('width',M+'px');A.element.addClass('cke_frameLoaded'); var N=A.element.$.scrollHeight;if(h&&g.quirks&&N>0)N+=(K.$.offsetHeight||0)-(K.$.clientHeight||0)+3;K.setStyle('height',N+'px');z._.currentBlock.element.setStyle('display','none').removeStyle('display');}else K.removeStyle('height');if(F)G-=B.$.offsetWidth;B.setStyle('left',G+'px');var O=z.element,P=O.getWindow(),Q=B.$.getBoundingClientRect(),R=P.getViewPaneSize(),S=Q.width||Q.right-Q.left,T=Q.height||Q.bottom-Q.top,U=F?Q.right:R.width-Q.left,V=F?R.width-Q.right:Q.left;if(F){if(US)G+=S;else if(R.width>S)G-=Q.left;else G=G-Q.right+R.width;}else if(US)G-=S;else if(R.width>S)G=G-Q.right+R.width;else G-=Q.left;var W=R.height-Q.top,X=Q.top;if(WT)H-=T;else if(R.height>T)H=H-Q.bottom+R.height;else H-=Q.top;if(h){var Y=new m(B.$.offsetParent),Z=Y;if(Z.getName()=='html')Z=Z.getDocument().getBody();if(Z.getComputedStyle('direction')=='rtl')if(g.ie8Compat)G-=B.getDocument().getDocumentElement().$.scrollLeft*2;else G-=Y.$.scrollWidth-Y.$.clientWidth;}var aa=B.getFirst(),ab;if(ab=aa.getCustomData('activePanel'))ab.onHide&&ab.onHide.call(this,1);aa.setCustomData('activePanel',this);B.setStyles({top:H+'px',left:G+'px'});B.setOpacity(1);},this);z.isLoaded?J():z.onLoad=J;j.setTimeout(function(){C.$.contentWindow.focus();this.allowBlur(true);},0,this);},g.air?200:0,this);this.visible=1;if(this.onShow)this.onShow.call(this);s=0;},hide:function(u){var w=this;if(w.visible&&(!w.onHide||w.onHide.call(w)!==true)){w.hideChild();g.gecko&&w._.iframe.getFrameDocument().$.activeElement.blur();w.element.setStyle('display','none');w.visible=0;w.element.getFirst().removeCustomData('activePanel');var v=u!==false&&w._.returnFocus;if(v){if(g.webkit&&v.type)v.getWindow().$.focus();v.focus();}}},allowBlur:function(u){var v=this._.panel;if(u!=undefined)v.allowBlur=u;return v.allowBlur;},showAsChild:function(u,v,w,x,y,z){if(this._.activeChild==u&&u._.panel._.offsetParentId==w.getId())return;this.hideChild();u.onHide=j.bind(function(){j.setTimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activeChild=u;this._.focused=false;u.showBlock(v,w,x,y,z);if(g.ie7Compat||g.ie8&&g.ie6Compat)setTimeout(function(){u.element.getChild(0).$.style.cssText+='';},100);},hideChild:function(){var u=this._.activeChild;if(u){delete u.onHide;delete u._.returnFocus;delete this._.activeChild;u.hide();}}}});f.on('instanceDestroyed',function(){var u=j.isEmpty(f.instances);for(var v in r){var w=r[v];if(u)w.destroy();else w.element.hide();}u&&(r={});});})();o.add('menu',{beforeInit:function(r){var s=r.config.menu_groups.split(','),t=r._.menuGroups={},u=r._.menuItems={}; for(var v=0;v'],G=w.length,H=G&&w[0].group;for(var I=0;I');H=J.group;}J.render(this,I,F);}F.push('');z.setHtml(F.join(''));p.fire('ready',this);if(this.parent)this.parent._.panel.showAsChild(y,this.id,s,t,u,v);else y.showBlock(this.id,s,t,u,v);x.fire('menuShow',[y]);},addListener:function(s){this._.listeners.push(s);},hide:function(s){var t=this;t._.onHide&&t._.onHide();t._.panel&&t._.panel.hide(s);}}});function r(s){s.sort(function(t,u){if(t.groupu.group)return 1;return t.orderu.order?1:0;});};f.menuItem=j.createClass({$:function(s,t,u){var v=this;j.extend(v,u,{order:0,className:'cke_button_'+t});v.group=s._.menuGroups[v.group];v.editor=s;v.name=t;},proto:{render:function(s,t,u){var B=this;var v=s.id+String(t),w=typeof B.state=='undefined'?2:B.state,x=' cke_'+(w==1?'on':w==0?'disabled':'off'),y=B.label;if(B.className)x+=' '+B.className;var z=B.getItems;u.push(''+''+'');if(z)u.push('','&#',B.editor.lang.dir=='rtl'?'9668':'9658',';','');u.push(y,'');}}});})();n.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var r;o.add('editingblock',{init:function(s){if(!s.config.editingBlock)return;s.on('themeSpace',function(t){if(t.data.space=='contents')t.data.html+='
';});s.on('themeLoaded',function(){s.fireOnce('editingBlockReady');});s.on('uiReady',function(){s.setMode(s.config.startupMode);});s.on('afterSetData',function(){if(!r){function t(){r=true;s.getMode().loadData(s.getData());r=false;};if(s.mode)t();else s.on('mode',function(){if(s.mode){t();s.removeListener('mode',arguments.callee);}});}});s.on('beforeGetData',function(){if(!r&&s.mode){r=true;s.setData(s.getMode().getData(),null,1);r=false;}});s.on('getSnapshot',function(t){if(s.mode)t.data=s.getMode().getSnapshotData();});s.on('loadSnapshot',function(t){if(s.mode)s.getMode().loadSnapshotData(t.data);});s.on('mode',function(t){t.removeListener();g.webkit&&s.container.on('focus',function(){s.focus();});if(s.config.startupFocus)s.focus();setTimeout(function(){s.fireOnce('instanceReady');f.fire('instanceReady',null,s);},0);});s.on('destroy',function(){var t=this;if(t.mode)t._.modes[t.mode].unload(t.getThemeSpace('contents'));});}});f.editor.prototype.mode='';f.editor.prototype.addMode=function(s,t){t.name=s;(this._.modes||(this._.modes={}))[s]=t;};f.editor.prototype.setMode=function(s){this.fire('beforeSetMode',{newMode:s});var t,u=this.getThemeSpace('contents'),v=this.checkDirty();if(this.mode){if(s==this.mode)return;this._.previousMode=this.mode;this.fire('beforeModeUnload');var w=this.getMode();t=w.getData();w.unload(u);this.mode='';}u.setHtml('');var x=this.getMode(s);if(!x)throw '[CKEDITOR.editor.setMode] Unknown mode "'+s+'".';if(!v)this.on('mode',function(){this.resetDirty(); this.removeListener('mode',arguments.callee);});x.load(u,typeof t!='string'?this.getData():t);};f.editor.prototype.getMode=function(s){return this._.modes&&this._.modes[s||this.mode];};f.editor.prototype.focus=function(){this.forceNextSelectionCheck();var s=this.getMode();if(s)s.focus();};})();n.startupMode='wysiwyg';n.editingBlock=true;(function(){function r(){var L=this;try{var I=L.getSelection();if(!I||!I.document.getWindow().$)return;var J=I.getStartElement(),K=new i.elementPath(J);if(!K.compare(L._.selectionPreviousPath)){L._.selectionPreviousPath=K;L.fire('selectionChange',{selection:I,path:K,element:J});}}catch(M){}};var s,t;function u(){t=true;if(s)return;v.call(this);s=j.setTimeout(v,200,this);};function v(){s=null;if(t){j.setTimeout(r,0,this);t=false;}};function w(I){function J(N,O){if(!N||N.type==3)return false;var P=I.clone();return P['moveToElementEdit'+(O?'End':'Start')](N);};var K=I.startContainer,L=I.getPreviousNode(F,null,K),M=I.getNextNode(F,null,K);if(J(L)||J(M,1))return true;if(!(L||M)&&!(K.type==1&&K.isBlockBoundary()&&K.getBogus()))return true;return false;};var x={modes:{wysiwyg:1,source:1},readOnly:h||g.webkit,exec:function(I){switch(I.mode){case 'wysiwyg':I.document.$.execCommand('SelectAll',false,null);I.forceNextSelectionCheck();I.selectionChange();break;case 'source':var J=I.textarea.$;if(h)J.createTextRange().execCommand('SelectAll');else{J.selectionStart=0;J.selectionEnd=J.value.length;}J.focus();}},canUndo:false};function y(I){B(I);var J=I.createText('​');I.setCustomData('cke-fillingChar',J);return J;};function z(I){return I&&I.getCustomData('cke-fillingChar');};function A(I){var J=I&&z(I);if(J)if(J.getCustomData('ready'))B(I);else J.setCustomData('ready',1);};function B(I){var J=I&&I.removeCustomData('cke-fillingChar');if(J){var K,L=I.getSelection().getNative(),M=L&&L.type!='None'&&L.getRangeAt(0);if(J.getLength()>1&&M&&M.intersectsNode(J.$)){K=[L.anchorOffset,L.focusOffset];var N=L.anchorNode==J.$&&L.anchorOffset>0,O=L.focusNode==J.$&&L.focusOffset>0;N&&K[0]--;O&&K[1]--;C(L)&&K.unshift(K.pop());}J.setText(J.getText().replace(/\u200B/g,''));if(K){var P=L.getRangeAt(0);P.setStart(P.startContainer,K[0]);P.setEnd(P.startContainer,K[1]);L.removeAllRanges();L.addRange(P);}}};function C(I){if(!I.isCollapsed){var J=I.getRangeAt(0);J.setStart(I.anchorNode,I.anchorOffset);J.setEnd(I.focusNode,I.focusOffset);return J.collapsed;}};o.add('selection',{init:function(I){if(g.webkit){I.on('selectionChange',function(){A(I.document);});I.on('beforeSetMode',function(){B(I.document); });var J,K;function L(){var N=I.document,O=z(N);if(O){var P=N.$.defaultView.getSelection();if(P.type=='Caret'&&P.anchorNode==O.$)K=1;J=O.getText();O.setText(J.replace(/\u200B/g,''));}};function M(){var N=I.document,O=z(N);if(O){O.setText(J);if(K){N.$.defaultView.getSelection().setPosition(O.$,O.getLength());K=0;}}};I.on('beforeUndoImage',L);I.on('afterUndoImage',M);I.on('beforeGetData',L,null,null,0);I.on('getData',M);}I.on('contentDom',function(){var N=I.document,O=f.document,P=N.getBody(),Q=N.getDocumentElement();if(h){var R,S,T=1;P.on('focusin',function(aa){if(aa.data.$.srcElement.nodeName!='BODY')return;var ab=N.getCustomData('cke_locked_selection');if(ab){ab.unlock(1);ab.lock();}else if(R&&T){try{R.select();}catch(ac){}R=null;}});P.on('focus',function(){S=1;Z();});P.on('beforedeactivate',function(aa){if(aa.data.$.toElement)return;S=0;T=1;});h&&I.on('blur',function(){try{N.$.selection.empty();}catch(aa){}});Q.on('mousedown',function(){T=0;});Q.on('mouseup',function(){T=1;});var U;P.on('mousedown',function(aa){if(aa.data.$.button==2){var ab=I.document.$.selection;if(ab.type=='None')U=I.window.getScrollPosition();}Y();});P.on('mouseup',function(aa){if(aa.data.$.button==2&&U){I.document.$.documentElement.scrollLeft=U.x;I.document.$.documentElement.scrollTop=U.y;}U=null;S=1;setTimeout(function(){Z(true);},0);});P.on('keydown',Y);P.on('keyup',function(){S=1;Z();});if(N.$.compatMode!='BackCompat'){if(g.ie7Compat||g.ie6Compat){function V(aa,ab,ac){try{aa.moveToPoint(ab,ac);}catch(ad){}};Q.on('mousedown',function(aa){function ab(ag){ag=ag.data.$;if(ae){var ah=P.$.createTextRange();V(ah,ag.x,ag.y);ae.setEndPoint(af.compareEndPoints('StartToStart',ah)<0?'EndToEnd':'StartToStart',ah);ae.select();}};function ac(){O.removeListener('mouseup',ad);Q.removeListener('mouseup',ad);};function ad(){Q.removeListener('mousemove',ab);ac();ae.select();};aa=aa.data;if(aa.getTarget().is('html')&&aa.$.x0)U=V-1;else if(W<0)T=V+1;else if(g.ie9Compat&&Q.tagName=='BR'){var Z=O.defaultView.getSelection();return{container:Z[M?'anchorNode':'focusNode'],offset:Z[M?'anchorOffset':'focusOffset']};}else return{container:N,offset:J(Q)};}if(V==-1||V==P.length-1&&W<0){S.moveToElementText(N);S.setEndPoint('StartToStart',L);X=S.text.replace(/(\r\n|\r)/g,'\n').length;P=N.childNodes;if(!X){Q=P[P.length-1];if(Q.nodeType!=3)return{container:N,offset:P.length};else return{container:Q,offset:Q.nodeValue.length};}var aa=P.length;while(X>0&&aa>0){R=P[--aa];if(R.nodeType==3){Y=R;X-=R.nodeValue.length;}}return{container:Y,offset:-X};}else{S.collapse(W>0?true:false);S.setEndPoint(W>0?'StartToStart':'EndToStart',L);X=S.text.replace(/(\r\n|\r)/g,'\n').length;if(!X)return{container:N,offset:J(Q)+(W>0?0:1)};while(X>0)try{R=Q[W>0?'previousSibling':'nextSibling'];if(R.nodeType==3){X-=R.nodeValue.length;Y=R;}Q=R;}catch(ab){return{container:N,offset:J(Q)};}return{container:Y,offset:W>0?-X:Y.nodeValue.length+X};}};return function(){var V=this;var L=V.getNative(),M=L&&L.createRange(),N=V.getType(),O;if(!L)return[];if(N==2){O=new i.range(V.document);var P=K(M,true);O.setStart(new i.node(P.container),P.offset);P=K(M);O.setEnd(new i.node(P.container),P.offset);if(O.endContainer.getPosition(O.startContainer)&4&&O.endOffset<=O.startContainer.getIndex())O.collapse();return[O];}else if(N==3){var Q=[];for(var R=0;R=Q.getLength())U.setStartAfter(Q);else U.setStartBefore(Q);if(R&&R.type==3)if(!T)U.setEndBefore(R);else U.setEndAfter(R);var V=new i.walker(U);V.evaluator=function(W){if(W.type==1&&W.isReadOnly()){var X=N.clone();N.setEndBefore(W);if(N.collapsed)L.splice(M--,1);if(!(W.getPosition(U.endContainer)&16)){X.setStartAfter(W);if(!X.collapsed)L.splice(M+1,0,X);}return true;}return false;};V.next();}}return K.ranges;};})(),getStartElement:function(){var P=this;var I=P._.cache;if(I.startElement!==undefined)return I.startElement;var J,K=P.getNative();switch(P.getType()){case 3:return P.getSelectedElement();case 2:var L=P.getRanges()[0];if(L){if(!L.collapsed){L.optimize();while(1){var M=L.startContainer,N=L.startOffset;if(N==(M.getChildCount?M.getChildCount():M.getLength())&&!M.isBlockBoundary())L.setStartAfter(M);else break;}J=L.startContainer;if(J.type!=1)return J.getParent();J=J.getChild(L.startOffset);if(!J||J.type!=1)J=L.startContainer;else{var O=J.getFirst();while(O&&O.type==1){J=O;O=O.getFirst();}}}else{J=L.startContainer;if(J.type!=1)J=J.getParent();}J=J.$;}}return I.startElement=J?new m(J):null;},getSelectedElement:function(){var I=this._.cache;if(I.selectedElement!==undefined)return I.selectedElement;var J=this,K=j.tryThese(function(){return J.getNative().createRange().item(0);},function(){var L,M,N=J.getRanges()[0],O=N.getCommonAncestor(1,1),P={table:1,ul:1,ol:1,dl:1};for(var Q in P){if(L=O.getAscendant(Q,1))break;}if(L){var R=new i.range(this.document);R.setStartAt(L,1);R.setEnd(N.startContainer,N.startOffset);var S=j.extend(P,k.$listItem,k.$tableContent),T=new i.walker(R),U=function(V,W){return function(X,Y){if(X.type==3&&(!j.trim(X.getText())||X.getParent().data('cke-bookmark')))return true;var Z;if(X.type==1){Z=X.getName();if(Z=='br'&&W&&X.equals(X.getParent().getBogus()))return true;if(Y&&Z in S||Z in k.$removeEmpty)return true;}V.halted=1;return false;};};T.guard=U(T);if(T.checkBackward()&&!T.halted){T=new i.walker(R);R.setStart(N.endContainer,N.endOffset);R.setEndAt(L,2);T.guard=U(T,1);if(T.checkForward()&&!T.halted)M=L.$;}}if(!M)throw 0;return M;},function(){var L=J.getRanges()[0],M,N;for(var O=2;O&&!((M=L.getEnclosedNode())&&M.type==1&&D[M.getName()]&&(N=M)); O--)L.shrink(1);return N.$;});return I.selectedElement=K?new m(K):null;},getSelectedText:function(){var I=this._.cache;if(I.selectedText!==undefined)return I.selectedText;var J='',K=this.getNative();if(this.getType()==2)J=h?K.createRange().text:K.toString();return I.selectedText=J;},lock:function(){var I=this;I.getRanges();I.getStartElement();I.getSelectedElement();I.getSelectedText();I._.cache.nativeSel={};I.isLocked=1;I.document.setCustomData('cke_locked_selection',I);},unlock:function(I){var N=this;var J=N.document,K=J.getCustomData('cke_locked_selection');if(K){J.setCustomData('cke_locked_selection',null);if(I){var L=K.getSelectedElement(),M=!L&&K.getRanges();N.isLocked=0;N.reset();if(L)N.selectElement(L);else N.selectRanges(M);}}if(!K||!I){N.isLocked=0;N.reset();}},reset:function(){this._.cache={};},selectElement:function(I){var K=this;if(K.isLocked){var J=new i.range(K.document);J.setStartBefore(I);J.setEndAfter(I);K._.cache.selectedElement=I;K._.cache.startElement=I;K._.cache.ranges=new i.rangeList(J);K._.cache.type=3;return;}J=new i.range(I.getDocument());J.setStartBefore(I);J.setEndAfter(I);J.select();K.document.fire('selectionchange');K.reset();},selectRanges:function(I){var W=this;if(W.isLocked){W._.cache.selectedElement=null;W._.cache.startElement=I[0]&&I[0].getTouchedStartNode();W._.cache.ranges=new i.rangeList(I);W._.cache.type=2;return;}if(h){if(I.length>1){var J=I[I.length-1];I[0].setEnd(J.endContainer,J.endOffset);I.length=1;}if(I[0])I[0].select();W.reset();}else{var K=W.getNative();if(!K)return;if(I.length){K.removeAllRanges();g.webkit&&B(W.document);}for(var L=0;L=0){R.collapse(1);S.setEnd(R.endContainer.$,R.endOffset); }else throw X;}K.addRange(S);}W.document.fire('selectionchange');W.reset();}},createBookmarks:function(I){return this.getRanges().createBookmarks(I);},createBookmarks2:function(I){return this.getRanges().createBookmarks2(I);},selectBookmarks:function(I){var J=[];for(var K=0;K','','',this.label,'','=10900&&!t.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',u,'_label" aria-describedby="',u,'_text" aria-haspopup="true"');if(g.opera||g.gecko&&g.mac)s.push(' onkeypress="return false;"');if(g.gecko)s.push(' onblur="this.style.cssText = this.style.cssText;"');s.push(' onkeydown="CKEDITOR.tools.callFunction( ',y,', event, this );" onfocus="return CKEDITOR.tools.callFunction(',z,', event);" '+(h?'onclick="return false;" onmouseup':'onclick')+'="CKEDITOR.tools.callFunction(',v,', this); return false;">'+this.label+''+''+''+(g.hc?'▼':g.air?' ':'')+''+''+''+'');if(this.onRender)this.onRender();return w;},createPanel:function(r){if(this._.panel)return;var s=this._.panelDefinition,t=this._.panelDefinition.block,u=s.parent||f.document.getBody(),v=new p.floatPanel(r,u,s),w=v.addListBlock(this.id,t),x=this;v.onShow=function(){if(x.className)this.element.getFirst().addClass(x.className+'_panel');x.setState(1);w.focus(!x.multiSelect&&x.getValue());x._.on=1;if(x.onOpen)x.onOpen();};v.onHide=function(y){if(x.className)this.element.getFirst().removeClass(x.className+'_panel');x.setState(x.modes&&x.modes[r.mode]?2:0);x._.on=0;if(!y&&x.onClose)x.onClose();};v.onEscape=function(){v.hide();};w.onClick=function(y,z){x.document.getWindow().focus();if(x.onClick)x.onClick.call(x,y,z);if(z)x.setValue(y,x._.items[y]);else x.setValue('');v.hide(false);};this._.panel=v;this._.list=w;v.getBlock(this.id).onHide=function(){x._.on=0;x.setState(2);};if(this.init)this.init();},setValue:function(r,s){var u=this; u._.value=r;var t=u.document.getById('cke_'+u.id+'_text');if(t){if(!(r||s)){s=u.label;t.addClass('cke_inline_label');}else t.removeClass('cke_inline_label');t.setHtml(typeof s!='undefined'?s:r);}},getValue:function(){return this._.value||'';},unmarkAll:function(){this._.list.unmarkAll();},mark:function(r){this._.list.mark(r);},hideItem:function(r){this._.list.hideItem(r);},hideGroup:function(r){this._.list.hideGroup(r);},showAll:function(){this._.list.showAll();},add:function(r,s,t){this._.items[r]=t||r;this._.list.add(r,s,t);},startGroup:function(r){this._.list.startGroup(r);},commit:function(){var r=this;if(!r._.committed){r._.list.commit();r._.committed=1;p.fire('ready',r);}r._.committed=1;},setState:function(r){var s=this;if(s._.state==r)return;s.document.getById('cke_'+s.id).setState(r);s._.state=r;}}});p.prototype.addRichCombo=function(r,s){this.add(r,3,s);};o.add('htmlwriter');f.htmlWriter=j.createClass({base:f.htmlParser.basicWriter,$:function(){var t=this;t.base();t.indentationChars='\t';t.selfClosingEnd=' />';t.lineBreakChars='\n';t.forceSimpleAmpersand=0;t.sortAttributes=1;t._.indent=0;t._.indentation='';t._.inPre=0;t._.rules={};var r=k;for(var s in j.extend({},r.$nonBodyContent,r.$block,r.$listItem,r.$tableContent))t.setRules(s,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!r[s]['#'],breakAfterClose:1});t.setRules('br',{breakAfterOpen:1});t.setRules('title',{indent:0,breakAfterOpen:0});t.setRules('style',{indent:0,breakBeforeClose:1});t.setRules('pre',{indent:0});},proto:{openTag:function(r,s){var u=this;var t=u._.rules[r];if(u._.indent)u.indentation();else if(t&&t.breakBeforeOpen){u.lineBreak();u.indentation();}u._.output.push('<',r);},openTagClose:function(r,s){var u=this;var t=u._.rules[r];if(s)u._.output.push(u.selfClosingEnd);else{u._.output.push('>');if(t&&t.indent)u._.indentation+=u.indentationChars;}if(t&&t.breakAfterOpen)u.lineBreak();r=='pre'&&(u._.inPre=1);},attribute:function(r,s){if(typeof s=='string'){this.forceSimpleAmpersand&&(s=s.replace(/&/g,'&'));s=j.htmlEncodeAttr(s);}this._.output.push(' ',r,'="',s,'"');},closeTag:function(r){var t=this;var s=t._.rules[r];if(s&&s.indent)t._.indentation=t._.indentation.substr(t.indentationChars.length);if(t._.indent)t.indentation();else if(s&&s.breakBeforeClose){t.lineBreak();t.indentation();}t._.output.push('');r=='pre'&&(t._.inPre=0);if(s&&s.breakAfterClose)t.lineBreak();},text:function(r){var s=this;if(s._.indent){s.indentation();!s._.inPre&&(r=j.ltrim(r));}s._.output.push(r); },comment:function(r){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var r=this;if(!r._.inPre&&r._.output.length>0)r._.output.push(r.lineBreakChars);r._.indent=1;},indentation:function(){var r=this;if(!r._.inPre)r._.output.push(r._.indentation);r._.indent=0;},setRules:function(r,s){var t=this._.rules[r];if(t)j.extend(t,s,true);else this._.rules[r]=s;}}});o.add('menubutton',{requires:['button','menu'],beforeInit:function(r){r.ui.addHandler(5,p.menuButton.handler);}});f.UI_MENUBUTTON='menubutton';(function(){var r=function(s){var t=this._;if(t.state===0)return;t.previousState=t.state;var u=t.menu;if(!u){u=t.menu=new f.menu(s,{panel:{className:s.skinClass+' cke_contextmenu',attributes:{'aria-label':s.lang.common.options}}});u.onHide=j.bind(function(){this.setState(this.modes&&this.modes[s.mode]?t.previousState:0);},this);if(this.onMenu)u.addListener(this.onMenu);}if(t.on){u.hide();return;}this.setState(1);u.show(f.document.getById(this._.id),4);};p.menuButton=j.createClass({base:p.button,$:function(s){var t=s.panel;delete s.panel;this.base(s);this.hasArrow=true;this.click=r;},statics:{handler:{create:function(s){return new p.menuButton(s);}}}});})();o.add('dialogui');(function(){var r=function(z){var C=this;C._||(C._={});C._['default']=C._.initValue=z['default']||'';C._.required=z.required||false;var A=[C._];for(var B=1;B',A.label,'','');else{var I={type:'hbox',widths:A.widths,padding:0,children:[{type:'html',html:'