Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js	(revision 1055)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fck.js	(revision 1056)
@@ -31,6 +31,6 @@
 	Toolbar			: null,
 	HasFocus		: false,
-	DataProcessor	: new FCKDataProcessor(),
-	Window		: window,
+	DataProcessor		: new FCKDataProcessor(),
+	Window			: window,
 
 	AttachToOnSelectionChange : function( functionPointer )
@@ -734,4 +734,86 @@
 
 		return true ;
+	},
+
+	SetDialogMode: function( yes )
+	{
+		var doc = this.Window.parent.document ;
+		var editorFrame = this.Window.frameElement ;
+		var editorParentElement = editorFrame.parentNode ;
+		if ( !this.BackgroundBlocker )
+		{
+			this.BackgroundBlocker = doc.createElement( 'iframe' ) ;
+			this.EditorBlocker = doc.createElement( 'iframe' ) ;
+			this.BackgroundBlocker.src = FCKConfig.SkinPath + 'fck_background_blocker.html' ;
+			this.EditorBlocker.src = FCKConfig.SkinPath + 'fck_editor_blocker.html' ;
+
+			this.BackgroundBlocker.frameBorder = 0 ;
+			this.EditorBlocker.frameBorder = 0 ;
+			FCKDomTools.SetElementStyles( this.BackgroundBlocker,
+				{
+					'left' : '0px',
+					'top' : '0px',
+					'position' : 'absolute',
+					'zIndex' : 0
+				} ) ;
+			FCKDomTools.SetElementStyles( this.EditorBlocker,
+				{
+					'position' : 'absolute',
+					'zIndex' : 200
+				} ) ;
+			FCKDomTools.SetOpacity( this.BackgroundBlocker, 0.5 ) ;
+			FCKDomTools.SetOpacity( this.EditorBlocker, 0.5 ) ;
+			editorParentElement.style.overflow = 'visible' ;
+			FCKDomTools.SetElementStyles( editorFrame,
+				{
+					'zIndex' : 100,
+					'width' : editorFrame.offsetWidth + 'px',
+					'height' : editorFrame.offsetHeight + 'px',
+					'position' : 'absolute'
+				} ) ;
+			FCKDomTools.SetElementStyles( editorParentElement, 
+				{
+					'width' : editorFrame.offsetWidth + 'px',
+					'height' : editorFrame.offsetHeight + 'px'
+				} ) ;
+			editorParentElement.appendChild( this.BackgroundBlocker ) ;
+			editorParentElement.appendChild( this.EditorBlocker ) ;
+		}
+
+		if ( yes )
+		{
+			var parentDivPosition = FCKTools.GetDocumentPosition( this.Window.parent, editorParentElement ) ;
+			FCKDomTools.SetElementStyles( this.EditorBlocker,
+				{
+					'width' : editorFrame.offsetWidth + 'px',
+					'height' : editorFrame.offsetHeight + 'px',
+					'left' : parentDivPosition.x + 'px',
+					'top' : parentDivPosition.y + 'px',
+					'display' : ''
+				} ) ;
+			FCKDomTools.SetElementStyles( this.BackgroundBlocker,
+				{
+					'width' : Math.max( doc.documentElement.scrollWidth, doc.documentElement.clientWidth ) + 'px',
+					'height' : Math.max( doc.documentElement.scrollHeight, doc.documentElement.clientHeight ) + 'px',
+					'left' : '0px',
+					'top' : '0px',
+					'display' : ''
+				} ) ;
+			this.EditorBlocker.focus() ;
+		}
+		else
+		{
+			// the top : -10000px statement is needed to circumvent an IE focus bug, don't delete.
+			FCKDomTools.SetElementStyles( this.EditorBlocker, 
+				{ 
+					'display' : 'none',
+					'top' : '-10000px'
+				} ) ;
+			FCKDomTools.SetElementStyles( this.BackgroundBlocker, 
+				{ 
+					'display' : 'none',
+					'top' : '-10000px'
+				} ) ;
+		}
 	}
 } ;
@@ -865,6 +947,13 @@
 		return ;
 
+	// Popup a debug window if debug mode is set to true.
 	if ( FCKConfig.Debug )
 		FCKDebug._GetWindow() ;
+
+	// Apply floating dialog blocker styles to the parent document if not already applied.
+	if ( ! window.parent.FCK_BLOCKER_STYLES_APPLIED )
+	{
+		window.parent.FCK_BLOCKER_STYLES_APPLIED = true ;
+	}
 
 	FCK.SetStatus( FCK_STATUS_ACTIVE ) ;
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js	(revision 1055)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdialog.js	(revision 1056)
@@ -66,23 +66,4 @@
 	var sUrl = FCKConfig.BasePath + 'fckdialog.html' ;
 	this.Show( oDialogInfo, dialogName, sUrl, width, height, parentWindow, resizable ) ;
-}
-
-FCKDialog._LoadPNG = function( element, url )
-{
-	if ( FCKBrowserInfo.IsIE )
-		element.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + url + '",sizingMethod="scale")' ;
-	else
-	{
-		element.style.backgroundImage = 'url(' + url + ')' ;
-		element.style.backgroundRepeat = 'repeat' ;
-	}
-}
-
-FCKDialog._SetOpacity = function( element, opacity )
-{
-	if ( FCKBrowserInfo.IsIE )
-		element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + parseInt( opacity * 100 ) + ')' ;
-	else
-		element.style.opacity = opacity ;
 }
 
@@ -143,4 +124,5 @@
 	oWindow.focus() ;
 	this.Window = oWindow ;
+	FCK.SetDialogMode( true ) ;
 }
 
@@ -218,5 +200,5 @@
 		else
 			d.style.height = ( container.offsetHeight - 40 ) + 'px' ;
-		this._LoadPNG( d, FCKConfig.SkinPath + 'images/' + partUrl[i] ) ;
+		FCKDomTools.LoadPNG( d, FCKConfig.SkinPath + 'images/' + partUrl[i] ) ;
 		var x = [ 0, 20, container.offsetWidth - 20 ] ;
 		var y = [ 0, 20, container.offsetHeight - 20 ] ;
@@ -230,5 +212,5 @@
 	}
 
-	this._SetOpacity( shadowBlock, 0.65 ) ;
+	FCKDomTools.SetOpacity( shadowBlock, 0.65 ) ;
 	container.appendChild( shadowBlock ) ;
 }
@@ -241,3 +223,4 @@
 	container.parentNode.removeChild( container ) ;
 	this.BaseZIndex -= 100 ;
-}
+	FCK.SetDialogMode( false ) ;
+}
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdomtools.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdomtools.js	(revision 1055)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fckdomtools.js	(revision 1056)
@@ -895,4 +895,23 @@
 		for ( var styleName in styleDict )
 			style[ styleName ] = styleDict[ styleName ] ;
+	},
+
+	LoadPNG : function( element, url )
+	{
+		if ( FCKBrowserInfo.IsIE )
+			element.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + url + '",sizingMethod="scale")' ;
+		else
+		{
+			element.style.backgroundImage = 'url(' + url + ')' ;
+			element.style.backgroundRepeat = 'repeat' ;
+		}
+	},
+
+	SetOpacity : function( element, opacity )
+	{
+		if ( FCKBrowserInfo.IsIE )
+			element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + parseInt( opacity * 100 ) + ')' ;
+		else
+			element.style.opacity = opacity ;
 	}
 } ;
Index: /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1055)
+++ /FCKeditor/branches/features/floating_dialog/editor/_source/internals/fcktools.js	(revision 1056)
@@ -424,5 +424,5 @@
 	var y = 0 ;
 	var curNode = node ;
-	while ( curNode && curNode != w.document.body )
+	while ( curNode && curNode != w.document.documentElement )
 	{
 		x += curNode.offsetLeft - curNode.scrollLeft ;
Index: /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_background_blocker.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_background_blocker.html	(revision 1056)
+++ /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_background_blocker.html	(revision 1056)
@@ -0,0 +1,7 @@
+<html>
+	<head>
+		<title></title>
+	</head>
+	<body style="background-color: black;">
+	</body>
+</html>
Index: /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_editor_blocker.html
===================================================================
--- /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_editor_blocker.html	(revision 1056)
+++ /FCKeditor/branches/features/floating_dialog/editor/skins/default/fck_editor_blocker.html	(revision 1056)
@@ -0,0 +1,7 @@
+<html>
+	<head>
+		<title></title>
+	</head>
+	<body style="background-color: white;">
+	</body>
+</html>
