diff --git a/~dev_rating/media/js/profile.js b/~dev_rating/media/js/profile.js
index c3c73783c3d28d9180f687e64398106b680e8df6..1b9bdbda82439c7ac3f48458f900f666a4dd49c3 100644
--- a/~dev_rating/media/js/profile.js
+++ b/~dev_rating/media/js/profile.js
@@ -33,17 +33,12 @@ $(function()
     });
 
 
-    function closeSession(time) {
-        if (time < 0)
-            time = 0;
-
-        setTimeout(function() { 
-            $.ajax({
-                type: "POST",
-                url: URLdir + "handler/Session/closeSession",
-                success: function(data) {window.location.replace(URLdir);}
-            });
-        }, time*1000);
+    function closeSession() {
+        $.ajax({
+            type: "POST",
+            url: URLdir + "handler/Session/closeSession",
+            success: function(data) {window.location.replace(URLdir);}
+        });
     }
 
 
diff --git a/~dev_rating/media/js/settings.js b/~dev_rating/media/js/settings.js
index ce8831ea516c750d329b392cb7089f90a0f5515e..fb1db492da108eff9265c776b597917ecf666dfb 100644
--- a/~dev_rating/media/js/settings.js
+++ b/~dev_rating/media/js/settings.js
@@ -5,6 +5,10 @@ $(function() {
 	var jChangeLogin = $(".changeLogin").first(); 
 	var jChangePass = $(".changePass").first();
 
+	var jInputPwdCurrent = $('.inputCurrentPass').first();
+	var jInputPwdNew = $('.inputNewPass').first();
+	var jInputPwdConfirm = $('.inputРЎonfirmPass').first();
+
 	$('.showBlockReport').click(function(){
 		if ($('.blockReport').css('display') == 'none')
 			$('.blockReport').slideDown("fast");
@@ -68,36 +72,43 @@ $(function() {
 		*/
 	});
 	
-	jChangePass.click(function(){
+	jChangePass.click(function() {
 		jChangePass.attr("disabled", true);
-		if ($.trim($('.inputCurrentPass').val()) != '')
-			checkInput['currentPass'] = true;
-		else checkInput['currentPass'] = false;
-	
-		if ($.trim($('.inputNewPass').val()) != '')
-			checkInput['newPass'] = true;
-		else checkInput['newPass'] = false;
-		
-		if (checkInput['currentPass'] == true && checkInput['newPass'] == true && $('.inputРЎonfirmPass').val() == $('.inputNewPass').val())
-			checkInput['confirmPass'] = true;
-		else
-			checkInput['confirmPass'] = false;
-			
-		if (checkInput['confirmPass'] == true)
-			$.post(URLdir + 'handler/settings/changePassword',
-				{
-					'old_password': $.sha1($('.inputCurrentPass').val()),
-					'password': $.sha1($('.inputNewPass').val()),
-					'confirm_password': $.sha1($('.inputРЎonfirmPass').val())
-				},
-				function(data){
-					data = $.parseJSON(data);
-					jChangeLogin.removeAttr("disabled");
-					if(data.success === true) {
-						EventInspector_ShowMsg('Пароль изменен', 'success');
-						jChangePass.html("Пароль изменен!").unbind("click");
-					} else EventInspector_ShowMsg('Не удалось изменить пароль', 'error');
-				}
-			);
+
+		var pwdCurrent = $.trim(jInputPwdCurrent.val());
+		var pwdConfirm = $.trim(jInputPwdConfirm.val());
+		var pwdNew = $.trim(jInputPwdNew.val());
+
+		if (pwdCurrent === '' || pwdNew === '' || pwdNew !== pwdConfirm) {
+			EventInspector_ShowMsg('Не удалось изменить пароль', 'error');
+			jChangePass.removeAttr("disabled");
+			return;
+		}
+
+
+		$.post(URLdir + 'handler/settings/changePassword',
+			{
+				'old_password': $.sha1(pwdCurrent),
+				'password': $.sha1(pwdNew),
+				'confirm_password': $.sha1(pwdConfirm)
+			},
+			function(data) {
+				data = $.parseJSON(data);
+				
+				if(data.success === true) {
+					EventInspector_ShowMsg('Пароль изменен', 'success');
+					jChangePass.html("Пароль изменен!").unbind("click");
+					jInputPwdCurrent.attr("disabled", true);
+					jInputPwdConfirm.attr("disabled", true);
+					jInputPwdNew.attr("disabled", true);
+
+				} else 
+					EventInspector_ShowMsg('Не удалось изменить пароль', 'error');
+
+				jChangePass.removeAttr("disabled");
+			}
+		);
 	});
+
+
 });