Index: CKEditor/trunk/_source/plugins/wsc/dialogs/tmpFrameset.html
===================================================================
--- CKEditor/trunk/_source/plugins/wsc/dialogs/tmpFrameset.html	(revision 3507)
+++ CKEditor/trunk/_source/plugins/wsc/dialogs/tmpFrameset.html	(revision 3508)
@@ -25,6 +25,5 @@
 function tryLoad ()
 {
-    if ( !window.opener )
-        window.opener = window.parent ;
+	opener = window.parent;
 
     // get access to global parameters
Index: CKEditor/trunk/_source/plugins/wsc/dialogs/wsc.js
===================================================================
--- CKEditor/trunk/_source/plugins/wsc/dialogs/wsc.js	(revision 3507)
+++ CKEditor/trunk/_source/plugins/wsc/dialogs/wsc.js	(revision 3508)
@@ -48,5 +48,11 @@
 		{
 			if ( typeof( window.doSpell ) == 'function' )
+			{
+				//Call from window.setInteval expected at once.
+				if ( typeof( interval ) != 'undefined' )
+					window.clearInterval( interval );
+
 				initAndSpell( dialog );
+			}
 			else if ( i++ == 180 )								// Timeout: 180 * 250ms = 45s.
 				_cancelOnError( errorMsg );
@@ -54,5 +60,5 @@
 	}
 
-	function _cancelOnError( m )
+	window._cancelOnError = function( m )
 	{
 		if ( typeof( window.WSC_Error ) == 'undefined' )
@@ -63,26 +69,17 @@
 			errorBox.setHtml( m || editor.lang.spellCheck.notAvailable );
 		}
-	}
+	};
 
 	function initAndSpell( dialog )
 	{
-		//Call from window.setInteval expected at once.
-		if ( typeof( interval ) == 'undefined' )
-			return;
-		window.clearInterval( interval );
-
-		var sData = editor.getData(),											// Get the data to be checked.
-			LangComparer = new window._SP_FCK_LangCompare(),							// Language abbr standarts comparer.
+		var LangComparer = new window._SP_FCK_LangCompare(),							// Language abbr standarts comparer.
 			pluginPath = CKEDITOR.getUrl( editor.plugins.wsc.path + 'dialogs/' ),			// Service paths corecting/preparing.
 			framesetPath = pluginPath + 'tmpFrameset.html';
 
+		// global var is used in FCK specific core
+		// change on equal var used in fckplugin.js
+		gFCKPluginName = 'wsc';
+
 		LangComparer.setDefaulLangCode( editor.config.defaultLanguage );
-
-		// Prepare content.
-		CKEDITOR.document.getById( textareaId ).setValue( sData );
-
-		// Hide user message console (if application was loaded more then after timeout).
-		CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' );
-		CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' );
 
 		window.doSpell({
@@ -98,4 +95,5 @@
 			onFinish : function( dT )
 			{
+				editor.focus();
 				dialog.getParentEditor().setData( dT.value );
 				dialog.hide();
@@ -110,4 +108,8 @@
 			schemaURI : pluginPath + 'wsc.css'
 		});
+
+		// Hide user message console (if application was loaded more then after timeout).
+		CKEDITOR.document.getById( errorBoxId ).setStyle( 'display', 'none' );
+		CKEDITOR.document.getById( iframeId ).setStyle( 'display', 'block' );
 	}
 
@@ -136,5 +138,16 @@
 				);
 			}
+
+			var sData = editor.getData();											// Get the data to be checked.
+			CKEDITOR.document.getById( textareaId ).setValue( sData );
+
 			interval = window.setInterval( burnSpelling( this, errorMsg ), 250 );
+		},
+		onHide : function()
+		{
+			window.ooo = undefined;
+			window.int_framsetLoaded = undefined;
+			window.framesetLoaded = undefined;
+			window.is_window_opened = false;
 		},
 		contents : [
Index: CKEditor/trunk/_source/plugins/wsc/plugin.js
===================================================================
--- CKEditor/trunk/_source/plugins/wsc/plugin.js	(revision 3507)
+++ CKEditor/trunk/_source/plugins/wsc/plugin.js	(revision 3508)
@@ -17,6 +17,6 @@
 		var command = editor.addCommand( commandName, new CKEDITOR.dialogCommand( commandName ) );
 
-		// SpellChecker doesn't work in Opera.
-		command.modes = { wysiwyg : !( CKEDITOR.env.opera ) };
+		// SpellChecker doesn't work in Opera and with custom domain
+		command.modes = { wysiwyg : ( !CKEDITOR.env.opera && document.domain == window.location.hostname ) };
 
 		editor.ui.addButton( 'SpellChecker',
