Index: /FCKeditor/trunk/editor/_source/internals/fckcommands.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckcommands.js	(revision 899)
+++ /FCKeditor/trunk/editor/_source/internals/fckcommands.js	(revision 900)
@@ -58,6 +58,6 @@
 		case 'About'		: oCommand = new FCKDialogCommand( 'About'		, FCKLang.About					, 'dialog/fck_about.html'		, 400, 330 ) ; break ;
 
-		case 'Find'			: oCommand = new FCKDialogCommand( 'Find'		, FCKLang.DlgFindTitle			, 'dialog/fck_find.html'		, 340, 170, FCKCommands.GetBooleanState, FCKBrowserInfo.IsOpera ) ; break ;
-		case 'Replace'		: oCommand = new FCKDialogCommand( 'Replace'	, FCKLang.DlgReplaceTitle		, 'dialog/fck_replace.html'		, 340, 200 ) ; break ;
+		case 'Find'			: oCommand = new FCKDialogCommand( 'Find'		, FCKLang.DlgFindAndReplaceTitle			, 'dialog/fck_replace.html'		, 340, 170 ) ; break ;
+		case 'Replace'		: oCommand = new FCKDialogCommand( 'Replace'	, FCKLang.DlgFindAndReplaceTitle		, 'dialog/fck_replace.html'		, 340, 220 ) ; break ;
 
 		case 'Image'		: oCommand = new FCKDialogCommand( 'Image'		, FCKLang.DlgImgTitle			, 'dialog/fck_image.html'		, 450, 400 ) ; break ;
Index: /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js	(revision 899)
+++ /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js	(revision 900)
@@ -102,5 +102,5 @@
 			oToolbarSet = eToolbarTarget.__FCKToolbarSet = new FCKToolbarSet( eTargetDocument ) ;
 			oToolbarSet._IFrame = eToolbarIFrame ;
-
+			
 			if ( FCK.IECleanup )
 				FCK.IECleanup.AddItem( eToolbarTarget, FCKToolbarSet_Target_Cleanup ) ;
Index: /FCKeditor/trunk/editor/dialog/fck_replace.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 899)
+++ /FCKeditor/trunk/editor/dialog/fck_replace.html	(revision 900)
@@ -20,5 +20,5 @@
  * == END LICENSE ==
  *
- * "Replace" dialog box window.
+ * "Find" and "Replace" dialog box window.
 -->
 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -27,7 +27,24 @@
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<meta content="noindex, nofollow" name="robots" />
+	<script src="common/fck_dialog_common.js" type="text/javascript"></script>
 	<script type="text/javascript">
 
 var oEditor = window.parent.InnerDialogLoaded() ;
+var FCKLang = oEditor.FCKLang ;
+
+window.parent.AddTab( 'Find', FCKLang.DlgFindTitle ) ;
+window.parent.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ;
+var idMap = {} ;
+
+function OnDialogTabChange( tabCode )
+{
+	ShowE( 'divFind', ( tabCode == 'Find' ) ) ;
+	ShowE( 'divReplace', ( tabCode == 'Replace' ) ) ;
+	idMap['FindText'] = 'txtFind' + tabCode ;
+	idMap['CheckCase'] = 'chkCase' + tabCode ;
+	idMap['CheckWord'] = 'chkWord' + tabCode ;
+
+	window.parent.SetAutoSize( true ) ;
+}
 
 function OnLoad()
@@ -45,4 +62,10 @@
 	range.Collapse( true ) ;
 	range.Select() ;
+
+	// Show the appropriate tab at startup.
+	if ( window.parent.name.search( 'Replace' ) == -1 )
+		window.parent.SetSelectedTab( 'Find' ) ;
+	else
+		window.parent.SetSelectedTab( 'Replace' ) ;
 }
 
@@ -51,5 +74,6 @@
 	document.getElementById('btnReplace').disabled =
 		document.getElementById('btnReplaceAll').disabled =
-			( document.getElementById('txtFind').value.length == 0 ) ;
+			document.getElementById('btnFind').disabled =
+				( document.getElementById(idMap["FindText"]).value.length == 0 ) ;
 }
 
@@ -63,5 +87,5 @@
 function GetSearchString()
 {
-	return document.getElementById("txtFind").value ;
+	return document.getElementById(idMap['FindText']).value ;
 }
 
@@ -73,10 +97,10 @@
 function GetCheckCase()
 {
-	return !! ( document.getElementById("chkCase").checked ) ;
+	return !! ( document.getElementById(idMap['CheckCase']).checked ) ;
 }
 
 function GetMatchWord()
 {
-	return !! ( document.getElementById("chkWord").checked ) ;
+	return !! ( document.getElementById(idMap['CheckWord']).checked ) ;
 }
 
@@ -210,5 +234,5 @@
 };
 
-function Find()
+function _Find()
 {
 	// Start from the end of the current selection.
@@ -308,4 +332,15 @@
 }
 
+function Find()
+{
+	var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ;
+	range.MoveToSelection() ;
+	range.Collapse( false ) ;
+	range.Select() ;
+
+	if ( ! _Find() )
+		alert( FCKLang.DlgFindNotFoundMsg ) ;
+}
+
 function Replace()
 {
@@ -315,6 +350,6 @@
 	if ( selection.CheckIsCollapsed() )
 	{
-		if (! Find() )
-			alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
+		if (! _Find() )
+			alert( FCKLang.DlgFindNotFoundMsg ) ;
 	}
 	else
@@ -335,5 +370,5 @@
 	var replaceCount = 0 ;
 
-	while ( Find() )
+	while ( _Find() )
 	{
 		range.MoveToSelection() ;
@@ -345,5 +380,5 @@
 	}
 	if ( replaceCount == 0 )
-		alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
+		alert( FCKLang.DlgFindNotFoundMsg ) ;
 	window.parent.Cancel() ;
 }
@@ -351,42 +386,71 @@
 </head>
 <body onload="OnLoad()" style="overflow: hidden">
-	<table cellspacing="3" cellpadding="2" width="100%" border="0">
-		<tr>
-			<td nowrap="nowrap">
-				<label for="txtFind" fcklang="DlgReplaceFindLbl">
-					Find what:</label>
-			</td>
-			<td width="100%">
-				<input id="txtFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1"
-					type="text" />
-			</td>
-			<td>
-				<input id="btnReplace" style="width: 100%" disabled="disabled" onclick="Replace();"
-					type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" />
-			</td>
-		</tr>
-		<tr>
-			<td valign="top" nowrap="nowrap">
-				<label for="txtReplace" fcklang="DlgReplaceReplaceLbl">
-					Replace with:</label>
-			</td>
-			<td valign="top">
-				<input id="txtReplace" style="width: 100%" tabindex="2" type="text" />
-			</td>
-			<td>
-				<input id="btnReplaceAll" disabled="disabled" onclick="ReplaceAll()" type="button"
-					value="Replace All" fcklang="DlgReplaceReplAllBtn" />
-			</td>
-		</tr>
-		<tr>
-			<td valign="bottom" colspan="3">
-				&nbsp;<input id="chkCase" tabindex="3" type="checkbox" /><label for="chkCase" fcklang="DlgReplaceCaseChk">Match
-					case</label>
-				<br />
-				&nbsp;<input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match
-					whole word</label>
-			</td>
-		</tr>
-	</table>
+	<div id="divFind" style="display: none">
+		<table cellspacing="3" cellpadding="2" width="100%" border="0">
+			<tr>
+				<td nowrap="nowrap">
+					<label for="txtFindFind" fcklang="DlgReplaceFindLbl">
+						Find what:</label>
+				</td>
+				<td width="100%">
+					<input id="txtFindFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1"
+						type="text" />
+				</td>
+				<td>
+					<input id="btnFind" style="width: 80px" disabled="disabled" onclick="Find();"
+						type="button" value="Find" fcklang="DlgFindFindBtn" />
+				</td>
+			</tr>
+			<tr>
+				<td valign="bottom" colspan="3">
+					&nbsp;<input id="chkCaseFind" tabindex="3" type="checkbox" /><label for="chkCaseFind" fcklang="DlgReplaceCaseChk">Match
+						case</label>
+					<br />
+					&nbsp;<input id="chkWordFind" tabindex="4" type="checkbox" /><label for="chkWordFind" fcklang="DlgReplaceWordChk">Match
+						whole word</label>
+				</td>
+			</tr>
+		</table>
+	</div>
+	<div id="divReplace" style="display:none">
+		<table cellspacing="3" cellpadding="2" width="100%" border="0">
+			<tr>
+				<td nowrap="nowrap">
+					<label for="txtFindReplace" fcklang="DlgReplaceFindLbl">
+						Find what:</label>
+				</td>
+				<td width="100%">
+					<input id="txtFindReplace" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1"
+						type="text" />
+				</td>
+				<td>
+					<input id="btnReplace" style="width: 80px" disabled="disabled" onclick="Replace();"
+						type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" />
+				</td>
+			</tr>
+			<tr>
+				<td valign="top" nowrap="nowrap">
+					<label for="txtReplace" fcklang="DlgReplaceReplaceLbl">
+						Replace with:</label>
+				</td>
+				<td valign="top">
+					<input id="txtReplace" style="width: 100%" tabindex="2" type="text" />
+				</td>
+				<td>
+					<input id="btnReplaceAll" style="width: 80px" disabled="disabled" onclick="ReplaceAll()" type="button"
+						value="Replace All" fcklang="DlgReplaceReplAllBtn" />
+				</td>
+			</tr>
+			<tr>
+				<td valign="bottom" colspan="3">
+					&nbsp;<input id="chkCaseReplace" tabindex="3" type="checkbox" /><label for="chkCaseReplace" fcklang="DlgReplaceCaseChk">Match
+						case</label>
+					<br />
+					&nbsp;<input id="chkWordReplace" tabindex="4" type="checkbox" /><label for="chkWordReplace" fcklang="DlgReplaceWordChk">Match
+						whole word</label>
+				</td>
+			</tr>
+		</table>
+	</div>
 </body>
 </html>
Index: /FCKeditor/trunk/editor/lang/en-au.js
===================================================================
--- /FCKeditor/trunk/editor/lang/en-au.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/en-au.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "Select...",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "Find and Replace",
+
 // Find Dialog
 DlgFindTitle		: "Find",
Index: /FCKeditor/trunk/editor/lang/en-ca.js
===================================================================
--- /FCKeditor/trunk/editor/lang/en-ca.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/en-ca.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "Select...",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "Find and Replace",
+
 // Find Dialog
 DlgFindTitle		: "Find",
Index: /FCKeditor/trunk/editor/lang/en-uk.js
===================================================================
--- /FCKeditor/trunk/editor/lang/en-uk.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/en-uk.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "Select...",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "Find and Replace",
+
 // Find Dialog
 DlgFindTitle		: "Find",
Index: /FCKeditor/trunk/editor/lang/en.js
===================================================================
--- /FCKeditor/trunk/editor/lang/en.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/en.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "Select...",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "Find and Replace",
+
 // Find Dialog
 DlgFindTitle		: "Find",
Index: /FCKeditor/trunk/editor/lang/zh-cn.js
===================================================================
--- /FCKeditor/trunk/editor/lang/zh-cn.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/zh-cn.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "选择...",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "查找和替换",
+
 // Find Dialog
 DlgFindTitle		: "查找",
Index: /FCKeditor/trunk/editor/lang/zh.js
===================================================================
--- /FCKeditor/trunk/editor/lang/zh.js	(revision 899)
+++ /FCKeditor/trunk/editor/lang/zh.js	(revision 900)
@@ -332,4 +332,7 @@
 DlgCellBtnSelect	: "請選擇…",
 
+// Find and Replace Dialog
+DlgFindAndReplaceTitle	: "尋找與取代",
+
 // Find Dialog
 DlgFindTitle		: "尋找",
