Index: /FCKeditor/trunk/editor/fckdialog.html
===================================================================
--- /FCKeditor/trunk/editor/fckdialog.html	(revision 1610)
+++ /FCKeditor/trunk/editor/fckdialog.html	(revision 1611)
@@ -28,4 +28,32 @@
 		<meta name="robots" content="noindex, nofollow" />
 		<script type="text/javascript">
+// Domain relaxation logic.
+(function()
+{
+	var d = document.domain ;
+
+	while ( true )
+	{
+		// Test if we can access a parent property.
+		try
+		{
+			var parentDomain = ( Args().TopWindow || E ).document.domain ;
+
+			if ( document.domain != parentDomain )
+				document.domain = parentDomain ;
+
+			break ;
+		}
+		catch( e ) {}
+
+		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
+		d = d.replace( /.*?(?:\.|$)/, '' ) ;
+
+		if ( d.length == 0 )
+			break ;		// It was not able to detect the domain.
+
+		document.domain = d ;
+	}
+})() ;
 
 var E = frameElement._DialogArguments.Editor ;
@@ -42,33 +70,4 @@
 	return dialog ? dialog._ParentDialog : frameElement._ParentDialog ;
 }
-
-// Domain relaxation logic.
-(function()
-{
-	var d = document.domain ;
-
-	while ( true )
-	{
-		// Test if we can access a parent property.
-		try
-		{
-			var parentDomain = ( Args().TopWindow || E ).document.domain ;
-
-			if ( document.domain != parentDomain )
-				document.domain = parentDomain ;
-
-			break ;
-		}
-		catch( e ) {}
-
-		// Remove a domain part: www.mytest.example.com => mytest.example.com => example.com ...
-		d = d.replace( /.*?(?:\.|$)/, '' ) ;
-
-		if ( d.length == 0 )
-			break ;		// It was not able to detect the domain.
-
-		document.domain = d ;
-	}
-})() ;
 
 var FCK				= E.FCK ;
