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

Ajax

开发平台:

Others

  1. }if(m.colorButton_enableMore)t.push('</tr><tr><td colspan=8 align=center><a class="cke_colormore" _cke_focus=1 hidefocus=true title="',n.more,'" onclick="CKEDITOR.tools.callFunction(',v,",'?','",s,"');return false;" href="javascript:void('",n.more,"')">",n.more,'</a></td>');t.push('</tr></table>');return t.join('');};}});i.colorButton_enableMore=false;i.colorButton_colors='000,800000,8B4513,2F4F4F,008080,000080,4B0082,696969,B22222,A52A2A,DAA520,006400,40E0D0,0000CD,800080,808080,F00,FF8C00,FFD700,008000,0FF,00F,EE82EE,A9A9A9,FFA07A,FFA500,FFFF00,00FF00,AFEEEE,ADD8E6,DDA0DD,D3D3D3,FFF0F5,FAEBD7,FFFFE0,F0FFF0,F0FFFF,F0F8FF,E6E6FA,FFF';i.colorButton_foreStyle={element:'span',styles:{color:'#(color)'},overrides:[{element:'font',attributes:{color:null}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};j.add('contextmenu',{requires:['menu'],beforeInit:function(l){l.contextMenu=new j.contextMenu(l);l.addCommand('contextMenu',{exec:function(){l.contextMenu.show();}});}});j.contextMenu=e.createClass({$:function(l){this.id='cke_'+e.getNextNumber();this.editor=l;this._.listeners=[];this._.functionId=e.addFunction(function(m){this._.panel.hide();l.focus();l.execCommand(m);},this);},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor;if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q);p.onClick=e.bind(function(z){var A=true;p.hide();if(c)p.onEscape();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);A=false;},this);p.onEscape=function(){q.focus();if(c)q.getSelection().unlock(true);};}var r=this._.listeners,s=[],t=this.editor.getSelection(),u=t&&t.getStartElement();if(c)t.lock();p.onHide=e.bind(function(){p.onHide=null;if(c)q.getSelection().unlock();this.onHide&&this.onHide();},this);for(var v=0;v<r.length;v++){var w=r[v](u,t);if(w)for(var x in w){var y=this.editor.getMenuItem(x);if(y){y.state=w[x];p.add(y);}}}p.show(l,m||(q.lang.dir=='rtl'?2:1),n,o);}},proto:{addTarget:function(l){l.on('contextmenu',function(m){var n=m.data;n.preventDefault();var o=n.getTarget().getDocument().getDocumentElement(),p=n.$.clientX,q=n.$.clientY;e.setTimeout(function(){this._.onMenu(o,null,p,q);},0,this);},this);},addListener:function(l){this._.listeners.push(l);},show:function(l,m,n,o){this.editor.focus();this._.onMenu(l||a.document.getDocumentElement(),m,n||0,o||0);}}});(function(){var l={toolbarFocus:{exec:function(n){var o=n._.elementsPath.idBase,p=a.document.getById(o+'0');if(p)p.focus();}}},m='<span class="cke_empty">&nbsp;</span>';
  2. j.add('elementspath',{requires:['selection'],init:function(n){var o='cke_path_'+n.name,p,q=function(){if(!p)p=a.document.getById(o);return p;},r='cke_elementspath_'+e.getNextNumber()+'_';n._.elementsPath={idBase:r};n.on('themeSpace',function(s){if(s.data.space=='bottom')s.data.html+='<div id="'+o+'" class="cke_path">'+m+'</div>';});n.on('selectionChange',function(s){var t=b,u=s.data.selection,v=u.getStartElement(),w=[],x=this._.elementsPath.list=[];while(v){var y=x.push(v)-1,z;if(v.getAttribute('_cke_real_element_type'))z=v.getAttribute('_cke_real_element_type');else z=v.getName();var A='';if(t.opera||t.gecko&&t.mac)A+=' onkeypress="return false;"';if(t.gecko)A+=' onblur="this.style.cssText = this.style.cssText;"';w.unshift('<a id="',r,y,'" href="javascript:void('',z,'')" tabindex="-1" title="',n.lang.elementsPath.eleTitle.replace(/%1/,z),'"'+(b.gecko&&b.version<10900?' onfocus="event.preventBubble();"':'')+' hidefocus="true" '+" onkeydown="return CKEDITOR._.elementsPath.keydown('",this.name,"',",y,', event);"'+A," onclick="return CKEDITOR._.elementsPath.click('",this.name,"',",y,');">',z,'</a>');if(z=='body')break;v=v.getParent();}q().setHtml(w.join('')+m);});n.on('contentDomUnload',function(){q().setHtml(m);});n.addCommand('elementsPathFocus',l.toolbarFocus);}});})();a._.elementsPath={click:function(l,m){var n=a.instances[l];n.focus();var o=n._.elementsPath.list[m];n.getSelection().selectElement(o);return false;},keydown:function(l,m,n){var o=k.button._.instances[m],p=a.instances[l],q=p._.elementsPath.idBase,r;n=new d.event(n);switch(n.getKeystroke()){case 37:case 9:r=a.document.getById(q+(m+1));if(!r)r=a.document.getById(q+'0');r.focus();return false;case 39:case 2000+9:r=a.document.getById(q+(m-1));if(!r)r=a.document.getById(q+(p._.elementsPath.list.length-1));r.focus();return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m);return false;}return true;}};(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(s){var t=s.specialKeys;t[13]=o;t[2000+13]=n;}});var l,m=/^h[1-6]$/;function n(s){l=1;return o(s,s.config.shiftEnterMode);};function o(s,t){if(s.mode!='wysiwyg')return false;if(!t)t=s.config.enterMode;setTimeout(function(){s.fire('saveSnapshot');if(t==2||s.getSelection().getStartElement().hasAscendant('pre',true))q(s,t);else p(s,t);l=0;},0);return true;};function p(s,t,u){u=u||r(s);var v=u.document,w=t==3?'div':'p',x=u.splitBlock(w);if(!x)return;var y=x.previousBlock,z=x.nextBlock,A=x.wasStartOfBlock,B=x.wasEndOfBlock,C;
  3. if(z){C=z.getParent();if(C.is('li')){z.breakParent(C);z.move(z.getNext(),true);}}else if(y&&(C=y.getParent())&&(C.is('li'))){y.breakParent(C);u.moveToElementEditStart(y.getNext());y.move(y.getPrevious());}if(!A&&!B){if(z.is('li')&&(C=z.getFirst())&&(C.is&&C.is('ul','ol')))z.insertBefore(v.createText('xa0'),C);if(z)u.moveToElementEditStart(z);}else{if(A&&B&&y.is('li')){s.execCommand('outdent');return;}var D;if(y){if(!l&&!m.test(y.getName()))D=y.clone();}else if(z)D=z.clone();if(!D)D=v.createElement(w);var E=x.elementPath;if(E)for(var F=0,G=E.elements.length;F<G;F++){var H=E.elements[F];if(H.equals(E.block)||H.equals(E.blockLimit))break;if(f.$removeEmpty[H.getName()]){H=H.clone();D.moveChildren(H);D.append(H);}}if(!c)D.appendBogus();u.insertNode(D);if(c&&A&&(!B||!y.getChildCount())){u.moveToElementEditStart(B?y:D);u.select();}u.moveToElementEditStart(A&&!B?z:D);}if(!c)if(z){var I=v.createElement('span');I.setHtml('&nbsp;');u.insertNode(I);I.scrollIntoView();u.deleteContents();}else D.scrollIntoView();u.select();};function q(s,t){var u=r(s),v=u.document,w=t==3?'div':'p',x=u.checkEndOfBlock(),y=new d.elementPath(s.getSelection().getStartElement()),z=y.block,A=z&&y.block.getName(),B=false;if(!l&&A=='li'){p(s,t,u);return;}if(!l&&x&&m.test(A)){v.createElement('br').insertAfter(z);if(b.gecko)v.createText('').insertAfter(z);u.setStartAt(z.getNext(),c?3:1);}else{var C;B=A=='pre';if(B)C=v.createText(c?'r':'n');else C=v.createElement('br');u.deleteContents();u.insertNode(C);if(!c)v.createText('').insertAfter(C);if(x&&!c)C.getParent().appendBogus();if(!c)C.getNext().$.nodeValue='';if(c)u.setStartAt(C,4);else u.setStartAt(C.getNext(),1);if(!c){var D=null;if(!b.gecko){D=v.createElement('span');D.setHtml('&nbsp;');}else D=v.createElement('br');D.insertBefore(C.getNext());D.scrollIntoView();D.remove();}}u.collapse(true);u.select(B);};function r(s){var t=s.getSelection().getRanges();for(var u=t.length-1;u>0;u--)t[u].deleteContents();return t[0];};})();(function(){var l='nbsp,gt,lt,quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,Prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,lArr,uArr,rArr,dArr,hArr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,Dagger,permil,lsaquo,rsaquo,euro',m='Agrave,Aacute,Acirc,Atilde,Auml,Aring,AElig,Ccedil,Egrave,Eacute,Ecirc,Euml,Igrave,Iacute,Icirc,Iuml,ETH,Ntilde,Ograve,Oacute,Ocirc,Otilde,Ouml,Oslash,Ugrave,Uacute,Ucirc,Uuml,Yacute,THORN,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,OElig,oelig,Scaron,scaron,Yuml',n='Alpha,Beta,Gamma,Delta,Epsilon,Zeta,Eta,Theta,Iota,Kappa,Lambda,Mu,Nu,Xi,Omicron,Pi,Rho,Sigma,Tau,Upsilon,Phi,Chi,Psi,Omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';
  4. function o(p){var q={},r=[],s={nbsp:'xa0',shy:'­',gt:'>',lt:'<'};p=p.replace(/b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(x,y){q[s[y]]='&'+y+';';r.push(s[y]);return '';});p=p.split(',');var t=document.createElement('div'),u;t.innerHTML='&'+p.join(';&')+';';u=t.innerHTML;t=null;for(var v=0;v<u.length;v++){var w=u.charAt(v);q[w]='&'+p[v]+';';r.push(w);}q.regex=r.join('');return q;};j.add('entities',{afterInit:function(p){var q=p.config;if(!q.entities)return;var r=p.dataProcessor,s=r&&r.htmlFilter;if(s){var t=l;if(q.entities_latin)t+=','+m;if(q.entities_greek)t+=','+n;if(q.entities_additional)t+=','+q.entities_additional;var u=o(t),v='['+u.regex+']';delete u.regex;if(q.entities_processNumerical)v='[^ -~]|'+v;v=new RegExp(v,'g');function w(x){return u[x]||'&#'+x.charCodeAt(0)+';';};s.addRules({text:function(x){return x.replace(v,w);}});}}});})();i.entities=true;i.entities_latin=true;i.entities_greek=true;i.entities_processNumerical=false;i.entities_additional='#39';(function(){function l(u,v){var w=[];if(!v)return u;else for(var x in v)w.push(x+'='+encodeURIComponent(v[x]));return u+(u.indexOf('?')!=-1?'&':'?')+w.join('&');};function m(u){u+='';var v=u.charAt(0).toUpperCase();return v+u.substr(1);};function n(u){var B=this;var v=B.getDialog(),w=v.getParentEditor();w._.filebrowserSe=B;var x=w.config['filebrowser'+m(v.getName())+'WindowWidth']||w.config.filebrowserWindowWidth||'80%',y=w.config['filebrowser'+m(v.getName())+'WindowHeight']||w.config.filebrowserWindowHeight||'70%',z=B.filebrowser.params||{};z.CKEditor=w.name;z.CKEditorFuncNum=w._.filebrowserFn;if(!z.langCode)z.langCode=w.langCode;var A=l(B.filebrowser.url,z);w.popup(A,x,y);};function o(u){var x=this;var v=x.getDialog(),w=v.getParentEditor();w._.filebrowserSe=x;if(!v.getContentElement(x['for'][0],x['for'][1]).getInputElement().$.value)return false;if(!v.getContentElement(x['for'][0],x['for'][1]).getAction())return false;return true;};function p(u,v,w){var x=w.params||{};x.CKEditor=u.name;x.CKEditorFuncNum=u._.filebrowserFn;if(!x.langCode)x.langCode=u.langCode;v.action=l(w.url,x);v.filebrowser=w;};function q(u,v,w,x){var y,z;for(var A in x){y=x[A];if(y.type=='hbox'||y.type=='vbox')q(u,v,w,y.children);if(!y.filebrowser)continue;if(typeof y.filebrowser=='string'){var B={action:y.type=='fileButton'?'QuickUpload':'Browse',target:y.filebrowser};y.filebrowser=B;}if(y.filebrowser.action=='Browse'){var C=y.filebrowser.url||u.config['filebrowser'+m(v)+'BrowseUrl']||u.config.filebrowserBrowseUrl;if(C){y.onClick=n;
  5. y.filebrowser.url=C;y.hidden=false;}}else if(y.filebrowser.action=='QuickUpload'&&y['for']){C=y.filebrowser.url||u.config['filebrowser'+m(v)+'UploadUrl']||u.config.filebrowserUploadUrl;if(C){y.onClick=o;y.filebrowser.url=C;y.hidden=false;p(u,w.getContents(y['for'][0]).get(y['for'][1]),y.filebrowser);}}}};function r(u,v){var w=v.getDialog(),x=v.filebrowser.target||null;u=u.replace(/#/g,'%23');if(x){var y=x.split(':'),z=w.getContentElement(y[0],y[1]);if(z){z.setValue(u);w.selectPage(y[0]);}}};function s(u,v,w){if(w.indexOf(';')!==-1){var x=w.split(';');for(var y=0;y<x.length;y++)if(s(u,v,x[y]))return true;return false;}return u.getContents(v).get(w).filebrowser&&u.getContents(v).get(w).filebrowser.url;};function t(u,v){var z=this;var w=z._.filebrowserSe.getDialog(),x=z._.filebrowserSe['for'],y=z._.filebrowserSe.filebrowser.onSelect;if(x)w.getContentElement(x[0],x[1]).reset();if(y&&y.call(z._.filebrowserSe,u,v)===false)return;if(typeof v=='string'&&v)alert(v);if(u)r(u,z._.filebrowserSe);};j.add('filebrowser',{init:function(u,v){u._.filebrowserFn=e.addFunction(t,u);a.on('dialogDefinition',function(w){for(var x in w.data.definition.contents){q(w.editor,w.data.name,w.data.definition,w.data.definition.contents[x].elements);if(w.data.definition.contents[x].hidden&&w.data.definition.contents[x].filebrowser)w.data.definition.contents[x].hidden=!s(w.data.definition,w.data.definition.contents[x].id,w.data.definition.contents[x].filebrowser);}});}});})();j.add('find',{init:function(l){var m=j.find;l.ui.addButton('Find',{label:l.lang.findAndReplace.find,command:'find'});var n=l.addCommand('find',new a.dialogCommand('find'));n.canUndo=false;l.ui.addButton('Replace',{label:l.lang.findAndReplace.replace,command:'replace'});var o=l.addCommand('replace',new a.dialogCommand('replace'));o.canUndo=false;a.dialog.add('find',this.path+'dialogs/find.js');a.dialog.add('replace',this.path+'dialogs/find.js');},requires:['styles']});i.find_highlight={element:'span',styles:{'background-color':'#004',color:'#fff'}};(function(){var l=/.swf(?:$|?)/i,m=/^d+(?:.d+)?$/;function n(q){if(m.test(q))return q+'px';return q;};function o(q){var r=q.attributes;return r.type=='application/x-shockwave-flash'||l.test(r.src||'');};function p(q,r){var s=q.createFakeParserElement(r,'cke_flash','flash',true),t=s.attributes.style||'',u=r.attributes.width,v=r.attributes.height;if(typeof u!='undefined')t=s.attributes.style=t+'width:'+n(u)+';';if(typeof v!='undefined')t=s.attributes.style=t+'height:'+n(v)+';';
  6. return s;};j.add('flash',{init:function(q){q.addCommand('flash',new a.dialogCommand('flash'));q.ui.addButton('Flash',{label:q.lang.common.flash,command:'flash'});a.dialog.add('flash',this.path+'dialogs/flash.js');q.addCss('img.cke_flash{background-image: url('+a.getUrl(this.path+'images/placeholder.png')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 80px;'+'height: 80px;'+'}');if(q.addMenuItems)q.addMenuItems({flash:{label:q.lang.flash.properties,command:'flash',group:'flash'}});if(q.contextMenu)q.contextMenu.addListener(function(r,s){if(r&&r.is('img')&&r.getAttribute('_cke_real_element_type')=='flash')return{flash:2};});},afterInit:function(q){var r=q.dataProcessor,s=r&&r.dataFilter;if(s)s.addRules({elements:{'cke:object':function(t){var u=t.attributes,v=u.classid&&String(u.classid).toLowerCase();if(!v){for(var w=0;w<t.children.length;w++)if(t.children[w].name=='embed'){if(!o(t.children[w]))return null;return p(q,t);}return null;}return p(q,t);},'cke:embed':function(t){if(!o(t))return null;return p(q,t);}}},5);},requires:['fakeobjects']});})();e.extend(i,{flashEmbedTagOnly:false,flashAddEmbedTag:true,flashConvertOnEdit:false});(function(){function l(m,n,o,p,q,r,s){var t=m.config,u=q.split(';'),v=[],w={};for(var x=0;x<u.length;x++){var y={},z=u[x].split('/'),A=u[x]=z[0];y[o]=v[x]=z[1]||A;w[A]=new a.style(s,y);}m.ui.addRichCombo(n,{label:p.label,title:p.panelTitle,voiceLabel:p.voiceLabel,className:'cke_'+(o=='size'?'fontSize':'font'),multiSelect:false,panel:{css:[t.contentsCss,a.getUrl(m.skinPath+'editor.css')],voiceLabel:p.panelVoiceLabel},init:function(){this.startGroup(p.panelTitle);for(var B=0;B<u.length;B++){var C=u[B];this.add(C,'<span style="font-'+o+':'+v[B]+'">'+C+'</span>',C);}},onClick:function(B){m.focus();m.fire('saveSnapshot');var C=w[B];if(this.getValue()==B)C.remove(m.document);else C.apply(m.document);m.fire('saveSnapshot');},onRender:function(){m.on('selectionChange',function(B){var C=this.getValue(),D=B.data.path,E=D.elements;for(var F=0,G;F<E.length;F++){G=E[F];for(var H in w)if(w[H].checkElementRemovable(G,true)){if(H!=C)this.setValue(H);return;}}this.setValue('',r);},this);}});};j.add('font',{requires:['richcombo','styles'],init:function(m){var n=m.config;l(m,'Font','family',m.lang.font,n.font_names,n.font_defaultLabel,n.font_style);l(m,'FontSize','size',m.lang.fontSize,n.fontSize_sizes,n.fontSize_defaultLabel,n.fontSize_style);}});})();i.font_names='Arial/Arial, Helvetica, sans-serif;Comic Sans MS/Comic Sans MS, cursive;Courier New/Courier New, Courier, monospace;Georgia/Georgia, serif;Lucida Sans Unicode/Lucida Sans Unicode, Lucida Grande, sans-serif;Tahoma/Tahoma, Geneva, sans-serif;Times New Roman/Times New Roman, Times, serif;Trebuchet MS/Trebuchet MS, Helvetica, sans-serif;Verdana/Verdana, Geneva, sans-serif';
  7. i.font_defaultLabel='';i.font_style={element:'span',styles:{'font-family':'#(family)'},overrides:[{element:'font',attributes:{face:null}}]};i.fontSize_sizes='8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';i.fontSize_defaultLabel='';i.fontSize_style={element:'span',styles:{'font-size':'#(size)'},overrides:[{element:'font',attributes:{size:null}}]};j.add('format',{requires:['richcombo','styles'],init:function(l){var m=l.config,n=l.lang.format,o=m.format_tags.split(';'),p={};for(var q=0;q<o.length;q++){var r=o[q];p[r]=new a.style(m['format_'+r]);}l.ui.addRichCombo('Format',{label:n.label,title:n.panelTitle,voiceLabel:n.voiceLabel,className:'cke_format',multiSelect:false,panel:{css:[m.contentsCss,a.getUrl(l.skinPath+'editor.css')],voiceLabel:n.panelVoiceLabel},init:function(){this.startGroup(n.panelTitle);for(var s in p){var t=n['tag_'+s];this.add(s,'<'+s+'>'+t+'</'+s+'>',t);}},onClick:function(s){l.focus();l.fire('saveSnapshot');p[s].apply(l.document);l.fire('saveSnapshot');},onRender:function(){l.on('selectionChange',function(s){var t=this.getValue(),u=s.data.path;for(var v in p)if(p[v].checkActive(u)){if(v!=t)this.setValue(v,l.lang.format['tag_'+v]);return;}this.setValue('');},this);}});}});i.format_tags='p;h1;h2;h3;h4;h5;h6;pre;address;div';i.format_p={element:'p'};i.format_div={element:'div'};i.format_pre={element:'pre'};i.format_address={element:'address'};i.format_h1={element:'h1'};i.format_h2={element:'h2'};i.format_h3={element:'h3'};i.format_h4={element:'h4'};i.format_h5={element:'h5'};i.format_h6={element:'h6'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}});
  8. if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form'))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName();if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2};if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[trn ]*(?:&nbsp;|xa0)$/,m='{cke_protected}';function n(L,M){var N=L.children,O=N[N.length-1];if(O){if((M||!c)&&(O.type==1&&O.name=='br'))N.pop();if(O.type==3&&l.test(O.value))N.pop();}};function o(L){if(L.children.length<1)return true;var M=L.children[L.children.length-1];return M.type==1&&M.name=='br';};function p(L){n(L,true);if(o(L))if(c)L.add(new a.htmlParser.text('xa0'));else L.add(new a.htmlParser.element('br',{}));};function q(L){n(L);if(o(L))L.add(new a.htmlParser.text('xa0'));};var r=f,s=e.extend({},r.$block,r.$listItem,r.$tableContent);for(var t in s)if(!('br' in r[t]))delete s[t];delete s.pre;var u={attributeNames:[[/^on/,'_cke_pa_on']]},v={elements:{}};for(t in s)v.elements[t]=p;var w={elementNames:[[/^cke:/,''],[/^?xml:namespace$/,'']],attributeNames:[[/^_cke_(saved|pa)_/,''],[/^_cke.*/,'']],elements:{$:function(L){var M=L.attributes;if(M){var N=['name','href','src'],O;for(var P=0;P<N.length;P++){O='_cke_saved_'+N[P];O in M&&delete M[N[P]];}}},embed:function(L){var M=L.parent;if(M&&M.name=='object'){var N=M.attributes.width,O=M.attributes.height;N&&(L.attributes.width=N);O&&(L.attributes.height=O);}},param:function(L){L.children=[];L.isEmpty=true;return L;},a:function(L){if(!(L.children.length||L.attributes.name||L.attributes._cke_saved_name))return false;}},attributes:{'class':function(L,M){return e.ltrim(L.replace(/(?:^|s+)cke_[^s]*/g,''))||false;
  9. }},comment:function(L){if(L.substr(0,m.length)==m)return new a.htmlParser.cdata(decodeURIComponent(L.substr(m.length)));return L;}},x={elements:{}};for(t in s)x.elements[t]=q;if(c)w.attributes.style=function(L,M){return L.toLowerCase();};var y=/<(?:a|area|img|input).*?s((?:href|src|name)s*=s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))/gi;function z(L){return L.replace(y,'$& _cke_saved_$1');};var A=/<(style)(?=[ >])[^>]*>[^<]*</1>/gi,B=/<cke:encoded>([^<]*)</cke:encoded>/gi,C=/(</?)((?:object|embed|param).*?>)/gi,D=/<cke:param(.*?)/>/gi;function E(L){return '<cke:encoded>'+encodeURIComponent(L)+'</cke:encoded>';};function F(L){return L.replace(A,E);};function G(L){return L.replace(C,'$1cke:$2');};function H(L){return L.replace(D,'<cke:param$1></cke:param>');};function I(L,M){return decodeURIComponent(M);};function J(L){return L.replace(B,I);};function K(L,M){var N=[],O=/<!--{cke_temp}(d*?)-->/g,P=[/<!--[sS]*?-->/g,/<script[sS]*?</script>/gi,/<noscript[sS]*?</noscript>/gi].concat(M);for(var Q=0;Q<P.length;Q++)L=L.replace(P[Q],function(R){R=R.replace(O,function(S,T){return N[T];});return '<!--{cke_temp}'+(N.push(R)-1)+'-->';});L=L.replace(O,function(R,S){return '<!--'+m+encodeURIComponent(N[S]).replace(/--/g,'%2D%2D')+'-->';});return L;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(L){var M=L.dataProcessor=new a.htmlDataProcessor(L);M.writer.forceSimpleAmpersand=L.config.forceSimpleAmpersand;M.dataFilter.addRules(u);M.dataFilter.addRules(v);M.htmlFilter.addRules(w);M.htmlFilter.addRules(x);}});a.htmlDataProcessor=function(L){var M=this;M.editor=L;M.writer=new a.htmlWriter();M.dataFilter=new a.htmlParser.filter();M.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(L,M){L=K(L,this.editor.config.protectedSource);L=z(L);if(c)L=F(L);L=G(L);L=H(L);var N=document.createElement('div');N.innerHTML='a'+L;L=N.innerHTML.substr(1);if(c)L=J(L);var O=a.htmlParser.fragment.fromHtml(L,M),P=new a.htmlParser.basicWriter();O.writeHtml(P,this.dataFilter);return P.getHtml(true);},toDataFormat:function(L,M){var N=this.writer,O=a.htmlParser.fragment.fromHtml(L,M);N.reset();O.writeHtml(N,this.htmlFilter);return N.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});
  10. if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement'))return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1};function m(r,s){r.getCommand(this.name).setState(s);};function n(r){var C=this;var s=r.data.path.elements,t,u,v=r.editor;for(var w=0;w<s.length;w++){if(s[w].getName()=='li'){u=s[w];continue;}if(l[s[w].getName()]){t=s[w];break;}}if(t)if(C.name=='outdent')return m.call(C,v,2);else{while(u&&(u=u.getPrevious(d.walker.whitespaces(true))))if(u.getName&&u.getName()=='li')return m.call(C,v,2);return m.call(C,v,0);}if(!C.useIndentClasses&&C.name=='indent')return m.call(C,v,2);var x=r.data.path,y=x.block||x.blockLimit;if(!y)return m.call(C,v,0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==v.config.indentClasses.length)return m.call(C,v,0);return m.call(C,v,2);}else{var B=parseInt(y.getStyle(C.indentCssProperty),10);if(isNaN(B))B=0;if(B<=0)return m.call(C,v,0);return m.call(C,v,2);}};function o(r,s,t){var u=s.startContainer,v=s.endContainer;while(u&&!u.getParent().equals(t))u=u.getParent();while(v&&!v.getParent().equals(t))v=v.getParent();if(!u||!v)return;var w=u,x=[],y=false;while(!y){if(w.equals(v))y=true;x.push(w);w=w.getNext();}if(x.length<1)return;var z=t.getParents(true);for(var A=0;A<z.length;A++)if(z[A].getName&&l[z[A].getName()]){t=z[A];break;}var B=this.name=='indent'?1:-1,C=x[0],D=x[x.length-1],E={},F=j.list.listToArray(t,E),G=F[D.getCustomData('listarray_index')].indent;for(A=C.getCustomData('listarray_index');A<=D.getCustomData('listarray_index');A++)F[A].indent+=B;for(A=D.getCustomData('listarray_index')+1;A<F.length&&F[A].indent>G;A++)F[A].indent+=B;var H=j.list.arrayToList(F,E,null,r.config.enterMode,0);if(this.name=='outdent'){var I;if((I=t.getParent())&&(I.is('li'))){var J=H.listNode.getChildren(),K=[],L=J.count(),M;for(A=L-1;A>=0;A--)if((M=J.getItem(A))&&(M.is&&M.is('li')))K.push(M);}}if(H)H.listNode.replace(t);if(K&&K.length)for(A=0;A<K.length;A++){var N=K[A],O=N;while((O=O.getNext())&&(O.is&&O.getName() in l))N.append(O);N.insertAfter(I);}h.clearAllMarkers(E);};function p(r,s){var A=this;var t=s.createIterator(),u=r.config.enterMode;t.enforceRealBlocks=true;t.enlargeBr=u!=2;var v;while(v=t.getNextParagraph())if(A.useIndentClasses){var w=v.$.className.match(A.classNameRegex),x=0;if(w){w=w[1];x=A.indentClassMap[w];}if(A.name=='outdent')x--;
  11. elsex++;x=Math.min(x,r.config.indentClasses.length);x=Math.max(x,0);var y=e.ltrim(v.$.className.replace(A.classNameRegex,''));if(x<1)v.$.className=y;else v.addClass(r.config.indentClasses[x-1]);}else{var z=parseInt(v.getStyle(A.indentCssProperty),10);if(isNaN(z))z=0;z+=(A.name=='indent'?1:-1)*(r.config.indentOffset);z=Math.max(z,0);z=Math.ceil(z/r.config.indentOffset)*r.config.indentOffset;v.setStyle(A.indentCssProperty,z?z+r.config.indentUnit:'');if(v.getAttribute('style')==='')v.removeAttribute('style');}};function q(r,s){var u=this;u.name=s;u.useIndentClasses=r.config.indentClasses&&r.config.indentClasses.length>0;if(u.useIndentClasses){u.classNameRegex=new RegExp('(?:^|\s+)('+r.config.indentClasses.join('|')+')(?=$|\s)');u.indentClassMap={};for(var t=0;t<r.config.indentClasses.length;t++)u.indentClassMap[r.config.indentClasses[t]]=t+1;}else u.indentCssProperty=r.config.contentsLangDirection=='ltr'?'margin-left':'margin-right';};q.prototype={exec:function(r){var s=r.getSelection(),t=s&&s.getRanges()[0];if(!s||!t)return;var u=s.createBookmarks(true),v=t.getCommonAncestor();while(v&&!(v.type==1&&l[v.getName()]))v=v.getParent();if(v)o.call(this,r,t,v);else p.call(this,r,t);r.focus();r.forceNextSelectionCheck();s.selectBookmarks(u);}};j.add('indent',{init:function(r){var s=new q(r,'indent'),t=new q(r,'outdent');r.addCommand('indent',s);r.addCommand('outdent',t);r.ui.addButton('Indent',{label:r.lang.indent,command:'indent'});r.ui.addButton('Outdent',{label:r.lang.outdent,command:'outdent'});r.on('selectionChange',e.bind(n,s));r.on('selectionChange',e.bind(n,t));},requires:['domiterator','list']});})();e.extend(i,{indentOffset:40,indentUnit:'px',indentClasses:null});(function(){var l=/(-moz-|-webkit-|start|auto)/i;function m(p,q){var r=q.block||q.blockLimit;if(!r||r.getName()=='body')return 2;var s=r.getComputedStyle('text-align').replace(l,'');if(!s&&this.isDefaultAlign||s==this.value)return 1;return 2;};function n(p){var q=p.editor.getCommand(this.name);q.state=m.call(this,p.editor,p.data.path);q.fire('state');};function o(p,q,r){var u=this;u.name=q;u.value=r;var s=p.config.contentsLangDirection;u.isDefaultAlign=r=='left'&&s=='ltr'||r=='right'&&s=='rtl';var t=p.config.justifyClasses;if(t){switch(r){case 'left':u.cssClassName=t[0];break;case 'center':u.cssClassName=t[1];break;case 'right':u.cssClassName=t[2];break;case 'justify':u.cssClassName=t[3];break;}u.cssClassRegex=new RegExp('(?:^|\s+)(?:'+t.join('|')+')(?=$|\s)');}};o.prototype={exec:function(p){var y=this;
  12. var q=p.getSelection();if(!q)return;var r=q.createBookmarks(),s=q.getRanges(),t=y.cssClassName,u,v;for(var w=s.length-1;w>=0;w--){u=s[w].createIterator();while(v=u.getNextParagraph()){v.removeAttribute('align');if(t){var x=v.$.className=e.ltrim(v.$.className.replace(y.cssClassRegex,''));if(y.state==2&&!y.isDefaultAlign)v.addClass(t);else if(!x)v.removeAttribute('class');}else if(y.state==2&&!y.isDefaultAlign)v.setStyle('text-align',y.value);else v.removeStyle('text-align');}}p.focus();p.forceNextSelectionCheck();q.selectBookmarks(r);}};j.add('justify',{init:function(p){var q=new o(p,'justifyleft','left'),r=new o(p,'justifycenter','center'),s=new o(p,'justifyright','right'),t=new o(p,'justifyblock','justify');p.addCommand('justifyleft',q);p.addCommand('justifycenter',r);p.addCommand('justifyright',s);p.addCommand('justifyblock',t);p.ui.addButton('JustifyLeft',{label:p.lang.justify.left,command:'justifyleft'});p.ui.addButton('JustifyCenter',{label:p.lang.justify.center,command:'justifycenter'});p.ui.addButton('JustifyRight',{label:p.lang.justify.right,command:'justifyright'});p.ui.addButton('JustifyBlock',{label:p.lang.justify.block,command:'justifyblock'});p.on('selectionChange',e.bind(n,q));p.on('selectionChange',e.bind(n,s));p.on('selectionChange',e.bind(n,r));p.on('selectionChange',e.bind(n,t));},requires:['domiterator']});})();e.extend(i,{justifyClasses:null});j.add('keystrokes',{beforeInit:function(l){l.keystrokeHandler=new a.keystrokeHandler(l);l.specialKeys={};},init:function(l){var m=l.config.keystrokes,n=l.config.blockedKeystrokes,o=l.keystrokeHandler.keystrokes,p=l.keystrokeHandler.blockedKeystrokes;for(var q=0;q<m.length;q++)o[m[q][0]]=m[q][1];for(q=0;q<n.length;q++)p[n[q]]=1;}});a.keystrokeHandler=function(l){var m=this;if(l.keystrokeHandler)return l.keystrokeHandler;m.keystrokes={};m.blockedKeystrokes={};m._={editor:l};return m;};(function(){var l,m=function(o){o=o.data;var p=o.getKeystroke(),q=this.keystrokes[p],r=this._.editor;l=r.fire('key',{keyCode:p})===true;if(!l){if(q){var s={from:'keystrokeHandler'};l=r.execCommand(q,s)!==false;}if(!l){var t=r.specialKeys[p];l=t&&t(r)===true;if(!l)l=!!this.blockedKeystrokes[p];}}if(l)o.preventDefault(true);return!l;},n=function(o){if(l){l=false;o.data.preventDefault(true);}};a.keystrokeHandler.prototype={attach:function(o){o.on('keydown',m,this);if(b.opera||b.gecko&&b.mac)o.on('keypress',n,this);}};})();i.blockedKeystrokes=[1000+66,1000+73,1000+85];i.keystrokes=[[4000+121,'toolbarFocus'],[4000+122,'elementsPathFocus'],[2000+121,'contextMenu'],[1000+90,'undo'],[1000+89,'redo'],[1000+2000+90,'redo'],[1000+76,'link'],[1000+66,'bold'],[1000+73,'italic'],[1000+85,'underline'],[4000+109,'toolbarCollapse']];
  13. j.add('link',{init:function(l){l.addCommand('link',new a.dialogCommand('link'));l.addCommand('anchor',new a.dialogCommand('anchor'));l.addCommand('unlink',new a.unlinkCommand());l.ui.addButton('Link',{label:l.lang.link.toolbar,command:'link'});l.ui.addButton('Unlink',{label:l.lang.unlink,command:'unlink'});l.ui.addButton('Anchor',{label:l.lang.anchor.toolbar,command:'anchor'});a.dialog.add('link',this.path+'dialogs/link.js');a.dialog.add('anchor',this.path+'dialogs/anchor.js');l.addCss('img.cke_anchor{background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'width: 18px;'+'height: 18px;'+'}n'+'a.cke_anchor'+'{'+'background-image: url('+a.getUrl(this.path+'images/anchor.gif')+');'+'background-position: 0 center;'+'background-repeat: no-repeat;'+'border: 1px solid #a9a9a9;'+'padding-left: 18px;'+'}');l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m)return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=m.getAscendant('a',true)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q;for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);}};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[nrt ]*$/;j.list={listToArray:function(t,u,v,w,x){if(!l[t.getName()])return[];if(!w)w=0;if(!v)v=[];for(var y=0,z=t.getChildCount();y<z;y++){var A=t.getChild(y);if(A.$.nodeName.toLowerCase()!='li')continue;
  14. var B={parent:t,indent:w,contents:[]};if(!x){B.grandparent=t.getParent();if(B.grandparent&&B.grandparent.$.nodeName.toLowerCase()=='li')B.grandparent=B.grandparent.getParent();}else B.grandparent=x;if(u)h.setMarker(u,A,'listarray_index',v.length);v.push(B);for(var C=0,D=A.getChildCount();C<D;C++){var E=A.getChild(C);if(E.type==1&&l[E.getName()])j.list.listToArray(E,u,v,w+1,B.grandparent);else B.contents.push(E);}}return v;},arrayToList:function(t,u,v,w){if(!v)v=0;if(!t||t.length<v+1)return null;var x=t[v].parent.getDocument(),y=new d.documentFragment(x),z=null,A=v,B=Math.max(t[v].indent,0),C=null,D=w==1?'p':'div';for(;;){var E=t[A];if(E.indent==B){if(!z||t[A].parent.getName()!=z.getName()){z=t[A].parent.clone(false,true);y.append(z);}C=z.append(x.createElement('li'));for(var F=0;F<E.contents.length;F++)C.append(E.contents[F].clone(true,true));A++;}else if(E.indent==Math.max(B,0)+1){var G=j.list.arrayToList(t,null,A,w);C.append(G.listNode);A=G.nextIndex;}else if(E.indent==-1&&!v&&E.grandparent){C;if(l[E.grandparent.getName()])C=x.createElement('li');else if(w!=2&&E.grandparent.getName()!='td')C=x.createElement(D);else C=new d.documentFragment(x);for(F=0;F<E.contents.length;F++)C.append(E.contents[F].clone(true,true));if(C.type==11&&A!=t.length-1){if(C.getLast()&&C.getLast().type==1&&C.getLast().getAttribute('type')=='_moz')C.getLast().remove();C.appendBogus();}if(C.type==1&&C.getName()==D&&C.$.firstChild){C.trim();var H=C.getFirst();if(H.type==1&&H.isBlockBoundary()){var I=new d.documentFragment(x);C.moveChildren(I);C=I;}}var J=C.$.nodeName.toLowerCase();if(!c&&(J=='div'||J=='p'))C.appendBogus();y.append(C);z=null;A++;}else return null;if(t.length<=A||Math.max(t[A].indent,0)<B)break;}if(u){var K=y.getFirst();while(K){if(K.type==1)h.clearMarkers(u,K);K=K.getNextSourceNode();}}return{listNode:y,nextIndex:A};}};function n(t,u){t.getCommand(this.name).setState(u);};function o(t){var u=t.data.path,v=u.blockLimit,w=u.elements,x;for(var y=0;y<w.length&&(x=w[y])&&(!x.equals(v));y++)if(l[w[y].getName()])return n.call(this,t.editor,this.type==w[y].getName()?1:2);return n.call(this,t.editor,2);};function p(t,u,v,w){var x=j.list.listToArray(u.root,v),y=[];for(var z=0;z<u.contents.length;z++){var A=u.contents[z];A=A.getAscendant('li',true);if(!A||A.getCustomData('list_item_processed'))continue;y.push(A);h.setMarker(v,A,'list_item_processed',true);}var B=u.root.getDocument().createElement(this.type);for(z=0;z<y.length;z++){var C=y[z].getCustomData('listarray_index');x[C].parent=B;
  15. }var D=j.list.arrayToList(x,v,null,t.config.enterMode),E,F=D.listNode.getChildCount();for(z=0;z<F&&(E=D.listNode.getChild(z));z++)if(E.getName()==this.type)w.push(E);D.listNode.replace(u.root);};function q(t,u,v){var w=u.contents,x=u.root.getDocument(),y=[];if(w.length==1&&w[0].equals(u.root)){var z=x.createElement('div');w[0].moveChildren&&w[0].moveChildren(z);w[0].append(z);w[0]=z;}var A=u.contents[0].getParent();for(var B=0;B<w.length;B++)A=A.getCommonAncestor(w[B].getParent());for(B=0;B<w.length;B++){var C=w[B],D;while(D=C.getParent()){if(D.equals(A)){y.push(C);break;}C=D;}}if(y.length<1)return;var E=y[y.length-1].getNext(),F=x.createElement(this.type);v.push(F);while(y.length){var G=y.shift(),H=x.createElement('li');G.moveChildren(H);G.remove();H.appendTo(F);if(!c)H.appendBogus();}if(E)F.insertBefore(E);else F.appendTo(A);};function r(t,u,v){var w=j.list.listToArray(u.root,v),x=[];for(var y=0;y<u.contents.length;y++){var z=u.contents[y];z=z.getAscendant('li',true);if(!z||z.getCustomData('list_item_processed'))continue;x.push(z);h.setMarker(v,z,'list_item_processed',true);}var A=null;for(y=0;y<x.length;y++){var B=x[y].getCustomData('listarray_index');w[B].indent=-1;A=B;}for(y=A+1;y<w.length;y++)if(w[y].indent>w[y-1].indent+1){var C=w[y-1].indent+1-w[y].indent,D=w[y].indent;while(w[y]&&w[y].indent>=D){w[y].indent+=C;y++;}y--;}var E=j.list.arrayToList(w,v,null,t.config.enterMode),F=E.listNode,G,H;function I(K){if((G=F[K?'getFirst':'getLast']())&&(!(G.is&&G.isBlockBoundary())&&(H=u.root[K?'getPrevious':'getNext'](d.walker.whitespaces(true)))&&(!(H.is&&H.isBlockBoundary({br:1})))))t.document.createElement('br')[K?'insertBefore':'insertAfter'](G);};I(true);I();var J=u.root.getParent();F.replace(u.root);};function s(t,u){this.name=t;this.type=u;};s.prototype={exec:function(t){t.focus();var u=t.document,v=t.getSelection(),w=v&&v.getRanges();if(!w||w.length<1)return;if(this.state==2){var x=u.getBody();x.trim();if(!x.getFirst()){var y=u.createElement(t.config.enterMode==1?'p':t.config.enterMode==3?'div':'br');y.appendTo(x);w=[new d.range(u)];if(y.is('br')){w[0].setStartBefore(y);w[0].setEndAfter(y);}else w[0].selectNodeContents(y);v.selectRanges(w);}else{var z=w.length==1&&w[0],A=z&&z.getEnclosedNode();if(A&&A.is&&this.type==A.getName())n.call(this,t,1);}}var B=v.createBookmarks(true),C=[],D={};while(w.length>0){z=w.shift();var E=z.getBoundaryNodes(),F=E.startNode,G=E.endNode;if(F.type==1&&F.getName()=='td')z.setStartAt(E.startNode,1);if(G.type==1&&G.getName()=='td')z.setEndAt(E.endNode,2);
  16. var H=z.createIterator(),I;H.forceBrBreak=this.state==2;while(I=H.getNextParagraph()){var J=new d.elementPath(I),K=null,L=false,M=J.blockLimit,N;for(var O=0;O<J.elements.length&&(N=J.elements[O])&&(!N.equals(M));O++)if(l[N.getName()]){M.removeCustomData('list_group_object');var P=N.getCustomData('list_group_object');if(P)P.contents.push(I);else{P={root:N,contents:[I]};C.push(P);h.setMarker(D,N,'list_group_object',P);}L=true;break;}if(L)continue;var Q=M;if(Q.getCustomData('list_group_object'))Q.getCustomData('list_group_object').contents.push(I);else{P={root:Q,contents:[I]};h.setMarker(D,Q,'list_group_object',P);C.push(P);}}}var R=[];while(C.length>0){P=C.shift();if(this.state==2){if(l[P.root.getName()])p.call(this,t,P,D,R);else q.call(this,t,P,R);}else if(this.state==1&&l[P.root.getName()])r.call(this,t,P,D);}for(O=0;O<R.length;O++){K=R[O];var S,T=this;(S=function(U){var V=K[U?'getPrevious':'getNext'](d.walker.whitespaces(true));if(V&&V.getName&&V.getName()==T.type){V.remove();V.moveChildren(K,U?true:false);}})();S(true);}h.clearAllMarkers(D);v.selectBookmarks(B);t.focus();}};j.add('list',{init:function(t){var u=new s('numberedlist','ol'),v=new s('bulletedlist','ul');t.addCommand('numberedlist',u);t.addCommand('bulletedlist',v);t.ui.addButton('NumberedList',{label:t.lang.numberedlist,command:'numberedlist'});t.ui.addButton('BulletedList',{label:t.lang.bulletedlist,command:'bulletedlist'});t.on('selectionChange',e.bind(o,u));t.on('selectionChange',e.bind(o,v));},requires:['domiterator']});})();(function(){function l(q){if(!q||q.type!=1||q.getName()!='form')return[];var r=[],s=['style','className'];for(var t=0;t<s.length;t++){var u=s[t],v=q.$.elements.namedItem(u);if(v){var w=new h(v);r.push([w,w.nextSibling]);w.remove();}}return r;};function m(q,r){if(!q||q.type!=1||q.getName()!='form')return;if(r.length>0)for(var s=r.length-1;s>=0;s--){var t=r[s][0],u=r[s][1];if(u)t.insertBefore(u);else t.appendTo(q);}};function n(q,r){var s=l(q),t={},u=q.$;if(!r){t['class']=u.className||'';u.className='';}t.inline=u.style.cssText||'';if(!r)u.style.cssText='position: static; overflow: visible';m(s);return t;};function o(q,r){var s=l(q),t=q.$;if('class' in r)t.className=r['class'];if('inline' in r)t.style.cssText=r.inline;m(s);};function p(q,r){return function(){var s=q.getViewPaneSize();r.resize(s.width,s.height,null,true);};};j.add('maximize',{init:function(q){var r=q.lang,s=a.document,t=s.getWindow(),u,v,w,x=p(t,q),y=2;q.addCommand('maximize',{modes:{wysiwyg:1,source:1},exec:function(){var I=this;
  17. var z=q.container.getChild([0,0]),A=q.getThemeSpace('contents');if(q.mode=='wysiwyg'){u=q.getSelection().getRanges();v=t.getScrollPosition();}else{var B=q.textarea.$;u=!c&&[B.selectionStart,B.selectionEnd];v=[B.scrollLeft,B.scrollTop];}if(I.state==2){t.on('resize',x);w=t.getScrollPosition();var C=q.container;while(C=C.getParent()){C.setCustomData('maximize_saved_styles',n(C));C.setStyle('z-index',q.config.baseFloatZIndex-1);}A.setCustomData('maximize_saved_styles',n(A,true));z.setCustomData('maximize_saved_styles',n(z,true));if(c)s.$.documentElement.style.overflow=s.getBody().$.style.overflow='hidden';else s.getBody().setStyles({overflow:'hidden',width:'0px',height:'0px'});t.$.scrollTo(0,0);var D=t.getViewPaneSize();z.setStyle('position','absolute');z.$.offsetLeft;z.setStyles({'z-index':q.config.baseFloatZIndex-1,left:'0px',top:'0px'});q.resize(D.width,D.height,null,true);var E=z.getDocumentPosition();z.setStyles({left:-1*E.x+'px',top:-1*E.y+'px'});z.addClass('cke_maximized');}else if(I.state==1){t.removeListener('resize',x);var F=[A,z];for(var G=0;G<F.length;G++){o(F[G],F[G].getCustomData('maximize_saved_styles'));F[G].removeCustomData('maximize_saved_styles');}C=q.container;while(C=C.getParent()){o(C,C.getCustomData('maximize_saved_styles'));C.removeCustomData('maximize_saved_styles');}t.$.scrollTo(w.x,w.y);z.removeClass('cke_maximized');q.fire('resize');}I.toggleState();if(q.mode=='wysiwyg'){q.getSelection().selectRanges(u);var H=q.getSelection().getStartElement();if(H)H.scrollIntoView(true);else t.$.scrollTo(v.x,v.y);}else{if(u){B.selectionStart=u[0];B.selectionEnd=u[1];}B.scrollLeft=v[0];B.scrollTop=v[1];}u=v=null;y=I.state;},canUndo:false});q.ui.addButton('Maximize',{label:r.maximize,command:'maximize'});q.on('mode',function(){q.getCommand('maximize').setState(y);},null,null,100);}});})();j.add('newpage',{init:function(l){l.addCommand('newpage',{modes:{wysiwyg:1,source:1},exec:function(m){var n=this;function o(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},500);};if(m.mode=='wysiwyg')m.on('contentDom',function(p){p.removeListener();o();});m.setData(m.config.newpage_html);m.focus();if(m.mode=='source')o();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'}');
  18. },afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes.style,q=p&&o.children.length==1&&o.children[0],r=q&&q.name=='span'&&q.attributes.style;if(r&&/page-break-afters*:s*always/i.test(p)&&/displays*:s*none/i.test(r))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);}}};j.add('pastefromword',{init:function(l){l.addCommand('pastefromword',new a.dialogCommand('pastefromword'));l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});a.dialog.add('pastefromword',this.path+'dialogs/pastefromword.js');}});i.pasteFromWordIgnoreFontFace=true;i.pasteFromWordRemoveStyle=false;i.pasteFromWordKeepsStructure=false;(function(){var l={exec:function(n){if(a.getClipboardData()===false||!window.clipboardData){n.openDialog('pastetext');return;}n.insertText(window.clipboardData.getData('Text'));}};j.add('pastetext',{init:function(n){var o='pastetext',p=n.addCommand(o,l);n.ui.addButton('PasteText',{label:n.lang.pasteText.button,command:o});a.dialog.add(o,a.getUrl(this.path+'dialogs/pastetext.js'));if(n.config.forcePasteAsPlainText)n.on('beforePaste',function(q){if(n.mode=='wysiwyg'){setTimeout(function(){p.exec();},0);q.cancel();}},null,null,20);},requires:['clipboard']});var m;a.getClipboardData=function(){if(!c)return false;var n=a.document,o=n.getBody();if(!m){m=n.createElement('div',{attributes:{id:'cke_hiddenDiv'},styles:{position:'absolute',visibility:'hidden',overflow:'hidden',width:'1px',height:'1px'}});m.setHtml('');m.appendTo(o);}var p=false,q=function(){p=true;};o.on('paste',q);var r=o.$.createTextRange();r.moveToElementText(m.$);r.execCommand('Paste');var s=m.getHtml();m.setHtml('');o.removeListener('paste',q);return p&&s;};})();a.editor.prototype.insertText=function(l){l=e.htmlEncode(l);l=l.replace(/(?:rn)|n|r/g,'<br>');this.insertHtml(l);};i.forcePasteAsPlainText=false;j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);
  19. if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/(2),10),p=parseInt((window.screen.width-m)/(2),10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=c&&document.domain!=window.location.hostname;if(n.config.fullPage)o=n.getData();else{var q='<body ',r=a.document.getBody(),s=n.config.baseHref.length>0?'<base href="'+n.config.baseHref+'" _cktemp="true"></base>':'';if(r.getAttribute('id'))q+='id="'+r.getAttribute('id')+'" ';if(r.getAttribute('class'))q+='class="'+r.getAttribute('class')+'" ';q+='>';o=n.config.docType+'<html dir="'+n.config.contentsLangDirection+'">'+'<head>'+s+'<title>'+n.lang.preview+'</title>'+'<link href="'+n.config.contentsCss+'" type="text/css" rel="stylesheet" _cktemp="true"/>'+'</head>'+q+n.getData()+'</body></html>';}var t=640,u=420,v=80;try{var w=window.screen;t=Math.round(w.width*0.8);u=Math.round(w.height*0.7);v=Math.round(w.width*0.1);}catch(z){}var x='';if(p){window._cke_htmlToLoad=o;x='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var y=window.open(x,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+t+',height='+u+',left='+v);if(!p){y.document.write(o);y.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=l.getSelection().getRanges();
  20. for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createBookmark(),s=r.startNode,t=r.endNode,u=function(x){var y=new d.elementPath(x),z=y.elements;for(var A=1,B;B=z[A];A++){if(B.equals(y.block)||B.equals(y.blockLimit))break;if(m.test(B.getName()))x.breakParent(B);}};u(s);u(t);var v=s.getNextSourceNode(true,1);while(v){if(v.equals(t))break;var w=v.getNextSourceNode(false,1);if(v.getName()!='img'||!v.getAttribute('_cke_protected_html'))if(m.test(v.getName()))v.remove(true);else v.removeAttributes(n);v=w;}q.moveToBookmark(r);}l.getSelection().selectRanges(o);}}}};i.removeFormatTags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeFormatAttributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(l){var m=l.config;if(m.resize_enabled){var n=null,o,p;function q(t){var u=t.data.$.screenX-o.x,v=t.data.$.screenY-o.y,w=p.width+u*(l.lang.dir=='rtl'?-1:1),x=p.height+v;l.resize(Math.max(m.resize_minWidth,Math.min(w,m.resize_maxWidth)),Math.max(m.resize_minHeight,Math.min(x,m.resize_maxHeight)));};function r(t){a.document.removeListener('mousemove',q);a.document.removeListener('mouseup',r);if(l.document){l.document.removeListener('mousemove',q);l.document.removeListener('mouseup',r);}};var s=e.addFunction(function(t){if(!n)n=l.getResizable();p={width:n.$.offsetWidth||0,height:n.$.offsetHeight||0};o={x:t.screenX,y:t.screenY};a.document.on('mousemove',q);a.document.on('mouseup',r);if(l.document){l.document.on('mousemove',q);l.document.on('mouseup',r);}});l.on('themeSpace',function(t){if(t.data.space=='bottom')t.data.html+='<div class="cke_resizer" title="'+e.htmlEncode(l.lang.resize)+'"'+' onmousedown="CKEDITOR.tools.callFunction('+s+', event)"'+'></div>';},l,null,100);}}});i.resize_minWidth=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form;if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l);o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='',n=function(){var r=this,s=function(){var v={};v.srcNodeRef=r.document.getWindow().$.frameElement;v.assocApp='CKEDITOR.'+a.version+'@'+a.revision;v.customerid=r.config.scayt_customerid||'1:11111111111111111111111111111111111111';v.customDictionaryName=r.config.scayt_customDictionaryName;
  21. v.userDictionaryName=r.config.scayt_userDictionaryName;v.defLang=r.scayt_defLang;if(a._scaytParams)for(var w in a._scaytParams)v[w]=a._scaytParams[w];var x=new window.scayt(v),y=o.instances[r.name];if(y){x.sLang=y.sLang;x.option(y.option());x.paused=y.paused;}o.instances[r.name]=x;try{x.setDisabled(x.paused===false);}catch(z){}r.fire('showScaytState');};r.on('contentDom',s);r.on('contentDomUnload',function(){var v=a.document.getElementsByTag('script'),w=/^dojoIoScript(d+)$/i,x=/^https?://svc.spellchecker.net/spellcheck/script/ssrv.cgi/i;for(var y=0;y<v.count();y++){var z=v.getItem(y),A=z.getId(),B=z.getAttribute('src');if(A&&B&&A.match(w)&&B.match(x))z.remove();}});r.on('beforeCommandExec',function(v){if((v.data.name=='source'||v.data.name=='newpage')&&(r.mode=='wysiwyg')){var w=o.getScayt(r);if(w){w.paused=!w.disabled;w.destroy();delete o.instances[r.name];}}});r.on('afterSetData',function(){if(o.isScaytEnabled(r))o.getScayt(r).refresh();});r.on('insertElement',function(){var v=o.getScayt(r);if(o.isScaytEnabled(r)){if(c)r.getSelection().unlock(true);try{v.refresh();}catch(w){}}},this,null,50);r.on('scaytDialog',function(v){v.data.djConfig=window.djConfig;v.data.scayt_control=o.getScayt(r);v.data.tab=m;v.data.scayt=window.scayt;});var t=r.dataProcessor,u=t&&t.htmlFilter;if(u)u.addRules({elements:{span:function(v){if(v.attributes.scayt_word&&v.attributes.scaytid){delete v.name;return v;}}}});if(r.document)s();};j.scayt={engineLoaded:false,instances:{},getScayt:function(r){return this.instances[r.name];},isScaytReady:function(r){return this.engineLoaded===true&&'undefined'!==typeof window.scayt&&this.getScayt(r);},isScaytEnabled:function(r){var s=this.getScayt(r);return s?s.disabled===false:false;},loadEngine:function(r){if(this.engineLoaded===true)return n.apply(r);else if(this.engineLoaded==-1)return a.on('scaytReady',function(){n.apply(r);});a.on('scaytReady',n,r);a.on('scaytReady',function(){this.engineLoaded=true;},this,null,0);this.engineLoaded=-1;var s=document.location.protocol;s=s.search(/https?:/)!=-1?s:'http:';var t='svc.spellchecker.net/spellcheck/lf/scayt/scayt1.js',u=r.config.scayt_srcUrl||s+'//'+t,v=o.parseUrl(u).path+'/';a._djScaytConfig={baseUrl:v,addOnLoad:[function(){a.fireOnce('scaytReady');}],isDebug:false};a.document.getHead().append(a.document.createElement('script',{attributes:{type:'text/javascript',src:u}}));return null;},parseUrl:function(r){var s;if(r.match&&(s=r.match(/(.*)[/\](.*?.w+)$/)))return{path:s[1],file:s[2]};
  22. else return r;}};var o=j.scayt,p=function(r,s,t,u,v,w,x){r.addCommand(u,v);r.addMenuItem(u,{label:t,command:u,group:w,order:x});},q={preserveState:true,exec:function(r){if(o.isScaytReady(r)){var s=o.isScaytEnabled(r);this.setState(s?2:1);var t=o.getScayt(r);t.setDisabled(s);}else if(!r.config.scayt_autoStartup&&o.engineLoaded>=0){this.setState(0);r.on('showScaytState',function(){this.removeListener();this.setState(o.isScaytEnabled(r)?1:2);},this);o.loadEngine(r);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(r){r.config.menu_groups='scayt_suggest,scayt_moresuggest,scayt_control,'+r.config.menu_groups;},init:function(r){var s={},t={},u=r.addCommand(l,q);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var v='scaytButton';r.addMenuGroup(v);r.addMenuItems({scaytToggle:{label:r.lang.scayt.enable,command:l,group:v},scaytOptions:{label:r.lang.scayt.options,group:v,onClick:function(){m='options';r.openDialog(l);}},scaytLangs:{label:r.lang.scayt.langs,group:v,onClick:function(){m='langs';r.openDialog(l);}},scaytAbout:{label:r.lang.scayt.about,group:v,onClick:function(){m='about';r.openDialog(l);}}});r.ui.add('Scayt',5,{label:r.lang.scayt.title,title:r.lang.scayt.title,className:'cke_button_scayt',onRender:function(){u.on('state',function(){this.setState(u.state);},this);},onMenu:function(){var x=o.isScaytEnabled(r);r.getMenuItem('scaytToggle').label=r.lang.scayt[x?'disable':'enable'];return{scaytToggle:2,scaytOptions:x?2:0,scaytLangs:x?2:0,scaytAbout:x?2:0};}});if(r.contextMenu&&r.addMenuItems)r.contextMenu.addListener(function(x){if(!(o.isScaytEnabled(r)&&x))return null;var y=o.getScayt(r),z=y.getWord(x.$);if(!z)return null;var A=y.getLang(),B={},C=window.scayt.getSuggestion(z,A);if(!C||!C.length)return null;for(i in s){delete r._.menuItems[i];delete r._.commands[i];}for(i in t){delete r._.menuItems[i];delete r._.commands[i];}s={};t={};var D=false;for(var E=0,F=C.length;E<F;E+=1){var G='scayt_suggestion_'+C[E].replace(' ','_'),H=(function(L,M){return{exec:function(){y.replace(L,M);}};})(x.$,C[E]);if(E<r.config.scayt_maxSuggestions){p(r,'button_'+G,C[E],G,H,'scayt_suggest',E+1);B[G]=2;t[G]=2;}else{p(r,'button_'+G,C[E],G,H,'scayt_moresuggest',E+1);s[G]=2;D=true;}}if(D)r.addMenuItem('scayt_moresuggest',{label:r.lang.scayt.moreSuggestions,group:'scayt_moresuggest',order:10,getItems:function(){return s;}});var I={exec:function(){y.ignore(x.$);}},J={exec:function(){y.ignoreAll(x.$);}},K={exec:function(){window.scayt.addWordToUserDictionary(x.$);}};
  23. p(r,'ignore',r.lang.scayt.ignore,'scayt_ignore',I,'scayt_control',1);p(r,'ignore_all',r.lang.scayt.ignoreAll,'scayt_ignore_all',J,'scayt_control',2);p(r,'add_word',r.lang.scayt.addWord,'scayt_add_word',K,'scayt_control',3);t.scayt_moresuggest=2;t.scayt_ignore=2;t.scayt_ignore_all=2;t.scayt_add_word=2;if(y.fireOnContextMenu)y.fireOnContextMenu(r);return t;});if(r.config.scayt_autoStartup){var w=function(){r.removeListener('showScaytState',w);u.setState(o.isScaytEnabled(r)?1:2);};r.on('showScaytState',w);o.loadEngine(r);}}});})();i.scayt_maxSuggestions=5;i.scayt_autoStartup=false;j.add('smiley',{requires:['dialog'],init:function(l){l.addCommand('smiley',new a.dialogCommand('smiley'));l.ui.addButton('Smiley',{label:l.lang.smiley.toolbar,command:'smiley'});a.dialog.add('smiley',this.path+'dialogs/smiley.js');}});i.smiley_path=a.basePath+'plugins/smiley/images/';i.smiley_images=['regular_smile.gif','sad_smile.gif','wink_smile.gif','teeth_smile.gif','confused_smile.gif','tounge_smile.gif','embaressed_smile.gif','omg_smile.gif','whatchutalkingabout_smile.gif','angry_smile.gif','angel_smile.gif','shades_smile.gif','devil_smile.gif','cry_smile.gif','lightbulb.gif','thumbs_down.gif','thumbs_up.gif','heart.gif','broken_heart.gif','kiss.gif','envelope.gif'];i.smiley_descriptions=[':)',':(',';)',':D',':/',':P','','','','','','','',';(','','','','','',':kiss',''];(function(){var l='.%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;border: 1px dotted gray;padding-top: 8px;padding-left: 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);}',m=/%1/g,n=/%2/g,o={preserveState:true,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(p){var q=p.addCommand('showblocks',o);q.canUndo=false;if(p.config.startupOutlineBlocks)q.setState(1);p.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks '));p.ui.addButton('ShowBlocks',{label:p.lang.showBlocks,command:'showblocks'});p.on('mode',function(){if(q.state!=0)q.refresh(p);});p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});}});})();i.startupOutlineBlocks=false;
  24. j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea;l.on('editingBlockReady',function(){var n,o;l.addMode('source',{load:function(p,q){if(c&&b.version<8)p.setStyle('position','relative');l.textarea=n=new h('textarea');n.setAttributes({dir:'ltr',tabIndex:-1});n.addClass('cke_source');var r={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){if(!b.ie8Compat){o=function(){n.hide();n.setStyle('height',p.$.clientHeight+'px');n.show();};l.on('resize',o);r.height=p.$.clientHeight+'px';}}else n.on('mousedown',function(t){t=t.data.$;if(t.stopPropagation)t.stopPropagation();});p.setHtml('');p.append(n);n.setStyles(r);l.mayBeDirty=true;this.loadData(q);var s=l.keystrokeHandler;if(s)s.attach(n);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(p){n.setValue(p);},getData:function(){return n.getValue();},getSnapshotData:function(){return n.getValue();},unload:function(p){l.textarea=n=null;if(o)l.removeListener('resize',o);if(c&&b.version<8)p.removeStyle('position');},focus:function(){n.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(o){var p=o.config,q=o.lang.stylesCombo,r=this.path,s;o.ui.addRichCombo('Styles',{label:q.label,title:q.panelTitle,voiceLabel:q.voiceLabel,className:'cke_styles',multiSelect:true,panel:{css:[p.contentsCss,a.getUrl(o.skinPath+'editor.css')],voiceLabel:q.panelVoiceLabel},init:function(){var t=this,u=p.stylesCombo_stylesSet.split(':',2),v=u[1]||a.getUrl(r+'styles/'+u[0]+'.js');u=u[0];a.loadStylesSet(u,v,function(w){var x,y,z=[];s={};for(var A=0;A<w.length;A++){var B=w[A];y=B.name;x=s[y]=new a.style(B);x._name=y;z.push(x);}z.sort(n);var C;for(A=0;A<z.length;A++){x=z[A];y=x._name;var D=x.type;if(D!=C){t.startGroup(q['panelTitle'+String(D)]);C=D;}t.add(y,x.type==3?y:m(x._.definition),y);}t.commit();t.onOpen();});},onClick:function(t){o.focus();o.fire('saveSnapshot');var u=s[t],v=o.getSelection();if(u.type==3){var w=v.getSelectedElement();if(w)u.applyToObject(w);
  25. return;}var x=new d.elementPath(v.getStartElement());if(u.type==2&&u.checkActive(x))u.remove(o.document);else u.apply(o.document);o.fire('saveSnapshot');},onRender:function(){o.on('selectionChange',function(t){var u=this.getValue(),v=t.data.path,w=v.elements;for(var x=0,y;x<w.length;x++){y=w[x];for(var z in s)if(s[z].checkElementRemovable(y,true)){if(z!=u)this.setValue(z);return;}}this.setValue('');},this);},onOpen:function(){var B=this;if(c)o.focus();var t=o.getSelection(),u=t.getSelectedElement(),v=u&&u.getName(),w=new d.elementPath(u||t.getStartElement()),x=[0,0,0,0];B.showAll();B.unmarkAll();for(var y in s){var z=s[y],A=z.type;if(A==3){if(u&&z.element==v){if(z.checkElementRemovable(u,true))B.mark(y);x[A]++;}else B.hideItem(y);}else{if(z.checkActive(w))B.mark(y);x[A]++;}}if(!x[1])B.hideGroup(q['panelTitle'+String(1)]);if(!x[2])B.hideGroup(q['panelTitle'+String(2)]);if(!x[3])B.hideGroup(q['panelTitle'+String(3)]);}});}});var l={};a.addStylesSet=function(o,p){l[o]=p;};a.loadStylesSet=function(o,p,q){var r=l[o];if(r){q(r);return;}a.scriptLoader.load(p,function(){q(l[o]);});};function m(o){var p=[],q=o.element;if(q=='bdo')q='span';p=['<',q];var r=o.attributes;if(r)for(var s in r)p.push(' ',s,'="',r[s],'"');var t=a.style.getStyleText(o);if(t)p.push(' style="',t,'"');p.push('>',o.name,'</',q,'>');return p.join('');};function n(o,p){var q=o.type,r=p.type;return q==r?0:q==3?-1:r==3?1:r==1?1:-1;};})();i.stylesCombo_stylesSet='default';j.add('table',{init:function(l){var m=j.table,n=l.lang.table;l.addCommand('table',new a.dialogCommand('table'));l.addCommand('tableProperties',new a.dialogCommand('tableProperties'));l.ui.addButton('Table',{label:n.toolbar,command:'table'});a.dialog.add('table',this.path+'dialogs/table.js');a.dialog.add('tableProperties',this.path+'dialogs/table.js');if(l.addMenuItems)l.addMenuItems({table:{label:n.menu,command:'tableProperties',group:'table',order:5},tabledelete:{label:n.deleteTable,command:'tableDelete',group:'table',order:1}});if(l.contextMenu)l.contextMenu.addListener(function(o,p){if(!o)return null;var q=o.is('table')||o.hasAscendant('table');if(q)return{tabledelete:2,table:2};return null;});}});(function(){function l(y,z){if(c)y.removeAttribute(z);else delete y[z];};var m=/^(?:td|th)$/;function n(y){var z=y.createBookmarks(),A=y.getRanges(),B=[],C={};function D(L){if(B.length>0)return;if(L.type==1&&m.test(L.getName())&&!L.getCustomData('selected_cell')){h.setMarker(C,L,'selected_cell',true);B.push(L);}};for(var E=0;E<A.length;
  26. E++){var F=A[E];if(F.collapsed){var G=F.getCommonAncestor(),H=G.getAscendant('td',true)||G.getAscendant('th',true);if(H)B.push(H);}else{var I=new d.walker(F),J;I.guard=D;while(J=I.next()){var K=J.getParent();if(K&&m.test(K.getName())&&!K.getCustomData('selected_cell')){h.setMarker(C,K,'selected_cell',true);B.push(K);}}}}h.clearAllMarkers(C);y.selectBookmarks(z);return B;};function o(y){var z=new h(y),A=(z.getName()=='table'?y:z.getAscendant('table')).$,B=A.rows,C=-1,D=[];for(var E=0;E<B.length;E++){C++;if(!D[C])D[C]=[];var F=-1;for(var G=0;G<B[E].cells.length;G++){var H=B[E].cells[G];F++;while(D[C][F])F++;var I=isNaN(H.colSpan)?1:H.colSpan,J=isNaN(H.rowSpan)?1:H.rowSpan;for(var K=0;K<J;K++){if(!D[C+K])D[C+K]=[];for(var L=0;L<I;L++)D[C+K][F+L]=B[E].cells[G];}F+=I-1;}}return D;};function p(y,z){var A=c?'_cke_rowspan':'rowSpan';for(var B=0;B<y.length;B++)for(var C=0;C<y[B].length;C++){var D=y[B][C];if(D.parentNode)D.parentNode.removeChild(D);D.colSpan=D[A]=1;}var E=0;for(B=0;B<y.length;B++)for(C=0;C<y[B].length;C++){D=y[B][C];if(!D)continue;if(C>E)E=C;if(D._cke_colScanned)continue;if(y[B][C-1]==D)D.colSpan++;if(y[B][C+1]!=D)D._cke_colScanned=1;}for(B=0;B<=E;B++)for(C=0;C<y.length;C++){if(!y[C])continue;D=y[C][B];if(!D||D._cke_rowScanned)continue;if(y[C-1]&&y[C-1][B]==D)D[A]++;if(!y[C+1]||y[C+1][B]!=D)D._cke_rowScanned=1;}for(B=0;B<y.length;B++)for(C=0;C<y[B].length;C++){D=y[B][C];l(D,'_cke_colScanned');l(D,'_cke_rowScanned');}for(B=0;B<y.length;B++){var F=z.ownerDocument.createElement('tr');for(C=0;C<y[B].length;){D=y[B][C];if(y[B-1]&&y[B-1][C]==D){C+=D.colSpan;continue;}F.appendChild(D);if(A!='rowSpan'){D.rowSpan=D[A];D.removeAttribute(A);}C+=D.colSpan;if(D.colSpan==1)D.removeAttribute('colSpan');if(D.rowSpan==1)D.removeAttribute('rowSpan');}if(c)z.rows[B].replaceNode(F);else{var G=new h(z.rows[B]),H=new h(F);G.setHtml('');H.moveChildren(G);}}};function q(y){var z=y.cells;for(var A=0;A<z.length;A++){z[A].innerHTML='';if(!c)new h(z[A]).appendBogus();}};function r(y,z){var A=y.getStartElement().getAscendant('tr');if(!A)return;var B=A.clone(true);B.insertBefore(A);q(z?B.$:A.$);};function s(y){if(y instanceof d.selection){var z=n(y),A=[];for(var B=0;B<z.length;B++){var C=z[B].getParent();A[C.$.rowIndex]=C;}for(B=A.length;B>=0;B--)if(A[B])s(A[B]);}else if(y instanceof h){var D=y.getAscendant('table');if(D.$.rows.length==1)D.remove();else y.remove();}};function t(y,z){var A=y.getStartElement(),B=A.getAscendant('td',true)||A.getAscendant('th',true);if(!B)return;var C=B.getAscendant('table'),D=B.$.cellIndex;
  27. for(var E=0;E<C.$.rows.length;E++){var F=C.$.rows[E];if(F.cells.length<D+1)continue;B=new h(F.cells[D].cloneNode(false));if(!c)B.appendBogus();var G=new h(F.cells[D]);if(z)B.insertBefore(G);else B.insertAfter(G);}};function u(y){if(y instanceof d.selection){var z=n(y);for(var A=z.length;A>=0;A--)if(z[A])u(z[A]);}else if(y instanceof h){var B=y.getAscendant('table'),C=y.$.cellIndex;for(A=B.$.rows.length-1;A>=0;A--){var D=new h(B.$.rows[A]);if(!C&&D.$.cells.length==1){s(D);continue;}if(D.$.cells[C])D.$.removeChild(D.$.cells[C]);}}};function v(y,z){var A=y.getStartElement(),B=A.getAscendant('td',true)||A.getAscendant('th',true);if(!B)return;var C=B.clone();if(!c)C.appendBogus();if(z)C.insertBefore(B);else C.insertAfter(B);};function w(y){if(y instanceof d.selection){var z=n(y);for(var A=z.length-1;A>=0;A--)w(z[A]);}else if(y instanceof h)if(y.getParent().getChildCount()==1)y.getParent().remove();else y.remove();};var x={thead:1,tbody:1,tfoot:1,td:1,tr:1,th:1};j.tabletools={init:function(y){var z=y.lang.table;y.addCommand('cellProperties',new a.dialogCommand('cellProperties'));a.dialog.add('cellProperties',this.path+'dialogs/tableCell.js');y.addCommand('tableDelete',{exec:function(A){var B=A.getSelection(),C=B&&B.getStartElement(),D=C&&C.getAscendant('table',true);if(!D)return;B.selectElement(D);var E=B.getRanges()[0];E.collapse();B.selectRanges([E]);if(D.getParent().getChildCount()==1)D.getParent().remove();else D.remove();}});y.addCommand('rowDelete',{exec:function(A){var B=A.getSelection();s(B);}});y.addCommand('rowInsertBefore',{exec:function(A){var B=A.getSelection();r(B,true);}});y.addCommand('rowInsertAfter',{exec:function(A){var B=A.getSelection();r(B);}});y.addCommand('columnDelete',{exec:function(A){var B=A.getSelection();u(B);}});y.addCommand('columnInsertBefore',{exec:function(A){var B=A.getSelection();t(B,true);}});y.addCommand('columnInsertAfter',{exec:function(A){var B=A.getSelection();t(B);}});y.addCommand('cellDelete',{exec:function(A){var B=A.getSelection();w(B);}});y.addCommand('cellInsertBefore',{exec:function(A){var B=A.getSelection();v(B,true);}});y.addCommand('cellInsertAfter',{exec:function(A){var B=A.getSelection();v(B);}});if(y.addMenuItems)y.addMenuItems({tablecell:{label:z.cell.menu,group:'tablecell',order:1,getItems:function(){var A=n(y.getSelection());return{tablecell_insertBefore:2,tablecell_insertAfter:2,tablecell_delete:2,tablecell_properties:A.length>0?2:0};}},tablecell_insertBefore:{label:z.cell.insertBefore,group:'tablecell',command:'cellInsertBefore',order:5},tablecell_insertAfter:{label:z.cell.insertAfter,group:'tablecell',command:'cellInsertAfter',order:10},tablecell_delete:{label:z.cell.deleteCell,group:'tablecell',command:'cellDelete',order:15},tablecell_properties:{label:z.cell.title,group:'tablecellproperties',command:'cellProperties',order:20},tablerow:{label:z.row.menu,group:'tablerow',order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2};
  28. }},tablerow_insertBefore:{label:z.row.insertBefore,group:'tablerow',command:'rowInsertBefore',order:5},tablerow_insertAfter:{label:z.row.insertAfter,group:'tablerow',command:'rowInsertAfter',order:10},tablerow_delete:{label:z.row.deleteRow,group:'tablerow',command:'rowDelete',order:15},tablecolumn:{label:z.column.menu,group:'tablecolumn',order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2};}},tablecolumn_insertBefore:{label:z.column.insertBefore,group:'tablecolumn',command:'columnInsertBefore',order:5},tablecolumn_insertAfter:{label:z.column.insertAfter,group:'tablecolumn',command:'columnInsertAfter',order:10},tablecolumn_delete:{label:z.column.deleteColumn,group:'tablecolumn',command:'columnDelete',order:15}});if(y.contextMenu)y.contextMenu.addListener(function(A,B){if(!A)return null;while(A){if(A.getName() in x)return{tablecell:2,tablerow:2,tablecolumn:2};A=A.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={exec:function(n){n.container.focusNext(true);}},m={exec:function(n){n.container.focusPrevious(true);}};j.add('tab',{requires:['keystrokes'],init:function(n){var o=n.keystrokeHandler.keystrokes;o[9]='tab';o[2000+9]='shiftTab';var p=n.config.tabSpaces,q='';while(p--)q+='xa0';n.addCommand('tab',{exec:function(r){if(!r.fire('tab'))if(q.length>0)r.insertHtml(q);else return r.execCommand('blur');return true;}});n.addCommand('shiftTab',{exec:function(r){if(!r.fire('shiftTab'))return r.execCommand('blurBack');return true;}});n.addCommand('blur',l);n.addCommand('blurBack',m);}});})();h.prototype.focusNext=function(l){var u=this;var m=u.$,n=u.getTabIndex(),o,p,q,r,s,t;if(n<=0){s=u.getNextSourceNode(l,1);while(s){if(s.isVisible()&&s.getTabIndex()===0){q=s;break;}s=s.getNextSourceNode(false,1);}}else{s=u.getDocument().getBody().getFirst();while(s=s.getNextSourceNode(false,1)){if(!o)if(!p&&s.equals(u)){p=true;if(l){if(!(s=s.getNextSourceNode(true,1)))break;o=1;}}else if(p&&!u.contains(s))o=1;if(!s.isVisible()||(t=s.getTabIndex())<(0))continue;if(o&&t==n){q=s;break;}if(t>n&&(!q||!r||t<r)){q=s;r=t;}else if(!q&&t===0){q=s;r=t;}}}if(q)q.focus();};h.prototype.focusPrevious=function(l){var u=this;var m=u.$,n=u.getTabIndex(),o,p,q,r=0,s,t=u.getDocument().getBody().getLast();
  29. while(t=t.getPreviousSourceNode(false,1)){if(!o)if(!p&&t.equals(u)){p=true;if(l){if(!(t=t.getPreviousSourceNode(true,1)))break;o=1;}}else if(p&&!u.contains(t))o=1;if(!t.isVisible()||(s=t.getTabIndex())<(0))continue;if(n<=0){if(o&&s===0){q=t;break;}if(s>r){q=t;r=s;}}else{if(o&&s==n){q=t;break;}if(s<n&&(!q||s>r)){q=t;r=s;}}}if(q)q.focus();};i.tabSpaces=0;(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++)if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}if(p.length>0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];)if(q.focus){q.focus();return;}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){switch(q){case 39:case 9:while((p=p.next||p.toolbar.next&&p.toolbar.next.items[0])&&(!p.focus)){}if(p)p.focus();else n.toolbox.focus();return false;case 37:case 2000+9:while((p=p.previous||p.toolbar.previous&&p.toolbar.previous.items[p.toolbar.previous.items.length-1])&&(!p.focus)){}if(p)p.focus();else{var r=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;r[r.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q=['<div class="cke_toolbox"'],r=n.config.toolbarStartupExpanded,s;q.push(r?'>':' style="display:none">');var t=n.toolbox.toolbars,u=n.config.toolbar instanceof Array?n.config.toolbar:n.config['toolbar_'+n.config.toolbar];for(var v=0;v<u.length;v++){var w=u[v];if(!w)continue;var x='cke_'+e.getNextNumber(),y={id:x,items:[]};if(s){q.push('</div>');s=0;}if(w==='/'){q.push('<div class="cke_break"></div>');continue;}q.push('<span id="',x,'" class="cke_toolbar"><span class="cke_toolbar_start"></span>');
  30. var z=t.push(y)-1;if(z>0){y.previous=t[z-1];y.previous.next=y;}for(var A=0;A<w.length;A++){var B,C=w[A];if(C=='-')B=k.separator;else B=n.ui.create(C);if(B){if(B.canGroup){if(!s){q.push('<span class="cke_toolgroup">');s=1;}}else if(s){q.push('</span>');s=0;}var D=B.render(n,q);z=y.items.push(D)-1;if(z>0){D.previous=y.items[z-1];D.previous.next=D;}D.toolbar=y;D.onkey=o;D.onfocus=function(){if(!n.toolbox.focusCommandExecuted)n.focus();};}}if(s){q.push('</span>');s=0;}q.push('<span class="cke_toolbar_end"></span></span>');}q.push('</div>');if(n.config.toolbarCanCollapse){var E=e.addFunction(function(){n.execCommand('toolbarCollapse');}),F='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(G){var H=a.document.getById(F),I=H.getPrevious(),J=G.getThemeSpace('contents'),K=I.getParent(),L=parseInt(J.$.style.height,10),M=K.$.offsetHeight;if(I.isVisible()){I.hide();H.addClass('cke_toolbox_collapser_min');}else{I.show();H.removeClass('cke_toolbox_collapser_min');}var N=K.$.offsetHeight-M;J.setStyle('height',L-N+'px');},modes:{wysiwyg:1,source:1}});q.push('<a id="'+F+'" class="cke_toolbox_collapser');if(!r)q.push(' cke_toolbox_collapser_min');q.push('" onclick="CKEDITOR.tools.callFunction('+E+')"></a>');}p.data.html+=q.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('<span class="cke_separator"></span>');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];i.toolbar='Full';i.toolbarCanCollapse=true;i.toolbarStartupExpanded=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(n){var o=new m(n),p=n.addCommand('undo',{exec:function(){if(o.undo()){n.selectionChange();
  31. this.fire('afterUndo');}},state:0,canUndo:false}),q=n.addCommand('redo',{exec:function(){if(o.redo()){n.selectionChange();this.fire('afterRedo');}},state:0,canUndo:false});o.onChange=function(){p.setState(o.undoable()?2:0);q.setState(o.redoable()?2:0);};function r(s){if(o.enabled&&s.data.command.canUndo!==false)o.save();};n.on('beforeCommandExec',r);n.on('afterCommandExec',r);n.on('saveSnapshot',function(){o.save();});n.on('contentDom',function(){n.document.on('keydown',function(s){if(!s.data.$.ctrlKey&&!s.data.$.metaKey)o.type(s);});});n.on('beforeModeUnload',function(){n.mode=='wysiwyg'&&o.save(true);});n.on('mode',function(){o.enabled=n.mode=='wysiwyg';o.onChange();});n.ui.addButton('Undo',{label:n.lang.undo,command:'undo'});n.ui.addButton('Redo',{label:n.lang.redo,command:'redo'});n.resetUndo=function(){o.reset();n.fire('saveSnapshot');};}});function l(n){var p=this;var o=n.getSelection();p.contents=n.getSnapshot();p.bookmarks=o&&o.createBookmarks2(true);if(c)p.contents=p.contents.replace(/s+_cke_expando=".*?"/g,'');};l.prototype={equals:function(n,o){if(this.contents!=n.contents)return false;if(o)return true;var p=this.bookmarks,q=n.bookmarks;if(p||q){if(!p||!q||p.length!=q.length)return false;for(var r=0;r<p.length;r++){var s=p[r],t=q[r];if(s.startOffset!=t.startOffset||s.endOffset!=t.endOffset||!e.arrayCompare(s.start,t.start)||!e.arrayCompare(s.end,t.end))return false;}}return true;}};function m(n){this.editor=n;this.reset();};m.prototype={type:function(n){var o=n&&n.data.getKeystroke(),p={8:1,46:1},q=o in p,r=this.lastKeystroke in p,s=q&&o==this.lastKeystroke,t={37:1,38:1,39:1,40:1},u=o in t,v=this.lastKeystroke in t,w=!q&&!u,x=q&&!s,y=!this.typing||w&&(r||v);if(y||x){var z=new l(this.editor);e.setTimeout(function(){var B=this;var A=B.editor.getSnapshot();if(c)A=A.replace(/s+_cke_expando=".*?"/g,'');if(z.contents!=A){if(!B.save(false,z,false))B.snapshots.splice(B.index+1,B.snapshots.length-B.index-1);B.hasUndo=true;B.hasRedo=false;B.typesCount=1;B.modifiersCount=1;B.onChange();}},0,this);}this.lastKeystroke=o;if(q){this.typesCount=0;this.modifiersCount++;if(this.modifiersCount>25){this.save();this.modifiersCount=1;}}else if(!u){this.modifiersCount=0;this.typesCount++;if(this.typesCount>25){this.save();this.typesCount=1;}}this.typing=true;},reset:function(){var n=this;n.lastKeystroke=0;n.snapshots=[];n.index=-1;n.limit=n.editor.config.undoStackSize;n.currentImage=null;n.hasUndo=false;n.hasRedo=false;n.resetType();},resetType:function(){var n=this;
  32. n.typing=false;delete n.lastKeystroke;n.typesCount=0;n.modifiersCount=0;},fireChange:function(){var n=this;n.hasUndo=!!n.getNextImage(true);n.hasRedo=!!n.getNextImage(false);n.resetType();n.onChange();},save:function(n,o,p){var r=this;var q=r.snapshots;if(!o)o=new l(r.editor);if(r.currentImage&&o.equals(r.currentImage,n))return false;q.splice(r.index+1,q.length-r.index-1);if(q.length==r.limit)q.shift();r.index=q.push(o)-1;r.currentImage=o;if(p!==false)r.fireChange();return true;},restoreImage:function(n){var p=this;p.editor.loadSnapshot(n.contents);if(n.bookmarks)p.editor.getSelection().selectBookmarks(n.bookmarks);else if(c){var o=p.editor.document.getBody().$.createTextRange();o.collapse(true);o.select();}p.index=n.index;p.currentImage=n;p.fireChange();},getNextImage:function(n){var s=this;var o=s.snapshots,p=s.currentImage,q,r;if(p)if(n)for(r=s.index-1;r>=0;r--){q=o[r];if(!p.equals(q,true)){q.index=r;return q;}}else for(r=s.index+1;r<o.length;r++){q=o[r];if(!p.equals(q,true)){q.index=r;return q;}}return null;},redoable:function(){return this.enabled&&this.hasRedo;},undoable:function(){return this.enabled&&this.hasUndo;},undo:function(){var o=this;if(o.undoable()){o.save(true);var n=o.getNextImage(true);if(n)return o.restoreImage(n),true;}return false;},redo:function(){var o=this;if(o.redoable()){o.save(true);if(o.redoable()){var n=o.getNextImage(false);if(n)return o.restoreImage(n),true;}}return false;}};})();i.undoStackSize=20;(function(){var l={table:1,pre:1},m=/s*<(p|div|address|hd|center)[^>]*>s*(?:<br[^>]*>|&nbsp;|&#160;)s*(:?</1>)?s*$/gi;function n(q){var v=this;if(v.mode=='wysiwyg'){v.focus();var r=v.getSelection(),s=q.data;if(v.dataProcessor)s=v.dataProcessor.toHtml(s);if(c){var t=r.isLocked;if(t)r.unlock();var u=r.getNative();if(u.type=='Control')u.clear();u.createRange().pasteHTML(s);if(t)v.getSelection().lock();}else v.document.$.execCommand('inserthtml',false,s);}};function o(q){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var r=q.data,s=r.getName(),t=f.$block[s],u=this.getSelection(),v=u.getRanges(),w=u.isLocked;if(w)u.unlock();var x,y,z,A;for(var B=v.length-1;B>=0;B--){x=v[B];x.deleteContents();y=!B&&r||r.clone(true);var C,D;if(this.config.enterMode!=2&&t)while((C=x.getCommonAncestor(false,true))&&((D=f[C.getName()])&&(!(D&&D[s]))))x.splitBlock();x.insertNode(y);if(!z)z=y;}x.moveToPosition(z,4);var E=z.getNextSourceNode(true);if(E&&E.type==1)x.moveToElementEditStart(E);u.selectRanges([x]);if(w)this.getSelection().lock();
  33. e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function p(q){var r=q.editor,s=q.data.path,t=s.blockLimit,u=q.data.selection,v=u.getRanges()[0],w=r.document.getBody(),x=r.config.enterMode;if(x!=2&&v.collapsed&&t.getName()=='body'&&!s.block){var y=u.createBookmarks(),z=v.fixBlock(true,r.config.enterMode==3?'div':'p');if(c){var A=z.getElementsByTag('br'),B;for(var C=0;C<A.count();C++)if((B=A.getItem(C))&&(B.hasAttribute('_cke_bogus')))B.remove();}u.selectBookmarks(y);var D=z.getChildren(),E=D.count(),F,G=d.walker.whitespaces(true),H=z.getPrevious(G),I=z.getNext(G),J;if(H&&H.getName&&!(H.getName() in l))J=H;else if(I&&I.getName&&!(I.getName() in l))J=I;if((!E||(F=D.getItem(0))&&(F.is&&F.is('br')))&&(J&&v.moveToElementEditStart(J))){z.remove();v.select();}}var K=w.getLast(d.walker.whitespaces(true));if(K&&K.getName&&K.getName() in l){var L=r.document.createElement(c&&x!=2?'<br _cke_bogus="true" />':'br');w.append(L);}};j.add('wysiwygarea',{requires:['editingblock'],init:function(q){var r=q.config.enterMode!=2?q.config.enterMode==3?'div':'p':false;q.on('editingBlockReady',function(){var s,t,u,v,w,x,y,z=b.isCustomDomain(),A=function(){if(u)u.remove();if(t)t.remove();x=0;var D='void( '+(b.gecko?'setTimeout':'')+'( function(){'+'document.open();'+(c&&z?'document.domain="'+document.domain+'";':'')+'document.write( window.parent[ "_cke_htmlToLoad_'+q.name+'" ] );'+'document.close();'+'window.parent[ "_cke_htmlToLoad_'+q.name+'" ] = null;'+'}'+(b.gecko?', 0 )':')()')+' )';if(b.opera)D='void(0);';u=h.createFromHtml('<iframe style="width:100%;height:100%" frameBorder="0" tabIndex="-1" allowTransparency="true" src="javascript:'+encodeURIComponent(D)+'"'+'></iframe>');var E=q.lang.editorTitle.replace('%1',q.name);if(b.gecko){u.on('load',function(F){F.removeListener();C(u.$.contentWindow);});s.setAttributes({role:'region',title:E});u.setAttributes({role:'region',title:' '});}else if(b.webkit){u.setAttribute('title',E);u.setAttribute('name',E);}else if(c){t=h.createFromHtml('<fieldset style="height:100%'+(c&&b.quirks?';position:relative':'')+'">'+'<legend style="display:block;width:0;height:0;overflow:hidden;'+(c&&b.quirks?'position:absolute':'')+'">'+e.htmlEncode(E)+'</legend>'+'</fieldset>',a.document);u.appendTo(t);t.appendTo(s);}if(!c)s.append(u);},B='<script id="cke_actscrpt" type="text/javascript">window.onload = function(){window.parent.CKEDITOR._["contentDomReady'+q.name+'"]( window );'+'}'+'</script>',C=function(D){if(x)return;x=1;var E=D.document,F=E.body,G=E.getElementById('cke_actscrpt');
  34. G.parentNode.removeChild(G);delete a._['contentDomReady'+q.name];F.spellcheck=!q.config.disableNativeSpellChecker;if(c){F.hideFocus=true;F.disabled=true;F.contentEditable=true;F.removeAttribute('disabled');}else E.designMode='on';try{E.execCommand('enableObjectResizing',false,!q.config.disableObjectResizing);}catch(M){}try{E.execCommand('enableInlineTableEditing',false,!q.config.disableNativeTableHandles);}catch(N){}D=q.window=new d.window(D);E=q.document=new g(E);var H=E.getBody().getFirst();if(b.gecko&&H&&H.is&&H.is('br')&&H.hasAttribute('_moz_editor_bogus_node')){var I=E.$.createEvent('KeyEvents');I.initKeyEvent('keypress',true,true,D.$,false,false,false,false,0,32);E.$.dispatchEvent(I);var J=E.getBody().getFirst();if(q.config.enterMode==2)E.createElement('br',{attributes:{_moz_dirty:''}}).replace(J);else J.remove();}if(!(c||b.opera))E.on('mousedown',function(O){var P=O.data.getTarget();if(P.is('img','hr','input','textarea','select'))q.getSelection().selectElement(P);});if(b.webkit){E.on('click',function(O){if(O.data.getTarget().is('input','select'))O.data.preventDefault();});E.on('mouseup',function(O){if(O.data.getTarget().is('input','textarea'))O.data.preventDefault();});}var K=c||b.safari?D:E;K.on('blur',function(){q.focusManager.blur();});K.on('focus',function(){q.focusManager.focus();});var L=q.keystrokeHandler;if(L)L.attach(E);if(q.contextMenu)q.contextMenu.addTarget(E);setTimeout(function(){q.fire('contentDom');if(y){q.mode='wysiwyg';q.fire('mode');y=false;}v=false;if(w){q.focus();w=false;}if(c)setTimeout(function(){if(q.document){var O=q.document.$.body;O.runtimeStyle.marginBottom='0px';O.runtimeStyle.marginBottom='';}},1000);},0);};q.addMode('wysiwyg',{load:function(D,E,F){s=D;if(c&&b.quirks)D.setStyle('position','relative');q.mayBeDirty=true;y=true;if(F)this.loadSnapshotData(E);else this.loadData(E);},loadData:function(D){v=true;if(q.dataProcessor)D=q.dataProcessor.toHtml(D,r);D=q.config.docType+'<html dir="'+q.config.contentsLangDirection+'">'+'<head>'+'<link href="'+q.config.contentsCss+'" type="text/css" rel="stylesheet" _fcktemp="true"/>'+'<style type="text/css" _fcktemp="true">'+q._.styles.join('n')+'</style>'+'</head>'+'<body>'+D+'</body>'+'</html>'+B;window['_cke_htmlToLoad_'+q.name]=D;a._['contentDomReady'+q.name]=C;A();if(b.opera){var E=u.$.contentWindow.document;E.open();E.write(D);E.close();}},getData:function(){var D=u.getFrameDocument().getBody().getHtml();if(q.dataProcessor)D=q.dataProcessor.toDataFormat(D,r);if(q.config.ignoreEmptyParagraph)D=D.replace(m,'');
  35. return D;},getSnapshotData:function(){return u.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(D){u.getFrameDocument().getBody().setHtml(D);},unload:function(D){q.window=q.document=u=s=w=null;q.fire('contentDomUnload');},focus:function(){if(v)w=true;else if(q.window){q.window.focus();q.selectionChange();}}});q.on('insertHtml',n,null,null,20);q.on('insertElement',o,null,null,20);q.on('selectionChange',p,null,null,1);});}});})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{init:function(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;j.add('styles',{requires:['selection']});a.editor.prototype.attachStyleStateChange=function(l,m){var n=this._.styleStateChangeCallbacks;if(!n){n=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(o){for(var p=0;p<n.length;p++){var q=n[p],r=q.style.checkActive(o.data.path)?1:2;if(q.state!==r){q.fn.call(this,r);q.state!==r;}}});}n.push({style:l,fn:m});};a.STYLE_BLOCK=1;a.STYLE_INLINE=2;a.STYLE_OBJECT=3;(function(){var l={address:1,div:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1},m={a:1,embed:1,hr:1,img:1,li:1,object:1,ol:1,table:1,td:1,tr:1,ul:1},n=/s*(?:;s*|$)/;a.style=function(L,M){if(M){L=e.clone(L);G(L.attributes,M);G(L.styles,M);}var N=this.element=(L.element||'*').toLowerCase();this.type=N=='#'||l[N]?1:m[N]?3:2;this._={definition:L};};a.style.prototype={apply:function(L){K.call(this,L,false);},remove:function(L){K.call(this,L,true);},applyToRange:function(L){var M=this;return(M.applyToRange=M.type==2?o:M.type==1?q:null).call(M,L);},removeFromRange:function(L){return(this.removeFromRange=this.type==2?p:null).call(this,L);},applyToObject:function(L){E(L,this);},checkActive:function(L){switch(this.type){case 1:return this.checkElementRemovable(L.block||L.blockLimit,true);case 2:var M=L.elements;for(var N=0,O;N<M.length;N++){O=M[N];if(O==L.block||O==L.blockLimit)continue;if(this.checkElementRemovable(O,true))return true;}}return false;},checkElementRemovable:function(L,M){if(!L)return false;var N=this._.definition,O;if(L.getName()==this.element){if(!M&&!L.hasAttributes())return true;
  36. O=H(N);if(O._length){for(var P in O){if(P=='_length')continue;var Q=L.getAttribute(P);if(O[P]==(P=='style'?J(Q,false):Q)){if(!M)return true;}else if(M)return false;}if(M)return true;}else return true;}var R=I(this)[L.getName()];if(R){if(!(O=R.attributes))return true;for(var S=0;S<O.length;S++){P=O[S][0];var T=L.getAttribute(P);if(T){var U=O[S][1];if(U===null||typeof U=='string'&&T==U||U.test(T))return true;}}}return false;}};a.style.getStyleText=function(L){var M=L._ST;if(M)return M;M=L.styles;var N=L.attributes&&L.attributes.style||'';if(N.length)N=N.replace(n,';');for(var O in M)N+=O+':'+M[O]+';';if(N.length)N=J(N);return L._ST=N;};function o(L){var al=this;var M=L.document;if(L.collapsed){var N=D(al,M);L.insertNode(N);L.moveToPosition(N,2);return;}var O=al.element,P=al._.definition,Q,R=f[O]||(Q=true,f.span),S=L.createBookmark();L.enlarge(1);L.trim();var T=L.getBoundaryNodes(),U=T.startNode,V=T.endNode.getNextSourceNode(true);if(!V){var W;V=W=M.createText('');V.insertAfter(L.endContainer);}var X=V.getParent();if(X&&X.getAttribute('_fck_bookmark'))V=X;if(V.equals(U)){V=V.getNextSourceNode(true);if(!V){V=W=M.createText('');V.insertAfter(U);}}var Y=U,Z,aa;while(Y){var ab=false;if(Y.equals(V)){Y=null;ab=true;}else{var ac=Y.type,ad=ac==1?Y.getName():null;if(ad&&Y.getAttribute('_fck_bookmark')){Y=Y.getNextSourceNode(true);continue;}if(!ad||R[ad]&&(Y.getPosition(V)|4|0|8)==(4+0+8)){var ae=Y.getParent();if(ae&&((ae.getDtd()||f.span)[O]||Q)){if(!Z&&(!ad||!f.$removeEmpty[ad]||(Y.getPosition(V)|4|0|8)==(4+0+8))){Z=new d.range(M);Z.setStartBefore(Y);}if(ac==3||ac==1&&!Y.getChildCount()){var af=Y,ag;while(!af.$.nextSibling&&(ag=af.getParent(),R[ag.getName()])&&((ag.getPosition(U)|2|0|8)==(2+0+8)))af=ag;Z.setEndAfter(af);if(!af.$.nextSibling)ab=true;if(!aa)aa=ac!=3||/[^sufeff]/.test(Y.getText());}}else ab=true;}else ab=true;Y=Y.getNextSourceNode();}if(ab&&aa&&Z&&!Z.collapsed){var ah=D(al,M),ai=Z.getCommonAncestor();while(ah&&ai){if(ai.getName()==O){for(var aj in P.attributes)if(ah.getAttribute(aj)==ai.getAttribute(aj))ah.removeAttribute(aj);for(var ak in P.styles)if(ah.getStyle(ak)==ai.getStyle(ak))ah.removeStyle(ak);if(!ah.hasAttributes()){ah=null;break;}}ai=ai.getParent();}if(ah){Z.extractContents().appendTo(ah);y(al,ah);Z.insertNode(ah);B(ah);if(!c)ah.$.normalize();}Z=null;}}W&&W.remove();L.moveToBookmark(S);};function p(L){L.enlarge(1);var M=L.createBookmark(),N=M.startNode;if(L.collapsed){var O=new d.elementPath(N.getParent()),P;for(var Q=0,R;Q<O.elements.length&&(R=O.elements[Q]);
  37. Q++){if(R==O.block||R==O.blockLimit)break;if(this.checkElementRemovable(R)){var S=L.checkBoundaryOfElement(R,2),T=!S&&L.checkBoundaryOfElement(R,1);if(T||S){P=R;P.match=T?'start':'end';}else{B(R);x(this,R);}}}if(P){var U=N;for(Q=0;true;Q++){var V=O.elements[Q];if(V.equals(P))break;else if(V.match)continue;else V=V.clone();V.append(U);U=V;}U[P.match=='start'?'insertBefore':'insertAfter'](P);}}else{var W=M.endNode,X=this;function Y(){var ab=new d.elementPath(N.getParent()),ac=new d.elementPath(W.getParent()),ad=null,ae=null;for(var af=0;af<ab.elements.length;af++){var ag=ab.elements[af];if(ag==ab.block||ag==ab.blockLimit)break;if(X.checkElementRemovable(ag))ad=ag;}for(af=0;af<ac.elements.length;af++){ag=ac.elements[af];if(ag==ac.block||ag==ac.blockLimit)break;if(X.checkElementRemovable(ag))ae=ag;}if(ae)W.breakParent(ae);if(ad)N.breakParent(ad);};Y();var Z=N.getNext();while(!Z.equals(W)){var aa=Z.getNextSourceNode();if(Z.type==1&&this.checkElementRemovable(Z)){if(Z.getName()==this.element)x(this,Z);else z(Z,I(this)[Z.getName()]);if(aa.type==1&&aa.contains(N)){Y();aa=N.getNext();}}Z=aa;}}L.moveToBookmark(M);};function q(L){var M=L.createBookmark(true),N=L.createIterator();N.enforceRealBlocks=true;var O,P=L.document,Q;while(O=N.getNextParagraph()){var R=D(this,P);r(O,R);}L.moveToBookmark(M);};function r(L,M){var N=M.is('pre'),O=L.is('pre'),P=N&&!O,Q=!N&&O;if(P)M=w(L,M);else if(Q)M=v(t(L),M);else L.moveChildren(M);M.replace(L);if(N)s(M);};function s(L){var M;if(!((M=L.getPreviousSourceNode(true,1))&&(M.is&&M.is('pre'))))return;var N=u(M.getHtml(),/n$/,'')+'nn'+u(L.getHtml(),/^n/,'');if(c)L.$.outerHTML='<pre>'+N+'</pre>';else L.setHtml(N);M.remove();};function t(L){var M=/(Ss*)n(?:s|(<span[^>]+_fck_bookmark.*?/span>))*n(?!$)/gi,N=L.getName(),O=u(L.getOuterHtml(),M,function(Q,R,S){return R+'</pre>'+S+'<pre>';}),P=[];O.replace(/<pre>([sS]*?)</pre>/gi,function(Q,R){P.push(R);});return P;};function u(L,M,N){var O='',P='';L=L.replace(/(^<span[^>]+_fck_bookmark.*?/span>)|(<span[^>]+_fck_bookmark.*?/span>$)/gi,function(Q,R,S){R&&(O=R);S&&(P=S);return '';});return O+L.replace(M,N)+P;};function v(L,M){var N=new d.documentFragment(M.getDocument());for(var O=0;O<L.length;O++){var P=L[O];P=P.replace(/(rn|r)/g,'n');P=u(P,/^[ t]*n/,'');P=u(P,/n$/,'');P=u(P,/^[ t]+|[ t]+$/g,function(R,S,T){if(R.length==1)return '&nbsp;';else if(!S)return e.repeat('&nbsp;',R.length-1)+' ';else return ' '+e.repeat('&nbsp;',R.length-1);});P=P.replace(/n/g,'<br>');P=P.replace(/[ t]{2,}/g,function(R){return e.repeat('&nbsp;',R.length-1)+' ';