/* copyright (c) 2003-2010, cksource - frederico knabben. all rights reserved. for licensing, see license.html or http://ckeditor.com/license */ (function(){if(!window.ckeditor)window.ckeditor=(function(){var a={timestamp:'a1qd',version:'3.2',revision:'5205',_:{},status:'unloaded',basepath:(function(){var d=window.ckeditor_basepath||'';if(!d){var e=document.getelementsbytagname('script');for(var f=0;f=0?'&':'?')+('t=')+this.timestamp;return d;}},b=window.ckeditor_geturl;if(b){var c=a.geturl;a.geturl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=ckeditor;if(!a.event){a.event=function(){};a.event.implementon=function(b,c){var d=a.event.prototype;for(var e in d)if(b[e]==undefined)b[e]=d[e];};a.event.prototype=(function(){var b=function(d){var e=d.getprivate&&d.getprivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getlistenerindex:function(d){for(var e=0,f=this.listeners;e=0;n--)if(k[n].priority<=h){k.splice(n+1,0,m);return;}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o=0)f.listeners.splice(g,1);}},haslisteners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;}};})();}if(!a.editor){a.element_mode_none=0;a.element_mode_replace=1;a.element_mode_appendto=2;a.editor=function(b,c,d){var e=this;e._={instanceconfig:b,element:c}; e.elementmode=d||0;a.event.call(e);e._init();};a.editor.replace=function(b,c){var d=b;if(typeof d!='object'){d=document.getelementbyid(b);if(!d){var e=0,f=document.getelementsbyname(b);while((d=f[e++])&&(d.tagname.tolowercase()!='textarea')){}}if(!d)throw '[ckeditor.editor.replace] the element with id or name "'+b+'" was not found.';}d.style.visibility='hidden';return new a.editor(c,d,1);};a.editor.appendto=function(b,c){var d=b;if(typeof d!='object'){d=document.getelementbyid(b);if(!d)throw '[ckeditor.editor.appendto] the element with id "'+b+'" was not found.';}return new a.editor(c,d,2);};a.editor.prototype={_init:function(){var b=a.editor._pending||(a.editor._pending=[]);b.push(this);},fire:function(b,c){return a.event.prototype.fire.call(this,b,c,this);},fireonce:function(b,c){return a.event.prototype.fireonce.call(this,b,c,this);}};a.event.implementon(a.editor.prototype,true);}if(!a.env)a.env=(function(){var b=navigator.useragent.tolowercase(),c=window.opera,d={ie:/*@cc_on!@*/false,opera:!!c&&c.version,webkit:b.indexof(' applewebkit/')>-1,air:b.indexof(' adobeair/')>-1,mac:b.indexof('macintosh')>-1,quirks:document.compatmode=='backcompat',iscustomdomain:function(){return this.ie&&document.domain!=window.location.hostname;}};d.gecko=navigator.product=='gecko'&&!d.webkit&&!d.opera;var e=0;if(d.ie){e=parsefloat(b.match(/msie (\d+)/)[1]);d.ie8=!!document.documentmode;d.ie8compat=document.documentmode==8;d.ie7compat=e==7&&!document.documentmode||document.documentmode==7;d.ie6compat=e<7||d.quirks;}if(d.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split('.');e=f[0]*10000+(f[1]||0)*(100)+ +(f[2]||0);}}if(d.opera)e=parsefloat(c.version());if(d.air)e=parsefloat(b.match(/ adobeair\/(\d+)/)[1]);if(d.webkit)e=parsefloat(b.match(/ applewebkit\/(\d+)/)[1]);d.version=e;d.iscompatible=d.ie&&e>=6||d.gecko&&e>=10801||d.opera&&e>=9.5||d.air&&e>=1||d.webkit&&e>=522||false;d.cssclass='cke_browser_'+(d.ie?'ie':d.gecko?'gecko':d.opera?'opera':d.air?'air':d.webkit?'webkit':'unknown');if(d.quirks)d.cssclass+=' cke_browser_quirks';if(d.ie){d.cssclass+=' cke_browser_ie'+(d.version<7?'6':d.version>=8?'8':'7');if(d.quirks)d.cssclass+=' cke_browser_iequirks';}if(d.gecko&&e<10900)d.cssclass+=' cke_browser_gecko18';return d;})();var b=a.env;var c=b.ie;if(a.status=='unloaded')(function(){a.event.implementon(a);a.loadfullcore=function(){if(a.status!='basic_ready'){a.loadfullcore._load=true;return;}delete a.loadfullcore;var e=document.createelement('script'); e.type='text/javascript';e.src=a.basepath+'ckeditor.js';document.getelementsbytagname('head')[0].appendchild(e);};a.loadfullcoretimeout=0;a.replaceclass='ckeditor';a.replacebyclassenabled=true;var d=function(e,f,g){if(b.iscompatible){if(a.loadfullcore)a.loadfullcore();var h=g(e,f);a.add(h);return h;}return null;};a.replace=function(e,f){return d(e,f,a.editor.replace);};a.appendto=function(e,f){return d(e,f,a.editor.appendto);};a.add=function(e){var f=this._.pending||(this._.pending=[]);f.push(e);};a.replaceall=function(){var e=document.getelementsbytagname('textarea');for(var f=0;f'+g+'');else h.push('');}return h.join('');},htmlencode:function(f){var g=function(k){var l=new d.element('span');l.settext(k);return l.gethtml();},h=g('\n').tolowercase()=='
'?function(k){return g(k).replace(/
/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'>');}:h,j=g(' ')=='  '?function(k){return i(k).replace(/ /g,' ');}:i;this.htmlencode=j;return this.htmlencode(f);},escapecssselector:function(f){return f.replace(/[\s#:.,$*^\[\]()~=+>]/g,'\\$&');},getnextnumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},settimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.settimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexof:array.prototype.indexof?function(f,g){return f.indexof(g);}:function(f,g){for(var h=0,i=f.length;h]*>/g,''):i;},getouterhtml:function(){var j=this;if(j.$.outerhtml)return j.$.outerhtml.replace(/<\?[^>]*>/,'');var i=j.$.ownerdocument.createelement('div');i.appendchild(j.$.clonenode(true));return i.innerhtml;},sethtml:function(i){return this.$.innerhtml=i;},settext:function(i){h.prototype.settext=this.$.innertext!=undefined?function(j){return this.$.innertext=j;}:function(j){return this.$.textcontent=j;};return this.settext(i);},getattribute:(function(){var i=function(j){return this.$.getattribute(j,2); };if(c&&(b.ie7compat||b.ie6compat))return function(j){var n=this;switch(j){case 'class':j='classname';break;case 'tabindex':var k=i.call(n,j);if(k!==0&&n.$.tabindex===0)k=null;return k;break;case 'checked':var l=n.$.attributes.getnameditem(j),m=l.specified?l.nodevalue:n.$.checked;return m?'checked':null;case 'hspace':return n.$.hspace;case 'style':return n.$.style.csstext;}return i.call(n,j);};else return i;})(),getchildren:function(){return new d.nodelist(this.$.childnodes);},getcomputedstyle:c?function(i){return this.$.currentstyle[e.cssstyletodomstyle(i)];}:function(i){return this.getwindow().$.getcomputedstyle(this.$,'').getpropertyvalue(i);},getdtd:function(){var i=f[this.getname()];this.getdtd=function(){return i;};return i;},getelementsbytag:g.prototype.getelementsbytag,gettabindex:c?function(){var i=this.$.tabindex;if(i===0&&!f.$tabindex[this.getname()]&&parseint(this.getattribute('tabindex'),10)!==0)i=-1;return i;}:b.webkit?function(){var i=this.$.tabindex;if(i==undefined){i=parseint(this.getattribute('tabindex'),10);if(isnan(i))i=-1;}return i;}:function(){return this.$.tabindex;},gettext:function(){return this.$.textcontent||this.$.innertext||'';},getwindow:function(){return this.getdocument().getwindow();},getid:function(){return this.$.id||null;},getnameatt:function(){return this.$.name||null;},getname:function(){var i=this.$.nodename.tolowercase();if(c){var j=this.$.scopename;if(j!='html')i=j.tolowercase()+':'+i;}return(this.getname=function(){return i;})();},getvalue:function(){return this.$.value;},getfirst:function(i){var j=this.$.firstchild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getnext(i);return k;},getlast:function(i){var j=this.$.lastchild,k=j&&new d.node(j);if(k&&i&&!i(k))k=k.getprevious(i);return k;},getstyle:function(i){return this.$.style[e.cssstyletodomstyle(i)];},is:function(){var i=this.getname();for(var j=0;j1||i.length==1&&i[0].nodename!='_cke_expando';},hasattribute:function(i){var j=this.$.attributes.getnameditem(i);return!!(j&&j.specified);},hide:function(){this.setstyle('display','none');},movechildren:function(i,j){var k=this.$;i=i.$;if(k==i)return;var l;if(j)while(l=k.lastchild)i.insertbefore(k.removechild(l),i.firstchild);else while(l=k.firstchild)i.appendchild(k.removechild(l));},show:function(){this.setstyles({display:'',visibility:''});},setattribute:(function(){var i=function(j,k){this.$.setattribute(j,k);return this;};if(c&&(b.ie7compat||b.ie6compat))return function(j,k){var l=this;if(j=='class')l.$.classname=k;else if(j=='style')l.$.style.csstext=k;else if(j=='tabindex')l.$.tabindex=k;else if(j=='checked')l.$.checked=k;else i.apply(l,arguments);return l;};else return i;})(),setattributes:function(i){for(var j in i)this.setattribute(j,i[j]);return this;},setvalue:function(i){this.$.value=i;return this;},removeattribute:(function(){var i=function(j){this.$.removeattribute(j);};if(c&&(b.ie7compat||b.ie6compat))return function(j){if(j=='class')j='classname';else if(j=='tabindex')j='tabindex';i.call(this,j);};else return i;})(),removeattributes:function(i){if(e.isarray(i))for(var j=0;j=100?'':'progid:dximagetransform.microsoft.alpha(opacity='+i+')');}else this.setstyle('opacity',i);},unselectable:b.gecko?function(){this.$.style.mozuserselect='none';}:b.webkit?function(){this.$.style.khtmluserselect='none';}:function(){if(c||b.opera){var i=this.$,j,k=0;i.unselectable='on';while(j=i.all[k++])switch(j.tagname.tolowercase()){case 'iframe':case 'textarea':case 'input':case 'select':break; default:j.unselectable='on';}}},getpositionedancestor:function(){var i=this;while(i.getname()!='html'){if(i.getcomputedstyle('position')!='static')return i;i=i.getparent();}return null;},getdocumentposition:function(i){var d=this;var j=0,k=0,l=d.getdocument().getbody(),m=d.getdocument().$.compatmode=='backcompat',n=d.getdocument();if(document.documentelement.getboundingclientrect){var o=d.$.getboundingclientrect(),p=n.$,q=p.documentelement,r=q.clienttop||l.$.clienttop||0,s=q.clientleft||l.$.clientleft||0,t=true;if(c){var u=n.getdocumentelement().contains(d),v=n.getbody().contains(d);t=m&&v||!m&&u;}if(t){j=o.left+(!m&&q.scrollleft||l.$.scrollleft);j-=s;k=o.top+(!m&&q.scrolltop||l.$.scrolltop);k-=r;}}else{var w=d,x=null,y;while(w&&!(w.getname()=='body'||w.getname()=='html')){j+=w.$.offsetleft-w.$.scrollleft;k+=w.$.offsettop-w.$.scrolltop;if(!w.equals(d)){j+=w.$.clientleft||0;k+=w.$.clienttop||0;}var z=x;while(z&&!z.equals(w)){j-=z.$.scrollleft;k-=z.$.scrolltop;z=z.getparent();}x=w;w=(y=w.$.offsetparent)?new h(y):null;}}if(i){var a=d.getwindow(),b=i.getwindow();if(!a.equals(b)&&a.$.frameelement){var c=new h(a.$.frameelement).getdocumentposition(i);j+=c.x;k+=c.y;}}if(!document.documentelement.getboundingclientrect)if(b.gecko&&!m){j+=d.$.clientleft?1:0;k+=d.$.clienttop?1:0;}return{x:j,y:k};},scrollintoview:function(i){var o=this;var j=o.getwindow(),k=j.getviewpanesize().height,l=k*-1;if(i)l+=k;else{l+=o.$.offsetheight||0;l+=parseint(o.getcomputedstyle('marginbottom')||0,10)||0;}var m=o.getdocumentposition();l+=m.y;l=l<0?0:l;var n=j.getscrollposition().y;if(l>n||lwindow.settimeout(function(){window.close();},50);")');}return i&&new g(i.contentwindow.document);},copyattributes:function(i,j){var p=this;var k=p.$.attributes;j=j||{};for(var l=0;l0&&j)j=j.childnodes[i.shift()];return j?new d.node(j):null;},getchildcount:function(){return this.$.childnodes.length;},disablecontextmenu:function(){this.on('contextmenu',function(i){if(!i.data.gettarget().hasclass('cke_enable_context_menu'))i.data.preventdefault();});}});a.command=function(i,j){this.uiitems=[];this.exec=function(k){if(this.state==0)return false;if(this.editorfocus)i.focus();return j.exec.call(this,i,k)!==false;};e.extend(this,j,{modes:{wysiwyg:1},editorfocus:true,state:2});a.event.call(this);};a.command.prototype={enable:function(){var i=this;if(i.state==0)i.setstate(!i.preservestate||typeof i.previousstate=='undefined'?2:i.previousstate);},disable:function(){this.setstate(0);},setstate:function(i){var j=this;if(j.state==i)return false;j.previousstate=j.state;j.state=i;j.fire('state');return true;},togglestate:function(){var i=this;if(i.state==2)i.setstate(1);else if(i.state==1)i.setstate(2);}};a.event.implementon(a.command.prototype,true);a.enter_p=1;a.enter_br=2;a.enter_div=3;a.config={customconfig:'config.js',autoupdateelement:true,basehref:'',contentscss:a.basepath+'contents.css',contentslangdirection:'ltr',language:'zh-cn',defaultlanguage:'en',entermode:1,shiftentermode:2,coreplugins:'',doctype:'',bodyid:'',bodyclass:'',fullpage:false,height:200,plugins:'about,basicstyles,blockquote,button,clipboard,colorbutton,colordialog,contextmenu,div,elementspath,enterkey,entities,filebrowser,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,maximize,pagebreak,pastefromword,pastetext,popup,removeformat,resize,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,media,codeblock',extraplugins:'',removeplugins:'',protectedsource:[],tabindex:0,theme:'default',skin:'blue',width:'',basefloatzindex:10000,filebrowseruploadurl:a.basepath+'upload.aspx',linkuploadallowedextensions:'txt|doc|rar|zip',imageuploadallowedextensions:'jpg|gif|jpeg|png|bmp',flashuploadallowedextensions:'swf|flv|wmv|mp3|rm|rmvb|avi'}; var i=a.config;a.focusmanager=function(j){if(j.focusmanager)return j.focusmanager;this.hasfocus=false;this._={editor:j};return this;};a.focusmanager.prototype={focus:function(){var k=this;if(k._.timer)cleartimeout(k._.timer);if(!k.hasfocus){if(a.currentinstance)a.currentinstance.focusmanager.forceblur();var j=k._.editor;j.container.getchild(1).addclass('cke_focus');k.hasfocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)cleartimeout(j._.timer);j._.timer=settimeout(function(){delete j._.timer;j.forceblur();},100);},forceblur:function(){if(this.hasfocus){var j=this._.editor;j.container.getchild(1).removeclass('cke_focus');this.hasfocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptloader.load(a.geturl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userlanguage||navigator.language;var n=l.tolowercase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptloader=(function(){var j={},k={};return{load:function(l,m,n,o,p){var q=typeof l=='string';if(q)l=[l];if(!n)n=a;var r=l.length,s=[],t=[],u=function(z){if(m)if(q)m.call(n,z);else m.call(n,s,t);};if(r===0){u(true);return;}var v=function(z,a){(a?s:t).push(z);if(--r<=0){p&&a.document.getdocumentelement().removestyle('cursor');u(a);}},w=function(z,a){j[z]=1;var b=k[z];delete k[z];for(var c=0;c1)return;var b=new h('script');b.setattributes({type:'text/javascript',src:z});if(m)if(c)b.$.onreadystatechange=function(){if(b.$.readystate=='loaded'||b.$.readystate=='complete'){b.$.onreadystatechange=null;w(z,true);}};else{b.$.onload=function(){settimeout(function(){w(z,true);},0);};b.$.onerror=function(){w(z,false);};}b.appendto(a.document.gethead());};p&&a.document.getdocumentelement().setstyle('cursor','wait');for(var y=0;y0){t(v);a.imagecacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isloaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,a=function(){if(y&&z){q._isloaded=1;for(var d=0;d=0?x.langcode:j[0];if(!i.lang[l])g.push(a.geturl(k+'lang/'+l+'.js'));else{e.extend(x.lang,i.lang[l]);l=null;}}f.push(l);e.push(i);}a.scriptloader.load(g,function(){var m=['beforeinit','init','afterinit'];for(var n=0;n]+)>)|(?:!--([\\s|\\s]*?)-->)|(?:([^\\s>]+)\\s*((?:(?:[^\"'>]+)|(?:\"[^\"]*\")|(?:'[^']*'))*)\\/?>))",'g')};};(function(){var l=/([\w\-:.]+)(?:(?:\s*=\s*(?:(?:"([^"]*)")|(?:'([^']*)')|([^\s>]+)))|(?=\s|$))/g,m={checked:1,compact:1,declare:1,defer:1,disabled:1,ismap:1,multiple:1,nohref:1,noresize:1,noshade:1,nowrap:1,readonly:1,selected:1};a.htmlparser.prototype={ontagopen:function(){},ontagclose:function(){},ontext:function(){},oncdata:function(){},oncomment:function(){},parse:function(n){var a=this;var o,p,q=0,r;while(o=a._.htmlpartsregex.exec(n)){var s=o.index;if(s>q){var t=n.substring(q,s);if(r)r.push(t);else a.ontext(t);}q=a._.htmlpartsregex.lastindex;if(p=o[1]){p=p.tolowercase();if(r&&f.$cdata[p]){a.oncdata(r.join(''));r=null;}if(!r){a.ontagclose(p);continue;}}if(r){r.push(o[0]);continue;}if(p=o[3]){p=p.tolowercase();var u={},v,w=o[4],x=!!(w&&w.charat(w.length-1)=='/');if(w)while(v=l.exec(w)){var y=v[1].tolowercase(),z=v[2]||v[3]||v[4]||'';if(!z&&m[y])u[y]=y;else u[y]=z;}a.ontagopen(p,u,x);if(!r&&f.$cdata[p])r=[]; continue;}if(p=o[2])a.oncomment(p);}if(n.length>q)a.ontext(n.substring(q,n.length));}};})();a.htmlparser.comment=function(l){this.value=l;this._={isblocklike:false};};a.htmlparser.comment.prototype={type:8,writehtml:function(l,m){var n=this.value;if(m){if(!(n=m.oncomment(n,this)))return;if(typeof n!='string'){n.parent=this.parent;n.writehtml(l,m);return;}}l.comment(n);}};(function(){var l=/[\t\r\n ]{2,}|[\t\r\n]/g;a.htmlparser.text=function(m){this.value=m;this._={isblocklike:false};};a.htmlparser.text.prototype={type:3,writehtml:function(m,n){var o=this.value;if(n&&!(o=n.ontext(o,this)))return;m.text(o);}};})();(function(){a.htmlparser.cdata=function(l){this.value=l;};a.htmlparser.cdata.prototype={type:3,writehtml:function(l){l.write(this.value);}};})();a.htmlparser.fragment=function(){this.children=[];this.parent=null;this._={isblocklike:true,hasinlinestarted:false};};(function(){var l={colgroup:1,dd:1,dt:1,li:1,option:1,p:1,td:1,tfoot:1,th:1,thead:1,tr:1},m=e.extend({table:1,ul:1,ol:1,dl:1},f.table,f.ul,f.ol,f.dl),n=f.$list,o=f.$listitem;a.htmlparser.fragment.fromhtml=function(p,q){var r=new a.htmlparser(),s=[],t=new a.htmlparser.fragment(),u=[],v=[],w=t,x=false,y;function z(e){var f;if(u.length>0)for(var g=0;g=0;f--)if(e==u[f].name){u.splice(f,1);return;}var g=[],h=[],i=w;while(i.type&&i.name!=e){if(!i._.isblocklike)h.unshift(i);g.push(i);i=i.parent;}if(i.type){for(f=0;f0&&s.children[q-1]||null;if(r){if(p._.isblocklike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasinlinestarted=p.type==3||p.type==1&&!p._.isblocklike;},writehtml:function(p,q){var r;this.filterchildren=function(){var s=new a.htmlparser.basicwriter();this.writechildrenhtml.call(this,s,q,true);var t=s.gethtml();this.children=new a.htmlparser.fragment.fromhtml(t).children;r=1;};!this.name&&q&&q.onfragment(this);this.writechildrenhtml(p,r?null:q);},writechildrenhtml:function(p,q){for(var r=0;rn?1:0;};a.htmlparser.element.prototype={type:1,add:a.htmlparser.fragment.prototype.add,clone:function(){return new a.htmlparser.element(this.name,this.attributes);},writehtml:function(m,n){var o=this.attributes,p=this,q=p.name,r,s,t,u;p.filterchildren=function(){if(!u){var z=new a.htmlparser.basicwriter();a.htmlparser.fragment.prototype.writechildrenhtml.call(p,z,n); p.children=new a.htmlparser.fragment.fromhtml(z.gethtml()).children;u=1;}};if(n){for(;;){if(!(q=n.onelementname(q)))return;p.name=q;if(!(p=n.onelement(p)))return;p.parent=this.parent;if(p.name==q)break;if(p.type!=1){p.writehtml(m,n);return;}q=p.name;if(!q){this.writechildrenhtml.call(p,m,u?null:n);return;}}o=p.attributes;}m.opentag(q,o);var v=[];for(var w=0;w<2;w++)for(r in o){s=r;t=o[r];if(w==1)v.push([r,t]);else if(n){for(;;)if(!(s=n.onattributename(r))){delete o[r];break;}else if(s!=r){delete o[r];r=s;continue;}else break;if(s)if((t=n.onattribute(p,s,t))===(false))delete o[s];else o[s]=t;}}if(m.sortattributes)v.sort(l);var x=v.length;for(w=0;w=0;u--){var x=r[u];if(x){x.pri=s;q.splice(t,0,x);}}}};function n(q,r,s){if(r)for(var t in r){var u=q[t];q[t]=o(u,r[t],s);if(!u)q.$length++;}};function o(q,r,s){if(r){r.pri=s;if(q){if(!q.splice){if(q.pri>s)q=[r,q];else q=[q,r];q.filter=p;}else m(q,r,s);return q;}else{r.filter=r;return r;}}};function p(q){var r=typeof q=='object';for(var s=0;s');else this._.output.push('>');},attribute:function(l,m){if(typeof m=='string')m=m.replace(/"/g,'"');this._.output.push(' ',l,'="',m,'"');},closetag:function(l){this._.output.push('');},text:function(l){this._.output.push(l);},comment:function(l){this._.output.push('');},write:function(l){this._.output.push(l);},reset:function(){this._.output=[];this._.indent=false;},gethtml:function(l){var m=this._.output.join('');if(l)this.reset();return m;}}});delete a.loadfullcore;a.instances={};a.document=new g(document);a.add=function(l){a.instances[l.name]=l;l.on('focus',function(){if(a.currentinstance!=l){a.currentinstance=l;a.fire('currentinstance');}});l.on('blur',function(){if(a.currentinstance==l){a.currentinstance=null;a.fire('currentinstance');}});};a.remove=function(l){delete a.instances[l.name];};a.tristate_on=1;a.tristate_off=2;a.tristate_disabled=0;d.comment=e.createclass({base:d.node,$:function(l,m){if(typeof l=='string')l=(m?m.$:document).createcomment(l);this.base(l);},proto:{type:8,getouterhtml:function(){return '';}}});(function(){var l={address:1,blockquote:1,dl:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,p:1,pre:1,li:1,dt:1,de:1},m={body:1,div:1,table:1,tbody:1,tr:1,td:1,th:1,caption:1,form:1},n=function(o){var p=o.getchildren();for(var q=0,r=p.count();q0&&d.getchild(w.startoffset-1);this._.guardrtl=function(g,h){return(!h||!d.equals(g))&&((!e||!g.equals(e))&&(g.type!=1||!h||g.getname()!='body'));};}var f=t?this._.guardrtl:this._.guardltr;if(y)x=function(g,h){if(f(g,h)===false)return false;return y(g,h);};else x=f;if(this.current)v=this.current[a](false,z,x);else if(t){v=w.endcontainer;if(w.endoffset>0){v=v.getchild(w.endoffset-1);if(x(v)===false)v=null;}else v=x(v)===false?null:v.getprevioussourcenode(true,z,x);}else{v=w.startcontainer;v=v.getchild(w.startoffset);if(v){if(x(v)===false)v=null;}else v=x(w.startcontainer)===false?null:w.startcontainer.getnextsourcenode(true,z,x);}while(v&&!this._.end){this.current=v;if(!this.evaluator||this.evaluator(v)!==false){if(!u)return v;}else if(u&&this.evaluator)return false; v=v[a](false,z,x);}this.end();return this.current=null;};function m(t){var u,v=null;while(u=l.call(this,t))v=u;return v;};d.walker=e.createclass({$:function(t){this.range=t;this._={};},proto:{end:function(){this._.end=1;},next:function(){return l.call(this);},previous:function(){return l.call(this,true);},checkforward:function(){return l.call(this,false,true)!==false;},checkbackward:function(){return l.call(this,true,true)!==false;},lastforward:function(){return m.call(this);},lastbackward:function(){return m.call(this,true);},reset:function(){delete this.current;this._={};}}});var n={block:1,'list-item':1,table:1,'table-row-group':1,'table-header-group':1,'table-footer-group':1,'table-row':1,'table-column-group':1,'table-column':1,'table-cell':1,'table-caption':1},o={hr:1};h.prototype.isblockboundary=function(t){var u=e.extend({},o,t||{});return n[this.getcomputedstyle('display')]||u[this.getname()];};d.walker.blockboundary=function(t){return function(u,v){return!(u.type==1&&u.isblockboundary(t));};};d.walker.listitemboundary=function(){return this.blockboundary({br:1});};d.walker.bookmarkcontents=function(t){},d.walker.bookmark=function(t,u){function v(w){return w&&w.getname&&w.getname()=='span'&&w.hasattribute('_fck_bookmark');};return function(w){var x,y;x=w&&!w.getname&&(y=w.getparent())&&(v(y));x=t?x:x||v(w);return u^x;};};d.walker.whitespaces=function(t){return function(u){var v=u&&u.type==3&&!e.trim(u.gettext());return t^v;};};d.walker.invisible=function(t){var u=d.walker.whitespaces();return function(v){var w=u(v)||v.is&&!v.$.offsetheight;return t^w;};};var p=/^[\t\r\n ]*(?: |\xa0)$/,q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true),s=function(t){return r(t)&&q(t);};h.prototype.getbogus=function(){var t=this.getlast(s);if(t&&(!c?t.is&&t.is('br'):t.gettext&&p.test(t.gettext())))return t;return false;};})();d.range=function(l){var m=this;m.startcontainer=null;m.startoffset=null;m.endcontainer=null;m.endoffset=null;m.collapsed=true;m.document=l;};(function(){var l=function(t){t.collapsed=t.startcontainer&&t.endcontainer&&t.startcontainer.equals(t.endcontainer)&&t.startoffset==t.endoffset;},m=function(t,u,v){t.optimizebookmark();var w=t.startcontainer,x=t.endcontainer,y=t.startoffset,z=t.endoffset,a,b;if(x.type==3)x=x.split(z);else if(x.getchildcount()>0)if(z>=x.getchildcount()){x=x.append(t.document.createtext(''));b=true;}else x=x.getchild(z);if(w.type==3){w.split(y);if(w.equals(x))x=w.getnext();}else if(!y){w=w.getfirst().insertbeforeme(t.document.createtext('')); a=true;}else if(y>=w.getchildcount()){w=w.append(t.document.createtext(''));a=true;}else w=w.getchild(y).getprevious();var c=w.getparents(),d=x.getparents(),e,f,g;for(e=0;e0&&!i.equals(x))j=h.append(i.clone());if(!c[n]||i.$.parentnode!=c[n].$.parentnode){k=i.getprevious();while(k){if(k.equals(c[n])||k.equals(w))break;l=k.getprevious();if(u==2)h.$.insertbefore(k.$.clonenode(true),h.$.firstchild);else{k.remove();if(u==1)h.$.insertbefore(k.$,h.$.firstchild);}k=l;}}if(h)h=j;}if(u==2){var o=t.startcontainer;if(o.type==3){o.$.data+=o.$.nextsibling.data;o.$.parentnode.removechild(o.$.nextsibling);}var p=t.endcontainer;if(p.type==3&&p.$.nextsibling){p.$.data+=p.$.nextsibling.data;p.$.parentnode.removechild(p.$.nextsibling);}}else{if(f&&g&&(w.$.parentnode!=f.$.parentnode||x.$.parentnode!=g.$.parentnode)){var q=g.getindex();if(a&&g.$.parentnode==w.$.parentnode)q--;t.setstart(g.getparent(),q);}t.collapse(true);}if(a)w.remove();if(b&&x.$.parentnode)x.remove();},n={abbr:1,acronym:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1};function o(t){var u=false,v=d.walker.bookmark(true);return function(w){if(v(w))return true;if(w.type==3){if(e.trim(w.gettext()).length)return false;}else if(w.type==1)if(!n[w.getname()])if(!t&&!c&&w.getname()=='br'&&!u)u=true;else return false;return true;};};function p(t){return t.type!=3&&t.getname() in f.$removeempty||!e.trim(t.gettext())||t.getparent().hasattribute('_fck_bookmark');};var q=new d.walker.whitespaces(),r=new d.walker.bookmark();function s(t){return!q(t)&&!r(t);};d.range.prototype={clone:function(){var u=this;var t=new d.range(u.document);t.startcontainer=u.startcontainer;t.startoffset=u.startoffset;t.endcontainer=u.endcontainer;t.endoffset=u.endoffset;t.collapsed=u.collapsed;return t;},collapse:function(t){var u=this;if(t){u.endcontainer=u.startcontainer;u.endoffset=u.startoffset;}else{u.startcontainer=u.endcontainer;u.startoffset=u.endoffset;}u.collapsed=true;},clonecontents:function(){var t=new d.documentfragment(this.document);if(!this.collapsed)m(this,2,t);return t;},deletecontents:function(){if(this.collapsed)return; m(this,0);},extractcontents:function(){var t=new d.documentfragment(this.document);if(!this.collapsed)m(this,1,t);return t;},createbookmark:function(t){var y=this;var u,v,w,x;u=y.document.createelement('span');u.setattribute('_fck_bookmark',1);u.setstyle('display','none');u.sethtml(' ');if(t){w='cke_bm_'+e.getnextnumber();u.setattribute('id',w+'s');}if(!y.collapsed){v=u.clone();v.sethtml(' ');if(t)v.setattribute('id',w+'e');x=y.clone();x.collapse();x.insertnode(v);}x=y.clone();x.collapse(true);x.insertnode(u);if(v){y.setstartafter(u);y.setendbefore(v);}else y.movetoposition(u,4);return{startnode:t?w+'s':u,endnode:t?w+'e':v,serializable:t};},createbookmark2:function(t){var a=this;var u=a.startcontainer,v=a.endcontainer,w=a.startoffset,x=a.endoffset,y,z;if(!u||!v)return{start:0,end:0};if(t){if(u.type==1){y=u.getchild(w);if(y&&y.type==3&&w>0&&y.getprevious().type==3){u=y;w=0;}}while(u.type==3&&(z=u.getprevious())&&(z.type==3)){u=z;w+=z.getlength();}if(!a.iscollapsed){if(v.type==1){y=v.getchild(x);if(y&&y.type==3&&x>0&&y.getprevious().type==3){v=y;x=0;}}while(v.type==3&&(z=v.getprevious())&&(z.type==3)){v=z;x+=z.getlength();}}}return{start:u.getaddress(t),end:a.iscollapsed?null:v.getaddress(t),startoffset:w,endoffset:x,normalized:t,is2:true};},movetobookmark:function(t){var b=this;if(t.is2){var u=b.document.getbyaddress(t.start,t.normalized),v=t.startoffset,w=t.end&&b.document.getbyaddress(t.end,t.normalized),x=t.endoffset;b.setstart(u,v);if(w)b.setend(w,x);else b.collapse(true);}else{var y=t.serializable,z=y?b.document.getbyid(t.startnode):t.startnode,a=y?b.document.getbyid(t.endnode):t.endnode;b.setstartbefore(z);z.remove();if(a){b.setendbefore(a);a.remove();}else b.collapse(true);}},getboundarynodes:function(){var y=this;var t=y.startcontainer,u=y.endcontainer,v=y.startoffset,w=y.endoffset,x;if(t.type==1){x=t.getchildcount();if(x>v)t=t.getchild(v);else if(x<1)t=t.getprevioussourcenode();else{t=t.$;while(t.lastchild)t=t.lastchild;t=new d.node(t);t=t.getnextsourcenode()||t;}}if(u.type==1){x=u.getchildcount();if(x>w)u=u.getchild(w).getprevioussourcenode(true);else if(x<1)u=u.getprevioussourcenode();else{u=u.$;while(u.lastchild)u=u.lastchild;u=new d.node(u);}}if(t.getposition(u)&2)t=u;return{startnode:t,endnode:u};},getcommonancestor:function(t,u){var y=this;var v=y.startcontainer,w=y.endcontainer,x;if(v.equals(w)){if(t&&v.type==1&&y.startoffset==y.endoffset-1)x=v.getchild(y.startoffset);else x=v;}else x=v.getcommonancestor(w);return u&&!x.is?x.getparent():x; },optimize:function(){var v=this;var t=v.startcontainer,u=v.startoffset;if(t.type!=1)if(!u)v.setstartbefore(t);else if(u>=t.getlength())v.setstartafter(t);t=v.endcontainer;u=v.endoffset;if(t.type!=1)if(!u)v.setendbefore(t);else if(u>=t.getlength())v.setendafter(t);},optimizebookmark:function(){var v=this;var t=v.startcontainer,u=v.endcontainer;if(t.is&&t.is('span')&&t.hasattribute('_fck_bookmark'))v.setstartat(t,3);if(u&&u.is&&u.is('span')&&u.hasattribute('_fck_bookmark'))v.setendat(u,4);},trim:function(t,u){var b=this;var v=b.startcontainer,w=b.startoffset,x=b.collapsed;if((!t||x)&&(v&&v.type==3)){if(!w){w=v.getindex();v=v.getparent();}else if(w>=v.getlength()){w=v.getindex()+1;v=v.getparent();}else{var y=v.split(w);w=v.getindex()+1;v=v.getparent();if(b.startcontainer.equals(b.endcontainer))b.setend(y,b.endoffset-b.startoffset);else if(v.equals(b.endcontainer))b.endoffset+=1;}b.setstart(v,w);if(x){b.collapse(true);return;}}var z=b.endcontainer,a=b.endoffset;if(!(u||x)&&z&&z.type==3){if(!a){a=z.getindex();z=z.getparent();}else if(a>=z.getlength()){a=z.getindex()+1;z=z.getparent();}else{z.split(a);a=z.getindex()+1;z=z.getparent();}b.setend(z,a);}},enlarge:function(t){switch(t){case 1:if(this.collapsed)return;var u=this.getcommonancestor(),v=this.document.getbody(),w,x,y,z,a,b=false,c,d,e=this.startcontainer,f=this.startoffset;if(e.type==3){if(f){e=!e.trim(e.substring(0,f)).length&&e;b=!!e;}if(e)if(!(z=e.getprevious()))y=e.getparent();}else{if(f)z=e.getchild(f-1)||e.getlast();if(!z)y=e;}while(y||z){if(y&&!z){if(!a&&y.equals(u))a=true;if(!v.contains(y))break;if(!b||y.getcomputedstyle('display')!='inline'){b=false;if(a)w=y;else this.setstartbefore(y);}z=y.getprevious();}while(z){c=false;if(z.type==3){d=z.gettext();if(/[^\s\ufeff]/.test(d))z=null;c=/[\s\ufeff]$/.test(d);}else if(z.$.offsetwidth>0&&!z.getattribute('_fck_bookmark'))if(b&&f.$removeempty[z.getname()]){d=z.gettext();if(!/[^\s\ufeff]/.test(d))z=null;else{var g=z.$.all||z.$.getelementsbytagname('*');for(var h=0,i;i=g[h++];)if(!f.$removeempty[i.nodename.tolowercase()]){z=null;break;}}if(z)c=!!d.length;}else z=null;if(c)if(b){if(a)w=y;else if(y)this.setstartbefore(y);}else b=true;if(z){var j=z.getprevious();if(!y&&!j){y=z;z=null;break;}z=j;}else y=null;}if(y)y=y.getparent();}e=this.endcontainer;f=this.endoffset;y=z=null;a=b=false;if(e.type==3){e=!e.trim(e.substring(f)).length&&e;b=!(e&&e.getlength());if(e)if(!(z=e.getnext()))y=e.getparent();}else{z=e.getchild(f);if(!z)y=e;}while(y||z){if(y&&!z){if(!a&&y.equals(u))a=true; if(!v.contains(y))break;if(!b||y.getcomputedstyle('display')!='inline'){b=false;if(a)x=y;else if(y)this.setendafter(y);}z=y.getnext();}while(z){c=false;if(z.type==3){d=z.gettext();if(/[^\s\ufeff]/.test(d))z=null;c=/^[\s\ufeff]/.test(d);}else if(z.$.offsetwidth>0&&!z.getattribute('_fck_bookmark'))if(b&&f.$removeempty[z.getname()]){d=z.gettext();if(!/[^\s\ufeff]/.test(d))z=null;else{g=z.$.all||z.$.getelementsbytagname('*');for(h=0;i=g[h++];)if(!f.$removeempty[i.nodename.tolowercase()]){z=null;break;}}if(z)c=!!d.length;}else z=null;if(c)if(b)if(a)x=y;else this.setendafter(y);if(z){j=z.getnext();if(!y&&!j){y=z;z=null;break;}z=j;}else y=null;}if(y)y=y.getparent();}if(w&&x){u=w.contains(x)?x:w;this.setstartbefore(u);this.setendafter(u);}break;case 2:case 3:var k=new d.range(this.document);v=this.document.getbody();k.setstartat(v,1);k.setend(this.startcontainer,this.startoffset);var l=new d.walker(k),m,n,o=d.walker.blockboundary(t==3?{br:1}:null),p=function(r){var s=o(r);if(!s)m=r;return s;},q=function(r){var s=p(r);if(!s&&r.is&&r.is('br'))n=r;return s;};l.guard=p;y=l.lastbackward();m=m||v;this.setstartat(m,!m.is('br')&&(!y&&this.checkstartofblock()||y&&m.contains(y))?1:4);k=this.clone();k.collapse();k.setendat(v,2);l=new d.walker(k);l.guard=t==3?q:p;m=null;y=l.lastforward();m=m||v;this.setendat(m,!y&&this.checkendofblock()||y&&m.contains(y)?2:3);if(n)this.setendafter(n);}},insertnode:function(t){var x=this;x.optimizebookmark();x.trim(false,true);var u=x.startcontainer,v=x.startoffset,w=u.getchild(v);if(w)t.insertbefore(w);else u.append(t);if(t.getparent().equals(x.endcontainer))x.endoffset++;x.setstartbefore(t);},movetoposition:function(t,u){this.setstartat(t,u);this.collapse(true);},selectnodecontents:function(t){this.setstart(t,0);this.setend(t,t.type==3?t.getlength():t.getchildcount());},setstart:function(t,u){var v=this;v.startcontainer=t;v.startoffset=u;if(!v.endcontainer){v.endcontainer=t;v.endoffset=u;}l(v);},setend:function(t,u){var v=this;v.endcontainer=t;v.endoffset=u;if(!v.startcontainer){v.startcontainer=t;v.startoffset=u;}l(v);},setstartafter:function(t){this.setstart(t.getparent(),t.getindex()+1);},setstartbefore:function(t){this.setstart(t.getparent(),t.getindex());},setendafter:function(t){this.setend(t.getparent(),t.getindex()+1);},setendbefore:function(t){this.setend(t.getparent(),t.getindex());},setstartat:function(t,u){var v=this;switch(u){case 1:v.setstart(t,0);break;case 2:if(t.type==3)v.setstart(t,t.getlength());else v.setstart(t,t.getchildcount()); break;case 3:v.setstartbefore(t);break;case 4:v.setstartafter(t);}l(v);},setendat:function(t,u){var v=this;switch(u){case 1:v.setend(t,0);break;case 2:if(t.type==3)v.setend(t,t.getlength());else v.setend(t,t.getchildcount());break;case 3:v.setendbefore(t);break;case 4:v.setendafter(t);}l(v);},fixblock:function(t,u){var x=this;var v=x.createbookmark(),w=x.document.createelement(u);x.collapse(t);x.enlarge(2);x.extractcontents().appendto(w);w.trim();if(!c)w.appendbogus();x.insertnode(w);x.movetobookmark(v);return w;},splitblock:function(t){var d=this;var u=new d.elementpath(d.startcontainer),v=new d.elementpath(d.endcontainer),w=u.blocklimit,x=v.blocklimit,y=u.block,z=v.block,a=null;if(!w.equals(x))return null;if(t!='br'){if(!y){y=d.fixblock(true,t);z=new d.elementpath(d.endcontainer).block;}if(!z)z=d.fixblock(false,t);}var b=y&&d.checkstartofblock(),c=z&&d.checkendofblock();d.deletecontents();if(y&&y.equals(z))if(c){a=new d.elementpath(d.startcontainer);d.movetoposition(z,4);z=null;}else if(b){a=new d.elementpath(d.startcontainer);d.movetoposition(y,3);y=null;}else{z=d.splitelement(y);if(!c&&!y.is('ul','ol'))y.appendbogus();}return{previousblock:y,nextblock:z,wasstartofblock:b,wasendofblock:c,elementpath:a};},splitelement:function(t){var w=this;if(!w.collapsed)return null;w.setendat(t,2);var u=w.extractcontents(),v=t.clone(false);u.appendto(v);v.insertafter(t);w.movetoposition(t,4);return v;},checkboundaryofelement:function(t,u){var v=this.clone();v[u==1?'setstartat':'setendat'](t,u==1?1:2);var w=new d.walker(v),x=false;w.evaluator=p;return w[u==1?'checkbackward':'checkforward']();},checkstartofblock:function(){var z=this;var t=z.startcontainer,u=z.startoffset;if(u&&t.type==3){var v=e.ltrim(t.substring(0,u));if(v.length)return false;}z.trim();var w=new d.elementpath(z.startcontainer),x=z.clone();x.collapse(true);x.setstartat(w.block||w.blocklimit,1);var y=new d.walker(x);y.evaluator=o(true);return y.checkbackward();},checkendofblock:function(){var z=this;var t=z.endcontainer,u=z.endoffset;if(t.type==3){var v=e.rtrim(t.substring(u));if(v.length)return false;}z.trim();var w=new d.elementpath(z.endcontainer),x=z.clone();x.collapse(false);x.setendat(w.block||w.blocklimit,2);var y=new d.walker(x);y.evaluator=o(false);return y.checkforward();},movetoelementeditableposition:function(t,u){var v;while(t&&t.type==1){v=t.iseditable();if(v)this.movetoposition(t,u?2:1);else if(f.$inline[t.getname()]){this.movetoposition(t,u?4:3);return true;}if(f.$empty[t.getname()])t=t[u?'getprevious':'getnext'](s); else t=t[u?'getlast':'getfirst'](s);if(t&&t.type==3){this.movetoposition(t,u?4:3);return true;}}return v;},movetoelementeditstart:function(t){return this.movetoelementeditableposition(t);},movetoelementeditend:function(t){return this.movetoelementeditableposition(t,true);},getenclosednode:function(){var t=this.clone(),u=new d.walker(t),v=d.walker.bookmark(true),w=d.walker.whitespaces(true),x=function(z){return w(z)&&v(z);};t.evaluator=x;var y=u.next();u.reset();return y&&y.equals(u.previous())?y:null;},gettouchedstartnode:function(){var t=this.startcontainer;if(this.collapsed||t.type!=1)return t;return t.getchild(this.startoffset)||t;},gettouchedendnode:function(){var t=this.endcontainer;if(this.collapsed||t.type!=1)return t;return t.getchild(this.endoffset-1)||t;}};})();a.position_after_start=1;a.position_before_end=2;a.position_before_start=3;a.position_after_end=4;a.enlarge_element=1;a.enlarge_block_contents=2;a.enlarge_list_item_contents=3;a.start=1;a.end=2;a.startend=3;(function(){var l=c&&b.version<7,m=c&&b.version==7,n=l?a.basepath+'images/spacer.gif':m?'about:blank':'data:image/png;base64,',o=h.createfromhtml('
',a.document);o.appendto(a.document.gethead());try{b.hc=o.getcomputedstyle('background-image')=='none';}catch(p){b.hc=false;}if(b.hc)b.cssclass+=' cke_hc';o.remove();})();j.load(i.coreplugins.split(','),function(){a.status='loaded';a.fire('loaded');var l=a._.pending;if(l){delete a._.pending;for(var m=0;m','=10900&&!n.hc?'':'" href="javascript:void(\''+(this.title||'').replace("'")+"')\"",' title="',this.title,'" tabindex="-1" hidefocus="true" role="button" aria-labelledby="'+o+'_label"'+(this.hasarrow?' aria-haspopup="true"':''));if(n.opera||n.gecko&&n.mac)m.push(' onkeypress="return false;"');if(n.gecko)m.push(' onblur="this.style.csstext = this.style.csstext;"');m.push(' onkeydown="return ckeditor.ui.button._.keydown(',r,', event);" onfocus="return ckeditor.ui.button._.focus(',r,', event);" onclick="ckeditor.tools.callfunction(',q,', this); return false;">',this.label,'');if(this.hasarrow)m.push('');m.push('','');if(this.onrender)this.onrender();return p;},setstate:function(l){if(this._.state==l)return false;this._.state=l;var m=a.document.getbyid(this._.id);if(m){m.setstate(l);l==0?m.setattribute('aria-disabled',true):m.removeattribute('aria-disabled');l==1?m.setattribute('aria-pressed',true):m.removeattribute('aria-pressed');return true;}else return false;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getkeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventbubble(); return o;}};k.prototype.addbutton=function(l,m){this.add(l,1,m);};(function(){var l=function(u,v){var w=u.document,x=w.getbody(),y=false,z=function(){y=true;};x.on(v,z);w.$.execcommand(v);x.removelistener(v,z);return y;},m=c?function(u,v){return l(u,v);}:function(u,v){try{return u.document.$.execcommand(v);}catch(w){return false;}},n=function(u){this.type=u;this.canundo=this.type=='cut';};n.prototype={exec:function(u,v){var w=m(u,this.type);if(!w)alert(u.lang.clipboard[this.type+'error']);return w;}};var o,p=function(){if(!c)return false;var u=a.document,v=u.getbody();if(!o){o=u.createelement('div',{attributes:{id:'cke_hiddendiv'},styles:{position:'absolute',visibility:'hidden',overflow:'hidden',width:'1px',height:'1px'}});o.sethtml('');o.appendto(v);}var w=v.$.createtextrange();w.movetoelementtext(o.$);w.execcommand('paste');var x=o.gethtml();o.sethtml('');return x;},q={canundo:false,exec:c?function(u){u.focus();if(u.config.wordpic){var v=p(),w=/<\w[^>]*(( class="?msonormal"?)|(="mso-))/gi;if(w.test(v)){v=r(v);var x=//ig;if(x.test(v))v=s(u,v);v=v.replace(//ig,'');u.inserthtml(v);return false;}}if(!u.document.getbody().fire('beforepaste')&&!l(u,'paste')){u.fire('pastedialog');return false;}}:function(u){try{if(!u.document.getbody().fire('beforepaste')&&!u.document.$.execcommand('paste',false,null))throw 0;}catch(v){settimeout(function(){u.fire('pastedialog');},0);return false;}}},r=function(u){u=u.replace(/\s*<\/o:p>/g,'');u=u.replace(/[\s\s]*?<\/o:p>/g,' ');u=u.replace(/\s*mso-[^:]+:[^;"]+;?/gi,'');u=u.replace(/\s*margin: 0cm 0cm 0pt\s*;/gi,'');u=u.replace(/\s*margin: 0cm 0cm 0pt\s*"/gi,'"');u=u.replace(/\s*text-indent: 0cm\s*;/gi,'');u=u.replace(/\s*text-indent: 0cm\s*"/gi,'"');u=u.replace(/\s*text-align: [^\s;]+;?"/gi,'"');u=u.replace(/\s*page-break-before: [^\s;]+;?"/gi,'"');u=u.replace(/\s*font-variant: [^\s;]+;?"/gi,'"');u=u.replace(/\s*tab-stops:[^;"]*;?/gi,'');u=u.replace(/\s*tab-stops:[^"]*/gi,'');u=u.replace(/\s*face="[^"]*"/gi,'');u=u.replace(/\s*face=[^ >]*/gi,'');u=u.replace(/\s*font-family:[^;"]*;?/gi,'');u=u.replace(/<(\w[^>]*) class=([^ |>]*)([^>]*)/gi,'<$1$3');u=u.replace(/]*>[\s\s]*?<\/style[^>]*>/gi,'');u=u.replace(/<(?:meta|link)[^>]*>\s*/gi,'');u=u.replace(/\s*style="\s*"/gi,'');u=u.replace(/]*>\s* \s*<\/span>/gi,' ');u=u.replace(/]*><\/span>/gi,'');u=u.replace(/<(\w[^>]*) lang=([^ |>]*)([^>]*)/gi,'<$1$3'); u=u.replace(/([\s\s]*?)<\/span>/gi,'$1');u=u.replace(/([\s\s]*?)<\/font>/gi,'$1');u=u.replace(/<\\?\?xml[^>]*>/gi,'');u=u.replace(/]*>[\s\s]*?<\/w:[^>]*>/gi,'');u=u.replace(//gi,function(w,x,y,z){return '';});u=u.replace(/<\/?\w+:[^>]*>/gi,'');u=u.replace(/<\!--[\s\s]*?-->/g,'');u=u.replace(/<(u|i|strike)> <\/\1>/g,' ');u=u.replace(/\s*<\/h\d>/gi,'');u=u.replace(/<(\w+)[^>]*\sstyle="[^"]*display\s?:\s?none[\s\s]*?<\/\1>/ig,'');u=u.replace(/<(\w[^>]*) language=([^ |>]*)([^>]*)/gi,'<$1$3');u=u.replace(/<(\w[^>]*) onmouseover="([^\"]*)"([^>]*)/gi,'<$1$3');u=u.replace(/<(\w[^>]*) onmouseout="([^\"]*)"([^>]*)/gi,'<$1$3');u=u.replace(/]*)>/gi,'');u=u.replace(/]*)>/gi,'');u=u.replace(/]*)>/gi,'');u=u.replace(/]*)>/gi,'');u=u.replace(/]*)>/gi,'');u=u.replace(/]*)>/gi,'');u=u.replace(/<\/h\d>/gi,'');var v=new regexp('(]*>[\\s\\s]*?)(

)','gi');u=u.replace(v,'');return u;},s=function(u,v){v=v.replace(//gi,function(d,e,f,g){return '';});var w;try{w=new activexobject('powereasy.word');}catch(d){alert('你没有安装word图片上传插件或你的浏览器不支持!');return v;}var x='',y='',z=//ig,a=v.match(z);if(a){for(i=0;i]*(( class="?msonormal"?)|(="mso-))/gi;if(y.test(x)){x=r(x);var z=//ig;if(z.test(x))x=s(w,x);x=x.replace(//ig,'');w.inserthtml(x);u.cancel();}}if(!c&&v.fire('beforepaste'))u.cancel();else if(b.opera||b.gecko&&b.version<10900)v.fire('paste');return;case 1000+88:case 2000+46:var w=this;this.fire('savesnapshot');settimeout(function(){w.fire('savesnapshot');},0);}};function p(u,v,w){var x=this.document;if(c&&x.getbyid('cke_pastebin'))return;if(v=='text'&&u.data&&u.data.$.clipboarddata){var y=u.data.$.clipboarddata.getdata('text/plain');if(y){u.data.preventdefault();w(y);return;}}var z=this.getselection(),a=new d.range(x),b=new h(v=='text'?'textarea':'div',x);b.setattribute('id','cke_pastebin');b.webkit&&b.append(x.createtext('\xa0'));x.getbody().append(b);if(!c&&v!='html')b.setstyles({position:'absolute',left:'-1000px',top:z.getstartelement().getdocumentposition().y+'px',width:'1px',height:'1px',overflow:'hidden'});var c=z.createbookmarks();if(v=='text'){if(c){var d=x.getbody().$.createtextrange();d.movetoelementtext(b.$);d.execcommand('paste');u.data.preventdefault();}else{x.$.designmode='off';b.$.focus();}}else{a.setstartat(b,1);a.setendat(b,2);a.select(true);}window.settimeout(function(){v=='text'&&!c&&(x.$.designmode='on');b.remove();var e;b=b.webkit&&(e=b.getfirst())&&(e.is&&e.hasclass('apple-style-span'))?e:b;z.selectbookmarks(c);w(b['get'+(v=='text'?'value':'html')]());},0);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(u){u.on('paste',function(z){var a=z.data;if(a.html)u.inserthtml(a.html);else if(a.text)u.inserttext(a.text);},null,null,1000);u.on('pastedialog',function(z){settimeout(function(){u.opendialog('paste');},0);});function v(z,a,b,c){var d=u.lang[a];u.addcommand(a,b);u.ui.addbutton(z,{label:d,command:a});if(u.addmenuitems)u.addmenuitem(a,{label:d,command:a,group:'clipboard',order:c});};v('cut','cut',new n('cut'),1);v('copy','copy',new n('copy'),4);v('paste','paste',q,8);a.dialog.add('paste',a.geturl(this.path+'dialogs/paste.js'));u.on('key',t,u);var w=u.config.forcepasteasplaintext?'text':'html';u.on('contentdom',function(){var z=u.document.getbody();z.on(w=='text'&&c||b.webkit?'paste':'beforepaste',function(a){if(x)return;p.call(u,a,w,function(b){if(!b)return; var c={};c[w]=b;u.fire('paste',c);});});});if(u.contextmenu){var x;function y(z){c&&z=='paste'&&(x=1);var a=u.document.$.querycommandenabled(z)?2:0;x=0;return a;};u.contextmenu.addlistener(function(){return{cut:y('cut'),copy:y('cut'),paste:b.webkit?2:y('paste')};});}}});})();j.add('colorbutton',{requires:['panelbutton','floatpanel','styles'],init:function(l){var m=l.config,n=l.lang.colorbutton,o;if(!b.hc){p('textcolor','fore',n.textcolortitle);p('bgcolor','back',n.bgcolortitle);}function p(r,s,t){l.ui.add(r,4,{label:t,title:t,classname:'cke_button_'+r.tolowercase(),modes:{wysiwyg:1},panel:{css:l.skin.editor.css,attributes:{role:'listbox','aria-label':n.paneltitle}},onblock:function(u,v){v.autosize=true;v.element.addclass('cke_colorblock');v.element.sethtml(q(u,s));var w=v.keys;w[39]='next';w[40]='next';w[9]='next';w[37]='prev';w[38]='prev';w[2000+9]='prev';w[32]='click';}});};function q(r,s){var t=[],u=m.colorbutton_colors.split(','),v=u.length+(m.colorbutton_enablemore?2:1),w=e.addfunction(function(a,b){if(a=='?'){var c=arguments.callee;function d(f){this.removelistener('ok',d);this.removelistener('cancel',d);f.name=='ok'&&c(this.getcontentelement('picker','selectedcolor').getvalue(),b);};l.opendialog('colordialog',function(){this.on('ok',d);this.on('cancel',d);});return;}l.focus();r.hide();var e=new a.style(m['colorbutton_'+b+'style'],a&&{color:a});l.fire('savesnapshot');if(a)e.apply(l.document);else e.remove(l.document);l.fire('savesnapshot');});t.push('
',n.auto,'
');for(var x=0;x');var y=u[x],z=l.lang.colors[y]||y;t.push('');}if(m.colorbutton_enablemore)t.push(''); t.push('
',n.more,'
');return t.join('');};}});i.colorbutton_enablemore=true;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}}],childrule:function(l){return l.getname()!='a';}};i.colorbutton_backstyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(l){l.addcommand('colordialog',new a.dialogcommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],beforeinit:function(l){l.contextmenu=new j.contextmenu(l);l.addcommand('contextmenu',{exec:function(){l.contextmenu.show(l.document.getbody());}});}});j.contextmenu=e.createclass({$:function(l){this.id='cke_'+e.getnextnumber();this.editor=l;this._.listeners=[];this._.functionid=e.addfunction(function(m){this._.panel.hide();l.focus();l.execcommand(m);},this);this._.definiton={panel:{classname:l.skinclass+' cke_contextmenu',attributes:{'aria-label':l.lang.common.options}}};},_:{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,this._.definiton);p.onclick=e.bind(function(z){p.hide();if(z.onclick)z.onclick();else if(z.command)q.execcommand(z.command);},this);p.onescape=function(z){var a=this.parent;if(a){a._.panel.hidechild();var b=a._.panel._.panel._.currentblock,c=b._.focusindex;b._.markitem(c);}else if(z==27){this.hide();q.focus();}return false;};}var r=this._.listeners,s=[],t=this.editor.getselection(),u=t&&t.getstartelement();p.onhide=e.bind(function(){p.onhide=null;if(c){var z=q.getselection();z&&z.unlock();}this.onhide&&this.onhide();},this);for(var v=0;v ';j.add('elementspath',{requires:['selection'],init:function(n){var o='cke_path_'+n.name,p,q=function(){if(!p)p=a.document.getbyid(o);return p;},r='cke_elementspath_'+e.getnextnumber()+'_';n._.elementspath={idbase:r};n.on('themespace',function(s){if(s.data.space=='bottom')s.data.html+=''+n.lang.elementspath.elelabel+''+'
'+m+'
';});n.on('selectionchange',function(s){var t=b,u=s.data.selection,v=u.getstartelement(),w=[],x=this._.elementspath.list=[];while(v){var y=x.push(v)-1,z;if(v.getattribute('_cke_real_element_type'))z=v.getattribute('_cke_real_element_type');else z=v.getname();var a='';if(t.opera||t.gecko&&t.mac)a+=' onkeypress="return false;"';if(t.gecko)a+=' onblur="this.style.csstext = this.style.csstext;"';var b=n.lang.elementspath.eletitle.replace(/%1/,z);w.unshift('',z,''+b+'','');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]=q;t[2000+13]=p;}});j.enterkey={enterblock:function(s,t,u,v){u=u||r(s);var w=u.document,x=t==3?'div':'p',y=u.splitblock(x);if(!y)return;var z=y.previousblock,a=y.nextblock,b=y.wasstartofblock,c=y.wasendofblock,d;if(a){d=a.getparent();if(d.is('li')){a.breakparent(d);a.move(a.getnext(),true);}}else if(z&&(d=z.getparent())&&(d.is('li'))){z.breakparent(d);u.movetoelementeditstart(z.getnext());z.move(z.getprevious());}if(!b&&!c){if(a.is('li')&&(d=a.getfirst(d.walker.invisible(true)))&&(d.is&&d.is('ul','ol')))(c?w.createtext('\xa0'):w.createelement('br')).insertbefore(d);if(a)u.movetoelementeditstart(a);}else{if(b&&c&&z.is('li')){s.execcommand('outdent');return;}var e;if(z){if(!v&&!o.test(z.getname()))e=z.clone();}else if(a)e=a.clone();if(!e)e=w.createelement(x);var f=y.elementpath;if(f)for(var g=0,h=f.elements.length;g0;u--)t[u].deletecontents();return t[0];};})();(function(){var l='nbsp,gt,lt,quot,iexcl,cent,pound,curren,yen,brvbar,sect,uml,copy,ordf,laquo,not,shy,reg,macr,deg,plusmn,sup2,sup3,acute,micro,para,middot,cedil,sup1,ordm,raquo,frac14,frac12,frac34,iquest,times,divide,fnof,bull,hellip,prime,prime,oline,frasl,weierp,image,real,trade,alefsym,larr,uarr,rarr,darr,harr,crarr,larr,uarr,rarr,darr,harr,forall,part,exist,empty,nabla,isin,notin,ni,prod,sum,minus,lowast,radic,prop,infin,ang,and,or,cap,cup,int,there4,sim,cong,asymp,ne,equiv,le,ge,sub,sup,nsub,sube,supe,oplus,otimes,perp,sdot,lceil,rceil,lfloor,rfloor,lang,rang,loz,spades,clubs,hearts,diams,circ,tilde,ensp,emsp,thinsp,zwnj,zwj,lrm,rlm,ndash,mdash,lsquo,rsquo,sbquo,ldquo,rdquo,bdquo,dagger,dagger,permil,lsaquo,rsaquo,euro',m='agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,szlig,agrave,aacute,acirc,atilde,auml,aring,aelig,ccedil,egrave,eacute,ecirc,euml,igrave,iacute,icirc,iuml,eth,ntilde,ograve,oacute,ocirc,otilde,ouml,oslash,ugrave,uacute,ucirc,uuml,yacute,thorn,yuml,oelig,oelig,scaron,scaron,yuml',n='alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigma,tau,upsilon,phi,chi,psi,omega,alpha,beta,gamma,delta,epsilon,zeta,eta,theta,iota,kappa,lambda,mu,nu,xi,omicron,pi,rho,sigmaf,sigma,tau,upsilon,phi,chi,psi,omega,thetasym,upsih,piv';function o(p){var q={},r=[],s={nbsp:'\xa0',shy:'­',gt:'>',lt:'<'};p=p.replace(/\b(nbsp|shy|gt|lt|amp)(?:,|$)/g,function(x,y){q[s[y]]='&'+y+';';r.push(s[y]);return '';});p=p.split(','); var t=document.createelement('div'),u;t.innerhtml='&'+p.join(';&')+';';u=t.innerhtml;t=null;for(var v=0;v'+c+'',c);}},onclick:function(b){m.focus();m.fire('savesnapshot');var c=w[b];if(this.getvalue()==b)c.remove(m.document);else c.apply(m.document);m.fire('savesnapshot');},onrender:function(){m.on('selectionchange',function(b){var c=this.getvalue(),d=b.data.path,e=d.elements;for(var f=0,g;f'+t+'',t);}},onclick:function(s){l.focus();l.fire('savesnapshot');p[s].apply(l.document);settimeout(function(){l.fire('savesnapshot');},0);},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'};(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(o){var p=o.children.length,q=o.children[p-1];while(q&&q.type==3&&!e.trim(q.value))q=o.children[--p];return q;};function o(o,p){var q=o.children,r=n(o);if(r){if((p||!c)&&(r.type==1&&r.name=='br'))q.pop();if(r.type==3&&l.test(r.value))q.pop(); }};function p(o){var p=n(o);return!p||p.type==1&&p.name=='br';};function q(o){o(o,true);if(p(o))if(c)o.add(new a.htmlparser.text('\xa0'));else o.add(new a.htmlparser.element('br',{}));};function r(o){o(o);if(p(o))o.add(new a.htmlparser.text('\xa0'));};var s=f,t=e.extend({},s.$block,s.$listitem,s.$tablecontent);for(var u in t)if(!('br' in s[u]))delete t[u];delete t.pre;var v={attributenames:[[/^on/,'_cke_pa_on']]},w={elements:{}};for(u in t)w.elements[u]=q;var x={elementnames:[[/^cke:/,''],[/^\?xml:namespace$/,'']],attributenames:[[/^_cke_(saved|pa)_/,''],[/^_cke.*/,''],['hidefocus','']],elements:{$:function(o){var p=o.attributes;if(p){if(p.cke_temp)return false;var q=['name','href','src'],r;for(var s=0;s]+)))/gi,a=/(?:])[^>]*>[\s\s]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,b=/([^<]*)<\/cke:encoded>/gi,c=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,d=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,e=/]*?)\/?>(?!\s*<\/cke:\1)/gi;function f(o){return o.replace(z,'$& _cke_saved_$1');};function g(o){return o.replace(a,function(p){return ''+encodeuricomponent(p)+'';});};function h(o){return o.replace(b,function(p,q){return decodeuricomponent(q);});};function i(o){return o.replace(c,'$1cke:$2');};function j(o){return o.replace(d,'$1$2'); };function k(o){return o.replace(e,'');};function l(o){return o.replace(//g,function(p){return '';});};function m(o){return o.replace(//g,function(p,q){return decodeuricomponent(q);});};function n(o,p){var q=[],r=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,s=[//gi,//gi].concat(p);o=o.replace(//g,function(u){return '';});for(var t=0;t';});o=o.replace(r,function(u,v,w){return '';});return o;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(o){var p=o.dataprocessor=new a.htmldataprocessor(o);p.writer.forcesimpleampersand=o.config.forcesimpleampersand;p.datafilter.addrules(v);p.datafilter.addrules(w);p.htmlfilter.addrules(x);p.htmlfilter.addrules(y);}});a.htmldataprocessor=function(o){var p=this;p.editor=o;p.writer=new a.htmlwriter();p.datafilter=new a.htmlparser.filter();p.htmlfilter=new a.htmlparser.filter();};a.htmldataprocessor.prototype={tohtml:function(o,p){o=n(o,this.editor.config.protectedsource);o=f(o);o=g(o);o=i(o);o=k(o);var q=new h('div');q.sethtml('a'+o);o=q.gethtml().substr(1);o=j(o);o=h(o);o=m(o);var r=a.htmlparser.fragment.fromhtml(o,p),s=new a.htmlparser.basicwriter();r.writehtml(s,this.datafilter);o=s.gethtml(true);o=l(o);return o;},todataformat:function(o,p){var q=this.writer,r=a.htmlparser.fragment.fromhtml(o,p);q.reset();r.writehtml(q,this.htmlfilter);return q.gethtml(true);}};})();i.forcesimpleampersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addcommand(m,new a.dialogcommand(m));l.ui.addbutton('image',{label:l.lang.common.image,command:m});if(l.addmenuitems)l.addmenuitems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextmenu)l.contextmenu.addlistener(function(n,o){if(!n||!n.is('img')||n.getattribute('_cke_realelement'))return null;return{image:2};});}});i.image_removelinkbyemptyurl=true;(function(){var l={ol:1,ul:1};function m(r,s){r.getcommand(this.name).setstate(s);};function n(r){var c=this;var s=r.data.path.elements,t,u,v=r.editor;for(var w=0;wg;a++)f[a].indent+=b;var h=j.list.arraytolist(f,e,null,r.config.entermode,0);if(this.name=='outdent'){var i;if((i=t.getparent())&&(i.is('li'))){var j=h.listnode.getchildren(),k=[],l=j.count(),m;for(a=l-1;a>=0;a--)if((m=j.getitem(a))&&(m.is&&m.is('li')))k.push(m);}}if(h)h.listnode.replace(t);if(k&&k.length)for(a=0;a0;if(u.useindentclasses){u.classnameregex=new regexp('(?:^|\\s+)('+r.config.indentclasses.join('|')+')(?=$|\\s)');u.indentclassmap={};for(var t=0;t=0;x--){v=t[x].createiterator();v.enlargebr=r!=2;while(w=v.getnextparagraph()){w.removeattribute('align');if(u){var y=w.$.classname=e.ltrim(w.$.classname.replace(z.cssclassregex,''));if(z.state==2&&!z.isdefaultalign)w.addclass(u);else if(!y)w.removeattribute('class'); }else if(z.state==2&&!z.isdefaultalign)w.setstyle('text-align',z.value);else w.removestyle('text-align');}}p.focus();p.forcenextselectioncheck();q.selectbookmarks(s);}};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;qd[f-1].indent+1){var j=d[f-1].indent+1-d[f].indent,k=d[f].indent;while(d[f]&&d[f].indent>=k){d[f].indent+=j;f++;}f--;}var l=j.list.arraytolist(d,c,null,a.config.entermode),m=l.listnode,n,o;function p(q){if((n=m[q?'getfirst':'getlast']())&&(!(n.is&&n.isblockboundary())&&(o=b.root[q?'getprevious':'getnext'](d.walker.whitespaces(true)))&&(!(o.is&&o.isblockboundary({br:1})))))a.document.createelement('br')[q?'insertbefore':'insertafter'](n);};p(true);p();m.replace(b.root);};function s(a,b){this.name=a;this.type=b;};s.prototype={exec:function(a){a.focus();var b=a.document,c=a.getselection(),d=c&&c.getranges();if(!d||d.length<1)return;if(this.state==2){var e=b.getbody();e.trim();if(!e.getfirst()){var f=b.createelement(a.config.entermode==1?'p':a.config.entermode==3?'div':'br');f.appendto(e);d=[new d.range(b)];if(f.is('br')){d[0].setstartbefore(f);d[0].setendafter(f);}else d[0].selectnodecontents(f);c.selectranges(d);}else{var g=d.length==1&&d[0],h=g&&g.getenclosednode();if(h&&h.is&&this.type==h.getname())n.call(this,a,1);}}var i=c.createbookmarks(true),j=[],k={};while(d.length>0){g=d.shift();var l=g.getboundarynodes(),m=l.startnode,n=l.endnode;if(m.type==1&&m.getname()=='td')g.setstartat(l.startnode,1);if(n.type==1&&n.getname()=='td')g.setendat(l.endnode,2);var o=g.createiterator(),p;o.forcebrbreak=this.state==2;while(p=o.getnextparagraph()){var q=new d.elementpath(p),r=q.elements,s=r.length,t=null,u=false,v=q.blocklimit,w;for(var x=s-1;x>=0&&(w=r[x]);x--)if(l[w.getname()]&&v.contains(w)){v.removecustomdata('list_group_object'); var y=w.getcustomdata('list_group_object');if(y)y.contents.push(p);else{y={root:w,contents:[p]};j.push(y);h.setmarker(k,w,'list_group_object',y);}u=true;break;}if(u)continue;var z=v;if(z.getcustomdata('list_group_object'))z.getcustomdata('list_group_object').contents.push(p);else{y={root:z,contents:[p]};h.setmarker(k,z,'list_group_object',y);j.push(y);}}}var aa=[];while(j.length>0){y=j.shift();if(this.state==2){if(l[y.root.getname()])p.call(this,a,y,k,aa);else q.call(this,a,y,aa);}else if(this.state==1&&l[y.root.getname()])r.call(this,a,y,k);}for(x=0;x0)for(var s=r.length-1;s>=0;s--){var t=r[s][0],u=r[s][1];if(u)t.insertbefore(u);else t.appendto(q);}};function n(q,r){var s=l(q),t={},u=q.$;if(!r){t['class']=u.classname||'';u.classname='';}t.inline=u.style.csstext||''; if(!r)u.style.csstext='position: static; overflow: visible';m(s);return t;};function o(q,r){var s=l(q),t=q.$;if('class' in r)t.classname=r['class'];if('inline' in r)t.style.csstext=r.inline;m(s);};function p(q,r){return function(){var s=q.getviewpanesize();r.resize(s.width,s.height,null,true);};};j.add('maximize',{init:function(q){var r=q.lang,s=a.document,t=s.getwindow(),u,v,w,x=p(t,q),y=2;q.addcommand('maximize',{modes:{wysiwyg:1,source:1},editorfocus:false,exec:function(){var z=q.container.getchild(1),a=q.getthemespace('contents');if(q.mode=='wysiwyg'){var b=q.getselection();u=b&&b.getranges();v=t.getscrollposition();}else{var c=q.textarea.$;u=!c&&[c.selectionstart,c.selectionend];v=[c.scrollleft,c.scrolltop];}if(this.state==2){t.on('resize',x);w=t.getscrollposition();var d=q.container;while(d=d.getparent()){d.setcustomdata('maximize_saved_styles',n(d));d.setstyle('z-index',q.config.basefloatzindex-1);}a.setcustomdata('maximize_saved_styles',n(a,true));z.setcustomdata('maximize_saved_styles',n(z,true));if(c)s.$.documentelement.style.overflow=s.getbody().$.style.overflow='hidden';else s.getbody().setstyles({overflow:'hidden',width:'0px',height:'0px'});c?settimeout(function(){t.$.scrollto(0,0);},0):t.$.scrollto(0,0);var e=t.getviewpanesize();z.setstyle('position','absolute');z.$.offsetleft;z.setstyles({'z-index':q.config.basefloatzindex-1,left:'0px',top:'0px'});q.resize(e.width,e.height,null,true);var f=z.getdocumentposition();z.setstyles({left:-1*f.x+'px',top:-1*f.y+'px'});z.addclass('cke_maximized');}else if(this.state==1){t.removelistener('resize',x);var g=[a,z];for(var h=0;h1&&m.substr(m.length-1,1)=='%')m=parseint(window.screen.width*parseint(m,10)/100,10); if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseint(window.screen.height*parseint(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseint((window.screen.height-n)/(2),10),p=parseint((window.screen.width-m)/(2),10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysraised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveto(p,o);r.resizeto(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});j.add('removeformat',{requires:['selection'],init:function(l){l.addcommand('removeformat',j.removeformat.commands.removeformat);l.ui.addbutton('removeformat',{label:l.lang.removeformat,command:'removeformat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeformatregex||(l._.removeformatregex=new regexp('^(?:'+l.config.removeformattags.replace(/,/g,'|')+')$','i')),n=l._.removeattributes||(l._.removeattributes=l.config.removeformatattributes.split(',')),o=l.getselection().getranges();for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createbookmark(),s=r.startnode,t=r.endnode,u=function(x){var y=new d.elementpath(x),z=y.elements;for(var a=1,b;b=z[a];a++){if(b.equals(y.block)||b.equals(y.blocklimit))break;if(m.test(b.getname()))x.breakparent(b);}};u(s);u(t);var v=s.getnextsourcenode(true,1);while(v){if(v.equals(t))break;var w=v.getnextsourcenode(false,1);if(!(v.getname()=='img'&&v.getattribute('_cke_realelement')))if(m.test(v.getname()))v.remove(true);else v.removeattributes(n);v=w;}q.movetobookmark(r);}l.getselection().selectranges(o);}}}};i.removeformattags='b,big,code,del,dfn,em,font,i,ins,kbd,q,samp,small,span,strike,strong,sub,sup,tt,u,var';i.removeformatattributes='class,style,lang,width,height,align,hspace,valign';j.add('resize',{init:function(l){var m=l.config;if(m.resize_enabled){var n=null,o,p;function q(t){var u=t.data.$.screenx-o.x,v=t.data.$.screeny-o.y,w=p.width+u*(l.lang.dir=='rtl'?-1:1),x=p.height+v;l.resize(math.max(m.resize_minwidth,math.min(w,m.resize_maxwidth)),math.max(m.resize_minheight,math.min(x,m.resize_maxheight)));};function r(t){a.document.removelistener('mousemove',q);a.document.removelistener('mouseup',r);if(l.document){l.document.removelistener('mousemove',q);l.document.removelistener('mouseup',r);}};var s=e.addfunction(function(t){if(!n)n=l.getresizable();p={width:n.$.offsetwidth||0,height:n.$.offsetheight||0};o={x:t.screenx,y:t.screeny}; a.document.on('mousemove',q);a.document.on('mouseup',r);if(l.document){l.document.on('mousemove',q);l.document.on('mouseup',r);}});l.on('themespace',function(t){if(t.data.space=='bottom')t.data.html+='
';},l,null,100);}}});i.resize_minwidth=580;i.resize_minheight=250;i.resize_maxwidth=3000;i.resize_maxheight=3000;i.resize_enabled=true;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=['smiley','sad','wink','laugh','frown','cheeky','blush','surprise','indecision','angry','angle','cool','devil','crying','enlightened','no','yes','heart','broken heart','kiss','mail'];(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,editorfocus:false,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; j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getwindow();l.on('editingblockready',function(){var o,p;l.addmode('source',{load:function(q,r){if(c&&b.version<8)q.setstyle('position','relative');l.textarea=o=new h('textarea');o.setattributes({dir:'ltr',tabindex:l.tabindex,role:'textbox','aria-label':l.lang.editortitle.replace('%1',l.name)});o.addclass('cke_source');o.addclass('cke_enable_context_menu');var s={width:b.ie7compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setstyle('height',q.$.clientheight+'px');o.setstyle('width',q.$.clientwidth+'px');o.show();};l.on('resize',p);n.on('resize',p);settimeout(p,0);}else o.on('mousedown',function(u){u.data.stoppropagation();});q.sethtml('');q.append(o);o.setstyles(s);l.fire('ariawidget',o);o.on('blur',function(){l.focusmanager.blur();});o.on('focus',function(){l.focusmanager.focus();});l.maybedirty=true;this.loaddata(r);var t=l.keystrokehandler;if(t)t.attach(o);settimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loaddata:function(q){o.setvalue(q);l.fire('dataready');},getdata:function(){return o.getvalue();},getsnapshotdata:function(){return o.getvalue();},unload:function(q){l.textarea=o=null;if(p){l.removelistener('resize',p);n.removelistener('resize',p);}if(c&&b.version<8)q.removestyle('position');},focus:function(){o.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(){var l='cke_show_border',m,n=(b.ie6compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preservestate:true,editorfocus:false,exec:function(p){this.togglestate();this.refresh(p);},refresh:function(p){var q=this.state==1?'addclass':'removeclass'; p.document.getbody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addcommand('showborders',o);q.canundo=false;if(p.config.startupshowborders!==false)q.setstate(1);p.addcss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentdom',function(){if(q.state!=0)q.refresh(p);});},afterinit:function(p){var q=p.dataprocessor,r=q&&q.datafilter,s=q&&q.htmlfilter;if(r)r.addrules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseint(u.border,10);if(!w||w<=0)u['class']=(v||'')+(' ')+l;}}});if(s)s.addrules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});a.on('dialogdefinition',function(t){if(t.editor!=p)return;var u=t.data.name;if(u=='table'||u=='tableproperties'){var v=t.data.definition,w=v.getcontents('info'),x=w.get('txtborder'),y=x.commit;x.commit=e.override(y,function(z){return function(a,b){z.apply(this,arguments);var c=parseint(this.getvalue(),10);b[!c||c<=0?'addclass':'removeclass'](l);};});}});}});})();(function(){var l;j.add('stylescombo',{requires:['richcombo','styles'],init:function(o){var p=o.config,q=o.lang.stylescombo,r=this.path,s;if(!l)l=a.stylesset;var t=p.stylescombo_stylesset.split(':'),u=t[0],v=t[1];l.addexternal(u,v?t.slice(1).join(':'):r+'styles/'+u+'.js','');o.ui.addrichcombo('styles',{label:q.label,title:q.paneltitle,classname:'cke_styles',panel:{css:o.skin.editor.css.concat(p.contentscss),multiselect:true,attributes:{'aria-label':q.paneltitle}},init:function(){var w=this;a.stylesset.load(u,function(x){var y=x[u],z,a,b=[];s={};for(var c=0;c',o.name,'');return p.join('');};function n(o,p){var q=o.type,r=p.type;return q==r?0:q==3?-1:r==3?1:r==1?1:-1;};})();i.stylescombo_stylesset='default';j.add('table',{init:function(l){var m=j.table,n=l.lang.table;l.addcommand('table',new a.dialogcommand('table'));l.addcommand('tableproperties',new a.dialogcommand('tableproperties'));l.ui.addbutton('table',{label:n.toolbar,command:'table'});a.dialog.add('table',this.path+'dialogs/table.js');a.dialog.add('tableproperties',this.path+'dialogs/table.js');if(l.addmenuitems)l.addmenuitems({table:{label:n.menu,command:'tableproperties',group:'table',order:5},tabledelete:{label:n.deletetable,command:'tabledelete',group:'table',order:1}});if(l.contextmenu)l.contextmenu.addlistener(function(o,p){if(!o)return null;var q=o.is('table')||o.hasascendant('table');if(q)return{tabledelete:2,table:2};return null;});}});(function(){function l(e,f){if(c)e.removeattribute(f);else delete e[f];};var m=/^(?:td|th)$/;function n(e){var f=e.createbookmarks(),g=e.getranges(),h=[],i={};function j(r){if(h.length>0)return;if(r.type==1&&m.test(r.getname())&&!r.getcustomdata('selected_cell')){h.setmarker(i,r,'selected_cell',true);h.push(r);}};for(var k=0;k0&&o.$.rows[j]||o.$.parentnode);for(l=h.length;l>=0;l--)if(h[l])q(h[l]);return i;}else if(e instanceof h){o=e.getascendant('table');if(o.$.rows.length==1)o.remove();else e.remove();}return 0;};function r(e,f){var g=e.getstartelement(),h=g.getascendant('td',true)||g.getascendant('th',true);if(!h)return;var i=h.getascendant('table'),j=h.$.cellindex;for(var k=0;k=0;g--)if(f[g])s(f[g]);}else if(e instanceof h){var h=e.getascendant('table'),i=e.$.cellindex;for(g=h.$.rows.length-1;g>=0;g--){var j=new h(h.$.rows[g]);if(!i&&j.$.cells.length==1){q(j);continue;}if(j.$.cells[i])j.$.removechild(j.$.cells[i]);}}};function t(e,f){var g=e.getstartelement(),h=g.getascendant('td',true)||g.getascendant('th',true);if(!h)return;var i=h.clone();if(!c)i.appendbogus();if(f)i.insertbefore(h);else i.insertafter(h);};function u(e){if(e instanceof d.selection){var f=n(e);for(var g=f.length-1;g>=0;g--)u(f[g]);}else if(e instanceof h)if(e.getparent().getchildcount()==1)e.getparent().remove();else e.remove();};function v(e){var f=e.getbogus();f&&f.remove();e.trim();};function w(e,f){var g=new d.range(e.getdocument());if(!g['movetoelementedit'+(f?'end':'start')](e)){g.selectnodecontents(e);g.collapse(f?false:true);}g.select(true);};function x(e){var f=e.$.rows,g=-1,h=[];for(var i=0;i=o)k.removeattribute('rowspan');else k.$.rowspan=u;if(u>=n)k.removeattribute('colspan');else k.$.colspan=v;var ag=new d.nodelist(l.$.rows),ah=ag.count();for(y=ah-1;y>=0;y--){var ai=ag.getitem(y);if(!ai.$.cells.length){ai.remove();ah++;continue;}}return k;}else return u*v==x;};function b(e,f){var g=n(e);if(g.length>1)return false;else if(f)return true;var h=g[0],i=h.getparent(),j=i.getascendant('table'),k=x(j),l=i.$.rowindex,m=y(k,l,h),n=h.$.rowspan,o,p,q,r;if(n>1){p=math.ceil(n/2);q=math.floor(n/2);r=l+p;var s=new h(j.$.rows[r]),t=y(k,r),u;o=h.clone();for(var v=0;vm){o.insertbefore(new h(u));break;}else u=null;}if(!u)s.append(o,true);}else{q=p=1;s=i.clone();s.insertafter(i);s.append(o=h.clone());var w=y(k,l);for(var x=0;x1)return false;else if(f)return true;var h=g[0],i=h.getparent(),j=i.getascendant('table'),k=x(j),l=i.$.rowindex,m=y(k,l,h),n=h.$.colspan,o,p,q;if(n>1){p=math.ceil(n/2);q=math.floor(n/2);}else{q=p=1;var r=z(k,m);for(var s=0;s0?2:0};}},tablecell_insertbefore:{label:f.cell.insertbefore,group:'tablecell',command:'cellinsertbefore',order:5},tablecell_insertafter:{label:f.cell.insertafter,group:'tablecell',command:'cellinsertafter',order:10},tablecell_delete:{label:f.cell.deletecell,group:'tablecell',command:'celldelete',order:15},tablecell_merge:{label:f.cell.merge,group:'tablecell',command:'cellmerge',order:16},tablecell_merge_right:{label:f.cell.mergeright,group:'tablecell',command:'cellmergeright',order:17},tablecell_merge_down:{label:f.cell.mergedown,group:'tablecell',command:'cellmergedown',order:18},tablecell_split_horizontal:{label:f.cell.splithorizontal,group:'tablecell',command:'cellhorizontalsplit',order:19},tablecell_split_vertical:{label:f.cell.splitvertical,group:'tablecell',command:'cellverticalsplit',order:20},tablecell_properties:{label:f.cell.title,group:'tablecellproperties',command:'cellproperties',order:21},tablerow:{label:f.row.menu,group:'tablerow',order:1,getitems:function(){return{tablerow_insertbefore:2,tablerow_insertafter:2,tablerow_delete:2}; }},tablerow_insertbefore:{label:f.row.insertbefore,group:'tablerow',command:'rowinsertbefore',order:5},tablerow_insertafter:{label:f.row.insertafter,group:'tablerow',command:'rowinsertafter',order:10},tablerow_delete:{label:f.row.deleterow,group:'tablerow',command:'rowdelete',order:15},tablecolumn:{label:f.column.menu,group:'tablecolumn',order:1,getitems:function(){return{tablecolumn_insertbefore:2,tablecolumn_insertafter:2,tablecolumn_delete:2};}},tablecolumn_insertbefore:{label:f.column.insertbefore,group:'tablecolumn',command:'columninsertbefore',order:5},tablecolumn_insertafter:{label:f.column.insertafter,group:'tablecolumn',command:'columninsertafter',order:10},tablecolumn_delete:{label:f.column.deletecolumn,group:'tablecolumn',command:'columndelete',order:15}});if(e.contextmenu)e.contextmenu.addlistener(function(g,h){if(!g)return null;while(g){if(g.getname() in d)return{tablecell:2,tablerow:2,tablecolumn:2};g=g.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={editorfocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusnext(true,o.tabindex);}},n={exec:function(o){o.container.focusprevious(true,o.tabindex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabspaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keycode==9){o.inserthtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keycode;if(s==9&&!q){r.cancel();o.execcommand('blur');}if(s==2000+9){o.execcommand('blurback');r.cancel();}});o.addcommand('blur',e.extend(m,l));o.addcommand('blurback',e.extend(n,l));}});})();h.prototype.focusnext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.gettabindex():m,p,q,r,s,t,u;if(o<=0){t=v.getnextsourcenode(l,1);while(t){if(t.isvisible()&&t.gettabindex()===0){r=t;break;}t=t.getnextsourcenode(false,1);}}else{t=v.getdocument().getbody().getfirst();while(t=t.getnextsourcenode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getnextsourcenode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isvisible()||(u=t.gettabindex())<(0))continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||us){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(ts)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.geturl(this.path+'dialogs/templates.js'));n.addcommand('templates',new a.dialogcommand('templates'));n.ui.addbutton('templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addtemplates=function(n,o){l[n]=o;};a.gettemplates=function(n){return l[n];};a.loadtemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptloader.load(p,o);else settimeout(o,0);};})();i.templates='default';i.templates_files=[a.geturl('plugins/templates/templates/default.js')];i.templates_replacecontent=true;(function(){var l=function(){this.isclose=false;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){var r,s,t;switch(q){case 39:case 9:do{r=p.next;if(!r){s=p.toolbar.next;t=s&&s.items.length;while(t===0){s=s.next;t=s&&s.items.length;}if(s)r=s.items[0];}p=r;}while(p&&!p.focus)if(p)p.focus();else n.toolbox.focus();return false;case 37:case 2000+9:do{r=p.previous;if(!r){s=p.toolbar.previous;t=s&&s.items.length;while(t===0){s=s.previous;t=s&&s.items.length;}if(s)r=s.items[t-1];}p=r;}while(p&&!p.focus)if(p)p.focus();else{var u=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;u[u.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='cke_'+e.getnextnumber(),r=['');if(n.config.toolbarcancollapse){var f=e.addfunction(function(){n.execcommand('toolbarcollapse');}),g='cke_'+e.getnextnumber();n.addcommand('toolbarcollapse',{exec:function(h){var i=a.document.getbyid(g),j=i.getprevious(),k=h.getthemespace('contents'),l=j.getparent(),m=parseint(k.$.style.height,10),n=l.$.offsetheight,o=!j.isvisible();if(!h.toolbox.isclose){j.hide();h.toolbox.isclose = true;i.addclass('cke_toolbox_collapser_min');i.setattribute('title',h.lang.toolbarexpand);}else{j.show();h.toolbox.isclose = false;i.removeclass('cke_toolbox_collapser_min');i.setattribute('title',h.lang.toolbarcollapse);}i.getfirst().settext(o?'▲':'◀');var p=l.$.offsetheight-n;k.setstyle('height',m-p+'px');h.fire('resize');},modes:{wysiwyg:1,source:1}});r.push('','','');}p.data.html+=r.join('');}});n.addcommand('toolbarfocus',m.toolbarfocus);}});})();k.separator={render:function(l,m){m.push('');return{};}};i.toolbarlocation='top';i.toolbar_basic=[['source','maximize'],['find'],['bold','italic','-','numberedlist','bulletedlist','-','outdent','indent'],['textcolor','bgcolor'],['link','unlink','anchor'],['smiley','showblocks','about']];i.toolbar_wap=[['source','maximize'],['find'],['bold','italic','-','numberedlist','bulletedlist','-','outdent','indent'],['textcolor','bgcolor'],['image','link','unlink','anchor'],['smiley','showblocks','about']];i.toolbar_full=[['source','maximize','showblocks','templates'],['cut','copy','paste','pastetext','pastefromword','-','print','spellchecker','scayt'],['undo','redo','find','selectall','removeformat'],['form','checkbox','radio','textfield','button','imagebutton','hiddenfield'],'/',['bold','italic','underline','strike','-','subscript','superscript'],['numberedlist','bulletedlist','-','outdent','indent','blockquote','creatediv'],['justifyleft','justifycenter','justifyright','justifyblock'],['link','unlink','anchor','image','flash','media','codeblock'],'/',['styles','format','font','fontsize'],['textcolor','bgcolor'],['table','horizontalrule','smiley','about']]; i.toolbar_simple=[['source','maximize'],['find'],['pastefromword'],['bold','italic','underline','strike'],['numberedlist','bulletedlist'],['justifyleft','justifycenter','justifyright','justifyblock'],['link','unlink','anchor'],['image','flash','media'],'/',['format','font','fontsize'],['textcolor','bgcolor','-','outdent','indent','smiley','table','horizontalrule','showblocks','about']];i.toolbar_contentsimple=[['source','maximize'],['find'],['pastefromword'],['bold','italic','underline','strike'],['numberedlist','bulletedlist'],['justifyleft','justifycenter','justifyright','justifyblock'],['link','unlink','anchor'],['image','flash','media'],'/',['format','font','fontsize'],['textcolor','bgcolor','-','outdent','indent','smiley','table','horizontalrule','showblocks','pagebreak','about']];i.toolbar_contentfull=[['source','maximize','showblocks','templates'],['cut','copy','paste','pastetext','pastefromword','-','print','spellchecker','scayt'],['undo','redo','find','selectall','removeformat'],['form','checkbox','radio','textfield','button','imagebutton','hiddenfield'],'/',['bold','italic','underline','strike','-','subscript','superscript'],['numberedlist','bulletedlist','-','outdent','indent','blockquote','creatediv'],['justifyleft','justifycenter','justifyright','justifyblock'],['link','unlink','anchor','image','flash','media','codeblock'],'/',['styles','format','font','fontsize'],['textcolor','bgcolor'],['table','horizontalrule','smiley','pagebreak','about']];i.toolbar='full';i.toolbarcancollapse=true;(function(){j.add('undo',{requires:['selection','wysiwygarea'],init:function(r){var s=new n(r),t=r.addcommand('undo',{exec:function(){if(s.undo()){r.selectionchange();this.fire('afterundo');}},state:0,canundo:false}),u=r.addcommand('redo',{exec:function(){if(s.redo()){r.selectionchange();this.fire('afterredo');}},state:0,canundo:false});s.onchange=function(){t.setstate(s.undoable()?2:0);u.setstate(s.redoable()?2:0);};function v(w){if(s.enabled&&w.data.command.canundo!==false)s.save();};r.on('beforecommandexec',v);r.on('aftercommandexec',v);r.on('savesnapshot',function(){s.save();});r.on('contentdom',function(){r.document.on('keydown',function(w){if(!w.data.$.ctrlkey&&!w.data.$.metakey)s.type(w);});});r.on('beforemodeunload',function(){r.mode=='wysiwyg'&&s.save(true);});r.on('mode',function(){s.enabled=r.mode=='wysiwyg';s.onchange();});r.ui.addbutton('undo',{label:r.lang.undo,command:'undo'});r.ui.addbutton('redo',{label:r.lang.redo,command:'redo'});r.resetundo=function(){s.reset(); r.fire('savesnapshot');};}});function l(r){var s=r.getsnapshot(),t=s&&r.getselection();c&&s&&(s=s.replace(/\s+_cke_expando=".*?"/g,''));this.contents=s;this.bookmarks=t&&t.createbookmarks2(true);};var m=/\b(?:href|src|name)="[^"]*?"/gi;l.prototype={equals:function(r,s){var t=this.contents,u=r.contents;if(c&&(b.ie7compat||b.ie6compat)){t=t.replace(m,'');u=u.replace(m,'');}if(t!=u)return false;if(s)return true;var v=this.bookmarks,w=r.bookmarks;if(v||w){if(!v||!w||v.length!=w.length)return false;for(var x=0;x25){this.save(false,null,false);this.modifierscount=1;}}else if(!x){this.modifierscount=0;this.typescount++;if(this.typescount>25){this.save(false,null,false);this.typescount=1;}}},reset:function(){var r=this;r.lastkeystroke=0;r.snapshots=[];r.index=-1;r.limit=r.editor.config.undostacksize;r.currentimage=null;r.hasundo=false;r.hasredo=false;r.resettype();},resettype:function(){var r=this;r.typing=false;delete r.lastkeystroke;r.typescount=0;r.modifierscount=0;},firechange:function(){var r=this;r.hasundo=!!r.getnextimage(true);r.hasredo=!!r.getnextimage(false);r.resettype();r.onchange();},save:function(r,s,t){var v=this;var u=v.snapshots;if(!s)s=new l(v.editor);if(s.contents===false)return false;if(v.currentimage&&s.equals(v.currentimage,r))return false;u.splice(v.index+1,u.length-v.index-1);if(u.length==v.limit)u.shift();v.index=u.push(s)-1;v.currentimage=s;if(t!==false)v.firechange();return true;},restoreimage:function(r){var t=this;t.editor.loadsnapshot(r.contents);if(r.bookmarks)t.editor.getselection().selectbookmarks(r.bookmarks);else if(c){var s=t.editor.document.getbody().$.createtextrange(); s.collapse(true);s.select();}t.index=r.index;t.snapshots.splice(t.index,1,t.currentimage=new l(t.editor));t.firechange();},getnextimage:function(r){var w=this;var s=w.snapshots,t=w.currentimage,u,v;if(t)if(r)for(v=w.index-1;v>=0;v--){u=s[v];if(!t.equals(u,true)){u.index=v;return u;}}else for(v=w.index+1;v]*>\s*(?:]*>| |\u00a0| )?\s*(:?<\/\1>)?\s*(?=$|<\/body>)/gi;function n(v){if(this.mode=='wysiwyg'){this.focus();this.fire('savesnapshot');var w=this.getselection(),x=v.data;if(this.dataprocessor)x=this.dataprocessor.tohtml(x);if(c){var y=w.islocked;if(y)w.unlock();var z=w.getnative();if(z.type=='control')z.clear();z.createrange().pastehtml(x);if(y)this.getselection().lock();}else this.document.$.execcommand('inserthtml',false,x);e.settimeout(function(){this.fire('savesnapshot');},0,this);}};function o(v){if(this.mode=='wysiwyg'){this.focus();this.fire('savesnapshot');var w=v.data,x=w.getname(),y=f.$block[x],z=this.getselection(),a=z.getranges(),b=z.islocked;if(b)z.unlock();var c,d,e,f;for(var g=a.length-1;g>=0;g--){c=a[g];c.deletecontents();d=!g&&w||w.clone(true);var h,i;if(y)while((h=c.getcommonancestor(false,true))&&((i=f[h.getname()])&&(!(i&&i[x]))))if(h.getname() in f.span)c.splitelement(h);else if(c.checkstartofblock()&&c.checkendofblock()){c.setstartbefore(h);c.collapse(true);h.remove();}else c.splitblock();c.insertnode(d);if(!e)e=d;}c.movetoposition(e,4);var j=e.getnextsourcenode(true);if(j&&j.type==1)c.movetoelementeditstart(j);z.selectranges([c]);if(b)this.getselection().lock();e.settimeout(function(){this.fire('savesnapshot');},0,this);}};function p(v){if(!v.checkdirty())settimeout(function(){v.resetdirty();});};var q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true);function s(v){return q(v)&&r(v);};function t(v){return v.type==3&&e.trim(v.gettext()).match(/^(?: |\xa0)$/);};function u(v){var w=v.editor,x=v.data.path,y=x.blocklimit,z=v.data.selection,a=z.getranges()[0],b=w.document.getbody(),c=w.config.entermode; if(c!=2&&a.collapsed&&y.getname()=='body'&&!x.block){p(w);var d=a.fixblock(true,w.config.entermode==3?'div':'p');if(c){var e=d.getfirst(s);e&&t(e)&&e.remove();}if(d.getouterhtml().match(m)){var f=d.getprevious(q),g=d.getnext(q);if(f&&f.getname&&!(f.getname() in l)&&a.movetoelementeditstart(f)||g&&g.getname&&!(g.getname() in l)&&a.movetoelementeditstart(g))d.remove();}a.select();if(!c)w.selectionchange();}var h=b.getlast(d.walker.whitespaces(true));if(h&&h.getname&&h.getname() in l){p(w);if(!c)b.appendbogus();else b.append(w.document.createtext('\xa0'));}};j.add('wysiwygarea',{requires:['editingblock'],init:function(v){var w=v.config.entermode!=2?v.config.entermode==3?'div':'p':false,x=v.lang.editortitle.replace('%1',v.name);v.on('editingblockready',function(){var a,b,c,d,e,f,g=b.iscustomdomain(),h=function(k){if(b)b.remove();e=0;var l=!b.gecko&&e.addfunction(function(n){e.removefunction(l);n.write(k);}),m='document.open();'+(g?'document.domain="'+document.domain+'";':'')+(b.gecko?'':'parent.ckeditor.tools.callfunction('+l+',document);')+'document.close();';b=h.createfromhtml('');b.gecko&&b.on('load',function(n){n.removelistener();var o=b.getframedocument().$;o.open();o.write(k);o.close();});a.append(b);},i='',j=function(k){if(e)return;e=1;v.fire('ariawidget',b);var l=k.document,m=l.body,n=l.getelementbyid('cke_actscrpt');n.parentnode.removechild(n);delete a._['contentdomready'+v.name];m.spellcheck=!v.config.disablenativespellchecker;if(c){m.hidefocus=true;m.disabled=true;m.contenteditable=true;m.removeattribute('disabled');}else l.designmode='on';try{l.execcommand('enableobjectresizing',false,!v.config.disableobjectresizing);}catch(s){}try{l.execcommand('enableinlinetableediting',false,!v.config.disablenativetablehandles);}catch(t){}k=v.window=new d.window(k);l=v.document=new g(l);if(!(c||b.opera))l.on('mousedown',function(u){var v=u.data.gettarget();if(v.is('img','hr','input','textarea','select'))v.getselection().selectelement(v);});if(b.webkit){l.on('click',function(u){if(u.data.gettarget().is('input','select'))u.data.preventdefault();});l.on('mouseup',function(u){if(u.data.gettarget().is('input','textarea'))u.data.preventdefault(); });}if(c&&l.$.compatmode=='css1compat'){var o=l.getdocumentelement();o.on('mousedown',function(u){if(u.data.gettarget().equals(o))z.focus();});}var p=c||b.webkit?k:l;p.on('blur',function(){v.focusmanager.blur();});p.on('focus',function(){if(b.gecko){var u=m;while(u.firstchild)u=u.firstchild;if(!u.nextsibling&&'br'==u.tagname&&u.hasattribute('_moz_editor_bogus_node')){var v=l.$.createevent('keyevents');v.initkeyevent('keypress',true,true,k.$,false,false,false,false,0,32);l.$.dispatchevent(v);var w=l.getbody().getfirst();if(v.config.entermode==2)l.createelement('br',{attributes:{_moz_dirty:''}}).replace(w);else w.remove();}}v.focusmanager.focus();});var q=v.keystrokehandler;if(q)q.attach(l);if(c){l.on('keydown',function(u){var v=u.data.getkeystroke();if(v in {8:1,46:1}){var w=v.getselection(),x=w.getselectedelement();if(x){v.fire('savesnapshot');var y=w.getranges()[0].createbookmark();x.remove();w.selectbookmarks([y]);v.fire('savesnapshot');u.data.preventdefault();}}});if(l.$.compatmode=='css1compat'){var r={33:1,34:1};l.on('keydown',function(u){if(u.data.getkeystroke() in r)settimeout(function(){v.getselection().scrollintoview();},0);});}}if(v.contextmenu)v.contextmenu.addtarget(l,v.config.browsercontextmenuonctrl!==false);settimeout(function(){v.fire('contentdom');if(f){v.mode='wysiwyg';v.fire('mode');f=false;}c=false;if(d){v.focus();d=false;}settimeout(function(){v.fire('dataready');},0);if(c)settimeout(function(){if(v.document){var u=v.document.$.body;u.runtimestyle.marginbottom='0px';u.runtimestyle.marginbottom='';}},1000);},0);};v.addmode('wysiwyg',{load:function(k,l,m){a=k;if(c&&b.quirks)k.setstyle('position','relative');v.maybedirty=true;f=true;if(m)this.loadsnapshotdata(l);else this.loaddata(l);},loaddata:function(k){c=true;var l=v.config,m=l.fullpage,n=l.doctype,o='';!m&&(o=e.buildstylehtml(v.config.contentscss)+o);var p=l.basehref?'':'';if(m)k=k.replace(/]*>/i,function(q){v.doctype=n=q;return '';});if(v.dataprocessor)k=v.dataprocessor.tohtml(k,w);if(m){if(!/]/.test(k))k=''+k;if(!/]/.test(k))k=''+k+'';if(!/]/.test(k))k=k.replace(/]*>/,'$&');p&&(k=k.replace(//,'$&'+p));k=k.replace(/<\/head\s*>/,o+'$&');k=n+k;}else k=l.doctype+''+''+x+''+''+p+o+''+''+k+''; k+=i;a._['contentdomready'+v.name]=j;h(k);},getdata:function(){var k=v.config,l=k.fullpage,m=l&&v.doctype,n=b.getframedocument(),o=l?n.getdocumentelement().getouterhtml():n.getbody().gethtml();if(v.dataprocessor)o=v.dataprocessor.todataformat(o,w);if(k.ignoreemptyparagraph)o=o.replace(m,'');if(m)o=m+'\n'+o;return o;},getsnapshotdata:function(){return b.getframedocument().getbody().gethtml();},loadsnapshotdata:function(k){b.getframedocument().getbody().sethtml(k);},unload:function(k){v.window=v.document=b=a=d=null;v.fire('contentdomunload');},focus:function(){if(c)d=true;else if(v.window){v.window.focus();if(c)try{var k=v.getselection();k=k&&k.getnative();var l=k&&k.type&&k.createrange();if(l){k.empty();l.select();}}catch(m){}v.selectionchange();}}});v.on('inserthtml',n,null,null,20);v.on('insertelement',o,null,null,20);v.on('selectionchange',u,null,null,1);});var y;v.on('contentdom',function(){var a=v.document.getelementsbytag('title').getitem(0);a.setattribute('_cke_title',v.document.$.title);v.document.$.title=x;});if(c){var z;v.on('uiready',function(){z=v.container.append(h.createfromhtml(''));z.on('focus',function(){v.focus();});});}}});if(b.gecko)(function(){var v=document.body;if(!v)window.addeventlistener('load',arguments.callee,false);else v.setattribute('onpageshow',v.getattribute('onpageshow')+';event.persisted && ckeditor.tools.callfunction('+e.addfunction(function(){var w=a.instances,x,y;for(var z in w){x=w[z];y=x.document;if(y){y.$.designmode='off';y.$.designmode='on';}}})+')');})();})();i.disableobjectresizing=false;i.disablenativetablehandles=true;i.disablenativespellchecker=true;i.ignoreemptyparagraph=true;j.add('styles',{requires:['selection']});a.editor.prototype.attachstylestatechange=function(l,m){var n=this._.stylestatechangecallbacks;if(!n){n=this._.stylestatechangecallbacks=[];this.on('selectionchange',function(o){for(var p=0;p'+n+'';else l.sethtml(n);m.remove();};function t(l){var m=/(\s\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,n=l.getname(),o=u(l.getouterhtml(),m,function(q,r,s){return r+''+s+'
';
}),p=[];o.replace(/
([\s\s]*?)<\/pre>/gi,function(q,r){p.push(r);});return p;};function u(l,m,n){var o='',p='';l=l.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(q,r,s){r&&(o=r);s&&(p=s);return '';});return o+l.replace(m,n)+p;};function v(l,m){var n=new d.documentfragment(m.getdocument());for(var o=0;o');p=p.replace(/[ \t]{2,}/g,function(r){return e.repeat(' ',r.length-1)+' ';});var q=m.clone();q.sethtml(p);n.append(q);}return n;};function w(l,m){var n=l.gethtml();n=u(n,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');n=n.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');n=n.replace(/([ \t\n\r]+| )/g,' ');n=n.replace(/]*>/gi,'\n');if(c){var o=l.getdocument().createelement('div');o.append(m);m.$.outerhtml='
'+n+'
';m=o.getfirst().remove();}else m.sethtml(n);return m;};function x(l,m){var n=l._.definition,o=n.attributes,p=n.styles,q=i(l);function r(){for(var t in o){if(t=='class'&&m.getattribute(t)!=o[t])continue;m.removeattribute(t);}};r();for(var s in p)m.removestyle(s);o=q[m.getname()];if(o)r();a(m);};function y(l,m){var n=l._.definition,o=n.attributes,p=n.styles,q=i(l),r=m.getelementsbytag(l.element);for(var s=r.count();--s>=0;)x(l,r.getitem(s));for(var t in q)if(t!=l.element){r=m.getelementsbytag(t);for(s=r.count()-1;s>=0;s--){var u=r.getitem(s);z(u,q[t]);}}};function z(l,m){var n=m&&m.attributes;if(n)for(var o=0;o0)g+=(e.$.offsetwidth||0)-(e.$.clientwidth||0);g+=4;e.setstyle('width',g+'px');u.element.addclass('cke_frameloaded');var h=u.element.$.scrollheight;if(c&&b.quirks&&h>0)h+=(e.$.offsetheight||0)-(e.$.clientheight||0);e.setstyle('height',h+'px');t._.currentblock.element.setstyle('display','none').removestyle('display');}else e.removestyle('height');var i=t.element,j=i.getwindow(),k=j.getscrollposition(),l=j.getviewpanesize(),m={height:i.$.offsetheight,width:i.$.offsetwidth};if(z?a<0:a+m.width>l.width+k.x)a+=m.width*(z?1:-1);if(b+m.height>l.height+k.y)b-=m.height;v.setstyles({top:b+'px',left:a+'px',opacity:'1'});},this);t.isloaded?d():t.onload=d;e.settimeout(function(){w.$.contentwindow.focus();this.allowblur(true);},0,this);},0,this);this.visible=1;if(this.onshow)this.onshow.call(this);m=false;},hide:function(){var o=this;if(o.visible&&(!o.onhide||o.onhide.call(o)!==true)){o.hidechild();o.element.setstyle('display','none');o.visible=0;}},allowblur:function(o){var p=this._.panel;if(o!=undefined)p.allowblur=o;return p.allowblur;},showaschild:function(o,p,q,r,s,t){if(this._.activechild==o&&o._.panel._.offsetparentid==q.getid())return;this.hidechild();o.onhide=e.bind(function(){e.settimeout(function(){if(!this._.focused)this.hide();},0,this);},this);this._.activechild=o;this._.focused=false;o.showblock(p,q,r,s,t);if(b.ie7compat||b.ie8&&b.ie6compat)settimeout(function(){o.element.getchild(0).$.style.csstext+='';},100);},hidechild:function(){var o=this._.activechild;if(o){delete o.onhide;delete this._.activechild;o.hide();}}}});a.on('instancedestroyed',function(){var o=e.isempty(a.instances);for(var p in l){var q=l[p];if(o)q.destroy();else q.element.hide();}o&&(l={});});})();j.add('menu',{beforeinit:function(l){var m=l.config.menu_groups.split(','),n=l._.menugroups={},o=l._.menuitems={};for(var p=0;p'],y=q.length,z=y&&q[0].group;for(var a=0;a');z=b.group;}b.render(this,a,x);}x.push('');t.sethtml(x.join(''));if(this.parent)this.parent._.panel.showaschild(s,this.id,m,n,o,p); else s.showblock(this.id,m,n,o,p);r.fire('menushow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuitem=e.createclass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,classname:'cke_button_'+m});o.group=l._.menugroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var u=this;var o=l.id+string(m),p=typeof u.state=='undefined'?2:u.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=u.label;if(u.classname)q+=' '+u.classname;var s=u.getitems;n.push(''+'');if(s)n.push('','&#',u.editor.lang.dir=='rtl'?'9668':'9658',';','');n.push(r,'');}}});i.menu_submenudelay=400;i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){function l(){var v=this;try{var s=v.getselection();if(!s)return;var t=s.getstartelement(),u=new d.elementpath(t);if(!u.compare(v._.selectionpreviouspath)){v._.selectionpreviouspath=u;v.fire('selectionchange',{selection:s,path:u,element:t});}}catch(w){}};var m,n;function o(){n=true;if(m)return;p.call(this);m=e.settimeout(p,200,this);};function p(){m=null;if(n){e.settimeout(l,0,this);n=false;}};var q={exec:function(s){switch(s.mode){case 'wysiwyg':s.document.$.execcommand('selectall',false,null);break;case 'source':}},canundo:false};j.add('selection',{init:function(s){s.on('contentdom',function(){var t=s.document,u=t.getbody(); if(c){var v,w;u.on('focusin',function(){if(v){try{v.select();}catch(z){}v=null;}});s.window.on('focus',function(){w=true;y();});u.on('beforedeactivate',function(){w=false;});u.on('mousedown',x);u.on('mouseup',function(){w=true;settimeout(function(){y(true);},0);});u.on('keydown',x);u.on('keyup',function(){w=true;y();});t.on('selectionchange',y);function x(){w=false;};function y(z){if(w){var a=s.document,b=a&&a.$.selection;if(z&&b&&b.type=='none')if(!a.$.querycommandenabled('insertimage')){e.settimeout(y,50,this,true);return;}v=b&&b.createrange();o.call(s);}};}else{t.on('mouseup',o,s);t.on('keyup',o,s);}});s.addcommand('selectall',q);s.ui.addbutton('selectall',{label:s.lang.selectall,command:'selectall'});s.selectionchange=o;}});a.editor.prototype.getselection=function(){return this.document&&this.document.getselection();};a.editor.prototype.forcenextselectioncheck=function(){delete this._.selectionpreviouspath;};g.prototype.getselection=function(){var s=new d.selection(this);return!s||s.isinvalid?null:s;};a.selection_none=1;a.selection_text=2;a.selection_element=3;d.selection=function(s){var v=this;var t=s.getcustomdata('cke_locked_selection');if(t)return t;v.document=s;v.islocked=false;v._={cache:{}};if(c){var u=v.getnative().createrange();if(!u||u.item&&u.item(0).ownerdocument!=v.document.$||u.parentelement&&u.parentelement().ownerdocument!=v.document.$)v.isinvalid=true;}return v;};var r={img:1,hr:1,li:1,table:1,tr:1,td:1,th:1,embed:1,object:1,ol:1,ul:1,a:1,input:1,form:1,select:1,textarea:1,button:1,fieldset:1,th:1,thead:1,tfoot:1};d.selection.prototype={getnative:c?function(){return this._.cache.nativesel||(this._.cache.nativesel=this.document.$.selection);}:function(){return this._.cache.nativesel||(this._.cache.nativesel=this.document.getwindow().$.getselection());},gettype:c?function(){var s=this._.cache;if(s.type)return s.type;var t=1;try{var u=this.getnative(),v=u.type;if(v=='text')t=2;if(v=='control')t=3;if(u.createrange().parentelement)t=2;}catch(w){}return s.type=t;}:function(){var s=this._.cache;if(s.type)return s.type;var t=2,u=this.getnative();if(!u)t=1;else if(u.rangecount==1){var v=u.getrangeat(0),w=v.startcontainer;if(w==v.endcontainer&&w.nodetype==1&&v.endoffset-v.startoffset==1&&r[w.childnodes[v.startoffset].nodename.tolowercase()])t=3;}return s.type=t;},getranges:c?(function(){var s=function(t,u){t=t.duplicate();t.collapse(u);var v=t.parentelement(),w=v.childnodes,x;for(var y=0;y0)break;else if(!a||b==1&&a==-1)return{container:v,offset:y};else if(!b)return{container:v,offset:y+1};x=null;}}if(!x){x=t.duplicate();x.movetoelementtext(v);x.collapse(false);}x.setendpoint('starttostart',t);var c=x.text.replace(/(\r\n|\r)/g,'\n').length;try{while(c>0)c-=w[--y].nodevalue.length;}catch(d){c=0;}if(c===0)return{container:v,offset:y};else return{container:w[y],offset:-c};};return function(){var e=this;var t=e._.cache;if(t.ranges)return t.ranges;var u=e.getnative(),v=u&&u.createrange(),w=e.gettype(),x;if(!u)return[];if(w==2){x=new d.range(e.document);var y=s(v,true);x.setstart(new d.node(y.container),y.offset);y=s(v);x.setend(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=e._.cache.ranges=[];for(var a=0;a=0){q.collapse(true);o.setend(q.endcontainer.$,q.endoffset);}else throw r;}var p=q.document.getselection().getnative();p.removeallranges();p.addrange(o);};})();(function(){var l={elements:{$:function(m){var n=m.attributes,o=n&&n._cke_realelement,p=o&&new a.htmlparser.fragment.fromhtml(decodeuricomponent(o)),q=p&&p.children[0];if(q&&m.attributes._cke_resizable){var r=m.attributes.style;if(r){var s=/(?:^|\s)width\s*:\s*(\d+)/i.exec(r),t=s&&s[1];s=/(?:^|\s)height\s*:\s*(\d+)/i.exec(r);var u=s&&s[1];if(t)q.attributes.width=t;if(u)q.attributes.height=u;}}return q;}}};j.add('fakeobjects',{requires:['htmlwriter'],afterinit:function(m){var n=m.dataprocessor,o=n&&n.htmlfilter;if(o)o.addrules(l);}});})();a.editor.prototype.createfakeelement=function(l,m,n,o){var p=this.lang.fakeobjects,q={'class':m,src:a.geturl('images/spacer.gif'),_cke_realelement:encodeuricomponent(l.getouterhtml()),_cke_real_node_type:l.type,alt:p[n]||p.unknown};if(n)q._cke_real_element_type=n;if(o)q._cke_resizable=o;return this.document.createelement('img',{attributes:q});};a.editor.prototype.createfakeparserelement=function(l,m,n,o){var p=this.lang.fakeobjects,q,r=new a.htmlparser.basicwriter();l.writehtml(r);q=r.gethtml();var s={'class':m,src:a.geturl('images/spacer.gif'),_cke_realelement:encodeuricomponent(q),_cke_real_node_type:l.type,alt:p[n]||p.unknown}; if(n)s._cke_real_element_type=n;if(o)s._cke_resizable=o;return new a.htmlparser.element('img',s);};a.editor.prototype.restorerealelement=function(l){if(l.getattribute('_cke_real_node_type')!=1)return null;return h.createfromhtml(decodeuricomponent(l.getattribute('_cke_realelement')),this.document);};j.add('richcombo',{requires:['floatpanel','listblock','button'],beforeinit:function(l){l.ui.addhandler(3,k.richcombo.handler);}});a.ui_richcombo=3;k.richcombo=e.createclass({$:function(l){var n=this;e.extend(n,l,{title:l.label,modes:{wysiwyg:1}});var m=n.panel||{};delete n.panel;n.id=e.getnextnumber();n.document=m&&m.parent&&m.parent.getdocument()||a.document;m.classname=(m.classname||'')+(' cke_rcombopanel');m.block={multiselect:m.multiselect,attributes:m.attributes};n._={paneldefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richcombo(l);}}},proto:{renderhtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n=b,o='cke_'+this.id,p=e.addfunction(function(s){var v=this;var t=v._;if(t.state==0)return;v.createpanel(l);if(t.on){t.panel.hide();return;}if(!t.committed){t.list.commit();t.committed=1;}var u=v.getvalue();if(u)t.list.mark(u);else t.list.unmarkall();t.panel.showblock(v.id,new h(s),4);},this),q={id:o,combo:this,focus:function(){var s=a.document.getbyid(o).getchild(1);s.focus();},execute:p};l.on('mode',function(){this.setstate(this.modes[l.mode]?2:0);},this);var r=e.addfunction(function(s,t){s=new d.event(s);var u=s.getkeystroke();switch(u){case 13:case 32:case 40:e.callfunction(p,t);break;default:q.onkey(q,u);}s.preventdefault();});m.push('','','',this.label,'','=10900&&!n.hc?'':" href=\"javascript:void('"+this.label+"')\"",' role="button" aria-labelledby="',o,'_label" aria-describedby="',o,'_text" aria-haspopup="true"');if(b.opera||b.gecko&&b.mac)m.push(' onkeypress="return false;"');if(b.gecko)m.push(' onblur="this.style.csstext = this.style.csstext;"');m.push(' onkeydown="ckeditor.tools.callfunction( ',r,', event, this );" onclick="ckeditor.tools.callfunction(',p,', this); return false;">'+this.label+''+''+''+(b.hc?'':'')+''+''+''+''); if(this.onrender)this.onrender();return q;},createpanel:function(l){if(this._.panel)return;var m=this._.paneldefinition,n=this._.paneldefinition.block,o=m.parent||a.document.getbody(),p=new k.floatpanel(l,o,m),q=p.addlistblock(this.id,n),r=this;p.onshow=function(){if(r.classname)this.element.getfirst().addclass(r.classname+'_panel');r.setstate(1);q.focus(!r.multiselect&&r.getvalue());r._.on=1;if(r.onopen)r.onopen();};p.onhide=function(){if(r.classname)this.element.getfirst().removeclass(r.classname+'_panel');r.setstate(2);r._.on=0;if(r.onclose)r.onclose();};p.onescape=function(){p.hide();r.document.getbyid('cke_'+r.id).getfirst().getnext().focus();};q.onclick=function(s,t){r.document.getwindow().focus();if(r.onclick)r.onclick.call(r,s,t);if(t)r.setvalue(s,r._.items[s]);else r.setvalue('');p.hide();};this._.panel=p;this._.list=q;p.getblock(this.id).onhide=function(){r._.on=0;r.setstate(2);};if(this.init)this.init();},setvalue:function(l,m){var o=this;o._.value=l;var n=o.document.getbyid('cke_'+o.id+'_text');if(!(l||m)){m=o.label;n.addclass('cke_inline_label');}else n.removeclass('cke_inline_label');n.sethtml(typeof m!='undefined'?m:l);},getvalue:function(){return this._.value||'';},unmarkall:function(){this._.list.unmarkall();},mark:function(l){this._.list.mark(l);},hideitem:function(l){this._.list.hideitem(l);},hidegroup:function(l){this._.list.hidegroup(l);},showall:function(){this._.list.showall();},add:function(l,m,n){this._.items[l]=n||l;this._.list.add(l,m,n);},startgroup:function(l){this._.list.startgroup(l);},commit:function(){this._.list.commit();},setstate:function(l){var m=this;if(m._.state==l)return;m.document.getbyid('cke_'+m.id).setstate(l);m._.state=l;}}});k.prototype.addrichcombo=function(l,m){this.add(l,3,m);};j.add('htmlwriter');a.htmlwriter=e.createclass({base:a.htmlparser.basicwriter,$:function(){var n=this;n.base();n.indentationchars='\t';n.selfclosingend=' />';n.linebreakchars='\n';n.forcesimpleampersand=false;n.sortattributes=true;n._.indent=false;n._.indentation='';n._.rules={};var l=f;for(var m in e.extend({},l.$nonbodycontent,l.$block,l.$listitem,l.$tablecontent))n.setrules(m,{indent:true,breakbeforeopen:true,breakafteropen:false,breakbeforeclose:!l[m]['#'],breakafterclose:true});n.setrules('br',{breakafteropen:true});n.setrules('title',{indent:false,breakafteropen:false});n.setrules('p',{indent:false,breakafteropen:false});n.setrules('style',{indent:false,breakbeforeclose:true});n.setrules('pre',{indent:false});},proto:{opentag:function(l,m){var o=this; var n=o._.rules[l];if(o._.indent)o.indentation();else if(n&&n.breakbeforeopen){o.linebreak();o.indentation();}o._.output.push('<',l);},opentagclose:function(l,m){var o=this;var n=o._.rules[l];if(m)o._.output.push(o.selfclosingend);else{o._.output.push('>');if(n&&n.indent)o._.indentation+=o.indentationchars;}if(n&&n.breakafteropen)o.linebreak();},attribute:function(l,m){if(typeof m=='string'){this.forcesimpleampersand&&(m=m.replace(/&/g,'&'));m=m.replace(/"/g,'"');}this._.output.push(' ',l,'="',m,'"');},closetag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationchars.length);if(n._.indent)n.indentation();else if(m&&m.breakbeforeclose){n.linebreak();n.indentation();}n._.output.push('');if(m&&m.breakafterclose)n.linebreak();},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},linebreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.linebreakchars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setrules:function(l,m){var n=this._.rules[l];if(n)e.extend(n,m,true);else this._.rules[l]=m;}}});j.add('menubutton',{requires:['button','contextmenu'],beforeinit:function(l){l.ui.addhandler(5,k.menubutton.handler);}});a.ui_menubutton=5;(function(){var l=function(m){var n=this._;if(n.state===0)return;n.previousstate=n.state;var o=n.menu;if(!o){o=n.menu=new j.contextmenu(m);o.onhide=e.bind(function(){this.setstate(n.previousstate);},this);if(this.onmenu)o.addlistener(this.onmenu);}if(n.on){o.hide();return;}this.setstate(1);o.show(a.document.getbyid(this._.id),4);};k.menubutton=e.createclass({base:k.button,$:function(m){var n=m.panel;delete m.panel;this.base(m);this.hasarrow=true;this.click=l;},statics:{handler:{create:function(m){return new k.menubutton(m);}}}});})();a.dialog_resize_none=0;a.dialog_resize_width=1;a.dialog_resize_height=2;a.dialog_resize_both=3;(function(){function l(k){return!!this._.tabs[k][0].$.offsetheight;};function m(){var o=this;var k=o._.currenttabid,l=o._.tabidlist.length,m=e.indexof(o._.tabidlist,k)+l;for(var n=m-1;n>m-l;n--)if(l.call(o,o._.tabidlist[n%l]))return o._.tabidlist[n%l];return null;};function n(){var o=this;var k=o._.currenttabid,l=o._.tabidlist.length,m=e.indexof(o._.tabidlist,k);for(var n=m+1;n1){p._.tabbarmode=true;p._.tabs[p._.currenttabid][0].focus();}else if(!ae._.hasfocus){ae._.currentfocusindex=-1;if(m.onfocus){var aa=m.onfocus.call(ae);aa&&aa.focus();}else s(true);if(ae._.editor.mode=='wysiwyg'&&c){var ab=k.document.$.selection,ac=ab.createrange();if(ac)if(ac.parentelement&&ac.parentelement().ownerdocument==k.document.$||ac.item&&ac.item(0).ownerdocument==k.document.$){var ad=document.body.createtextrange();ad.movetoelementtext(ae.getelement().getfirst().$);ad.collapse(true);ad.select();}}}},this,null,4294967295);if(b.ie6compat)this.on('load',function(aa){var ab=this.getelement(),ac=ab.getfirst();ac.remove();ac.appendto(ab);},this);v(this);w(this);new d.text(m.title,a.document).appendto(this.parts.title);for(var x=0;x0?l:0)+('px'),top:(m>0?m:0)+('px')});};})(),getposition:function(){return e.extend({},this._.position);},show:function(){var k=this._.editor;if(k.mode=='wysiwyg'&&c){var l=k.getselection();l&&l.lock();}var m=this._.element,n=this.definition;if(!(m.getparent()&&m.getparent().equals(a.document.getbody())))m.appendto(a.document.getbody());else return;if(b.gecko&&b.version<10900){var o=this.parts.dialog;o.setstyle('position','absolute');settimeout(function(){o.setstyle('position','fixed');},0);}this.resize(n.minwidth,n.minheight);this.selectpage(this.definition.contents[0].id);this.reset();if(a.dialog._.currentzindex===null)a.dialog._.currentzindex=this._.editor.config.basefloatzindex;this._.element.getfirst().setstyle('z-index',a.dialog._.currentzindex+=10);if(a.dialog._.currenttop===null){a.dialog._.currenttop=this;this._.parentdialog=null;z(this._.editor);m.on('keydown',c);m.on(b.opera?'keypress':'keyup',d);for(var p in {keyup:1,keydown:1,keypress:1})m.on(p,j);}else{this._.parentdialog=a.dialog._.currenttop;var q=this._.parentdialog.getelement().getfirst();q.$.style.zindex-=math.floor(this._.editor.config.basefloatzindex/2);a.dialog._.currenttop=this;}e(this,this,'\x1b',null,function(){this.getbutton('cancel')&&this.getbutton('cancel').click();});this._.hasfocus=false;e.settimeout(function(){var r=a.document.getwindow().getviewpanesize(),s=this.getsize();this.move((r.width-n.minwidth)/(2),(r.height-s.height)/(2)); this.parts.dialog.setstyle('visibility','');this.fireonce('load',{});this.fire('show',{});this._.editor.fire('dialogshow',this);this.foreach(function(t){t.setinitvalue&&t.setinitvalue();});},100,this);},foreach:function(k){var n=this;for(var l in n._.contents)for(var m in n._.contents[l])k(n._.contents[l][m]);return n;},reset:(function(){var k=function(l){if(l.reset)l.reset();};return function(){this.foreach(k);return this;};})(),setupcontent:function(){var k=arguments;this.foreach(function(l){if(l.setup)l.setup.apply(l,k);});},commitcontent:function(){var k=arguments;this.foreach(function(l){if(l.commit)l.commit.apply(l,k);});},hide:function(){this.fire('hide',{});this._.editor.fire('dialoghide',this);var k=this._.element;if(!k.getparent())return;k.remove();this.parts.dialog.setstyle('visibility','hidden');f(this);if(!this._.parentdialog)a();else{var l=this._.parentdialog.getelement().getfirst();l.setstyle('z-index',parseint(l.$.style.zindex,10)+math.floor(this._.editor.config.basefloatzindex/2));}a.dialog._.currenttop=this._.parentdialog;if(!this._.parentdialog){a.dialog._.currentzindex=null;k.removelistener('keydown',c);k.removelistener(b.opera?'keypress':'keyup',d);for(var m in {keyup:1,keydown:1,keypress:1})k.removelistener(m,j);var n=this._.editor;n.focus();if(n.mode=='wysiwyg'&&c){var o=n.getselection();o&&o.unlock(true);}}else a.dialog._.currentzindex-=10;this.foreach(function(p){p.resetinitvalue&&p.resetinitvalue();});},addpage:function(k){var w=this;var l=[],m=k.label?' title="'+e.htmlencode(k.label)+'"':'',n=k.elements,o=a.dialog._.uielementbuilders.vbox.build(w,{type:'vbox',classname:'cke_dialog_page_contents',children:k.elements,expand:!!k.expand,padding:k.padding,style:k.style||'width: 100%;'+(b.ie6compat?'':'height: 100%;')},l),p=h.createfromhtml(l.join(''));p.setattribute('role','tabpanel');var q=b,r=k.id+'_'+e.getnextnumber(),s=h.createfromhtml(['0?' cke_last':'cke_first',m,!!k.hidden?' style="display:none"':'',' id="',r,'"',q.gecko&&q.version>=10900&&!q.hc?'':' href="javascript:void(0)"',' tabindex="-1"',' hidefocus="true"',' role="tab">',k.label,''].join(''));p.setattribute('aria-labelledby',r);if(w._.pagecount===0)w.parts.dialog.addclass('cke_single_page');else w.parts.dialog.removeclass('cke_single_page');w._.tabs[k.id]=[s,p];w._.tabidlist.push(k.id);w._.pagecount++;w._.lasttab=s;var t=w._.contents[k.id]={},u,v=o.getchild();while(u=v.shift()){t[u.id]=u;if(typeof u.getchild=='function')v.push.apply(v,u.getchild()); }p.setattribute('name',k.id);p.appendto(w.parts.contents);s.unselectable();w.parts.tabs.append(s);if(k.accesskey){e(w,w,'ctrl+'+k.accesskey,h,g);w._.accesskeymap['ctrl+'+k.accesskey]=k.id;}},selectpage:function(k){var p=this;for(var l in p._.tabs){var m=p._.tabs[l][0],n=p._.tabs[l][1];if(l!=k){m.removeclass('cke_dialog_tab_selected');n.hide();}n.setattribute('aria-hidden',l!=k);}var o=p._.tabs[k];o[0].addclass('cke_dialog_tab_selected');o[1].show();p._.currenttabid=k;p._.currenttabindex=e.indexof(p._.tabidlist,k);},hidepage:function(k){var l=this._.tabs[k]&&this._.tabs[k][0];if(!l)return;l.hide();},showpage:function(k){var l=this._.tabs[k]&&this._.tabs[k][0];if(!l)return;l.show();},getelement:function(){return this._.element;},getname:function(){return this._.name;},getcontentelement:function(k,l){var m=this._.contents[k];return m&&m[l];},getvalueof:function(k,l){return this.getcontentelement(k,l).getvalue();},setvalueof:function(k,l,m){return this.getcontentelement(k,l).setvalue(m);},getbutton:function(k){return this._.buttons[k];},click:function(k){return this._.buttons[k].click();},disablebutton:function(k){return this._.buttons[k].disable();},enablebutton:function(k){return this._.buttons[k].enable();},getpagecount:function(){return this._.pagecount;},getparenteditor:function(){return this._.editor;},getselectedelement:function(){return this.getparenteditor().getselection().getselectedelement();},addfocusable:function(k,l){var n=this;if(typeof l=='undefined'){l=n._.focuslist.length;n._.focuslist.push(new o(n,k,l));}else{n._.focuslist.splice(l,0,new o(n,k,l));for(var m=l+1;mv.width-u.width-p)aa=v.width-u.width+q[1];else aa=m.x;if(m.y+q[0]v.height-u.height-p)ab=v.height-u.height+q[2];else ab=m.y;k.move(aa,ab);t.data.preventdefault();};function s(t){a.document.removelistener('mousemove',r);a.document.removelistener('mouseup',s);if(b.ie6compat){var u=y.getchild(0).getframedocument();u.removelistener('mousemove',r);u.removelistener('mouseup',s);}};k.parts.title.on('mousedown',function(t){k._.updatesize=true;l={x:t.data.$.screenx,y:t.data.$.screeny};a.document.on('mousemove',r);a.document.on('mouseup',s);m=k.getposition(); if(b.ie6compat){var u=y.getchild(0).getframedocument();u.on('mousemove',r);u.on('mouseup',s);}t.data.preventdefault();},k);};function w(k){var l=k.definition,m=l.minwidth||0,n=l.minheight||0,o=l.resizable,p=k.getparenteditor().skin.margins||[0,0,0,0];function q(ab,ac){ab.y+=ac;};function r(ab,ac){ab.x2+=ac;};function s(ab,ac){ab.y2+=ac;};function t(ab,ac){ab.x+=ac;};var u=null,v=null,w=k._.editor.config.magnetdistance,x=['tl','t','tr','l','r','bl','b','br'];function y(ab){var ac=ab.listenerdata.part,ad=k.getsize();v=k.getposition();e.extend(v,{x2:v.x+ad.width,y2:v.y+ad.height});u={x:ab.data.$.screenx,y:ab.data.$.screeny};a.document.on('mousemove',z,k,{part:ac});a.document.on('mouseup',aa,k,{part:ac});if(b.ie6compat){var ae=y.getchild(0).getframedocument();ae.on('mousemove',z,k,{part:ac});ae.on('mouseup',aa,k,{part:ac});}ab.data.preventdefault();};function z(ab){var ac=ab.data.$.screenx,ad=ab.data.$.screeny,ae=ac-u.x,af=ad-u.y,ag=a.document.getwindow().getviewpanesize(),ah=ab.listenerdata.part;if(ah.search('t')!=-1)q(v,af);if(ah.search('l')!=-1)t(v,ae);if(ah.search('b')!=-1)s(v,af);if(ah.search('r')!=-1)r(v,ae);u={x:ac,y:ad};var ai,aj,ak,al;if(v.x+p[3]ag.width-w)ak=ag.width+p[1];else if(ah.search('r')!=-1&&v.x2-v.xag.height-w)al=ag.height+p[2];else if(ah.search('b')!=-1&&v.y2-v.y'];if(b.ie6compat){var o=b.iscustomdomain(),p="";n.push(''); }n.push('');y=h.createfromhtml(n.join(''));}var q=y,r=function(){var v=l.getviewpanesize();q.setstyles({width:v.width+'px',height:v.height+'px'});},s=function(){var v=l.getscrollposition(),w=a.dialog._.currenttop;q.setstyles({left:v.x+'px',top:v.y+'px'});do{var x=w.getposition();w.move(x.x,x.y);}while(w=w._.parentdialog)};x=r;l.on('resize',r);r();if(b.ie6compat){var t=function(){s();arguments.callee.prevscrollhandler.apply(this,arguments);};l.$.settimeout(function(){t.prevscrollhandler=window.onscroll||(function(){});window.onscroll=t;},0);s();}var u=k.config.dialog_backgroundcoveropacity;q.setopacity(typeof u!='undefined'?u:0.5);q.appendto(a.document.getbody());},a=function(){if(!y)return;var k=a.document.getwindow();y.remove();k.removelistener('resize',x);if(b.ie6compat)k.$.settimeout(function(){var l=window.onscroll&&window.onscroll.prevscrollhandler;window.onscroll=l||null;},0);x=null;},b={},c=function(k){var l=k.data.$.ctrlkey||k.data.$.metakey,m=k.data.$.altkey,n=k.data.$.shiftkey,o=string.fromcharcode(k.data.$.keycode),p=b[(l?'ctrl+':'')+(m?'alt+':'')+(n?'shift+':'')+o];if(!p||!p.length)return;p=p[p.length-1];p.keydown&&p.keydown.call(p.uielement,p.dialog,p.key);k.data.preventdefault();},d=function(k){var l=k.data.$.ctrlkey||k.data.$.metakey,m=k.data.$.altkey,n=k.data.$.shiftkey,o=string.fromcharcode(k.data.$.keycode),p=b[(l?'ctrl+':'')+(m?'alt+':'')+(n?'shift+':'')+o];if(!p||!p.length)return;p=p[p.length-1];if(p.keyup){p.keyup.call(p.uielement,p.dialog,p.key);k.data.preventdefault();}},e=function(k,l,m,n,o){var p=b[m]||(b[m]=[]);p.push({uielement:k,dialog:l,key:m,keyup:o||k.accesskeyup,keydown:n||k.accesskeydown});},f=function(k){for(var l in b){var m=b[l];for(var n=m.length-1;n>=0;n--)if(m[n].dialog==k||m[n].uielement==k)m.splice(n,1);if(m.length===0)delete b[l];}},g=function(k,l){if(k._.accesskeymap[l])k.selectpage(k._.accesskeymap[l]);},h=function(k,l){},i={27:1,13:1},j=function(k){if(k.data.getkeystroke() in i)k.data.stoppropagation();};(function(){k.dialog={uielement:function(k,l,m,n,o,p,q){if(arguments.length<4)return;var r=(n.call?n(l):n)||('div'),s=['<',r,' '],t=(o&&o.call?o(l):o)||({}),u=(p&&p.call?p(l):p)||({}),v=(q&&q.call?q.call(this,k,l):q)||(''),w=this.domid=u.id||e.getnextnumber()+'_uielement',x=this.id=l.id,y;u.id=w;var z={};if(l.type)z['cke_dialog_ui_'+l.type]=1;if(l.classname)z[l.classname]=1;var aa=u['class']&&u['class'].split?u['class'].split(' '):[];for(y=0;y=0;y--)if(ac[y]==='')ac.splice(y,1);if(ac.length>0)u.style=(u.style?u.style+'; ':'')+(ac.join('; '));for(y in u)s.push(y+'="'+e.htmlencode(u[y])+'" ');s.push('>',v,'');m.push(s.join(''));(this._||(this._={})).dialog=k;if(typeof l.ischanged=='boolean')this.ischanged=function(){return l.ischanged;};if(typeof l.ischanged=='function')this.ischanged=l.ischanged;a.event.implementon(this);this.registerevents(l);if(this.accesskeyup&&this.accesskeydown&&l.accesskey)e(this,k,'ctrl+'+l.accesskey);var ad=this;k.on('load',function(){if(ad.getinputelement())ad.getinputelement().on('focus',function(){k._.tabbarmode=false;k._.hasfocus=true;ad.fire('focus');},ad);});if(this.keyboardfocusable){this.tabindex=l.tabindex||0;this.focusindex=k._.focuslist.push(this)-1;this.on('focus',function(){k._.currentfocusindex=ad.focusindex;});}e.extend(this,l);},hbox:function(k,l,m,n,o){if(arguments.length<4)return;this._||(this._={});var p=this._.children=l,q=o&&o.widths||null,r=o&&o.height||null,s={},t,u=function(){var w=[''];for(t=0;t0)w.push('style="'+y.join('; ')+'" ');w.push('>',m[t],'');}w.push('');return w.join('');},v={role:'presentation'};o&&o.align&&(v.align=o.align);k.dialog.uielement.call(this,k,o||{type:'hbox'},n,'table',s,v,u);},vbox:function(k,l,m,n,o){if(arguments.length<3)return;this._||(this._={});var p=this._.children=l,q=o&&o.width||null,r=o&&o.heights||null,s=function(){var t=['');for(var u=0;u');}t.push('
0)t.push('style="',v.join('; '),'" ');t.push(' class="cke_dialog_ui_vbox_child">',m[u],'
');return t.join('');};k.dialog.uielement.call(this,k,o||{type:'vbox'},n,'div',null,{role:'presentation'},s);}};})();k.dialog.uielement.prototype={getelement:function(){return a.document.getbyid(this.domid);},getinputelement:function(){return this.getelement();},getdialog:function(){return this._.dialog;},setvalue:function(k){this.getinputelement().setvalue(k);this.fire('change',{value:k});return this;},getvalue:function(){return this.getinputelement().getvalue();},ischanged:function(){return false;},selectparenttab:function(){var n=this;var k=n.getinputelement(),l=k,m;while((l=l.getparent())&&(l.$.classname.search('cke_dialog_page_contents')==-1)){}if(!l)return n;m=l.getattribute('name');if(n._.dialog._.currenttabid!=m)n._.dialog.selectpage(m);return n;},focus:function(){this.selectparenttab().getinputelement().focus();return this;},registerevents:function(k){var l=/^on([a-z]\w+)/,m,n=function(p,q,r,s){q.on('load',function(){p.getinputelement().on(r,s,p);});};for(var o in k){if(!(m=o.match(l)))continue;if(this.eventprocessors[o])this.eventprocessors[o].call(this,this._.dialog,k[o]);else n(this,this._.dialog,m[1].tolowercase(),k[o]);}return this;},eventprocessors:{onload:function(k,l){k.on('load',l,this);},onshow:function(k,l){k.on('show',l,this);},onhide:function(k,l){k.on('hide',l,this);}},accesskeydown:function(k,l){this.focus();},accesskeyup:function(k,l){},disable:function(){var k=this.getinputelement();k.setattribute('disabled','true');k.addclass('cke_disabled');},enable:function(){var k=this.getinputelement();k.removeattribute('disabled');k.removeclass('cke_disabled');},isenabled:function(){return!this.getinputelement().getattribute('disabled');},isvisible:function(){return this.getinputelement().isvisible();},isfocusable:function(){if(!this.isenabled()||!this.isvisible())return false;return true;}};k.dialog.hbox.prototype=e.extend(new k.dialog.uielement(),{getchild:function(k){var l=this;if(arguments.length<1)return l._.children.concat();if(!k.splice)k=[k];if(k.length<2)return l._.children[k[0]];else return l._.children[k[0]]&&l._.children[k[0]].getchild?l._.children[k[0]].getchild(k.slice(1,k.length)):null;}},true);k.dialog.vbox.prototype=new k.dialog.hbox();(function(){var k={build:function(l,m,n){var o=m.children,p,q=[],r=[];for(var s=0;s';});n.on('themeloaded',function(){n.fireonce('editingblockready'); });n.on('uiready',function(){n.setmode(n.config.startupmode);});n.on('aftersetdata',function(){if(!m){function o(){m=true;l(n).loaddata(n.getdata());m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removelistener('mode',arguments.callee);});}});n.on('beforegetdata',function(){if(!m&&n.mode){m=true;n.setdata(l(n).getdata());m=false;}});n.on('getsnapshot',function(o){if(n.mode)o.data=l(n).getsnapshotdata();});n.on('loadsnapshot',function(o){if(n.mode)l(n).loadsnapshotdata(o.data);});n.on('mode',function(o){o.removelistener();if(n.config.startupfocus)n.focus();settimeout(function(){n.fireonce('instanceready');a.fire('instanceready',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addmode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setmode=function(n){var o,p=this.getthemespace('contents'),q=this.checkdirty();if(this.mode){if(n==this.mode)return;this.fire('beforemodeunload');var r=l(this);o=r.getdata();r.unload(p);this.mode='';}p.sethtml('');var s=l(this,n);if(!s)throw '[ckeditor.editor.setmode] unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetdirty();this.removelistener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getdata():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupmode='wysiwyg';i.startupfocus=false;i.editingblock=true;j.add('panel',{beforeinit:function(l){l.ui.addhandler(2,k.panel.handler);}});a.ui_panel=2;k.panel=function(l,m){var n=this;if(m)e.extend(n,m);e.extend(n,{classname:'',css:[]});n.id=e.getnextnumber();n.document=l;n._={blocks:{}};};k.panel.handler={create:function(l){return new k.panel(l);}};k.panel.prototype={renderhtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var o=this;var n='cke_'+o.id;m.push('');return n;},getholderelement:function(){var l=this._.holder;if(!l){if(this.forceiframe||this.css.length){var m=this.document.getbyid('cke_'+this.id+'_frame'),n=m.getparent(),o=n.getattribute('dir'),p=n.getparent().getattribute('class'),q=n.getparent().getattribute('lang'),r=m.getframedocument(); r.$.open();if(b.iscustomdomain())r.$.domain=document.domain;var s=e.addfunction(e.bind(function(u){this.isloaded=true;if(this.onload)this.onload();},this));r.$.write(''+''+''+''+''+e.buildstylehtml(this.css)+'');r.$.close();var t=r.getwindow();t.$.ckeditor=a;r.on('keydown',function(u){var x=this;var v=u.data.getkeystroke(),w=x.document.getbyid('cke_'+x.id).getattribute('dir');if(x._.onkeydown&&x._.onkeydown(v)===false){u.data.preventdefault();return;}if(v==27||v==(w=='rtl'?39:37))if(x.onescape&&x.onescape(v)===false)u.data.preventdefault();},this);l=r.getbody();}else l=this.document.getbyid('cke_'+this.id);this._.holder=l;}return l;},addblock:function(l,m){var n=this;m=n._.blocks[l]=m instanceof k.panel.block?m:new k.panel.block(n.getholderelement(),m);if(!n._.currentblock)n.showblock(l);return m;},getblock:function(l){return this._.blocks[l];},showblock:function(l){var q=this;var m=q._.blocks,n=m[l],o=q._.currentblock,p=q.forceiframe?q.document.getbyid('cke_'+q.id+'_frame'):q._.holder;if(o){p.removeattributes(o.attributes);o.hide();}q._.currentblock=n;p.setattributes(n.attributes);a.fire('ariawidget',p);n._.focusindex=-1;q._.onkeydown=n.onkeydown&&e.bind(n.onkeydown,n);n.show();return n;},destroy:function(){this.element&&this.element.remove();}};k.panel.block=e.createclass({$:function(l,m){var n=this;n.element=l.append(l.getdocument().createelement('div',{attributes:{tabindex:-1,'class':'cke_panel_block',role:'presentation'},styles:{display:'none'}}));if(m)e.extend(n,m);n.keys={};n._.focusindex=-1;n.element.disablecontextmenu();},_:{markitem:function(l){if(l==-1)return;var m=this.element.getelementsbytag('a'),n=m.getitem(this._.focusindex=l);if(b.webkit)n.getdocument().getwindow().focus();n.focus();}},proto:{show:function(){this.element.setstyle('display','');},hide:function(){var l=this;if(!l.onhide||l.onhide.call(l)!==true)l.element.setstyle('display','none');},onkeydown:function(l){var q=this;var m=q.keys[l];switch(m){case 'next':var n=q._.focusindex,o=q.element.getelementsbytag('a'),p;while(p=o.getitem(++n))if(p.getattribute('_cke_focus')&&p.$.offsetwidth){q._.focusindex=n;p.focus();break;}return false;case 'prev':n=q._.focusindex;o=q.element.getelementsbytag('a'); while(n>0&&(p=o.getitem(--n)))if(p.getattribute('_cke_focus')&&p.$.offsetwidth){q._.focusindex=n;p.focus();break;}return false;case 'click':n=q._.focusindex;p=n>=0&&q.element.getelementsbytag('a').getitem(n);if(p)p.$.click?p.$.click():p.$.onclick();return false;}return true;}}});j.add('listblock',{requires:['panel'],onload:function(){k.panel.prototype.addlistblock=function(l,m){return this.addblock(l,new k.listblock(this.getholderelement(),m));};k.listblock=e.createclass({base:k.panel.block,$:function(l,m){var p=this;m=m||{};var n=m.attributes||(m.attributes={});(p.multiselect=!!m.multiselect)&&(n['aria-multiselectable']=true);!n.role&&(n.role='listbox');p.base.apply(p,arguments);var o=p.keys;o[40]='next';o[9]='next';o[38]='prev';o[2000+9]='prev';o[32]='click';p._.pendinghtml=[];p._.items={};p._.groups={};},_:{close:function(){if(this._.started){this._.pendinghtml.push('');delete this._.started;}},getclick:function(){if(!this._.click)this._.click=e.addfunction(function(l){var n=this;var m=true;if(n.multiselect)m=n.toggle(l);else n.mark(l);if(n.onclick)n.onclick(l,m);},this);return this._.click;}},proto:{add:function(l,m,n){var q=this;var o=q._.pendinghtml,p='cke_'+e.getnextnumber();if(!q._.started){o.push('