Index: /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2817)
+++ /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2818)
@@ -147,5 +147,6 @@
 		var vspace = dialog.getValueOf( 'info', 'txtVSpace' );
 		var align = dialog.getValueOf( 'info', 'cmbAlign' );
-
+		var title = dialog.getValueOf( 'info', 'txtTitle' );
+		
 		// Validate values
 		border = parseInt( border, 10 );
@@ -161,11 +162,13 @@
 		dialog.editObj[ 'imagePreview' ].setAttribute( 'hspace', hspace );
 		dialog.editObj[ 'imagePreview' ].setAttribute( 'vspace', vspace );
+
 		dialog.editObj[ 'imagePreview' ].setAttribute( 'align', align );
-		
-		dialog.editObj[ 'imagePreview' ].setStyle( 'border', border + 'px solid black');
-		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-top', vspace + 'px');
-		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-bottom', vspace + 'px');
-		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-left', hspace + 'px');
-		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-right', hspace + 'px');
+		dialog.editObj[ 'imagePreview' ].setAttribute( 'align', title );
+
+		dialog.editObj[ 'imagePreview' ].setStyle( 'border', border + 'px solid black' );
+		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-top', vspace + 'px' );
+		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-bottom', vspace + 'px' );
+		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-left', hspace + 'px' );
+		dialog.editObj[ 'imagePreview' ].setStyle( 'margin-right', hspace + 'px' );
 		return 0;
 	}
@@ -183,5 +186,5 @@
 			if ( loader )
 				loader.setStyle('display', '');
-			
+
 			dialog.editObj[ 'imageOriginal' ].on( 'load', function()
 				{
@@ -189,5 +192,5 @@
 					this.editObj[ 'imageOriginal' ].setCustomData( 'isReady', 'true' );
 					this.editObj[ 'imageOriginal' ].removeListener( 'load' );
-					
+
 					// Hide loader
 					var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' );
@@ -325,5 +328,5 @@
 
 			var imgObject = this.editObj[ 'image' ];
-			
+
 			// Fill out all fields.
 			if ( !readAttribute.apply( this, [ 'info', '_cke_saved_url', 'txtUrl', imgObject ] ) )
@@ -343,5 +346,4 @@
 			readAttribute.apply( this, [ 'advanced', 'title', 'txtGenTitle', imgObject ] );
 		}
-
 		updatePreview( this );
 
@@ -367,5 +369,5 @@
 		{
 			this.allowOnChange = true;
-			
+
 			var useLink = false;
 			var removeObj = false;
@@ -375,5 +377,5 @@
 			{
 				var imgTagName = this.editObj[ 'image' ].$.tagName.toLowerCase();
-				
+
 				// Image dialog and Input element.
 				if ( imageDialog && imgTagName == 'input' && confirm( editor.lang.dlgImgButton2Img ) )
@@ -420,5 +422,5 @@
 			this.changedAttibutes[ 'link' ][ 'href' ] =  'javascript:void(0)/*' + CKEDITOR.tools.getNextNumber() + '*/';
 			this.editObj[ 'link' ].setAttributes( this.changedAttibutes[ 'link' ] );
-			
+
 			if ( this.editObj[ 'link' ].getAttribute( '_cke_saved_href' ) 
 				&& this.editObj[ 'link' ].getAttribute( '_cke_saved_href' ) != '' )
@@ -456,5 +458,4 @@
 					this.editObj[ 'link' ].remove( true );
 			}
-
 			this.allowOnChange = false;		// Don't load onChange before onShow.
 
@@ -471,5 +472,5 @@
 			this.editObj[ 'imageOriginal' ] = false;
 			this.editObj[ 'imagePreview' ] = false;
-			
+
 			// Default: create a new element.
 			this.editMode = new Array();
@@ -477,5 +478,5 @@
 			this.editMode[ 'image' ] = false;
 
-			this.changedAttibutes = new Array();			
+			this.changedAttibutes = new Array();
 			this.changedAttibutes[ 'link' ] = new Array();
 			this.changedAttibutes[ 'image' ] = new Array();
@@ -534,5 +535,5 @@
 			this.getContentElement( 'info', 'txtUrl' ).focus();
 		},		
-		onLoad : function( )
+		onLoad : function()
 		{
 			if ( !imageDialog )
@@ -559,5 +560,5 @@
 					}, resetButton );
 			}
-			
+
 			// Activate (Un)LockRatio button
 			var ratioButton= CKEDITOR.document.getById( 'btnLockSizes' );
@@ -583,8 +584,8 @@
 			if ( this.editObj[ 'imagePreview' ] )
 				this.editObj[ 'imagePreview' ].setAttribute( 'src', '' );
-		
+
 			this.editObj[ 'imagePreview' ] = false;
 			this.editObj[ 'imageOriginal' ].remove();
-			
+
 			// Don't call onChange before onShow.
 			this.allowOnChange = false;
@@ -648,4 +649,8 @@
 						label : editor.lang.dlgImgAlt,
 						accessKey : 'A',
+						onChange : function()
+						{
+							onChange( this, 'title' );
+						},
 						validate: function()
 						{
