Index: /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2919)
+++ /CKEditor/branches/prototype/_source/plugins/image/dialogs/image.js	(revision 2920)
@@ -420,6 +420,15 @@
 			readAttribute.apply( this, [ 'advanced', 'lang', 'txtLangCode', imgObject ] );
 			readAttribute.apply( this, [ 'advanced', 'longdesc', 'txtGenLongDescr', imgObject ] );
-			readAttribute.apply( this, [ 'advanced', 'class', 'txtGenClass', imgObject ] );
-			readAttribute.apply( this, [ 'advanced', 'style', 'txtdlgGenStyle', imgObject ] );	
+			
+			if ( !readAttribute.apply( this, [ 'advanced', 'style', 'txtdlgGenStyle', imgObject ] ) )
+				if( imgObject.$.style.cssText )
+					this.setValueOf( 'advanced', 'txtdlgGenStyle', imgObject.$.style.cssText );
+
+			if ( !readAttribute.apply( this, [ 'advanced', 'class', 'txtGenClass', imgObject ] ) )
+				if( imgObject.$.style.className )
+					this.setValueOf( 'advanced', 'txtdlgGenStyle', imgObject.$.style.cssText );
+				else 
+					this.setValueOf( 'advanced', 'txtdlgGenStyle', '' );
+
 			readAttribute.apply( this, [ 'advanced', 'title', 'txtGenTitle', imgObject ] );
 		}
@@ -431,5 +440,5 @@
 	var readAttribute = function( page, attribute, input, object )
 	{
-		var attributeValue = object.getAttribute( attribute );
+		var attributeValue = object.getAttribute( attribute, 2 );
 		if ( attributeValue == null )
 			this.setValueOf( page, input, "" );
