0;case"checked":return!!n.$.checked;case"value":var i=n.getAttribute("type");return i=="checkbox"||i=="radio"?n.$.value!="on":n.$.value}return e.apply(n,arguments)}})),function(){var e={canUndo:!1,exec:function(e){var t=e.document.createElement("hr"),n=new r.range(e.document);e.insertElement(t),n.moveToPosition(t,4);var i=t.getNext();(!i||i.type==1&&!i.isEditable())&&n.fixBlock(!0,e.config.enterMode==3?"div":"p"),n.select()}},t="horizontalrule";f.add(t,{init:function(n){n.addCommand(t,e),n.ui.addButton("HorizontalRule",{label:n.lang.horizontalrule,command:t})}})}(),function(){function o(e){var t=e.children.length,n=e.children[t-1];while(n&&n.type==3&&!i.trim(n.value))n=e.children[--t];return n}function l(e,r){var i=e.children,s=o(e);s&&((r||!n)&&s.type==1&&s.name=="br"&&i.pop(),s.type==3&&t.test(s.value)&&i.pop())}function c(e,t,r){if(!t&&(!r||typeof r=="function"&&r(e)===!1))return!1;if(t&&n&&(document.documentMode>7||e.name in s.tr||e.name in s.$listItem))return!1;var i=o(e);return!i||i&&(i.type==1&&i.name=="br"||e.name=="form"&&i.name=="input")}function p(t,r){return function(i){l(i,!t),c(i,!t,r)&&(t||n?i.add(new e.htmlParser.text(" ")):i.add(new e.htmlParser.element("br",{})))}}function E(e){var t=e.attributes;t.contenteditable!="false"&&(t["data-cke-editable"]=t.contenteditable?"true":1),t.contenteditable="false"}function S(e){var t=e.attributes;switch(t["data-cke-editable"]){case"true":t.contenteditable="true";break;case"1":delete t.contenteditable}}function O(t){return t.replace(x,function(t,n,r){return"<"+n+r.replace(T,function(t,n){return!/^on/.test(n)&&r.indexOf("data-cke-saved-"+n)==-1?" data-cke-saved-"+t+" data-cke-"+e.rnd+"-"+t:t})+">"})}function M(e){return e.replace(N,function(e){return""+encodeURIComponent(e)+" "})}function _(e){return e.replace(C,function(e,t){return decodeURIComponent(t)})}function D(e){return e.replace(k,"$1cke:$2")}function P(e){return e.replace(L,"$1$2")}function H(e){return e.replace(A," ")}function B(e){return e.replace(/(]*>)(\r\n|\n)/g,"$1$2$2")}function F(e){return e.replace(//g,function(e){return""})}function I(e){return e.replace(//g,function(e,t){return decodeURIComponent(t)})}function q(e,t){var n=t._.dataStore;return e.replace(//g,function(e,t){return decodeURIComponent(t)}).replace(/\{cke_protected_(\d+)\}/g,function(e,t){return n&&n[t]||""})}function R(e,t){var n=[],i=t.config.protectedSource,s=t._.dataStore||(t._.dataStore={id:1}),o=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,u=[/
",n=e.config.docType+''+""+s+""+e.lang.preview+" "+i.buildStyleHtml(e.config.contentsCss)+""+u+e.getData()+"
"}var f=640,l=420,c=80;try{var h=window.screen;f=Math.round(h.width*.8),l=Math.round(h.height*.7),c=Math.round(h.width*.1)}catch(p){}var d="";o&&(window._cke_htmlToLoad=n,d='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+"document.write( window.opener._cke_htmlToLoad );"+"document.close();"+"window.opener._cke_htmlToLoad = null;"+"})() )");var v=window.open(d,null,"toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width="+f+",height="+l+",left="+c);if(!o){var m=v.document;m.open(),m.write(n),m.close(),t.webkit&&setTimeout(function(){m.body.innerHTML+=""},0)}}},n="preview";f.add(n,{init:function(t){t.addCommand(n,e),t.ui.addButton("Preview",{label:t.lang.preview,command:n})}})}(),f.add("print",{init:function(e){var t="print",n=e.addCommand(t,f.print);e.ui.addButton("Print",{label:e.lang.print,command:t})}}),f.print={exec:function(e){if(t.opera)return;t.gecko?e.window.$.print():e.document.$.execCommand("Print")},canUndo:!1,readOnly:1,modes:{wysiwyg:!t.opera}},f.add("removeformat",{requires:["selection"],init:function(e){e.addCommand("removeFormat",f.removeformat.commands.removeformat),e.ui.addButton("RemoveFormat",{label:e.lang.removeFormat,command:"removeFormat"}),e._.removeFormat={filters:[]}}}),f.removeformat={commands:{removeformat:{exec:function(e){var t=e._.removeFormatRegex||(e._.removeFormatRegex=new RegExp("^(?:"+e.config.removeFormatTags.replace(/,/g,"|")+")$","i")),n=e._.removeAttributes||(e._.removeAttributes=e.config.removeFormatAttributes.split(",")),i=f.removeformat.filter,s=e.getSelection().getRanges(1),o=s.createIterator(),u;while(u=o.getNextRange()){u.collapsed||u.enlarge(1);var a=u.createBookmark(),l=a.startNode,c=a.endNode,h,p=function(n){var s=new r.elementPath(n),o=s.elements;for(var u=1,a;a=o[u];u++){if(a.equals(s.block)||a.equals(s.blockLimit))break;t.test(a.getName())&&i(e,a)&&n.breakParent(a)}};p(l);if(c){p(c),h=l.getNextSourceNode(!0,1);while(h){if(h.equals(c))break;var v=h.getNextSourceNode(!1,1);(h.getName()!="img"||!h.data("cke-realelement"))&&i(e,h)&&(t.test(h.getName())?h.remove(1):(h.removeAttributes(n),e.fire("removeFormatCleanup",h))),h=v}}u.moveToBookmark(a)}e.getSelection().selectRanges(s)}}},filter:function(e,t){var n=e._.removeFormat.filters;for(var r=0;ru.width&&(n.resize_minWidth=u.width),n.resize_minHeight>u.height&&(n.resize_minHeight=u.height),e.document.on("mousemove",l),e.document.on("mouseup",c),t.document&&(t.document.on("mousemove",l),t.document.on("mouseup",c))});t.on("destroy",function(){i.removeFunction(h)}),t.on("themeSpace",function(e){if(e.data.space=="bottom"){var n="";a&&!f&&(n=" cke_resizer_horizontal"),!a&&f&&(n=" cke_resizer_vertical");var s='
";r=="ltr"&&n=="ltr"?e.data.html+=s:e.data.html=s+e.data.html}},t,null,100)}}}),function(){var e={modes:{wysiwyg:1,source:1},readOnly:1,exec:function(e){var t=e.element.$.form;if(t)try{t.submit()}catch(n){t.submit.click&&t.submit.click()}}},t="save";f.add(t,{init:function(n){var r=n.addCommand(t,e);r.modes={wysiwyg:!!n.element.$.form},n.ui.addButton("Save",{label:n.lang.save,command:t})}})}(),function(){function o(e,t){var n=0,r;for(r in t)if(t[r]==e){n=1;break}return n}var r="scaytcheck",s="",a=function(){var r=this,o=function(){var i=r.config,s={};s.srcNodeRef=r.document.getWindow().$.frameElement,s.assocApp="CKEDITOR."+e.version+"@"+e.revision,s.customerid=i.scayt_customerid||"1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2",s.customDictionaryIds=i.scayt_customDictionaryIds||"",s.userDictionaryName=i.scayt_userDictionaryName||"",s.sLang=i.scayt_sLang||"en_US",s.onLoad=function(){n&&t.version<8||this.addStyle(this.selectorCss(),"padding-bottom: 2px !important;"),r.focusManager.hasFocus&&!l.isControlRestored(r)&&this.focus()},s.onBeforeChange=function(){l.getScayt(r)&&!r.checkDirty()&&setTimeout(function(){r.resetDirty()},0)};var o=window.scayt_custom_params;if(typeof o=="object")for(var a in o)s[a]=o[a];l.getControlId(r)&&(s.id=l.getControlId(r));var f=new window.scayt(s);f.afterMarkupRemove.push(function(e){(new u(e,f.document)).mergeSiblings()});var c=l.instances[r.name];c&&(f.sLang=c.sLang,f.option(c.option()),f.paused=c.paused),l.instances[r.name]=f;try{f.setDisabled(l.isPaused(r)===!1)}catch(p){}r.fire("showScaytState")};r.on("contentDom",o),r.on("contentDomUnload",function(){var t=e.document.getElementsByTag("script"),n=/^dojoIoScript(\d+)$/i,r=/^https?:\/\/svc\.webspellchecker\.net\/spellcheck\/script\/ssrv\.cgi/i;for(var i=0;i=0&&(this.setState(0),l.loadEngine(e))}};f.add("scayt",{requires:["menubutton"],beforeInit:function(e){var t=e.config.scayt_contextMenuItemsOrder||"suggest|moresuggest|control",n="";t=t.split("|");if(t&&t.length)for(var r=0;r 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("");r=s.replace(/%2/g,n).replace(/%1/g,"cke_show_borders ");var o={preserveState:!0,editorFocus:!1,readOnly:1,exec:function(e){this.toggleState(),this.refresh(e)},refresh:function(e){if(e.document){var t=this.state==1?"addClass":"removeClass";e.document.getBody()[t]("cke_show_borders")}}};f.add("showborders",{requires:["wysiwygarea"],modes:{wysiwyg:1},init:function(e){var t=e.addCommand("showborders",o);t.canUndo=!1,e.config.startupShowBorders!==!1&&t.setState(1),e.addCss(r),e.on("mode",function(){t.state!=0&&t.refresh(e)},null,null,100),e.on("contentDom",function(){t.state!=0&&t.refresh(e)}),e.on("removeFormatCleanup",function(t){var r=t.data;e.getCommand("showborders").state==1&&r.is("table")&&(!r.hasAttribute("border")||parseInt(r.getAttribute("border"),10)<=0)&&r.addClass(n)})},afterInit:function(e){var t=e.dataProcessor,r=t&&t.dataFilter,i=t&&t.htmlFilter;r&&r.addRules({elements:{table:function(e){var t=e.attributes,r=t["class"],i=parseInt(t.border,10);(!i||i<=0)&&(!r||r.indexOf(n)==-1)&&(t["class"]=(r||"")+" "+n)}}}),i&&i.addRules({elements:{table:function(e){var t=e.attributes,r=t["class"];r&&(t["class"]=r.replace(n,"").replace(/\s{2}/," ").replace(/^\s+|\s+$/,""))}}})}}),e.on("dialogDefinition",function(e){var t=e.data.name;if(t=="table"||t=="tableProperties"){var r=e.data.definition,s=r.getContents("info"),o=s.get("txtBorder"),u=o.commit;o.commit=i.override(u,function(e){return function(t,r){e.apply(this,arguments);var i=parseInt(this.getValue(),10);r[!i||i<=0?"addClass":"removeClass"](n)}});var a=r.getContents("advanced"),f=a&&a.get("advCSSClasses");f&&(f.setup=i.override(f.setup,function(e){return function(){e.apply(this,arguments),this.setValue(this.getValue().replace(/cke_show_border/,""))}}),f.commit=i.override(f.commit,function(e){return function(t,n){e.apply(this,arguments),parseInt(n.getAttribute("border"),10)||n.addClass("cke_show_border")}}))}})}(),f.add("sourcearea",{requires:["editingblock"],init:function(r){var i=f.sourcearea,s=e.document.getWindow();r.on("editingBlockReady",function(){var e,i;r.addMode("source",{load:function(o,a){n&&t.version<8&&o.setStyle("position","relative"),r.textarea=e=new u("textarea"),e.setAttributes({dir:"ltr",tabIndex:t.webkit?-1:r.tabIndex,role:"textbox","aria-label":r.lang.editorTitle.replace("%1",r.name)}),e.addClass("cke_source"),e.addClass("cke_enable_context_menu"),r.readOnly&&e.setAttribute("readOnly","readonly");var f={width:t.ie7Compat?"99%":"100%",height:"100%",resize:"none",outline:"none","text-align":"left"};n&&(i=function(){e.hide(),e.setStyle("height",o.$.clientHeight+"px"),e.setStyle("width",o.$.clientWidth+"px"),e.show()},r.on("resize",i),s.on("resize",i),setTimeout(i,0)),o.setHtml(""),o.append(e),e.setStyles(f),r.fire("ariaWidget",e),e.on("blur",function(){r.focusManager.blur()}),e.on("focus",function(){r.focusManager.focus()}),r.mayBeDirty=!0,this.loadData(a);var l=r.keystrokeHandler;l&&l.attach(e),setTimeout(function(){r.mode="source",r.fire("mode",{previousMode:r._.previousMode})},t.gecko||t.webkit?100:0)},loadData:function(t){e.setValue(t),r.fire("dataReady")},getData:function(){return e.getValue()},getSnapshotData:function(){return e.getValue()},unload:function(o){e.clearCustomData(),r.textarea=e=null,i&&(r.removeListener("resize",i),s.removeListener("resize",i)),n&&t.version<8&&o.removeStyle("position")},focus:function(){e.focus()}})}),r.on("readOnly",function(){r.mode=="source"&&(r.readOnly?r.textarea.setAttribute("readOnly","readonly"):r.textarea.removeAttribute("readOnly"))}),r.addCommand("source",i.commands.source),r.ui.addButton&&r.ui.addButton("Source",{label:r.lang.source,command:"source"}),r.on("mode",function(){r.getCommand("source").setState(r.mode=="source"?1:2)})}}),f.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},editorFocus:!1,readOnly:1,exec:function(e){e.mode=="wysiwyg"&&e.fire("saveSnapshot"),e.getCommand("source").setState(0),e.setMode(e.mode=="source"?"wysiwyg":"source")},canUndo:!1}}},function(){function i(e,t){var n=e.type,r=t.type;return n==r?0:n==3?-1:r==3?1:r==1?1:-1}f.add("stylescombo",{requires:["richcombo","styles"],init:function(s){function c(t){s.getStylesSet(function(n){if(!f.length){var r,s;for(var u=0,l=n.length;u0)return;e.type==1&&t.test(e.getName())&&!e.getCustomData("selected_cell")&&(u.setMarker(s,e,"selected_cell",!0),i.push(e))}var n=e.getRanges(),i=[],s={};for(var a=0;a1&&w&&b[x]==w[x]?(T=b[x],T.rowSpan+=1):(T=(new u(b[x])).clone(),T.removeAttribute("rowSpan"),!n&&T.appendBogus(),S.append(T),T=T.$),x+=T.colSpan-1}t?S.insertBefore(g):S.insertAfter(g)}function l(e){if(e instanceof r.selection){var t=s(e),n=t[0],o=n.getAscendant("table"),a=i.buildTableMap(o),f=t[0].getParent(),c=f.$.rowIndex,p=t[t.length-1],v=p.getParent().$.rowIndex+p.$.rowSpan-1,m=[];for(var g=c;g<=v;g++){var y=a[g],b=new u(o.$.rows[g]);for(var w=0;w0?T[c-1]:null)||o.$.parentNode);for(g=m.length;g>=0;g--)l(m[g]);return N}return e instanceof u&&(o=e.getAscendant("table"),o.$.rows.length==1?o.remove():e.remove()),null}function c(e,t){var n=e.getParent(),r=n.$.cells,i=0;for(var s=0;sn)n=i}return n}function v(e,t){var r=s(e),o=r[0],a=o.getAscendant("table"),f=p(r,1),l=p(r),c=t?f:l,d=i.buildTableMap(a),v=[],m=[],g=d.length;for(var y=0;y1&&m.length&&m[y]==v[y]?(w=v[y],w.colSpan+=1):(w=(new u(v[y])).clone(),w.removeAttribute("colSpan"),!n&&w.appendBogus(),w[t?"insertBefore":"insertAfter"].call(w,new u(v[y])),w=w.$),y+=w.rowSpan-1}}function m(e){var t=s(e),n=t[0],r=t[t.length-1],o=n.getAscendant("table"),a=i.buildTableMap(o),f,l,c=[];for(var p=0,d=a.length;p1){s=t[r-1]+1;break}s||(s=t[0]>0?t[0]-1:t[t.length-1]+1);var a=n.$.rows;for(r=0,i=a.length;r=0;a--)b(t[a]);i?E(i,!0):n&&n.remove()}else if(e instanceof u){var f=e.getParent();f.getChildCount()==1?f.remove():e.remove()}}function w(e){var t=e.getBogus();t&&t.remove(),e.trim()}function E(e,t){var n=new r.range(e.getDocument());n["moveToElementEdit"+(t?"End":"Start")](e)||(n.selectNodeContents(e),n.collapse(t?!1:!0)),n.select(!0)}function S(e,t,n){var r=e[t];if(typeof n=="undefined")return r;for(var i=0;r&&i1&&(r+=i[t].rowSpan-1)}return n}function T(e,t,o){var a=s(e),f;if((t?a.length!=1:a.length<2)||(f=e.getCommonAncestor())&&f.type==1&&f.is("table"))return!1;var l,c=a[0],p=c.getAscendant("table"),v=i.buildTableMap(p),m=v.length,g=v[0].length,y=c.getParent().$.rowIndex,b=S(v,y,c);if(t){var E;try{var x=parseInt(c.getAttribute("rowspan"),10)||1,T=parseInt(c.getAttribute("colspan"),10)||1;E=v[t=="up"?y-x:t=="down"?y+x:y][t=="left"?b-T:t=="right"?b+T:b]}catch(N){return!1}if(!E||c.$==E)return!1;a[t=="up"||t=="left"?"unshift":"push"](new u(E))}var C=c.getDocument(),k=y,L=0,O=0,M=!o&&new r.documentFragment(C),_=0;for(var D=0;D=g?c.removeAttribute("rowSpan"):c.$.rowSpan=L,L>=m?c.removeAttribute("colSpan"):c.$.colSpan=O;var R=new r.nodeList(p.$.rows),U=R.count();for(D=U-1;D>=0;D--){var z=R.getItem(D);if(!z.$.cells.length){z.remove(),U++;continue}}return c}return L*O==_}function N(e,t){var r=s(e);if(r.length>1)return!1;if(t)return!0;var o=r[0],a=o.getParent(),f=a.getAscendant("table"),l=i.buildTableMap(f),c=a.$.rowIndex,p=S(l,c,o),d=o.$.rowSpan,v,m,g,y;if(d>1){m=Math.ceil(d/2),g=Math.floor(d/2),y=c+m;var b=new u(f.$.rows[y]),w=S(l,y),E;v=o.clone();for(var x=0;xp){v.insertBefore(new u(E));break}E=null}E||b.append(v,!0)}else{g=m=1,b=a.clone(),b.insertAfter(a),b.append(v=o.clone());var T=S(l,c);for(var N=0;N1)return!1;if(t)return!0;var o=r[0],u=o.getParent(),a=u.getAscendant("table"),f=i.buildTableMap(a),l=u.$.rowIndex,c=S(f,l,o),h=o.$.colSpan,p,d,v;if(h>1)d=Math.ceil(h/2),v=Math.floor(h/2);else{v=d=1;var m=x(f,c);for(var g=0;g0?2:0}}},tablecell_insertBefore:{label:n.cell.insertBefore,group:"tablecell",command:"cellInsertBefore",order:5},tablecell_insertAfter:{label:n.cell.insertAfter,group:"tablecell",command:"cellInsertAfter",order:10},tablecell_delete:{label:n.cell.deleteCell,group:"tablecell",command:"cellDelete",order:15},tablecell_merge:{label:n.cell.merge,group:"tablecell",command:"cellMerge",order:16},tablecell_merge_right:{label:n.cell.mergeRight,group:"tablecell",command:"cellMergeRight",order:17},tablecell_merge_down:{label:n.cell.mergeDown,group:"tablecell",command:"cellMergeDown",order:18},tablecell_split_horizontal:{label:n.cell.splitHorizontal,group:"tablecell",command:"cellHorizontalSplit",order:19},tablecell_split_vertical:{label:n.cell.splitVertical,group:"tablecell",command:"cellVerticalSplit",order:20},tablecell_properties:{label:n.cell.title,group:"tablecellproperties",command:"cellProperties",order:21},tablerow:{label:n.row.menu,group:"tablerow",order:1,getItems:function(){return{tablerow_insertBefore:2,tablerow_insertAfter:2,tablerow_delete:2}}},tablerow_insertBefore:{label:n.row.insertBefore,group:"tablerow",command:"rowInsertBefore",order:5},tablerow_insertAfter:{label:n.row.insertAfter,group:"tablerow",command:"rowInsertAfter",order:10},tablerow_delete:{label:n.row.deleteRow,group:"tablerow",command:"rowDelete",order:15},tablecolumn:{label:n.column.menu,group:"tablecolumn",order:1,getItems:function(){return{tablecolumn_insertBefore:2,tablecolumn_insertAfter:2,tablecolumn_delete:2}}},tablecolumn_insertBefore:{label:n.column.insertBefore,group:"tablecolumn",command:"columnInsertBefore",order:5},tablecolumn_insertAfter:{label:n.column.insertAfter,group:"tablecolumn",command:"columnInsertAfter",order:10},tablecolumn_delete:{label:n.column.deleteColumn,group:"tablecolumn",command:"columnDelete",order:15}}),t.contextMenu&&t.contextMenu.addListener(function(e,t){if(!e||e.isReadOnly())return null;while(e){if(e.getName()in k)return{tablecell:2,tablerow:2,tablecolumn:2};e=e.getParent()}return null})},getSelectedCells:s},f.add("tabletools",f.tabletools)}(),i.buildTableMap=function(e){var t=e.$.rows,n=-1,r=[];for(var i=0;ii&&(!u||!a||la&&(u=l,a=f)}else{if(s&&f==i){u=l;break}fa)&&(u=l,a=f)}}u&&u.focus()},function(){f.add("templates",{requires:["dialog"],init:function(t){e.dialog.add("templates",e.getUrl(this.path+"dialogs/templates.js")),t.addCommand("templates",new e.dialogCommand("templates")),t.ui.addButton("Templates",{label:t.lang.templates.button,command:"templates"})}});var t={},n={};e.addTemplates=function(e,n){t[e]=n},e.getTemplates=function(e){return t[e]},e.loadTemplates=function(t,r){var i=[];for(var s=0,o=t.length;s":' style="display:none">'),u.push('',t.lang.toolbars," ");var l=t.toolbox.toolbars,c=t.config.toolbar instanceof Array?t.config.toolbar:t.config["toolbar_"+t.config.toolbar];for(var h=0;h"),f=0);if(g==="/"){u.push('
');continue}y=g.items||g;for(var b=0;b'),v&&u.push('',v," "),u.push(' ');var x=l.push(d)-1;x>0&&(d.previous=l[x-1],d.previous.next=d)}S?f||(u.push(''),f=1):f&&(u.push(" "),f=0);var T=w.render(t,u);x=d.items.push(T)-1,x>0&&(T.previous=d.items[x-1],T.previous.next=T),T.toolbar=d,T.onkey=o,T.onfocus=function(){t.toolbox.focusCommandExecuted||t.focus()}}}f&&(u.push(""),f=0),d&&u.push(' ')}u.push("");if(t.config.toolbarCanCollapse){var N=i.addFunction(function(){t.execCommand("toolbarCollapse")});t.on("destroy",function(){i.removeFunction(N)});var C=i.getNextId();t.addCommand("toolbarCollapse",{readOnly:1,exec:function(t){var n=e.document.getById(C),r=n.getPrevious(),i=t.getThemeSpace("contents"),s=r.getParent(),o=parseInt(i.$.style.height,10),u=s.$.offsetHeight,a=!r.isVisible();a?(r.show(),n.removeClass("cke_toolbox_collapser_min"),n.setAttribute("title",t.lang.toolbarCollapse)):(r.hide(),n.addClass("cke_toolbox_collapser_min"),n.setAttribute("title",t.lang.toolbarExpand)),n.getFirst().setText(a?"▲":"◀");var f=s.$.offsetHeight-u;i.setStyle("height",o-f+"px"),t.fire("resize")},modes:{wysiwyg:1,source:1}}),u.push('',"▲ "," ")}n.data.html+=u.join("")}}),t.on("destroy",function(){var e,t=0,n,r,s;e=this.toolbox.toolbars;for(;t'),{}}}}})}})}(),e.UI_SEPARATOR="separator",a.toolbarLocation="top",a.toolbar_Basic=[["Bold","Italic","-","NumberedList","BulletedList","-","Link","Unlink","-","About"]],a.toolbar_Full=[{name:"document",items:["Source","-","Save","NewPage","DocProps","Preview","Print","-","Templates"]},{name:"clipboard",items:["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{name:"editing",items:["Find","Replace","-","SelectAll","-","SpellChecker","Scayt"]},{name:"forms",items:["Form","Checkbox","Radio","TextField","Textarea","Select","Button","ImageButton","HiddenField"]},"/",{name:"basicstyles",items:["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{name:"paragraph",items:["NumberedList","BulletedList","-","Outdent","Indent","-","Blockquote","CreateDiv","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","-","BidiLtr","BidiRtl"]},{name:"links",items:["Link","Unlink","Anchor"]},{name:"insert",items:["Image","Flash","Table","HorizontalRule","Smiley","SpecialChar","PageBreak","Iframe"]},"/",{name:"styles",items:["Styles","Format","Font","FontSize"]},{name:"colors",items:["TextColor","BGColor"]},{name:"tools",items:["Maximize","ShowBlocks","-","About"]}],a.toolbar="Full",a.toolbarCanCollapse=!0,function(){function s(e){this.editor=e,this.reset()}f.add("undo",{requires:["selection","wysiwygarea"],init:function(e){function i(e){t.enabled&&e.data.command.canUndo!==!1&&t.save()}var t=new s(e),n=e.addCommand("undo",{exec:function(){t.undo()&&(e.selectionChange(),this.fire("afterUndo"))},state:0,canUndo:!1}),r=e.addCommand("redo",{exec:function(){t.redo()&&(e.selectionChange(),this.fire("afterRedo"))},state:0,canUndo:!1});t.onChange=function(){n.setState(t.undoable()?2:0),r.setState(t.redoable()?2:0)},e.on("beforeCommandExec",i),e.on("afterCommandExec",i),e.on("saveSnapshot",function(e){t.save(e.data&&e.data.contentOnly)}),e.on("contentDom",function(){e.document.on("keydown",function(e){!e.data.$.ctrlKey&&!e.data.$.metaKey&&t.type(e)})}),e.on("beforeModeUnload",function(){e.mode=="wysiwyg"&&t.save(!0)}),e.on("mode",function(){t.enabled=e.readOnly?!1:e.mode=="wysiwyg",t.onChange()}),e.ui.addButton("Undo",{label:e.lang.undo,command:"undo"}),e.ui.addButton("Redo",{label:e.lang.redo,command:"redo"}),e.resetUndo=function(){t.reset(),e.fire
("saveSnapshot")},e.on("updateSnapshot",function(){t.currentImage&&t.update()})}}),f.undo={};var e=f.undo.Image=function(e){this.editor=e,e.fire("beforeUndoImage");var t=e.getSnapshot(),r=t&&e.getSelection();n&&t&&(t=t.replace(/\s+data-cke-expando=".*?"/g,"")),this.contents=t,this.bookmarks=r&&r.createBookmarks2(!0),e.fire("afterUndoImage")},r=/\b(?:href|src|name)="[^"]*?"/gi;e.prototype={equals:function(e,s){var o=this.contents,u=e.contents;n&&(t.ie7Compat||t.ie6Compat)&&(o=o.replace(r,""),u=u.replace(r,""));if(o!=u)return!1;if(s)return!0;var a=this.bookmarks,f=e.bookmarks;if(a||f){if(!a||!f||a.length!=f.length)return!1;for(var l=0;l25&&(this.save(!1,null,!1),this.modifiersCount=1)):h||(this.modifiersCount=0,this.typesCount++,this.typesCount>25&&(this.save(!1,null,!1),this.typesCount=1))},reset:function(){var e=this;e.lastKeystroke=0,e.snapshots=[],e.index=-1,e.limit=e.editor.config.undoStackSize||20,e.currentImage=null,e.hasUndo=!1,e.hasRedo=!1,e.resetType()},resetType:function(){var e=this;e.typing=!1,delete e.lastKeystroke,e.typesCount=0,e.modifiersCount=0},fireChange:function(){var e=this;e.hasUndo=!!e.getNextImage(!0),e.hasRedo=!!e.getNextImage(!1),e.resetType(),e.onChange()},save:function(t,n,r){var i=this,s=i.snapshots;return n||(n=new e(i.editor)),n.contents===!1?!1:i.currentImage&&n.equals(i.currentImage,t)?!1:(s.splice(i.index+1,s.length-i.index-1),s.length==i.limit&&s.shift(),i.index=s.push(n)-1,i.currentImage=n,r!==!1&&i.fireChange(),!0)},restoreImage:function(e){var t=this,r=t.editor,i;e.bookmarks&&(r.focus(),i=r.getSelection()),t.editor.loadSnapshot(e.contents);if(e.bookmarks)i.selectBookmarks(e.bookmarks);else if(n){var s=t.editor.document.getBody().$.createTextRange();s.collapse(!0),s.select()}t.index=e.index,t.update(),t.fireChange()},getNextImage:function(e){var t=this,n=t.snapshots,r=t.currentImage,i,s;if(r)if(e)for(s=t.index-1;s>=0;s--){i=n[s];if(!r.equals(i,!0))return i.index=s,i}else for(s=t.index+1;s"+n+""+l+">"})),f=f.replace(/\n/g," "),!a&&!n&&(f=f.replace(new RegExp(" (?="+l+">)"),function(e){return i.repeat(e,2)}));if(t.gecko||t.webkit){var c=new r.elementPath(o.getStartElement()),h=[];for(var p=0;p/));else if(m in s.$block)break}f=h.join("")+f}v.call(this,f)}function y(e){var t=this.getSelection(),n=t.getRanges(),r=e.getName(),i=s.$block[r],o=t.isLocked;o&&t.unlock();var u,a,f,c;for(var h=n.length-1;h>=0;h--){u=n[h];if(!u.checkReadOnly()){u.deleteContents(1),a=!h&&e||e.clone(1);var p,d;if(i)while((p=u.getCommonAncestor(0,1))&&(d=s[p.getName()])&&(!d||!d[r]))p.getName()in s.span?u.splitElement(p):u.checkStartOfBlock()&&u.checkEndOfBlock()?(u.setStartBefore(p),u.collapse(!0),p.remove()):u.splitBlock();u.insertNode(a),f||(f=a)}}if(f){u.moveToPosition(f,4);if(i){var v=f.getNext(l),m=v&&v.type==1&&v.getName();m&&s.$block[m]&&s[m]["#"]&&u.moveToElementEditStart(v)}}t.selectRanges([u]),o&&this.getSelection().lock()}function w(e){e.checkDirty()||setTimeout(function(){e.resetDirty()},0)}function x(e){return E(e)&&S(e)}function T(e){return e.type==3&&i.trim(e.getText()).match(/^(?: |\xa0)$/)}function N(e){e.isLocked&&(e.unlock(),setTimeout(function(){e.lock()},0))}function C(e){return e.getOuterHtml().match(a)}function k(e){var t=e.window,n=e.document,i=e.document.getBody(),s=i.getFirst(),o=i.getChildren().count();if(!o||o==1&&s.type==1&&s.hasAttribute("_moz_editor_bogus_node")){w(e);var u=e.element.getDocument(),a=u.getDocumentElement(),f=a.$.scrollTop,l=a.$.scrollLeft,c=n.$.createEvent("KeyEvents");c.initKeyEvent("keypress",!0,!0,t.$,!1,!1,!1,!1,0,32),n.$.dispatchEvent(c),(f!=a.$.scrollTop||l!=a.$.scrollLeft)&&u.getWindow().$.scrollTo(l,f),o&&i.getFirst().remove(),n.getBody().appendBogus();var h=new r.range(n);h.setStartAt(i,1),h.select()}}function L(e){var i=e.editor,s=e.data.path,o=s.blockLimit,u=e.data.selection,a=u.getRanges()[0],f=i.document.getBody(),l=i.config.enterMode;if(t.gecko){k(i);var h=s.block||s.blockLimit,p=h&&h.getLast(x);h&&h.isBlockBoundary()&&(!p||p.type!=1||!p.isBlockBoundary())&&!h.is("pre")&&!h.getBogus()&&h.appendBogus()}if(i.config.autoParagraph!==!1&&l!=2&&a.collapsed&&o.getName()=="body"&&!s.block){var v=a.fixBlock(!0,i.config.enterMode==3?"div":"p");if(n){var m=v.getFirst(x);m&&T(m)&&m.remove()}if(C(v)){var g=v.getNext(E);g&&g.type==1&&!c(g)?(a.moveToElementEditStart(g),v.remove()):(g=v.getPrevious(E),g&&g.type==1&&!c(g)&&(a.moveToElementEditEnd(g),v.remove()))}a.select(),e.cancel()}var y=new r.range(i.document);y.moveToElementEditEnd(i.document.getBody());var w=new r.elementPath(y.startContainer);if(!w.blockLimit.is("body")){var S;l!=2?S=f.append(i.document.createElement(l==1?"p":"div")):S=f,n||S.appendBogus()}}var a=/(^|
]*>)\s*<(p|div|address|h\d|center|pre)[^>]*>\s*(?: ]*>| |\u00A0| )?\s*(:?<\/\2>)?\s*(?=$|<\/body>)/gi,l=r.walker.whitespaces(!0),E=r.walker.whitespaces(!0),S=r.walker.bookmark(!1,!0);E=r.walker.whitespaces(!0),f.add("wysiwygarea",{requires:["editingblock"],init:function(f){function N(t){if(f.readOnly)return;i.tryThese(function(){f.document.$.designMode="on",setTimeout(function(){f.document.$.designMode="off",e.currentInstance==f&&f.document.getBody().focus()},50)},function(){f.document.$.designMode="off";var e=f.document.getBody();e.setAttribute("contentEditable",!1),e.setAttribute("contentEditable",!0),!t&&N(1)})}var l=f.config.enterMode!=2&&f.config.autoParagraph!==!1?f.config.enterMode==3?"div":"p":!1,c=f.lang.editorTitle.replace("%1",f.name),w=e.document.getWindow(),E;f.on("editingBlockReady",function(){function j(e){if(!C)return;C=0,f.fire("ariaWidget",S);var s=e.document,u=s.body,l=s.getElementById("cke_actscrpt");l&&l.parentNode.removeChild(l),u.spellcheck=!f.config.disableNativeSpellChecker;var c=!f.readOnly;n?(u.hideFocus=!0,u.disabled=!0,u.contentEditable=c,u.removeAttribute("disabled")):setTimeout(function(){t.gecko&&t.version>=10900||t.opera?s.$.body.contentEditable=c:t.webkit?s.$.body.parentNode.contentEditable=c:s.$.designMode=c?"off":"on"},0),c&&t.gecko&&i.setTimeout(k,0,null,f),e=f.window=new r.window(e),s=f.document=new o(s),c&&s.on("dblclick",function(e){var t=e.data.getTarget(),n={element:t,dialog:""};f.fire("doubleclick",n),n.dialog&&f.openDialog(n.dialog)}),n&&s.on("click",function(e){var t=e.data.getTarget();if(t.is("input")){var n=t.getAttribute("type");(n=="submit"||n=="reset")&&e.data.preventDefault()}}),!n&&!t.opera&&s.on("mousedown",function(e){var t=e.data.getTarget();t.is("img","hr","input","textarea","select")&&f.getSelection().selectElement(t)}),t.gecko&&s.on("mouseup",function(e){if(e.data.$.button==2){var t=e.data.getTarget();if(!t.getOuterHtml().replace(a,"")){var n=new r.range(s);n.moveToElementEditStart(t),n.select(!0)}}}),s.on("click",function(e){e=e.data,e.getTarget().is("a")&&e.$.button!=2&&e.preventDefault()}),t.webkit&&(s.on("mousedown",function(){p=1}),s.on("click",function(e){e.data.getTarget().is("input","select")&&e.data.preventDefault()}),s.on("mouseup",function(e){e.data.getTarget().is("input","textarea")&&e.data.preventDefault()}));var h=n?S:e;h.on("blur",function(){f.focusManager.blur()});var p;h.on("focus",function(){var e=f.document;c&&t.gecko&&t.version>=10900?N():t.opera?e.getBody().focus():t.webkit&&(p||(f.document.getDocumentElement().focus(),p=1)),f.focusManager.focus()});var v=f.keystrokeHandler;v.blockedKeystrokes[8]=!c,v.attach(s),s.getDocumentElement().addClass(s.$.compatMode),c&&s.on("keydown",function(n){var i=n.data.getKeystroke();if(i in{8:1,46:1}){var o=f.getSelection(),u=o.getSelectedElement(),a=o.getRanges()[0];if(u){f.fire("saveSnapshot"),a.moveToPosition(u,3),u.remove(),a.select(),f.fire("saveSnapshot"),n.data.preventDefault();return}}if(i==33||i==34)if(t.gecko){var l=s.getBody();e.$.innerHeight>l.$.offsetHeight&&(a=new r.range(s),a[i==33?"moveToElementEditStart":"moveToElementEditEnd"](l),a.select(),n.data.preventDefault())}});if(n&&s.$.compatMode=="CSS1Compat"){var m={33:1,34:1};s.on("keydown",function(e){e.data.getKeystroke()in m&&setTimeout(function(){f.getSelection().scrollIntoView()},0)})}n&&f.config.enterMode!=1&&s.on("selectionchange",function(){var e=s.getBody(),t=f.getSelection(),n=t&&t.getRanges()[0];n&&e.getHtml().match(/^ <\/p>$/i)&&n.startContainer.equals(e)&&setTimeout(function(){n=f.getSelection().getRanges()[0],n.startContainer.equals("body")||(e.getFirst().remove(1),n.moveToElementEditEnd(e),n.select(1))},0)}),f.contextMenu&&f.contextMenu.addTarget(s,f.config.browserContextMenuOnCtrl!==!1),setTimeout(function(){f.fire("contentDom"),O&&(f.mode="wysiwyg",f.fire("mode",{previousMode:f._.previousMode}),O=!1),x=!1,T&&(f.focus(),T=!1),setTimeout(function(){f.fire("dataReady")},0);try{f.document.$.execCommand("enableInlineTableEditing",!1,!f.config.disableNativeTableHandles)}catch(e){}if(f.config.disableObjectResizing)try{f.document.$.execCommand("enableObjectResizing",!1,!1)}catch(t){f.document.getBody().on(n?"resizestart":"resize",function(e){e.data.preventDefault()})}n&&setTimeout(function(){if(f.document){var e=f.document.$.body;e.runtimeStyle.marginBottom="0px",e.runtimeStyle.marginBottom=""}},1e3)},0)}var s,S,x,T,C,O,M,_=t.isCustomDomain(),P=function(r){S&&S.remove();var i="document.open();"+(_?'document.domain="'+document.domain+'";':"")+"document.close();";i=t.air?"javascript:void(0)":n?"javascript:void(function(){"+encodeURIComponent(i)+"}())":"",S=u.createFromHtml('"),document.location.protocol=="chrome:"&&(e.event.useCapture=!0),S.on("load",function(e){C=1,e.removeListener();var n=S.getFrameDocument();n.write(r),t.air&&j(n.getWindow().$)}),document.location.protocol=="chrome:"&&(e.event.useCapture=!1),s.append(S),t.webkit&&(M=function(){S.hide(),S.setSize("width",s.getSize("width")),S.show()},w.on("resize",M))};E=i.addFunction(j);var H='";f.addMode("wysiwyg",{load:function(e,r,i){s=e,n&&t.quirks&&e.setStyle("position","relative"),f.mayBeDirty=!0,O=!0,i?this.loadSnapshotData(r):this.loadData(r)},loadData:function(e){x=!0,f._.dataStore={id:1};var n=f.config,r=n.fullPage,s=n.docType,o='";!r&&(o=i.buildStyleHtml(f.config.contentsCss)+o);var u=n.baseHref?' ':"";r&&(e=e.replace(/]*>/i,function(e){return f.docType=s=e,""}).replace(/<\?xml\s[^\?]*\?>/i,function(e){return f.xmlDeclaration=e,""})),f.dataProcessor&&(e=f.dataProcessor.toHtml(e,l)),r?(/
]/.test(e)||(e="
"+e),/]/.test(e)||(e=""+e+""),/]/.test(e)?/]/.test(e)||(e=e.replace(/]*>/,"$& ")):e=e.replace(/]*>/,"$& "),u&&(e=e.replace(//,"$&"+u)),e=e.replace(/<\/head\s*>/,o+"$&"),e=s+e):e=n.docType+''+""+""+c+" "+u+o+""+"
"+e+"",t.gecko&&(e=e.replace(/ (?=\s*<\/(:?html|body)>)/,'$& ')),e+=H,this.onDispose(),P(e)},getData:function(){var e=f.config,n=e.fullPage,r=n&&f.docType,i=n&&f.xmlDeclaration,s=S.getFrameDocument(),o=n?s.getDocumentElement().getOuterHtml():s.getBody().getHtml();return t.gecko&&(o=o.replace(/ (?=\s*(:?$|<\/body>))/,"")),f.dataProcessor&&(o=f.dataProcessor.toDataFormat(o,l)),e.ignoreEmptyParagraph&&(o=o.replace(a,function(e,t){return t})),i&&(o=i+"\n"+o),r&&(o=r+"\n"+o),o},getSnapshotData:function(){return S.getFrameDocument().getBody().getHtml()},loadSnapshotData:function(e){S.getFrameDocument().getBody().setHtml(e)},onDispose:function(){if(!f.document)return;f.document.getDocumentElement().clearCustomData(),f.document.getBody().clearCustomData(),f.window.clearCustomData(),f.document.clearCustomData(),S.clearCustomData(),S.remove()},unload:function(e){this.onDispose(),M&&w.removeListener("resize",M),f.window=f.document=S=s=T=null,f.fire("contentDomUnload")},focus:function(){var e=f.window;x?T=!0:e&&(t.air?setTimeout(function(){e.focus()},0):e.focus(),f.selectionChange())}}),f.on("insertHtml",p(v),null,null,20),f.on("insertElement",p(y),null,null,20),f.on("insertText",p(m),null,null,20),f.on("selectionChange",function(e){if(f.readOnly)return;var t=f.getSelection();if(t&&!t.isLocked){var n=f.checkDirty();f.fire("saveSnapshot",{contentOnly:1}),L.call(this,e),f.fire("updateSnapshot"),!n&&f.resetDirty()}},null,null,1)});var S;f.on("contentDom",function(){var e=f.document.getElementsByTag("title").getItem(0);e.data("cke-title",f.document.$.title),f.document.$.title=c}),f.on("readOnly",function(){if(f.mode=="wysiwyg"){var e=f.getMode();e.loadData(e.getData())}});if(e.document.$.documentMode>=8){f.addCss("html.CSS1Compat [contenteditable=false]{ min-height:0 !important;}");var x=[];for(var T in s.$removeEmpty)x.push("html.CSS1Compat "+T+"[contenteditable=false]");f.addCss(x.join(",")+"{ display:inline-block;}")}else t.gecko?(f.addCss("html { height: 100% !important; }"),f.addCss("img:-moz-broken { -moz-force-broken-image-icon : 1; width : 24px; height : 24px; }")):n&&t.version<8&&f.config.contentsLangDirection=="ltr"&&f.addCss("body{margin-right:0;}");f.addCss("html { _overflow-y: scroll; cursor: text; *cursor:auto;}"),f.addCss("img, input, textarea { cursor: default;}"),f.on("insertElement",function(e){var t=e.data;if(t.type==1&&(t.is("input")||t.is("textarea"))){var n=t.getAttribute("contenteditable")=="false";n||(t.data("cke-editable",t.hasAttribute("contenteditable")?"true":"1"),t.setAttribute("contenteditable",!1))}})}}),t.gecko&&function(){var e=document.body;if(!e)window.addEventListener("load",arguments.callee,!1);else{var t=e.getAttribute("onpageshow");e.setAttribute("onpageshow",(t?t+";":"")+"event.persisted && (function(){"+"var allInstances = CKEDITOR.instances, editor, doc;"+"for ( var i in allInstances )"+"{"+" editor = allInstances[ i ];"+" doc = editor.document;"+" if ( doc )"+" {"+' doc.$.designMode = "off";'+' doc.$.designMode = "on";'+" }"+"}"+"})();")}}()}(),a.disableObjectResizing=!1,a.disableNativeTableHandles=!0,a.disableNativeSpellChecker=!0,a.ignoreEmptyParagraph=!0,f.add("wsc",{requires:["dialog"],init:function(n){var r="checkspell",i=n.addCommand(r,new e.dialogCommand(r));i.modes={wysiwyg:!t.opera&&!t.air&&document.domain==window.location.hostname},n.ui.addButton("SpellChecker",{label:n.lang.spellCheck.toolbar,command:r}),e.dialog.add(r,this.path+"dialogs/wsc.js")}}),a.wsc_customerId=a.wsc_customerId||"1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk",a.wsc_customLoaderScript=a.wsc_customLoaderScript||null,e.DIALOG_RESIZE_NONE=0,e.DIALOG_RESIZE_WIDTH=1,e.DIALOG_RESIZE_HEIGHT=2,e.DIALOG_RESIZE_BOTH=3,function(){function a(e){return!!this._.tabs[e][0].$.offsetHeight}function f(){var e=this,t=e._.currentTabId,n=e._.tabIdList.length,r=i.indexOf(e._.tabIdList,t)+n;for(var s=r-1;s>r-n;s--)if(a.call(e,e._.tabIdList[s%n]))return e._.tabIdList[s%n];return null}function c(){var e=this,t=e._.currentTabId,n=e._.tabIdList.length,r=i.indexOf(e._.tabIdList,t);for(var s=r+1;sf.width-s.width-u?d=f.width-s.width+(o.lang.dir=="rtl"?0:a[1]):d=i.x,i.y+a[0]f.height-s.height-u?v=f.height-s.height+a[2]:v=i.y,n.move(d,v,1),t.data.preventDefault()}function l(n){e.document.removeListener("mousemove",f),e.document.removeListener("mouseup",l);if(t.ie6Compat){var r=M.getChild(0).getFrameDocument();r.removeListener("mousemove",f),r.removeListener("mouseup",l)}}var r=null,i=null,s=n.getElement().getFirst(),o=n.getParentEditor(),u=o.config.dialog_magnetDistance,a=o.skin.margins||[0,0,0,0];typeof u=="undefined"&&(u=20),n.parts.title.on("mousedown",function(s){r={x:s.data.$.screenX,y:s.data.$.screenY},e.document.on("mousemove",f),e.document.on("mouseup",l),i=n.getPosition();if(t.ie6Compat){var o=M.getChild(0).getFrameDocument();o.on("mousemove",f),o.on("mouseup",l)}s.data.preventDefault()},n)}function L(r){function g(e){var t=a.lang.dir=="rtl",n=(e.data.$.screenX-p.x)*(t?-1:1),i=e.data.$.screenY-p.y,u=d.width,h=d.height,v=u+n*(r._.moved?1:2),m=h+i*(r._.moved?1:2),g=r._.element.getFirst(),y=t&&g.getComputedStyle("right"),b=r.getPosition();b.y+m>c.height&&(m=c.height-b.y),(t?y:b.x)+v>c.width&&(v=c.width-(t?y:b.x));if(o==1||o==3)u=Math.max(s.minWidth||0,v-f);if(o==2||o==3)h=Math.max(s.minHeight||0,m-l);r.resize(u,h),r._.moved||r.layout(),e.data.preventDefault()}function y(){e.document.removeListener("mouseup",y),e.document.removeListener("mousemove",g),v&&(v.remove(),v=null);if(t.ie6Compat){var n=M.getChild(0).getFrameDocument();n.removeListener("mouseup",y),n.removeListener("mousemove",g)}}var s=r.definition,o=s.resizable;if(o==0)return;var a=r.getParentEditor(),f,l,c,p,d,v,m=i.addFunction(function(i){d=r.getSize();var s=r.parts.contents,o=s.$.getElementsByTagName("iframe").length;o&&(v=u.createFromHtml('
'),s.append(v)),l=d.height-r.parts.contents.getSize("height",!(t.gecko||t.opera||n&&t.quirks)),f=d.width-r.parts.contents.getSize("width",1),p={x:i.screenX,y:i.screenY},c=e.document.getWindow().getViewPaneSize(),e.document.on("mousemove",g),e.document.on("mouseup",y);if(t.ie6Compat){var a=M.getChild(0).getFrameDocument();a.on("mousemove",g),a.on("mouseup",y)}i.preventDefault&&i.preventDefault()});r.on("load",function(){var e="";o==1?e=" cke_resizer_horizontal":o==2&&(e=" cke_resizer_vertical");var t=u.createFromHtml('
');r.parts.footer.append(t,1)}),a.on("destroy",function(){i.removeFunction(m)})}function _(e){e.data.preventDefault(1)}function D(n){var r=e.document.getWindow(),s=n.config,o=s.dialog_backgroundCoverColor||"white",a=s.dialog_backgroundCoverOpacity,f=s.baseFloatZIndex,l=i.genKey(o,a,f),c=O[l];if(!c){var p=[''];if(t.ie6Compat){var d=t.isCustomDomain(),v="
";p.push('
')}p.push("
"),c=u.createFromHtml(p.join("")),c.setOpacity(a!=undefined?a:.5),c.on("keydown",_),c.on("keypress",_),c.on("keyup",_),c.appendTo(e.document.getBody()),O[l]=c}else c.show();M=c;var m=function(){var e=r.getViewPaneSize();c.setStyles({width:e.width+"px",height:e.height+"px"})},g=function(){var t=r.getScrollPosition(),n=e.dialog._.currentTop;c.setStyles({left:t.x+"px",top:t.y+"px"});if(n)do{var i=n.getPosition();n.move(i.x,i.y)}while(n=n._.parentDialog)};A=m,r.on("resize",m),m(),(!t.mac||!t.webkit)&&c.focus();if(t.ie6Compat){var y=function(){g(),arguments.callee.prevScrollHandler.apply(this,arguments)};r.$.setTimeout(function(){y.prevScrollHandler=window.onscroll||function(){},window.onscroll=y},0),g()}}function P(){if(!M)return;var n=e.document.getWindow();M.hide(),n.removeListener("resize",A),t.ie6Compat&&n.$.setTimeout(function(){var e=window.onscroll&&window.onscroll.prevScrollHandler;window.onscroll=e||null},0),A=null}function H(){for(var e in O)O[e].remove();O={}}var s=i.cssLength;e.dialog=function(s,u){function P(){var e=_._.focusList;e.sort(function(e,t){return e.tabIndex!=t.tabIndex?t.tabIndex-e.tabIndex:e.focusIndex-t.focusIndex});var t=e.length;for(var n=0;n1?(_._.tabBarMode=!0,_._.tabs[_._.currentTabId][0].focus(),S=1):r!=37&&r!=39||!_._.tabBarMode?(r==13||r==32)&&_._.tabBarMode&&(n.selectPage(n._.currentTabId),n._.tabBarMode=!1,n._.currentFocusIndex=-1,H(1),S=1):(u=r==(i?39:37)?f.call(_):c.call(_),_.selectPage(u),_._.tabs[u][0].focus(),S=1);S&&(t.stop(),t.data.preventDefault())}function j(e){S&&e.data.preventDefault()}var a=e.dialog._.dialogDefinitions[u],l=i.clone(w),h=s.config.dialog_buttonsOrder||"OS",p=s.lang.dir,y={},E,S;(h=="OS"&&t.mac||h=="rtl"&&p=="ltr"||h=="ltr"&&p=="rtl")&&l.buttons.reverse(),a=i.extend(a(s),l),a=i.clone(a),a=new T(this,a);var x=e.document,N=s.theme.buildDialog(s);this._={editor:s,element:N.element,name:u,contentSize:{width:0,height:0},size:{width:0,height:0},contents:{},buttons:{},accessKeyMap:{},tabs:{},tabIdList:[],currentTabId:null,currentTabIndex:null,pageCount:0,lastTab:null,tabBarMode:!1,focusList:[],currentFocusIndex:0,hasFocus:!1},this.parts=N.parts,i.setTimeout(function(){s.fire("ariaWidget",this.parts.contents)},0,this);var k={position:t.ie6Compat?"absolute":"fixed",top:0,visibility:"hidden"};k[p=="rtl"?"right":"left"]=0,this.parts.dialog.setStyles(k),e.event.call(this),this.definition=a=e.fire("dialogDefinition",{name:u,definition:a},s).definition;if(!("removeDialogTabs"in s._)&&s.config.removeDialogTabs){var A=s.config.removeDialogTabs.split(";");for(E=0;E1)_._.tabBarMode=!0,_._.tabs[_._.currentTabId][0].focus();else if(!e._.hasFocus){e._.currentFocusIndex=-1;if(a.onFocus){var t=a.onFocus.call(e);t&&t.focus()}else H(1);if(e._.editor.mode=="wysiwyg"&&n){var r=s.document.$.selection,i=r.createRange();if(i)if(i.parentElement&&i.parentElement().ownerDocument==s.document.$||i.item&&i.item(0).ownerDocument==s.document.$){var o=document.body.createTextRange();o.moveToElementText(e.getElement().getFirst().$),o.collapse(!0),o.select()}}}},this,null,4294967295),t.ie6Compat&&this.on("load",function(e){var t=this.getElement(),n=t.getFirst();n.remove(),n.appendTo(t)},this),C(this),L(this),(new r.text(a.title,e.document)).appendTo(this.parts.title);for(E=0;E0?r:0)+"px"};c[u?"right":"left"]=(n>0?n:0)+"px",o.setStyles(c),i&&(s._.moved=1)}}(),getPosition:function(){return i.extend({},this._.position)},show:function(){var n=this._.element,r=this.definition;!n.getParent()||!n.getParent().equals(e.document.getBody())?n.appendTo(e.document.getBody()):n.setStyle("display","block");if(t.gecko&&t.version<10900){var s=this.parts.dialog;s.setStyle("position","absolute"),setTimeout(function(){s.setStyle("position","fixed")},0)}this.resize(this._.contentSize&&this._.contentSize.width||r.width||r.minWidth,this._.contentSize&&this._.contentSize.height||r.height||r.minHeight),this.reset(),this.selectPage(this.definition.contents[0].id),e.dialog._.currentZIndex===null&&(e.dialog._.currentZIndex=this._.editor.config.baseFloatZIndex),this._.element.getFirst().setStyle("z-index",e.dialog._.currentZIndex+=10);if(e.dialog._.currentTop===null)e.dialog._.currentTop=this,this._.parentDialog=null,D(this._.editor);else{this._.parentDialog=e.dialog._.currentTop;var o=this._.parentDialog.getElement().getFirst();o.$.style.zIndex-=Math.floor(this._.editor.config.baseFloatZIndex/2),e.dialog._.currentTop=this}n.on("keydown",j),n.on(t.opera?"keypress":"keyup",F);for(var u in{keyup:1,keydown:1,keypress:1})n.on(u,W);I(this,this,"",null,function(){var e=this.getButton("cancel");e?e.click():this.fire("cancel",{hide:!0}).hide!==!1&&this.hide()}),this._.hasFocus=!1,i.setTimeout(function(){this.layout(),this.parts.dialog.setStyle("visibility",""),this.fireOnce("load",{}),l.fire("ready",this),this.fire("show",{}),this._.editor.fire("dialogShow",this),this.foreach(function(e){e.setInitValue&&e.setInitValue()})},100,this)},layout:function(){var t=this,n=e.document.getWindow().getViewPaneSize(),r=t.getSize();t.move(t._.moved?t._.position.x:(n.width-r.width)/2,t._.moved?t._.position.y:(n.height-r.height)/2)},foreach:function(e){var t=this;for(var n in t._.contents)for(var r in t._.contents[n])e.call(t,t._.contents[n][r]);return t},reset:function(){var e=function(e){e.reset&&e.reset(1)};return function(
){return this.foreach(e),this}}(),setupContent:function(){var e=arguments;this.foreach(function(t){t.setup&&t.setup.apply(t,e)})},commitContent:function(){var e=arguments;this.foreach(function(t){n&&this._.currentFocusIndex==t.focusIndex&&t.getInputElement().$.blur(),t.commit&&t.commit.apply(t,e)})},hide:function(){if(!this.parts.dialog.isVisible())return;this.fire("hide",{}),this._.editor.fire("dialogHide",this);var r=this._.element;r.setStyle("display","none"),this.parts.dialog.setStyle("visibility","hidden"),q(this);while(e.dialog._.currentTop!=this)e.dialog._.currentTop.hide();if(!this._.parentDialog)P();else{var i=this._.parentDialog.getElement().getFirst();i.setStyle("z-index",parseInt(i.$.style.zIndex,10)+Math.floor(this._.editor.config.baseFloatZIndex/2))}e.dialog._.currentTop=this._.parentDialog;if(!this._.parentDialog){e.dialog._.currentZIndex=null,r.removeListener("keydown",j),r.removeListener(t.opera?"keypress":"keyup",F);for(var s in{keyup:1,keydown:1,keypress:1})r.removeListener(s,W);var o=this._.editor;o.focus();if(o.mode=="wysiwyg"&&n){var u=o.getSelection();u&&u.unlock(!0)}}else e.dialog._.currentZIndex-=10;delete this._.parentDialog,this.foreach(function(e){e.resetInitValue&&e.resetInitValue()})},addPage:function(n){var r=this,s=[],o=n.label?' title="'+i.htmlEncode(n.label)+'"':"",a=n.elements,f=e.dialog._.uiElementBuilders.vbox.build(r,{type:"vbox",className:"cke_dialog_page_contents",children:n.elements,expand:!!n.expand,padding:n.padding,style:n.style||"width: 100%;height:100%"},s),l=u.createFromHtml(s.join(""));l.setAttribute("role","tabpanel");var c=t,p="cke_"+n.id+"_"+i.getNextNumber(),d=u.createFromHtml(['0?" cke_last":"cke_first",o,n.hidden?' style="display:none"':"",' id="',p,'"',c.gecko&&c.version>=10900&&!c.hc?"":' href="javascript:void(0)"',' tabIndex="-1"',' hidefocus="true"',' role="tab">',n.label," "].join(""));l.setAttribute("aria-labelledby",p),r._.tabs[n.id]=[d,l],r._.tabIdList.push(n.id),!n.hidden&&r._.pageCount++,r._.lastTab=d,r.updateStyle();var v=r._.contents[n.id]={},m,g=f.getChild();while(m=g.shift())v[m.id]=m,typeof m.getChild=="function"&&g.push.apply(g,m.getChild());l.setAttribute("name",n.id),l.appendTo(r.parts.contents),d.unselectable(),r.parts.tabs.append(d),n.accessKey&&(I(r,r,"CTRL+"+n.accessKey,U,R),r._.accessKeyMap["CTRL+"+n.accessKey]=n.id)},selectPage:function(e){if(this._.currentTabId==e)return;if(this.fire("selectPage",{page:e,currentPage:this._.currentTabId})===!0)return;for(var n in this._.tabs){var r=this._.tabs[n][0],s=this._.tabs[n][1];n!=e&&(r.removeClass("cke_dialog_tab_selected"),s.hide()),s.setAttribute("aria-hidden",n!=e)}var o=this._.tabs[e];o[0].addClass("cke_dialog_tab_selected"),t.ie6Compat||t.ie7Compat?(p(o[1]),o[1].show(),setTimeout(function(){p(o[1],1)},0)):o[1].show(),this._.currentTabId=e,this._.currentTabIndex=i.indexOf(this._.tabIdList,e)},updateStyle:function(){this.parts.dialog[(this._.pageCount===1?"add":"remove")+"Class"]("cke_single_page")},hidePage:function(e){var t=this,n=t._.tabs[e]&&t._.tabs[e][0];if(!n||t._.pageCount==1||!n.isVisible())return;e==t._.currentTabId&&t.selectPage(f.call(t)),n.hide(),t._.pageCount--,t.updateStyle()},showPage:function(e){var t=this,n=t._.tabs[e]&&t._.tabs[e][0];if(!n)return;n.show(),t._.pageCount++,t.updateStyle()},getElement:function(){return this._.element},getName:function(){return this._.name},getContentElement:function(e,t){var n=this._.contents[e];return n&&n[t]},getValueOf:function(e,t){return this.getContentElement(e,t).getValue()},setValueOf:function(e,t,n){return this.getContentElement(e,t).setValue(n)},getButton:function(e){return this._.buttons[e]},click:function(e){return this._.buttons[e].click()},disableButton:function(e){return this._.buttons[e].disable()},enableButton:function(e){return this._.buttons[e].enable()},getPageCount:function(){return this._.pageCount},getParentEditor:function(){return this._.editor},getSelectedElement:function(){return this.getParentEditor().getSelection().getSelectedElement()},addFocusable:function(e,t){var n=this;if(typeof t=="undefined")t=n._.focusList.length,n._.focusList.push(new y(n,e,t));else{n._.focusList.splice(t,0,new y(n,e,t));for(var r=t+1;r=0;r--)(n[r].dialog==e||n[r].uiElement==e)&&n.splice(r,1);n.length===0&&delete B[t]}},R=function(e,t){e._.accessKeyMap[t]&&e.selectPage(e._.accessKeyMap[t])},U=function(e,t){},z={27:1,13:1},W=function(e){e.data.getKeystroke()in z&&e.data.stopPropagation()};(function(){l.dialog={uiElement:function(r,s,o,u,a,f,l){if(arguments.length<4)return;var c=(u.call?u(s):u)||"div",h=["<",c," "],p=(a&&a.call?a(s):a)||{},d=(f&&f.call?f(s):f)||{},v=(l&&l.call?l.call(this,r,s):l)||"",m=this.domId=d.id||i.getNextId()+"_uiElement",g=this.id=s.id,y;d.id=m;var w={};s.type&&(w["cke_dialog_ui_"+s.type]=1),s.className&&(w[s.className]=1),s.disabled&&(w.cke_disabled=1);var E=d["class"]&&d["class"].split?d["class"].split(" "):[];for(y=0;y=0;y--)x[y]===""&&x.splice(y,1);x.length>0&&(d.style=(d.style?d.style+"; ":"")+x.join("; "));for(y in d)h.push(y+'="'+i.htmlEncode(d[y])+'" ');h.push(">",v,"",c,">"),o.push(h.join("")),(this._||(this._={})).dialog=r,typeof s.isChanged=="boolean"&&(this.isChanged=function(){return s.isChanged}),typeof s.isChanged=="function"&&(this.isChanged=s.isChanged),typeof s.setValue=="function"&&(this.setValue=i.override(this.setValue,function(e){return function(t){e.call(this,s.setValue.call(this,t))}})),typeof s.getValue=="function"&&(this.getValue=i.override(this.getValue,function(e){return function(){return s.getValue.call(this,e.call(this))}})),e.event.implementOn(this),this.registerEvents(s),this.accessKeyUp&&this.accessKeyDown&&s.accessKey&&I(this,r,"CTRL+"+s.accessKey);var N=this;r.on("load",function(){var e=N.getInputElement();if(e){var i=N.type in{checkbox:1,ratio:1}&&n&&t.version<8?"cke_dialog_ui_focused":"";e.on("focus",function(){r._.tabBarMode=!1,r._.hasFocus=!0,N.fire("focus"),i&&this.addClass(i)}),e.on("blur",function(){N.fire("blur"),i&&this.removeClass(i)})}}),this.keyboardFocusable&&(this.tabIndex=s.tabIndex||0,this.focusIndex=r._.focusList.push(this)-1,this.on("focus",function(){r._.currentFocusIndex=N.focusIndex})),i.extend(this,s)},hbox:function(e,r,i,o,u){if(arguments.length<4)return;this._||(this._={});var a=this._.children=r,f=u&&u.widths||null,c=u&&u.height||null,h={},p,d=function(){var e=[''];for(p=0;p0&&e.push('style="'+o.join("; ")+'" '),e.push(">",i[p],"")}return e.push(" "),e.join("")},v={role:"presentation"};u&&u.align&&(v.align=u.align),l.dialog.uiElement.call(this,e,u||{type:"hbox"},o,"table",h,v,d)},vbox:function(e,r,o,u,a){if(arguments.length<3)return;this._||(this._={});var f=this._.children=r,c=a&&a.width||null,h=a&&a.heights||null,p=function(){var r=['");for(var u=0;u0&&r.push('style="',l.join("; "),'" '),r.push(' class="cke_dialog_ui_vbox_child">',o[u]," ")}return r.push("
"),r.join("")};l.dialog.uiElement.call(this,e,a||{type:"vbox"},u,"div",null,{role:"presentation"},p)}}})(),l.dialog.uiElement.prototype={getElement:function(){return e.document.getById(this.domId)},getInputElement:function(){return this.getElement()},getDialog:function(){return this._.dialog},setValue:function(e,t){return this.getInputElement().setValue(e),!t&&this.fire("change",{value:e}),this},getValue:function(){return this.getInputElement().getValue()},isChanged:function(){return!1},selectParentTab:function(){var e=this,t=e.getInputElement(),n=t,r;while((n=n.getParent())&&n.$.className.search("cke_dialog_page_contents")==-1);return n?(r=n.getAttribute("name"),e._.dialog._.currentTabId!=r&&e._.dialog.selectPage(r),e):e},focus:function(){return this.selectParentTab().getInputElement().focus(),this},registerEvents:function(e){var t=/^on([A-Z]\w+)/,n,r=function(e,t,n,r){t.on("load",function(){e.getInputElement().on(n,r,e)})};for(var i in e){if(!(n=i.match(t)))continue;this.eventProcessors[i]?this.eventProcessors[i].call(this,this._.dialog,e[i]):r(this,this._.dialog,n[1].toLowerCase(),e[i])}return this},eventProcessors:{onLoad:function(e,t){e.on("load",t,this)},onShow:function(e,t){e.on("show",t,this)},onHide:function(e,t){e.on("hide",t,this)}},accessKeyDown:function(e,t){this.focus()},accessKeyUp:function(e,t){},disable:function(){var e=this.getElement(),t=this.getInputElement();t.setAttribute("disabled","true"),e.addClass("cke_disabled")},enable:function(){var e=this.getElement(),t=this.getInputElement();t.removeAttribute("disabled"),e.removeClass("cke_disabled")},isEnabled:function(){return!this.getElement().hasClass("cke_disabled")},isVisible:function(){return this.getInputElement().isVisible()},isFocusable:function(){return!this.isEnabled()||!this.isVisible()?!1:!0}},l.dialog.hbox.prototype=i.extend(new l.dialog.uiElement,{getChild:function(e){var t=this;return arguments.length<1?t._.children.concat():(e.splice||(e=[e]),e.length<2?t._.children[e[0]]:t._.children[e[0]]&&t._.children[e[0]].getChild?t._.children[e[0]].getChild(e.slice(1,e.length)):null)}},!0),l.dialog.vbox.prototype=new l.dialog.hbox,function(){var t={build:function(t,n,r){var i=n.children,s,o=[],u=[];for(var a=0;a"+r+" ":e.setHtml(r),t.remove()}function x(e){var t=/(\S\s*)\n(?:\s|(]+data-cke-bookmark.*?\/span>))*\n(?!$)/gi,n=e.getName(),r=T(e.getOuterHtml(),t,function(e,t,n){return t+""+n+""}),i=[];return r.replace(/([\s\S]*?)<\/pre>/gi,function(e,t){i.push(t)}),i}function T(e,t,n){var r="",i="";return e=e.replace(/(^]+data-cke-bookmark.*?\/span>)|(]+data-cke-bookmark.*?\/span>$)/gi,function(e,t,n){return t&&(r=t),n&&(i=n),""}),r+e.replace(t,n)+i}function N(e,t){var n;e.length>1&&(n=new r.documentFragment(t.getDocument()));for(var s=0;s"),o=o.replace(/[ \t]{2,}/g,function(e){return i.repeat(" ",e.length-1)+" "});if(n){var u=t.clone();u.setHtml(o),n.append(u)}else t.setHtml(o)}return n||t}function C(e,t){var r=e.getBogus();r&&r.remove();var i=e.getHtml();i=T(i,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,""),i=i.replace(/[ \t\r\n]*( ]*>)[ \t\r\n]*/gi,"$1"),i=i.replace(/([ \t\n\r]+| )/g," "),i=i.replace(/ ]*>/gi,"\n");if(n){var s=e.getDocument().createElement("div");s.append(t),t.$.outerHTML=""+i+" ",t.copyAttributes(s.getFirst()),t=s.getFirst().remove()}else t.setHtml(i);return t}function k(e,n){var r=e._.definition,o=r.attributes,u=r.styles,a=H(e)[n.getName()],f=i.isEmpty(o)&&i.isEmpty(u);for(var l in o){if(!(l!="class"&&!e._.definition.fullMatch||n.getAttribute(l)==B(l,o[l])))continue;f=n.hasAttribute(l),n.removeAttribute(l)}for(var c in u){if(e._.definition.fullMatch&&n.getStyle(c)!=B(c,u[c],true))continue;f=f||!!n.getStyle(c),n.removeStyle(c)}A(n,a,t[n.getName()]),f&&(!s.$block[n.getName()]||e._.enterMode==2&&!n.hasAttributes()?O(n):n.renameNode(e._.enterMode==1?"p":"div"))}function L(e,t){var n=e._.definition,r=n.attributes,i=n.styles,s=H(e),o=t.getElementsByTag(e.element);for(var u=o.count();--u>=0;)k(e,o.getItem(u));for(var a in s)if(a!=e.element){o=t.getElementsByTag(a);for(u=o.count()-1;u>=0;u--){var f=o.getItem(u);A(f,s[a])}}}function A(e,t,n){var r=t&&t.attributes;if(r)for(var i=0;i",t||n.name,"",i,">"),r.join("")}},e.style.getStyleText=function(e){var t=e._ST;if(t)return t;t=e.styles;var n=e.attributes&&e.attributes.style||"",r="";n.length&&(n=n.replace(a,";"));for(var i in t){var s=t[i],o=(i+":"+s).replace(a,";");s=="inherit"?r+=o:n+=o}return n.length&&(n=j(n)),n+=r,e._ST=n}}(),e.styleCommand=function(e){this.style=e},e.styleCommand.prototype.exec=function(e){var t=this;e.focus();var n=e.document;return n&&(t.state==2?t.style.apply(n):t.state==1&&t.style.remove(n)),!!n},e.stylesSet=new e.resourceManager("","stylesSet"),e.addStylesSet=i.bind(e.stylesSet.add,e.stylesSet),e.loadStylesSet=function(t,n,r){e.stylesSet.addExternal(t,n,""),e.stylesSet.load(t,r)},e.editor.prototype.getStylesSet=function(t){if(!this._.stylesDefinitions){var n=this,r=n.config.stylesCombo_stylesSet||n.config.stylesSet||"default";if(r instanceof Array){n._.stylesDefinitions=r,t(r);return}var i=r.split(":"),s=i[0],o=i[1],u=f.registered.styles.path;e.stylesSet.addExternal(s,o?i.slice(1).join(":"):u+"styles/"+s+".js",""),e.stylesSet.load(s,function(e){n._.stylesDefinitions=e[s],t(n._.stylesDefinitions)})}else t(this._.stylesDefinitions)},f.add("domiterator"),function(){function e(e){var t=this;if(arguments.length<1)return;t.range=e,t.forceBrBreak=0,t.enlargeBr=1,t.enforceRealBlocks=0,t._||(t._={})}function a(e,t,n){var r=e.getNextSourceNode(t,null,n);while(!s(r))r=r.getNextSourceNode(t,null,n);return r}var t=/^[\r\n\t ]+$/,s=r.walker.bookmark(!1,!0),o=r.walker.whitespaces(!0),u=function(e){return s(e)&&o(e)};e.prototype={getNextParagraph:function(e){var o=this,f,l,c,h,p,v;if(!o._.started){l=o.range.clone(),l.shrink(1,!0),h=l.endContainer.hasAscendant("pre",!0)||l.startContainer.hasAscendant("pre",!0),l.enlarge(o.forceBrBreak&&!h||!o.enlargeBr?3:2);if(!l.collapsed){var m=new r.walker(l.clone()),g=r.walker.bookmark(!0,!0);m.evaluator=g,o._.nextNode=m.next(),m=new r.walker(l.clone()),m.evaluator=g;var y=m.previous();o._.lastNode=y.getNextSourceNode(!0);if(o._.lastNode&&o._.lastNode.type==3&&!i.trim(o._.lastNode.getText())&&o._.lastNode.getParent().isBlockBoundary()){var b=new r.range(l.document);b.moveToPosition(o._.lastNode,4);if(b.checkEndOfBlock()){var w=new r.elementPath(b.endContainer),E=w.block||w.blockLimit;o._.lastNode=E.getNextSourceNode(!0)}}o._.lastNode||(o._.lastNode=o._.docEndMarker=l.document.createText(""),o._.lastNode.insertAfter(y)),l=null}o._.started=1}var S=o._.nextNode;y=o._.lastNode,o._.nextNode=null;while(S){var x=0,T=S.hasAscendant("pre"),N=S.type!=1,C=0;if(!N){var k=S.getName();if(S.isBlockBoundary(o.forceBrBreak&&!T&&{br:1})){if(k=="br")N=1;else if(!l&&!S.getChildCount()&&k!="hr"){f=S,c=S.equals(y);break}l&&(l.setEndAt(S,3),k!="br"&&(o._.nextNode=S)),x=1}else{if(S.getFirst()){l||(l=new r.range(o.range.document),l.setStartAt(S,3)),S=S.getFirst();continue}N=1}}else S.type==3&&t.test(S.getText())&&(N=0);N&&!l&&(l=new r.range(o.range.document),l.setStartAt(S,3)),c=(!x||N)&&S.equals(y);if(l&&!x)while(!S.getNext(u)&&!c){var L=S.getParent();if(L.isBlockBoundary(o.forceBrBreak&&!T&&{br:1})){x=1,N=0,c=c||L.equals(y),l.setEndAt(L,2);break}S=L,N=1,c=S.equals(y),C=1}N&&l.setEndAt(S,4),S=a(S,C,y),c=!S;if(c||x&&l)break}if(!f){if(!l)return o._.docEndMarker&&o._.docEndMarker.remove(),o._.nextNode=null,null;var A=new r.elementPath(l.startContainer),O=A.blockLimit,M={div:1,th:1,td:1};f=A.block;if(!f&&!o.enforceRealBlocks&&M[O.getName()]&&l.checkStartOfBlock()&&l.checkEndOfBlock())f=O;else if(!f||o.enforceRealBlocks&&f.getName()=="li")f=o.range.document.createElement(e||"p"),
l.extractContents().appendTo(f),f.trim(),l.insertNode(f),p=v=!0;else if(f.getName()!="li"){if(!l.checkStartOfBlock()||!l.checkEndOfBlock()){f=f.clone(!1),l.extractContents().appendTo(f),f.trim();var _=l.splitBlock();p=!_.wasStartOfBlock,v=!_.wasEndOfBlock,l.insertNode(f)}}else c||(o._.nextNode=f.equals(y)?null:a(l.getBoundaryNodes().endNode,1,y))}if(p){var D=f.getPrevious();D&&D.type==1&&(D.getName()=="br"?D.remove():D.getLast()&&D.getLast().$.nodeName.toLowerCase()=="br"&&D.getLast().remove())}if(v){var P=f.getLast();P&&P.type==1&&P.getName()=="br"&&(n||P.getPrevious(s)||P.getNext(s))&&P.remove()}return o._.nextNode||(o._.nextNode=c||f.equals(y)||!y?null:a(f,1,y)),f}},r.range.prototype.createIterator=function(){return new e(this)}}(),f.add("panelbutton",{requires:["button"],onLoad:function(){function t(e){var t=this,n=t._;if(n.state==0)return;t.createPanel(e);if(n.on){n.panel.hide();return}n.panel.showBlock(t._.id,t.document.getById(t._.id),4)}l.panelButton=i.createClass({base:l.button,$:function(n){var r=this,i=n.panel;delete n.panel,r.base(n),r.document=i&&i.parent&&i.parent.getDocument()||e.document,i.block={attributes:i.attributes},r.hasArrow=!0,r.click=t,r._={panelDefinition:i}},statics:{handler:{create:function(e){return new l.panelButton(e)}}},proto:{createPanel:function(t){var n=this._;if(n.panel)return;var r=this._.panelDefinition||{},i=this._.panelDefinition.block,s=r.parent||e.document.getBody(),o=this._.panel=new l.floatPanel(t,s,r),u=o.addBlock(n.id,i),a=this;o.onShow=function(){a.className&&this.element.getFirst().addClass(a.className+"_panel"),a.setState(1),n.on=1,a.onOpen&&a.onOpen()},o.onHide=function(e){a.className&&this.element.getFirst().removeClass(a.className+"_panel"),a.setState(a.modes&&a.modes[t.mode]?2:0),n.on=0,!e&&a.onClose&&a.onClose()},o.onEscape=function(){o.hide(),a.document.getById(n.id).focus()},this.onBlock&&this.onBlock(o,u),u.onHide=function(){n.on=0,a.setState(2)}}}})},beforeInit:function(e){e.ui.addHandler("panelbutton",l.panelButton.handler)}}),e.UI_PANELBUTTON="panelbutton",f.add("floatpanel",{requires:["panel"]}),function(){function a(e,t,n,r,o){var a=i.genKey(t.getUniqueId(),n.getUniqueId(),e.skinName,e.lang.dir,e.uiColor||"",r.css||"",o||""),f=s[a];return f||(f=s[a]=new l.panel(t,r),f.element=n.append(u.createFromHtml(f.renderHtml(e),t)),f.element.setStyles({display:"none",position:"absolute"})),f}var s={},o=!1;l.floatPanel=i.createClass({$:function(e,t,n,r){n.forceIFrame=1;var i=t.getDocument(),s=a(e,i,t,n,r||0),o=s.element,u=o.getFirst().getFirst();o.disableContextMenu(),this.element=o,this._={editor:e,panel:s,parentElement:t,definition:n,document:i,iframe:u,children:[],dir:e.lang.dir},e.on("mode",function(){this.hide()},this)},proto:{addBlock:function(e,t){return this._.panel.addBlock(e,t)},addListBlock:function(e,t){return this._.panel.addListBlock(e,t)},getBlock:function(e){return this._.panel.getBlock(e)},showBlock:function(s,a,f,l,c){var p=this._.panel,v=p.showBlock(s);this.allowBlur(!1),o=1,this._.returnFocus=this._.editor.focusManager.hasFocus?this._.editor:new u(e.document.$.activeElement);var m=this.element,g=this._.iframe,y=this._.definition,w=a.getDocumentPosition(m.getDocument()),E=this._.dir=="rtl",S=w.x+(l||0),x=w.y+(c||0);!E||f!=1&&f!=4?!E&&(f==2||f==3)&&(S+=a.$.offsetWidth-1):S+=a.$.offsetWidth;if(f==3||f==4)x+=a.$.offsetHeight-1;this._.panel._.offsetParentId=a.getId(),m.setStyles({top:x+"px",left:0,display:""}),m.setOpacity(0),m.getFirst().removeStyle("width");if(!this._.blurSet){var T=n?g:new r.window(g.$.contentWindow);e.event.useCapture=!0,T.on("blur",function(e){var t=this;if(!t.allowBlur())return;var n=e.data.getTarget();if(n.getName&&n.getName()!="iframe")return;t.visible&&!t._.activeChild&&!o&&(delete t._.returnFocus,t.hide())},this),T.on("focus",function(){this._.focused=!0,this.hideChild(),this.allowBlur(!0)},this),e.event.useCapture=!1,this._.blurSet=1}p.onEscape=i.bind(function(e){if(this.onEscape&&this.onEscape(e)===!1)return!1},this),i.setTimeout(function(){var e=i.bind(function(){var e=m.getFirst();if(v.autoSize){var r=v.element.$;if(t.gecko||t.opera)r=r.parentNode;n&&(r=r.document.body);var i=r.scrollWidth;n&&t.quirks&&i>0&&(i+=(e.$.offsetWidth||0)-(e.$.clientWidth||0)+3),i+=4,e.setStyle("width",i+"px"),v.element.addClass("cke_frameLoaded");var s=v.element.$.scrollHeight;n&&t.quirks&&s>0&&(s+=(e.$.offsetHeight||0)-(e.$.clientHeight||0)+3),e.setStyle("height",s+"px"),p._.currentBlock.element.setStyle("display","none").removeStyle("display")}else e.removeStyle("height");E&&(S-=m.$.offsetWidth),m.setStyle("left",S+"px");var o=p.element,a=o.getWindow(),f=m.$.getBoundingClientRect(),l=a.getViewPaneSize(),c=f.width||f.right-f.left,d=f.height||f.bottom-f.top,g=E?f.right:l.width-f.left,y=E?l.width-f.right:f.left;E?gc?S+=c:l.width>c?S-=f.left:S=S-f.right+l.width):gc?S-=c:l.width>c?S=S-f.right+l.width:S-=f.left);var w=l.height-f.top,T=f.top;wd?x-=d:l.height>d?x=x-f.bottom+l.height:x-=f.top);if(n){var N=new u(m.$.offsetParent),k=N;k.getName()=="html"&&(k=k.getDocument().getBody()),k.getComputedStyle("direction")=="rtl"&&(t.ie8Compat?S-=m.getDocument().getDocumentElement().$.scrollLeft*2:S-=N.$.scrollWidth-N.$.clientWidth)}var L=m.getFirst(),O;(O=L.getCustomData("activePanel"))&&O.onHide&&O.onHide.call(this,1),L.setCustomData("activePanel",this),m.setStyles({top:x+"px",left:S+"px"}),m.setOpacity(1)},this);p.isLoaded?e():p.onLoad=e,i.setTimeout(function(){g.$.contentWindow.focus(),this.allowBlur(!0)},0,this)},t.air?200:0,this),this.visible=1,this.onShow&&this.onShow.call(this),o=0},hide:function(e){var n=this;if(n.visible&&(!n.onHide||n.onHide.call(n)!==!0)){n.hideChild(),t.gecko&&n._.iframe.getFrameDocument().$.activeElement.blur(),n.element.setStyle("display","none"),n.visible=0,n.element.getFirst().removeCustomData("activePanel");var r=e!==!1&&n._.returnFocus;r&&(t.webkit&&r.type&&r.getWindow().$.focus(),r.focus())}},allowBlur:function(e){var t=this._.panel;return e!=undefined&&(t.allowBlur=e),t.allowBlur},showAsChild:function(e,n,r,s,o,u){if(this._.activeChild==e&&e._.panel._.offsetParentId==r.getId())return;this.hideChild(),e.onHide=i.bind(function(){i.setTimeout(function(){this._.focused||this.hide()},0,this)},this),this._.activeChild=e,this._.focused=!1,e.showBlock(n,r,s,o,u),(t.ie7Compat||t.ie8&&t.ie6Compat)&&setTimeout(function(){e.element.getChild(0).$.style.cssText+=""},100)},hideChild:function(){var e=this._.activeChild;e&&(delete e.onHide,delete e._.returnFocus,delete this._.activeChild,e.hide())}}}),e.on("instanceDestroyed",function(){var t=i.isEmpty(e.instances);for(var n in s){var r=s[n];t?r.destroy():r.element.hide()}t&&(s={})})}(),f.add("menu",{beforeInit:function(t){var n=t.config.menu_groups.split(","),r=t._.menuGroups={},i=t._.menuItems={};for(var s=0;st.group?1:e.ordert.order?1:0})}e.menu=i.createClass({$:function(e,t){var n=this;t=n._.definition=t||{},n.id=i.getNextId(),n.editor=e,n.items=[],n._.listeners=[],n._.level=t.level||1;var r=i.extend({},t.panel,{css:e.skin.editor.css,level:n._.level-1,block:{}}),s=r.block.attributes=r.attributes||{};!s.role&&(s.role="menu"),n._.panelDefinition=r},_:{onShow:function(){var e=this,t=e.editor.getSelection();n&&t&&t.lock();var r=t&&t.getStartElement(),i=e._.listeners,s=[];e.removeAll();for(var o=0;o "),this.onRender&&this.onRender(),c},createPanel:function(t){if(this._.panel)return;var n=this._.panelDefinition,r=this._.panelDefinition.block,i=n.parent||e.document.getBody(),s=new l.floatPanel(t,i,n),o=s.addListBlock(this.id,r),u=this;s.onShow=function(){u.className&&this.element.getFirst().addClass(u.className+"_panel"),u.setState(1),o.focus(!u.multiSelect&&u.getValue()),u._.on=1,u.onOpen&&u.onOpen()},s.onHide=function(e){u.className&&this.element.getFirst().removeClass(u.className+"_panel"),u.setState(u.modes&&u.modes[t.mode]?2:0),u._.on=0,!e&&u.onClose&&u.onClose()},s.onEscape=function(){s.hide()},o.onClick=function(e,t){u.document.getWindow().focus(),u.onClick&&u.onClick.call(u,e,t),t?u.setValue(e,u._.items[e]):u.setValue(""),s.hide(!1)},this._.panel=s,this._.list=o,s.getBlock(this.id).onHide=function(){u._.on=0,u.setState(2)},this.init&&this.init()},setValue:function(e,t){var n=this;n._.value=e;var r=n.document.getById("cke_"+n.id+"_text");r&&(!e&&!t?(t=n.label,r.addClass("cke_inline_label")):r.removeClass("cke_inline_label"),r.setHtml(typeof t!="undefined"?t:e))},getValue:function(){return this._.value||""},unmarkAll:function(){this._.list.unmarkAll()},mark:function(e){this._.list.mark(e)},hideItem:function(e){this._.list.hideItem(e)},hideGroup:function(e){this._.list.hideGroup(e)},showAll:function(){this._.list.showAll()},add:function(e,t,n){this._.items[e]=n||e,this._.list.add(e,t,n)},startGroup:function(e){this._.list.startGroup(e)},commit:function(){var e=this;e._.committed||(e._.list.commit(),e._.committed=1,l.fire("ready",e)),e._.committed=1},setState:function(e){var t=this;if(t._.state==e)return;t.document.getById("cke_"+t.id).setState(e),t._.state=e}}}),l.prototype.addRichCombo=function(e,t){this.add(e,"richcombo",t)},f.add("htmlwriter"),e.htmlWriter=i.createClass({base:e.htmlParser.basicWriter,$:function(){var e=this;e.base(),e.indentationChars=" ",e.selfClosingEnd=" />",e.lineBreakChars="\n",e.forceSimpleAmpersand=0,e.sortAttributes=1,e._.indent=0,e._.indentation="",e._.inPre=0,e._.rules={};var t=s;for(var n in i.extend({},t.$nonBodyContent,t.$block,t.$listItem,t.$tableContent))e.setRules(n,{indent:1,breakBeforeOpen:1,breakAfterOpen:1,breakBeforeClose:!t[n]["#"],breakAfterClose:1});e.setRules("br",{breakAfterOpen:1}),e.setRules("title",{indent:0,breakAfterOpen:0}),e.setRules("style",{indent:0,breakBeforeClose:1}),e.setRules("pre",{indent:0})},proto:{openTag:function(e,t){var n=this,r=n._.rules[e];n._.indent?n.indentation():r&&r.breakBeforeOpen&&(n.lineBreak(),n.indentation()),n._.output.push("<",e)},openTagClose:function(e,t){var n=this,r=n._.rules[e];t?n._.output.push(n.selfClosingEnd):(n._.output.push(">"),r&&r.indent&&(n._.indentation+=n.indentationChars)),r&&r.breakAfterOpen&&n.lineBreak(),e=="pre"&&(n._.inPre=1)},attribute:function(e,t){typeof t=="string"&&(this.forceSimpleAmpersand&&(t=t.replace(/&/g,"&")),t=i.htmlEncodeAttr(t)),this._.output.push(" ",e,'="',t,'"')},closeTag:function(e){var t=this,n=t._.rules[e];n&&n.indent&&(t._.indentation=t._.indentation.substr(t.indentationChars.length)),t._.indent?t.indentation():n&&n.breakBeforeClose&&(t.lineBreak(),t.indentation()),t._.output.push("",e,">"),e=="pre"&&(t._.inPre=0),n&&n.breakAfterClose&&t.lineBreak()},text:function(e){var t=this;t._.indent&&(t.indentation(),!t._.inPre&&(e=i.ltrim(e))),t._.output.push(e)},comment:function(e){this._.indent&&this.indentation(),this._.output.push("")},lineBreak:function(){var e=this;!e._.inPre&&e._.output.length>0&&e._.output.push(e.lineBreakChars),e._.indent=1},indentation:function(){var e=this;e._.inPre||e._.output.push(e._.indentation),e._.indent=0},setRules:function(e,t){var n=this._.rules[e];n?i.extend(n,t,!0):this._.rules[e]=t}}}),f.add("menubutton",{requires:["button","menu"],beforeInit:function(e){e.ui.addHandler("menubutton",l.menuButton.handler)}}),e.UI_MENUBUTTON="menubutton",function(){var t=function(t){var n=this._;if(n.state===0)return;n.previousState=n.state;var r=n.menu;r||(r=n.menu=new e.menu(t,{panel:{className:t.skinClass+" cke_contextmenu",attributes:{"aria-label":t.lang.common.options}}}),r.onHide=i.bind(function(){this.setState(this.modes&&this.modes[t.mode]?n.previousState:0)},this),this.onMenu&&r.addListener(this.onMenu));if(n.on){r.hide();return}this.setState(1),r.show(e.document.getById(this._.id),4)};l.menuButton=i.createClass({base:l.button,$:function(e){var n=e.panel;delete e.panel,this.base(e),this.hasArrow=!0,this.click=t},statics:{handler:{create:function(e){return new l.menuButton(e)}}}})}(),f.add("dialogui"),function(){var s=function(e){var t=this;t._||(t._={}),t._["default"]=t._.initValue=e["default"]||"",t._.required=e.required||!1;var n=[t._];for(var r=1;r",n.label,"",'',o.call(this,t,n),"
");else{var a={type:"hbox",widths:n.widths,padding:0,children:[{type:"html",html:'"+i.htmlEncode(n.label)+" "},{type:"html",html:'"+o.call(this,t,n)+" "}]};e.dialog._.uiElementBuilders.hbox.build(t,a,r)}return r.join("")};l.dialog.uiElement.call(this,t,n,r,"div",null,{role:"presentation"},f)},textInput:function(e,t,n){if(arguments.length<3)return;s.call(this,t);var r=this._.inputId=i.getNextId()+"_textInput",o={"class":"cke_dialog_ui_input_"+t.type,id:r,type:t.type},u;t.validate&&(this.validate=t.validate),t.maxLength&&(o.maxlength=t.maxLength),t.size&&(o.size=t.size),t.inputStyle&&(o.style=t.inputStyle);var a=this,f=!1;e.on("load",function(){a.getInputElement().on("keydown",function(e){e.data.getKeystroke()==13&&(f=!0)}),a.getInputElement().on("keyup",function(t){t.data.getKeystroke()==13&&f&&(e.getButton("ok")&&setTimeout(function(){e.getButton("ok").click()},0),f=!1)},null,null,1e3)});var c=function(){var e=['
"),e.join("")};l.dialog.labeledElement.call(this,e,t,n,c)},textarea:function(e,t,n){if(arguments.length<3)return;s.call(this,t);var r=this,o=this._.inputId=i.getNextId()+"_textarea",u={};t.validate&&(this.validate=t.validate),u.rows=t.rows||5,u.cols=t.cols||20,typeof t.inputStyle!="undefined"&&(u.style=t.inputStyle);var a=function(){u["aria-labelledby"]=this._.labelId,this._.required&&(u["aria-required"]=this._.required);var e=['
"),e.join("")};l.dialog.labeledElement.call(this,e,t,n,a)},checkbox:function(e,t,n){if(arguments.length<3)return;var r=s.call(this,t,{"default":!!t["default"]});t.validate&&(this.validate=t.validate);var o=function(){var n=i.extend({},t,{id:t.id?t.id+"_checkbox":i.getNextId()+"_checkbox"},!0),s=[],o=i.getNextId()+"_label",u={"class":"cke_dialog_ui_checkbox_input",type:"checkbox","aria-labelledby":o};return m(n),t["default"]&&(u.checked="checked"),typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle),r.checkbox=new l.dialog.uiElement(e,n,s,"input",null,u),s.push(' ",i.htmlEncode(t.label)," "),s.join("")};l.dialog.uiElement.call(this,e,t,n,"span",null,null,o)},radio:function(e,t,n){if(arguments.length<3)return;s.call(this,t),this._["default"]||(this._["default"]=this._.initValue=t.items[0][1]),t.validate&&(this.validate=t.valdiate);var r=[],o=this,u=function(){var n=[],s=[],u={"class":"cke_dialog_ui_radio_item","aria-labelledby":this._.labelId},a=t.id?t.id+"_radio":i.getNextId()+"_radio";for(var f=0;f'+i.htmlEncode(n.label)+" ")},select:function(e,t,n){if(arguments.length<3)return;var r=s.call(this,t);t.validate&&(this.validate=t.validate),r.inputId=i.getNextId()+"_select";var o=function(){var n=i.extend({},t,{id:t.id?t.id+"_select":i.getNextId()+"_select"},!0),s=[],o=[],u={id:r.inputId,"class":"cke_dialog_ui_input_select","aria-labelledby":this._.labelId};t.size!=undefined&&(u.size=t.size),t.multiple!=undefined&&(u.multiple=t.multiple),m(n);for(var a=0,f;a ',i.htmlEncode(f[0]));return typeof n.inputStyle!="undefined"&&(n.style=n.inputStyle),r.select=new l.dialog.uiElement(e,n,s,"select",null,u,o.join("")),s.join("")};l.dialog.labeledElement.call(this,e,t,n,o)},file:function(n,r,o){if(arguments.length<3)return;r["default"]===undefined&&(r["default"]="");var u=i.extend(s.call(this,r),{definition:r,buttons:[]});r.validate&&(this.validate=r.validate);var a=function(){u.frameId=i.getNextId()+"_fileInput";var e=t.isCustomDomain(),n=[''),n.join("")};n.on("load",function(){var t=e.document.getById(u.frameId),n=t.getParent();n.addClass("cke_dialog_ui_input_file")}),l.dialog.labeledElement.call(this,n,r,o,a)},fileButton:function(e,t,n){if(arguments.length<3)return;var r=s.call(this,t),o=this;t.validate&&(this.validate=t.validate);var u=i.extend({},t),a=u.onClick;u.className=(u.className?u.className+" ":"")+"cke_dialog_ui_button",u.onClick=function(n){var r=t["for"];if(!a||a.call(this,n)!==!1)e.getContentElement(r[0],r[1]).submit(),this.disable()},e.on("load",function(){e.getContentElement(t["for"][0],t["for"][1])._.buttons.push(o)}),l.dialog.button.call(this,e,u,n)},html:function(){var e=/^\s*<[\w:]+\s+([^>]*)?>/,t=/^(\s*<[\w:]+(?:\s+[^>]*)?)((?:.|\r|\n)+)$/,n=/\/$/;return function(r,i,s){if(arguments.length<3)return;var o=[],u,a=i.html,f,c;a.charAt(0)!="<"&&(a=""+a+" ");var h=i.focus;if(h){var p=this.focus;this.focus=function(){p.call(this),typeof h=="function"&&h.call(this),this.fire("focus")};if(i.isFocusable){var d=this.isFocusable;this.isFocusable=d}this.keyboardFocusable=!0}l.dialog.uiElement.call(this,r,i,o,"span",null,null,""),u=o.join(""),f=u.match(e),c=a.match(t)||["","",""],n.test(c[1])&&(c[1]=c[1].slice(0,-1),c[2]="/"+c[2]),s.push([c[1]," ",f[1]||"",c[2]].join(""))}}(),fieldset:function(e,t,n,r,i){var s=i.label,o=function(){var e=[];s&&e.push(""+s+" ");for(var t=0;t0)e.remove(0);return this},keyboardFocusable:!0},c,!0),l.dialog.checkbox.prototype=i.extend(new l.dialog.uiElement,{getInputElement:function(){return this._.checkbox.getElement()},setValue:function(e,t){this.getInputElement().$.checked=e,!t&&this.fire("change",{value:e})},getValue:function(){return this.getInputElement().$.checked},accessKeyUp:function(){this.setValue(!this.getValue())},eventProcessors:{onChange:function(e,t){return n?(e.on("load",function(){var e=this._.checkbox.getElement();e.on("propertychange",function(t){t=t.data.$,t.propertyName=="checked"&&this.fire("change",{value:e.$.checked})},this)},this),this.on("change",t),null):p.onChange.apply(this,arguments)}},keyboardFocusable:!0},c,!0),l.dialog.radio.prototype=i.extend(new l.dialog.uiElement,{setValue:function(e,t){var n=this._.children,r;for(var i=0;i0?new u(t.$.forms[0].elements[0]):this.getElement()},submit:function(){return this.getInputElement().getParent().$.submit(),this},getAction:function(){return this.getInputElement().getParent().$.action},registerEvents:function(e){var t=/^on([A-Z]\w+)/,n,r=function(e,t,n,r){e.on("formLoaded",function(){e.getInputElement().on(n,r,e)})};for(var i in e){if(!(n=i.match(t)))continue;this.eventProcessors[i]?this.eventProcessors[i].call(this,this._.dialog,e[i]):r(this,this._.dialog,n[1].toLowerCase(),e[i])}return this},reset:function(){function p(){o.$.open(),t.isCustomDomain()&&(o.$.domain=document.domain);var e="";u.size&&(e=u.size-(n?7:0)),o.$.write(['
','","
",""].join("")),o.$.close();for(var r=0;r'+"');if(r.forceIFrame||r.css.length)n.push('');return n.push("
"),i},getHolderElement:function(){var n=this._.holder;if(!n){if(this.forceIFrame||this.css.length){var r=this.document.getById(this.id+"_frame"),s=r.getParent(),o=s.getAttribute("dir"),u=s.getParent().getAttribute("class"),a=s.getParent().getAttribute("lang"),f=r.getFrameDocument();t.iOS&&s.setStyles({overflow:"scroll","-webkit-overflow-scrolling":"touch"});var l=i.addFunction(i.bind(function(e){this.isLoaded=!0,this.onLoad&&this.onLoad()},this)),c=''+""+""+i.buildStyleHtml(this.css)+""+'
'+"";f.write(c);var h=f.getWindow();h.$.CKEDITOR=e,f.on("key"+(t.opera?"press":"down"),function(e){var t=this,n=e.data.getKeystroke(),r=t.document.getById(t.id).getAttribute("dir");if(t._.onKeyDown&&t._.onKeyDown(n)===!1){e.data.preventDefault();return}(n==27||n==(r=="rtl"?39:37))&&t.onEscape&&t.onEscape(n)===!1&&e.data.preventDefault()},this),n=f.getBody(),n.unselectable(),t.air&&i.callFunction(l)}else n=this.document.getById(this.id);this._.holder=n}return n},addBlock:function(e,t){var n=this;return t=n._.blocks[e]=t instanceof l.panel.block?t:new l.panel.block(n.getHolderElement(),t),n._.currentBlock||n.showBlock(e),t},getBlock:function(e){return this._.blocks[e]},showBlock:function(t){var r=this,s=r._.blocks,o=s[t],u=r._.currentBlock,a=!r.forceIFrame||n?r._.holder:r.document.getById(r.id+"_frame");return u&&(a.removeAttributes(u.attributes),u.hide()),r._.currentBlock=o,a.setAttributes(o.attributes),e.fire("ariaWidget",a),o._.focusIndex=-1,r._.onKeyDown=o.onKeyDown&&i.bind(o.onKeyDown,o),o.show(),o},destroy:function(){this.element&&this.element.remove()}},l.panel.block=i.createClass({$:function(e,t){var n=this;n.element=e.append(e.getDocument().createElement("div",{attributes:{tabIndex:-1,"class":"cke_panel_block",role:"presentation"},styles:{display:"none"}})),t&&i.extend(n,t),n.attributes.title||(n.attributes.title=n.attributes["aria-label"]),n.keys={},n._.focusIndex=-1,n.element.disableContextMenu()},_:{markItem:function(e){var n=this;if(e==-1)return;var r=n.element.getElementsByTag("a"),i=r.getItem(n._.focusIndex=e);(t.webkit||t.opera)&&i.getDocument().getWindow().focus(),i.focus(),n.onMark&&n.onMark(i)}},proto:{show:function(){this.element.setStyle("display","")},hide:function(){var e=this;(!e.onHide||e.onHide.call(e)!==!0)&&e.element.setStyle("display","none")},onKeyDown:function(e){var t=this,n=t.keys[e];switch(n){case"next":var r=t._.focusIndex,i=t.element.getElementsByTag("a"),s;while(s=i.getItem(++r))if(s.getAttribute("_cke_focus")&&s.$.offsetWidth){t._.focusIndex=r,s.focus();break}return!1;case"prev":r=t._.focusIndex,i=t.element.getElementsByTag("a");while(r>0&&(s=i.getItem(--r)))if(s.getAttribute("_cke_focus")&&s.$.offsetWidth){t._.focusIndex=r,s.focus();break}return!1;case"click":case"mouseup":return r=t._.focusIndex,s=r>=0&&t.element.getElementsByTag("a").getItem(r),s&&(s.$[n]?s.$[n]():s.$["on"+n]()),!1}return!0}}}),f.add("listblock",{requires:["panel"],onLoad:function(){l.panel.prototype.addListBlock=function(e,t){return this.addBlock(e,new l.listBlock(this.getHolderElement(),t))},l.listBlock=i.createClass({base:l.panel.block,$:function(e,t){var r=this;t=t||{};var i=t.attributes||(t.attributes={});(r.multiSelect=!!t.multiSelect)&&(i["aria-multiselectable"]=!0),!i.role&&(i.role="listbox"),r.base.apply(r,arguments);var s=r.keys;s[40]="next",s[9]="next",s[38]="prev",s[2228233]="prev",s[32]=n?"mouseup":"click",n&&(s[13]="mouseup"),r._.pendingHtml=[],r._.items={},r._.groups={}},_:{close:function(){this._.started&&(this._.pendingHtml.push(""),delete this._.started)},getClick:function(){return this._.click||(this._.click=i.addFunction(function(e){var t=this,n=!0;t.multiSelect?n=t.toggle(e):t.mark(e),t.onClick&&t.onClick(e,n)},this)),this._.click}},proto:{add:function(e,t,r){var s=this,o=s._.pendingHtml,u=i.getNextId();s._.started||(o.push(''),s._.started=1,s._.size=s._.size||0),s._.items[e]=u,o.push("',t||e," ")},startGroup:function(e){this._.close();var t=i.getNextId();this._.groups[e]=t,this._.pendingHtml.push('"+''+''+''+''+''+"
",a=s.append(u.createFromHtml(o,s.getDocument()));s.getCustomData("cke_hasshared")?a.hide():s.setCustomData("cke_hasshared",1),i=a.getChild([0,0,0,0]),!n.sharedSpaces&&(n.sharedSpaces={}),n.sharedSpaces[r]=i,n.on("focus",function(){for(var e=0,t,n=s.getChildren();t=n.getItem(e);e++)t.type==1&&!t.equals(a)&&t.hasClass("cke_shared")&&t.hide();a.show()}),n.on("destroy",function(){a.remove()})}return i}var r={};return{build:function(e,n){var i=e.name,o=e.element,a=e.elementMode;if(!o||a==0)return;a==1&&o.hide();var f=e.fire("themeSpace",{space:"top",html:""}).html,l=e.fire("themeSpace",{space:"contents",html:""}).html,c=e.fireOnce("themeSpace",{space:"bottom",html:""}).html,p=l&&e.config.height,d=e.config.tabIndex||e.element.getAttribute("tabindex")||0;l?isNaN(p)||(p+="px"):p="auto";var v="",g=e.config.width;g&&(isNaN(g)||(g+="px"),v+="width: "+g+";");var y=f&&s(e,"top"),w=s(e,"bottom");y&&(y.setHtml(f),f=""),w&&(w.setHtml(c),c="");var E="";r[e.skinClass]?E="":r[e.skinClass]=1;var S=u.createFromHtml(['"+''+e.lang.editor+" "+'"+E+" "+" "+" "].join(""));S.getChild([1,0,0,0,0]).unselectable(),S.getChild([1,0,0,0,2]).unselectable(),a==1?S.insertAfter(o):o.append(S),e.container=S,S.disableContextMenu(),e.on("contentDirChanged",function(t){var n=(e.lang.dir!=t.data?"add":"remove")+"Class";S.getChild(1)[n]("cke_mixed_dir_content");var r=this.sharedSpaces&&this.sharedSpaces[this.config.toolbarLocation];r&&r.getParent().getParent()[n]("cke_mixed_dir_content")}),e.fireOnce("themeLoaded"),e.fireOnce("uiReady")},buildDialog:function(e){var r=i.getNextNumber(),s=u.createFromHtml(['"+'
'+'
'+'
'+'
'+'
'+'
'+'
'+'
'+" "+"
",n?"":"","
"].join("").replace(/#/g,"_"+r).replace(/%/g,"cke_dialog_")),o=s.getChild([0,0,0,0,0]),a=o.getChild(0),f=o.getChild(1);if(n&&!t.ie6Compat){var l=t.isCustomDomain(),c="javascript:void(function(){"+encodeURIComponent("document.open();"+(l?'document.domain="'+document.domain+'";':"")+"document.close();")+"}())",p=u.createFromHtml('");p.appendTo(o.getParent())}return a.unselectable(),f.unselectable(),{element:s,parts:{dialog:s.getChild(0),title:a,close:f,tabs:o.getChild(2),contents:o.getChild([3,0,0,0]),footer:o.getChild([3,0,1,0])}}},destroy:function(e){var t=e.container,n=e.element;t&&(t.clearCustomData(),t.remove()),n&&(n.clearCustomData(),e.elementMode==1&&n.show(),delete e.element)}}}()),e.editor.prototype.getThemeSpace=function(t){var n="cke_"+t,r=this._[n]||(this._[n]=e.document.getById(n+"_"+this.name));return r},e.editor.prototype.resize=function(n,r,i,s){var o=this,u=o.container,a=e.document.getById("cke_contents_"+o.name),f=t.webkit&&o.document&&o.document.getWindow().$.frameElement,l=s?u.getChild(1):u;l.setSize("width",n,!0),f&&(f.style.width="1%");var c=i?0:(l.$.offsetHeight||0)-(a.$.clientHeight||0);a.setStyle("height",Math.max(r-c,0)+"px"),f&&(f.style.width="100%"),o.fire("resize")},e.editor.prototype.getResizable=function(t){return t?e.document.getById("cke_contents_"+this.name):this.container}}(),function(e){e.fn.bxSlider=function(t){function D(){P(t.startingSlide),t.mode=="horizontal"?(i.wrap('
').wrap('
').css({width:"999999px",position:"relative",left:"-"+T+"px"}),i.children().css({width:f,"float":"left",listStyle:"none"}),u=i.parent().parent(),o.addClass("pager")):t.mode=="vertical"?(i.wrap('
').wrap('
').css({height:"999999px",position:"relative",top:"-"+N+"px"}),i.children().css({listStyle:"none",height:S}),u=i.parent().parent(),o.addClass("pager")):t.mode=="fade"&&(i.wrap('
').wrap('
'),i.children().css({listStyle:"none",position:"absolute",top:0,left:0,zIndex:98}),u=i.parent().parent(),o.not(":eq("+x+")").fadeTo(0,0),o.eq(x).css("zIndex",99)),t.captions&&t.captionsSelector==null&&u.append('
')}function P(){if(t.mode=="horizontal"||t.mode=="vertical"){var n=Y(o,0,t.moveSlideQty,"backward");e.each(n,function(t){i.prepend(e(this))});var r=o.length+t.moveSlideQty-1,s=o.length-t.displaySlideQty,u=r-s,a=Y(o,0,u,"forward");t.infiniteLoop&&e.each(a,function(t){i.append(e(this))})}}function H(){t.nextImage!=""?(nextContent=t.nextImage,nextType="image"):(nextContent=t.nextText,nextType="text"),t.prevImage!=""?(prevContent=t.prevImage,prevType="image"):(prevContent=t.prevText,prevType="text"),z(nextType,nextContent,prevType,prevContent)}function B(){t.auto?t.infiniteLoop?t.autoDirection=="next"?d=setInterval(function(){r.goToNextSlide(!1)},t.pause):t.autoDirection=="prev"&&(d=setInterval(function(){r.goToPreviousSlide(!1)},t.pause)):t.autoDirection=="next"?d=setInterval(function(){x+=t.moveSlideQty,x>_&&(x%=o.length),r.goToSlide(x,!1)},t.pause):t.autoDirection=="prev"&&(d=setInterval(function(){x-=t.moveSlideQty,x<0&&(negativeOffset=x%o.length,negativeOffset==0?x=0:x=o.length+negativeOffset),r.goToSlide(x,!1)},t.pause)):t.ticker&&(t.tickerSpeed*=10,e(".pager",u).each(function(t){C+=e(this).width(),k+=e(this).height()}),t.tickerDirection=="prev"&&t.mode=="horizontal"?i.css("left","-"+(C+T)+"px"):t.tickerDirection=="prev"&&t.mode=="vertical"&&i.css("top","-"+(k+N)+"px"),t.mode=="horizontal"?(L=parseInt(i.css("left")),j(L,C,t.tickerSpeed)):t.mode=="vertical"&&(A=parseInt(i.css("top")),j(A,k,t.tickerSpeed)),t.tickerHover&&q())}function j(e,n,r){t.mode=="horizontal"?t.tickerDirection=="next"?i.animate({left:"-="+n+"px"},r,"linear",function(){i.css("left",e),j(e,C,t.tickerSpeed)}):t.tickerDirection=="prev"&&i.animate({left:"+="+n+"px"},r,"linear",function(){i.css("left",e),j(e,C,t.tickerSpeed)}):t.mode=="vertical"&&(t.tickerDirection=="next"?i.animate({top:"-="+n+"px"},r,"linear",function(){i.css("top",e),j(e,k,t.tickerSpeed)}):t.tickerDirection=="prev"&&i.animate({top:"+="+n+"px"},r,"linear",function(){i.css("top",e),j(e,k,t.tickerSpeed)}))}function F(){t.startImage!=""?(startContent=t.startImage,startType="image"):(startContent=t.startText,startType="text"),t.stopImage!=""?(stopContent=t.stopImage,stopType="image"):(stopContent=t.stopText,stopType="text"),V(startType,startContent,stopType,stopContent)}function I(){u.find(".bx-window").hover(function(){b&&r.stopShow(!1)},function(){b&&r.startShow(!1)})}function q(){i.hover(function(){b&&r.stopTicker(!1)},function(){b&&r.startTicker(!1)})}function R(){o.not(":eq("+x+")").fadeTo(t.speed,0).css("zIndex",98),o.eq(x).css("zIndex",99).fadeTo(t.speed,1,function(){O=!1,jQuery.browser.msie&&o.eq(x).get(0).style.removeAttribute("filter"),t.onAfterSlide(x,o.length,o.eq(x))})}function U(n){t.pagerType=="full"&&t.pager?(e("a",p).removeClass(t.pagerActiveClass),e("a",p).eq(n).addClass(t.pagerActiveClass)):t.pagerType=="short"&&t.pager&&e(".bx-pager-current",p).html(x+1)}function z(n,i,s,o){var a=e(' '),f=e(' ');n=="text"?a.html(i):a.html(' '),s=="text"?f.html(o):f.html(' '),t.prevSelector?e(t.prevSelector).append(f):u.append(f),t.nextSelector?e(t.nextSelector).append(a):u.append(a),a.click(function(){return r.goToNextSlide(),!1}),f.click(function(){return r.goToPreviousSlide(),!1})}function W(n){var i=o.length;t.moveSlideQty>1&&(o.length%t.moveSlideQty!=0?i=Math.ceil(o.length/t.moveSlideQty):i=o.length/t.moveSlideQty);var s="";if(t.buildPager)for(var a=0;a