Index: /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_2_reduced.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_2_reduced.html	(revision 1147)
+++ /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_2_reduced.html	(revision 1147)
@@ -0,0 +1,63 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+	<title>Untitled Page</title>
+	<script type="text/javascript">
+
+window.onload = function()
+{
+	// Get the editable IFRAME.
+	var win = window.frames[ 'xEditorArea' ] ;
+	var doc = win.document ;
+
+	// Fill the document with its startup contents.
+	doc.open() ;
+
+	doc.write( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ) ;
+
+	doc.write( '<html>' ) ;
+	doc.write( '<head><title></title>' ) ;
+	doc.write( '</head><body>' ) ;
+	doc.write( '<p style="height:300px">&nbsp;</p>' ) ;
+	doc.write( '<p id="xHidden">&nbsp;</p>' ) ;
+	doc.write( '</body></html>' ) ;
+
+	doc.close() ;
+	
+	// Start editing on it.
+	doc.designMode = 'on' ;
+
+	// Make the caret blinking there.
+	win.focus() ;
+
+	// Get the element to which we want the caret blinking inside.
+	var p = window.frames[ 'xEditorArea' ].document.getElementById( 'xHidden' ) ;
+	
+	// Move the selection to the start of the <p id="xHidden"> contents.
+	var sel = win.getSelection();
+	
+	var range = document.createRange();
+	range.selectNodeContents( p );
+	range.collapse( true );
+  
+	sel.removeAllRanges() ;
+	sel.addRange( range ) ;
+}
+
+	</script>
+</head>
+<body>
+	<p>
+		Reduced TC for <a href="http://dev.fckeditor.net/ticket/1462">#1462</a> (second
+		attempt).</p>
+	<p>
+		This page should have the IFRAME scrolled down, so the blinking caret position is
+		visible. The selection position should be always visible, even when set by code.
+		Only IE supports it.</p>
+	<p>
+		Just load this page. The caret position will not be visible until you start typing.</p>
+	<hr />
+	<iframe id="xEditorArea" name="xEditorArea" src="about:blank" width="100%" height="200"
+		style="border: #000000 1px solid;"></iframe>
+</body>
+</html>
Index: /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_reduced.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_reduced.html	(revision 1147)
+++ /FCKeditor/branches/versions/2.5.x/_dev/browserbugs/safari/1462_reduced.html	(revision 1147)
@@ -0,0 +1,122 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head>
+    <title>Untitled Page</title>
+    <script type="text/javascript">
+
+window.onload = function()
+{
+	var doc = window.frames[ 'xEditorArea' ].document ;
+
+	doc.open() ;
+
+	doc.write( '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' ) ;
+
+	doc.write( '<html>' ) ;
+	doc.write( '<head><title></title>' ) ;
+	doc.write( '</head><body>' ) ;
+	doc.write( '<div style="height:300px; background-color:yellow"></div>' ) ;
+	doc.write( '<div id="xRed" style="height:100px; background-color:red"></div>' ) ;
+	doc.write( '<div style="height:100px; background-color:blue"></div>' ) ;
+	doc.write( '</body></html>' ) ;
+
+	doc.close() ;
+}
+
+function DoScroll()
+{
+	var div = window.frames[ 'xEditorArea' ].document.getElementById( 'xRed' ) ;
+	div.scrollIntoView( false ) ;
+}
+
+    </script>
+</head>
+<body>
+	<p>Reduced TC for <a href="http://dev.fckeditor.net/ticket/1462">#1462</a>.</p>
+	<p>Scroll down the page until the IFRAME and the button are visible.</p>
+	<hr />
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<iframe id="xEditorArea" name="xEditorArea" src="about:blank" width="100%" height="200" style="border: #000000 1px solid;">
+	</iframe>
+	<p>
+		The above IFRAME constains a yellow and a red DIV elements. By clicking the 
+		following button, only the IFRAME should scroll to show the red DIV, 
+		while the main window should stay at the same position.
+	</p>
+	<p>
+		<input type="button" value="Call xRed.scrollIntoView(false)" onclick="DoScroll();" />
+	</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+	<p>Some text.</p>
+</body>
+</html>
Index: /FCKeditor/branches/versions/2.5.x/_samples/html/sample03.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/_samples/html/sample03.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/_samples/html/sample03.html	(revision 1147)
@@ -39,4 +39,7 @@
 
 	var oCombo = document.getElementById( 'cmbLanguages' ) ;
+
+	// Remove all options. (#1399)
+	oCombo.innerHTML = '' ;
 
 	var aLanguages = new Array() ;
Index: /FCKeditor/branches/versions/2.5.x/_whatsnew.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/_whatsnew.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/_whatsnew.html	(revision 1147)
@@ -22,14 +22,131 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<title>FCKeditor - What's New?</title>
+	<title>FCKeditor ChangeLog - What's New?</title>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<style type="text/css">
 		body { font-family: arial, verdana, sans-serif }
 		p { margin-left: 20px }
+		h1 { border-bottom: solid 1px gray; padding-bottom: 20px }
 	</style>
 </head>
 <body>
+	<h1>
+		FCKeditor ChangeLog - What's New?</h1>
 	<h3>
 		Version 2.5</h3>
+	<p>
+		New Features and Improvements:</p>
+	<ul>
+		<li>The heading options have been moved to the top, in the default settings for the
+			Format combo.</li>
+	</ul>
+	<p>
+		Fixed Bugs:</p>
+	<ul>
+		<li>The focus is now correctly set when working on Safari.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1436">#1436</a>] Nested
+			context menu panels are now correctly closed on Safari.</li>
+		<li>Empty anchors are now properly created on Safari.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1359">#1359</a>] FCKeditor
+			will no longer produce the strange visual effect of creating a selected space and
+			then deleting it in Internet Explorer.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1399">#1399</a>] Removed
+			the empty entry in the language selection box of sample03.html.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1400">#1400</a>] Fixed
+			the issue where the style selection box in sample14.html is not context sensitive.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1401">#1401</a>] Completed
+			Hebrew translation of the user interface.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1409">#1409</a>] Completed
+			Finnish translation of the user interface.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1414">#1414</a>] Fixed
+			the issue where entity code words written inside a &lt;pre&gt; block in Source mode
+			are not converted to the corresponding characters after switching back to editor
+			mode.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1418">#1418</a>] Fixed
+			the issue where a detached toolbar would flicker when FCKeditor is being loaded.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1419">#1419</a>] Fixed
+			the issue where pressing Delete in the middle of two lists would incorrectly move
+			contents after the lists to the character position.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1420">#1420</a>] Fixed
+			the issue where empty list items can become collapsed and uneditable when it has
+			one of more indented list items directly under it. </li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1431">#1431</a>] Fixed
+			the issue where pressing Enter in a &lt;pre&gt; block in Internet Explorer would
+			move the caret one space forward instead of sending it to the next line.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1472">#1472</a>] Completed
+			Arabic translation of the user interface.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1474">#1474</a>] Fixed
+			the issue where reloading a page containing FCKeditor may provoke JavaScript errors
+			in Internet Explorer.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1478">#1478</a>] Fixed
+			the issue where parsing fckstyles.xml fails if the file contains no &lt;style&gt;
+			nodes.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1491">#1491</a>] Fixed
+			the issue where FCKeditor causes the selection to include an "end of line" character
+			in list items even though the list item is empty.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1496">#1496</a>] Fixed
+			the issue where attributes under &lt;area&gt; and &lt;map&gt; nodes are destroyed
+			or left unprotected when switching to and from Source mode.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1500">#1500</a>] Fixed
+			the issue where the function _FCK_PaddingNodeListener() is called excessively which
+			negatively affects performance.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1514">#1514</a>] Fixed
+			the issue where floating menus are incorrectly positioned when the toolbar or the
+			editor frame are not static positioned.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1518">#1518</a>] Fixed
+			the issue where excessive &lt;BR&gt; nodes are not removed after a paragraph is
+			split when creating lists.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1521">#1521</a>] Fixed
+			JavaScript error and erratic behavior of the Replace dialog.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1524">#1524</a>] Fixed
+			the issue where the caret jumps to the beginning or end of a list block and when
+			user is trying to select the end of a list item.</li>
+		<li>Completed Simplified Chinese translation of the user interface.</li>
+		<li>Completed Estonian translation of the user interface.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1406">#1406</a>] Editor
+			was always "dirty" if flash is available in the contents.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1561">#1561</a>] Non standard
+			elements are now properly applied if defined in the styles XML file.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1412">#1412</a>] The _QuickUploadLanguage
+			value is now work properly for Perl.</li>
+		<li>Several compatibility fixes for Firefox 3 (Beta 1):
+			<ul>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1558">#1558</a>] Nested
+					context menu close properly when one of their options is selected.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1556">#1556</a>] Dialogs
+					contents are now showing completely, without scrollbar.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1559">#1559</a>] It is
+					not possible to have more than one panel opened at the same time.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1554">#1554</a>] Links
+					now get underlined.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1557">#1557</a>] The "Automatic"
+					and "More colors..." buttons were improperly styled in the color selector panels
+					(Opera too).</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1462">#1462</a>] The enter
+					key will not any more scroll the main window.</li>
+			</ul>
+		</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1562">#1562</a>] Fixed
+			the issue where empty paragraphs are added around page breaks each time the user
+			switches to Source mode.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1578">#1578</a>] The editor
+			will now scroll correctly when hitting enter in front of a paragraph.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1579">#1579</a>] Fixed
+			the issue where the create table and table properties dialogs are too narrow for
+			certain translations.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1580">#1580</a>] Completed
+			Polish translation of the user interface.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1591">#1591</a>] Fixed
+			JavaScript error when using the blockquote command in an empty document in IE.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1592">#1592</a>] Fixed
+			the issue where attempting to remove a blockquote with an empty paragraph would
+			leave behind an empty blockquote IE.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1594">#1594</a>] Undo/Redo
+			will now work properly for the color selectors.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1597">#1597</a>] The color
+			boxes are now properly rendered in the color selector panels on sample14.html.</li>
+	</ul>
+	<h3>
+		Version 2.5 Beta</h3>
 	<p>
 		New Features and Improvements:</p>
@@ -68,16 +185,16 @@
 					the &quot;Remove All&quot; button, by using the &quot;<b>RemoveFormatTags</b>&quot;
 					setting.</li>
-				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1231">#1231</a>] 
-					[<a target="_blank" href="http://dev.fckeditor.net/ticket/160">#160</a>] Paragraph
-					<b>indentation</b> and <b>justification</b> now uses style attributes and don't
-					create unnecessary elements, and &lt;blockquote&gt; is not anymore used for it.
-					Now, even CSS classes can be used to indent or align text.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1231">#1231</a>] [<a
+					target="_blank" href="http://dev.fckeditor.net/ticket/160">#160</a>] Paragraph <b>indentation</b>
+					and <b>justification</b> now uses style attributes and don't create unnecessary
+					elements, and &lt;blockquote&gt; is not anymore used for it. Now, even CSS classes
+					can be used to indent or align text.</li>
 				<li>All paragraph formatting features work well when EnterMode=br.</li>
-				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/172">#172</a>]
-					All paragraph formatting features work well when list items too.</li>
+				<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/172">#172</a>] All paragraph
+					formatting features work well when list items too.</li>
 			</ul>
 		</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1197">#1197</a>] 
-			[<a target="_blank" href="http://dev.fckeditor.net/ticket/132">#132</a>] The toolbar
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1197">#1197</a>] [<a
+			target="_blank" href="http://dev.fckeditor.net/ticket/132">#132</a>] The toolbar
 			now presents a <strong>new button for Blockquote</strong>. The indentation button
 			will not anymore be used for that.</li>
@@ -148,6 +265,6 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1060">#1060</a>] Compatibility
 			checks with Firefox 3.0 Alpha. </li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/817">#817</a>] 
-			[<a target="_blank" href="http://dev.fckeditor.net/ticket/1077">#1077</a>] New "Merge
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/817">#817</a>] [<a
+			target="_blank" href="http://dev.fckeditor.net/ticket/1077">#1077</a>] New "Merge
 			Down/Right" commands for merging tables cells in non-Gecko browsers.</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1288">#1288</a>] The "More
@@ -156,9 +273,9 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/356">#356</a>] The <strong>
 			Find and Replace</strong> dialogs are now unified into a single dialog with tabs.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/549">#549</a>] Added a 'None'
-			option to the FCKConfig.ToolbarLocation option to allow for hidden toolbars.
-			</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1313">#1313</a>] An XHTML 1.1 target
-			editor sample has been created as sample14.html. </li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/549">#549</a>] Added a
+			'None' option to the FCKConfig.ToolbarLocation option to allow for hidden toolbars.
+		</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1313">#1313</a>] An XHTML
+			1.1 target editor sample has been created as sample14.html. </li>
 		<li>The ASP, ColdFusion and PHP integration have been aligned to our standards.</li>
 	</ul>
@@ -294,5 +411,5 @@
 			system now properly handles Format styles when EnterMode=br.</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/525">#525</a>] The union
-			if successive DIVs will work properly now if EnterMode!=div.</li>
+			of successive DIVs will work properly now if EnterMode!=div.</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1227">#1227</a>] The color
 			commands used an unnecessary temporary variable. Thanks to Matthias Miller</li>
@@ -315,5 +432,5 @@
 		</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/205">#205</a>] Fixed the
-			issue where visible &gt;br&lt; tags at the end of paragraphs are incorrectly removed
+			issue where visible &lt;br&gt; tags at the end of paragraphs are incorrectly removed
 			after switching to and from source mode.</li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1050">#1050</a>] Fixed
@@ -326,5 +443,5 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/135">#135</a>] Fixed the
 			issue where context menus are misplaced in FCKeditor when FCKeditor is created inside
-			a &gt;div&lt; node with scrolling. </li>
+			a &lt;div&gt; node with scrolling. </li>
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1067">#1067</a>] Fixed
 			the issue where context menus are misplaced in Safari when FCKeditor is scrolled
@@ -404,42 +521,43 @@
 		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/923">#923</a>] Font colors
 			are now properly applied on links.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1316">#1316</a>] Fixed the issue
-			where the image dialog expands to a size too big in Safari.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1306">#1306</a>] 
-			[<a target="_blank" href="http://dev.fckeditor.net/ticket/894">#894</a>]
-			The undo system can now undo text formatting steps like setting fonts to bold and italic.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/95">#95</a>] Fixed the issue where
-			FCKeditor breaks &lt;meta&gt; tags in full page mode in some circumstances.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/175">#175</a>] Fixed the issue
-			where entering an email address with a '%' sign in the insert link dialog would cause
-			JavaScript error.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/180">#180</a>] Improved backward
-			compatibility with older PHP versions. FCKeditor can now work with PHP versions down to 
-			4.0.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/192">#192</a>] Document modifying
-			actions from the FCKeditor JavaScript API will now save undo steps.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/246">#246</a>] Using text formatting
-			commands in EnterMode=div will no longer cause tags to randomly disappear.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/327">#327</a>] It is no longer 
-			possible for the browser's back action to misfire when a user presses backspace while an
-			image is being selected in FCKeditor.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/362">#362</a>] Ctrl-Backspace now
-			works in FCKeditor.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/390">#390</a>] Text alignment and
-			justification commands now respects EnterMode=br paragraph rules.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/534">#534</a>] Pressing Ctrl-End
-	       		while the document contains a list towards the end will no longer make the cursor
-			disappear.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/906">#906</a>] It is now possible
-			to have XHTML 1.0 Strict compliant output from a document pasted from Word.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/929">#929</a>] Pressing the Enter
-			key will now produce an undo step.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/934">#934</a>] Fixed the "Cannot 
-			execute code from a freed script" error in IE from editor dialogs.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#942</a>] Server based spell
-			checking with ColdFusion integration no longer breaks fir non en_US languages.</li>
-		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#1056</a>] Deleting everything
-			in the editor document and moving the cursor around will no longer leave the cursor hanging
-			beyond the top of the editor document.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1316">#1316</a>] Fixed
+			the issue where the image dialog expands to a size too big in Safari.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1306">#1306</a>] [<a
+			target="_blank" href="http://dev.fckeditor.net/ticket/894">#894</a>] The undo system
+			can now undo text formatting steps like setting fonts to bold and italic.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/95">#95</a>] Fixed the
+			issue where FCKeditor breaks &lt;meta&gt; tags in full page mode in some circumstances.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/175">#175</a>] Fixed the
+			issue where entering an email address with a '%' sign in the insert link dialog
+			would cause JavaScript error.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/180">#180</a>] Improved
+			backward compatibility with older PHP versions. FCKeditor can now work with PHP
+			versions down to 4.0.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/192">#192</a>] Document
+			modifying actions from the FCKeditor JavaScript API will now save undo steps.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/246">#246</a>] Using text
+			formatting commands in EnterMode=div will no longer cause tags to randomly disappear.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/327">#327</a>] It is no
+			longer possible for the browser's back action to misfire when a user presses backspace
+			while an image is being selected in FCKeditor.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/362">#362</a>] Ctrl-Backspace
+			now works in FCKeditor.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/390">#390</a>] Text alignment
+			and justification commands now respects EnterMode=br paragraph rules.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/534">#534</a>] Pressing
+			Ctrl-End while the document contains a list towards the end will no longer make
+			the cursor disappear.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/906">#906</a>] It is now
+			possible to have XHTML 1.0 Strict compliant output from a document pasted from Word.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/929">#929</a>] Pressing
+			the Enter key will now produce an undo step.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/934">#934</a>] Fixed the
+			"Cannot execute code from a freed script" error in IE from editor dialogs.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#942</a>] Server
+			based spell checking with ColdFusion integration no longer breaks fir non en_US
+			languages.</li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/942">#1056</a>] Deleting
+			everything in the editor document and moving the cursor around will no longer leave
+			the cursor hanging beyond the top of the editor document.</li>
 	</ul>
 	<p>
Index: /FCKeditor/branches/versions/2.5.x/_whatsnew_history.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/_whatsnew_history.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/_whatsnew_history.html	(revision 1147)
@@ -22,12 +22,15 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<title>FCKeditor - What's New?</title>
+	<title>FCKeditor ChangeLog - What's New?</title>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 	<style type="text/css">
 		body { font-family: arial, verdana, sans-serif }
 		p { margin-left: 20px }
+		h1 { border-bottom: solid 1px gray; padding-bottom: 20px }
 	</style>
 </head>
 <body>
+	<h1>
+		FCKeditor ChangeLog - What's New?</h1>
 	<h3>
 		Version 2.4.3</h3>
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange.js	(revision 1147)
@@ -175,91 +175,148 @@
 	},
 
+	/**
+	 * Checks if the start boundary of the current range is "visually" (like a
+	 * selection caret) at the beginning of the block. It means that some
+	 * things could be brefore the range, like spaces or empty inline elements,
+	 * but it would still be considered at the beginning of the block.
+	 */
 	CheckStartOfBlock : function()
 	{
-		var bIsStartOfBlock = this._Cache.IsStartOfBlock ;
+		var cache = this._Cache ;
+		var bIsStartOfBlock = cache.IsStartOfBlock ;
 
 		if ( bIsStartOfBlock != undefined )
 			return bIsStartOfBlock ;
 
-		// Create a clone of the current range.
-		var oTestRange = this.Clone() ;
-
-		// Collapse it to its start point.
-		oTestRange.Collapse( true ) ;
-
-		// Move the start boundary to the start of the block.
-		oTestRange.SetStart( oTestRange.StartBlock || oTestRange.StartBlockLimit, 1 ) ;
-
-		if ( oTestRange.CheckIsCollapsed() )
-			bIsStartOfBlock = true ;
+		// Take the block reference.
+		var block = this.StartBlock || this.StartBlockLimit ;
+
+		var container	= this._Range.startContainer ;
+		var offset		= this._Range.startOffset ;
+		var currentNode ;
+
+		if ( offset > 0 )
+		{
+			// First, check the start container. If it is a text node, get the
+			// substring of the node value before the range offset.
+			if ( container.nodeType == 3 )
+			{
+				var textValue = container.nodeValue.substr( 0, offset ).Trim() ;
+
+				// If we have some text left in the container, we are not at
+				// the end for the block.
+				if ( textValue.length != 0 )
+					return cache.IsStartOfBlock = false ;
+			}
+			else
+				currentNode = container.childNodes[ offset - 1 ] ;
+		}
+
+		// We'll not have a currentNode if the container was a text node, or
+		// the offset is zero.
+		if ( !currentNode )
+			currentNode = FCKDomTools.GetPreviousSourceNode( container, true, null, block ) ;
+
+		while ( currentNode )
+		{
+			switch ( currentNode.nodeType )
+			{
+				case 1 :
+					// It's not an inline element.
+					if ( !FCKListsLib.InlineChildReqElements[ currentNode.nodeName.toLowerCase() ] )
+						return cache.IsStartOfBlock = false ;
+
+					break ;
+
+				case 3 :
+					// It's a text node with real text.
+					if ( currentNode.nodeValue.Trim().length > 0 )
+						return cache.IsStartOfBlock = false ;
+			}
+
+			currentNode = FCKDomTools.GetPreviousSourceNode( currentNode, false, null, block ) ;
+		}
+
+		return cache.IsStartOfBlock = true ;
+	},
+
+	/**
+	 * Checks if the end boundary of the current range is "visually" (like a
+	 * selection caret) at the end of the block. It means that some things
+	 * could be after the range, like spaces, empty inline elements, or a
+	 * single <br>, but it would still be considered at the end of the block.
+	 */
+	CheckEndOfBlock : function( refreshSelection )
+	{
+		var isEndOfBlock = this._Cache.IsEndOfBlock ;
+
+		if ( isEndOfBlock != undefined )
+			return isEndOfBlock ;
+
+		// Take the block reference.
+		var block = this.EndBlock || this.EndBlockLimit ;
+
+		var container	= this._Range.endContainer ;
+		var offset			= this._Range.endOffset ;
+		var currentNode ;
+
+		// First, check the end container. If it is a text node, get the
+		// substring of the node value after the range offset.
+		if ( container.nodeType == 3 )
+		{
+			var textValue = container.nodeValue ;
+			if ( offset < textValue.length )
+			{
+				textValue = textValue.substr( offset ) ;
+
+				// If we have some text left in the container, we are not at
+				// the end for the block.
+				if ( textValue.Trim().length != 0 )
+					return this._Cache.IsEndOfBlock = false ;
+			}
+		}
 		else
-		{
-			// Inserts the contents of the range in a div tag.
-			var eToolDiv = oTestRange.Window.document.createElement( 'div' ) ;
-			oTestRange._Range.cloneContents().AppendTo( eToolDiv ) ;
-
-			// This line is why we don't use CheckIsEmpty() here...
-			// Because using RTrimNode() or TrimNode() would be incorrect - 
-			// TrimNode() and RTrimNode() would delete <br> nodes at the end of the div node,
-			// but for checking start of block they are actually meaningful. (Bug #1350)
-			FCKDomTools.LTrimNode( eToolDiv ) ;
-
-			bIsStartOfBlock = ( eToolDiv.innerHTML.length == 0 ) ;
-		}
-
-		oTestRange.Release() ;
-
-		return ( this._Cache.IsStartOfBlock = bIsStartOfBlock ) ;
-	},
-
-	CheckEndOfBlock : function( refreshSelection )
-	{
-		var bIsEndOfBlock = this._Cache.IsEndOfBlock ;
-
-		if ( bIsEndOfBlock != undefined )
-			return bIsEndOfBlock ;
-
-		// Create a clone of the current range.
-		var oTestRange = this.Clone() ;
-
-		// Collapse it to its end point.
-		oTestRange.Collapse( false ) ;
-
-		// Move the end boundary to the end of the block.
-		oTestRange.SetEnd( oTestRange.EndBlock || oTestRange.EndBlockLimit, 2 ) ;
-
-		bIsEndOfBlock = oTestRange.CheckIsCollapsed() ;
-
-		if ( !bIsEndOfBlock )
-		{
-			// Inserts the contents of the range in a div tag.
-			var eToolDiv = this.Window.document.createElement( 'div' ) ;
-			oTestRange._Range.cloneContents().AppendTo( eToolDiv ) ;
-			FCKDomTools.TrimNode( eToolDiv ) ;
-
-			// Find out if we are in an empty tree of inline elements, like <b><i><span></span></i></b>
-			bIsEndOfBlock = true ;
-			var eLastChild = eToolDiv ;
-			while ( ( eLastChild = eLastChild.lastChild ) )
+			currentNode = container.childNodes[ offset ] ;
+
+		// We'll not have a currentNode if the container was a text node, of
+		// the offset is out the container children limits (after it probably).
+		if ( !currentNode )
+			currentNode = FCKDomTools.GetNextSourceNode( container, true, null, block ) ;
+
+		var hadBr = false ;
+
+		while ( currentNode )
+		{
+			switch ( currentNode.nodeType )
 			{
-				// Check the following:
-				//		1. Is there more than one node in the parents children?
-				//		2. Is the node not an element node?
-				//		3. Is it not a inline element.
-				if ( eLastChild.previousSibling || eLastChild.nodeType != 1 || FCKListsLib.InlineChildReqElements[ eLastChild.nodeName.toLowerCase() ] == null )
-				{
-					// So we are not in the end of the range.
-					bIsEndOfBlock = false ;
-					break ;
-				}
+				case 1 :
+					var nodeName = currentNode.nodeName.toLowerCase() ;
+
+					// It's an inline element.
+					if ( FCKListsLib.InlineChildReqElements[ nodeName ] )
+						break ;
+
+					// It is the first <br> found.
+					if ( nodeName == 'br' && !hadBr )
+					{
+						hadBr = true ;
+						break ;
+					}
+
+					return this._Cache.IsEndOfBlock = false ;
+
+				case 3 :
+					// It's a text node with real text.
+					if ( currentNode.nodeValue.Trim().length > 0 )
+						return this._Cache.IsEndOfBlock = false ;
 			}
-		}
-
-		oTestRange.Release() ;
+
+			currentNode = FCKDomTools.GetNextSourceNode( currentNode, false, null, block ) ;
+		}
 
 		if ( refreshSelection )
 			this.Select() ;
 
-		return this._Cache.IsEndOfBlock = bIsEndOfBlock ;
+		return this._Cache.IsEndOfBlock = true ;
 	},
 
@@ -322,5 +379,5 @@
 			oBookmark.EndNode = eEndSpan ;
 		}
-		
+
 		// Update the range position.
 		if ( eEndSpan )
@@ -331,5 +388,5 @@
 		else
 			this.MoveToPosition( eStartSpan, 4 ) ;
-		
+
 		return oBookmark ;
 	},
@@ -384,9 +441,16 @@
 			"End" : [ this._Range.endOffset ]
 		} ;
+		// Since we're treating the document tree as normalized, we need to backtrack the text lengths
+		// of previous text nodes into the offset value.
 		var curStart = this._Range.startContainer.previousSibling ;
 		var curEnd = this._Range.endContainer.previousSibling ;
+
+		// Also note that the node that we use for "address base" would change during backtracking.
+		var addrStart = this._Range.startContainer ;
+		var addrEnd = this._Range.endContainer ;
 		while ( curStart && curStart.nodeType == 3 )
 		{
 			bookmark.Start[0] += curStart.length ;
+			addrStart = curStart ;
 			curStart = curStart.previousSibling ;
 		}
@@ -394,10 +458,39 @@
 		{
 			bookmark.End[0] += curEnd.length ;
+			addrEnd = curEnd ;
 			curEnd = curEnd.previousSibling ;
 		}
+
+		// If the object pointed to by the startOffset and endOffset are text nodes, we need
+		// to backtrack and add in the text offset to the bookmark addresses.
+		if ( addrStart.nodeType == 1 && addrStart.childNodes[bookmark.Start[0]] && addrStart.childNodes[bookmark.Start[0]].nodeType == 3 )
+		{
+			var curNode = addrStart.childNodes[bookmark.Start[0]] ;
+			var offset = 0 ;
+			while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 )
+			{
+				curNode = curNode.previousSibling ;
+				offset += curNode.length ;
+			}
+			addrStart = curNode ;
+			bookmark.Start[0] = offset ;
+		}
+		if ( addrEnd.nodeType == 1 && addrEnd.childNodes[bookmark.End[0]] && addrEnd.childNodes[bookmark.End[0]].nodeType == 3 )
+		{
+			var curNode = addrEnd.childNodes[bookmark.End[0]] ;
+			var offset = 0 ;
+			while ( curNode.previousSibling && curNode.previousSibling.nodeType == 3 )
+			{
+				curNode = curNode.previousSibling ;
+				offset += curNode.length ;
+			}
+			addrEnd = curNode ;
+			bookmark.End[0] = offset ;
+		}
+
 		// Then, we record down the precise position of the container nodes
 		// by walking up the DOM tree and counting their childNode index
-		bookmark.Start = FCKDomTools.GetNodeAddress( this._Range.startContainer, true ).concat( bookmark.Start ) ;
-		bookmark.End = FCKDomTools.GetNodeAddress( this._Range.endContainer, true ).concat( bookmark.End ) ;
+		bookmark.Start = FCKDomTools.GetNodeAddress( addrStart, true ).concat( bookmark.Start ) ;
+		bookmark.End = FCKDomTools.GetNodeAddress( addrEnd, true ).concat( bookmark.End ) ;
 		return bookmark;
 	},
@@ -532,5 +625,5 @@
 					if ( oNode.nodeType != 1 )
 						oNode = oNode.previousSibling ? null : oNode.parentNode ;
-					
+
 					if ( oNode )
 					{
@@ -671,4 +764,5 @@
 			var eStartBlock		= this.StartBlock ;
 			var eEndBlock		= this.EndBlock ;
+			var oElementPath	= null ;
 
 			if ( FCKConfig.EnterMode != 'br' )
@@ -696,4 +790,5 @@
 				if ( bIsEndOfBlock )
 				{
+					oElementPath = new FCKElementPath( this.StartContainer ) ;
 					this.MoveToPosition( eEndBlock, 4 ) ;
 					eEndBlock = null ;
@@ -701,4 +796,5 @@
 				else if ( bIsStartOfBlock )
 				{
+					oElementPath = new FCKElementPath( this.StartContainer ) ;
 					this.MoveToPosition( eStartBlock, 3 ) ;
 					eStartBlock = null ;
@@ -733,5 +829,6 @@
 				NextBlock		: eEndBlock,
 				WasStartOfBlock : bIsStartOfBlock,
-				WasEndOfBlock	: bIsEndOfBlock
+				WasEndOfBlock	: bIsEndOfBlock,
+				ElementPath		: oElementPath
 			} ;
 		}
@@ -789,24 +886,24 @@
 		return !!this._Range ;
 	},
-	
+
 	GetTouchedStartNode : function()
 	{
 		var range = this._Range ;
 		var container = range.startContainer ;
-		
+
 		if ( range.collapsed || container.nodeType != 1 )
 			return container ;
-		
+
 		return container.childNodes[ range.startOffset ] || container ;
 	},
-	
+
 	GetTouchedEndNode : function()
 	{
 		var range = this._Range ;
 		var container = range.endContainer ;
-		
+
 		if ( range.collapsed || container.nodeType != 1 )
 			return container ;
-		
+
 		return container.childNodes[ range.endOffset - 1 ] || container ;
 	}
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_gecko.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_gecko.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_gecko.js	(revision 1147)
@@ -36,5 +36,6 @@
 	}
 	else
-		this.MoveToElementStart( this.Window.document.body ) ;
+		if ( this.Window.document )
+			this.MoveToElementStart( this.Window.document.body ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_ie.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrange_ie.js	(revision 1147)
@@ -67,13 +67,13 @@
 }
 
-FCKDomRange.prototype.Select = function()
+FCKDomRange.prototype.Select = function( forceExpand )
 {
 	if ( this._Range )
-		this.SelectBookmark( this.CreateBookmark( true ) ) ;
+		this.SelectBookmark( this.CreateBookmark( true ), forceExpand ) ;
 }
 
 // Not compatible with bookmark created with CreateBookmark2.
 // The bookmark nodes will be deleted from the document.
-FCKDomRange.prototype.SelectBookmark = function( bookmark )
+FCKDomRange.prototype.SelectBookmark = function( bookmark, forceExpand )
 {
 	var bIsCollapsed = this.CheckIsCollapsed() ;
@@ -112,5 +112,5 @@
 	else
 	{
-		bIsStartMakerAlone = ( !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
+		bIsStartMakerAlone = ( forceExpand || !eStartMarker.previousSibling || eStartMarker.previousSibling.nodeName.toLowerCase() == 'br' ) && !eStartMarker.nextSibing ;
 		
 		// Append a temporary <span>&nbsp;</span> before the selection.
@@ -120,5 +120,5 @@
 		// element to avoid the selection moving inside of it.
 		dummySpan = this.Window.document.createElement( 'span' ) ;
-		dummySpan.innerHTML = '&nbsp;' ;
+		dummySpan.innerHTML = '&#65279;' ;	// Zero Width No-Break Space (U+FEFF). See #1359.
 		eStartMarker.parentNode.insertBefore( dummySpan, eStartMarker ) ;
 		
@@ -126,7 +126,8 @@
 		{
 			// To expand empty blocks or line spaces after <br>, we need
-			// instead to have a &nbsp;, which will be later deleted using the
+			// instead to have any char, which will be later deleted using the
 			// selection.
-			eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\u00a0' ), eStartMarker ) ;
+			// \ufeff = Zero Width No-Break Space (U+FEFF). See #1359.
+			eStartMarker.parentNode.insertBefore( this.Window.document.createTextNode( '\ufeff' ), eStartMarker ) ;
 		}
 	}
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrangeiterator.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrangeiterator.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckdomrangeiterator.js	(revision 1147)
@@ -266,4 +266,5 @@
 					removePreviousBr = !splitInfo.WasStartOfBlock ;
 					removeLastBr = !splitInfo.WasEndOfBlock ;
+					FCKDebug.Output( 'removePreviousBr=' + removePreviousBr + ',removeLastBr=' + removeLastBr ) ;
 
 					// Insert the new block into the DOM.
@@ -286,6 +287,11 @@
 		{
 			var previousSibling = block.previousSibling ;
-			if ( previousSibling && previousSibling.nodeType == 1 && previousSibling.nodeName.toLowerCase() == 'br' )
-				previousSibling.parentNode.removeChild( previousSibling ) ;
+			if ( previousSibling && previousSibling.nodeType == 1 )
+			{
+				if ( previousSibling.nodeName.toLowerCase() == 'br' )
+					previousSibling.parentNode.removeChild( previousSibling ) ;
+				else if ( previousSibling.lastChild && previousSibling.lastChild.nodeName.IEquals( 'br' ) )
+					previousSibling.removeChild( previousSibling.lastChild ) ;
+			}
 		}
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckeditingarea.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckeditingarea.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckeditingarea.js	(revision 1147)
@@ -280,14 +280,9 @@
 				this._EnsureFocusIE() ;
 
-			if ( FCKBrowserInfo.IsSafari )
-				this.IFrame.focus() ;
-			else
-			{
-				this.Window.focus() ;
-
-				// In IE it can happen that the document is in theory focused but the active element is outside it
-				if ( FCKBrowserInfo.IsIE )
-					this._EnsureFocusIE() ;
-			}
+			this.Window.focus() ;
+
+			// In IE it can happen that the document is in theory focused but the active element is outside it
+			if ( FCKBrowserInfo.IsIE )
+				this._EnsureFocusIE() ;
 		}
 		else
@@ -311,16 +306,19 @@
 	var range = this.Document.selection.createRange() ;
 
-	// Only apply the fix when in a block and the block is empty.
 	var parentNode = range.parentElement() ;
-
-	if ( ! ( parentNode.childNodes.length == 0 && ( 
-					FCKListsLib.BlockElements[parentNode.nodeName.toLowerCase()] || 
-					FCKListsLib.NonEmptyBlockElements[parentNode.nodeName.toLowerCase()] ) ) )
+	var parentTag = parentNode.nodeName.toLowerCase() ;
+
+	// Only apply the fix when in a block, and the block is empty.
+	if ( parentNode.childNodes.length > 0 ||
+		 !( FCKListsLib.BlockElements[parentTag] || 
+		    FCKListsLib.NonEmptyBlockElements[parentTag] ) )
+	{
 		return ;
-
-	var oldLength = range.text.length ;
+	}
+
 	range.moveEnd( "character", 1 ) ;
 	range.select() ;
-	if ( range.text.length > oldLength )
+
+	if ( range.boundingWidth > 0 )
 	{
 		range.moveEnd( "character", -1 ) ;
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckenterkey.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckenterkey.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckenterkey.js	(revision 1147)
@@ -116,5 +116,5 @@
 	var parentPath = new FCKElementPath( parentElement ) ;
 	var sMode = mode || this.EnterMode ;
-	
+
 	if ( sMode == 'br' || parentPath.Block && parentPath.Block.tagName.toLowerCase() == 'pre' )
 		return this._ExecuteEnterBr() ;
@@ -342,5 +342,5 @@
 		var eCurrentCell = FCKTools.GetElementAscensor( oCurrentBlock, 'td' );
 
-		var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ], 
+		var eNext = FCKDomTools.GetNextSourceElement( oCurrentBlock, true, [ oRange.StartBlockLimit.nodeName ],
 				['UL','OL','TR'] ) ;
 
@@ -401,5 +401,7 @@
 
 	var oSplitInfo = oRange.SplitBlock() ;
-	
+
+	// FCKDebug.OutputObject( oSplitInfo ) ;
+
 	if ( oSplitInfo )
 	{
@@ -416,4 +418,9 @@
 		if ( !oSplitInfo.WasStartOfBlock && !oSplitInfo.WasEndOfBlock )
 		{
+			// If the next block is an <li> with another list tree as the first child
+			// We'll need to append a placeholder or the list item wouldn't be editable. (Bug #1420)
+			if ( eNextBlock.nodeName.IEquals( 'li' ) && eNextBlock.firstChild
+					&& eNextBlock.firstChild.nodeName.IEquals( ['ul', 'ol'] ) )
+				eNextBlock.insertBefore( eNextBlock.ownerDocument.createTextNode( '\xa0' ), eNextBlock.firstChild ) ;
 			// Move the selection to the end block.
 			if ( eNextBlock )
@@ -437,21 +444,35 @@
 
 				// If is a header tag, or we are in a Shift+Enter (#77),
-				// create a new block element.
-				if ( this._HasShift || (/^H[1-6]$/).test( sPreviousBlockTag ) )
-					eNewBlock = this.Window.document.createElement( blockTag ) ;
-				else
+				// create a new block element (later in the code).
+				if ( !this._HasShift && !(/^H[1-6]$/).test( sPreviousBlockTag ) )
 				{
 					// Otherwise, duplicate the previous block.
 					eNewBlock = FCKDomTools.CloneElement( ePreviousBlock ) ;
-
-					this._RecreateEndingTree( ePreviousBlock, eNewBlock ) ;
 				}
 			}
 			else if ( eNextBlock )
-			{
 				eNewBlock = FCKDomTools.CloneElement( eNextBlock ) ;
-			}
-			else
+
+			if ( !eNewBlock )
 				eNewBlock = this.Window.document.createElement( blockTag ) ;
+
+			// Recreate the inline elements tree, which was available
+			// before the hitting enter, so the same styles will be
+			// available in the new block.
+			var elementPath = oSplitInfo.ElementPath ;
+			if ( elementPath )
+			{
+				var eFocusElement = eNewBlock ;
+				for ( var i = 0, len = elementPath.Elements.length ; i < len ; i++ )
+				{
+					var element = elementPath.Elements[i] ;
+
+					if ( element == elementPath.Block || element == elementPath.BlockLimit )
+						break ;
+
+					if ( FCKListsLib.InlineChildReqElements[ element.nodeName.toLowerCase() ] )
+						eFocusElement = eFocusElement.appendChild( FCKDomTools.CloneElement( element ) ) ;
+				}
+			}
 
 			if ( FCKBrowserInfo.IsGeckoLike )
@@ -469,9 +490,12 @@
 			}
 
+			// Move the selection to the new block.
 			oRange.MoveToElementEditStart( bIsStartOfBlock && !bIsEndOfBlock ? eNextBlock : eNewBlock ) ;
-
-			if ( FCKBrowserInfo.IsGeckoLike )
-				eNewBlock.scrollIntoView( false ) ;
-		}
+		}
+
+		if ( FCKBrowserInfo.IsSafari )
+			FCKDomTools.ScrollIntoView( eNextBlock || eNewBlock, false ) ;
+		else if ( FCKBrowserInfo.IsGeckoLike )
+			( eNextBlock || eNewBlock ).scrollIntoView( false ) ;
 
 		oRange.Select() ;
@@ -504,4 +528,5 @@
 
 		var bHasShift = this._HasShift ;
+		var bIsPre = false ;
 
 		if ( !bHasShift && sStartBlockTag == 'LI' )
@@ -523,6 +548,7 @@
 		else
 		{
-			var eLineBreak = null ;
-			if ( sStartBlockTag.IEquals( 'pre' ) )
+			var eLineBreak ;
+			bIsPre = sStartBlockTag.IEquals( 'pre' ) ;
+			if ( bIsPre )
 				eLineBreak = this.Window.document.createTextNode( FCKBrowserInfo.IsIE ? '\r' : '\n' ) ;
 			else
@@ -551,6 +577,12 @@
 				else
 					dummy = this.Window.document.createElement( 'br' ) ;
+
 				eLineBreak.parentNode.insertBefore( dummy, eLineBreak.nextSibling ) ;
-				dummy.scrollIntoView( false ) ;
+
+				if ( FCKBrowserInfo.IsSafari )
+					FCKDomTools.ScrollIntoView( dummy, false ) ;
+				else
+					dummy.scrollIntoView( false ) ;
+
 				dummy.parentNode.removeChild( dummy ) ;
 			}
@@ -560,5 +592,5 @@
 		oRange.Collapse( true ) ;
 
-		oRange.Select() ;
+		oRange.Select( bIsPre ) ;
 	}
 
@@ -569,14 +601,4 @@
 }
 
-// Recreate the elements tree at the end of the source block, at the beginning
-// of the target block. Eg.:
-//	If source = <p><u>Some</u> sample <b><i>text</i></b></p> then target = <p><b><i></i></b></p>
-//	If source = <p><u>Some</u> sample text</p> then target = <p></p>
-FCKEnterKey.prototype._RecreateEndingTree = function( source, target )
-{
-	while ( ( source = source.lastChild ) && source.nodeType == 1 && FCKListsLib.InlineChildReqElements[ source.nodeName.toLowerCase() ] != null )
-		target = target.insertBefore( FCKDomTools.CloneElement( source ), target.firstChild ) ;
-}
-
 // Outdents a LI, maintaining the selection defined on a range.
 FCKEnterKey.prototype._OutdentWithSelection = function( li, range )
@@ -595,5 +617,5 @@
 	var startOk = false ;
 	var endOk = false ;
-	
+
 	/*
 	FCKDebug.Output( 'sc='+range.StartContainer.nodeName+
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckevents.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckevents.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckevents.js	(revision 1147)
@@ -35,5 +35,10 @@
 		this._RegisteredEvents[ eventName ] = [ functionPointer ] ;
 	else
-		aTargets.push( functionPointer ) ;
+	{
+		// Check that the event handler isn't already registered with the same listener
+		// It doesn't detect function pointers belonging to an object (at least in Gecko)
+		if ( aTargets.IndexOf( functionPointer ) == -1 )
+			aTargets.push( functionPointer ) ;
+	}
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckmenublock.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckmenublock.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckmenublock.js	(revision 1147)
@@ -96,4 +96,7 @@
 function FCKMenuBlock_Item_OnClick( clickedItem, menuBlock )
 {
+	if ( menuBlock.Hide )
+		menuBlock.Hide() ;
+
 	FCKTools.RunFunction( menuBlock.OnClick, menuBlock, [ clickedItem ] ) ;
 }
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckpanel.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckpanel.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckpanel.js	(revision 1147)
@@ -169,5 +169,15 @@
 
 		if ( this.ParentPanel )
+		{
 			this.ParentPanel.Lock() ;
+
+			// Due to a bug on FF3, we must ensure that the parent panel will
+			// blur (#1584).
+			FCKPanel_Window_OnBlur( null, this.ParentPanel ) ;
+		}
+
+		// Be sure we'll not have more than one Panel opened at the same time.
+		if ( FCKPanel._OpenedPanel )
+			FCKPanel._OpenedPanel.Hide() ;
 
 		FCKDomTools.SetElementStyles( eMainNode,
@@ -191,15 +201,24 @@
 		iMainWidth = eMainNode.offsetWidth || eMainNode.firstChild.offsetWidth ;
 
-		var oPos = FCKTools.GetElementPosition(
+		// Base the popup coordinates upon the coordinates of relElement.
+		var oPos = FCKTools.GetDocumentPosition( this._Window,
 			relElement.nodeType == 9 ?
 				( FCKTools.IsStrictMode( relElement ) ? relElement.documentElement : relElement.body ) :
-				relElement,
-			this._Window ) ;
+				relElement ) ;
+
+		// Minus the offsets provided by any positioned parent element of the panel iframe.
+		var positionedAncestor = FCKDomTools.GetPositionedAncestor( FCKTools.GetElementWindow( this._IFrame ), this._IFrame.parentNode ) ;
+		if ( positionedAncestor )
+		{
+			var nPos = FCKTools.GetDocumentPosition( FCKTools.GetElementWindow( positionedAncestor ), positionedAncestor ) ;
+			oPos.x -= nPos.x ;
+			oPos.y -= nPos.y ;
+		}
 
 		if ( this.IsRTL && !this.IsContextMenu )
 			x = ( x * -1 ) ;
 
-		x += oPos.X ;
-		y += oPos.Y ;
+		x += oPos.x ;
+		y += oPos.y ;
 
 		if ( this.IsRTL )
@@ -243,4 +262,6 @@
 		// Move the focus to the IFRAME so we catch the "onblur".
 		this._IFrame.contentWindow.focus() ;
+
+		FCKPanel._OpenedPanel = this ;
 	}
 
@@ -256,5 +277,5 @@
 	else
 	{
-		if ( !this._IsOpened )
+		if ( !this._IsOpened || this._LockCounter > 0 )
 			return ;
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckspecialcombo.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckspecialcombo.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckspecialcombo.js	(revision 1147)
@@ -82,8 +82,5 @@
 {
 	if ( this.Items )
-	{
-		for ( var key in this.Items )
-			this.Items[key] = null ;
-	}
+		this.Items = {} ;
 	
 	var itemsholder = this._ItemsHolderEl ;
@@ -193,5 +190,7 @@
 	this.Enabled = isEnabled ;
 
-	this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
+	// In IE it can happen when the page is reloaded that _OuterTable is null, so check its existence
+	if ( this._OuterTable )
+		this._OuterTable.className = isEnabled ? '' : 'SC_FieldDisabled' ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckstyle.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckstyle.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fckstyle.js	(revision 1147)
@@ -865,6 +865,6 @@
 			{
 				// Check if the style element can be a child of the current
-				// node parent.
-				if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] )
+				// node parent or if the element is not defined in the DTD.
+				if ( ( FCK.DTD[ currentNode.parentNode.nodeName.toLowerCase() ] || FCK.DTD.span )[ elementName ] || !FCK.DTD[ elementName ] )
 				{
 					// This node will be part of our range, so if it has not
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fcktoolbarbuttonui.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fcktoolbarbuttonui.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/classes/fcktoolbarbuttonui.js	(revision 1147)
@@ -128,4 +128,8 @@
 	var e = this.MainElement ;
 
+	// In IE it can happen when the page is reloaded that MainElement is null, so exit here
+	if ( !e )
+		return ;
+
 	switch ( parseInt( newState, 10 ) )
 	{
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fck_othercommands.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fck_othercommands.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fck_othercommands.js	(revision 1147)
@@ -250,5 +250,13 @@
 
 	var oFakeImage = FCKDocumentProcessor_CreateFakeImage( 'FCK__PageBreak', e ) ;
-	FCK.InsertElement( oFakeImage ) ;
+	var oRange = new FCKDomRange( FCK.EditorWindow ) ;
+	oRange.MoveToSelection() ;
+	var oSplitInfo = oRange.SplitBlock() ;
+	if ( oSplitInfo.NextBlock )
+		oSplitInfo.NextBlock.parentNode.insertBefore( oFakeImage, oSplitInfo.NextBlock ) ;
+	else
+		oSplitInfo.PreviousBlock.parentNode.insertBefore( oFakeImage, oSplitInfo.PreviousBlock.nextSibling ) ;
+
+	FCK.Events.FireEvent( 'OnSelectionChange' ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckblockquotecommand.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckblockquotecommand.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckblockquotecommand.js	(revision 1147)
@@ -33,7 +33,50 @@
 
 		var state = this.GetState() ;
+
 		var range = new FCKDomRange( FCK.EditorWindow ) ;
 		range.MoveToSelection() ;
+
 		var bookmark = range.CreateBookmark() ;
+
+		// Kludge for #1592: if the bookmark nodes are in the beginning of
+		// blockquote, then move them to the nearest block element in the
+		// blockquote.
+		if ( FCKBrowserInfo.IsIE )
+		{
+			var bStart	= range.GetBookmarkNode( bookmark, true ) ;
+			var bEnd	= range.GetBookmarkNode( bookmark, false ) ;
+			
+			var cursor ;
+			
+			if ( bStart 
+					&& bStart.parentNode.nodeName.IEquals( 'blockquote' )
+					&& !bStart.previousSibling )
+			{
+				cursor = bStart ;
+				while ( ( cursor = cursor.nextSibling ) )
+				{
+					if ( FCKListsLib.BlockElements[ cursor.nodeName.toLowerCase() ] )
+						FCKDomTools.MoveNode( bStart, cursor, true ) ;
+				}
+			}
+
+			if ( bEnd 
+					&& bEnd.parentNode.nodeName.IEquals( 'blockquote' )
+					&& !bEnd.previousSibling )
+			{
+				cursor = bEnd ;
+				while ( ( cursor = cursor.nextSibling ) )
+				{
+					if ( FCKListsLib.BlockElements[ cursor.nodeName.toLowerCase() ] )
+					{
+						if ( cursor.firstChild == bStart )
+							FCKDomTools.InsertAfterNode( bStart, bEnd ) ;
+						else
+							FCKDomTools.MoveNode( bEnd, cursor, true ) ;
+					}
+				}
+			}
+		}
+
 		var iterator = new FCKDomRangeIterator( range ) ;
 		var block ;
@@ -45,4 +88,17 @@
 			while ( ( block = iterator.GetNextParagraph() ) )
 				paragraphs.push( block ) ;
+
+			// If no paragraphs, create one from the current selection position.
+			if ( paragraphs.length < 1 )
+			{
+				para = range.Window.document.createElement( FCKConfig.EnterMode.IEquals( 'p' ) ? 'p' : 'div' ) ;
+				range.InsertNode( para ) ;
+				para.appendChild( range.Window.document.createTextNode( '\ufeff' ) ) ;
+				range.MoveToBookmark( bookmark ) ;
+				range.MoveToNodeContents( para ) ;
+				range.Collapse( true ) ;
+				bookmark = range.CreateBookmark() ;
+				paragraphs.push( para ) ;
+			}
 
 			// Make sure all paragraphs have the same parent.
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckshowblocks.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckshowblocks.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fckshowblocks.js	(revision 1147)
@@ -53,12 +53,10 @@
 		return FCK_TRISTATE_DISABLED ;
 
-	// On some cases FCK.EditorDocument.body is not yet available, so try/catch.
-	try
-	{
-		if ( /FCK__ShowBlocks(?:\s|$)/.test( FCK.EditorDocument.body.className ) )
-			return FCK_TRISTATE_ON ;
-	}
-	catch (e)
-	{}
+	// On some cases FCK.EditorDocument.body is not yet available
+	if ( !FCK.EditorDocument )
+		return FCK_TRISTATE_OFF ;
+
+	if ( /FCK__ShowBlocks(?:\s|$)/.test( FCK.EditorDocument.body.className ) )
+		return FCK_TRISTATE_ON ;
 
 	return FCK_TRISTATE_OFF ;
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fcktextcolorcommand.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fcktextcolorcommand.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/commandclasses/fcktextcolorcommand.js	(revision 1147)
@@ -55,4 +55,6 @@
 FCKTextColorCommand.prototype.SetColor = function( color )
 {
+	FCKUndo.SaveUndoStep() ;
+
 	var style = FCKStyles.GetStyle( '_FCK_' +
 		( this.Type == 'ForeColor' ? 'Color' : 'BackColor' ) ) ;
@@ -65,4 +67,6 @@
 		FCKStyles.ApplyStyle( style ) ;
 	}
+
+	FCKUndo.SaveUndoStep() ;
 
 	FCK.Focus() ;
@@ -142,5 +146,6 @@
 	FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_AutoOnClick, this ) ;
 
-	if ( FCKBrowserInfo.IsSafari )
+	// Dirty hack for Opera, Safari and Firefox 3.
+	if ( !FCKBrowserInfo.IsIE )
 		oDiv.style.width = '96%' ;
 
@@ -154,14 +159,22 @@
 		var oRow = oTable.insertRow(-1) ;
 
-		for ( var i = 0 ; i < 8 && iCounter < aColors.length ; i++, iCounter++ )
+		for ( var i = 0 ; i < 8 ; i++, iCounter++ )
 		{
-			var colorParts = aColors[iCounter].split('/') ;
-			var colorValue = '#' + colorParts[0] ;
-			var colorName = colorParts[1] || colorValue ;
+			// The div will be created even if no more colors are available.
+			// Extra divs will be hidden later in the code. (#1597)
+			if ( iCounter < aColors.length )
+			{
+				var colorParts = aColors[iCounter].split('/') ;
+				var colorValue = '#' + colorParts[0] ;
+				var colorName = colorParts[1] || colorValue ;
+			}
 
 			oDiv = oRow.insertCell(-1).appendChild( CreateSelectionDiv() ) ;
 			oDiv.innerHTML = '<div class="ColorBoxBorder"><div class="ColorBox" style="background-color: ' + colorValue + '"></div></div>' ;
 
-			FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_OnClick, [ this, colorName ] ) ;
+			if ( iCounter >= aColors.length )
+				oDiv.style.visibility = 'hidden' ;
+			else
+				FCKTools.AddEventListenerEx( oDiv, 'click', FCKTextColorCommand_OnClick, [ this, colorName ] ) ;
 		}
 	}
@@ -179,5 +192,6 @@
 	}
 
-	if ( FCKBrowserInfo.IsSafari )
+	// Dirty hack for Opera, Safari and Firefox 3.
+	if ( !FCKBrowserInfo.IsIE )
 		oDiv.style.width = '96%' ;
 }
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck.js	(revision 1147)
@@ -57,5 +57,11 @@
 			return ( this.StartupValue != this.EditingArea.Textarea.value ) ;
 		else
+		{
+			// It can happen switching between design and source mode in Gecko
+			if ( ! this.EditorDocument )
+				return false ;
+
 			return ( this.StartupValue != this.EditorDocument.body.innerHTML ) ;
+		}
 	},
 
@@ -105,4 +111,10 @@
 		// Tab key handling for source mode.
 		FCKTools.AddEventListener( document, "keydown", this._TabKeyHandler ) ;
+
+		// Add selection change listeners. They must be attached only once.
+		this.AttachToOnSelectionChange( _FCK_PaddingNodeListener ) ;
+		if ( FCKBrowserInfo.IsGecko )
+			this.AttachToOnSelectionChange( this._ExecCheckEmptyBlock ) ;
+
 	},
 
@@ -165,5 +177,7 @@
 				// Element Node.
 				case 1 :
-					if ( !FCKListsLib.BlockElements[ oNode.nodeName.toLowerCase() ] )
+					if ( !FCKListsLib.BlockElements[ oNode.nodeName.toLowerCase() ] && 
+							!oNode.getAttribute('_fckfakelement') &&
+							oNode.getAttribute('_moz_dirty') == null )
 						bMoveNode = true ;
 					break ;
@@ -287,4 +301,7 @@
 		html = html.replace( FCKRegexLib.ProtectUrlsImg	, '$& _fcksavedurl=$1' ) ;
 
+		// <AREA> href
+		html = html.replace( FCKRegexLib.ProtectUrlsArea	, '$& _fcksavedurl=$1' ) ;
+
 		return html ;
 	},
@@ -340,4 +357,10 @@
 	{
 		this.EditingArea.Mode = FCK.EditMode ;
+
+		// If there was an onSelectionChange listener in IE we must remove it to avoid crashes #1498
+		if ( FCKBrowserInfo.IsIE && FCK.EditorDocument )
+		{
+				FCK.EditorDocument.detachEvent("onselectionchange", Doc_OnSelectionChange ) ;
+		}
 
 		if ( FCK.EditMode == FCK_EDITMODE_WYSIWYG )
@@ -786,4 +809,6 @@
 	if ( ! FCKBrowserInfo.IsIE && FCKDomTools.PaddingNode )
 	{
+		// Prevent the caret from going between the body and the padding node in Firefox.
+		// i.e. <body>|<p></p></body>
 		var sel = FCK.EditorWindow.getSelection() ;
 		if ( sel && sel.rangeCount == 1 )
@@ -799,4 +824,29 @@
 		}
 	}
+	else if ( FCKDomTools.PaddingNode )
+	{
+		// Prevent the caret from going into an empty body but not into the padding node in IE.
+		// i.e. <body><p></p>|</body>
+		var parentElement = FCKSelection.GetParentElement() ;
+		var paddingNode = FCKDomTools.PaddingNode ;
+		if ( parentElement && parentElement.nodeName.IEquals( 'body' ) )
+		{
+			if ( FCK.EditorDocument.body.childNodes.length == 1 
+					&& FCK.EditorDocument.body.firstChild == paddingNode )
+			{
+				var range = FCK.EditorDocument.body.createTextRange() ;
+				var clearContents = false ;
+				if ( !paddingNode.childNodes.firstChild )
+				{
+					paddingNode.appendChild( paddingNode.ownerDocument.createTextNode( '\ufeff' ) ) ;
+					clearContents = true ;
+				}
+				range.moveToElementText( paddingNode ) ;
+				range.select() ;
+				if ( clearContents )
+					range.pasteHTML( '' ) ;
+			}
+		}
+	}
 }
 
@@ -808,5 +858,4 @@
 
 	FCK.InitializeBehaviors() ;
-	FCK.AttachToOnSelectionChange( _FCK_PaddingNodeListener ) ;
 
 	// Listen for mousedown and mouseup events for tracking drag and drops.
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_gecko.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_gecko.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_gecko.js	(revision 1147)
@@ -143,5 +143,6 @@
 					&& node.parentNode != FCK.EditorDocument.documentElement
 					&& node == node.parentNode.lastChild
-					&& ( ! FCKListsLib.BlockElements[node.parentNode.tagName.toLowerCase()] ) )
+					&& ( ! FCKListsLib.BlockElements[node.parentNode.tagName.toLowerCase()]
+					  && ! FCKListsLib.NonEmptyBlockElements[node.parentNode.tagName.toLowerCase()] ) )
 					node = node.parentNode ;
 
@@ -172,5 +173,6 @@
 
 						var stopTag = stopNode.tagName.toLowerCase() ;
-						if ( FCKListsLib.BlockElements[stopTag] || FCKListsLib.EmptyElements[stopTag] )
+						if ( FCKListsLib.BlockElements[stopTag] || FCKListsLib.EmptyElements[stopTag] 
+							|| FCKListsLib.NonEmptyBlockElements[stopTag] )
 							break ;
 						stopNode = stopNode.nextSibling ;
@@ -197,26 +199,4 @@
 	}
 
-	this._FillEmptyBlock = function( emptyBlockNode )
-	{
-		if ( ! emptyBlockNode || emptyBlockNode.nodeType != 1 )
-			return ;
-		var nodeTag = emptyBlockNode.tagName.toLowerCase() ;
-		if ( nodeTag != 'p' && nodeTag != 'div' )
-			return ;
-		if ( emptyBlockNode.firstChild )
-			return ;
-		FCKTools.AppendBogusBr( emptyBlockNode ) ;
-	}
-
-	this._ExecCheckEmptyBlock = function()
-	{
-		FCK._FillEmptyBlock( FCK.EditorDocument.body.firstChild ) ;
-		var sel = FCK.EditorWindow.getSelection() ;
-		if ( !sel || sel.rangeCount < 1 )
-			return ;
-		var range = sel.getRangeAt( 0 );
-		FCK._FillEmptyBlock( range.startContainer ) ;
-	}
-
 	this.ExecOnSelectionChangeTimer = function()
 	{
@@ -286,6 +266,4 @@
 		this.EditorDocument.addEventListener( 'click', this._ExecCheckCaret, false ) ;
 	}
-	if ( FCKBrowserInfo.IsGecko )
-		this.AttachToOnSelectionChange( this._ExecCheckEmptyBlock ) ;
 
 	// Reset the context menu.
@@ -451,4 +429,11 @@
 			var oLink = oLinksInteractor.snapshotItem( i ) ;
 			oLink.href = url ;
+
+			// It may happen that the browser (aka Safari) decides to use the
+			// URL as the link content to not leave it empty. In this case,
+			// let's reset it.
+			if ( sTempUrl == oLink.innerHTML )
+				oLink.innerHTML = '' ;
+
 			aCreatedLinks.push( oLink ) ;
 		}
@@ -457,2 +442,24 @@
 	return aCreatedLinks ;
 }
+
+FCK._FillEmptyBlock = function( emptyBlockNode )
+{
+	if ( ! emptyBlockNode || emptyBlockNode.nodeType != 1 )
+		return ;
+	var nodeTag = emptyBlockNode.tagName.toLowerCase() ;
+	if ( nodeTag != 'p' && nodeTag != 'div' )
+		return ;
+	if ( emptyBlockNode.firstChild )
+		return ;
+	FCKTools.AppendBogusBr( emptyBlockNode ) ;
+}
+
+FCK._ExecCheckEmptyBlock = function()
+{
+	FCK._FillEmptyBlock( FCK.EditorDocument.body.firstChild ) ;
+	var sel = FCK.EditorWindow.getSelection() ;
+	if ( !sel || sel.rangeCount < 1 )
+		return ;
+	var range = sel.getRangeAt( 0 );
+	FCK._FillEmptyBlock( range.startContainer ) ;
+}
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_ie.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fck_ie.js	(revision 1147)
@@ -93,5 +93,7 @@
 function Doc_OnSelectionChange()
 {
-	FCK.Events.FireEvent( "OnSelectionChange" ) ;
+	// Don't fire the event if no document is loaded.
+	if ( FCK.EditorDocument )
+		FCK.Events.FireEvent( "OnSelectionChange" ) ;
 }
 
@@ -284,6 +286,19 @@
 		sText = FCKTools.ProcessLineBreaks( window, FCKConfig, sText ) ;
 
+		var closeTagIndex = sText.search( '</p>' ) ;
+		var startTagIndex = sText.search( '<p>' ) ;
+
+		if ( ( closeTagIndex != -1 && startTagIndex != -1 && closeTagIndex < startTagIndex ) 
+				|| ( closeTagIndex != -1 && startTagIndex == -1 ) )
+		{
+			var prefix = sText.substr( 0, closeTagIndex ) ;
+			sText = sText.substr( closeTagIndex + 4 ) ;
+			this.InsertHtml( prefix ) ;
+		}
+
 		// Insert the resulting data in the editor.
+		FCKUndo.SaveLocked = true ;
 		this.InsertHtml( sText ) ;
+		FCKUndo.SaveLocked = false ;
 	}
 }
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckcommands.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckcommands.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckcommands.js	(revision 1147)
@@ -65,6 +65,6 @@
 		case 'SpecialChar'	: oCommand = new FCKDialogCommand( 'SpecialChar', FCKLang.DlgSpecialCharTitle	, 'dialog/fck_specialchar.html'	, 400, 320 ) ; break ;
 		case 'Smiley'		: oCommand = new FCKDialogCommand( 'Smiley'		, FCKLang.DlgSmileyTitle		, 'dialog/fck_smiley.html'		, FCKConfig.SmileyWindowWidth, FCKConfig.SmileyWindowHeight ) ; break ;
-		case 'Table'		: oCommand = new FCKDialogCommand( 'Table'		, FCKLang.DlgTableTitle			, 'dialog/fck_table.html'		, 450, 250 ) ; break ;
-		case 'TableProp'	: oCommand = new FCKDialogCommand( 'Table'		, FCKLang.DlgTableTitle			, 'dialog/fck_table.html?Parent', 400, 250 ) ; break ;
+		case 'Table'		: oCommand = new FCKDialogCommand( 'Table'		, FCKLang.DlgTableTitle			, 'dialog/fck_table.html'		, 480, 250 ) ; break ;
+		case 'TableProp'	: oCommand = new FCKDialogCommand( 'Table'		, FCKLang.DlgTableTitle			, 'dialog/fck_table.html?Parent', 480, 250 ) ; break ;
 		case 'TableCellProp': oCommand = new FCKDialogCommand( 'TableCell'	, FCKLang.DlgCellTitle			, 'dialog/fck_tablecell.html'	, 550, 250 ) ; break ;
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdialog_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdialog_ie.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdialog_ie.js	(revision 1147)
@@ -38,4 +38,5 @@
 	try
 	{
+		dialogInfo.DialogName = dialogName ;
 		oReturn = parentWindow.showModalDialog( pageUrl, dialogInfo, sOptions ) ;
 	}
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdocumentprocessor.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdocumentprocessor.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdocumentprocessor.js	(revision 1147)
@@ -128,4 +128,6 @@
 	*/
 
+	var bIsDirty = FCK.IsDirty() ;
+
 	var aEmbeds = document.getElementsByTagName( 'EMBED' ) ;
 
@@ -153,4 +155,8 @@
 		}
 	}
+
+	// Fix the IsDirty state (#1406).
+	if ( !bIsDirty )
+		FCK.ResetIsDirty() ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdomtools.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckdomtools.js	(revision 1147)
@@ -117,5 +117,5 @@
 		}
 
-		if ( !FCKBrowserInfo.IsIE )
+		if ( !FCKBrowserInfo.IsIE && !FCKBrowserInfo.IsOpera )
 		{
 			eChildNode = node.lastChild ;
@@ -245,5 +245,5 @@
 	GetNextSourceElement : function( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements )
 	{
-		while( ( currentNode = this.GetNextSourceNode( currentNode, true ) ) )	// Only one "=".
+		while( ( currentNode = this.GetNextSourceNode( currentNode, false ) ) )	// Only one "=".
 		{
 			if ( currentNode.nodeType == 1 )
@@ -252,6 +252,8 @@
 					break ;
 
-				if ( !ignoreElements || !currentNode.nodeName.IEquals( ignoreElements ) )
-					return currentNode ;
+				if ( ignoreElements && currentNode.nodeName.IEquals( ignoreElements ) )
+					return this.GetNextSourceElement( currentNode, ignoreSpaceTextOnly, stopSearchElements, ignoreElements ) ;
+
+				return currentNode ;
 			}
 			else if ( ignoreSpaceTextOnly && currentNode.nodeType == 3 && currentNode.nodeValue.RTrim().length > 0 )
@@ -265,5 +267,5 @@
 	 * Get the next DOM node available in source order.
 	 */
-	GetNextSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchElement )
+	GetNextSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchNode )
 	{
 		if ( !currentNode )
@@ -276,12 +278,15 @@
 		else
 		{
+			if ( stopSearchNode && currentNode == stopSearchNode )
+				return null ;
+
 			node = currentNode.nextSibling ;
-			
-			if ( !node && ( !stopSearchElement || stopSearchElement != currentNode.parentNode ) )
-				return this.GetNextSourceNode( currentNode.parentNode, true, nodeType, stopSearchElement ) ;
+
+			if ( !node && ( !stopSearchNode || stopSearchNode != currentNode.parentNode ) )
+				return this.GetNextSourceNode( currentNode.parentNode, true, nodeType, stopSearchNode ) ;
 		}
 
 		if ( nodeType && node && node.nodeType != nodeType )
-			return this.GetNextSourceNode( node, false, nodeType, stopSearchElement ) ;
+			return this.GetNextSourceNode( node, false, nodeType, stopSearchNode ) ;
 
 		return node ;
@@ -291,5 +296,5 @@
 	 * Get the next DOM node available in source order.
 	 */
-	GetPreviousSourceNode : function( currentNode, startFromSibling, nodeType )
+	GetPreviousSourceNode : function( currentNode, startFromSibling, nodeType, stopSearchNode )
 	{
 		if ( !currentNode )
@@ -301,8 +306,16 @@
 			node = currentNode.lastChild ;
 		else
-			node = ( currentNode.previousSibling || this.GetPreviousSourceNode( currentNode.parentNode, true, nodeType ) ) ;
+		{
+			if ( stopSearchNode && currentNode == stopSearchNode )
+				return null ;
+
+			node = currentNode.previousSibling ;
+
+			if ( !node && ( !stopSearchNode || stopSearchNode != currentNode.parentNode ) )
+				return this.GetPreviousSourceNode( currentNode.parentNode, true, nodeType, stopSearchNode ) ;
+		}
 
 		if ( nodeType && node && node.nodeType != nodeType )
-			return this.GetPreviousSourceNode( node, false, nodeType ) ;
+			return this.GetPreviousSourceNode( node, false, nodeType, stopSearchNode ) ;
 
 		return node ;
@@ -381,8 +394,27 @@
 	EnforcePaddingNode : function( doc, tagName )
 	{
+		// In IE it can happen when the page is reloaded that doc or doc.body is null, so exit here
+		try
+		{
+			if ( !doc || !doc.body )
+				return ;
+		}
+		catch (e)
+		{
+			return ;
+		}
+
 		this.CheckAndRemovePaddingNode( doc, tagName, true ) ;
-		if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1
-				|| doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) )
+		try
+		{
+			if ( doc.body.lastChild && ( doc.body.lastChild.nodeType != 1
+					|| doc.body.lastChild.tagName.toLowerCase() == tagName.toLowerCase() ) )
+				return ;
+		}
+		catch (e)
+		{
 			return ;
+		}
+
 		var node = doc.createElement( tagName ) ;
 		if ( FCKBrowserInfo.IsGecko && FCKListsLib.NonEmptyBlockElements[ tagName ] )
@@ -406,12 +438,20 @@
 
 		// If the padding node is changed, remove its status as a padding node.
-		if ( paddingNode.parentNode != doc.body
-			|| paddingNode.tagName.toLowerCase() != tagName
-			|| ( paddingNode.childNodes.length > 1 )
-			|| ( paddingNode.firstChild && paddingNode.firstChild.nodeValue != '\xa0'
-				&& String(paddingNode.firstChild.tagName).toLowerCase() != 'br' ) )
-		{
-			this.PaddingNode = null ;
-			return ;
+		try
+		{
+			if ( paddingNode.parentNode != doc.body
+				|| paddingNode.tagName.toLowerCase() != tagName
+				|| ( paddingNode.childNodes.length > 1 )
+				|| ( paddingNode.firstChild && paddingNode.firstChild.nodeValue != '\xa0'
+					&& String(paddingNode.firstChild.tagName).toLowerCase() != 'br' ) )
+			{
+				this.PaddingNode = null ;
+				return ;
+			}
+		}
+		catch (e)
+		{
+				this.PaddingNode = null ;
+				return ;
 		}
 
@@ -448,5 +488,5 @@
 			if ( FCKBrowserInfo.IsIE && attributes[i].nodeName == 'class' )
 			{
-				// IE has a strange bug. If calling removeAttribute('className'), 
+				// IE has a strange bug. If calling removeAttribute('className'),
 				// the attributes collection will still contain the "class"
 				// attribute, which will be marked as "specified", even if the
@@ -574,7 +614,7 @@
 			{
 				var candidate = parentNode.childNodes[i] ;
-				if ( normalized === true && 
-						candidate.nodeType == 3 && 
-						candidate.previousSibling && 
+				if ( normalized === true &&
+						candidate.nodeType == 3 &&
+						candidate.previousSibling &&
 						candidate.previousSibling.nodeType == 3 )
 					continue;
@@ -769,5 +809,5 @@
 				if ( currentListItem.nodeType == 11 )
 				{
-					if ( currentListItem.lastChild && 
+					if ( currentListItem.lastChild &&
 							currentListItem.lastChild.getAttribute &&
 							currentListItem.lastChild.getAttribute( 'type' ) == '_moz' )
@@ -843,5 +883,5 @@
 		return node ;
 	},
-	
+
 	/**
 	 * Checks if an element has no "useful" content inside of it
@@ -855,5 +895,5 @@
 		var child = element.firstChild ;
 		var elementChild ;
-		
+
 		while ( child )
 		{
@@ -862,5 +902,5 @@
 				if ( elementChild || !FCKListsLib.InlineNonEmptyElements[ child.nodeName.toLowerCase() ] )
 					return false ;
-				
+
 				if ( !elementCheckCallback || elementCheckCallback( child ) === true )
 					elementChild = child ;
@@ -868,8 +908,8 @@
 			else if ( child.nodeType == 3 && child.nodeValue.length > 0 )
 				return false ;
-			
+
 			child = child.nextSibling ;
 		}
-		
+
 		return elementChild ? this.CheckIsEmptyElement( elementChild, elementCheckCallback ) : true ;
 	},
@@ -880,4 +920,60 @@
 		for ( var styleName in styleDict )
 			style[ styleName ] = styleDict[ styleName ] ;
+	},
+
+	GetCurrentElementStyle : function( w, element, attrName )
+	{
+		if ( FCKBrowserInfo.IsIE )
+			return element.currentStyle[attrName] ;
+		else
+			return w.getComputedStyle( element, '' )[attrName] ;
+	},
+
+	GetPositionedAncestor : function( w, element )
+	{
+		var currentElement = element ;
+		while ( currentElement != currentElement.ownerDocument.documentElement )
+		{
+			if ( this.GetCurrentElementStyle( w, currentElement, 'position' ) != 'static' )
+				return currentElement ;
+			currentElement = currentElement.parentNode ;
+		}
+		return null ;
+	},
+
+	/**
+	 * Current implementation for ScrollIntoView (due to #1462). We don't have
+	 * a complete implementation here, just the things that fit our needs.
+	 */
+	ScrollIntoView : function( element, alignTop )
+	{
+		// Get the element window.
+		var window = FCKTools.GetElementWindow( element ) ;
+		var windowHeight = FCKTools.GetViewPaneSize( window ).Height ;
+		
+		// Starts the offset that will be scrolled with the negative value of
+		// the visible window height.
+		var offset = windowHeight * -1 ;
+
+		// Appends the height it we are about to align the bottoms.
+		if ( alignTop === false )
+		{
+			offset += element.offsetHeight ;
+			
+			// Consider the margin in the scroll, which is ok for our current
+			// needs, but needs investigation if we will be using this function
+			// in other places.
+			offset += parseInt( this.GetCurrentElementStyle( window, element, 'marginBottom' ) || 0, 10 ) ;
+		}
+
+		// Appends the offsets for the entire element hierarchy.
+		offset += element.offsetTop ;
+		while ( ( element = element.offsetParent ) )
+			offset += element.offsetTop || 0 ;
+		
+		// Scroll the window to the desired position, if not already visible.
+		var currentScroll = FCKTools.GetScrollPosition( window ).Y ;
+		if ( offset > 0 && offset > currentScroll )
+			window.scrollTo( 0, offset ) ;
 	}
 } ;
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckregexlib.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckregexlib.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckregexlib.js	(revision 1147)
@@ -75,4 +75,5 @@
 ProtectUrlsImg	: /<img(?=\s).*?\ssrc=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
 ProtectUrlsA	: /<a(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
+ProtectUrlsArea	: /<area(?=\s).*?\shref=((?:(?:\s*)("|').*?\2)|(?:[^"'][^ >]+))/gi ,
 
 Html4DocType	: /HTML 4\.0 Transitional/i ,
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckselection_gecko.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckselection_gecko.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckselection_gecko.js	(revision 1147)
@@ -58,16 +58,19 @@
 	if ( selection && selection.anchorNode && selection.anchorNode.nodeType == 1 )
 	{
-		// This one is good for all browsers, expect Safari Mac.
-		selectedElement = selection.anchorNode.childNodes[ selection.anchorOffset ] ;
-
-		// For Safari (Mac only), the anchor node for a control selection is
-		// the control itself, which seams logic. FF and Opera use the parent
-		// as the anchor node, pointing to the control with the offset.
-		// As FF created the selection "standard", Safari would do better by
-		// following their steps.
-		if ( !selectedElement )
-			selectedElement = selection.anchorNode ;
-		else if ( selectedElement.nodeType != 1 )
-			return null ;
+		if ( this.GetType() == 'Control' )
+		{
+			// This one is good for all browsers, expect Safari Mac.
+			selectedElement = selection.anchorNode.childNodes[ selection.anchorOffset ] ;
+
+			// For Safari (Mac only), the anchor node for a control selection is
+			// the control itself, which seams logic. FF and Opera use the parent
+			// as the anchor node, pointing to the control with the offset.
+			// As FF created the selection "standard", Safari would do better by
+			// following their steps.
+			if ( !selectedElement )
+				selectedElement = selection.anchorNode ;
+			else if ( selectedElement.nodeType != 1 )
+				return null ;
+		}
 	}
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckstyles.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckstyles.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckstyles.js	(revision 1147)
@@ -38,5 +38,5 @@
 			else
 				style.ApplyToSelection( FCK.EditorWindow ) ;
-	
+
 			FCK.Events.FireEvent( 'OnSelectionChange' ) ;
 		}
@@ -219,5 +219,5 @@
 		FCK.Events.FireEvent( 'OnSelectionChange' ) ;
 	},
-	
+
 	GetStyle : function( styleName )
 	{
@@ -230,5 +230,5 @@
 		if ( !styles )
 		{
-			styles = this._GetStyles = FCKTools.Merge( 
+			styles = this._GetStyles = FCKTools.Merge(
 				this._LoadStylesCore(),
 				this._LoadStylesCustom(),
@@ -237,5 +237,5 @@
 		return styles ;
 	},
-	
+
 	CheckHasObjectStyle : function( elementName )
 	{
@@ -265,5 +265,8 @@
 		{
 			for ( var styleName in styleDefs )
-				styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
+			{
+				var style = styles[ styleName ] = new FCKStyle( styleDefs[ styleName ] ) ;
+				style.Name = styleName ;
+			}
 		}
 
@@ -283,9 +286,13 @@
 		var xml = new FCKXml() ;
 		xml.LoadUrl( stylesXmlPath ) ;
-		
+
 		var stylesXmlObj = FCKXml.TransformToObject( xml.SelectSingleNode( 'Styles' ) ) ;
 
 		// Get the "Style" nodes defined in the XML file.
 		var styleNodes = stylesXmlObj.$Style ;
+
+		// Check that it did contain some valid nodes
+		if ( !styleNodes )
+			return styles ;
 
 		// Add each style to our "Styles" collection.
@@ -326,14 +333,14 @@
 			// Load override definitions.
 			var cssStyleOverrideNodes = styleNode.$Override ;
-			if ( cssStyleOverrideNodes ) 
+			if ( cssStyleOverrideNodes )
 			{
 				for ( j = 0 ; j < cssStyleOverrideNodes.length ; j++ )
 				{
 					var overrideNode = cssStyleOverrideNodes[j] ;
-					var overrideDef = 
+					var overrideDef =
 					{
 						Element : overrideNode.element
 					} ;
-					
+
 					var overrideAttNode = overrideNode.$Attribute ;
 					if ( overrideAttNode )
@@ -353,5 +360,5 @@
 						}
 					}
-					
+
 					styleDef.Overrides.push( overrideDef ) ;
 				}
@@ -360,5 +367,5 @@
 			var style = new FCKStyle( styleDef ) ;
 			style.Name = styleNode.name || element ;
-			
+
 			if ( style.GetType() == FCK_STYLE_OBJECT )
 				this._ObjectStyles[ element ] = true ;
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktoolbarset.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktoolbarset.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktoolbarset.js	(revision 1147)
@@ -91,5 +91,5 @@
 			// Initialize the IFRAME document body.
 			eTargetDocument.open() ;
-			eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; window.onresize = adjust; window.onload = function () {adjust(); window.setTimeout( adjust, 1000 ); }</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ;
+			eTargetDocument.write( '<html><head>' + sBase + '<script type="text/javascript"> var adjust = function() { window.frameElement.height = document.body.scrollHeight ; }; window.onresize = adjust; window.onload = function () {window.setTimeout( adjust, 0 );}</script></head><body style="overflow: hidden">' + document.getElementById( 'xToolbarSpace' ).innerHTML + '</body></html>' ) ;
 			eTargetDocument.close() ;
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktools.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fcktools.js	(revision 1147)
@@ -79,5 +79,6 @@
 FCKTools.FixDocumentParentWindow = function( targetWindow )
 {
-	targetWindow.document.parentWindow = targetWindow ;
+	if ( targetWindow.document )
+		targetWindow.document.parentWindow = targetWindow ;
 
 	for ( var i = 0 ; i < targetWindow.frames.length ; i++ )
@@ -423,10 +424,50 @@
 	var y = 0 ;
 	var curNode = node ;
-	while ( curNode && curNode != w.document.body )
+	var prevNode = null ;
+	var curWindow = FCKTools.GetElementWindow( curNode ) ;
+	while ( curNode && !( curWindow == w && ( curNode == w.document.body || curNode == w.document.documentElement ) ) )
 	{
 		x += curNode.offsetLeft - curNode.scrollLeft ;
 		y += curNode.offsetTop - curNode.scrollTop ;
-		curNode = curNode.offsetParent ;
-	}
+
+		if ( ! FCKBrowserInfo.IsOpera )
+		{
+			var scrollNode = prevNode ;
+			while ( scrollNode && scrollNode != curNode )
+			{
+				x -= scrollNode.scrollLeft ;
+				y -= scrollNode.scrollTop ;
+				scrollNode = scrollNode.parentNode ;
+			}
+		}
+
+		prevNode = curNode ;
+		if ( curNode.offsetParent )
+			curNode = curNode.offsetParent ;
+		else
+		{
+			if ( curWindow != w )
+			{
+				curNode = curWindow.frameElement ;
+				prevNode = null ;
+				if ( curNode )
+					curWindow = FCKTools.GetElementWindow( curNode ) ;
+			}
+			else
+				curNode = null ;
+		}
+	}
+
+	// document.body is a special case when it comes to offsetTop and offsetLeft values.
+	// 1. It matters if document.body itself is a positioned element;
+	// 2. It matters is when we're in IE and the element has no positioned ancestor.
+	// Otherwise the values should be ignored.
+	if ( FCKDomTools.GetCurrentElementStyle( w, w.document.body, 'position') != 'static' 
+			|| ( FCKBrowserInfo.IsIE && FCKDomTools.GetPositionedAncestor( w, node ) == null ) )
+	{
+		x += w.document.body.offsetLeft ;
+		y += w.document.body.offsetTop ;
+	}
+
 	return { "x" : x, "y" : y } ;
 }
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckundo.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckundo.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckundo.js	(revision 1147)
@@ -28,4 +28,5 @@
 FCKUndo.MaxTypes = 25 ;
 FCKUndo.Typing = false ;
+FCKUndo.SaveLocked = false ;
 
 FCKUndo._GetBookmark = function()
@@ -115,5 +116,5 @@
 FCKUndo.SaveUndoStep = function()
 {
-	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG )
+	if ( FCK.EditMode != FCK_EDITMODE_WYSIWYG || this.SaveLocked )
 		return ;
 
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml.js	(revision 1147)
@@ -199,5 +199,6 @@
 
 			// Ignore bogus BR nodes in the DOM.
-			if ( FCKBrowserInfo.IsGecko && 
+			if ( FCKBrowserInfo.IsGecko &&
+					htmlNode.nextSibling &&
 					( htmlNode.hasAttribute('_moz_editor_bogus_node') || htmlNode.getAttribute( 'type' ) == '_moz' ) )
 				return false ;
@@ -313,4 +314,81 @@
 FCKXHtml.TagProcessors =
 {
+	a : function( node, htmlNode )
+	{
+		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1556878).
+		if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name )
+			return false ;
+
+		var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
+		if ( sSavedUrl != null )
+			FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;
+
+
+		// Anchors with content has been marked with an additional class, now we must remove it.
+		if ( FCKBrowserInfo.IsIE )
+		{
+			// Buggy IE, doesn't copy the name of changed anchors.
+			if ( htmlNode.name )
+				FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
+		}
+
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+
+		return node ;
+	},
+
+	area : function( node, htmlNode )
+	{
+		var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
+		if ( sSavedUrl != null )
+			FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;
+
+		// IE ignores the "COORDS" and "SHAPE" attribute so we must add it manually.
+		if ( FCKBrowserInfo.IsIE )
+		{
+			if ( ! node.attributes.getNamedItem( 'coords' ) )
+			{
+				var sCoords = htmlNode.getAttribute( 'coords', 2 ) ;
+				if ( sCoords && sCoords != '0,0,0' )
+					FCKXHtml._AppendAttribute( node, 'coords', sCoords ) ;
+			}
+
+			if ( ! node.attributes.getNamedItem( 'shape' ) )
+			{
+				var sShape = htmlNode.getAttribute( 'shape', 2 ) ;
+				if ( sShape && sShape.length > 0 )
+					FCKXHtml._AppendAttribute( node, 'shape', sShape.toLowerCase() ) ;
+			}
+		}
+
+		return node ;
+	},
+
+	body : function( node, htmlNode )
+	{
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		// Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
+		node.removeAttribute( 'spellcheck' ) ;
+		return node ;
+	},
+
+	// IE loses contents of iframes, and Gecko does give it back HtmlEncoded
+	// Note: Opera does lose the content and doesn't provide it in the innerHTML string
+	iframe : function( node, htmlNode )
+	{
+		var sHtml = htmlNode.innerHTML ;
+
+		// Gecko does give back the encoded html
+		if ( FCKBrowserInfo.IsGecko )
+			sHtml = FCKTools.HTMLDecode( sHtml );
+
+		// Remove the saved urls here as the data won't be processed as nodes
+		sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
+
+		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
+
+		return node ;
+	},
+
 	img : function( node, htmlNode )
 	{
@@ -326,24 +404,35 @@
 	},
 
-	a : function( node, htmlNode )
-	{
-		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1556878).
-		if ( htmlNode.innerHTML.Trim().length == 0 && !htmlNode.name )
+	// Fix nested <ul> and <ol>.
+	ol : function( node, htmlNode, targetNode )
+	{
+		if ( htmlNode.innerHTML.Trim().length == 0 )
 			return false ;
 
-		var sSavedUrl = htmlNode.getAttribute( '_fcksavedurl' ) ;
-		if ( sSavedUrl != null )
-			FCKXHtml._AppendAttribute( node, 'href', sSavedUrl ) ;
-
-
-		// Anchors with content has been marked with an additional class, now we must remove it.
-		if ( FCKBrowserInfo.IsIE )
-		{
-			// Buggy IE, doesn't copy the name of changed anchors.
-			if ( htmlNode.name )
-				FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
-		}
-
-		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+		var ePSibling = targetNode.lastChild ;
+
+		if ( ePSibling && ePSibling.nodeType == 3 )
+			ePSibling = ePSibling.previousSibling ;
+
+		if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' )
+		{
+			htmlNode._fckxhtmljob = null ;
+			FCKXHtml._AppendNode( ePSibling, htmlNode ) ;
+			return false ;
+		}
+
+		node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+		return node ;
+	},
+
+	pre : function ( node, htmlNode )
+	{
+		var firstChild = htmlNode.firstChild ;
+
+		if ( firstChild && firstChild.nodeType == 3 )
+			node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' ) ) ) ;
+
+		FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
 
 		return node ;
@@ -361,4 +450,15 @@
 	},
 
+	span : function( node, htmlNode )
+	{
+		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).
+		if ( htmlNode.innerHTML.length == 0 )
+			return false ;
+
+		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
+
+		return node ;
+	},
+
 	style : function( node, htmlNode )
 	{
@@ -376,23 +476,4 @@
 	},
 
-	pre : function ( node, htmlNode )
-	{
-		for ( var i = 0 ; i < htmlNode.childNodes.length ; i++ )
-		{
-			var item = htmlNode.childNodes[i] ;
-			var val = item.nodeValue ;
-			if ( item.nodeType == 3 && i == 0 )
-			{
-				// We shouldn't put the plain text value of the text node directly into HTML. (See #1414)
-				var dummyNode = document.createElement( 'pre' ) ;
-				dummyNode.appendChild( document.createTextNode( val ) ) ;
-				node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( '\r\n' + dummyNode.innerHTML ) ) ) ;
-			}
-			else
-				FCKXHtml._AppendNode( node, item ) ;
-		}
-		return node ;
-	},
-
 	title : function( node, htmlNode )
 	{
@@ -400,64 +481,4 @@
 
 		return node ;
-	},
-
-	// Fix nested <ul> and <ol>.
-	ol : function( node, htmlNode, targetNode )
-	{
-		if ( htmlNode.innerHTML.Trim().length == 0 )
-			return false ;
-
-		var ePSibling = targetNode.lastChild ;
-
-		if ( ePSibling && ePSibling.nodeType == 3 )
-			ePSibling = ePSibling.previousSibling ;
-
-		if ( ePSibling && ePSibling.nodeName.toUpperCase() == 'LI' )
-		{
-			htmlNode._fckxhtmljob = null ;
-			FCKXHtml._AppendNode( ePSibling, htmlNode ) ;
-			return false ;
-		}
-
-		node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-		return node ;
-	},
-
-	span : function( node, htmlNode )
-	{
-		// Firefox may create empty tags when deleting the selection in some special cases (SF-BUG 1084404).
-		if ( htmlNode.innerHTML.length == 0 )
-			return false ;
-
-		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
-
-		return node ;
-	},
-
-	// IE loses contents of iframes, and Gecko does give it back HtmlEncoded
-	// Note: Opera does lose the content and doesn't provide it in the innerHTML string
-	iframe : function( node, htmlNode )
-	{
-		var sHtml = htmlNode.innerHTML ;
-
-		// Gecko does give back the encoded html
-		if ( FCKBrowserInfo.IsGecko )
-			sHtml = FCKTools.HTMLDecode( sHtml );
-
-		// Remove the saved urls here as the data won't be processed as nodes
-		sHtml = sHtml.replace( /\s_fcksavedurl="[^"]*"/g, '' ) ;
-
-		node.appendChild( FCKXHtml.XML.createTextNode( FCKXHtml._AppendSpecialItem( sHtml ) ) ) ;
-
-		return node ;
-	},
-
-	body : function( node, htmlNode )
-	{
-		node = FCKXHtml._AppendChildNodes( node, htmlNode, false ) ;
-		// Remove spellchecker attributes added for Firefox when converting to HTML code (Bug #1351).
-		node.removeAttribute( 'spellcheck' ) ;
-		return node ;
 	}
 } ;
Index: /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml_ie.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml_ie.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/_source/internals/fckxhtml_ie.js	(revision 1147)
@@ -83,4 +83,83 @@
 }
 
+// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
+FCKXHtml.TagProcessors['div'] = function( node, htmlNode )
+{
+	if ( htmlNode.align.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'align', htmlNode.align ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
+// IE automatically changes <FONT> tags to <FONT size=+0>.
+FCKXHtml.TagProcessors['font'] = function( node, htmlNode )
+{
+	if ( node.attributes.length == 0 )
+		node = FCKXHtml.XML.createDocumentFragment() ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+FCKXHtml.TagProcessors['form'] = function( node, htmlNode )
+{
+	if ( htmlNode.acceptCharset && htmlNode.acceptCharset.length > 0 && htmlNode.acceptCharset != 'UNKNOWN' )
+		FCKXHtml._AppendAttribute( node, 'accept-charset', htmlNode.acceptCharset ) ;
+
+	// IE has a bug and htmlNode.attributes['name'].specified=false if there is
+	// no element with id="name" inside the form (#360 and SF-BUG-1155726).
+	var nameAtt = htmlNode.attributes['name'] ;
+
+	if ( nameAtt && nameAtt.value.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'name', nameAtt.value ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
+// IE doens't see the value attribute as an attribute for the <INPUT> tag.
+FCKXHtml.TagProcessors['input'] = function( node, htmlNode )
+{
+	if ( htmlNode.name )
+		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
+
+	if ( htmlNode.value && !node.attributes.getNamedItem( 'value' ) )
+		FCKXHtml._AppendAttribute( node, 'value', htmlNode.value ) ;
+
+	if ( !node.attributes.getNamedItem( 'type' ) )
+		FCKXHtml._AppendAttribute( node, 'type', 'text' ) ;
+
+	return node ;
+}
+
+FCKXHtml.TagProcessors['label'] = function( node, htmlNode )
+{
+	if ( htmlNode.htmlFor.length > 0 )
+		FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+// Fix behavior for IE, it doesn't read back the .name on newly created maps 
+FCKXHtml.TagProcessors['map'] = function( node, htmlNode )
+{
+	if ( ! node.attributes.getNamedItem( 'name' ) )
+	{
+		var name = htmlNode.name ;
+		if ( name )
+			FCKXHtml._AppendAttribute( node, 'name', name ) ;
+	}
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
+
+	return node ;
+}
+
 FCKXHtml.TagProcessors['meta'] = function( node, htmlNode )
 {
@@ -102,107 +181,23 @@
 }
 
-// IE automatically changes <FONT> tags to <FONT size=+0>.
-FCKXHtml.TagProcessors['font'] = function( node, htmlNode )
-{
-	if ( node.attributes.length == 0 )
-		node = FCKXHtml.XML.createDocumentFragment() ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-// IE doens't see the value attribute as an attribute for the <INPUT> tag.
-FCKXHtml.TagProcessors['input'] = function( node, htmlNode )
+// IE ignores the "SELECTED" attribute so we must add it manually.
+FCKXHtml.TagProcessors['option'] = function( node, htmlNode )
+{
+	if ( htmlNode.selected && !node.attributes.getNamedItem( 'selected' ) )
+		FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ;
+
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
+
+// IE doens't hold the name attribute as an attribute for the <TEXTAREA> and <SELECT> tags.
+FCKXHtml.TagProcessors['textarea'] = FCKXHtml.TagProcessors['select'] = function( node, htmlNode )
 {
 	if ( htmlNode.name )
 		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
 
-	if ( htmlNode.value && !node.attributes.getNamedItem( 'value' ) )
-		FCKXHtml._AppendAttribute( node, 'value', htmlNode.value ) ;
-
-	if ( !node.attributes.getNamedItem( 'type' ) )
-		FCKXHtml._AppendAttribute( node, 'type', 'text' ) ;
-
-	return node ;
-}
-
-// IE ignores the "SELECTED" attribute so we must add it manually.
-FCKXHtml.TagProcessors['option'] = function( node, htmlNode )
-{
-	if ( htmlNode.selected && !node.attributes.getNamedItem( 'selected' ) )
-		FCKXHtml._AppendAttribute( node, 'selected', 'selected' ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-// IE ignores the "COORDS" and "SHAPE" attribute so we must add it manually.
-FCKXHtml.TagProcessors['area'] = function( node, htmlNode )
-{
-	if ( ! node.attributes.getNamedItem( 'coords' ) )
-	{
-		var sCoords = htmlNode.getAttribute( 'coords', 2 ) ;
-		if ( sCoords && sCoords != '0,0,0' )
-			FCKXHtml._AppendAttribute( node, 'coords', sCoords ) ;
-	}
-
-	if ( ! node.attributes.getNamedItem( 'shape' ) )
-	{
-		var sShape = htmlNode.getAttribute( 'shape', 2 ) ;
-		if ( sShape && sShape.length > 0 )
-			FCKXHtml._AppendAttribute( node, 'shape', sShape.toLowerCase() ) ;
-	}
-
-	return node ;
-}
-
-FCKXHtml.TagProcessors['label'] = function( node, htmlNode )
-{
-	if ( htmlNode.htmlFor.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'for', htmlNode.htmlFor ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-FCKXHtml.TagProcessors['form'] = function( node, htmlNode )
-{
-	if ( htmlNode.acceptCharset && htmlNode.acceptCharset.length > 0 && htmlNode.acceptCharset != 'UNKNOWN' )
-		FCKXHtml._AppendAttribute( node, 'accept-charset', htmlNode.acceptCharset ) ;
-
-	// IE has a bug and htmlNode.attributes['name'].specified=false if there is
-	// no element with id="name" inside the form (#360 and SF-BUG-1155726).
-	var nameAtt = htmlNode.attributes['name'] ;
-
-	if ( nameAtt && nameAtt.value.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'name', nameAtt.value ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-	return node ;
-}
-
-// IE doens't hold the name attribute as an attribute for the <TEXTAREA> and <SELECT> tags.
-FCKXHtml.TagProcessors['textarea'] = FCKXHtml.TagProcessors['select'] = function( node, htmlNode )
-{
-	if ( htmlNode.name )
-		FCKXHtml._AppendAttribute( node, 'name', htmlNode.name ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
-
-	return node ;
-}
-
-// On very rare cases, IE is loosing the "align" attribute for DIV. (right align and apply bulleted list)
-FCKXHtml.TagProcessors['div'] = function( node, htmlNode )
-{
-	if ( htmlNode.align.length > 0 )
-		FCKXHtml._AppendAttribute( node, 'align', htmlNode.align ) ;
-
-	node = FCKXHtml._AppendChildNodes( node, htmlNode, true ) ;
-
-	return node ;
-}
+	node = FCKXHtml._AppendChildNodes( node, htmlNode ) ;
+
+	return node ;
+}
Index: /FCKeditor/branches/versions/2.5.x/editor/css/fck_editorarea.css
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/css/fck_editorarea.css	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/css/fck_editorarea.css	(revision 1147)
@@ -47,5 +47,6 @@
 a[href]
 {
-	color: -moz-hyperlinktext !important;	/* For Firefox... mark as important, otherwise it becomes black */
+	color: -moz-hyperlinktext !important;		/* For Firefox... mark as important, otherwise it becomes black */
+	text-decoration: -moz-anchor-decoration;	/* For Firefox 3, otherwise no underline will be used */
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_anchor.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_anchor.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_anchor.html	(revision 1147)
@@ -69,4 +69,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
@@ -189,5 +190,5 @@
 		</script>
 	</head>
-	<body style="OVERFLOW: hidden" scroll="no">
+	<body style="overflow: hidden">
 		<table height="100%" width="100%">
 			<tr>
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_button.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_button.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_button.html	(revision 1147)
@@ -54,4 +54,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_checkbox.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_checkbox.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_checkbox.html	(revision 1147)
@@ -52,4 +52,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: Keditor/branches/versions/2.5.x/editor/dialog/fck_find.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_find.html	(revision 1146)
+++ 	(revision )
@@ -1,173 +1,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<!--
- * FCKeditor - The text editor for Internet - http://www.fckeditor.net
- * Copyright (C) 2003-2007 Frederico Caldeira Knabben
- *
- * == BEGIN LICENSE ==
- *
- * Licensed under the terms of any of the following licenses at your
- * choice:
- *
- *  - GNU General Public License Version 2 or later (the "GPL")
- *    http://www.gnu.org/licenses/gpl.html
- *
- *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
- *    http://www.gnu.org/licenses/lgpl.html
- *
- *  - Mozilla Public License Version 1.1 or later (the "MPL")
- *    http://www.mozilla.org/MPL/MPL-1.1.html
- *
- * == END LICENSE ==
- *
- * "Find" dialog window.
--->
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-	<title></title>
-	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-	<meta content="noindex, nofollow" name="robots" />
-	<script type="text/javascript">
-
-var oEditor = window.parent.InnerDialogLoaded() ;
-
-function OnLoad()
-{
-	// Whole word is available on IE only.
-	if ( oEditor.FCKBrowserInfo.IsIE )
-		document.getElementById('divWord').style.display = '' ;
-
-	// First of all, translate the dialog box texts.
-	oEditor.FCKLanguageManager.TranslatePage( document ) ;
-
-	window.parent.SetAutoSize( true ) ;
-}
-
-function btnStat(frm)
-{
-	document.getElementById('btnFind').disabled =
-		( document.getElementById('txtFind').value.length == 0 ) ;
-}
-
-function ReplaceTextNodes( parentNode, regex, replaceValue, replaceAll )
-{
-	for ( var i = 0 ; i < parentNode.childNodes.length ; i++ )
-	{
-		var oNode = parentNode.childNodes[i] ;
-		if ( oNode.nodeType == 3 )
-		{
-			var sReplaced = oNode.nodeValue.replace( regex, replaceValue ) ;
-			if ( oNode.nodeValue != sReplaced )
-			{
-				oNode.nodeValue = sReplaced ;
-				if ( ! replaceAll )
-					return true ;
-			}
-		}
-		else
-		{
-			if ( ReplaceTextNodes( oNode, regex, replaceValue ) )
-				return true ;
-		}
-	}
-	return false ;
-}
-
-function GetRegexExpr()
-{
-	var sExpr ;
-
-	if ( document.getElementById('chkWord').checked )
-		sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
-	else
-		sExpr = document.getElementById('txtFind').value ;
-
-	return sExpr ;
-}
-
-function GetCase()
-{
-	return ( document.getElementById('chkCase').checked ? '' : 'i' ) ;
-}
-
-function Ok()
-{
-	if ( document.getElementById('txtFind').value.length == 0 )
-		return ;
-
-	if ( oEditor.FCKBrowserInfo.IsIE )
-		FindIE() ;
-	else
-		FindGecko() ;
-}
-
-var oRange ;
-
-if ( oEditor.FCKBrowserInfo.IsIE )
-	oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
-
-function FindIE()
-{
-	var iFlags = 0 ;
-
-	if ( chkCase.checked )
-		iFlags = iFlags | 4 ;
-
-	if ( chkWord.checked )
-		iFlags = iFlags | 2 ;
-
-	var bFound = oRange.findText( document.getElementById('txtFind').value, 1, iFlags ) ;
-
-	if ( bFound )
-	{
-		oRange.scrollIntoView() ;
-		oRange.select() ;
-		oRange.collapse(false) ;
-		oLastRangeFound = oRange ;
-	}
-	else
-	{
-		oRange = oEditor.FCK.EditorDocument.body.createTextRange() ;
-		alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
-	}
-}
-
-function FindGecko()
-{
-	var bCase = document.getElementById('chkCase').checked ;
-	var bWord = document.getElementById('chkWord').checked ;
-
-	// window.find( searchString, caseSensitive, backwards, wrapAround, wholeWord, searchInFrames, showDialog ) ;
-	if ( !oEditor.FCK.EditorWindow.find( document.getElementById('txtFind').value, bCase, false, false, bWord, false, false ) )
-		alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;
-}
-	</script>
-</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>&nbsp;
-			</td>
-			<td width="100%">
-				<input id="txtFind" style="width: 100%" tabindex="1" type="text" />
-			</td>
-			<td>
-				<input id="btnFind" style="padding-right: 5px; padding-left: 5px" onclick="Ok();"
-					type="button" value="Find" fcklang="DlgFindFindBtn" />
-			</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 />
-				<div id="divWord" style="display: none">
-					&nbsp;<input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match
-						whole word</label>
-				</div>
-			</td>
-		</tr>
-	</table>
-</body>
-</html>
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_form.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_form.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_form.html	(revision 1147)
@@ -52,4 +52,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_hiddenfield.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_hiddenfield.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_hiddenfield.html	(revision 1147)
@@ -60,4 +60,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_listprop.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_listprop.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_listprop.html	(revision 1147)
@@ -65,4 +65,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_radiobutton.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_radiobutton.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_radiobutton.html	(revision 1147)
@@ -52,4 +52,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_replace.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_replace.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_replace.html	(revision 1147)
@@ -44,4 +44,7 @@
 	idMap['CheckCase'] = 'chkCase' + tabCode ;
 	idMap['CheckWord'] = 'chkWord' + tabCode ;
+
+	if ( tabCode == 'Replace' )
+		window.parent.SetAutoSize( true ) ;
 }
 
@@ -61,7 +64,11 @@
 	// Show the appropriate tab at startup.
 	if ( window.parent.name.search( 'Replace' ) == -1 )
+	{
 		window.parent.SetSelectedTab( 'Find' ) ;
+		window.parent.SetAutoSize( true ) ;
+	}
 	else
 		window.parent.SetSelectedTab( 'Replace' ) ;
+
 }
 
@@ -104,21 +111,43 @@
 function GetData( bookmark )
 {
-	var currentNode = oEditor.FCK.EditorDocument.documentElement;
-	for( var i = 0 ; i < bookmark.length ; i++ )
-	{
-		if ( currentNode.childNodes.length > bookmark[i] )
-			currentNode = currentNode.childNodes.item( bookmark[i] ) ;
-		else if ( currentNode.nodeType == 3 )	// text node
+	var cursor = oEditor.FCK.EditorDocument.documentElement ;
+	for ( var i = 0 ; i < bookmark.length ; i++ )
+	{
+		var target = bookmark[i] ;
+		var currentIndex = -1 ;
+		if ( cursor.nodeType != 3 )
 		{
-			var c = currentNode.nodeValue.charAt( bookmark[i] ) ;
-			if ( i == bookmark.length - 1 )
-				return c != "" ? c : null ;
-			else
+			for (var j = 0 ; j < cursor.childNodes.length ; j++ )
+			{
+				var candidate = cursor.childNodes[j] ;
+				if ( candidate.nodeType == 3 &&
+						candidate.previousSibling &&
+						candidate.previousSibling.nodeType == 3 )
+					continue ;
+				currentIndex++ ;
+				if ( currentIndex == target )
+				{
+					cursor = candidate ;
+					break ;
+				}
+			}
+			if ( currentIndex < target )
 				return null ;
 		}
 		else
-			return null;
-	}
-	return currentNode ;
+		{
+			if ( i != bookmark.length - 1 )
+				return null ;
+			while ( target >= cursor.length && cursor.nextSibling && cursor.nextSibling.nodeType == 3 )
+			{
+				target -= cursor.length ;
+				cursor = cursor.nextSibling ;
+			}
+			cursor = cursor.nodeValue.charAt( target ) ;
+			if ( cursor == "" )
+				cursor = null ;
+		}
+	}
+	return cursor ;
 }
 
@@ -128,5 +157,4 @@
 	// See if there's anything further down the tree.
 	var next = bookmark.concat( [0] ) ;
-
 	if ( GetData( next ) != null )
 		return next ;
@@ -249,5 +277,8 @@
 			{
 				if ( oEditor.FCKListsLib.BlockElements[ data.tagName.toLowerCase() ] )
+				{
 					matcher.Reset();
+					matchBookmark = null ;
+				}
 			}
 			else if ( data.charAt != undefined )
@@ -320,6 +351,13 @@
 		while ( focus && focus.nodeType != 1 )
 			focus = focus.parentNode ;
+
 		if ( focus )
-		focus.scrollIntoView( false ) ;
+		{
+			if ( oEditor.FCKBrowserInfo.IsSafari )
+				oEditor.FCKDomTools.ScrollIntoView( focus, false ) ;
+			else
+				focus.scrollIntoView( false ) ;
+		}
+
 		return true;
 	}
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_select.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_select.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_select.html	(revision 1147)
@@ -70,4 +70,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
@@ -114,5 +115,5 @@
 		</script>
 	</head>
-	<body style='OVERFLOW: hidden' scroll='no'>
+	<body style="overflow: hidden">
 		<table width="100%" height="100%">
 			<tr>
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_smiley.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_smiley.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_smiley.html	(revision 1147)
@@ -42,4 +42,6 @@
 	// First of all, translate the dialog box texts
 	oEditor.FCKLanguageManager.TranslatePage(document) ;
+
+	window.parent.SetAutoSize( true ) ;
 }
 
@@ -70,5 +72,5 @@
 	</script>
 </head>
-<body scroll="no">
+<body style="overflow: hidden">
 	<table cellpadding="2" cellspacing="2" align="center" border="0" width="100%" height="100%">
 		<script type="text/javascript">
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_specialchar.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_specialchar.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_specialchar.html	(revision 1147)
@@ -70,9 +70,11 @@
 	// First of all, translates the dialog box texts.
 	oEditor.FCKLanguageManager.TranslatePage(document) ;
+
+	window.parent.SetAutoSize( true ) ;
 }
 
 		</script>
-	</HEAD>
-	<BODY onload="setDefaults()" scroll="no">
+	</head>
+	<body onload="setDefaults()" style="overflow: hidden">
 		<table cellpadding="0" cellspacing="0" width="100%" height="100%">
 			<tr>
@@ -115,4 +117,4 @@
 			</tr>
 		</table>
-	</BODY>
-</HTML>
+	</body>
+</html>
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textarea.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textarea.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textarea.html	(revision 1147)
@@ -52,4 +52,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
@@ -72,5 +73,5 @@
 		</script>
 	</head>
-	<body style='OVERFLOW: hidden' scroll='no'>
+	<body style="overflow: hidden">
 		<table height="100%" width="100%">
 			<tr>
Index: /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textfield.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textfield.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/dialog/fck_textfield.html	(revision 1147)
@@ -56,4 +56,5 @@
 
 	window.parent.SetOkButton( true ) ;
+	window.parent.SetAutoSize( true ) ;
 }
 
Index: /FCKeditor/branches/versions/2.5.x/editor/fckdialog.html
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/fckdialog.html	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/fckdialog.html	(revision 1147)
@@ -38,4 +38,8 @@
 // Sets the language direction.
 window.document.dir = window.dialogArguments.Editor.FCKLang.Dir ;
+
+// IE does not set the window name in showModalDialog(), let's set it here.
+if ( window.dialogArguments.Editor.FCKBrowserInfo.IsIE )
+	window.name = window.dialogArguments.DialogName ;
 
 var sTitle = window.dialogArguments.Title ;
Index: /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/asp/config.asp
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/asp/config.asp	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/asp/config.asp	(revision 1147)
@@ -23,5 +23,5 @@
 <%
 
-' SECURITY: You must explicitelly enable this "connector" (set it to "True").
+' SECURITY: You must explicitly enable this "connector" (set it to "True").
 ' WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only 
 '		authenticated users can access this file or use some kind of session checking.
@@ -35,5 +35,5 @@
 ConfigUserFilesPath = "/userfiles/"
 
-' Due to security issues with Apache modules, it is reccomended to leave the
+' Due to security issues with Apache modules, it is recommended to leave the
 ' following setting enabled.
 Dim ConfigForceSingleExtension
@@ -61,5 +61,5 @@
 '		If it is empty then no restrictions are done here.
 '
-'	For a file to be uploaded it has to fullfil both the AllowedExtensions
+'	For a file to be uploaded it has to fulfill both the AllowedExtensions
 '	and DeniedExtensions (that's it: not being denied) conditions.
 '
@@ -71,5 +71,5 @@
 '		an absolute path. 
 '		If it's an empty string then it will be autocalculated.
-'		Usefull if you are using a virtual directory, symbolic link or alias. 
+'		Useful if you are using a virtual directory, symbolic link or alias. 
 '		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 '		Attention: The above 'FileTypesPath' must point to the same directory.
@@ -84,5 +84,5 @@
 '		an absolute path. 
 '		If it's an empty string then it will be autocalculated.
-'		Usefull if you are using a virtual directory, symbolic link or alias. 
+'		Useful if you are using a virtual directory, symbolic link or alias. 
 '		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 '		Attention: The above 'QuickUploadPath' must point to the same directory.
@@ -105,5 +105,5 @@
 ConfigQuickUploadAbsolutePath.Add "File", ""
 
-ConfigAllowedExtensions.Add	"Image", "bmp|gif|jpeg|jpg|png|psd|tif|tiff"
+ConfigAllowedExtensions.Add	"Image", "bmp|gif|jpeg|jpg|png"
 ConfigDeniedExtensions.Add	"Image", ""
 ConfigFileTypesPath.Add "Image", ConfigUserFilesPath & "image/"
@@ -112,5 +112,5 @@
 ConfigQuickUploadAbsolutePath.Add "Image", ""
 
-ConfigAllowedExtensions.Add	"Flash", "swf|fla"
+ConfigAllowedExtensions.Add	"Flash", "swf|flv"
 ConfigDeniedExtensions.Add	"Flash", ""
 ConfigFileTypesPath.Add "Flash", ConfigUserFilesPath & "flash/"
Index: /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/cfm/config.cfm
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/cfm/config.cfm	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/cfm/config.cfm	(revision 1147)
@@ -38,5 +38,5 @@
 	Config.ServerPath = "" ;
 
-	// Due to security issues with Apache modules, it is reccomended to leave the
+	// Due to security issues with Apache modules, it is recommended to leave the
 	// following setting enabled.
 	Config.ForceSingleExtension = true ;
@@ -65,5 +65,5 @@
 //		If it is empty then no restrictions are done here.
 //
-//	For a file to be uploaded it has to fullfil both the AllowedExtensions
+//	For a file to be uploaded it has to fulfill both the AllowedExtensions
 //	and DeniedExtensions (that's it: not being denied) conditions.
 //
@@ -108,5 +108,5 @@
 	Config.QuickUploadAbsolutePath["File"] 	= Config.FileTypesAbsolutePath["File"] ;
 
-	Config.AllowedExtensions["Image"] 		= "bmp,gif,jpeg,jpg,png,psd,tif,tiff" ;
+	Config.AllowedExtensions["Image"] 		= "bmp,gif,jpeg,jpg,png" ;
 	Config.DeniedExtensions["Image"] 		= "" ;
 	Config.FileTypesPath["Image"] 			= Config.UserFilesPath & 'image/' ;
@@ -115,5 +115,5 @@
 	Config.QuickUploadAbsolutePath["Image"] = Config.FileTypesAbsolutePath["Image"] ;
 
-	Config.AllowedExtensions["Flash"] 		= "swf,fla" ;
+	Config.AllowedExtensions["Flash"] 		= "swf,flv" ;
 	Config.DeniedExtensions["Flash"] 		= "" ;
 	Config.FileTypesPath["Flash"] 			= Config.UserFilesPath & 'flash/' ;
Index: /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/lasso/config.lasso
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/lasso/config.lasso	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/lasso/config.lasso	(revision 1147)
@@ -52,6 +52,6 @@
 		'AllowedExtensions' = map(
 			'File' = array('7z','aiff','asf','avi','bmp','csv','doc','fla','flv','gif','gz','gzip','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','ods','odt','pdf','png','ppt','pxd','qt','ram','rar','rm','rmi','rmvb','rtf','sdc','sitd','swf','sxc','sxw','tar','tgz','tif','tiff','txt','vsd','wav','wma','wmv','xls','xml','zip'),
-			'Image' = array('bmp','gif','jpeg','jpg','png','psd','tif','tiff'),
-			'Flash' = array('swf','fla'),
+			'Image' = array('bmp','gif','jpeg','jpg','png'),
+			'Flash' = array('swf','flv'),
 			'Media' = array('aiff','asf','avi','bmp','fla','flv','gif','jpeg','jpg','mid','mov','mp3','mp4','mpc','mpeg','mpg','png','qt','ram','rm','rmi','rmvb','swf','tif','tiff','wav','wma','wmv')
 		),
Index: /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/php/config.php
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/php/config.php	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/php/config.php	(revision 1147)
@@ -25,6 +25,6 @@
 global $Config ;
 
-// SECURITY: You must explicitelly enable this "connector". (Set it to "true").
-// WARNING: don't just set "ConfigIsEnabled = true", you must be sure that only 
+// SECURITY: You must explicitly enable this "connector". (Set it to "true").
+// WARNING: don't just set "$Config['Enabled'] = true ;", you must be sure that only 
 //		authenticated users can access this file or use some kind of session checking.
 $Config['Enabled'] = false ;
@@ -39,10 +39,10 @@
 
 // Fill the following value it you prefer to specify the absolute path for the
-// user files directory. Usefull if you are using a virtual directory, symbolic
+// user files directory. Useful if you are using a virtual directory, symbolic
 // link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 // Attention: The above 'UserFilesPath' must point to the same directory.
 $Config['UserFilesAbsolutePath'] = '' ;
 
-// Due to security issues with Apache modules, it is reccomended to leave the
+// Due to security issues with Apache modules, it is recommended to leave the
 // following setting enabled.
 $Config['ForceSingleExtension'] = true ;
@@ -70,5 +70,5 @@
 		If it is empty then no restrictions are done here.
 
-	For a file to be uploaded it has to fullfil both the AllowedExtensions
+	For a file to be uploaded it has to fulfill both the AllowedExtensions
 	and DeniedExtensions (that's it: not being denied) conditions.
 
@@ -80,5 +80,5 @@
 		an absolute path. 
 		If it's an empty string then it will be autocalculated.
-		Usefull if you are using a virtual directory, symbolic link or alias. 
+		Useful if you are using a virtual directory, symbolic link or alias. 
 		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 		Attention: The above 'FileTypesPath' must point to the same directory.
@@ -93,5 +93,5 @@
 		an absolute path. 
 		If it's an empty string then it will be autocalculated.
-		Usefull if you are using a virtual directory, symbolic link or alias. 
+		Useful if you are using a virtual directory, symbolic link or alias. 
 		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 		Attention: The above 'QuickUploadPath' must point to the same directory.
@@ -101,5 +101,5 @@
 	 	"userfiles" directory to maintain backwards compatibility with older versions of FCKeditor. 
 	 	This is fine, but you in some cases you will be not able to browse uploaded files using file browser.
-	 	Example: if you clik on "image button", select "Upload" tab and send image 
+	 	Example: if you click on "image button", select "Upload" tab and send image 
 	 	to the server, image will appear in FCKeditor correctly, but because it is placed 
 	 	directly in /userfiles/ directory, you'll be not able to see it in built-in file browser.
@@ -121,5 +121,5 @@
 $Config['QuickUploadAbsolutePath']['File']= $Config['UserFilesAbsolutePath'] ;
 
-$Config['AllowedExtensions']['Image']	= array('bmp','gif','jpeg','jpg','png','psd','tif','tiff') ;
+$Config['AllowedExtensions']['Image']	= array('bmp','gif','jpeg','jpg','png') ;
 $Config['DeniedExtensions']['Image']	= array() ;
 $Config['FileTypesPath']['Image']		= $Config['UserFilesPath'] . 'image/' ;
@@ -128,5 +128,5 @@
 $Config['QuickUploadAbsolutePath']['Image']= $Config['UserFilesAbsolutePath'] ;
 
-$Config['AllowedExtensions']['Flash']	= array('swf','fla') ;
+$Config['AllowedExtensions']['Flash']	= array('swf','flv') ;
 $Config['DeniedExtensions']['Flash']	= array() ;
 $Config['FileTypesPath']['Flash']		= $Config['UserFilesPath'] . 'flash/' ;
Index: /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/py/config.py
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/py/config.py	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/filemanager/connectors/py/config.py	(revision 1147)
@@ -23,5 +23,5 @@
 """
 
-# INSTALLATION NOTE: You must set up your server enviroment accordingly to run 
+# INSTALLATION NOTE: You must set up your server environment accordingly to run 
 # python scripts. This connector requires Python 2.4 or greater.
 # 
@@ -29,5 +29,5 @@
 #  * WSGI (recommended): You'll need apache + mod_python + modpython_gateway 
 #                        or any web server capable of the WSGI python standard
-#  * Plain Old CGI:      Any server capable of running standartd python scripts
+#  * Plain Old CGI:      Any server capable of running standard python scripts
 #                        (although mod_python is recommended for performance)
 #                        This was the previous connector version operation mode
@@ -40,5 +40,5 @@
 
    
-# SECURITY: You must explicitelly enable this "connector". (Set it to "True").
+# SECURITY: You must explicitly enable this "connector". (Set it to "True").
 # WARNING: don't just set "ConfigIsEnabled = True", you must be sure that only 
 #		authenticated users can access this file or use some kind of session checking.
@@ -49,5 +49,5 @@
 
 # Fill the following value it you prefer to specify the absolute path for the
-# user files directory. Usefull if you are using a virtual directory, symbolic
+# user files directory. Useful if you are using a virtual directory, symbolic
 # link or alias. Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 # Attention: The above 'UserFilesPath' must point to the same directory.
@@ -56,5 +56,5 @@
 UserFilesAbsolutePath = '' 
 
-# Due to security issues with Apache modules, it is reccomended to leave the
+# Due to security issues with Apache modules, it is recommended to leave the
 # following setting enabled.
 ForceSingleExtension = True 
@@ -78,5 +78,5 @@
 #		If it is empty then no restrictions are done here.
 #
-#	For a file to be uploaded it has to fullfil both the AllowedExtensions
+#	For a file to be uploaded it has to fulfill both the AllowedExtensions
 #	and DeniedExtensions (that's it: not being denied) conditions.
 #
@@ -88,5 +88,5 @@
 #		an absolute path. 
 #		If it's an empty string then it will be autocalculated.
-#		Usefull if you are using a virtual directory, symbolic link or alias. 
+#		Useful if you are using a virtual directory, symbolic link or alias. 
 #		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 #		Attention: The above 'FileTypesPath' must point to the same directory.
@@ -102,5 +102,5 @@
 #		an absolute path. 
 #		If it's an empty string then it will be autocalculated.
-#		Usefull if you are using a virtual directory, symbolic link or alias. 
+#		Useful if you are using a virtual directory, symbolic link or alias. 
 #		Examples: 'C:\\MySite\\userfiles\\' or '/root/mysite/userfiles/'.
 #		Attention: The above 'QuickUploadPath' must point to the same directory.
@@ -114,5 +114,5 @@
 QuickUploadAbsolutePath['File']	= FileTypesAbsolutePath['File']
 
-AllowedExtensions['Image']		= ['bmp','gif','jpeg','jpg','png','psd','tif','tiff']
+AllowedExtensions['Image']		= ['bmp','gif','jpeg','jpg','png']
 DeniedExtensions['Image']		= []
 FileTypesPath['Image']			= UserFilesPath + 'image/' 
@@ -121,5 +121,5 @@
 QuickUploadAbsolutePath['Image']= FileTypesAbsolutePath['Image']
 
-AllowedExtensions['Flash']		= ['swf','fla']
+AllowedExtensions['Flash']		= ['swf','flv']
 DeniedExtensions['Flash']		= []
 FileTypesPath['Flash']			= UserFilesPath + 'flash/'
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/_translationstatus.txt
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/_translationstatus.txt	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/_translationstatus.txt	(revision 1147)
@@ -23,5 +23,5 @@
 
 af.js      Found: 397   Missing: 15
-ar.js      Found: 397   Missing: 15
+ar.js      Found: 412   Missing: 0
 bg.js      Found: 374   Missing: 38
 bn.js      Found: 381   Missing: 31
@@ -36,6 +36,6 @@
 en-uk.js   Found: 412   Missing: 0
 eo.js      Found: 346   Missing: 66
-es.js      Found: 382   Missing: 30
-et.js      Found: 398   Missing: 14
+es.js      Found: 412   Missing: 0
+et.js      Found: 412   Missing: 0
 eu.js      Found: 382   Missing: 30
 fa.js      Found: 398   Missing: 14
@@ -59,5 +59,5 @@
 nl.js      Found: 412   Missing: 0
 no.js      Found: 396   Missing: 16
-pl.js      Found: 382   Missing: 30
+pl.js      Found: 412   Missing: 0
 pt-br.js   Found: 397   Missing: 15
 pt.js      Found: 382   Missing: 30
@@ -73,4 +73,4 @@
 uk.js      Found: 398   Missing: 14
 vi.js      Found: 397   Missing: 15
-zh-cn.js   Found: 411   Missing: 1
+zh-cn.js   Found: 412   Missing: 0
 zh.js      Found: 412   Missing: 0
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/ar.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/ar.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/ar.js	(revision 1147)
@@ -46,5 +46,5 @@
 RemoveLink			: "إزالة رابط",
 Anchor				: "إدراج/تحرير إشارة مرجعية",
-AnchorDelete		: "Remove Anchor",	//MISSING
+AnchorDelete		: "إزالة إشارة مرجعية",
 InsertImageLbl		: "صورة",
 InsertImage			: "إدراج/تحرير صورة",
@@ -72,5 +72,5 @@
 DecreaseIndent		: "إنقاص المسافة البادئة",
 IncreaseIndent		: "زيادة المسافة البادئة",
-Blockquote			: "Blockquote",	//MISSING
+Blockquote			: "اقتباس",
 Undo				: "تراجع",
 Redo				: "إعادة",
@@ -106,5 +106,5 @@
 
 FitWindow		: "تكبير حجم المحرر",
-ShowBlocks		: "Show Blocks",	//MISSING
+ShowBlocks		: "مخطط تفصيلي",
 
 // Context Menu
@@ -113,18 +113,18 @@
 RowCM				: "صف",
 ColumnCM			: "عمود",
-InsertRowAfter		: "Insert Row After",	//MISSING
-InsertRowBefore		: "Insert Row Before",	//MISSING
+InsertRowAfter		: "إدراج صف بعد",
+InsertRowBefore		: "إدراج صف قبل",
 DeleteRows			: "حذف صفوف",
-InsertColumnAfter	: "Insert Column After",	//MISSING
-InsertColumnBefore	: "Insert Column Before",	//MISSING
+InsertColumnAfter	: "إدراج عمود بعد",
+InsertColumnBefore	: "إدراج عمود قبل",
 DeleteColumns		: "حذف أعمدة",
-InsertCellAfter		: "Insert Cell After",	//MISSING
-InsertCellBefore	: "Insert Cell Before",	//MISSING
+InsertCellAfter		: "إدراج خلية بعد",
+InsertCellBefore	: "إدراج خلية قبل",
 DeleteCells			: "حذف خلايا",
 MergeCells			: "دمج خلايا",
-MergeRight			: "Merge Right",	//MISSING
-MergeDown			: "Merge Down",	//MISSING
-HorizontalSplitCell	: "Split Cell Horizontally",	//MISSING
-VerticalSplitCell	: "Split Cell Vertically",	//MISSING
+MergeRight			: "دمج لليمين",
+MergeDown			: "دمج للأسفل",
+HorizontalSplitCell	: "تقسيم الخلية أفقياً",
+VerticalSplitCell	: "تقسيم الخلية عمودياً",
 TableDelete			: "حذف الجدول",
 CellProperties		: "خصائص الخلية",
@@ -333,5 +333,5 @@
 
 // Find and Replace Dialog
-DlgFindAndReplaceTitle	: "Find and Replace",	//MISSING
+DlgFindAndReplaceTitle	: "بحث واستبدال",
 
 // Find Dialog
@@ -357,5 +357,5 @@
 
 DlgPasteMsg2	: "الصق داخل الصندوق بإستخدام زرّي (<STRONG>Ctrl+V</STRONG>) في لوحة المفاتيح، ثم اضغط زر  <STRONG>موافق</STRONG>.",
-DlgPasteSec		: "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.",	//MISSING
+DlgPasteSec		: "نظراً لإعدادات الأمان الخاصة بمتصفحك، لن يتمكن هذا المحرر من الوصول لمحتوى حافظتك، لذا وجب عليك لصق المحتوى مرة أخرى في هذه النافذة.",
 DlgPasteIgnoreFont		: "تجاهل تعريفات أسماء الخطوط",
 DlgPasteRemoveStyles	: "إزالة تعريفات الأنماط",
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/es.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/es.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/es.js	(revision 1147)
@@ -46,5 +46,5 @@
 RemoveLink			: "Eliminar Vínculo",
 Anchor				: "Referencia",
-AnchorDelete		: "Remove Anchor",	//MISSING
+AnchorDelete		: "Eliminar Referencia",
 InsertImageLbl		: "Imagen",
 InsertImage			: "Insertar/Editar Imagen",
@@ -72,5 +72,5 @@
 DecreaseIndent		: "Disminuir Sangría",
 IncreaseIndent		: "Aumentar Sangría",
-Blockquote			: "Blockquote",	//MISSING
+Blockquote			: "Cita",
 Undo				: "Deshacer",
 Redo				: "Rehacer",
@@ -106,5 +106,5 @@
 
 FitWindow		: "Maximizar el tamaño del editor",
-ShowBlocks		: "Show Blocks",	//MISSING
+ShowBlocks		: "Mostrar bloques",
 
 // Context Menu
@@ -113,18 +113,18 @@
 RowCM				: "Fila",
 ColumnCM			: "Columna",
-InsertRowAfter		: "Insert Row After",	//MISSING
-InsertRowBefore		: "Insert Row Before",	//MISSING
+InsertRowAfter		: "Insertar fila en la parte inferior",
+InsertRowBefore		: "Insertar fila en la parte superior",
 DeleteRows			: "Eliminar Filas",
-InsertColumnAfter	: "Insert Column After",	//MISSING
-InsertColumnBefore	: "Insert Column Before",	//MISSING
+InsertColumnAfter	: "Insertar columna a la derecha",
+InsertColumnBefore	: "Insertar columna a la izquierda",
 DeleteColumns		: "Eliminar Columnas",
-InsertCellAfter		: "Insert Cell After",	//MISSING
-InsertCellBefore	: "Insert Cell Before",	//MISSING
+InsertCellAfter		: "Insertar celda a la derecha",
+InsertCellBefore	: "Insertar celda a la izquierda",
 DeleteCells			: "Eliminar Celdas",
 MergeCells			: "Combinar Celdas",
-MergeRight			: "Merge Right",	//MISSING
-MergeDown			: "Merge Down",	//MISSING
-HorizontalSplitCell	: "Split Cell Horizontally",	//MISSING
-VerticalSplitCell	: "Split Cell Vertically",	//MISSING
+MergeRight			: "Combinar a la derecha",
+MergeDown			: "Combinar hacia abajo",
+HorizontalSplitCell	: "Dividir la celda horizontalmente",
+VerticalSplitCell	: "Dividir la celda verticalmente",
 TableDelete			: "Eliminar Tabla",
 CellProperties		: "Propiedades de Celda",
@@ -172,8 +172,8 @@
 DlgGenNotSet		: "<No definido>",
 DlgGenId			: "Id",
-DlgGenLangDir		: "Orientación de idioma",
+DlgGenLangDir		: "Orientación",
 DlgGenLangDirLtr	: "Izquierda a Derecha (LTR)",
 DlgGenLangDirRtl	: "Derecha a Izquierda (RTL)",
-DlgGenLangCode		: "Código de idioma",
+DlgGenLangCode		: "Cód. de idioma",
 DlgGenAccessKey		: "Clave de Acceso",
 DlgGenName			: "Nombre",
@@ -211,5 +211,5 @@
 DlgImgAlignTop		: "Tope",
 DlgImgPreview		: "Vista Previa",
-DlgImgAlertUrl		: "Por favor tipee el URL de la imagen",
+DlgImgAlertUrl		: "Por favor escriba la URL de la imagen",
 DlgImgLinkTab		: "Vínculo",
 
@@ -272,5 +272,5 @@
 DlnLnkMsgNoEMail	: "Por favor tipee la dirección de e-mail",
 DlnLnkMsgNoAnchor	: "Por favor seleccione una referencia",
-DlnLnkMsgInvPopName	: "The popup name must begin with an alphabetic character and must not contain spaces",	//MISSING
+DlnLnkMsgInvPopName	: "El nombre debe empezar con un caracter alfanumérico y no debe contener espacios",
 
 // Color Dialog
@@ -333,5 +333,5 @@
 
 // Find and Replace Dialog
-DlgFindAndReplaceTitle	: "Find and Replace",	//MISSING
+DlgFindAndReplaceTitle	: "Buscar y Reemplazar",
 
 // Find Dialog
@@ -357,5 +357,5 @@
 
 DlgPasteMsg2	: "Por favor pegue dentro del cuadro utilizando el teclado (<STRONG>Ctrl+V</STRONG>); luego presione <STRONG>OK</STRONG>.",
-DlgPasteSec		: "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.",	//MISSING
+DlgPasteSec		: "Debido a la configuración de seguridad de su navegador, el editor no tiene acceso al portapapeles. Es necesario que lo pegue de nuevo en esta ventana.",
 DlgPasteIgnoreFont		: "Ignorar definiciones de fuentes",
 DlgPasteRemoveStyles	: "Remover definiciones de estilo",
@@ -394,7 +394,7 @@
 DlgButtonText		: "Texto (Valor)",
 DlgButtonType		: "Tipo",
-DlgButtonTypeBtn	: "Button",	//MISSING
-DlgButtonTypeSbm	: "Submit",	//MISSING
-DlgButtonTypeRst	: "Reset",	//MISSING
+DlgButtonTypeBtn	: "Boton",
+DlgButtonTypeSbm	: "Enviar",
+DlgButtonTypeRst	: "Reestablecer",
 
 // Checkbox and Radio Button Dialogs
@@ -445,5 +445,5 @@
 BulletedListProp	: "Propiedades de Viñetas",
 NumberedListProp	: "Propiedades de Numeraciones",
-DlgLstStart			: "Start",	//MISSING
+DlgLstStart			: "Inicio",
 DlgLstType			: "Tipo",
 DlgLstTypeCircle	: "Círculo",
@@ -468,13 +468,13 @@
 DlgDocLangCode		: "Código de Idioma",
 DlgDocCharSet		: "Codif. de Conjunto de Caracteres",
-DlgDocCharSetCE		: "Central European",	//MISSING
-DlgDocCharSetCT		: "Chinese Traditional (Big5)",	//MISSING
-DlgDocCharSetCR		: "Cyrillic",	//MISSING
-DlgDocCharSetGR		: "Greek",	//MISSING
-DlgDocCharSetJP		: "Japanese",	//MISSING
-DlgDocCharSetKR		: "Korean",	//MISSING
-DlgDocCharSetTR		: "Turkish",	//MISSING
-DlgDocCharSetUN		: "Unicode (UTF-8)",	//MISSING
-DlgDocCharSetWE		: "Western European",	//MISSING
+DlgDocCharSetCE		: "Centro Europeo",
+DlgDocCharSetCT		: "Chino Tradicional (Big5)",
+DlgDocCharSetCR		: "Cirílico",
+DlgDocCharSetGR		: "Griego",
+DlgDocCharSetJP		: "Japonés",
+DlgDocCharSetKR		: "Coreano",
+DlgDocCharSetTR		: "Turco",
+DlgDocCharSetUN		: "Unicode (UTF-8)",
+DlgDocCharSetWE		: "Europeo occidental",
 DlgDocCharSetOther	: "Otra Codificación",
 
@@ -506,5 +506,5 @@
 DlgTemplatesLoading	: "Cargando lista de Plantillas. Por favor, aguarde...",
 DlgTemplatesNoTpl	: "(No hay plantillas definidas)",
-DlgTemplatesReplace	: "Replace actual contents",	//MISSING
+DlgTemplatesReplace	: "Reemplazar el contenido actual",
 
 // About Dialog
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/et.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/et.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/et.js	(revision 1147)
@@ -43,14 +43,14 @@
 RemoveFormat		: "Eemalda vorming",
 InsertLinkLbl		: "Link",
-InsertLink			: "Sisesta/Muuda link",
+InsertLink			: "Sisesta link / Muuda linki",
 RemoveLink			: "Eemalda link",
-Anchor				: "Sisesta/Muuda ankur",
-AnchorDelete		: "Remove Anchor",	//MISSING
+Anchor				: "Sisesta ankur / Muuda ankrut",
+AnchorDelete		: "Eemalda ankur",
 InsertImageLbl		: "Pilt",
-InsertImage			: "Sisesta/Muuda pilt",
+InsertImage			: "Sisesta pilt / Muuda pilti",
 InsertFlashLbl		: "Flash",
-InsertFlash			: "Sisesta/Muuda flash",
+InsertFlash			: "Sisesta flash / Muuda flashi",
 InsertTableLbl		: "Tabel",
-InsertTable			: "Sisesta/Muuda tabel",
+InsertTable			: "Sisesta tabel / Muuda tabelit",
 InsertLineLbl		: "Joon",
 InsertLine			: "Sisesta horisontaaljoon",
@@ -60,8 +60,8 @@
 InsertSmiley		: "Sisesta emotikon",
 About				: "FCKeditor teave",
-Bold				: "Rasvane kiri",
-Italic				: "Kursiiv kiri",
-Underline			: "Allajoonitud kiri",
-StrikeThrough		: "Läbijoonitud kiri",
+Bold				: "Paks",
+Italic				: "Kursiiv",
+Underline			: "Allajoonitud",
+StrikeThrough		: "Läbijoonitud",
 Subscript			: "Allindeks",
 Superscript			: "Ülaindeks",
@@ -72,5 +72,5 @@
 DecreaseIndent		: "Vähenda taanet",
 IncreaseIndent		: "Suurenda taanet",
-Blockquote			: "Blockquote",	//MISSING
+Blockquote			: "Blokktsitaat",
 Undo				: "Võta tagasi",
 Redo				: "Korda toimingut",
@@ -93,5 +93,5 @@
 UniversalKeyboard	: "Universaalne klaviatuur",
 PageBreakLbl		: "Lehepiir",
-PageBreak			: "Sisesta lehevahetus koht",
+PageBreak			: "Sisesta lehevahetuskoht",
 
 Form			: "Vorm",
@@ -106,5 +106,5 @@
 
 FitWindow		: "Maksimeeri redaktori mõõtmed",
-ShowBlocks		: "Show Blocks",	//MISSING
+ShowBlocks		: "Näita blokke",
 
 // Context Menu
@@ -113,22 +113,22 @@
 RowCM				: "Rida",
 ColumnCM			: "Veerg",
-InsertRowAfter		: "Insert Row After",	//MISSING
-InsertRowBefore		: "Insert Row Before",	//MISSING
-DeleteRows			: "Eemalda ridu",
-InsertColumnAfter	: "Insert Column After",	//MISSING
-InsertColumnBefore	: "Insert Column Before",	//MISSING
+InsertRowAfter		: "Sisesta rida peale",
+InsertRowBefore		: "Sisesta rida enne",
+DeleteRows			: "Eemalda read",
+InsertColumnAfter	: "Sisesta veerg peale",
+InsertColumnBefore	: "Sisesta veerg enne",
 DeleteColumns		: "Eemalda veerud",
-InsertCellAfter		: "Insert Cell After",	//MISSING
-InsertCellBefore	: "Insert Cell Before",	//MISSING
+InsertCellAfter		: "Sisesta lahter peale",
+InsertCellBefore	: "Sisesta lahter enne",
 DeleteCells			: "Eemalda lahtrid",
 MergeCells			: "Ühenda lahtrid",
-MergeRight			: "Merge Right",	//MISSING
-MergeDown			: "Merge Down",	//MISSING
-HorizontalSplitCell	: "Split Cell Horizontally",	//MISSING
-VerticalSplitCell	: "Split Cell Vertically",	//MISSING
+MergeRight			: "Ühenda paremale",
+MergeDown			: "Ühenda alla",
+HorizontalSplitCell	: "Poolita lahter horisontaalselt",
+VerticalSplitCell	: "Poolita lahter vertikaalselt",
 TableDelete			: "Kustuta tabel",
 CellProperties		: "Lahtri atribuudid",
 TableProperties		: "Tabeli atribuudid",
-ImageProperties		: "Pildi  atribuudid",
+ImageProperties		: "Pildi atribuudid",
 FlashProperties		: "Flash omadused",
 
@@ -147,13 +147,13 @@
 
 // Alerts and Messages
-ProcessingXHTML		: "Töötlen XHTML. Palun oota...",
+ProcessingXHTML		: "Töötlen XHTML'i. Palun oota...",
 Done				: "Tehtud",
-PasteWordConfirm	: "Tekst, mida soovid lisada paistab pärinevat Wordist. Kas soovid seda enne kleepimist puhastada?",
+PasteWordConfirm	: "Tekst, mida soovid lisada paistab pärinevat Word'ist. Kas soovid seda enne kleepimist puhastada?",
 NotCompatiblePaste	: "See käsk on saadaval ainult Internet Explorer versioon 5.5 või uuema puhul. Kas soovid kleepida ilma puhastamata?",
-UnknownToolbarItem	: "Tundmatu tööriistariba üksus \"%1\"",
+UnknownToolbarItem	: "Tundmatu tööriistarea üksus \"%1\"",
 UnknownCommand		: "Tundmatu käsunimi \"%1\"",
 NotImplemented		: "Käsku ei täidetud",
 UnknownToolbarSet	: "Tööriistariba \"%1\" ei eksisteeri",
-NoActiveX			: "Sinu veebisirvija turvalisuse seaded võivad limiteerida mõningaid tekstirdaktori kasutus võimalusi. Sa peaksid võimaldama valiku \"Run ActiveX controls and plug-ins\" oma sirvija seadetes. Muidu võid sa täheldada vigu tekstiredaktori töös ja märgata puuduvaid funktsioone.",
+NoActiveX			: "Sinu veebisirvija turvalisuse seaded võivad limiteerida mõningaid tekstirdaktori kasutusvõimalusi. Sa peaksid võimaldama valiku \"Run ActiveX controls and plug-ins\" oma veebisirvija seadetes. Muidu võid sa täheldada vigu tekstiredaktori töös ja märgata puuduvaid funktsioone.",
 BrowseServerBlocked : "Ressursside sirvija avamine ebaõnnestus. Võimalda pop-up akende avanemine.",
 DialogBlocked		: "Ei olenud võimalik avada dialoogi akent. Võimalda pop-up akende avanemine.",
@@ -250,5 +250,5 @@
 DlgLnkTargetPopup	: "<hüpikaken>",
 DlgLnkTargetBlank	: "Uus aken (_blank)",
-DlgLnkTargetParent	: "Vanem aken (_parent)",
+DlgLnkTargetParent	: "Esivanem aken (_parent)",
 DlgLnkTargetSelf	: "Sama aken (_self)",
 DlgLnkTargetTop		: "Pealmine aken (_top)",
@@ -333,5 +333,5 @@
 
 // Find and Replace Dialog
-DlgFindAndReplaceTitle	: "Find and Replace",	//MISSING
+DlgFindAndReplaceTitle	: "Otsi ja asenda",
 
 // Find Dialog
@@ -360,5 +360,5 @@
 DlgPasteIgnoreFont		: "Ignoreeri kirja definitsioone",
 DlgPasteRemoveStyles	: "Eemalda stiilide definitsioonid",
-DlgPasteCleanBox		: "Puhasta ära kast",
+DlgPasteCleanBox		: "Puhasta kast",
 
 // Color Picker
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/he.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/he.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/he.js	(revision 1147)
@@ -20,6 +20,4 @@
  *
  * Hebrew language file.
- * Translation Help
- * Tamir Mordo - www.tetitu.co.il
  */
 
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/pl.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/pl.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/pl.js	(revision 1147)
@@ -46,5 +46,5 @@
 RemoveLink			: "Usuń hiperłącze",
 Anchor				: "Wstaw/edytuj kotwicę",
-AnchorDelete		: "Remove Anchor",	//MISSING
+AnchorDelete		: "Usuń kotwicę",
 InsertImageLbl		: "Obrazek",
 InsertImage			: "Wstaw/edytuj obrazek",
@@ -72,5 +72,5 @@
 DecreaseIndent		: "Zmniejsz wcięcie",
 IncreaseIndent		: "Zwiększ wcięcie",
-Blockquote			: "Blockquote",	//MISSING
+Blockquote			: "Cytat",
 Undo				: "Cofnij",
 Redo				: "Ponów",
@@ -96,6 +96,6 @@
 
 Form			: "Formularz",
-Checkbox		: "Checkbox",
-RadioButton		: "Pole wyboru",
+Checkbox		: "Pole wyboru (checkbox)",
+RadioButton		: "Pole wyboru (radio)",
 TextField		: "Pole tekstowe",
 Textarea		: "Obszar tekstowy",
@@ -103,8 +103,8 @@
 Button			: "Przycisk",
 SelectionField	: "Lista wyboru",
-ImageButton		: "Przycisk obrazek",
+ImageButton		: "Przycisk-obrazek",
 
 FitWindow		: "Maksymalizuj rozmiar edytora",
-ShowBlocks		: "Show Blocks",	//MISSING
+ShowBlocks		: "Pokaż bloki",
 
 // Context Menu
@@ -113,18 +113,18 @@
 RowCM				: "Wiersz",
 ColumnCM			: "Kolumna",
-InsertRowAfter		: "Insert Row After",	//MISSING
-InsertRowBefore		: "Insert Row Before",	//MISSING
+InsertRowAfter		: "Wstaw wiersz poniżej",
+InsertRowBefore		: "Wstaw wiersz powyżej",
 DeleteRows			: "Usuń wiersze",
-InsertColumnAfter	: "Insert Column After",	//MISSING
-InsertColumnBefore	: "Insert Column Before",	//MISSING
+InsertColumnAfter	: "Wstaw kolumnę z prawej",
+InsertColumnBefore	: "Wstaw kolumnę z lewej",
 DeleteColumns		: "Usuń kolumny",
-InsertCellAfter		: "Insert Cell After",	//MISSING
-InsertCellBefore	: "Insert Cell Before",	//MISSING
+InsertCellAfter		: "Wstaw komórkę z prawej",
+InsertCellBefore	: "Wstaw komórkę z lewej",
 DeleteCells			: "Usuń komórki",
 MergeCells			: "Połącz komórki",
-MergeRight			: "Merge Right",	//MISSING
-MergeDown			: "Merge Down",	//MISSING
-HorizontalSplitCell	: "Split Cell Horizontally",	//MISSING
-VerticalSplitCell	: "Split Cell Vertically",	//MISSING
+MergeRight			: "Połącz z komórką z prawej",
+MergeDown			: "Połącz z komórką poniżej",
+HorizontalSplitCell	: "Podziel komórkę poziomo",
+VerticalSplitCell	: "Podziel komórkę pionowo",
 TableDelete			: "Usuń tabelę",
 CellProperties		: "Właściwości komórki",
@@ -135,7 +135,7 @@
 AnchorProp			: "Właściwości kotwicy",
 ButtonProp			: "Właściwości przycisku",
-CheckboxProp		: "Checkbox - właściwości",
+CheckboxProp		: "Właściwości pola wyboru (checkbox)",
 HiddenFieldProp		: "Właściwości pola ukrytego",
-RadioButtonProp		: "Właściwości pola wyboru",
+RadioButtonProp		: "Właściwości pola wyboru (radio)",
 ImageButtonProp		: "Właściwości przycisku obrazka",
 TextFieldProp		: "Właściwości pola tekstowego",
@@ -156,6 +156,6 @@
 UnknownToolbarSet	: "Pasek narzędzi \"%1\" nie istnieje",
 NoActiveX			: "Ustawienia zabezpieczeń twojej przeglądarki mogą ograniczyć niektóre funkcje edytora. Musisz włączyć opcję \"Uruchamianie formantów Activex i dodatków plugin\". W przeciwnym wypadku mogą pojawiać się błędy.",
-BrowseServerBlocked : "Okno menadżera plików nie może zostać otwarte. Upewnij się, że wszystkie blokady popup są wyłączone.",
-DialogBlocked		: "Nie można otworzyć okna dialogowego. Upewnij się, że wszystkie blokady popup są wyłączone.",
+BrowseServerBlocked : "Nie można otworzyć okno menadżera plików. Upewnij się, że wszystkie blokady wyskakujących okienek są wyłączone.",
+DialogBlocked		: "Nie można otworzyć okna dialogowego. Upewnij się, że wszystkie blokady wyskakujących okienek są wyłączone.",
 
 // Dialogs
@@ -170,5 +170,5 @@
 
 // General Dialogs Labels
-DlgGenNotSet		: "<nieustawione>",
+DlgGenNotSet		: "<nie ustawione>",
 DlgGenId			: "Id",
 DlgGenLangDir		: "Kierunek tekstu",
@@ -179,9 +179,9 @@
 DlgGenName			: "Nazwa",
 DlgGenTabIndex		: "Indeks tabeli",
-DlgGenLongDescr		: "Long Description URL",
-DlgGenClass			: "Stylesheet Classes",
-DlgGenTitle			: "Advisory Title",
-DlgGenContType		: "Advisory Content Type",
-DlgGenLinkCharset	: "Linked Resource Charset",
+DlgGenLongDescr		: "Długi opis hiperłącza",
+DlgGenClass			: "Nazwa klasy CSS",
+DlgGenTitle			: "Opis obiektu docelowego",
+DlgGenContType		: "Typ MIME obiektu docelowego",
+DlgGenLinkCharset	: "Kodowanie znaków obiektu docelowego",
 DlgGenStyle			: "Styl",
 
@@ -189,5 +189,5 @@
 DlgImgTitle			: "Właściwości obrazka",
 DlgImgInfoTab		: "Informacje o obrazku",
-DlgImgBtnUpload		: "Syślij",
+DlgImgBtnUpload		: "Wyślij",
 DlgImgURL			: "Adres URL",
 DlgImgUpload		: "Wyślij",
@@ -212,5 +212,5 @@
 DlgImgPreview		: "Podgląd",
 DlgImgAlertUrl		: "Podaj adres obrazka.",
-DlgImgLinkTab		: "Link",
+DlgImgLinkTab		: "Hiperłącze",
 
 // Flash Dialog
@@ -243,5 +243,5 @@
 DlgLnkEMailSubject	: "Temat",
 DlgLnkEMailBody		: "Treść",
-DlgLnkUpload		: "Upload",
+DlgLnkUpload		: "Wyślij",
 DlgLnkBtnUpload		: "Wyślij",
 
@@ -272,5 +272,5 @@
 DlnLnkMsgNoEMail	: "Podaj adres e-mail",
 DlnLnkMsgNoAnchor	: "Wybierz etykietę",
-DlnLnkMsgInvPopName	: "The popup name must begin with an alphabetic character and must not contain spaces",	//MISSING
+DlnLnkMsgInvPopName	: "Nazwa wyskakującego okienka musi zaczynać się od znaku alfanumerycznego i nie może zawierać spacji",
 
 // Color Dialog
@@ -333,5 +333,5 @@
 
 // Find and Replace Dialog
-DlgFindAndReplaceTitle	: "Find and Replace",	//MISSING
+DlgFindAndReplaceTitle	: "Znajdź i zamień",
 
 // Find Dialog
@@ -357,5 +357,5 @@
 
 DlgPasteMsg2	: "Proszę wkleić w poniższym polu używając klawiaturowego skrótu (<STRONG>Ctrl+V</STRONG>) i kliknąć <STRONG>OK</STRONG>.",
-DlgPasteSec		: "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.",	//MISSING
+DlgPasteSec		: "Zabezpieczenia przeglądarki uniemożliwiają wklejenie danych bezpośrednio do edytora. Proszę dane wkleić ponownie w tym okienku.",
 DlgPasteIgnoreFont		: "Ignoruj definicje 'Font Face'",
 DlgPasteRemoveStyles	: "Usuń definicje Stylów",
@@ -381,5 +381,5 @@
 DlgSpellBtnReplace		: "Zmień",
 DlgSpellBtnReplaceAll	: "Zmień wszystkie",
-DlgSpellBtnUndo			: "Undo",
+DlgSpellBtnUndo			: "Cofnij",
 DlgSpellNoSuggestions	: "- Brak sugestii -",
 DlgSpellProgress		: "Trwa sprawdzanie ...",
@@ -394,12 +394,12 @@
 DlgButtonText		: "Tekst (Wartość)",
 DlgButtonType		: "Typ",
-DlgButtonTypeBtn	: "Button",	//MISSING
-DlgButtonTypeSbm	: "Submit",	//MISSING
-DlgButtonTypeRst	: "Reset",	//MISSING
+DlgButtonTypeBtn	: "Przycisk",
+DlgButtonTypeSbm	: "Wyślij",
+DlgButtonTypeRst	: "Wyzeruj",
 
 // Checkbox and Radio Button Dialogs
 DlgCheckboxName		: "Nazwa",
 DlgCheckboxValue	: "Wartość",
-DlgCheckboxSelected	: "Zaznaczony",
+DlgCheckboxSelected	: "Zaznaczone",
 
 // Form Dialog
@@ -445,5 +445,5 @@
 BulletedListProp	: "Właściwości listy punktowanej",
 NumberedListProp	: "Właściwości listy numerowanej",
-DlgLstStart			: "Start",	//MISSING
+DlgLstStart			: "Początek",
 DlgLstType			: "Typ",
 DlgLstTypeCircle	: "Koło",
@@ -468,16 +468,16 @@
 DlgDocLangCode		: "Kod języka",
 DlgDocCharSet		: "Kodowanie znaków",
-DlgDocCharSetCE		: "Central European",	//MISSING
-DlgDocCharSetCT		: "Chinese Traditional (Big5)",	//MISSING
-DlgDocCharSetCR		: "Cyrillic",	//MISSING
-DlgDocCharSetGR		: "Greek",	//MISSING
-DlgDocCharSetJP		: "Japanese",	//MISSING
-DlgDocCharSetKR		: "Korean",	//MISSING
-DlgDocCharSetTR		: "Turkish",	//MISSING
-DlgDocCharSetUN		: "Unicode (UTF-8)",	//MISSING
-DlgDocCharSetWE		: "Western European",	//MISSING
+DlgDocCharSetCE		: "Środkowoeuropejskie",
+DlgDocCharSetCT		: "Chińskie tradycyjne (Big5)",
+DlgDocCharSetCR		: "Cyrylica",
+DlgDocCharSetGR		: "Greckie",
+DlgDocCharSetJP		: "Japońskie",
+DlgDocCharSetKR		: "Koreańskie",
+DlgDocCharSetTR		: "Tureckie",
+DlgDocCharSetUN		: "Unicode (UTF-8)",
+DlgDocCharSetWE		: "Zachodnioeuropejskie",
 DlgDocCharSetOther	: "Inne kodowanie znaków",
 
-DlgDocDocType		: "Nagłowek typu dokumentu",
+DlgDocDocType		: "Nagłówek typu dokumentu",
 DlgDocDocTypeOther	: "Inny typ dokumentu",
 DlgDocIncXHTML		: "Dołącz deklarację XHTML",
@@ -497,5 +497,5 @@
 DlgDocMeDescr		: "Opis dokumentu",
 DlgDocMeAuthor		: "Autor",
-DlgDocMeCopy		: "Copyright",
+DlgDocMeCopy		: "Prawa autorskie",
 DlgDocPreview		: "Podgląd",
 
@@ -506,5 +506,5 @@
 DlgTemplatesLoading	: "Ładowanie listy szablonów. Proszę czekać...",
 DlgTemplatesNoTpl	: "(Brak zdefiniowanych szablonów)",
-DlgTemplatesReplace	: "Replace actual contents",	//MISSING
+DlgTemplatesReplace	: "Zastąp aktualną zawartość",
 
 // About Dialog
Index: /FCKeditor/branches/versions/2.5.x/editor/lang/zh-cn.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/editor/lang/zh-cn.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/editor/lang/zh-cn.js	(revision 1147)
@@ -357,5 +357,5 @@
 
 DlgPasteMsg2	: "请使用键盘快捷键(<STRONG>Ctrl+V</STRONG>)把内容粘贴到下面的方框里，再按 <STRONG>确定</STRONG>。",
-DlgPasteSec		: "Because of your browser security settings, the editor is not able to access your clipboard data directly. You are required to paste it again in this window.",	//MISSING
+DlgPasteSec		: "因为你的浏览器的安全设置原因，本编辑器不能直接访问你的剪贴板内容，你需要在本窗口重新粘贴一次。",
 DlgPasteIgnoreFont		: "忽略 Font 标签",
 DlgPasteRemoveStyles	: "清理 CSS 样式",
Index: /FCKeditor/branches/versions/2.5.x/fckconfig.js
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckconfig.js	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckconfig.js	(revision 1147)
@@ -147,5 +147,5 @@
 FCKConfig.FontColors = '000000,993300,333300,003300,003366,000080,333399,333333,800000,FF6600,808000,808080,008080,0000FF,666699,808080,FF0000,FF9900,99CC00,339966,33CCCC,3366FF,800080,999999,FF00FF,FFCC00,FFFF00,00FF00,00FFFF,00CCFF,993366,C0C0C0,FF99CC,FFCC99,FFFF99,CCFFCC,CCFFFF,99CCFF,CC99FF,FFFFFF' ;
 
-FCKConfig.FontFormats	= 'p;div;pre;address;h1;h2;h3;h4;h5;h6' ;
+FCKConfig.FontFormats	= 'p;h1;h2;h3;h4;h5;h6;pre;address;div' ;
 FCKConfig.FontNames		= 'Arial;Comic Sans MS;Courier New;Tahoma;Times New Roman;Verdana' ;
 FCKConfig.FontSizes		= 'smaller;larger;xx-small;x-small;small;medium;large;x-large;xx-large' ;
@@ -265,7 +265,8 @@
 var _QuickUploadLanguage	= 'php' ;	// asp | aspx | cfm | lasso | perl | php | py
 
-// Don't care about the following line. It just calculates the correct connector
+// Don't care about the following two lines. It just calculates the correct connector
 // extension to use for the default File Browser (Perl uses "cgi").
 var _FileBrowserExtension = _FileBrowserLanguage == 'perl' ? 'cgi' : _FileBrowserLanguage ;
+var _QuickUploadExtension = _QuickUploadLanguage == 'perl' ? 'cgi' : _QuickUploadLanguage ;
 
 FCKConfig.LinkBrowser = true ;
@@ -285,16 +286,16 @@
 
 FCKConfig.LinkUpload = true ;
-FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage ;
-FCKConfig.LinkUploadAllowedExtensions	= "" ;			// empty for all
-FCKConfig.LinkUploadDeniedExtensions	= ".(html|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|com|dll|vbs|js|reg|cgi|htaccess|asis|sh|shtml|shtm|phtm)$" ;	// empty for no one
+FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension ;
+FCKConfig.LinkUploadAllowedExtensions	= ".(7z|aiff|asf|avi|bmp|csv|doc|fla|flv|gif|gz|gzip|jpeg|jpg|mid|mov|mp3|mp4|mpc|mpeg|mpg|ods|odt|pdf|png|ppt|pxd|qt|ram|rar|rm|rmi|rmvb|rtf|sdc|sitd|swf|sxc|sxw|tar|tgz|tif|tiff|txt|vsd|wav|wma|wmv|xls|xml|zip)$" ;			// empty for all
+FCKConfig.LinkUploadDeniedExtensions	= "" ;	// empty for no one
 
 FCKConfig.ImageUpload = true ;
-FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Image' ;
+FCKConfig.ImageUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Image' ;
 FCKConfig.ImageUploadAllowedExtensions	= ".(jpg|gif|jpeg|png|bmp)$" ;		// empty for all
 FCKConfig.ImageUploadDeniedExtensions	= "" ;							// empty for no one
 
 FCKConfig.FlashUpload = true ;
-FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadLanguage + '?Type=Flash' ;
-FCKConfig.FlashUploadAllowedExtensions	= ".(swf|fla)$" ;		// empty for all
+FCKConfig.FlashUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=Flash' ;
+FCKConfig.FlashUploadAllowedExtensions	= ".(swf|flv)$" ;		// empty for all
 FCKConfig.FlashUploadDeniedExtensions	= "" ;					// empty for no one
 
Index: /FCKeditor/branches/versions/2.5.x/fckeditor.cfc
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckeditor.cfc	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckeditor.cfc	(revision 1147)
@@ -45,4 +45,6 @@
 --->
 
+<cfinclude template="fckutils.cfm">
+
 <cffunction
 	name="Create"
@@ -99,48 +101,5 @@
 		return true;
 
-	// check for Internet Explorer ( >= 5.5 )
-	if( find( "msie", sAgent ) and not find( "mac", sAgent ) and not find( "opera", sAgent ) )
-	{
-		// try to extract IE version
-		stResult = reFind( "msie ([5-9]\.[0-9])", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			// get IE Version
-			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
-			return ( sBrowserVersion GTE 5.5 );
-		}
-	}
-	// check for Gecko ( >= 20030210+ )
-	else if( find( "gecko/", sAgent ) )
-	{
-		// try to extract Gecko version date
-		stResult = reFind( "gecko/(200[3-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			// get Gecko build (i18n date)
-			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
-			return ( sBrowserVersion GTE 20030210 );
-		}
-	}
-	else if( find( "opera/", sAgent ) )
-	{
-		// try to extract Opera version
-		stResult = reFind( "opera/([0-9]+\.[0-9]+)", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			return ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 9.5);
-		}
-	}
-	else if( find( "applewebkit", sAgent ) )
-	{
-		// try to extract Gecko version date
-		stResult = reFind( "applewebkit/([0-9]+)", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			return ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 522 );
-		}
-	}
-
-	return false;
+	return FCKeditor_IsCompatibleBrowser();
 	</cfscript>
 </cffunction>
Index: /FCKeditor/branches/versions/2.5.x/fckeditor.cfm
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckeditor.cfm	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckeditor.cfm	(revision 1147)
@@ -46,4 +46,5 @@
 <cfparam name="attributes.checkBrowser" type="boolean" default="true">
 <cfparam name="attributes.config" 		type="struct" default="#structNew()#">
+<cfinclude template="fckutils.cfm">
 
 <!--- ::
@@ -54,53 +55,5 @@
 if( attributes.checkBrowser )
 {
-	sAgent = lCase( cgi.HTTP_USER_AGENT );
-	isCompatibleBrowser = false;
-
-	// check for Internet Explorer ( >= 5.5 )
-	if( find( "msie", sAgent ) and not find( "mac", sAgent ) and not find( "opera", sAgent ) )
-	{
-		// try to extract IE version
-		stResult = reFind( "msie ([5-9]\.[0-9])", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			// get IE Version
-			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
-			if( sBrowserVersion GTE 5.5 )
-				isCompatibleBrowser = true;
-		}
-	}
-	// check for Gecko ( >= 20030210+ )
-	else if( find( "gecko/", sAgent ) )
-	{
-		// try to extract Gecko version date
-		stResult = reFind( "gecko/(200[3-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			// get Gecko build (i18n date)
-			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
-			if( sBrowserVersion GTE 20030210 )
-				isCompatibleBrowser = true;
-		}
-	}
-	else if( find( "opera/", sAgent ) )
-	{
-		// try to extract Opera version
-		stResult = reFind( "opera/([0-9]+\.[0-9]+)", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			if ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 9.5)
-				isCompatibleBrowser = true;
-		}
-	}
-	else if( find( "applewebkit", sAgent ) )
-	{
-		// try to extract Gecko version date
-		stResult = reFind( "applewebkit/([0-9]+)", sAgent, 1, true );
-		if( arrayLen( stResult.pos ) eq 2 )
-		{
-			if( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 522 )
-				isCompatibleBrowser = true;
-		}
-	}
+	isCompatibleBrowser = FCKeditor_IsCompatibleBrowser();
 }
 else
Index: /FCKeditor/branches/versions/2.5.x/fckeditor.php
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckeditor.php	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckeditor.php	(revision 1147)
@@ -26,4 +26,42 @@
  */
 
+function FCKeditor_IsCompatibleBrowser()
+{
+	global $HTTP_USER_AGENT ;
+
+	if ( !isset( $_SERVER ) ) {
+		global $HTTP_SERVER_VARS ;
+	    $_SERVER = $HTTP_SERVER_VARS ;
+	}
+		
+	if ( isset( $HTTP_USER_AGENT ) )
+		$sAgent = $HTTP_USER_AGENT ;
+	else
+		$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
+
+	if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
+	{
+		$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
+		return ($iVersion >= 5.5) ;
+	}
+	else if ( strpos($sAgent, 'Gecko/') !== false )
+	{
+		$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
+		return ($iVersion >= 20030210) ;
+	}
+	else if ( strpos($sAgent, 'Opera/') !== false )
+	{
+		$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ;
+		return ($fVersion >= 9.5) ;
+	}
+	else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
+	{
+		$iVersion = $matches[1] ;
+		return ( $matches[1] >= 522 ) ;
+	}
+	else
+		return false ;	
+}
+
 if ( !function_exists('version_compare') || version_compare( phpversion(), '5', '<' ) )
 	include_once( 'fckeditor_php4.php' ) ;
Index: /FCKeditor/branches/versions/2.5.x/fckeditor_php4.php
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckeditor_php4.php	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckeditor_php4.php	(revision 1147)
@@ -108,38 +108,5 @@
 	function IsCompatible()
 	{
-		global $HTTP_USER_AGENT ;
-
-		if ( !isset( $_SERVER ) ) {
-			global $HTTP_SERVER_VARS ;
-		    $_SERVER = $HTTP_SERVER_VARS ;
-		}
-		
-		if ( isset( $HTTP_USER_AGENT ) )
-			$sAgent = $HTTP_USER_AGENT ;
-		else
-			$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
-
-		if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
-		{
-			$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
-			return ($iVersion >= 5.5) ;
-		}
-		else if ( strpos($sAgent, 'Gecko/') !== false )
-		{
-			$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
-			return ($iVersion >= 20030210) ;
-		}
-		else if ( strpos($sAgent, 'Opera/') !== false )
-		{
-			$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ;
-			return ($fVersion >= 9.5) ;
-		}
-		else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
-		{
-			$iVersion = $matches[1] ;
-			return ( $matches[1] >= 522 ) ;
-		}
-		else
-			return false ;
+		return FCKeditor_IsCompatibleBrowser() ;
 	}
 
Index: /FCKeditor/branches/versions/2.5.x/fckeditor_php5.php
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckeditor_php5.php	(revision 1146)
+++ /FCKeditor/branches/versions/2.5.x/fckeditor_php5.php	(revision 1147)
@@ -103,33 +103,5 @@
 	function IsCompatible()
 	{
-		global $HTTP_USER_AGENT ;
-
-		if ( isset( $HTTP_USER_AGENT ) )
-			$sAgent = $HTTP_USER_AGENT ;
-		else
-			$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
-
-		if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
-		{
-			$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
-			return ($iVersion >= 5.5) ;
-		}
-		else if ( strpos($sAgent, 'Gecko/') !== false )
-		{
-			$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
-			return ($iVersion >= 20030210) ;
-		}
-		else if ( strpos($sAgent, 'Opera/') !== false )
-		{
-			$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ;
-			return ($fVersion >= 9.5) ;
-		}
-		else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
-		{
-			$iVersion = $matches[1] ;
-			return ( $matches[1] >= 522 ) ;
-		}
-		else
-			return false ;			
+		return FCKeditor_IsCompatibleBrowser() ;
 	}
 
Index: /FCKeditor/branches/versions/2.5.x/fckutils.cfm
===================================================================
--- /FCKeditor/branches/versions/2.5.x/fckutils.cfm	(revision 1147)
+++ /FCKeditor/branches/versions/2.5.x/fckutils.cfm	(revision 1147)
@@ -0,0 +1,78 @@
+<!---
+ * FCKeditor - The text editor for Internet - http://www.fckeditor.net
+ * Copyright (C) 2003-2007 Frederico Caldeira Knabben
+ *
+ * == BEGIN LICENSE ==
+ *
+ * Licensed under the terms of any of the following licenses at your
+ * choice:
+ *
+ *  - GNU General Public License Version 2 or later (the "GPL")
+ *    http://www.gnu.org/licenses/gpl.html
+ *
+ *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
+ *    http://www.gnu.org/licenses/lgpl.html
+ *
+ *  - Mozilla Public License Version 1.1 or later (the "MPL")
+ *    http://www.mozilla.org/MPL/MPL-1.1.html
+ *
+ * == END LICENSE ==
+ *
+ * ColdFusion integration.
+ * This function is used by FCKeditor module to check browser compatibility
+ --->
+<cfscript>
+function FCKeditor_IsCompatibleBrowser()
+{
+	sAgent = lCase( cgi.HTTP_USER_AGENT );
+	isCompatibleBrowser = false;
+
+	// check for Internet Explorer ( >= 5.5 )
+	if( find( "msie", sAgent ) and not find( "mac", sAgent ) and not find( "opera", sAgent ) )
+	{
+		// try to extract IE version
+		stResult = reFind( "msie ([5-9]\.[0-9])", sAgent, 1, true );
+		if( arrayLen( stResult.pos ) eq 2 )
+		{
+			// get IE Version
+			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
+			if( sBrowserVersion GTE 5.5 )
+				isCompatibleBrowser = true;
+		}
+	}
+	// check for Gecko ( >= 20030210+ )
+	else if( find( "gecko/", sAgent ) )
+	{
+		// try to extract Gecko version date
+		stResult = reFind( "gecko/(200[3-9][0-1][0-9][0-3][0-9])", sAgent, 1, true );
+		if( arrayLen( stResult.pos ) eq 2 )
+		{
+			// get Gecko build (i18n date)
+			sBrowserVersion = mid( sAgent, stResult.pos[2], stResult.len[2] );
+			if( sBrowserVersion GTE 20030210 )
+				isCompatibleBrowser = true;
+		}
+	}
+	else if( find( "opera/", sAgent ) )
+	{
+		// try to extract Opera version
+		stResult = reFind( "opera/([0-9]+\.[0-9]+)", sAgent, 1, true );
+		if( arrayLen( stResult.pos ) eq 2 )
+		{
+			if ( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 9.5)
+				isCompatibleBrowser = true;
+		}
+	}
+	else if( find( "applewebkit", sAgent ) )
+	{
+		// try to extract Gecko version date
+		stResult = reFind( "applewebkit/([0-9]+)", sAgent, 1, true );
+		if( arrayLen( stResult.pos ) eq 2 )
+		{
+			if( mid( sAgent, stResult.pos[2], stResult.len[2] ) gte 522 )
+				isCompatibleBrowser = true;
+		}
+	}
+	return isCompatibleBrowser;
+}
+</cfscript>
