Index: /FCKeditor/trunk/editor/_source/classes/fcktoolbarfontformatcombo.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fcktoolbarfontformatcombo.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/classes/fcktoolbarfontformatcombo.js	(revision 411)
@@ -50,4 +50,5 @@
 	// Add the Editor Area CSS to the panel to create a realistic preview.
 	FCKTools.AppendStyleSheet( oTargetDoc, FCKConfig.ToolbarComboPreviewCSS ) ;
+	FCKTools.AppendStyleString( oTargetDoc, FCKConfig.EditorAreaStyles ) ;
 
 	// Add ID and Class to the body
Index: /FCKeditor/trunk/editor/_source/classes/fcktoolbarstylecombo.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fcktoolbarstylecombo.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/classes/fcktoolbarstylecombo.js	(revision 411)
@@ -46,4 +46,5 @@
 	// Add the Editor Area CSS to the panel so the style classes are previewed correctly.
 	FCKTools.AppendStyleSheet( oTargetDoc, FCKConfig.ToolbarComboPreviewCSS ) ;
+	FCKTools.AppendStyleString( oTargetDoc, FCKConfig.EditorAreaStyles ) ;
 	oTargetDoc.body.className += ' ForceBaseFont' ;
 
Index: /FCKeditor/trunk/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/internals/fck.js	(revision 411)
@@ -743,7 +743,11 @@
 	var sTags = '' ;
 	var aCSSs = FCKConfig.EditorAreaCSS ;
+	var sStyles = FCKConfig.EditorAreaStyles ;
 
 	for ( var i = 0 ; i < aCSSs.length ; i++ )
 		sTags += '<link href="' + aCSSs[i] + '" rel="stylesheet" type="text/css" />' ;
+
+	if ( sStyles && sStyles.length > 0 )
+		sTags += "<style>" + sStyles + "</style>" ;
 
 	return sTags ;
Index: /FCKeditor/trunk/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools.js	(revision 411)
@@ -50,4 +50,9 @@
 		return aStyleSheeArray ;
 	}
+}
+
+FCKTools.AppendStyleString = function ( documentElement, cssStyles )
+{
+	this._AppendStyleString( documentElement, cssStyles ) ;
 }
 
Index: /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools_gecko.js	(revision 411)
@@ -45,4 +45,12 @@
 	documentElement.getElementsByTagName("HEAD")[0].appendChild( e ) ;
 	return e ;
+}
+
+// Appends a CSS style string to a document.
+FCKTools._AppendStyleString = function( documentElement, cssStyles )
+{
+	var e = documentElement.createElement( "STYLE" ) ;
+	e.innerHTML = cssStyles ;
+	documentElement.getElementsByTagName( "HEAD" )[0].appendChild( e ) ;
 }
 
Index: /FCKeditor/trunk/editor/_source/internals/fcktools_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktools_ie.js	(revision 410)
+++ /FCKeditor/trunk/editor/_source/internals/fcktools_ie.js	(revision 411)
@@ -31,4 +31,11 @@
 {
 	return documentElement.createStyleSheet( cssFileUrl ).owningElement ;
+}
+
+// Appends a CSS style string to a document.
+FCKTools._AppendStyleSheet = function( documentElement, cssStyles )
+{
+	var s = documentElement.createStyleSheet( "" ) ;
+	s.cssText = cssStyles ;
 }
 
Index: /FCKeditor/trunk/editor/dialog/fck_replace.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 410)
+++ /FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 411)
@@ -294,4 +294,9 @@
 		range.MoveToBookmark2( matchBookmark ) ;
 		range.Select() ;
+		var focus = range._Range.endContainer ;
+		while ( focus && focus.nodeType != 1 )
+			focus = focus.parentNode ;
+		if ( focus )
+		focus.scrollIntoView( false ) ;
 		return true;
 	}
Index: /FCKeditor/trunk/fckconfig.js
===================================================================
--- /FCKeditor/trunk/fckconfig.js	(revision 410)
+++ /FCKeditor/trunk/fckconfig.js	(revision 411)
@@ -31,4 +31,5 @@
 
 FCKConfig.EditorAreaCSS = FCKConfig.BasePath + 'css/fck_editorarea.css' ;
+FCKConfig.EditorAreaStyles = '' ;
 FCKConfig.ToolbarComboPreviewCSS = '' ;
 
@@ -39,5 +40,5 @@
 FCKConfig.FullPage = false ;
 
-FCKConfig.Debug = true ;
+FCKConfig.Debug = false ;
 FCKConfig.AllowQueryStringDebug = true ;
 
