Index: CKEditor/releases/latest/_source/plugins/scayt/dialogs/options.js
===================================================================
--- CKEditor/releases/latest/_source/plugins/scayt/dialogs/options.js	(revision 5543)
+++ CKEditor/releases/latest/_source/plugins/scayt/dialogs/options.js	(revision 6047)
@@ -12,5 +12,5 @@
 		i,
 		contents = [],
-		userDicActive = false,
+		userDicActive = 0,
 		dic_buttons = [
 			// [0] contains buttons for creating
@@ -19,35 +19,40 @@
 			"dic_rename,dic_delete"
 		],
-		optionsIds= [ 'mixedCase','mixedWithDigits','allCaps','ignoreDomainNames' ];
+		optionsIds = [ 'mixedCase', 'mixedWithDigits', 'allCaps', 'ignoreDomainNames' ];
 
 	// common operations
 
-	function getBOMAllOptions () {
+	function getBOMAllOptions()
+	{
 		 return document.forms.optionsbar["options"];
 	}
-	function getBOMAllLangs () {
+	function getBOMAllLangs()
+	{
 		 return document.forms.languagesbar["scayt_lang"];
 	}
 
-	function setCheckedValue(radioObj, newValue) {
-		if (!radioObj)
+	function setCheckedValue( radioObj, newValue )
+	{
+		if ( !radioObj )
 			return;
 		var radioLength = radioObj.length;
-		if (radioLength == undefined) {
-			radioObj.checked = (radioObj.value == newValue.toString());
+		if ( radioLength == undefined )
+		{
+			radioObj.checked = radioObj.value == newValue.toString();
 			return;
 		}
-		for (var i = 0; i < radioLength; i++) {
+		for ( var i = 0; i < radioLength; i++ )
+		{
 			radioObj[i].checked = false;
-			if (radioObj[i].value == newValue.toString()) {
+			if ( radioObj[i].value == newValue.toString() )
 				radioObj[i].checked = true;
-			}
-		}
-	}
-
+		}
+	}
+
+	var lang = editor.lang.scayt;
 	var tags_contents =  [
 				{
 					id : 'options',
-					label : editor.lang.scayt.optionsTab,
+					label : lang.optionsTab,
 					elements : [
 						{
@@ -78,5 +83,5 @@
 				{
 					id : 'langs',
-					label : editor.lang.scayt.languagesTab,
+					label : lang.languagesTab,
 					elements : [
 						{
@@ -93,5 +98,5 @@
 				{
 					id : 'dictionaries',
-					label : editor.lang.scayt.dictionariesTab,
+					label : lang.dictionariesTab,
 					elements : [
 						{
@@ -124,5 +129,5 @@
 				{
 					id : 'about',
-					label : editor.lang.scayt.aboutTab,
+					label : lang.aboutTab,
 					elements : [
 						{
@@ -137,5 +142,5 @@
 
 	var dialogDefiniton = {
-		title : editor.lang.scayt.title,
+		title : lang.title,
 		minWidth : 360,
 		minHeight : 220,
@@ -184,8 +189,8 @@
 		{
 			var o = getBOMAllOptions();
-			for (i in o)
+			for ( var i in o )
 				o[i].checked = false;
 
-			setCheckedValue(getBOMAllLangs(),"");
+			setCheckedValue( getBOMAllLangs(), "" );
 		},
 		contents : contents
@@ -196,5 +201,5 @@
 	tags = CKEDITOR.plugins.scayt.uiTabs;
 
-	for ( i in tags )
+	for ( var i in tags )
 	{
 		if ( tags[ i ] == 1 )
@@ -202,5 +207,5 @@
 	}
 	if ( tags[2] == 1 )
-		userDicActive = true;
+		userDicActive = 1;
 
 
@@ -209,5 +214,5 @@
 		var dialog = this,
 			lang_list = dialog.data.scayt.getLangList(),
-			buttons = [ 'dic_create','dic_delete','dic_rename','dic_restore' ],
+			buttons = [ 'dic_create', 'dic_delete', 'dic_rename', 'dic_restore' ],
 			labels = optionsIds,
 			i;
@@ -283,7 +288,7 @@
 
 		var langList = [];
-		if (tags[1] ==1 )
-		{
-			for ( i in lang_list.rtl )
+		if ( tags[1] ==1 )
+		{
+			for ( var i in lang_list.rtl )
 				langList[ langList.length ] = createOption( i, lang_list.ltr );
 
@@ -315,6 +320,6 @@
 			var suc_massage = captions["succ_dic_create"];
 
-			window.scayt.createUserDictionary(dic_name,
-				function(arg)
+			window.scayt.createUserDictionary( dic_name,
+				function( arg )
 				{
 					hide_dic_buttons ( all_buttons );
@@ -323,5 +328,5 @@
 					dic_success_message (suc_massage);
 				},
-				function(arg)
+				function( arg )
 				{
 					err_massage = err_massage.replace("%s" ,arg.dname );
@@ -337,6 +342,6 @@
 			var err_massage = captions["err_dic_rename"] || "";
 			var suc_massage = captions["succ_dic_rename"] || "";
-			window.scayt.renameUserDictionary(dic_name,
-				function(arg)
+			window.scayt.renameUserDictionary( dic_name,
+				function( arg )
 					{
 						suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -344,5 +349,5 @@
 						dic_success_message ( suc_massage );
 					},
-				function(arg)
+				function( arg )
 					{
 						err_massage = err_massage.replace("%s" , arg.dname  );
@@ -352,5 +357,5 @@
 		};
 
-		dic.dic_delete = function ( el, dic_name , dic_buttons )
+		dic.dic_delete = function( el, dic_name , dic_buttons )
 		{
 			var all_buttons = dic_buttons[0] + ',' + dic_buttons[1];
@@ -360,5 +365,5 @@
 			// try to delete dictionary
 			window.scayt.deleteUserDictionary(
-				function(arg)
+				function( arg )
 				{
 					suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -368,5 +373,5 @@
 					dic_success_message( suc_massage );
 				},
-				function(arg)
+				function( arg )
 				{
 					err_massage = err_massage.replace("%s" , arg.dname );
@@ -375,5 +380,5 @@
 		};
 
-		dic.dic_restore = dialog.dic_restore || function ( el, dic_name , dic_buttons )
+		dic.dic_restore = dialog.dic_restore || function( el, dic_name , dic_buttons )
 			{
 				// try to restore existing dictionary
@@ -383,5 +388,5 @@
 
 				window.scayt.restoreUserDictionary(dic_name,
-					function(arg)
+					function( arg )
 					{
 						suc_massage = suc_massage.replace("%s" , arg.dname );
@@ -390,5 +395,5 @@
 						dic_success_message( suc_massage );
 					},
-					function(arg)
+					function( arg )
 					{
 						err_massage = err_massage.replace("%s" , arg.dname );
@@ -409,5 +414,7 @@
 				var id = el.getId();
 				dic[ id ].apply( null, [ el, dic_name, dic_buttons ] );
-			}catch(err){
+			}
+			catch(err)
+			{
 				dic_error_message(" Dictionary error. ");
 			}
@@ -432,5 +439,5 @@
 		var dialog = this;
 		// for enabled options tab
-		if (tags[0] == 1){
+		if ( tags[0] == 1 ){
 			var opto = getBOMAllOptions();
 
@@ -467,6 +474,6 @@
 		if ( tags[1] == 1 )
 		{
-			var domLang = doc.getById("cke_option"+dialog.sLang);
-			setCheckedValue(domLang.$,dialog.sLang);
+			var domLang = doc.getById("cke_option" + dialog.sLang);
+			setCheckedValue( domLang.$,dialog.sLang );
 		}
 
@@ -488,5 +495,5 @@
 
 				},
-				function ()
+				function()
 				{
 					doc.getById( 'dic_name' ).setValue("");
@@ -497,33 +504,27 @@
 	};
 
-	function dic_error_message ( m )
+	function dic_error_message( m )
 	{
 		doc.getById('dic_message').setHtml('<span style="color:red;">' + m + '</span>' );
 	}
-	function dic_success_message ( m )
+	function dic_success_message( m )
 	{
 		doc.getById('dic_message').setHtml('<span style="color:blue;">' + m + '</span>') ;
 	}
-	function display_dic_buttons ( sIds )
-	{
-
+	function display_dic_buttons( sIds )
+	{
 		sIds = String( sIds );
 		var aIds = sIds.split(',');
 		for ( var i=0, l = aIds.length; i < l ; i+=1)
-		{
 			doc.getById( aIds[i] ).$.style.display = "inline";
-		}
-
-	}
-	function hide_dic_buttons ( sIds )
+	}
+	function hide_dic_buttons( sIds )
 	{
 		sIds = String( sIds );
 		var aIds = sIds.split(',');
 		for ( var i = 0, l = aIds.length; i < l ; i += 1 )
-		{
 			doc.getById( aIds[i] ).$.style.display = "none";
-		}
-	}
-	function set_dic_name ( dic_name )
+	}
+	function set_dic_name( dic_name )
 	{
 		doc.getById('dic_name').$.value= dic_name;
