From: Jason Woofenden Date: Thu, 4 Nov 2010 05:29:17 +0000 (-0400) Subject: vanilla ckeditor-3.1.1 X-Git-Tag: v3.1.1 X-Git-Url: https://jasonwoof.com/gitweb/?p=ckeditor.git;a=commitdiff_plain;h=c6e377a02b54abc07129d72b632763c727476a15 vanilla ckeditor-3.1.1 --- diff --git a/CHANGES.html b/CHANGES.html index 1045a38..ad47005 100644 --- a/CHANGES.html +++ b/CHANGES.html @@ -35,6 +35,80 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEditor Changelog

+ CKEditor 3.1.1

+

+ New features:

+ +

+ Fixed issues:

+ +

CKEditor 3.1

New features:

diff --git a/_samples/ajax.html b/_samples/ajax.html index 931f58b..0cd8ce8 100644 --- a/_samples/ajax.html +++ b/_samples/ajax.html @@ -29,12 +29,14 @@ function createEditor() // This sample may break here if the ckeditor_basic.js is used. In such case, the following code should be used instead: /* if ( editor.setData ) - editor.setData( html ); + editor.setData( html ); else - CKEDITOR.on( 'loaded', function() { - editor.setData( html ); - }); + CKEDITOR.on( 'loaded', function() + { + editor.setData( html ); + }); + } */ } diff --git a/_samples/php/advanced.php b/_samples/php/advanced.php index 98c2ba8..771cb0c 100644 --- a/_samples/php/advanced.php +++ b/_samples/php/advanced.php @@ -74,6 +74,7 @@ $config['skin'] = 'v2'; // Create second instance. echo $CKEditor->editor("editor2", $initialValue, $config); ?> +

diff --git a/_samples/php/events.php b/_samples/php/events.php index 583e05e..36f2be2 100644 --- a/_samples/php/events.php +++ b/_samples/php/events.php @@ -111,6 +111,7 @@ $events['instanceReady'] = 'function (evt) { // Create second instance. $CKEditor->editor("editor2", $initialValue, $config, $events); ?> +

diff --git a/_samples/ui_languages.html b/_samples/ui_languages.html index c610588..35fd52d 100644 --- a/_samples/ui_languages.html +++ b/_samples/ui_languages.html @@ -30,10 +30,9 @@ For licensing, see LICENSE.html or http://ckeditor.com/license


-
(You may see strange characters if your system doesn't support the selected language) diff --git a/_source/adapters/jquery.js b/_source/adapters/jquery.js index 314c8ed..e633758 100644 --- a/_source/adapters/jquery.js +++ b/_source/adapters/jquery.js @@ -183,10 +183,14 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Bind to submit event. $element.parents( 'form' ).submit( onSubmit ); + // Bind to form-pre-serialize from jQuery Forms plugin. + $element.parents( 'form' ).bind( 'form-pre-serialize', onSubmit ); + // Unbind when editor destroyed. $element.bind( 'destroy.ckeditor', function() { $element.parents( 'form' ).unbind( 'submit', onSubmit ); + $element.parents( 'form' ).unbind( 'form-pre-serialize', onSubmit ); }); } diff --git a/_source/core/_bootstrap.js b/_source/core/_bootstrap.js index 86e1fce..9b9d081 100644 --- a/_source/core/_bootstrap.js +++ b/_source/core/_bootstrap.js @@ -76,3 +76,9 @@ if ( CKEDITOR.env.ie ) } } */ + +/** + * Fired when a CKEDITOR core object is fully loaded and ready for interaction. + * @name CKEDITOR#loaded + * @event + */ diff --git a/_source/core/ckeditor.js b/_source/core/ckeditor.js index 5e03693..1faddd2 100644 --- a/_source/core/ckeditor.js +++ b/_source/core/ckeditor.js @@ -94,3 +94,10 @@ CKEDITOR.TRISTATE_OFF = 2; * @example */ CKEDITOR.TRISTATE_DISABLED = 0; + +/** + * Fired when the CKEDITOR.currentInstance object reference changes. This may + * happen when setting the focus on different editor instances in the page. + * @name CKEDITOR#currentInstance + * @event + */ diff --git a/_source/core/ckeditor_base.js b/_source/core/ckeditor_base.js index 6f0c782..1e42cc7 100644 --- a/_source/core/ckeditor_base.js +++ b/_source/core/ckeditor_base.js @@ -12,7 +12,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license // Must be updated on changes in the script, as well as updated in the // ckeditor_source.js and ckeditor_basic_source.js files. -// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.1',rev:'4891',_:{},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;})(); +// if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'',version:'3.1.1',rev:'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;})(); // #### Raw code // ATTENTION: read the above "Compressed Code" notes when changing this code. @@ -43,7 +43,7 @@ if ( !window.CKEDITOR ) // The production implementation contains a fixed timestamp, unique // for each release, generated by the releaser. // (Base 36 value of each component of YYMMDDHH - 4 chars total - e.g. 87bm == 08071122) - timestamp : 'A06B', + timestamp : 'A1QD', /** * Contains the CKEditor version number. @@ -51,7 +51,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.version ); // e.g. 'CKEditor 3.0 Beta' */ - version : '3.1', + version : '3.1.1', /** * Contains the CKEditor revision number. @@ -60,7 +60,7 @@ if ( !window.CKEDITOR ) * @example * alert( CKEDITOR.revision ); // e.g. '3975' */ - revision : '4891', + revision : '5205', /** * Private object used to hold core stuff. It should not be used out of diff --git a/_source/core/ckeditor_basic.js b/_source/core/ckeditor_basic.js index 177d7c5..4a9383b 100644 --- a/_source/core/ckeditor_basic.js +++ b/_source/core/ckeditor_basic.js @@ -136,7 +136,7 @@ if ( CKEDITOR.status == 'unloaded' ) return createInstance( elementOrId, config, CKEDITOR.editor.appendTo ); }; - /** + /* * @ignore * Documented at ckeditor.js. */ diff --git a/_source/core/command.js b/_source/core/command.js index bf5341c..0a8d098 100644 --- a/_source/core/command.js +++ b/_source/core/command.js @@ -12,7 +12,7 @@ CKEDITOR.command = function( editor, commandDefinition ) if ( this.state == CKEDITOR.TRISTATE_DISABLED ) return false; - if( this.editorFocus ) // Give editor focus if necessary (#4355). + if ( this.editorFocus ) // Give editor focus if necessary (#4355). editor.focus(); return ( commandDefinition.exec.call( this, editor, data ) !== false ); diff --git a/_source/core/config.js b/_source/core/config.js index f7a2ad7..cd71ffe 100644 --- a/_source/core/config.js +++ b/_source/core/config.js @@ -89,8 +89,8 @@ CKEDITOR.config = * The user interface language localization to use. If empty, the editor * automatically localize the editor to the user language, if supported, * otherwise the {@link CKEDITOR.config.defaultLanguage} language is used. - * @default true - * @type Boolean + * @default '' (empty) + * @type String * @example * // Load the German interface. * config.language = 'de'; @@ -167,14 +167,18 @@ CKEDITOR.config = docType : '', /** - * Sets the 'id' attribute to be used on body if it doesn't have one. + * Sets the "id" attribute to be used on the body element of the editing + * area. + * @since 3.1 * @type String * @default '' */ bodyId : '', /** - * Sets the 'class' attribute to be used on body if it doesn't have one. + * Sets the "class" attribute to be used on the body element of the editing + * area. + * @since 3.1 * @type String * @default '' */ @@ -185,6 +189,7 @@ CKEDITOR.config = * HTML page. A full page includes the <html>, <head> and * <body> tags. The final output will also reflect this setting, * including the <body> contents only if this setting is disabled. + * @since 3.1 * @type Boolean * @default false * @example diff --git a/_source/core/dataprocessor.js b/_source/core/dataprocessor.js new file mode 100644 index 0000000..cb8fcba --- /dev/null +++ b/_source/core/dataprocessor.js @@ -0,0 +1,66 @@ +/* +Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved. +For licensing, see LICENSE.html or http://ckeditor.com/license +*/ + +/** + * @fileOverview Defines the "virtual" {@link CKEDITOR.dataProcessor} class, which + * defines the basic structure of data processor objects to be + * set to {@link CKEDITOR.editor.dataProcessor}. + */ + +/** + * If defined, points to the data processor which is responsible to translate + * and transform the editor data on input and output. + * Generaly it will point to an instance of {@link CKEDITOR.htmlDataProcessor}, + * which handles HTML data. The editor may also handle other data formats by + * using different data processors provided by specific plugins. + * @name CKEDITOR.editor.dataProcessor + * @type CKEDITOR.dataProcessor + */ + +/** + * Represents a data processor, which is responsible to translate and transform + * the editor data on input and output. + * This class is not really part of the API. It's here for documentation + * purposes, and serves as the base ("interface") for data processors + * implementation. + * @name CKEDITOR.dataProcessor + * @contructor + * @example + */ + +/** + * Transforms input data into HTML to be loaded in the editor. + * While the editor is able to handle non HTML data (like BBCode), at runtime + * it can handle HTML data only. The role of the data processor is transforming + * the input data into HTML through this function. + * @name CKEDITOR.dataProcessor.prototype.toHtml + * @function + * @param {String} data The input data to be transformed. + * @param {String} [fixForBody] The tag name to be used if the data must be + * fixed because it is supposed to be loaded direcly into the <body> + * tag. This is generally not used by non-HTML data processors. + * @example + * // Tranforming BBCode data, having a custom BBCode data processor. + * var data = 'This is [b]an example[/b].'; + * var html = editor.dataProcessor.toHtml( data ); // '<p>This is <b>an example</b>.</p>' + */ + +/** + * Transforms HTML into data to be outputted by the editor, in the format + * expected by the data processor. + * While the editor is able to handle non HTML data (like BBCode), at runtime + * it can handle HTML data only. The role of the data processor is transforming + * the HTML data containined by the editor into a specific data format through + * this function. + * @name CKEDITOR.dataProcessor.prototype.toDataFormat + * @function + * @param {String} html The HTML to be transformed. + * @param {String} fixForBody The tag name to be used if the output data is + * coming from <body> and may be eventually fixed for it. This is + * generally not used by non-HTML data processors. + * // Tranforming into BBCode data, having a custom BBCode data processor. + * var html = '<p>This is <b>an example</b>.</p>'; + * var data = editor.dataProcessor.toDataFormat( html ); // 'This is [b]an example[/b].' + */ diff --git a/_source/core/dom/document.js b/_source/core/dom/document.js index e1026c1..bd8c18c 100644 --- a/_source/core/dom/document.js +++ b/_source/core/dom/document.js @@ -168,7 +168,6 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, head = new CKEDITOR.dom.element( head ); return ( - /** @ignore */ this.getHead = function() { return head; @@ -187,19 +186,21 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, var body = new CKEDITOR.dom.element( this.$.body ); return ( - /** @ignore */ this.getBody = function() { return body; })(); }, + /** + * Gets the DOM document element for this document. + * @returns {CKEDITOR.dom.element} The DOM document element. + */ getDocumentElement : function() { var documentElement = new CKEDITOR.dom.element( this.$.documentElement ); return ( - /** @ignore */ this.getDocumentElement = function() { return documentElement; @@ -209,14 +210,12 @@ CKEDITOR.tools.extend( CKEDITOR.dom.document.prototype, /** * Gets the window object that holds this document. * @returns {CKEDITOR.dom.window} The window object. - * @example */ getWindow : function() { var win = new CKEDITOR.dom.window( this.$.parentWindow || this.$.defaultView ); return ( - /** @ignore */ this.getWindow = function() { return win; diff --git a/_source/core/dom/domobject.js b/_source/core/dom/domobject.js index c0c6e63..6962fdb 100644 --- a/_source/core/dom/domobject.js +++ b/_source/core/dom/domobject.js @@ -181,6 +181,9 @@ CKEDITOR.dom.domObject.prototype = (function() return dataSlot && dataSlot[ key ]; }; + /** + * @name CKEDITOR.dom.domObject.prototype.removeCustomData + */ domObjectProto.removeCustomData = function( key ) { var expandoNumber = this.$._cke_expando, @@ -193,6 +196,9 @@ CKEDITOR.dom.domObject.prototype = (function() return retval || null; }; + /** + * @name CKEDITOR.dom.domObject.prototype.getCustomData + */ domObjectProto.getUniqueId = function() { return this.$._cke_expando || ( this.$._cke_expando = CKEDITOR.tools.getNextNumber() ); diff --git a/_source/core/dom/element.js b/_source/core/dom/element.js index 3b33e47..512397e 100644 --- a/_source/core/dom/element.js +++ b/_source/core/dom/element.js @@ -243,10 +243,13 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, lastChild = lastChild.getPrevious(); if ( !lastChild || !lastChild.is || !lastChild.is( 'br' ) ) { - this.append( - CKEDITOR.env.opera ? + var bogus = CKEDITOR.env.opera ? this.getDocument().createText('') : - this.getDocument().createElement( 'br' ) ); + this.getDocument().createElement( 'br' ); + + CKEDITOR.env.gecko && bogus.setAttribute( 'type', '_moz' ); + + this.append( bogus ); } }, @@ -618,7 +621,6 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, } return ( - /** @ignore */ this.getName = function() { return nodeName; @@ -1346,7 +1348,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.element.prototype, if ( attrName in skipAttributes ) continue; - if( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) + if ( attrName == 'checked' && ( attrValue = this.getAttribute( attrName ) ) ) dest.setAttribute( attrName, attrValue ); // IE BUG: value attribute is never specified even if it exists. else if ( attribute.specified || diff --git a/_source/core/dom/node.js b/_source/core/dom/node.js index 6f25ec1..a4188dc 100644 --- a/_source/core/dom/node.js +++ b/_source/core/dom/node.js @@ -194,27 +194,30 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, var parentNode = node.parentNode; var currentIndex = -1; - for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) + if ( parentNode ) { - var candidate = parentNode.childNodes[i]; - - if ( normalized && - candidate.nodeType == 3 && - candidate.previousSibling && - candidate.previousSibling.nodeType == 3 ) + for ( var i = 0 ; i < parentNode.childNodes.length ; i++ ) { - continue; - } + var candidate = parentNode.childNodes[i]; + + if ( normalized && + candidate.nodeType == 3 && + candidate.previousSibling && + candidate.previousSibling.nodeType == 3 ) + { + continue; + } - currentIndex++; + currentIndex++; - if ( candidate == node ) - break; - } + if ( candidate == node ) + break; + } - address.unshift( currentIndex ); + address.unshift( currentIndex ); + } - node = node.parentNode; + node = parentNode; } return address; @@ -232,7 +235,6 @@ CKEDITOR.tools.extend( CKEDITOR.dom.node.prototype, var document = new CKEDITOR.dom.document( this.$.ownerDocument || this.$.parentNode.ownerDocument ); return ( - /** @ignore */ this.getDocument = function() { return document; diff --git a/_source/core/dom/range.js b/_source/core/dom/range.js index 264ee4e..8d30b4f 100644 --- a/_source/core/dom/range.js +++ b/_source/core/dom/range.js @@ -133,7 +133,7 @@ CKEDITOR.dom.range = function( document ) currentNode = levelStartNode.getNext(); - while( currentNode ) + while ( currentNode ) { // Stop processing when the current node matches a node in the // endParents tree or if it is the endNode. @@ -180,7 +180,7 @@ CKEDITOR.dom.range = function( document ) { currentNode = levelStartNode.getPrevious(); - while( currentNode ) + while ( currentNode ) { // Stop processing when the current node matches a node in the // startParents tree or if it is the startNode. @@ -252,10 +252,10 @@ CKEDITOR.dom.range = function( document ) } // Cleanup any marked node. - if( removeStartNode ) + if ( removeStartNode ) startNode.remove(); - if( removeEndNode && endNode.$.parentNode ) + if ( removeEndNode && endNode.$.parentNode ) endNode.remove(); }; @@ -278,7 +278,7 @@ CKEDITOR.dom.range = function( document ) if ( CKEDITOR.tools.trim( node.getText() ).length ) return false; } - else if( node.type == CKEDITOR.NODE_ELEMENT ) + else if ( node.type == CKEDITOR.NODE_ELEMENT ) { // If there are non-empty inline elements (e.g. ), then we're not // at the start. @@ -742,15 +742,21 @@ CKEDITOR.dom.range = function( document ) startOffset = startContainer.getIndex() + 1; startContainer = startContainer.getParent(); - // Check if it is necessary to update the end boundary. - if ( !collapsed && this.startContainer.equals( this.endContainer ) ) + + // Check all necessity of updating the end boundary. + if ( this.startContainer.equals( this.endContainer ) ) this.setEnd( nextText, this.endOffset - this.startOffset ); + else if ( startContainer.equals( this.endContainer ) ) + this.endOffset += 1; } this.setStart( startContainer, startOffset ); if ( collapsed ) + { this.collapse( true ); + return; + } } var endContainer = this.endContainer; diff --git a/_source/core/dom/window.js b/_source/core/dom/window.js index 1a4050d..01e2d58 100644 --- a/_source/core/dom/window.js +++ b/_source/core/dom/window.js @@ -36,7 +36,7 @@ CKEDITOR.tools.extend( CKEDITOR.dom.window.prototype, focus : function() { // Webkit is sometimes failed to focus iframe, blur it first(#3835). - if( CKEDITOR.env.webkit && this.$.parent ) + if ( CKEDITOR.env.webkit && this.$.parent ) this.$.parent.focus(); this.$.focus(); }, diff --git a/_source/core/editor.js b/_source/core/editor.js index c065301..5a80fe8 100644 --- a/_source/core/editor.js +++ b/_source/core/editor.js @@ -575,19 +575,21 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, }, /** - * Sets the editor data. The data must be provided in raw format (HTML). - * Note: This's an asynchronous method, the {@param callback} - * function should be relied on if you want to interact with the editor - * after data is fully loaded. - * - * @param {String} data HTML code to replace the curent content in the editor. - * @param {Function} callback Function to be called after the setData is completed. + * Sets the editor data. The data must be provided in raw format (HTML).
+ *
+ * Note that this menthod is asynchronous. The "callback" parameter must + * be used if interaction with the editor is needed after setting the data. + * @param {String} data HTML code to replace the curent content in the + * editor. + * @param {Function} callback Function to be called after the setData + * is completed. * @example - * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); - * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() - * { - * CKEDITOR.instances.editor1.checkDirty(); // true - * } ); + * CKEDITOR.instances.editor1.setData( '<p>This is the editor data.</p>' ); + * @example + * CKEDITOR.instances.editor1.setData( '<p>Some other editor data.</p>', function() + * { + * this.checkDirty(); // true + * }); */ setData : function( data , callback ) { @@ -599,6 +601,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, callback.call( evt.editor ); } ); } + // Fire "setData" so data manipulation may happen. var eventData = { dataValue : data }; this.fire( 'setData', eventData ); @@ -658,7 +661,7 @@ CKEDITOR.tools.extend( CKEDITOR.editor.prototype, { var data = this.getData(); - if( this.config.htmlEncodeOutput ) + if ( this.config.htmlEncodeOutput ) data = CKEDITOR.tools.htmlEncode( data ); if ( element.is( 'textarea' ) ) @@ -685,8 +688,31 @@ CKEDITOR.on( 'loaded', function() /** * Whether escape HTML when editor update original input element. * @name CKEDITOR.config.htmlEncodeOutput - * @type {Boolean} + * @since 3.1 + * @type Boolean * @default false * @example * config.htmlEncodeOutput = true; */ + +/** + * Fired when a CKEDITOR instance is created, but still before initializing it. + * To interact with a fully initialized instance, use the + * {@link CKEDITOR#instanceReady} event instead. + * @name CKEDITOR#instanceCreated + * @event + * @param {CKEDITOR.editor} editor The editor instance that has been created. + */ + +/** + * Fired when a CKEDITOR instance is destroyed. + * @name CKEDITOR#instanceDestroyed + * @event + * @param {CKEDITOR.editor} editor The editor instance that has been destroyed. + */ + +/** + * Fired when all plugins are loaded and initialized into the editor instance. + * @name CKEDITOR#pluginsLoaded + * @event + */ diff --git a/_source/core/editor_basic.js b/_source/core/editor_basic.js index 116e680..3c4c5e3 100644 --- a/_source/core/editor_basic.js +++ b/_source/core/editor_basic.js @@ -136,7 +136,7 @@ if ( !CKEDITOR.editor ) { element = document.getElementById( elementOrId ); - if( !element ) + if ( !element ) throw '[CKEDITOR.editor.appendTo] The element with id "' + elementOrId + '" was not found.'; } diff --git a/_source/core/event.js b/_source/core/event.js index 306e8fc..8668a3d 100644 --- a/_source/core/event.js +++ b/_source/core/event.js @@ -77,7 +77,8 @@ if ( !CKEDITOR.event ) * Registers a listener to a specific event in the current object. * @param {String} eventName The event name to which listen. * @param {Function} listenerFunction The function listening to the - * event. + * event. A single {@link CKEDITOR.eventInfo} object instanced + * is passed to this function containing all the event data. * @param {Object} [scopeObj] The object used to scope the listener * call (the this object. If omitted, the current object is used. * @param {Object} [listenerData] Data to be sent as the diff --git a/_source/core/focusmanager.js b/_source/core/focusmanager.js index cf4e50f..749de6d 100644 --- a/_source/core/focusmanager.js +++ b/_source/core/focusmanager.js @@ -121,3 +121,17 @@ CKEDITOR.focusManager.prototype = } } }; + +/** + * Fired when the editor instance receives the input focus. + * @name CKEDITOR.editor#focus + * @event + * @param {CKEDITOR.editor} editor The editor instance. + */ + +/** + * Fired when the editor instance loses the input focus. + * @name CKEDITOR.editor#blur + * @event + * @param {CKEDITOR.editor} editor The editor instance. + */ diff --git a/_source/core/htmlparser.js b/_source/core/htmlparser.js index a225792..ac1420d 100644 --- a/_source/core/htmlparser.js +++ b/_source/core/htmlparser.js @@ -201,7 +201,7 @@ CKEDITOR.htmlParser = function() } // Comment - if( ( tagName = parts[ 2 ] ) ) + if ( ( tagName = parts[ 2 ] ) ) this.onComment( tagName ); } diff --git a/_source/core/htmlparser/basicwriter.js b/_source/core/htmlparser/basicwriter.js index c2468ec..5d67891 100644 --- a/_source/core/htmlparser/basicwriter.js +++ b/_source/core/htmlparser/basicwriter.js @@ -60,6 +60,10 @@ CKEDITOR.htmlParser.basicWriter = CKEDITOR.tools.createClass( */ attribute : function( attName, attValue ) { + // Browsers don't always escape quote in attribute values. (#4683) + if ( typeof attValue == 'string' ) + attValue = attValue.replace( /"/g, '"' ); + this._.output.push( ' ', attName, '="', attValue, '"' ); }, diff --git a/_source/core/htmlparser/element.js b/_source/core/htmlparser/element.js index 2e9a9c3..69bacda 100644 --- a/_source/core/htmlparser/element.js +++ b/_source/core/htmlparser/element.js @@ -114,7 +114,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) */ element.filterChildren = function() { - if( !isChildrenFiltered ) + if ( !isChildrenFiltered ) { var writer = new CKEDITOR.htmlParser.basicWriter(); CKEDITOR.htmlParser.fragment.prototype.writeChildrenHtml.call( element, writer, filter ); @@ -171,13 +171,13 @@ CKEDITOR.htmlParser.element = function( name, attributes ) var attribsArray = []; // Iterate over the attributes twice since filters may alter // other attributes. - for( var i = 0 ; i < 2; i++ ) + for ( var i = 0 ; i < 2; i++ ) { for ( a in attributes ) { newAttrName = a; value = attributes[ a ]; - if( i == 1 ) + if ( i == 1 ) attribsArray.push( [ a, value ] ); else if ( filter ) { @@ -188,7 +188,7 @@ CKEDITOR.htmlParser.element = function( name, attributes ) delete attributes[ a ]; break; } - else if( newAttrName != a ) + else if ( newAttrName != a ) { delete attributes[ a ]; a = newAttrName; @@ -197,9 +197,9 @@ CKEDITOR.htmlParser.element = function( name, attributes ) else break; } - if( newAttrName ) + if ( newAttrName ) { - if( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) + if ( ( value = filter.onAttribute( element, newAttrName, value ) ) === false ) delete attributes[ newAttrName ]; else attributes [ newAttrName ] = value; diff --git a/_source/core/htmlparser/filter.js b/_source/core/htmlparser/filter.js index cbe4bed..1699eb2 100644 --- a/_source/core/htmlparser/filter.js +++ b/_source/core/htmlparser/filter.js @@ -150,7 +150,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license function addItemsToList( list, items, priority ) { - if( typeof items == 'function' ) + if ( typeof items == 'function' ) items = [ items ]; var i, j, diff --git a/_source/core/htmlparser/fragment.js b/_source/core/htmlparser/fragment.js index 6c7686c..ad1c93e 100644 --- a/_source/core/htmlparser/fragment.js +++ b/_source/core/htmlparser/fragment.js @@ -64,6 +64,7 @@ CKEDITOR.htmlParser.fragment = function() html = [], fragment = new CKEDITOR.htmlParser.fragment(), pendingInline = [], + pendingBRs = [], currentNode = fragment, // Indicate we're inside a

 element, spaces should be touched differently.
 			inPre = false,
@@ -71,6 +72,8 @@ CKEDITOR.htmlParser.fragment = function()
 
 		function checkPending( newTagName )
 		{
+			var pendingBRsSent;
+
 			if ( pendingInline.length > 0 )
 			{
 				for ( var i = 0 ; i < pendingInline.length ; i++ )
@@ -82,6 +85,12 @@ CKEDITOR.htmlParser.fragment = function()
 
 					if ( ( !currentDtd || currentDtd[ pendingName ] ) && ( !newTagName || !pendingDtd || pendingDtd[ newTagName ] || !CKEDITOR.dtd[ newTagName ] ) )
 					{
+						if ( !pendingBRsSent )
+						{
+							sendPendingBRs();
+							pendingBRsSent = 1;
+						}
+
 						// Get a clone for the pending element.
 						pendingElement = pendingElement.clone();
 
@@ -99,6 +108,12 @@ CKEDITOR.htmlParser.fragment = function()
 			}
 		}
 
+		function sendPendingBRs()
+		{
+			while ( pendingBRs.length )
+				currentNode.add( pendingBRs.shift() );
+		}
+
 		function addElement( element, target, enforceCurrent )
 		{
 			target = target || currentNode || fragment;
@@ -181,6 +196,12 @@ CKEDITOR.htmlParser.fragment = function()
 				return;
 			}
 
+			if ( tagName == 'br' )
+			{
+				pendingBRs.push( element );
+				return;
+			}
+
 			var currentName = currentNode.name;
 
 			var currentDtd = currentName
@@ -196,7 +217,7 @@ CKEDITOR.htmlParser.fragment = function()
 					addPoint;   // New position to start adding nodes.
 
 				// Fixing malformed nested lists by moving it into a previous list item. (#3828)
-				if( tagName in listBlocks
+				if ( tagName in listBlocks
 					&& currentName in listBlocks )
 				{
 					var children = currentNode.children,
@@ -239,7 +260,7 @@ CKEDITOR.htmlParser.fragment = function()
 					reApply = true;
 				}
 
-				if( addPoint )
+				if ( addPoint )
 					currentNode = addPoint;
 				// Try adding it to the return point, or the parent element.
 				else
@@ -308,9 +329,12 @@ CKEDITOR.htmlParser.fragment = function()
 
 				currentNode = candidate;
 
-				if( currentNode.name == 'pre' )
+				if ( currentNode.name == 'pre' )
 					inPre = false;
 
+				if ( candidate._.isBlockLike )
+					sendPendingBRs();
+
 				addElement( candidate, candidate.parent );
 
 				// The parent should start receiving new nodes now, except if
@@ -321,7 +345,7 @@ CKEDITOR.htmlParser.fragment = function()
 				pendingInline = pendingInline.concat( newPendingInline );
 			}
 
-			if( tagName == 'body' )
+			if ( tagName == 'body' )
 				fixForBody = false;
 		};
 
@@ -336,6 +360,7 @@ CKEDITOR.htmlParser.fragment = function()
 					return;
 			}
 
+			sendPendingBRs();
 			checkPending();
 
 			if ( fixForBody
@@ -366,6 +391,8 @@ CKEDITOR.htmlParser.fragment = function()
 		// Parse it.
 		parser.parse( fragmentHtml );
 
+		sendPendingBRs();
+
 		// Close all pending nodes.
 		while ( currentNode.type )
 		{
diff --git a/_source/core/lang.js b/_source/core/lang.js
index d24fa1a..add9982 100644
--- a/_source/core/lang.js
+++ b/_source/core/lang.js
@@ -24,12 +24,13 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 			'bs'	: 1,
 			'ca'	: 1,
 			'cs'	: 1,
+			'cy'	: 1,
 			'da'	: 1,
 			'de'	: 1,
 			'el'	: 1,
 			'en-au'	: 1,
 			'en-ca'	: 1,
-			'en-uk'	: 1,
+			'en-gb'	: 1,
 			'en'	: 1,
 			'eo'	: 1,
 			'es'	: 1,
diff --git a/_source/core/loader.js b/_source/core/loader.js
index 92648a0..ccc9701 100644
--- a/_source/core/loader.js
+++ b/_source/core/loader.js
@@ -107,7 +107,7 @@ if ( !CKEDITOR.loader )
 			return path;
 		})();
 
-		var timestamp = 'A06B';
+		var timestamp = 'A1QD';
 
 		var getUrl = function( resource )
 		{
@@ -156,8 +156,8 @@ if ( !CKEDITOR.loader )
 
 				// We must guarantee the execution order of the scripts, so we
 				// need to load them one by one. (#4145)
-				// The followin if/else block has been taken from the scriptloader core code.
-				if ( CKEDITOR.env.ie )
+				// The following if/else block has been taken from the scriptloader core code.
+				if ( typeof(script.onreadystatechange) !== "undefined" )
 				{
 					/** @ignore */
 					script.onreadystatechange = function()
@@ -185,7 +185,7 @@ if ( !CKEDITOR.loader )
 
 			/**
 			 * Loads a specific script, including its dependencies. This is not a
-			 * synchronous loading, which means that the code the be loaded will
+			 * synchronous loading, which means that the code to be loaded will
 			 * not necessarily be available after this call.
 			 * @example
 			 * CKEDITOR.loader.load( 'core/dom/element' );
@@ -212,7 +212,10 @@ if ( !CKEDITOR.loader )
 				var scriptSrc = getUrl( '_source/' + scriptName + '.js' );
 
 				// Append the ';
 
@@ -416,7 +417,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 
 						// IE standard compliant in editing frame doesn't focus the editor when
 						// clicking outside actual content, manually apply the focus. (#1659)
-						if( CKEDITOR.env.ie
+						if ( CKEDITOR.env.ie
 							&& domDocument.$.compatMode == 'CSS1Compat' )
 						{
 							var htmlElement = domDocument.getDocumentElement();
@@ -445,10 +446,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 								if ( CKEDITOR.env.gecko )
 								{
 									var first = body;
-									while( first.firstChild )
+									while ( first.firstChild )
 										first = first.firstChild;
 
-									if( !first.nextSibling
+									if ( !first.nextSibling
 										&& ( 'BR' == first.tagName )
 										&& first.hasAttribute( '_moz_editor_bogus_node' ) )
 									{
@@ -475,31 +476,45 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 
 						if ( CKEDITOR.env.ie )
 						{
-							// Cancel default action for backspace in IE on control types. (#4047)
+							// Override keystrokes which should have deletion behavior
+							//  on control types in IE . (#4047)
 							domDocument.on( 'keydown', function( evt )
 							{
-								// Backspace.
-								var control = evt.data.getKeystroke() == 8
-											  && editor.getSelection().getSelectedElement();
-								if ( control )
+								var keyCode = evt.data.getKeystroke();
+
+								// Backspace OR Delete.
+								if ( keyCode in { 8 : 1, 46 : 1 } )
 								{
-									// Make undo snapshot.
-									editor.fire( 'saveSnapshot' );
-									// Remove manually.
-									control.remove();
-									editor.fire( 'saveSnapshot' );
-									evt.cancel();
+									var sel = editor.getSelection(),
+										control = sel.getSelectedElement();
+
+									if ( control )
+									{
+										// Make undo snapshot.
+										editor.fire( 'saveSnapshot' );
+
+										// Delete any element that 'hasLayout' (e.g. hr,table) in IE8 will
+										// break up the selection, safely manage it here. (#4795)
+										var bookmark = sel.getRanges()[ 0 ].createBookmark();
+										// Remove the control manually.
+										control.remove();
+										sel.selectBookmarks( [ bookmark ] );
+
+										editor.fire( 'saveSnapshot' );
+
+										evt.data.preventDefault();
+									}
 								}
 							} );
 
 							// PageUp/PageDown scrolling is broken in document
 							// with standard doctype, manually fix it. (#4736)
-							if( domDocument.$.compatMode == 'CSS1Compat' )
+							if ( domDocument.$.compatMode == 'CSS1Compat' )
 							{
 								var pageUpDownKeys = { 33 : 1, 34 : 1 };
 								domDocument.on( 'keydown', function( evt )
 								{
-									if( evt.data.getKeystroke() in pageUpDownKeys )
+									if ( evt.data.getKeystroke() in pageUpDownKeys )
 									{
 										setTimeout( function ()
 										{
@@ -745,7 +760,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 				});
 
 			// Create an invisible element to grab focus.
-			if( CKEDITOR.env.ie )
+			if ( CKEDITOR.env.ie )
 			{
 				var ieFocusGrabber;
 				editor.on( 'uiReady', function()
@@ -763,30 +778,28 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	});
 
 	// Fixing Firefox 'Back-Forward Cache' break design mode. (#4514)
-	if( CKEDITOR.env.gecko )
+	if ( CKEDITOR.env.gecko )
 	{
-		var topWin = window.top;
-
 		( function ()
 		{
-			var topBody = topWin.document.body;
+			var body = document.body;
 
-			if( !topBody )
-				topWin.addEventListener( 'load', arguments.callee, false );
+			if ( !body )
+				window.addEventListener( 'load', arguments.callee, false );
 			else
 			{
-				topBody.setAttribute( 'onpageshow', topBody.getAttribute( 'onpageshow' )
+				body.setAttribute( 'onpageshow', body.getAttribute( 'onpageshow' )
 						+ ';event.persisted && CKEDITOR.tools.callFunction(' +
 						CKEDITOR.tools.addFunction( function()
 						{
 							var allInstances = CKEDITOR.instances,
 								editor,
 								doc;
-							for( var i in allInstances )
+							for ( var i in allInstances )
 							{
 								editor = allInstances[ i ];
 								doc = editor.document;
-								if( doc )
+								if ( doc )
 								{
 									doc.$.designMode = 'off';
 									doc.$.designMode = 'on';
@@ -845,3 +858,9 @@ CKEDITOR.config.disableNativeSpellChecker = true;
  * config.ignoreEmptyParagraph = false;
  */
 CKEDITOR.config.ignoreEmptyParagraph = true;
+
+/**
+ * Fired when data is loaded and ready for retrieval in an editor instance.
+ * @name CKEDITOR.editor#dataReady
+ * @event
+ */
diff --git a/_source/skins/kama/dialog.css b/_source/skins/kama/dialog.css
index 11bb306..8cb25cc 100644
--- a/_source/skins/kama/dialog.css
+++ b/_source/skins/kama/dialog.css
@@ -332,7 +332,7 @@ body .cke_dialog
 }
 .cke_skin_kama .cke_browser_webkit a.cke_dialog_ui_button
 {
-	float: right;
+	display:inline-block;
 	padding-top: 3px;
 	padding-bottom: 2px;
 	margin: 2px 0;
diff --git a/_source/skins/kama/menu.css b/_source/skins/kama/menu.css
index cd7808b..9f5445c 100644
--- a/_source/skins/kama/menu.css
+++ b/_source/skins/kama/menu.css
@@ -94,8 +94,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	height:19px;
 	margin-left: 24px;
 	background-color: #fff;
-	_overflow: hidden;
-	_width: 80px;
+}
+/* Set these after the document has been loaded and we know the dimensions*/
+.cke_skin_kama .cke_frameLoaded .cke_menuitem .cke_label
+{
 	filter: alpha(opacity=70); /* IE */
 	opacity: 0.70; /* Safari, Opera and Mozilla */
 }
@@ -164,6 +166,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	background-repeat: no-repeat;
 }
 
+.cke_skin_kama .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_kama .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_kama .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_kama .cke_menuarrow
 {
diff --git a/_source/skins/kama/skin.js b/_source/skins/kama/skin.js
index 55a97dc..fe8923b 100644
--- a/_source/skins/kama/skin.js
+++ b/_source/skins/kama/skin.js
@@ -93,7 +93,7 @@ CKEDITOR.skins.add( 'kama', (function()
 			function getStylesheet( document )
 			{
 				var node = document.getById( uiColorStylesheetId );
-				if( !node )
+				if ( !node )
 				{
 					node = document.getHead().append( 'style' );
 					node.setAttribute( "id", uiColorStylesheetId );
diff --git a/_source/skins/office2003/menu.css b/_source/skins/office2003/menu.css
index d5d6a20..b3f2e6b 100644
--- a/_source/skins/office2003/menu.css
+++ b/_source/skins/office2003/menu.css
@@ -93,8 +93,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	height:19px;
 	margin-left: 24px;
 	background-color: #fff;
-	_overflow: hidden;
-	_width: 80px;
+}
+/* Set these after the document has been loaded and we know the dimensions*/
+.cke_skin_office2003 .cke_frameLoaded .cke_menuitem .cke_label
+{
 	filter: alpha(opacity=70); /* IE */
 	opacity: 0.70; /* Safari, Opera and Mozilla */
 }
@@ -160,6 +162,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	background-position: 0 -1050px;
 }
 
+.cke_skin_office2003 .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_office2003 .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_office2003 .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_office2003 .cke_menuarrow
 {
diff --git a/_source/skins/office2003/toolbar.css b/_source/skins/office2003/toolbar.css
index 4a1e97b..3d40a91 100644
--- a/_source/skins/office2003/toolbar.css
+++ b/_source/skins/office2003/toolbar.css
@@ -65,6 +65,8 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	background-repeat: repeat-x;
 	display: inline-block;
 	float: left;
+	!height: 28px;
+	!line-height: 28px;
 }
 
 .cke_skin_office2003 .cke_rtl .cke_toolbar
diff --git a/_source/skins/v2/menu.css b/_source/skins/v2/menu.css
index a1a6d13..e4eae02 100644
--- a/_source/skins/v2/menu.css
+++ b/_source/skins/v2/menu.css
@@ -93,8 +93,10 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	height:19px;
 	margin-left: 24px;
 	background-color: #fff;
-	_overflow: hidden;
-	_width: 80px;
+}
+/* Set these after the document has been loaded and we know the dimensions*/
+.cke_skin_v2 .cke_frameLoaded .cke_menuitem .cke_label
+{
 	filter: alpha(opacity=70); /* IE */
 	opacity: 0.70; /* Safari, Opera and Mozilla */
 }
@@ -163,6 +165,22 @@ For licensing, see LICENSE.html or http://ckeditor.com/license
 	background-position: 0 -763px;
 }
 
+.cke_skin_v2 .cke_menuarrow span
+{
+	display: none;
+}
+
+.cke_hc .cke_skin_v2 .cke_menuarrow
+{
+	width: auto;
+	margin-top: 0;
+}
+
+.cke_hc .cke_skin_v2 .cke_menuarrow span
+{
+	display: inline;
+}
+
 /* #3766 In the context menu, long labels with second level menu get wrapped */
 .cke_browser_ie.cke_ltr .cke_skin_v2 .cke_menuarrow
 {
diff --git a/_source/skins/v2/richcombo.css b/_source/skins/v2/richcombo.css
index 4f439bb..e77ba68 100644
--- a/_source/skins/v2/richcombo.css
+++ b/_source/skins/v2/richcombo.css
@@ -272,3 +272,8 @@
 {
 	float: none;
 }
+
+.cke_skin_v2 .cke_browser_iequirks .cke_rcombo .cke_openbutton
+{
+	height: 22px;
+}
diff --git a/adapters/jquery.js b/adapters/jquery.js
index 520525d..a70f6b3 100644
--- a/adapters/jquery.js
+++ b/adapters/jquery.js
@@ -3,4 +3,4 @@ Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
 */
 
-(function(){CKEDITOR.config.jqueryOverrideVal=typeof CKEDITOR.config.jqueryOverrideVal=='undefined'?true:CKEDITOR.config.jqueryOverrideVal;var a=window.jQuery;if(typeof a=='undefined')return;a.extend(a.fn,{ckeditorGet:function(){var b=this.eq(0).data('ckeditorInstance');if(!b)throw 'CKEditor not yet initialized, use ckeditor() with callback.';return b;},ckeditor:function(b,c){if(!a.isFunction(b)){var d=c;c=b;b=d;}c=c||{};this.filter('textarea, div, p').each(function(){var e=a(this),f=e.data('ckeditorInstance'),g=e.data('_ckeditorInstanceLock'),h=this;if(f&&!g){if(b)b.apply(f,[this]);}else if(!g){if(c.autoUpdateElement||typeof c.autoUpdateElement=='undefined'&&CKEDITOR.config.autoUpdateElement)c.autoUpdateElementJquery=true;c.autoUpdateElement=false;e.data('_ckeditorInstanceLock',true);f=CKEDITOR.replace(h,c);e.data('ckeditorInstance',f);f.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}i.removeListener('instanceReady',this.callee);j.on('dataReady',function(){e.trigger('setData.ckeditor',[j]);});j.on('getData',function(l){e.trigger('getData.ckeditor',[j,l.data]);},999);j.on('destroy',function(){e.trigger('destroy.ckeditor',[j]);});if(j.config.autoUpdateElementJquery&&e.is('textarea')&&e.parents('form').length){var k=function(){e.ckeditor(function(){j.updateElement();});};e.parents('form').submit(k);e.bind('destroy.ckeditor',function(){e.parents('form').unbind('submit',k);});}j.on('destroy',function(){e.data('ckeditorInstance',null);});e.data('_ckeditorInstanceLock',null);e.trigger('instanceReady.ckeditor',[j]);if(b)b.apply(j,[h]);},0);},null,null,9999);}else CKEDITOR.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}if(j.element.$==h)if(b)b.apply(j,[h]);},0);},null,null,9999);});return this;}});if(CKEDITOR.config.jqueryOverrideVal)a.fn.val=CKEDITOR.tools.override(a.fn.val,function(b){return function(c,d){var e=typeof c!='undefined',f;this.each(function(){var g=a(this),h=g.data('ckeditorInstance');if(!d&&g.is('textarea')&&h){if(e)h.setData(c);else{f=h.getData();return null;}}else if(e)b.call(g,c);else{f=b.call(g);return null;}return true;});return e?this:f;};});})();
+(function(){CKEDITOR.config.jqueryOverrideVal=typeof CKEDITOR.config.jqueryOverrideVal=='undefined'?true:CKEDITOR.config.jqueryOverrideVal;var a=window.jQuery;if(typeof a=='undefined')return;a.extend(a.fn,{ckeditorGet:function(){var b=this.eq(0).data('ckeditorInstance');if(!b)throw 'CKEditor not yet initialized, use ckeditor() with callback.';return b;},ckeditor:function(b,c){if(!a.isFunction(b)){var d=c;c=b;b=d;}c=c||{};this.filter('textarea, div, p').each(function(){var e=a(this),f=e.data('ckeditorInstance'),g=e.data('_ckeditorInstanceLock'),h=this;if(f&&!g){if(b)b.apply(f,[this]);}else if(!g){if(c.autoUpdateElement||typeof c.autoUpdateElement=='undefined'&&CKEDITOR.config.autoUpdateElement)c.autoUpdateElementJquery=true;c.autoUpdateElement=false;e.data('_ckeditorInstanceLock',true);f=CKEDITOR.replace(h,c);e.data('ckeditorInstance',f);f.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}i.removeListener('instanceReady',this.callee);j.on('dataReady',function(){e.trigger('setData.ckeditor',[j]);});j.on('getData',function(l){e.trigger('getData.ckeditor',[j,l.data]);},999);j.on('destroy',function(){e.trigger('destroy.ckeditor',[j]);});if(j.config.autoUpdateElementJquery&&e.is('textarea')&&e.parents('form').length){var k=function(){e.ckeditor(function(){j.updateElement();});};e.parents('form').submit(k);e.parents('form').bind('form-pre-serialize',k);e.bind('destroy.ckeditor',function(){e.parents('form').unbind('submit',k);e.parents('form').unbind('form-pre-serialize',k);});}j.on('destroy',function(){e.data('ckeditorInstance',null);});e.data('_ckeditorInstanceLock',null);e.trigger('instanceReady.ckeditor',[j]);if(b)b.apply(j,[h]);},0);},null,null,9999);}else CKEDITOR.on('instanceReady',function(i){var j=i.editor;setTimeout(function(){if(!j.element){setTimeout(arguments.callee,100);return;}if(j.element.$==h)if(b)b.apply(j,[h]);},0);},null,null,9999);});return this;}});if(CKEDITOR.config.jqueryOverrideVal)a.fn.val=CKEDITOR.tools.override(a.fn.val,function(b){return function(c,d){var e=typeof c!='undefined',f;this.each(function(){var g=a(this),h=g.data('ckeditorInstance');if(!d&&g.is('textarea')&&h){if(e)h.setData(c);else{f=h.getData();return null;}}else if(e)b.call(g,c);else{f=b.call(g);return null;}return true;});return e?this:f;};});})();
diff --git a/ckeditor.js b/ckeditor.js
index 62bc0fb..9a28d76 100644
--- a/ckeditor.js
+++ b/ckeditor.js
@@ -3,117 +3,117 @@ 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:'A06B',version:'3.1',revision:'4891',_:{},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};
+(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A1QD',version:'3.1.1',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); +i[m]=j;n[k]=1;return j.setCustomData(k,l);};h.clearAllMarkers=function(i){for(var j in i)h.clearMarkers(i,i[j],true);};h.clearMarkers=function(i,j,k){var l=j.getCustomData('list_marker_names'),m=j.getCustomData('list_marker_id');for(var n in l)j.removeCustomData(n);j.removeCustomData('list_marker_names');if(k){j.removeCustomData('list_marker_id');delete i[m];}};e.extend(h.prototype,{type:1,addClass:function(i){var j=this.$.className;if(j){var k=new RegExp('(?:^|\\s)'+i+'(?:\\s|$)','');if(!k.test(j))j+=' '+i;}this.$.className=j||i;},removeClass:function(i){var j=this.getAttribute('class');if(j){var k=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','i');if(k.test(j)){j=j.replace(k,'').replace(/^\s+/,'');if(j)this.setAttribute('class',j);else this.removeAttribute('class');}}},hasClass:function(i){var j=new RegExp('(?:^|\\s+)'+i+'(?=\\s|$)','');return j.test(this.getAttribute('class'));},append:function(i,j){var k=this;if(typeof i=='string')i=k.getDocument().createElement(i);if(j)k.$.insertBefore(i.$,k.$.firstChild);else k.$.appendChild(i.$);return i;},appendHtml:function(i){var k=this;if(!k.$.childNodes.length)k.setHtml(i);else{var j=new h('div',k.getDocument());j.setHtml(i);j.moveChildren(k);}},appendText:function(i){if(this.$.text!=undefined)this.$.text+=i;else this.append(new d.text(i));},appendBogus:function(){var k=this;var i=k.getLast();while(i&&i.type==3&&!e.rtrim(i.getText()))i=i.getPrevious();if(!i||!i.is||!i.is('br')){var j=b.opera?k.getDocument().createText(''):k.getDocument().createElement('br');b.gecko&&j.setAttribute('type','_moz');k.append(j);}},breakParent:function(i){var l=this;var j=new d.range(l.getDocument());j.setStartAfter(l);j.setEndAfter(i);var k=j.extractContents();j.insertNode(l.remove());k.insertAfterNode(l);},contains:c||b.webkit?function(i){var j=this.$;return i.type!=1?j.contains(i.getParent().$):j!=i.$&&j.contains(i.$);}:function(i){return!!(this.$.compareDocumentPosition(i.$)&16);},focus:function(){try{this.$.focus();}catch(i){}},getHtml:function(){var i=this.$.innerHTML;return c?i.replace(/<\?[^>]*>/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){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:'',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,newpage,pagebreak,pastefromword,pastetext,popup,preview,print,removeformat,resize,save,scayt,smiley,showblocks,showborders,sourcearea,stylescombo,table,tabletools,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',extraPlugins:'',removePlugins:'',protectedSource:[],tabIndex:0,theme:'default',skin:'kama',width:'',baseFloatZIndex:10000};var i=a.config;a.focusManager=function(j){if(j.focusManager)return j.focusManager;this.hasFocus=false;this._={editor:j}; -return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getFirst().addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getFirst().removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-uk':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o,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=t,w=false,x;function y(C){if(u.length>0)for(var D=0;D=0;D--){if(C==u[D].name){u.splice(D,1);return;}}var E=[],F=[],G=v;while(G.type&&G.name!=C){if(!G._.isBlockLike)F.unshift(G);E.push(G);G=G.parent;}if(G.type){for(D=0;D0&&s.children[q-1]||null;if(r){if(p._.isBlockLike&&r.type==3){r.value=e.rtrim(r.value);if(r.value.length===0){s.children.pop();s.add(p);return;}}r.next=p;}p.previous=r;p.parent=s;s.children.push(p);s._.hasInlineStarted=p.type==3||p.type==1&&!p._.isBlockLike;},writeHtml:function(p,q){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){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(!x&&B.startContainer.equals(B.endContainer))B.setEnd(y,B.endOffset-B.startOffset);}B.setStart(v,w);if(x)B.collapse(true);}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;m0){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M);h.setMarker(K,M,'blockquote_moveout',true); -}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber();this._.editor=l;var p={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}},q=e.addFunction(p.execute,p),r=k.button._.instances.push(p)-1,s='',t=this.command;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(t){t=l.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;m.push('','',this.label,'');if(this.hasArrow)m.push('');m.push('','');if(this.onRender)this.onRender();return p;},setState:function(l){var q=this;if(q._.state==l)return;var m=a.document.getById(q._.id);if(m){m.setState(l);var n=q.title,o=q._.editor.lang.common.unavailable,p=m.getChild(1);if(l==0)n=o.replace('%1',q.title);p.setHtml(n);}q._.state=l;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);t.$.execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;var v=this.getSelection(),w=new d.range(u),x=new h(s=='text'?'textarea':'div',u);x.setAttribute('id','cke_pastebin');b.webkit&&x.append(u.createText('\xa0'));u.getBody().append(x);if(!c&&s!='html')x.setStyles({position:'absolute',left:'-1000px',top:v.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'});var y=v.createBookmarks(); -if(s=='text'){if(c){var z=u.getBody().$.createTextRange();z.moveToElementText(x.$);z.execCommand('Paste');r.data.preventDefault();}else{u.$.designMode='off';x.$.focus();}}else{w.setStartAt(x,1);w.setEndAt(x,2);w.select(true);}window.setTimeout(function(){s=='text'&&!c&&(u.$.designMode='on');x.remove();var A;x=b.webkit&&(A=x.getFirst())&&A.is&&A.hasClass('Apple-style-span')?A:x;v.selectBookmarks(y);t(x['get'+(s=='text'?'Value':'Html')]());},0);};j.add('clipboard',{requires:['htmldataprocessor'],init:function(r){r.on('paste',function(w){var x=w.data;if(x.html)r.insertHtml(x.html);else if(x.text)r.insertText(x.text);},null,null,1000);r.on('pasteDialog',function(w){setTimeout(function(){r.openDialog('paste');},0);});function s(w,x,y,z){var A=r.lang[x];r.addCommand(x,y);r.ui.addButton(w,{label:A,command:x});if(r.addMenuItems)r.addMenuItem(x,{label:A,command:x,group:'clipboard',order:z});};s('Cut','cut',new n('cut'),1);s('Copy','copy',new n('copy'),4);s('Paste','paste',o,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));r.on('key',p,r);var t=r.config.forcePasteAsPlainText?'text':'html';r.on('contentDom',function(){var w=r.document.getBody();w.on(t=='text'&&c?'paste':'beforepaste',function(x){if(u)return;q.call(r,x,t,function(y){if(!y)return;var z={};z[t]=y;r.fire('paste',z);});});});if(r.contextMenu){var u;function v(w){c&&w=='Paste'&&(u=1);var x=r.document.$.queryCommandEnabled(w)?2:0;u=0;return x;};r.contextMenu.addListener(function(){return{cut:v('Cut'),copy:v('Cut'),paste:b.webkit?2:v('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},onBlock:function(u,v){var w=u.addBlock(v);w.autoSize=true;w.element.addClass('cke_colorblock');w.element.setHtml(q(u,s));var x=w.keys;x[39]='next';x[9]='next';x[37]='prev';x[2000+9]='prev';x[32]='click';}});};function q(r,s){var t=[],u=m.colorButton_colors.split(','),v=e.addFunction(function(z,A){if(z=='?'){var B=arguments.callee;function C(E){this.removeListener('ok',C);this.removeListener('cancel',C);E.name=='ok'&&B(this.getContentElement('picker','selectedColor').getValue(),A);};l.openDialog('colordialog',function(){this.on('ok',C);this.on('cancel',C);});return;}l.focus();r.hide();var D=new a.style(m['colorButton_'+A+'Style'],z&&{color:z}); -l.fire('saveSnapshot');if(z)D.apply(l.document);else D.remove(l.document);l.fire('saveSnapshot');});t.push('
',n.auto,'
');for(var w=0;w');var x=u[w],y=l.lang.colors[x]||x;t.push('');}if(m.colorButton_enableMore)t.push('');t.push('
",n.more,'
');return t.join('');};}});i.colorButton_enableMore=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}}]};i.colorButton_backStyle={element:'span',styles:{'background-color':'#(color)'}};(function(){j.colordialog={init:function(l){l.addCommand('colordialog',new a.dialogCommand('colordialog'));a.dialog.add('colordialog',this.path+'dialogs/colordialog.js');}};j.add('colordialog',j.colordialog);})();j.add('contextmenu',{requires:['menu'],beforeInit:function(l){l.contextMenu=new j.contextMenu(l);l.addCommand('contextMenu',{exec:function(){l.contextMenu.show(l.document.getBody());}});}});j.contextMenu=e.createClass({$:function(l){this.id='cke_'+e.getNextNumber();this.editor=l;this._.listeners=[];this._.functionId=e.addFunction(function(m){this._.panel.hide();l.focus();l.execCommand(m);},this);},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor;if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q);p.onClick=e.bind(function(z){var A=true; -p.hide();if(c)p.onEscape();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);A=false;},this);p.onEscape=function(){q.focus();if(c)q.getSelection().unlock(true);};}var r=this._.listeners,s=[],t=this.editor.getSelection(),u=t&&t.getStartElement();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+='
'+m+'
';});n.on('selectionChange',function(s){var t=b,u=s.data.selection,v=u.getStartElement(),w=[],x=this._.elementsPath.list=[];while(v){var y=x.push(v)-1,z;if(v.getAttribute('_cke_real_element_type'))z=v.getAttribute('_cke_real_element_type');else z=v.getName();var A='';if(t.opera||t.gecko&&t.mac)A+=' onkeypress="return false;"';if(t.gecko)A+=' onblur="this.style.cssText = this.style.cssText;"';w.unshift('',z,'');if(z=='body')break;v=v.getParent();}q().setHtml(w.join('')+m);});n.on('contentDomUnload',function(){q().setHtml(m);});n.addCommand('elementsPathFocus',l.toolbarFocus);}});})();a._.elementsPath={click:function(l,m){var n=a.instances[l];n.focus();var o=n._.elementsPath.list[m];n.getSelection().selectElement(o);return false;},keydown:function(l,m,n){var o=k.button._.instances[m],p=a.instances[l],q=p._.elementsPath.idBase,r;n=new d.event(n);switch(n.getKeystroke()){case 37:case 9:r=a.document.getById(q+(m+1));if(!r)r=a.document.getById(q+'0');r.focus();return false;case 39:case 2000+9:r=a.document.getById(q+(m-1));if(!r)r=a.document.getById(q+(p._.elementsPath.list.length-1));r.focus();return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m);return false;}return true;}};(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(s){var t=s.specialKeys;t[13]=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'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}});if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form',true))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName();if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2}; -if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},afterInit:function(l){if(c){var m=l.dataProcessor,n=m&&m.htmlFilter;n&&n.addRules({elements:{input:function(o){var p=o.attributes,q=p.type;if(q=='checkbox'||q=='radio')p.value=='on'&&delete p.value;}}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={canUndo:false,exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(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;w--){u=s[w].createIterator();while(v=u.getNextParagraph()){v.removeAttribute('align');if(t){var x=v.$.className=e.ltrim(v.$.className.replace(y.cssClassRegex,''));if(y.state==2&&!y.isDefaultAlign)v.addClass(t);else if(!x)v.removeAttribute('class');}else if(y.state==2&&!y.isDefaultAlign)v.setStyle('text-align',y.value);else v.removeStyle('text-align');}}p.focus();p.forceNextSelectionCheck();q.selectBookmarks(r);}};j.add('justify',{init:function(p){var q=new o(p,'justifyleft','left'),r=new o(p,'justifycenter','center'),s=new o(p,'justifyright','right'),t=new o(p,'justifyblock','justify');p.addCommand('justifyleft',q);p.addCommand('justifycenter',r);p.addCommand('justifyright',s);p.addCommand('justifyblock',t);p.ui.addButton('JustifyLeft',{label:p.lang.justify.left,command:'justifyleft'});p.ui.addButton('JustifyCenter',{label:p.lang.justify.center,command:'justifycenter'});p.ui.addButton('JustifyRight',{label:p.lang.justify.right,command:'justifyright'});p.ui.addButton('JustifyBlock',{label:p.lang.justify.block,command:'justifyblock'});p.on('selectionChange',e.bind(n,q));p.on('selectionChange',e.bind(n,s));p.on('selectionChange',e.bind(n,r));p.on('selectionChange',e.bind(n,t));},requires:['domiterator']});})();e.extend(i,{justifyClasses:null});j.add('keystrokes',{beforeInit:function(l){l.keystrokeHandler=new a.keystrokeHandler(l);l.specialKeys={};},init:function(l){var m=l.config.keystrokes,n=l.config.blockedKeystrokes,o=l.keystrokeHandler.keystrokes,p=l.keystrokeHandler.blockedKeystrokes;for(var q=0;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(0),A=q.getThemeSpace('contents');if(q.mode=='wysiwyg'){var B=q.getSelection();u=B&&B.getRanges();v=t.getScrollPosition();}else{var C=q.textarea.$;u=!c&&[C.selectionStart,C.selectionEnd];v=[C.scrollLeft,C.scrollTop];}if(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;H '); -m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus(); -this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=n.config,q=p.baseHref?'':'',r=b.isCustomDomain();if(p.fullPage)o=n.getData().replace(//,'$&'+q).replace(/[^>]*(?=<\/title>)/,n.lang.preview);else{var s=''+''+q+''+n.lang.preview+''+e.buildStyleHtml(n.config.contentsCss)+''+s+n.getData()+'';}var u=640,v=420,w=80;try{var x=window.screen;u=Math.round(x.width*0.8);v=Math.round(x.height*0.7);w=Math.round(x.width*0.1);}catch(A){}var y='';if(r){window._cke_htmlToLoad=o;y='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )';}var z=window.open(y,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+u+',height='+v+',left='+w);if(!r){z.document.open();z.document.write(o);z.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m}); -}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=l.getSelection().getRanges();for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createBookmark(),s=r.startNode,t=r.endNode,u=function(x){var y=new d.elementPath(x),z=y.elements;for(var A=1,B;B=z[A];A++){if(B.equals(y.block)||B.equals(y.blockLimit))break;if(m.test(B.getName()))x.breakParent(B);}};u(s);u(t);var v=s.getNextSourceNode(true,1);while(v){if(v.equals(t))break;var w=v.getNextSourceNode(false,1);if(!(v.getName()=='img'&&v.getAttribute('_cke_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=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form;if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l);o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='',n=null;function o(t,u){var v=false,w;for(w in u){if(u[w]===t||u[w]==t){v=true;break;}}return v;};var p=function(){var t=this,u=function(){var x={};x.srcNodeRef=t.document.getWindow().$.frameElement;x.assocApp='CKEDITOR.'+a.version+'@'+a.revision;x.customerid=t.config.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';x.customDictionaryIds=t.config.scayt_customDictionaryIds;x.userDictionaryName=t.config.scayt_userDictionaryName;x.sLang=t.config.scayt_sLang||'en_US';if(a._scaytParams)for(var y in a._scaytParams)x[y]=a._scaytParams[y];var z=new window.scayt(x),A=q.instances[t.name];if(A){z.sLang=A.sLang;z.option(A.option());z.paused=A.paused;}q.instances[t.name]=z;var B='scaytButton',C=window.scayt.uiTags,D=[];for(var E=0,F=4;E=0){this.setState(0);t.on('showScaytState',function(){this.removeListener();this.setState(q.isScaytEnabled(t)?1:2);},this);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){t.config.menu_groups='scayt_suggest,scayt_moresuggest,scayt_control,'+t.config.menu_groups;},init:function(t){var u={},v={},w=t.addCommand(l,s);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var x=t.config.scayt_uiTabs||'1,1,1',y=[];x=x.split(',');for(var z=0,A=3;z 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);};});}});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea;l.on('editingBlockReady',function(){var n,o;l.addMode('source',{load:function(p,q){if(c&&b.version<8)p.setStyle('position','relative');l.textarea=n=new h('textarea');n.setAttributes({dir:'ltr',tabIndex:-1});n.addClass('cke_source');n.addClass('cke_enable_context_menu');var r={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){if(!b.ie8Compat){o=function(){n.hide();n.setStyle('height',p.$.clientHeight+'px');n.show();};l.on('resize',o);l.on('afterCommandExec',function(t){if(t.data.name=='toolbarCollapse')o();});r.height=p.$.clientHeight+'px';}}else n.on('mousedown',function(t){t.data.stopPropagation();});p.setHtml('');p.append(n);n.setStyles(r);n.on('blur',function(){l.focusManager.blur();});n.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(q);var s=l.keystrokeHandler;if(s)s.attach(n);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(p){n.setValue(p);l.fire('dataReady');},getData:function(){return n.getValue();},getSnapshotData:function(){return n.getValue();},unload:function(p){l.textarea=n=null;if(o)l.removeListener('resize',o);if(c&&b.version<8)p.removeStyle('position');},focus:function(){n.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}}); -j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(o){var p=o.config,q=o.lang.stylesCombo,r=this.path,s;o.ui.addRichCombo('Styles',{label:q.label,title:q.panelTitle,voiceLabel:q.voiceLabel,className:'cke_styles',multiSelect:true,panel:{css:o.skin.editor.css.concat(p.contentsCss),voiceLabel:q.panelVoiceLabel},init:function(){var t=this,u=p.stylesCombo_stylesSet.split(':'),v=u[1]?u.slice(1).join(':'):a.getUrl(r+'styles/'+u[0]+'.js');u=u[0];a.loadStylesSet(u,v,function(w){var x,y,z=[];s={};for(var A=0;A',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;K=0;H--){if(G[H])q(G[H]);}}else if(E instanceof h){var J=E.getAscendant('table');if(J.$.rows.length==1)J.remove();else E.remove();}};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={exec:function(n){n.container.focusNext(true);}},m={exec:function(n){n.container.focusPrevious(true);}};j.add('tab',{requires:['keystrokes'],init:function(n){var o=n.keystrokeHandler.keystrokes;o[9]='tab';o[2000+9]='shiftTab';var p=n.config.tabSpaces,q='';while(p--)q+='\xa0';n.addCommand('tab',{exec:function(r){if(!r.fire('tab'))if(q.length>0)r.insertHtml(q);else return r.execCommand('blur');return true;}});n.addCommand('shiftTab',{exec:function(r){if(!r.fire('shiftTab'))return r.execCommand('blurBack');return true;}});n.addCommand('blur',l);n.addCommand('blurBack',m);}});})();h.prototype.focusNext=function(l){var u=this;var m=u.$,n=u.getTabIndex(),o,p,q,r,s,t;if(n<=0){s=u.getNextSourceNode(l,1);while(s){if(s.isVisible()&&s.getTabIndex()===0){q=s;break;}s=s.getNextSourceNode(false,1);}}else{s=u.getDocument().getBody().getFirst();while(s=s.getNextSourceNode(false,1)){if(!o)if(!p&&s.equals(u)){p=true;if(l){if(!(s=s.getNextSourceNode(true,1)))break;o=1;}}else if(p&&!u.contains(s))o=1;if(!s.isVisible()||(t=s.getTabIndex())<0)continue;if(o&&t==n){q=s;break;}if(t>n&&(!q||!r||tr){q=t;r=s;}}else{if(o&&s==n){q=t;break;}if(sr)){q=t;r=s;}}}if(q)q.focus();};i.tabSpaces=0;(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js')); -n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];){if(q.focus){q.focus();return;}}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){switch(q){case 39:case 9:while((p=p.next||p.toolbar.next&&p.toolbar.next.items[0])&&!p.focus){}if(p)p.focus();else n.toolbox.focus();return false;case 37:case 2000+9:while((p=p.previous||p.toolbar.previous&&p.toolbar.previous.items[p.toolbar.previous.items.length-1])&&!p.focus){}if(p)p.focus();else{var r=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;r[r.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q=['
':' style="display:none">');var t=n.toolbox.toolbars,u=n.config.toolbar instanceof Array?n.config.toolbar:n.config['toolbar_'+n.config.toolbar];for(var v=0;v');s=0;}if(w==='/'){q.push('
');continue;}q.push('');var z=t.push(y)-1;if(z>0){y.previous=t[z-1];y.previous.next=y;}for(var A=0;A');s=1;}}else if(s){q.push('');s=0;}var D=B.render(n,q);z=y.items.push(D)-1;if(z>0){D.previous=y.items[z-1];D.previous.next=D;}D.toolbar=y;D.onkey=o;D.onfocus=function(){if(!n.toolbox.focusCommandExecuted)n.focus(); -};}}if(s){q.push('');s=0;}q.push('');}q.push('
');if(n.config.toolbarCanCollapse){var E=e.addFunction(function(){n.execCommand('toolbarCollapse');}),F='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(G){var H=a.document.getById(F),I=H.getPrevious(),J=G.getThemeSpace('contents'),K=I.getParent(),L=parseInt(J.$.style.height,10),M=K.$.offsetHeight;if(I.isVisible()){I.hide();H.addClass('cke_toolbox_collapser_min');H.setAttribute('title',G.lang.toolbarExpand);}else{I.show();H.removeClass('cke_toolbox_collapser_min');H.setAttribute('title',G.lang.toolbarCollapse);}var N=K.$.offsetHeight-M;J.setStyle('height',L-N+'px');},modes:{wysiwyg:1,source:1}});q.push('');}p.data.html+=q.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']];i.toolbar='Full';i.toolbarCanCollapse=true;(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 t=this;var s=r.getSelection();t.contents=r.getSnapshot();t.bookmarks=s&&s.createBookmarks2(true);if(c)t.contents=t.contents.replace(/\s+_cke_expando=".*?"/g,'');};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(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.currentImage=r;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(w){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var x=this.getSelection(),y=w.data;if(this.dataProcessor)y=this.dataProcessor.toHtml(y);if(c){var z=x.isLocked;if(z)x.unlock();var A=x.getNative();if(A.type=='Control')A.clear();A.createRange().pasteHTML(y);if(z)this.getSelection().lock();}else this.document.$.execCommand('inserthtml',false,y);e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function o(w){if(this.mode=='wysiwyg'){this.focus();this.fire('saveSnapshot');var x=w.data,y=x.getName(),z=f.$block[y],A=this.getSelection(),B=A.getRanges(),C=A.isLocked;if(C)A.unlock();var D,E,F,G;for(var H=B.length-1;H>=0;H--){D=B[H];D.deleteContents();E=!H&&x||x.clone(true);var I,J;if(z)while((I=D.getCommonAncestor(false,true))&&(J=f[I.getName()])&&!(J&&J[y])){if(I.getName() in f.span)D.splitElement(I);else if(D.checkStartOfBlock()&&D.checkEndOfBlock()){D.setStartBefore(I);D.collapse(true);I.remove();}else D.splitBlock();}D.insertNode(E);if(!F)F=E;}D.moveToPosition(F,4);var K=F.getNextSourceNode(true); -if(K&&K.type==1)D.moveToElementEditStart(K);A.selectRanges([D]);if(C)this.getSelection().lock();e.setTimeout(function(){this.fire('saveSnapshot');},0,this);}};function p(w){if(!w.checkDirty())setTimeout(function(){w.resetDirty();});};var q=d.walker.whitespaces(true),r=d.walker.bookmark(false,true);function s(w){return q(w)&&r(w);};function t(w){return w.type==3&&e.trim(w.getText()).match(/^(?: |\xa0)$/);};function u(w){var x=w.editor,y=w.data.path,z=y.blockLimit,A=w.data.selection,B=A.getRanges()[0],C=x.document.getBody(),D=x.config.enterMode;if(D!=2&&B.collapsed&&z.getName()=='body'&&!y.block){p(x);var E=B.fixBlock(true,x.config.enterMode==3?'div':'p');if(c){var F=E.getFirst(s);F&&t(F)&&F.remove();}if(E.getOuterHtml().match(m)){var G=E.getPrevious(q),H=E.getNext(q);if(G&&G.getName&&!(G.getName() in l)&&B.moveToElementEditStart(G)||H&&H.getName&&!(H.getName() in l)&&B.moveToElementEditStart(H))E.remove();}B.select();if(!c)x.selectionChange();}var I=C.getLast(d.walker.whitespaces(true));if(I&&I.getName&&I.getName() in l){p(x);if(!c)C.appendBogus();else C.append(x.document.createText('\xa0'));}};j.add('wysiwygarea',{requires:['editingblock'],init:function(w){var x=w.config.enterMode!=2?w.config.enterMode==3?'div':'p':false;w.on('editingBlockReady',function(){var z,A,B,C,D,E,F,G=b.isCustomDomain(),H=function(K){if(B)B.remove();if(A)A.remove();E=0;B=h.createFromHtml('');B.on('load',function(M){M.removeListener();var N=B.getFrameDocument().$;N.open();if(G)N.domain=document.domain;N.write(K);N.close();});var L=w.lang.editorTitle.replace('%1',w.name);if(b.gecko){z.setAttributes({role:'region',title:L});B.setAttributes({role:'region',title:' '});}else if(b.webkit){B.setAttribute('title',L);B.setAttribute('name',L);}else if(c){A=h.createFromHtml('
'+''+e.htmlEncode(L)+''+'
',a.document);B.appendTo(A);A.appendTo(z);}if(!c)z.append(B);},I='',J=function(K){if(E)return;E=1;var L=K.document,M=L.body,N=L.getElementById('cke_actscrpt'); -N.parentNode.removeChild(N);delete a._['contentDomReady'+w.name];M.spellcheck=!w.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,!w.config.disableObjectResizing);}catch(S){}try{L.execCommand('enableInlineTableEditing',false,!w.config.disableNativeTableHandles);}catch(T){}K=w.window=new d.window(K);L=w.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'))w.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))y.focus();});}var P=c||b.webkit?K:L;P.on('blur',function(){w.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(w.config.enterMode==2)L.createElement('br',{attributes:{_moz_dirty:''}}).replace(W);else W.remove();}}w.focusManager.focus();});var Q=w.keystrokeHandler;if(Q)Q.attach(L);if(c){L.on('keydown',function(U){var V=U.data.getKeystroke()==8&&w.getSelection().getSelectedElement();if(V){w.fire('saveSnapshot');V.remove();w.fire('saveSnapshot');U.cancel();}});if(L.$.compatMode=='CSS1Compat'){var R={33:1,34:1};L.on('keydown',function(U){if(U.data.getKeystroke() in R)setTimeout(function(){w.getSelection().scrollIntoView();},0);});}}if(w.contextMenu)w.contextMenu.addTarget(L,w.config.browserContextMenuOnCtrl!==false);setTimeout(function(){w.fire('contentDom');if(F){w.mode='wysiwyg';w.fire('mode');F=false;}C=false;if(D){w.focus();D=false;}setTimeout(function(){w.fire('dataReady');},0);if(c)setTimeout(function(){if(w.document){var U=w.document.$.body;U.runtimeStyle.marginBottom='0px';U.runtimeStyle.marginBottom='';}},1000);},0);};w.addMode('wysiwyg',{load:function(K,L,M){z=K;if(c&&b.quirks)K.setStyle('position','relative');w.mayBeDirty=true;F=true;if(M)this.loadSnapshotData(L);else this.loadData(L);},loadData:function(K){C=true;var L=w.config,M=L.fullPage,N=L.docType,O=''; -!M&&(O=e.buildStyleHtml(w.config.contentsCss)+O);var P=L.baseHref?'':'';if(M)K=K.replace(/]*>/i,function(Q){w.docType=N=Q;return '';});if(w.dataProcessor)K=w.dataProcessor.toHtml(K,x);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+''+''+P+O+''+''+K+'';K+=I;a._['contentDomReady'+w.name]=J;H(K);},getData:function(){var K=w.config,L=K.fullPage,M=L&&w.docType,N=B.getFrameDocument(),O=L?N.getDocumentElement().getOuterHtml():N.getBody().getHtml();if(w.dataProcessor)O=w.dataProcessor.toDataFormat(O,x);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){w.window=w.document=B=z=D=null;w.fire('contentDomUnload');},focus:function(){if(C)D=true;else if(w.window){w.window.focus();if(c)try{var K=w.getSelection();K=K&&K.getNative();var L=K&&K.type&&K.createRange();if(L){K.empty();L.select();}}catch(M){}w.selectionChange();}}});w.on('insertHtml',n,null,null,20);w.on('insertElement',o,null,null,20);w.on('selectionChange',u,null,null,1);});if(c){var y;w.on('uiReady',function(){y=w.container.append(h.createFromHtml(''));y.on('focus',function(){w.focus();});});}}});if(b.gecko){var v=window.top;(function(){var w=v.document.body;if(!w)v.addEventListener('load',arguments.callee,false);else w.setAttribute('onpageshow',w.getAttribute('onpageshow')+';event.persisted && CKEDITOR.tools.callFunction('+e.addFunction(function(){var x=a.instances,y,z;for(var A in x){y=x[A];z=y.document;if(z){z.$.designMode='off';z.$.designMode='on';}}})+')');})();}})();i.disableObjectResizing=false;i.disableNativeTableHandles=true;i.disableNativeSpellChecker=true;i.ignoreEmptyParagraph=true;j.add('wsc',{init:function(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,this.path+'dialogs/wsc.js'); -}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;j.add('styles',{requires:['selection']});a.editor.prototype.attachStyleStateChange=function(l,m){var n=this._.styleStateChangeCallbacks;if(!n){n=this._.styleStateChangeCallbacks=[];this.on('selectionChange',function(o){for(var p=0;p'+N+'
';else L.setHtml(N);M.remove();};function t(L){var M=/(\S\s*)\n(?:\s|(]+_fck_bookmark.*?\/span>))*\n(?!$)/gi,N=L.getName(),O=u(L.getOuterHtml(),M,function(Q,R,S){return R+''+S+'
';}),P=[];O.replace(/
([\s\S]*?)<\/pre>/gi,function(Q,R){P.push(R);});return P;};function u(L,M,N){var O='',P='';L=L.replace(/(^]+_fck_bookmark.*?\/span>)|(]+_fck_bookmark.*?\/span>$)/gi,function(Q,R,S){R&&(O=R);S&&(P=S);return '';});return O+L.replace(M,N)+P;};function v(L,M){var N=new d.documentFragment(M.getDocument());for(var O=0;O');P=P.replace(/[ \t]{2,}/g,function(R){return e.repeat(' ',R.length-1)+' ';});var Q=M.clone();Q.setHtml(P);N.append(Q);}return N;};function w(L,M){var N=L.getHtml();N=u(N,/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g,'');N=N.replace(/[ \t\r\n]*(]*>)[ \t\r\n]*/gi,'$1');N=N.replace(/([ \t\n\r]+| )/g,' ');N=N.replace(/]*>/gi,'\n');if(c){var O=L.getDocument().createElement('div');O.append(M);M.$.outerHTML='
'+N+'
';M=O.getFirst().remove();}else M.setHtml(N);return M;};function x(L,M){var N=L._.definition,O=N.attributes,P=N.styles,Q=I(L);function R(){for(var T in O){if(T=='class'&&M.getAttribute(T)!=O[T])continue;M.removeAttribute(T);}};R();for(var S in P)M.removeStyle(S);O=Q[M.getName()];if(O)R();A(M);};function y(L,M){var N=L._.definition,O=N.attributes,P=N.styles,Q=I(L),R=M.getElementsByTag(L.element);for(var S=R.count(); ---S>=0;)x(L,R.getItem(S));for(var T in Q){if(T!=L.element){R=M.getElementsByTag(T);for(S=R.count()-1;S>=0;S--){var U=R.getItem(S);z(U,Q[T]);}}}};function z(L,M){var N=M&&M.attributes;if(N)for(var O=0;O0)F+=(E.$.offsetHeight||0)-(E.$.clientHeight||0);E.setStyle('height',F+'px');t._.currentBlock.element.setStyle('display','none').removeStyle('display');}else v.getFirst().removeStyle('height');var G=t.element,H=G.getWindow(),I=H.getScrollPosition(),J=H.getViewPaneSize(),K={height:G.$.offsetHeight,width:G.$.offsetWidth};if(z?A<0:A+K.width>J.width+I.x)A+=K.width*(z?1:-1);if(B+K.height>J.height+I.y)B-=K.height;v.setStyles({top:B+'px',left:A+'px',opacity:'1'});},this);t.isLoaded?D():t.onLoad=D;e.setTimeout(function(){if(x.voiceLabel)if(b.gecko){var E=w.getParent();E.setAttribute('role','region');E.setAttribute('title',x.voiceLabel);w.setAttribute('role','region');w.setAttribute('title',' ');}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={};for(var o=0;o'],y=q.length,z=y&&q[0].group;for(var A=0;A');z=B.group;}B.render(this,A,x);}x.push('');t.setHtml(x.join(''));if(this.parent)this.parent._.panel.showAsChild(s,this.id,m,n,o,p);else s.showBlock(this.id,m,n,o,p);r.fire('menuShow',[s]);},hide:function(){this._.panel&&this._.panel.hide();}}});function l(m){m.sort(function(n,o){if(n.groupo.group)return 1;return n.ordero.order?1:0;});};})();a.menuItem=e.createClass({$:function(l,m,n){var o=this;e.extend(o,n,{order:0,className:'cke_button_'+m});o.group=l._.menuGroups[o.group];o.editor=l;o.name=m;},proto:{render:function(l,m,n){var t=this;var o=l.id+String(m),p=typeof t.state=='undefined'?2:t.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=t.label;if(p==0)r=t.editor.lang.common.unavailable.replace('%1',r);if(t.className)q+=' '+t.className;n.push(''+'');if(t.getItems)n.push('');n.push(r,'');}}});i.menu_subMenuDelay=400;i.menu_groups='clipboard,form,tablecell,tablecellproperties,tablerow,tablecolumn,table,anchor,link,image,flash,checkbox,radio,textfield,hiddenfield,imagebutton,button,select,textarea,div';(function(){var l=function(n,o){return n._.modes&&n._.modes[o||n.mode];},m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});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; +return this;};a.focusManager.prototype={focus:function(){var k=this;if(k._.timer)clearTimeout(k._.timer);if(!k.hasFocus){if(a.currentInstance)a.currentInstance.focusManager.forceBlur();var j=k._.editor;j.container.getFirst().addClass('cke_focus');k.hasFocus=true;j.fire('focus');}},blur:function(){var j=this;if(j._.timer)clearTimeout(j._.timer);j._.timer=setTimeout(function(){delete j._.timer;j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getFirst().removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,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;m0){y=z.shift();while(!y.getParent().equals(C))y=y.getParent();if(!y.equals(G))D.push(y);G=y;}while(D.length>0){y=D.shift();if(y.getName()=='blockquote'){var H=new d.documentFragment(p.document);while(y.getFirst()){H.append(y.getFirst().remove());z.push(H.getLast());}H.replace(y);}else z.push(y);}var I=p.document.createElement('blockquote');I.insertBefore(z[0]);while(z.length>0){y=z.shift();I.append(y);}}else if(q==1){var J=[],K={};while(y=x.getNextParagraph()){var L=null,M=null;while(y.getParent()){if(y.getParent().getName()=='blockquote'){L=y.getParent();M=y;break;}y=y.getParent();}if(L&&M&&!M.getCustomData('blockquote_moveout')){J.push(M); +h.setMarker(K,M,'blockquote_moveout',true);}}h.clearAllMarkers(K);var N=[],O=[];K={};while(J.length>0){var P=J.shift();I=P.getParent();if(!P.getPrevious())P.remove().insertBefore(I);else if(!P.getNext())P.remove().insertAfter(I);else{P.breakParent(P.getParent());O.push(P.getNext());}if(!I.getCustomData('blockquote_processed')){O.push(I);h.setMarker(K,I,'blockquote_processed',true);}N.push(P);}h.clearAllMarkers(K);for(E=O.length-1;E>=0;E--){I=O[E];if(n(I))I.remove();}if(p.config.enterMode==2){var Q=true;while(N.length){P=N.shift();if(P.getName()=='div'){H=new d.documentFragment(p.document);var R=Q&&P.getPrevious()&&!(P.getPrevious().type==1&&P.getPrevious().isBlockBoundary());if(R)H.append(p.document.createElement('br'));var S=P.getNext()&&!(P.getNext().type==1&&P.getNext().isBlockBoundary());while(P.getFirst())P.getFirst().remove().appendTo(H);if(S)H.append(p.document.createElement('br'));H.replace(P);Q=false;}}}}r.selectBookmarks(t);p.focus();}};j.add('blockquote',{init:function(p){p.addCommand('blockquote',o);p.ui.addButton('Blockquote',{label:p.lang.blockquote,command:'blockquote'});p.on('selectionChange',m);},requires:['domiterator']});})();j.add('button',{beforeInit:function(l){l.ui.addHandler(1,k.button.handler);}});a.UI_BUTTON=1;k.button=function(l){e.extend(this,l,{title:l.label,className:l.className||l.command&&'cke_button_'+l.command||'',click:l.click||(function(m){m.execCommand(l.command);})});this._={};};k.button.handler={create:function(l){return new k.button(l);}};k.button.prototype={canGroup:true,render:function(l,m){var n=b,o=this._.id='cke_'+e.getNextNumber();this._.editor=l;var p={id:o,button:this,editor:l,focus:function(){var v=a.document.getById(o);v.focus();},execute:function(){this.button.click(l);}},q=e.addFunction(p.execute,p),r=k.button._.instances.push(p)-1,s='',t=this.command;if(this.modes)l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);else if(t){t=l.getCommand(t);if(t){t.on('state',function(){this.setState(t.state);},this);s+='cke_'+(t.state==1?'on':t.state==0?'disabled':'off');}}if(!t)s+='cke_off';if(this.className)s+=' '+this.className;m.push('','',this.label,'');if(this.hasArrow)m.push('');m.push('','');if(this.onRender)this.onRender();return p;},setState:function(l){var q=this;if(q._.state==l)return;var m=a.document.getById(q._.id);if(m){m.setState(l);var n=q.title,o=q._.editor.lang.common.unavailable,p=m.getChild(1);if(l==0)n=o.replace('%1',q.title);p.setHtml(n);}q._.state=l;}};k.button._={instances:[],keydown:function(l,m){var n=k.button._.instances[l];if(n.onkey){m=new d.event(m);return n.onkey(n,m.getKeystroke())!==false;}},focus:function(l,m){var n=k.button._.instances[l],o;if(n.onfocus)o=n.onfocus(n,new d.event(m))!==false;if(b.gecko&&b.version<10900)m.preventBubble();return o;}};k.prototype.addButton=function(l,m){this.add(l,1,m);};(function(){var l=function(r,s){var t=r.document,u=t.getBody(),v=false,w=function(){v=true;};u.on(s,w);t.$.execCommand(s);u.removeListener(s,w);return v;},m=c?function(r,s){return l(r,s);}:function(r,s){try{return r.document.$.execCommand(s);}catch(t){return false;}},n=function(r){this.type=r;this.canUndo=this.type=='cut';};n.prototype={exec:function(r,s){var t=m(r,this.type);if(!t)alert(r.lang.clipboard[this.type+'Error']);return t;}};var o={canUndo:false,exec:c?function(r){r.focus();if(!r.document.getBody().fire('beforepaste')&&!l(r,'paste')){r.fire('pasteDialog');return false;}}:function(r){try{if(!r.document.getBody().fire('beforepaste')&&!r.document.$.execCommand('Paste',false,null))throw 0;}catch(s){setTimeout(function(){r.fire('pasteDialog');},0);return false;}}},p=function(r){if(this.mode!='wysiwyg')return;switch(r.data.keyCode){case 1000+86:case 2000+45:var s=this.document.getBody();if(!c&&s.fire('beforepaste'))r.cancel();else if(b.opera||b.gecko&&b.version<10900)s.fire('paste');return;case 1000+88:case 2000+46:var t=this;this.fire('saveSnapshot');setTimeout(function(){t.fire('saveSnapshot');},0);}};function q(r,s,t){var u=this.document;if(c&&u.getById('cke_pastebin'))return;if(s=='text'&&r.data&&r.data.$.clipboardData){var v=r.data.$.clipboardData.getData('text/plain');if(v){r.data.preventDefault();t(v);return;}}var w=this.getSelection(),x=new d.range(u),y=new h(s=='text'?'textarea':'div',u);y.setAttribute('id','cke_pastebin');b.webkit&&y.append(u.createText('\xa0'));u.getBody().append(y);if(!c&&s!='html')y.setStyles({position:'absolute',left:'-1000px',top:w.getStartElement().getDocumentPosition().y+'px',width:'1px',height:'1px',overflow:'hidden'}); +var z=w.createBookmarks();if(s=='text'){if(c){var A=u.getBody().$.createTextRange();A.moveToElementText(y.$);A.execCommand('Paste');r.data.preventDefault();}else{u.$.designMode='off';y.$.focus();}}else{x.setStartAt(y,1);x.setEndAt(y,2);x.select(true);}window.setTimeout(function(){s=='text'&&!c&&(u.$.designMode='on');y.remove();var B;y=b.webkit&&(B=y.getFirst())&&B.is&&B.hasClass('Apple-style-span')?B:y;w.selectBookmarks(z);t(y['get'+(s=='text'?'Value':'Html')]());},0);};j.add('clipboard',{requires:['dialog','htmldataprocessor'],init:function(r){r.on('paste',function(w){var x=w.data;if(x.html)r.insertHtml(x.html);else if(x.text)r.insertText(x.text);},null,null,1000);r.on('pasteDialog',function(w){setTimeout(function(){r.openDialog('paste');},0);});function s(w,x,y,z){var A=r.lang[x];r.addCommand(x,y);r.ui.addButton(w,{label:A,command:x});if(r.addMenuItems)r.addMenuItem(x,{label:A,command:x,group:'clipboard',order:z});};s('Cut','cut',new n('cut'),1);s('Copy','copy',new n('copy'),4);s('Paste','paste',o,8);a.dialog.add('paste',a.getUrl(this.path+'dialogs/paste.js'));r.on('key',p,r);var t=r.config.forcePasteAsPlainText?'text':'html';r.on('contentDom',function(){var w=r.document.getBody();w.on(t=='text'&&c||b.webkit?'paste':'beforepaste',function(x){if(u)return;q.call(r,x,t,function(y){if(!y)return;var z={};z[t]=y;r.fire('paste',z);});});});if(r.contextMenu){var u;function v(w){c&&w=='Paste'&&(u=1);var x=r.document.$.queryCommandEnabled(w)?2:0;u=0;return x;};r.contextMenu.addListener(function(){return{cut:v('Cut'),copy:v('Cut'),paste:b.webkit?2:v('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},onBlock:function(u,v){var w=u.addBlock(v);w.autoSize=true;w.element.addClass('cke_colorblock');w.element.setHtml(q(u,s));var x=w.keys;x[39]='next';x[9]='next';x[37]='prev';x[2000+9]='prev';x[32]='click';}});};function q(r,s){var t=[],u=m.colorButton_colors.split(','),v=e.addFunction(function(z,A){if(z=='?'){var B=arguments.callee;function C(E){this.removeListener('ok',C);this.removeListener('cancel',C);E.name=='ok'&&B(this.getContentElement('picker','selectedColor').getValue(),A);};l.openDialog('colordialog',function(){this.on('ok',C);this.on('cancel',C);});return; +}l.focus();r.hide();var D=new a.style(m['colorButton_'+A+'Style'],z&&{color:z});l.fire('saveSnapshot');if(z)D.apply(l.document);else D.remove(l.document);l.fire('saveSnapshot');});t.push('
',n.auto,'
');for(var w=0;w');var x=u[w],y=l.lang.colors[x]||x;t.push('');}if(m.colorButton_enableMore)t.push('');t.push('
",n.more,'
');return t.join('');};}});i.colorButton_enableMore=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);},_:{onMenu:function(l,m,n,o){var p=this._.menu,q=this.editor; +if(p){p.hide();p.removeAll();}else{p=this._.menu=new a.menu(q);p.onClick=e.bind(function(z){p.hide();if(z.onClick)z.onClick();else if(z.command)q.execCommand(z.command);},this);p.onEscape=function(){q.focus();};}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+='
'+m+'
';});n.on('selectionChange',function(s){var t=b,u=s.data.selection,v=u.getStartElement(),w=[],x=this._.elementsPath.list=[];while(v){var y=x.push(v)-1,z;if(v.getAttribute('_cke_real_element_type'))z=v.getAttribute('_cke_real_element_type');else z=v.getName();var A='';if(t.opera||t.gecko&&t.mac)A+=' onkeypress="return false;"';if(t.gecko)A+=' onblur="this.style.cssText = this.style.cssText;"';w.unshift('',z,'');if(z=='body')break;v=v.getParent();}q().setHtml(w.join('')+m);});n.on('contentDomUnload',function(){q().setHtml(m);});n.addCommand('elementsPathFocus',l.toolbarFocus);}});})();a._.elementsPath={click:function(l,m){var n=a.instances[l];n.focus();var o=n._.elementsPath.list[m];n.getSelection().selectElement(o);return false;},keydown:function(l,m,n){var o=k.button._.instances[m],p=a.instances[l],q=p._.elementsPath.idBase,r;n=new d.event(n);switch(n.getKeystroke()){case 37:case 9:r=a.document.getById(q+(m+1));if(!r)r=a.document.getById(q+'0');r.focus();return false;case 39:case 2000+9:r=a.document.getById(q+(m-1));if(!r)r=a.document.getById(q+(p._.elementsPath.list.length-1));r.focus();return false;case 27:p.focus();return false;case 13:case 32:this.click(l,m); +return false;}return true;}};(function(){j.add('enterkey',{requires:['keystrokes','indent'],init:function(s){var t=s.specialKeys;t[13]=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'};j.add('forms',{init:function(l){var m=l.lang;l.addCss('form{border: 1px dotted #FF0000;padding: 2px;}');var n=function(p,q,r){l.addCommand(q,new a.dialogCommand(q));l.ui.addButton(p,{label:m.common[p.charAt(0).toLowerCase()+p.slice(1)],command:q});a.dialog.add(q,r);},o=this.path+'dialogs/';n('Form','form',o+'form.js');n('Checkbox','checkbox',o+'checkbox.js');n('Radio','radio',o+'radio.js');n('TextField','textfield',o+'textfield.js');n('Textarea','textarea',o+'textarea.js');n('Select','select',o+'select.js');n('Button','button',o+'button.js');n('ImageButton','imagebutton',j.getPath('image')+'dialogs/image.js');n('HiddenField','hiddenfield',o+'hiddenfield.js');if(l.addMenuItems)l.addMenuItems({form:{label:m.form.menu,command:'form',group:'form'},checkbox:{label:m.checkboxAndRadio.checkboxTitle,command:'checkbox',group:'checkbox'},radio:{label:m.checkboxAndRadio.radioTitle,command:'radio',group:'radio'},textfield:{label:m.textfield.title,command:'textfield',group:'textfield'},hiddenfield:{label:m.hidden.title,command:'hiddenfield',group:'hiddenfield'},imagebutton:{label:m.image.titleButton,command:'imagebutton',group:'imagebutton'},button:{label:m.button.title,command:'button',group:'button'},select:{label:m.select.title,command:'select',group:'select'},textarea:{label:m.textarea.title,command:'textarea',group:'textarea'}});if(l.contextMenu){l.contextMenu.addListener(function(p){if(p&&p.hasAscendant('form',true))return{form:2};});l.contextMenu.addListener(function(p){if(p){var q=p.getName(); +if(q=='select')return{select:2};if(q=='textarea')return{textarea:2};if(q=='input'){var r=p.getAttribute('type');if(r=='text'||r=='password')return{textfield:2};if(r=='button'||r=='submit'||r=='reset')return{button:2};if(r=='checkbox')return{checkbox:2};if(r=='radio')return{radio:2};if(r=='image')return{imagebutton:2};}if(q=='img'&&p.getAttribute('_cke_real_element_type')=='hiddenfield')return{hiddenfield:2};}});}},afterInit:function(l){if(c){var m=l.dataProcessor,n=m&&m.htmlFilter;n&&n.addRules({elements:{input:function(o){var p=o.attributes,q=p.type;if(q=='checkbox'||q=='radio')p.value=='on'&&delete p.value;}}});}},requires:['image']});if(c)h.prototype.hasAttribute=function(l){var o=this;var m=o.$.attributes.getNamedItem(l);if(o.getName()=='input')switch(l){case 'class':return o.$.className.length>0;case 'checked':return!!o.$.checked;case 'value':var n=o.getAttribute('type');if(n=='checkbox'||n=='radio')return o.$.value!='on';break;default:}return!!(m&&m.specified);};(function(){var l={canUndo:false,exec:function(n){n.insertElement(n.document.createElement('hr'));}},m='horizontalrule';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('HorizontalRule',{label:n.lang.horizontalrule,command:m});}});})();(function(){var l=/^[\t\r\n ]*(?: |\xa0)$/,m='{cke_protected}';function n(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(0),A=q.getThemeSpace('contents');if(q.mode=='wysiwyg'){var B=q.getSelection();u=B&&B.getRanges();v=t.getScrollPosition();}else{var C=q.textarea.$;u=!c&&[C.selectionStart,C.selectionEnd];v=[C.scrollLeft,C.scrollTop];}if(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;H ');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js')); +if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);}return true;}});(function(){var l={modes:{wysiwyg:1,source:1},canUndo:false,exec:function(n){var o,p=n.config,q=p.baseHref?'':'',r=b.isCustomDomain();if(p.fullPage)o=n.getData().replace(//,'$&'+q).replace(/[^>]*(?=<\/title>)/,n.lang.preview);else{var s=''+''+q+''+n.lang.preview+''+e.buildStyleHtml(n.config.contentsCss)+''+s+n.getData()+'';}var u=640,v=420,w=80;try{var x=window.screen;u=Math.round(x.width*0.8);v=Math.round(x.height*0.7);w=Math.round(x.width*0.1);}catch(A){}var y='';if(r){window._cke_htmlToLoad=o;y='javascript:void( (function(){document.open();document.domain="'+document.domain+'";'+'document.write( window.opener._cke_htmlToLoad );'+'document.close();'+'window.opener._cke_htmlToLoad = null;'+'})() )'; +}var z=window.open(y,null,'toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+u+',height='+v+',left='+w);if(!r){z.document.open();z.document.write(o);z.document.close();}}},m='preview';j.add(m,{init:function(n){n.addCommand(m,l);n.ui.addButton('Preview',{label:n.lang.preview,command:m});}});})();j.add('print',{init:function(l){var m='print',n=l.addCommand(m,j.print);l.ui.addButton('Print',{label:l.lang.print,command:m});}});j.print={exec:function(l){if(b.opera)return;else if(b.gecko)l.window.$.print();else l.document.$.execCommand('Print');},canUndo:false,modes:{wysiwyg:!b.opera}};j.add('removeformat',{requires:['selection'],init:function(l){l.addCommand('removeFormat',j.removeformat.commands.removeformat);l.ui.addButton('RemoveFormat',{label:l.lang.removeFormat,command:'removeFormat'});}});j.removeformat={commands:{removeformat:{exec:function(l){var m=l._.removeFormatRegex||(l._.removeFormatRegex=new RegExp('^(?:'+l.config.removeFormatTags.replace(/,/g,'|')+')$','i')),n=l._.removeAttributes||(l._.removeAttributes=l.config.removeFormatAttributes.split(',')),o=l.getSelection().getRanges();for(var p=0,q;q=o[p];p++){if(q.collapsed)continue;q.enlarge(1);var r=q.createBookmark(),s=r.startNode,t=r.endNode,u=function(x){var y=new d.elementPath(x),z=y.elements;for(var A=1,B;B=z[A];A++){if(B.equals(y.block)||B.equals(y.blockLimit))break;if(m.test(B.getName()))x.breakParent(B);}};u(s);u(t);var v=s.getNextSourceNode(true,1);while(v){if(v.equals(t))break;var w=v.getNextSourceNode(false,1);if(!(v.getName()=='img'&&v.getAttribute('_cke_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=750;i.resize_minHeight=250;i.resize_maxWidth=3000;i.resize_maxHeight=3000;i.resize_enabled=true;(function(){var l={modes:{wysiwyg:1,source:1},exec:function(n){var o=n.element.$.form;if(o)try{o.submit();}catch(p){if(o.submit.click)o.submit.click();}}},m='save';j.add(m,{init:function(n){var o=n.addCommand(m,l);o.modes={wysiwyg:!!n.element.$.form};n.ui.addButton('Save',{label:n.lang.save,command:m});}});})();(function(){var l='scaytcheck',m='',n=null;function o(t,u){var v=false,w;for(w in u){if(u[w]===t||u[w]==t){v=true;break;}}return v;};var p=function(){var t=this,u=function(){var x={};x.srcNodeRef=t.document.getWindow().$.frameElement;x.assocApp='CKEDITOR.'+a.version+'@'+a.revision;x.customerid=t.config.scayt_customerid||'1:WvF0D4-UtPqN1-43nkD4-NKvUm2-daQqk3-LmNiI-z7Ysb4-mwry24-T8YrS3-Q2tpq2';x.customDictionaryIds=t.config.scayt_customDictionaryIds;x.userDictionaryName=t.config.scayt_userDictionaryName;x.sLang=t.config.scayt_sLang||'en_US';if(a._scaytParams)for(var y in a._scaytParams)x[y]=a._scaytParams[y];var z=new window.scayt(x),A=q.instances[t.name];if(A){z.sLang=A.sLang;z.option(A.option());z.paused=A.paused;}q.instances[t.name]=z;var B='scaytButton',C=window.scayt.uiTags,D=[];for(var E=0,F=4;E=0){this.setState(0);t.on('showScaytState',function(){this.removeListener();this.setState(q.isScaytEnabled(t)?1:2);},this);q.loadEngine(t);}}};j.add('scayt',{requires:['menubutton'],beforeInit:function(t){t.config.menu_groups='scayt_suggest,scayt_moresuggest,scayt_control,'+t.config.menu_groups;},init:function(t){var u={},v={},w=t.addCommand(l,s);a.dialog.add(l,a.getUrl(this.path+'dialogs/options.js'));var x=t.config.scayt_uiTabs||'1,1,1',y=[];x=x.split(',');for(var z=0,A=3;z 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);};});}});}});})();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:-1});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);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(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(o){var p=o.config,q=o.lang.stylesCombo,r=this.path,s;o.ui.addRichCombo('Styles',{label:q.label,title:q.panelTitle,voiceLabel:q.voiceLabel,className:'cke_styles',multiSelect:true,panel:{css:o.skin.editor.css.concat(p.contentsCss),voiceLabel:q.panelVoiceLabel},init:function(){var t=this,u=p.stylesCombo_stylesSet.split(':'),v=u[1]?u.slice(1).join(':'):a.getUrl(r+'styles/'+u[0]+'.js');u=u[0];a.loadStylesSet(u,v,function(w){var x,y,z=[];s={};for(var A=0;A',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);}},n={exec:function(o){o.container.focusPrevious(true);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.keystrokeHandler.keystrokes;p[9]='tab';p[2000+9]='shiftTab';var q=o.config.tabSpaces,r='';while(q--)r+='\xa0';o.addCommand('tab',e.extend({exec:function(s){if(!s.fire('tab'))if(r.length>0)s.insertHtml(r);else return s.execCommand('blur');return true;}},l));o.addCommand('shiftTab',e.extend({exec:function(s){if(!s.fire('shiftTab'))return s.execCommand('blurBack');return true;}},l));o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l){var u=this;var m=u.$,n=u.getTabIndex(),o,p,q,r,s,t;if(n<=0){s=u.getNextSourceNode(l,1);while(s){if(s.isVisible()&&s.getTabIndex()===0){q=s;break;}s=s.getNextSourceNode(false,1);}}else{s=u.getDocument().getBody().getFirst();while(s=s.getNextSourceNode(false,1)){if(!o)if(!p&&s.equals(u)){p=true;if(l){if(!(s=s.getNextSourceNode(true,1)))break;o=1;}}else if(p&&!u.contains(s))o=1;if(!s.isVisible()||(t=s.getTabIndex())<0)continue;if(o&&t==n){q=s;break;}if(t>n&&(!q||!r||tr){q=t;r=s;}}else{if(o&&s==n){q=t;break;}if(sr)){q=t;r=s;}}}if(q)q.focus();};i.tabSpaces=0;(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q0)a.scriptLoader.load(p,o);else setTimeout(o,0);};})();i.templates='default';i.templates_files=[a.getUrl('plugins/templates/templates/default.js')];i.templates_replaceContent=true;(function(){var l=function(){this.toolbars=[];this.focusCommandExecuted=false;};l.prototype.focus=function(){for(var n=0,o;o=this.toolbars[n++];)for(var p=0,q;q=o.items[p++];){if(q.focus){q.focus();return;}}};var m={toolbarFocus:{modes:{wysiwyg:1,source:1},exec:function(n){if(n.toolbox){n.toolbox.focusCommandExecuted=true;if(c)setTimeout(function(){n.toolbox.focus();},100);else n.toolbox.focus();}}}};j.add('toolbar',{init:function(n){var o=function(p,q){switch(q){case 39:case 9:while((p=p.next||p.toolbar.next&&p.toolbar.next.items[0])&&!p.focus){}if(p)p.focus();else n.toolbox.focus();return false;case 37:case 2000+9:while((p=p.previous||p.toolbar.previous&&p.toolbar.previous.items[p.toolbar.previous.items.length-1])&&!p.focus){}if(p)p.focus();else{var r=n.toolbox.toolbars[n.toolbox.toolbars.length-1].items;r[r.length-1].focus();}return false;case 27:n.focus();return false;case 13:case 32:p.execute();return false;}return true;};n.on('themeSpace',function(p){if(p.data.space==n.config.toolbarLocation){n.toolbox=new l();var q=['
':' style="display:none">');var t=n.toolbox.toolbars,u=n.config.toolbar instanceof Array?n.config.toolbar:n.config['toolbar_'+n.config.toolbar];for(var v=0;v');s=0;}if(w==='/'){q.push('
');continue;}q.push('');var z=t.push(y)-1;if(z>0){y.previous=t[z-1];y.previous.next=y;}for(var A=0;A');s=1;}}else if(s){q.push('');s=0;}var D=B.render(n,q);z=y.items.push(D)-1;if(z>0){D.previous=y.items[z-1];D.previous.next=D;}D.toolbar=y;D.onkey=o;D.onfocus=function(){if(!n.toolbox.focusCommandExecuted)n.focus();};}}if(s){q.push('');s=0;}q.push('');}q.push('
');if(n.config.toolbarCanCollapse){var E=e.addFunction(function(){n.execCommand('toolbarCollapse');}),F='cke_'+e.getNextNumber();n.addCommand('toolbarCollapse',{exec:function(G){var H=a.document.getById(F),I=H.getPrevious(),J=G.getThemeSpace('contents'),K=I.getParent(),L=parseInt(J.$.style.height,10),M=K.$.offsetHeight;if(I.isVisible()){I.hide();H.addClass('cke_toolbox_collapser_min');H.setAttribute('title',G.lang.toolbarExpand);}else{I.show();H.removeClass('cke_toolbox_collapser_min');H.setAttribute('title',G.lang.toolbarCollapse);}var N=K.$.offsetHeight-M;J.setStyle('height',L-N+'px');G.fire('resize');},modes:{wysiwyg:1,source:1}});q.push('');}p.data.html+=q.join('');}});n.addCommand('toolbarFocus',m.toolbarFocus);}});})();k.separator={render:function(l,m){m.push('');return{};}};i.toolbarLocation='top';i.toolbar_Basic=[['Bold','Italic','-','NumberedList','BulletedList','-','Link','Unlink','-','About']];i.toolbar_Full=[['Source','-','Save','NewPage','Preview','-','Templates'],['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],'/',['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],['NumberedList','BulletedList','-','Outdent','Indent','Blockquote','CreateDiv'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor'],['Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],'/',['Styles','Format','Font','FontSize'],['TextColor','BGColor'],['Maximize','ShowBlocks','-','About']]; +i.toolbar='Full';i.toolbarCanCollapse=true;(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;v.on('editingBlockReady',function(){var y,z,A,B,C,D,E,F=b.isCustomDomain(),G=function(J){if(A)A.remove();if(z)z.remove();D=0;A=h.createFromHtml('');A.on('load',function(L){L.removeListener();var M=A.getFrameDocument().$;M.open();if(F)M.domain=document.domain;M.write(J);M.close();});var K=v.lang.editorTitle.replace('%1',v.name);if(b.gecko){y.setAttributes({role:'region',title:K});A.setAttributes({role:'region',title:' '});}else if(b.webkit){A.setAttribute('title',K); +A.setAttribute('name',K);}else if(c){z=h.createFromHtml('
'+''+e.htmlEncode(K)+''+'
',a.document);A.appendTo(z);z.appendTo(y);}if(!c)y.append(A);},H='',I=function(J){if(D)return;D=1;var K=J.document,L=K.body,M=K.getElementById('cke_actscrpt');M.parentNode.removeChild(M);delete a._['contentDomReady'+v.name];L.spellcheck=!v.config.disableNativeSpellChecker;if(c){L.hideFocus=true;L.disabled=true;L.contentEditable=true;L.removeAttribute('disabled');}else K.designMode='on';try{K.execCommand('enableObjectResizing',false,!v.config.disableObjectResizing);}catch(R){}try{K.execCommand('enableInlineTableEditing',false,!v.config.disableNativeTableHandles);}catch(S){}J=v.window=new d.window(J);K=v.document=new g(K);if(!(c||b.opera))K.on('mousedown',function(T){var U=T.data.getTarget();if(U.is('img','hr','input','textarea','select'))v.getSelection().selectElement(U);});if(b.webkit){K.on('click',function(T){if(T.data.getTarget().is('input','select'))T.data.preventDefault();});K.on('mouseup',function(T){if(T.data.getTarget().is('input','textarea'))T.data.preventDefault();});}if(c&&K.$.compatMode=='CSS1Compat'){var N=K.getDocumentElement();N.on('mousedown',function(T){if(T.data.getTarget().equals(N))x.focus();});}var O=c||b.webkit?J:K;O.on('blur',function(){v.focusManager.blur();});O.on('focus',function(){if(b.gecko){var T=L;while(T.firstChild)T=T.firstChild;if(!T.nextSibling&&'BR'==T.tagName&&T.hasAttribute('_moz_editor_bogus_node')){var U=K.$.createEvent('KeyEvents');U.initKeyEvent('keypress',true,true,J.$,false,false,false,false,0,32);K.$.dispatchEvent(U);var V=K.getBody().getFirst();if(v.config.enterMode==2)K.createElement('br',{attributes:{_moz_dirty:''}}).replace(V);else V.remove();}}v.focusManager.focus();});var P=v.keystrokeHandler;if(P)P.attach(K);if(c){K.on('keydown',function(T){var U=T.data.getKeystroke();if(U in {8:1,46:1}){var V=v.getSelection(),W=V.getSelectedElement();if(W){v.fire('saveSnapshot');var X=V.getRanges()[0].createBookmark();W.remove();V.selectBookmarks([X]);v.fire('saveSnapshot');T.data.preventDefault();}}});if(K.$.compatMode=='CSS1Compat'){var Q={33:1,34:1};K.on('keydown',function(T){if(T.data.getKeystroke() in Q)setTimeout(function(){v.getSelection().scrollIntoView(); +},0);});}}if(v.contextMenu)v.contextMenu.addTarget(K,v.config.browserContextMenuOnCtrl!==false);setTimeout(function(){v.fire('contentDom');if(E){v.mode='wysiwyg';v.fire('mode');E=false;}B=false;if(C){v.focus();C=false;}setTimeout(function(){v.fire('dataReady');},0);if(c)setTimeout(function(){if(v.document){var T=v.document.$.body;T.runtimeStyle.marginBottom='0px';T.runtimeStyle.marginBottom='';}},1000);},0);};v.addMode('wysiwyg',{load:function(J,K,L){y=J;if(c&&b.quirks)J.setStyle('position','relative');v.mayBeDirty=true;E=true;if(L)this.loadSnapshotData(K);else this.loadData(K);},loadData:function(J){B=true;var K=v.config,L=K.fullPage,M=K.docType,N='';!L&&(N=e.buildStyleHtml(v.config.contentsCss)+N);var O=K.baseHref?'':'';if(L)J=J.replace(/]*>/i,function(P){v.docType=M=P;return '';});if(v.dataProcessor)J=v.dataProcessor.toHtml(J,w);if(L){if(!/]/.test(J))J=''+J;if(!/]/.test(J))J=''+J+'';if(!/]/.test(J))J=J.replace(/]*>/,'$&');O&&(J=J.replace(//,'$&'+O));J=J.replace(/<\/head\s*>/,N+'$&');J=M+J;}else J=K.docType+''+''+O+N+''+''+J+'';J+=H;a._['contentDomReady'+v.name]=I;G(J);},getData:function(){var J=v.config,K=J.fullPage,L=K&&v.docType,M=A.getFrameDocument(),N=K?M.getDocumentElement().getOuterHtml():M.getBody().getHtml();if(v.dataProcessor)N=v.dataProcessor.toDataFormat(N,w);if(J.ignoreEmptyParagraph)N=N.replace(m,'');if(L)N=L+'\n'+N;return N;},getSnapshotData:function(){return A.getFrameDocument().getBody().getHtml();},loadSnapshotData:function(J){A.getFrameDocument().getBody().setHtml(J);},unload:function(J){v.window=v.document=A=y=C=null;v.fire('contentDomUnload');},focus:function(){if(B)C=true;else if(v.window){v.window.focus();if(c)try{var J=v.getSelection();J=J&&J.getNative();var K=J&&J.type&&J.createRange();if(K){J.empty();K.select();}}catch(L){}v.selectionChange();}}});v.on('insertHtml',n,null,null,20);v.on('insertElement',o,null,null,20);v.on('selectionChange',u,null,null,1);});if(c){var x;v.on('uiReady',function(){x=v.container.append(h.createFromHtml(''));x.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('wsc',{requires:['dialog'],init:function(l){var m='checkspell',n=l.addCommand(m,new a.dialogCommand(m));n.modes={wysiwyg:!b.opera&&document.domain==window.location.hostname};l.ui.addButton('SpellChecker',{label:l.lang.spellCheck.toolbar,command:m});a.dialog.add(m,this.path+'dialogs/wsc.js');}});i.wsc_customerId=i.wsc_customerId||'1:ua3xw1-2XyGJ3-GWruD3-6OFNT1-oXcuB1-nR6Bp4-hgQHc-EcYng3-sdRXG3-NOfFk';i.wsc_customLoaderScript=i.wsc_customLoaderScript||null;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;N0?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 U=this;var L=[],M=K.label?' title="'+e.htmlEncode(K.label)+'"':'',N=K.elements,O=a.dialog._.uiElementBuilders.vbox.build(U,{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('')),Q=h.createFromHtml(['0?' cke_last':'cke_first',M,!!K.hidden?' style="display:none"':'',' id="',K.id+'_',e.getNextNumber(),'" href="javascript:void(0)"',' hidefocus="true">',K.label,''].join('')); +if(U._.pageCount===0)U.parts.dialog.addClass('cke_single_page');else U.parts.dialog.removeClass('cke_single_page');U._.tabs[K.id]=[Q,P];U._.tabIdList.push(K.id);U._.pageCount++;U._.lastTab=Q;var R=U._.contents[K.id]={},S,T=O.getChild();while(S=T.shift()){R[S.id]=S;if(typeof S.getChild=='function')T.push.apply(T,S.getChild());}P.setAttribute('name',K.id);P.appendTo(U.parts.contents);Q.unselectable();U.parts.tabs.append(Q);if(K.accessKey){E(U,U,'CTRL+'+K.accessKey,H,G);U._.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();}}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(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.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 V=[''];for(T=0;T0)V.push('style="'+X.join('; ')+'" ');V.push('>',M[T],'');}V.push('');return V.join('');};k.dialog.uiElement.call(this,K,O||{type:'hbox'},N,'table',S,O&&O.align&&{align:O.align}||null,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,null,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+'
';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(){if(x.voiceLabel)if(b.gecko){var E=w.getParent();E.setAttribute('role','region');E.setAttribute('title',x.voiceLabel);w.setAttribute('role','region');w.setAttribute('title',' ');}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 t=this;var o=l.id+String(m),p=typeof t.state=='undefined'?2:t.state,q=' cke_'+(p==1?'on':p==0?'disabled':'off'),r=t.label;if(p==0)r=t.editor.lang.common.unavailable.replace('%1',r);if(t.className)q+=' '+t.className;n.push(''+'');if(t.getItems)n.push('','&#',t.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(){var l=function(n,o){return n._.modes&&n._.modes[o||n.mode];},m;j.add('editingblock',{init:function(n){if(!n.config.editingBlock)return;n.on('themeSpace',function(o){if(o.data.space=='contents')o.data.html+='
';});n.on('themeLoaded',function(){n.fireOnce('editingBlockReady');});n.on('uiReady',function(){n.setMode(n.config.startupMode);});n.on('afterSetData',function(){if(!m){function o(){m=true; l(n).loadData(n.getData());m=false;};if(n.mode)o();else n.on('mode',function(){o();n.removeListener('mode',arguments.callee);});}});n.on('beforeGetData',function(){if(!m&&n.mode){m=true;n.setData(l(n).getData());m=false;}});n.on('getSnapshot',function(o){if(n.mode)o.data=l(n).getSnapshotData();});n.on('loadSnapshot',function(o){if(n.mode)l(n).loadSnapshotData(o.data);});n.on('mode',function(o){o.removeListener();var p=n.container;if(b.webkit&&b.version<528){var q=n.config.tabIndex||n.element.getAttribute('tabindex')||0;p=p.append(h.createFromHtml(''));}p.on('focus',function(){n.focus();});if(n.config.startupFocus)n.focus();setTimeout(function(){n.fireOnce('instanceReady');a.fire('instanceReady',null,n);});});}});a.editor.prototype.mode='';a.editor.prototype.addMode=function(n,o){o.name=n;(this._.modes||(this._.modes={}))[n]=o;};a.editor.prototype.setMode=function(n){var o,p=this.getThemeSpace('contents'),q=this.checkDirty();if(this.mode){if(n==this.mode)return;this.fire('beforeModeUnload');var r=l(this);o=r.getData();r.unload(p);this.mode='';}p.setHtml('');var s=l(this,n);if(!s)throw '[CKEDITOR.editor.setMode] Unknown mode "'+n+'".';if(!q)this.on('mode',function(){this.resetDirty();this.removeListener('mode',arguments.callee);});s.load(p,typeof o!='string'?this.getData():o);};a.editor.prototype.focus=function(){var n=l(this);if(n)n.focus();};})();i.startupMode='wysiwyg';i.startupFocus=false;i.editingBlock=true;(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===0)return{container:v,offset:y};x=null;}}if(!x){x=t.duplicate();x.moveToElementText(v);x.collapse(false);}x.setEndPoint('StartToStart',t);var B=x.text.replace(/(\r\n|\r)/g,'\n').length;while(B>0)B-=w[--y].nodeValue.length;if(B===0)return{container:v,offset:y};else return{container:w[y],offset:-B}; -};return function(){var E=this;var t=E._.cache;if(t.ranges)return t.ranges;var u=E.getNative(),v=u&&u.createRange(),w=E.getType(),x;if(!u)return[];if(w==2){x=new d.range(E.document);var y=s(v,true);x.setStart(new d.node(y.container),y.offset);y=s(v);x.setEnd(new d.node(y.container),y.offset);return t.ranges=[x];}else if(w==3){var z=E._.cache.ranges=[];for(var A=0;A=0){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';n._={panelDefinition:m,items:{},state:2};},statics:{handler:{create:function(l){return new k.richCombo(l);}}},proto:{renderHtml:function(l){var m=[];this.render(l,m);return m.join('');},render:function(l,m){var n='cke_'+this.id,o=e.addFunction(function(r){var u=this;var s=u._;if(s.state==0)return;u.createPanel(l);if(s.on){s.panel.hide();return;}if(!s.committed){s.list.commit();s.committed=1;}var t=u.getValue();if(t)s.list.mark(t);else s.list.unmarkAll();s.panel.showBlock(u.id,new h(r),4);},this),p={id:n,combo:this,focus:function(){var r=a.document.getById(n).getChild(1);r.focus();},execute:o};l.on('mode',function(){this.setState(this.modes[l.mode]?2:0);},this);var q=e.addFunction(function(r,s){r=new d.event(r);var t=r.getKeystroke();switch(t){case 13:case 32:case 40:e.callFunction(o,s);break;default:p.onkey(p,t);}r.preventDefault();});m.push('','',this.label,''+(this.voiceLabel?this.voiceLabel+' ':'')+''+''+this.label+''+''+''+''+''+'');if(this.onRender)this.onRender();return p;},createPanel:function(l){if(this._.panel)return;var m=this._.panelDefinition,n=m.parent||a.document.getBody(),o=new k.floatPanel(l,n,m),p=o.addListBlock(this.id,this.multiSelect),q=this;o.onShow=function(){if(q.className)this.element.getFirst().addClass(q.className+'_panel');q.setState(1);p.focus(!q.multiSelect&&q.getValue());q._.on=1;if(q.onOpen)q.onOpen();};o.onHide=function(){if(q.className)this.element.getFirst().removeClass(q.className+'_panel');q.setState(2);q._.on=0;if(q.onClose)q.onClose();};o.onEscape=function(){o.hide();q.document.getById('cke_'+q.id).getFirst().getNext().focus();};p.onClick=function(r,s){q.document.getWindow().focus(); -if(q.onClick)q.onClick.call(q,r,s);if(s)q.setValue(r,q._.items[r]);else q.setValue('');o.hide();};this._.panel=o;this._.list=p;o.getBlock(this.id).onHide=function(){q._.on=0;q.setState(2);};if(this.init)this.init();},setValue:function(l,m){var o=this;o._.value=l;var n=o.document.getById('cke_'+o.id+'_text');if(!(l||m)){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:true,breakBeforeClose:!l[m]['#'],breakAfterClose:true});n.setRules('br',{breakAfterOpen:true});n.setRules('title',{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(this.forceSimpleAmpersand)m=m.replace(/&/,'&');this._.output.push(' ',l,'="',m,'"');},closeTag:function(l){var n=this;var m=n._.rules[l];if(m&&m.indent)n._.indentation=n._.indentation.substr(n.indentationChars.length);if(n._.indent)n.indentation();else if(m&&m.breakBeforeClose){n.lineBreak();n.indentation();}n._.output.push('');if(m&&m.breakAfterClose)n.lineBreak(); -},text:function(l){if(this._.indent){this.indentation();l=e.ltrim(l);}this._.output.push(l);},comment:function(l){if(this._.indent)this.indentation();this._.output.push('');},lineBreak:function(){var l=this;if(l._.output.length>0)l._.output.push(l.lineBreakChars);l._.indent=true;},indentation:function(){this._.output.push(this._.indentation);this._.indent=false;},setRules:function(l,m){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;N0?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 U=this;var L=[],M=K.label?' title="'+e.htmlEncode(K.label)+'"':'',N=K.elements,O=a.dialog._.uiElementBuilders.vbox.build(U,{type:'vbox',className:'cke_dialog_page_contents',children:K.elements,expand:!!K.expand,padding:K.padding,style:K.style||'width: 100%;'},L),P=h.createFromHtml(L.join('')),Q=h.createFromHtml(['0?' cke_last':'cke_first',M,!!K.hidden?' style="display:none"':'',' id="',K.id+'_',e.getNextNumber(),'" href="javascript:void(0)"',' hidefocus="true">',K.label,''].join(''));if(U._.pageCount===0)U.parts.dialog.addClass('cke_single_page');else U.parts.dialog.removeClass('cke_single_page');U._.tabs[K.id]=[Q,P];U._.tabIdList.push(K.id);U._.pageCount++;U._.lastTab=Q;var R=U._.contents[K.id]={},S,T=O.getChild();while(S=T.shift()){R[S.id]=S;if(typeof S.getChild=='function')T.push.apply(T,S.getChild());}P.setAttribute('name',K.id);P.appendTo(U.parts.contents);Q.unselectable();U.parts.tabs.append(Q);if(K.accessKey){E(U,U,'CTRL+'+K.accessKey,H,G);U._.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();}}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){return this._.contents[K][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(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.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 V=[''];for(T=0;T0)V.push('style="'+X.join('; ')+'" ');V.push('>',M[T],'');}V.push('');return V.join('');};k.dialog.uiElement.call(this,K,O||{type:'hbox'},N,'table',S,O&&O.align&&{align:O.align}||null,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,null,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