Index: sandbox/webservice/restclient/index.html
===================================================================
--- sandbox/webservice/restclient/index.html	(revision 6315)
+++ sandbox/webservice/restclient/index.html	(revision 6316)
@@ -128,22 +128,22 @@
 				$('#bt_servers').attr("disabled", true);
 				$('#bt_login').attr("disabled", true);
-				$('#bt_logout').attr("disabled", false);
-				$('#bt_listFolders').attr("disabled", false);
-				$('#bt_contacts').attr("disabled", false);
-				$('#bt_catalog').attr("disabled", false);
-				$('#sel_contacts').attr("disabled", false);
-				$('#sel_catalog').attr("disabled", false);
-				$('#search_contacts').attr("disabled", false);
-				$('#search_catalog').attr("disabled", false);
-				$('#search_folders').attr("disabled", false);
+				$('#bt_logout').prop('disabled',false);
+				$('#bt_listFolders').prop('disabled',false);
+				$('#bt_contacts').prop('disabled',false);
+				$('#bt_catalog').prop('disabled',false);
+				$('#sel_contacts').prop('disabled',false);
+				$('#sel_catalog').prop('disabled',false);
+				$('#search_contacts').prop('disabled',false);
+				$('#search_catalog').prop('disabled',false);
+				$('#search_folders').prop('disabled',false);
 
 			}
 			else if(_action == 'Logout' || (a_response.error && a_response.error.code == 7 )) {
-				$('#user').attr("disabled", false);
-				$('#password').attr("disabled", false);
-				$('#server').attr("disabled", false);
-
-				$('#bt_servers').attr("disabled", false);
-				$('#bt_login').attr("disabled", false);
+				$('#user').prop('disabled',false);
+				$('#password').prop('disabled',false);
+				$('#server').prop('disabled',false);
+
+				$('#bt_servers').prop('disabled',false);
+				$('#bt_login').prop('disabled',false);
 				$('#bt_logout').attr("disabled", true);
 				$('#bt_contacts').attr("disabled", true);
@@ -186,16 +186,16 @@
 												a_response.result.folders[j].folderName+"</option>");
 				}
-				$('#folder_id').attr("disabled", false);
-				$('#new_folder_name').attr("disabled", false);
-				$('#bt_del_folder').attr("disabled", false);
-				$('#bt_add_folder').attr("disabled", false);
-				$('#bt_rename_folder').attr("disabled", false);
+				$('#folder_id').prop('disabled',false);
+				$('#new_folder_name').prop('disabled',false);
+				$('#bt_del_folder').prop('disabled',false);
+				$('#bt_add_folder').prop('disabled',false);
+				$('#bt_rename_folder').prop('disabled',false);
 			}
 			if(a_response.result.messages) {
-				$('#message_id').attr("disabled", false);
+				$('#message_id').prop('disabled',false);
 				if(a_response.result.messages.length == 1) {
 					$("#attachment_id").find('option').remove().end().append("<option value='-1'>Selecionar Anexo</option>");
 					if(a_response.result.messages[0].msgHasAttachments > 0) {
-						$('#attachment_id').attr("disabled", false);
+						$('#attachment_id').prop('disabled',false);
 						var attachments = a_response.result.messages[0].msgAttachments;
 						for (var j in attachments){
@@ -244,5 +244,5 @@
 				}
 				if(select_id){
-					$(select_id).attr("disabled", false);
+					$(select_id).prop('disabled',false);
 				}
 			}
@@ -254,6 +254,6 @@
 												a_response.result.servers[j].serverName+"</option>");
 				}
-				$('#bt_version').attr("disabled", false);
-				$('#bt_clear').attr("disabled", false);
+				$('#bt_version').prop('disabled',false);
+				$('#bt_clear').prop('disabled',false);
 			}
 
@@ -428,11 +428,43 @@
 	}
 
-	$('#user').attr("disabled", isLoggedIn ? true : false);
-	$('#password').attr("disabled", isLoggedIn ? true : false);
-	$('#server').attr("disabled", isLoggedIn ? true : false);
-	$('#bt_servers').attr("disabled", isLoggedIn ? true : false);
-	$('#bt_login').attr("disabled", isLoggedIn ? true : false);
-	$('#bt_logout').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_listFolders').attr("disabled", isLoggedIn ? false : true);
+	if(isLoggedIn){
+		$('#user').attr("disabled", true);
+		$('#password').attr("disabled", true);
+		$('#server').attr("disabled", true);
+		$('#bt_servers').attr("disabled",true);
+		$('#bt_login').attr("disabled", true);
+		$('#user').attr("disabled", true);
+		$('#password').attr("disabled", true);
+		$('#server').attr("disabled", true);
+		$('#bt_servers').attr("disabled", true);
+		$('#bt_login').attr("disabled", true);
+	}
+	else{
+		$('#search_contacts').attr("disabled", true);
+		$('#search_catalog').attr("disabled", true);
+		$('#search_folders').attr("disabled", true);
+		$('#new_folder_name').attr("disabled", true);
+		$('#bt_contacts').attr("disabled", true);
+		$('#bt_catalog').attr("disabled", true);
+		$('#bt_del_folder').attr("disabled", true);
+		$('#bt_add_folder').attr("disabled", true);
+		$('#bt_rename_folder').attr("disabled", true);
+		$('#bt_logout').attr("disabled", true);
+		$('#bt_listFolders').attr("disabled", true);
+		$('#bt_logout').attr("disabled", true);
+		$('#bt_listFolders').attr("disabled", true);
+		$('#search_contacts').attr("disabled", true);
+		$('#search_catalog').attr("disabled", true);
+		$('#search_folders').attr("disabled", true);
+		$('#new_folder_name').attr("disabled", true);
+		$('#bt_contacts').attr("disabled", true);
+		$('#bt_catalog').attr("disabled", true);
+		$('#bt_del_folder').attr("disabled", true);
+		$('#bt_add_folder').attr("disabled", true);
+		$('#bt_rename_folder').attr("disabled", true);
+		$('#bt_version').attr("disabled", true);
+		$('#bt_clear').attr("disabled", true);
+	}
+
 	$('#folder_id').attr("disabled", true);
 	$('#message_id').attr("disabled", true);
@@ -441,15 +473,4 @@
 	$('#sel_contacts').attr("disabled", true);
 	$('#sel_catalog').attr("disabled", true);
-	$('#search_contacts').attr("disabled", isLoggedIn ? false : true);
-	$('#search_catalog').attr("disabled", isLoggedIn ? false : true);
-	$('#search_folders').attr("disabled", isLoggedIn ? false : true);
-	$('#new_folder_name').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_contacts').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_catalog').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_del_folder').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_add_folder').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_rename_folder').attr("disabled", isLoggedIn ? false : true);
-	$('#bt_version').attr("disabled", false);
-	$('#bt_clear').attr("disabled", false);
 	</script>
 </html>
