Index: /CKEditor/trunk/_source/core/config.js
===================================================================
--- /CKEditor/trunk/_source/core/config.js	(revision 3109)
+++ /CKEditor/trunk/_source/core/config.js	(revision 3110)
@@ -148,5 +148,5 @@
 	 */
 
-	plugins : 'basicstyles,blockquote,button,clipboard,elementspath,find,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,showblocks,sourcearea,table,specialchar,tab,templates,toolbar,undo,wysiwygarea',
+	plugins : 'basicstyles,blockquote,button,clipboard,elementspath,find,flashhorizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,showblocks,sourcearea,table,specialchar,tab,templates,toolbar,undo,wysiwygarea',
 
 	/**
Index: /CKEditor/trunk/_source/core/dom/element.js
===================================================================
--- /CKEditor/trunk/_source/core/dom/element.js	(revision 3109)
+++ /CKEditor/trunk/_source/core/dom/element.js	(revision 3110)
@@ -437,6 +437,8 @@
 		},
 
-		getElementsByTag : function( tagName )
-		{
+		getElementsByTag : function( tagName, namespace )
+		{
+			if ( !CKEDITOR.env.ie && namespace )
+				tagName = namespace + ':' + tagName;
 			return new CKEDITOR.dom.nodeList( this.$.getElementsByTagName( tagName ) );
 		},
@@ -555,4 +557,11 @@
 			// Cache the lowercased name inside a closure.
 			var nodeName = this.$.nodeName.toLowerCase();
+
+			if ( CKEDITOR.env.ie )
+			{
+				var scopeName = this.$.scopeName;
+				if ( scopeName != 'HTML' )
+					nodeName = scopeName.toLowerCase() + ':' + nodeName;
+			}
 
 			return (
Index: /CKEditor/trunk/_source/core/htmlparser/element.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/element.js	(revision 3109)
+++ /CKEditor/trunk/_source/core/htmlparser/element.js	(revision 3110)
@@ -73,4 +73,7 @@
 
 	var ckeAttrRegex = /^_cke/,
+		ckeNamespaceRegex = /^cke:/,
+		ckeStyleWidthRegex = /width\s*:\s*(\d+)/i,
+		ckeStyleHeightRegex = /height\s*:\s*(\d+)/i,
 		ckeClassRegex = /(?:^|\s+)cke_[^\s]*/g,
 		ckePrivateAttrRegex = /^_cke_pa_/;
@@ -114,5 +117,5 @@
 		{
 			var attributes = this.attributes;
-			
+
 			// The "_cke_realelement" attribute indicates that the current
 			// element is a placeholder for another element.
@@ -120,4 +123,38 @@
 			{
 				var realFragment = new CKEDITOR.htmlParser.fragment.fromHtml( decodeURIComponent( attributes._cke_realelement ) );
+
+				// If _cke_resizable is set, and the fake element contains inline CSS width
+				// and height; then sync the width and height to the real element.
+				if ( attributes._cke_resizable && ( 'style' in attributes ) )
+				{
+					var match = ckeStyleWidthRegex.exec( attributes.style ),
+						width = match ? match[1] : null;
+					match = ckeStyleHeightRegex.exec( attributes.style );
+					var height = match ? match[1] : null;
+					
+					var targetElement = realFragment.children[ 0 ];
+					if ( targetElement && ( width != null || height != null ) )
+					{
+						targetElement.attributes.width = width;
+						targetElement.attributes.height = height;
+
+						// Special case for #2916: If there's an EMBED inside an OBJECT, we need
+						// to set the EMBED's dimensions as well.
+						if ( targetElement.name == 'cke:object' )
+						{
+							for ( var i = 0 ; i < targetElement.children.length ; i++ )
+							{
+								var child = targetElement.children[i];
+								if ( child.name == 'cke:embed' )
+								{
+									child.attributes.width = width;
+									child.attributes.height = height;
+									break;
+								}
+							}
+						}
+					}
+				}
+
 				realFragment.writeHtml( writer );
 				return;
@@ -132,6 +169,9 @@
 			}
 
+			// Ignore cke: prefixes when writing HTML.
+			var writeName = this.name.replace( ckeNamespaceRegex, '' );
+
 			// Open element tag.
-			writer.openTag( this.name, this.attributes );
+			writer.openTag( writeName, this.attributes );
 
 			// Copy all attributes to an array.
@@ -170,5 +210,5 @@
 
 			// Close the tag.
-			writer.openTagClose( this.name, this.isEmpty );
+			writer.openTagClose( writeName, this.isEmpty );
 
 			if ( !this.isEmpty )
@@ -178,5 +218,5 @@
 
 				// Close the element.
-				writer.closeTag( this.name );
+				writer.closeTag( writeName );
 			}
 		}
Index: /CKEditor/trunk/_source/core/htmlparser/fragment.js
===================================================================
--- /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3109)
+++ /CKEditor/trunk/_source/core/htmlparser/fragment.js	(revision 3110)
@@ -91,4 +91,8 @@
 		parser.onTagOpen = function( tagName, attributes, selfClosing )
 		{
+			// If the tag name is ?xml:namespace, ignore.
+			if ( tagName == '?xml:namespace' )
+				return;
+
 			var element = new CKEDITOR.htmlParser.element( tagName, attributes );
 
Index: /CKEditor/trunk/_source/lang/en.js
===================================================================
--- /CKEditor/trunk/_source/lang/en.js	(revision 3109)
+++ /CKEditor/trunk/_source/lang/en.js	(revision 3110)
@@ -207,6 +207,6 @@
 		headersRow		: 'First Row',
 		headersBoth		: 'Both',
-		invalidRows		: 'Number of rows must be an integer greater than 0.',
-		invalidCols		: 'Number of columns must be an integer greater than 0.',
+		invalidRows		: 'Number of rows must be a number greater than 0.',
+		invalidCols		: 'Number of columns must be a number greater than 0.',
 		invalidBorder	: 'Border size must be a number.',
 		invalidWidth	: 'Table width must be a number.',
@@ -369,5 +369,10 @@
 		height	: 'Height',
 		hSpace	: 'HSpace',
-		vSpace	: 'VSpace'
+		vSpace	: 'VSpace',
+		validateSrc : 'URL must not be empty.',
+		validateWidth : 'Width must be a number.',
+		validateHeight : 'Height must be a number.',
+		validateHSpace : 'HSpace must be a number.',
+		validateVSpace : 'VSpace must be a number.'
 	},
 
Index: /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js	(revision 3109)
+++ /CKEditor/trunk/_source/plugins/fakeobjects/plugin.js	(revision 3110)
@@ -6,5 +6,5 @@
 CKEDITOR.plugins.add( 'fakeobjects' );
 
-CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType )
+CKEDITOR.editor.prototype.createFakeElement = function( realElement, className, realElementType, isResizable )
 {
 	var attributes = 
@@ -16,4 +16,6 @@
 	if ( realElementType )
 		attributes._cke_real_element_type = realElementType;
+	if ( isResizable )
+		attributes._cke_resizable = isResizable;
 
 	return this.document.createElement( 'img', { attributes : attributes } );
@@ -22,12 +24,5 @@
 CKEDITOR.editor.prototype.restoreRealElement = function( fakeElement )
 {
-	var html = decodeURIComponent( fakeElement.getAttribute( '_cke_realelement' ) ),
-		realElement = CKEDITOR.dom.element.createFromHtml( html, this.document );
-
-	if ( fakeElement.$.style.width )
-		realElement.setStyle( 'width', fakeElement.$.style.width );
-	if ( fakeElement.$.style.height )
-		realElement.setStyle( 'height', fakeElement.$.style.height );
-
-	return realElement;
+	var html = decodeURIComponent( fakeElement.getAttribute( '_cke_realelement' ) );
+	return CKEDITOR.dom.element.createFromHtml( html, this.document );
 };
Index: /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js
===================================================================
--- /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js	(revision 3110)
+++ /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js	(revision 3110)
@@ -0,0 +1,665 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+(function()
+{
+	/*
+	 * It is possible to set things in three different places.
+	 * 1. As attributes in the object tag.
+	 * 2. As param tags under the object tag.
+	 * 3. As attributes in the embed tag.
+	 * It is possible for a single attribute to be present in more than one place.
+	 * So let's define a mapping between a sementic attribute and its syntactic
+	 * equivalents.
+	 * Then we'll set and retrieve attribute values according to the mapping,
+	 * instead of having to check and set each syntactic attribute every time.
+	 *
+	 * Reference: http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701
+	 */
+	var ATTRTYPE_OBJECT = 1,
+		ATTRTYPE_PARAM = 2,
+		ATTRTYPE_EMBED = 4;
+
+	var attributesMap =
+	{
+		id : [ { type : ATTRTYPE_OBJECT, name : CKEDITOR.env.ie ? '_cke_saved_id' : 'id' } ],
+		classid : [ { type : ATTRTYPE_OBJECT, name : 'classid' } ],
+		codebase : [ { type : ATTRTYPE_OBJECT, name : 'codebase'} ],
+		pluginspage : [ { type : ATTRTYPE_EMBED, name : 'pluginspage' } ],
+		src : [ { type : ATTRTYPE_PARAM, name : 'movie' }, { type : ATTRTYPE_EMBED, name : 'src' } ],
+		name : [ { type : ATTRTYPE_EMBED, name : 'name' } ],
+		align : [ { type : ATTRTYPE_OBJECT, name : 'align' } ],
+		title : [ { type : ATTRTYPE_OBJECT, name : 'title' }, { type : ATTRTYPE_EMBED, name : 'title' } ],
+		'class' : [ { type : ATTRTYPE_OBJECT, name : 'class' }, { type : ATTRTYPE_EMBED, name : 'class'} ],
+		width : [ { type : ATTRTYPE_OBJECT, name : 'width' }, { type : ATTRTYPE_EMBED, name : 'width' } ],
+		height : [ { type : ATTRTYPE_OBJECT, name : 'height' }, { type : ATTRTYPE_EMBED, name : 'height' } ],
+		hSpace : [ { type : ATTRTYPE_OBJECT, name : 'hSpace' }, { type : ATTRTYPE_EMBED, name : 'hSpace' } ],
+		vSpace : [ { type : ATTRTYPE_OBJECT, name : 'vSpace' }, { type : ATTRTYPE_EMBED, name : 'vSpace' } ],
+		style : [ { type : ATTRTYPE_OBJECT, name : 'style' }, { type : ATTRTYPE_EMBED, name : 'style' } ],
+		type : [ { type : ATTRTYPE_EMBED, name : 'type' } ]
+	};
+
+	var names = [ 'play', 'loop', 'menu', 'quality', 'scale', 'salign', 'wmode', 'bgcolor', 'base', 'flashvars', 'allowScriptAccess',
+		'allowFullScreen' ];
+	for ( var i = 0 ; i < names.length ; i++ )
+		attributesMap[ names[i] ] = [ { type : ATTRTYPE_EMBED, name : names[i] }, { type : ATTRTYPE_PARAM, name : names[i] } ];
+	names = [ 'allowFullScreen', 'play', 'loop', 'menu' ];
+	for ( var i = 0 ; i < names.length ; i++ )
+		attributesMap[ names[i] ][0]['default'] = attributesMap[ names[i] ][1]['default'] = true;
+
+	function loadValue( objectNode, embedNode, paramMap )
+	{
+		var attributes = attributesMap[ this.id ];
+		if ( !attributes )
+			return;
+
+		var isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
+		for ( var i = 0 ; i < attributes.length ; i++ )
+		{
+			var attrDef = attributes[ i ];
+			switch ( attrDef.type )
+			{
+				case ATTRTYPE_OBJECT:
+					if ( !objectNode )
+						continue;
+					if ( objectNode.getAttribute( attrDef.name ) != null )
+					{
+						var value = objectNode.getAttribute( attrDef.name );
+						if ( isCheckbox )
+							this.setValue( value.toLowerCase() == 'true' );
+						else
+							this.setValue( value );
+						return;
+					}
+					else if ( isCheckbox )
+						this.setValue( !!attrDef[ 'default' ] );
+				case ATTRTYPE_PARAM:
+					if ( !objectNode )
+						continue;
+					if ( attrDef.name in paramMap )
+					{
+						var value = paramMap[ attrDef.name ];
+						if ( isCheckbox )
+							this.setValue( value.toLowerCase() == 'true' );
+						else
+							this.setValue( value );
+						return;
+					}
+					else if ( isCheckbox )
+						this.setValue( !!attrDef[ 'default' ] );
+				case ATTRTYPE_EMBED:
+					if ( !embedNode )
+						continue;
+					if ( embedNode.getAttribute( attrDef.name ) != null )
+					{
+						var value = embedNode.getAttribute( attrDef.name );
+						if ( isCheckbox )
+							this.setValue( value.toLowerCase() == 'true' );
+						else
+							this.setValue( value );
+						return;
+					}
+					else if ( isCheckbox )
+						this.setValue( !!attrDef[ 'default' ] );
+				default:
+			}
+		}
+	}
+
+	function commitValue( objectNode, embedNode, paramMap )
+	{
+		var attributes = attributesMap[ this.id ];
+		if ( !attributes )
+			return;
+
+		var isRemove = ( this.getValue() === '' ),
+			isCheckbox = ( this instanceof CKEDITOR.ui.dialog.checkbox );
+
+		for ( var i = 0 ; i < attributes.length ; i++ )
+		{
+			var attrDef = attributes[i];
+			switch ( attrDef.type )
+			{
+				case ATTRTYPE_OBJECT:
+					if ( !objectNode )
+						continue;
+					var value = this.getValue();
+					if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
+						objectNode.removeAttribute( attrDef.name );
+					else
+						objectNode.setAttribute( attrDef.name, value );
+					break;
+				case ATTRTYPE_PARAM:
+					if ( !objectNode )
+						continue;
+					var value = this.getValue();
+					if ( isRemove || isCheckbox && value === attrDef[ 'default' ] )
+					{
+						if ( attrDef.name in paramMap )
+							paramMap[ attrDef.name ].remove();
+					}
+					else
+					{
+						if ( attrDef.name in paramMap ) 
+							paramMap[ attrDef.name ].setAttribute( 'value', value );
+						else
+						{
+							var param = CKEDITOR.dom.element.createFromHtml( '<cke:param></cke:param>', objectNode.getDocument() );
+							param.setAttributes( { name : attrDef.name, value : value } );
+							if ( objectNode.getChildCount() < 1 )
+								param.appendTo( objectNode );
+							else
+								param.insertBefore( objectNode.getFirst() );
+						}
+					}
+					break;
+				case ATTRTYPE_EMBED:
+					if ( !embedNode )
+						continue;
+					var value = this.getValue();
+					if ( isRemove || isCheckbox && value === attrDef[ 'default' ])
+						embedNode.removeAttribute( attrDef.name );
+					else
+						embedNode.setAttribute( attrDef.name, value );
+				default:
+			}
+		}
+	}
+
+	CKEDITOR.dialog.add( 'flash', function( editor )
+	{
+		var makeObjectTag = !editor.config.flashEmbedTagOnly,
+			makeEmbedTag = editor.config.flashAddEmbedTag || editor.config.flashEmbedTagOnly;
+
+		var previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.image.preview ) +'<br>' +
+			'<div id="FlashPreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>' +
+			'<div id="FlashPreviewBox"></div></div>';
+
+		return {
+			title : editor.lang.flash.title,
+			minWidth : 450,
+			minHeight : 400,
+			onLoad : function()
+			{
+				if ( editor.config.flashUploadTab == false )
+					this.hidePage( 'Upload' );		// Hide Upload tab.
+
+				if ( editor.config.flashBrowseServer == false )
+					this.getContentElement( 'info', 'browse' ).getElement().hide();
+			},
+			onShow : function()
+			{
+				// Clear previously saved elements.
+				this.fakeImage = this.objectNode = this.embedNode = null;
+
+				// Try to detect any embed or object tag that has Flash parameters.
+				var fakeImage = this.getSelectedElement();
+				if ( fakeImage && fakeImage.getAttribute( '_cke_real_element_type' ) && fakeImage.getAttribute( '_cke_real_element_type' ) == 'flash' )
+				{
+					this.fakeImage = fakeImage;
+
+					var realElement = editor.restoreRealElement( fakeImage ),
+						objectNode = null, embedNode = null, paramMap = {};
+					if ( realElement.getName() == 'cke:object' )
+					{
+						objectNode = realElement;
+						var embedList = objectNode.getElementsByTag( 'embed', 'cke' );
+						if ( embedList.count() > 0 )
+							embedNode = embedList.getItem( 0 );
+						var paramList = objectNode.getElementsByTag( 'param', 'cke' );
+						for ( var i = 0, length = paramList.count() ; i < length ; i++ )
+						{
+							var item = paramList.getItem( i ),
+								name = item.getAttribute( 'name' ),
+								value = item.getAttribute( 'value' );
+							paramMap[ name ] = value;
+						}
+					}
+					else if ( realElement.getName() == 'cke:embed' )
+						embedNode = realElement;
+
+					this.objectNode = objectNode;
+					this.embedNode = embedNode;
+
+					this.setupContent( objectNode, embedNode, paramMap, fakeImage );
+				}
+			},
+			onOk : function()
+			{
+				// If there's no selected object or embed, create one. Otherwise, reuse the
+				// selected object and embed nodes.
+				var objectNode = null,
+					embedNode = null,
+					paramMap = null;
+				if ( !this.fakeImage )
+				{
+					if ( makeObjectTag )
+					{
+						objectNode = CKEDITOR.dom.element.createFromHtml( '<cke:object></cke:object>', editor.document );
+						var attributes = {
+							classid : 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000',
+							codebase : 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'
+						};
+						objectNode.setAttributes( attributes );
+					}
+					if ( makeEmbedTag )
+					{
+						embedNode = CKEDITOR.dom.element.createFromHtml( '<cke:embed></cke:embed>', editor.document );
+						embedNode.setAttributes(
+							{
+								type : 'application/x-shockwave-flash',
+								pluginspage : 'http://www.macromedia.com/go/getflashplayer'
+							} );
+						if ( objectNode )
+							embedNode.appendTo( objectNode );
+					}
+				}
+				else
+				{
+					objectNode = this.objectNode;
+					embedNode = this.embedNode;
+				}
+
+				// Produce the paramMap if there's an object tag.
+				if ( objectNode )
+				{
+					paramMap = {};
+					var paramList = objectNode.getElementsByTag( 'param', 'cke' );
+					for ( var i = 0, length = paramList.count() ; i < length ; i++ )
+						paramMap[ paramList.getItem( i ).getAttribute( 'name' ) ] = paramList.getItem( i );
+				}
+
+				// Apply or remove flash parameters.
+				var extraStyles = {};
+				this.commitContent( objectNode, embedNode, paramMap, extraStyles );
+
+				// Refresh the fake image.
+				var newFakeImage = editor.createFakeElement( objectNode || embedNode, 'cke_flash', 'flash', true );
+				newFakeImage.setStyles( extraStyles );
+				if ( this.fakeImage )
+					newFakeImage.replace( this.fakeImage );
+				else
+				{
+					this.restoreSelection();
+					editor.insertElement( newFakeImage );
+				}
+			},
+			contents : [
+				{
+					id : 'info',
+					label : editor.lang.common.generalTab,
+					accessKey : 'I',
+					elements :
+					[
+						{
+							type : 'vbox',
+							padding : 0,
+							children :
+							[
+								{
+									type : 'html',
+									html : '<span>' + CKEDITOR.tools.htmlEncode( editor.lang.image.url ) + '</span>'
+								},
+								{
+									type : 'hbox',
+									widths : [ '280px', '110px' ],
+									align : 'right',
+									children :
+									[
+										{
+											id : 'src',
+											type : 'text',
+											label : '',
+											validate : CKEDITOR.dialog.validate.notEmpty( editor.lang.flash.validateSrc ),
+											setup : loadValue,
+											commit : commitValue,
+											onLoad : function()
+											{
+												var dialog = this.getDialog();
+												var previewElement = dialog.getContentElement( 'info', 'preview' ).getElement().getChild( 3 );
+												this.getInputElement().on( 'change', function()
+													{
+														previewElement.setHtml( '<embed height="100%" width="100%" src="'
+																+ CKEDITOR.tools.htmlEncode( this.getValue() )
+																+ '" type="application/x-shockwave-flash"></embed>' );
+													} );
+											}
+										},
+										{
+											type : 'button',
+											id : 'browse',
+											align : 'center',
+											label : editor.lang.common.browseServer
+										}
+									]
+								}
+							]
+						},
+						{
+							type : 'hbox',
+							widths : [ '25%', '25%', '25%', '25%', '25%' ],
+							children :
+							[
+								{
+									type : 'text',
+									id : 'width',
+									label : editor.lang.flash.width,
+									validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateWidth ),
+									setup : function( objectNode, embedNode, paramMap, fakeImage )
+									{
+										loadValue.apply( this, arguments );
+										if ( fakeImage )
+										{
+											var fakeImageWidth = parseInt( fakeImage.$.style.width, 10 );
+											if ( !isNaN( fakeImageWidth ) )
+												this.setValue( fakeImageWidth );
+										}
+									},
+									commit : function( objectNode, embedNode, paramMap, extraStyles )
+									{
+										commitValue.apply( this, arguments );
+										if ( this.getValue() != '' )
+											extraStyles.width = this.getValue() + 'px';
+									}
+								},
+								{
+									type : 'text',
+									id : 'height',
+									label : editor.lang.flash.height,
+									validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHeight ),
+									setup : function( objectNode, embedNode, paramMap, fakeImage )
+									{
+										loadValue.apply( this, arguments );
+										if ( fakeImage )
+										{
+											var fakeImageHeight = parseInt( fakeImage.$.style.height, 10 );
+											if ( !isNaN( fakeImageHeight ) )
+												this.setValue( fakeImageHeight );
+										}
+									},
+									commit : function( objectNode, embedNode, paramMap, extraStyles )
+									{
+										commitValue.apply( this, arguments );
+										if ( this.getValue() != '' )
+											extraStyles.height = this.getValue() + 'px';
+									}
+								},
+								{
+									type : 'text',
+									id : 'hSpace',
+									label : editor.lang.flash.hSpace,
+									validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateHSpace ),
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'text',
+									id : 'vSpace',
+									label : editor.lang.flash.vSpace,
+									validate : CKEDITOR.dialog.validate.integer( editor.lang.flash.validateVSpace ),
+									setup : loadValue,
+									commit : commitValue
+								}
+							]
+						},
+
+						{
+							type : 'vbox',
+							children :
+							[
+								{
+									type : 'html',
+									id : 'preview',
+									style : 'width:95%;',
+									html : previewAreaHtml
+								}
+							]
+						}
+					]
+				},
+				{
+					id : 'Upload',
+					label : editor.lang.common.upload,
+					elements :
+					[
+						{
+							type : 'file',
+							id : 'upload',
+							label : editor.lang.common.upload,
+							action : editor.config.image_uploadAction,
+							size : 38
+						},
+						{
+							type : 'fileButton',
+							id : 'uploadButton',
+							label : editor.lang.common.uploadSubmit,
+							'for' : [ 'Upload', 'upload' ]
+						}
+					]
+				},
+				{
+					id : 'properties',
+					label : editor.lang.flash.propertiesTab,
+					elements :
+					[
+						{
+							type : 'hbox',
+							widths : [ '50%', '50%' ],
+							children :
+							[
+								{
+									id : 'scale',
+									type : 'select',
+									label : editor.lang.flash.scale,
+									'default' : '',
+									style : 'width : 100%;',
+									items :
+									[
+										[ editor.lang.common.notSet , ''],
+										[ editor.lang.flash.scaleAll, 'showall' ],
+										[ editor.lang.flash.scaleNoBorder, 'noborder' ],
+										[ editor.lang.flash.scaleFit, 'exactfit' ]
+									],
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									id : 'allowScriptAccess',
+									type : 'select',
+									label : editor.lang.flash.access,
+									'default' : '',
+									style : 'width : 100%;',
+									items :
+									[
+										[ editor.lang.common.notSet , ''],
+										[ editor.lang.flash.accessAlways, 'always' ],
+										[ editor.lang.flash.accessSameDomain, 'samedomain' ],
+										[ editor.lang.flash.accessNever, 'never' ]
+									],
+									setup : loadValue,
+									commit : commitValue
+								}
+							]
+						},
+						{
+							type : 'hbox',
+							widths : [ '50%', '50%' ],
+							children :
+							[
+								{
+									id : 'wmode',
+									type : 'select',
+									label : editor.lang.flash.windowMode,
+									'default' : '',
+									style : 'width : 100%;',
+									items :
+									[
+										[ editor.lang.common.notSet , ''],
+										[ 'window' ],
+										[ 'opaque' ],
+										[ 'transparent' ]
+									],
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									id : 'quality',
+									type : 'select',
+									label : editor.lang.flash.quality,
+									'default' : 'high',
+									style : 'width : 100%;',
+									items :
+									[
+										[ editor.lang.common.notSet , ''],
+										[ 'best' ],
+										[ 'high' ],
+										[ 'autohigh' ],
+										[ 'medium' ],
+										[ 'autolow' ],
+										[ 'low' ]
+									],
+									setup : loadValue,
+									commit : commitValue
+								},
+							]
+						},
+						{
+							type : 'hbox',
+							widths : [ '50%', '50%' ],
+							children :
+							[
+								{
+									id : 'align',
+									type : 'select',
+									label : editor.lang.flash.align,
+									'default' : '',
+									style : 'width : 100%;',
+									items :
+									[
+										[ editor.lang.common.notSet , ''],
+										[ editor.lang.image.alignLeft , 'left'],
+										[ editor.lang.image.alignAbsBottom , 'absBottom'],
+										[ editor.lang.image.alignAbsMiddle , 'absMiddle'],
+										[ editor.lang.image.alignBaseline , 'baseline'],
+										[ editor.lang.image.alignBottom , 'bottom'],
+										[ editor.lang.image.alignMiddle , 'middle'],
+										[ editor.lang.image.alignRight , 'right'],
+										[ editor.lang.image.alignTextTop , 'textTop'],
+										[ editor.lang.image.alignTop , 'top']
+									],
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'html',
+									html : '<div></div>'
+								}
+							]
+						},
+						{
+							type : 'vbox',
+							padding : 0,
+							children : 
+							[
+								{
+									type : 'html',
+									html : CKEDITOR.tools.htmlEncode( editor.lang.flash.flashvars )
+								},
+								{
+									type : 'checkbox',
+									id : 'menu',
+									label : editor.lang.flash.chkMenu,
+									'default' : true,
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'checkbox',
+									id : 'play',
+									label : editor.lang.flash.chkPlay,
+									'default' : true,
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'checkbox',
+									id : 'loop',
+									label : editor.lang.flash.chkLoop,
+									'default' : true,
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'checkbox',
+									id : 'allowFullScreen',
+									label : editor.lang.flash.chkFull,
+									'default' : true,
+									setup : loadValue,
+									commit : commitValue
+								}
+							]
+						}
+					]
+				},
+				{
+					id : 'advanced',
+					label : editor.lang.common.advancedTab,
+					elements :
+					[
+						{
+							type : 'hbox',
+							widths : [ '45%', '55%' ],
+							children :
+							[
+								{
+									type : 'text',
+									id : 'id',
+									label : editor.lang.common.id,
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'text',
+									id : 'title',
+									label : editor.lang.common.advisoryTitle,
+									setup : loadValue,
+									commit : commitValue
+								}
+							]
+						},
+						{
+							type : 'hbox',
+							widths : [ '45%', '55%' ],
+							children :
+							[
+								{
+									type : 'text',
+									id : 'bgcolor',
+									label : editor.lang.flash.bgcolor,
+									setup : loadValue,
+									commit : commitValue
+								},
+								{
+									type : 'text',
+									id : 'class',
+									label : editor.lang.common.cssClass,
+									setup : loadValue,
+									commit : commitValue
+								}
+							]
+						},
+						{
+							type : 'text',
+							id : 'style',
+							label : editor.lang.common.cssStyle,
+							setup : loadValue,
+							commit : commitValue
+						}
+					]
+				}
+			]
+		};
+	} );
+})();
Index: /CKEditor/trunk/_source/plugins/flash/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/flash/plugin.js	(revision 3110)
+++ /CKEditor/trunk/_source/plugins/flash/plugin.js	(revision 3110)
@@ -0,0 +1,104 @@
+/*
+Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
+For licensing, see LICENSE.html or http://ckeditor.com/license
+*/
+
+CKEDITOR.plugins.add( 'flash',
+{
+	init : function( editor )
+	{
+		var flash = CKEDITOR.plugins.flash,
+			flashFilenameRegex = /\.swf(?:$|\?)/i,
+			numberRegex = /^\d+(?:\.\d+)?$/;
+	
+		function cssifyLength( length )
+		{
+			if ( numberRegex.test( length ) )
+				return length + 'px';
+			return length;
+		}
+
+		editor.addCommand( 'flash', new CKEDITOR.dialogCommand( 'flash' ) );
+		editor.ui.addButton( 'Flash',
+			{
+				label : editor.lang.common.flash,
+				command : 'flash'
+			});
+		CKEDITOR.dialog.add( 'flash', this.path + 'dialogs/flash.js' );
+
+		editor.addCss(
+			'img.cke_flash' +
+			'{' +
+				'background-image: url(' + CKEDITOR.getUrl( this.path + 'images/flashlogo.gif' ) + ');' +
+				'background-position: center center;' +
+				'background-repeat: no-repeat;' +
+				'border: 1px solid #a9a9a9;' +
+				'width: 80px;' +
+				'height: 80px;' +
+			'}' 
+			);
+
+		editor.on( 'contentDom', function()
+			{
+				var rawObjectNodes = editor.document.$.getElementsByTagName( CKEDITOR.env.ie ? 'object' : 'cke:object' );
+				for ( var i = rawObjectNodes.length - 1, objectNode ; i >= 0 ; i-- )
+				{
+					objectNode = new CKEDITOR.dom.element( rawObjectNodes[ i ] );
+					if ( String( objectNode.getAttribute( 'classid' ) ).toLowerCase() != 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' )
+						continue;
+
+					var fakeElement = editor.createFakeElement( objectNode, 'cke_flash', 'flash', true );
+					if ( objectNode.getAttribute( 'width' ) != null )
+						fakeElement.setStyle( 'width', cssifyLength( objectNode.getAttribute( 'width' ) ) );
+					if ( objectNode.getAttribute( 'height' ) != null )
+						fakeElement.setStyle( 'height', cssifyLength( objectNode.getAttribute( 'height' ) ) );
+					fakeElement.replace( objectNode );
+				}
+
+				var rawEmbedNodes = editor.document.$.getElementsByTagName( CKEDITOR.env.ie ? 'embed' : 'cke:embed' );
+				for ( var i = rawEmbedNodes.length - 1, embedNode ; i >= 0 ; i-- )
+				{
+					embedNode = new CKEDITOR.dom.element( rawEmbedNodes[ i ] );
+					if ( embedNode.getAttribute( 'type' ) != 'application/x-shockwave-flash'
+						&& !flashFilenameRegex.test( embedNode.getAttribute( 'src' ) ) )
+						continue;
+					var fakeElement = editor.createFakeElement( embedNode, 'cke_flash', 'flash', true );
+					if ( embedNode.getAttribute( 'width' ) != null )
+						fakeElement.setStyle( 'width', cssifyLength( embedNode.getAttribute( 'width' ) ) );
+					if ( embedNode.getAttribute( 'height' ) != null )
+						fakeElement.setStyle( 'height', cssifyLength( embedNode.getAttribute( 'height' ) ) );
+					fakeElement.replace( embedNode );
+				}
+			} );
+	},
+
+	requires : [ 'fakeobjects' ]
+} );
+
+CKEDITOR.tools.extend( CKEDITOR.config,
+{
+	flashUploadTab : true,
+	flashUploadAction : 'nowhere.php',
+	flashBrowseServer : true,
+
+	/**
+	 * Save as EMBED tag only. This tag is unrecommended.
+	 * @type Boolean
+	 * @default false
+	 */
+	flashEmbedTagOnly : false,
+
+	/**
+	 * Add EMBED tag as alternative: &lt;object&gt&lt;embed&gt&lt;/embed&gt&lt;/object&gt
+	 * @type Boolean
+	 * @default false
+	 */
+	flashAddEmbedTag : true,
+
+	/**
+	 * Use embedTagOnly and addEmbedTag values on edit.
+	 * @type Boolean
+	 * @default false
+	 */
+	flashConvertOnEdit : false
+} );
Index: /CKEditor/trunk/_source/plugins/toolbar/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 3109)
+++ /CKEditor/trunk/_source/plugins/toolbar/plugin.js	(revision 3110)
@@ -219,5 +219,5 @@
 		'SelectAll', 'RemoveFormat', '-',
 		'Link', 'Unlink', 'Anchor', '-',
-		'Image', '-',
+		'Image', 'Flash', '-',
 		'Table', 'Smiley', 'HorizontalRule', 'SpecialChar', 'PageBreak', '-',
 		'ShowBlocks'
Index: /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js
===================================================================
--- /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3109)
+++ /CKEditor/trunk/_source/plugins/wysiwygarea/plugin.js	(revision 3110)
@@ -74,4 +74,12 @@
 		}
 	};
+
+	// ### protectCkeTags - START
+	var protectCkeTagRegex = /(<\/?)(object|embed|param)/gi
+	var protectCkeTags = function( html )
+	{
+		return html.replace( protectCkeTagRegex, '$1cke:$2' );
+	};
+	// ### protectCkeTags - END
 
 	var onInsertElement = function( evt )
@@ -300,4 +308,7 @@
 								data = protectUrls( data );
 
+								// Protect cke prefixed tags.
+								data = protectCkeTags( data );
+
 								data =
 									editor.config.docType +
Index: /CKEditor/trunk/_source/skins/default/dialog.css
===================================================================
--- /CKEditor/trunk/_source/skins/default/dialog.css	(revision 3109)
+++ /CKEditor/trunk/_source/skins/default/dialog.css	(revision 3110)
@@ -667,5 +667,5 @@
 	white-space : normal;
 	border : 2px ridge black;
-	overflow : scroll;
+	overflow : auto;
 	height : 160px;
 	width : 390px;
Index: /CKEditor/trunk/_source/skins/default/toolbar.css
===================================================================
--- /CKEditor/trunk/_source/skins/default/toolbar.css	(revision 3109)
+++ /CKEditor/trunk/_source/skins/default/toolbar.css	(revision 3110)
@@ -394,4 +394,9 @@
 }
 
+.cke_skin_default a.cke_button_flash .cke_icon
+{
+	background-position: 0 -592px;
+}
+
 .cke_skin_default a.cke_button_pastefromword .cke_icon
 {
