Index: trunk/phpgwapi/inc/class.auth_ldap.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.auth_ldap.inc.php	(revision 32)
+++ trunk/phpgwapi/inc/class.auth_ldap.inc.php	(revision 44)
@@ -151,5 +151,30 @@
 			
 			$dn = $allValues[0]['dn'];
-			if (!@ldap_modify($ds, $dn, $entry)) 
+			
+			/* userPasswordRFC2617 Begin's*/
+			$c = CreateObject('phpgwapi.config','expressoAdmin1_2');
+			$c->read_repository();
+			$current_config = $c->config_data;
+			if ($current_config['expressoAdmin_userPasswordRFC2617'] == 'true')
+			{
+				$realm		= $current_config['expressoAdmin_realm_userPasswordRFC2617'];
+				$uid		= $allValues[0]['uid'][0];
+				$password	= $new_passwd;
+				$passUserRFC2617 = $realm . ':      ' . md5("$uid:$realm:$password");
+
+				if ($allValues[0]['userpasswordrfc2617'][0] != '')
+					$entry['userPasswordRFC2617'] = $passUserRFC2617;
+				else
+				{
+					$ldap_add['userPasswordRFC2617'] = $passUserRFC2617;
+					if (!@ldap_mod_add($ds, $dn, $ldap_add)) 
+					{
+						return false;
+					}
+				}
+			}
+			/* userPasswordRFC2617 End's*/
+			
+			if (!@ldap_modify($ds, $dn, $entry))
 			{
 				return false;
Index: trunk/phpgwapi/inc/class.sector_search_ldap.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 35)
+++ trunk/phpgwapi/inc/class.sector_search_ldap.inc.php	(revision 44)
@@ -218,5 +218,5 @@
 					$select = '';
 				$display = strtoupper($info[$i]['ou'][0]);
-				$options .= "<option value='$dn'$select>$display </option>";
+				$options .= "<option value='$dn'$select>$display</option>";
     	    }
 		
Index: trunk/help/content.html
===================================================================
--- trunk/help/content.html	(revision 32)
+++ trunk/help/content.html	(revision 44)
@@ -36,5 +36,6 @@
 <p class='item'><img src='templates/celepar/images/002_logoexpmail.jpg'><sup><b>&nbsp;ExpressoMail</b></sup></p>
 <div class='texto'>
-O ExpressoMail é o módulo de correio do Expresso. Através dele você pode acessar, gerenciar e manipular suas mensagens. Ao entrar no módulo, é exibida a sua Caixa de Entrada, com menus principal e de pastas à sua esquerda. As principais funcionalidades do módulo serão descritas a seguir:
+<img align="bottom" src="../expressoMail1_2/templates/default/images/menu/acroread.png"/><a style="font-size:12" title="Clique aqui!" href="../expressoMail1_2/help/CartelaExpressoMail.pdf" target="_blank">Manual completo do ExpressoMail</a><p>
+<p>O ExpressoMail é o módulo de correio do Expresso. Através dele você pode acessar, gerenciar e manipular suas mensagens. Ao entrar no módulo, é exibida a sua Caixa de Entrada, com menus principal e de pastas à sua esquerda. As principais funcionalidades do módulo serão descritas a seguir:
 <ul style='text-indent:0'>
 <li>Ao abrir uma mensagem ou redigir uma nova mensagem, será aberta uma aba ao lado da Caixa de Entrada. Isto permite que várias mensagens sejam abertas ao mesmo tempo, simultaneamente à escrita de uma nova mensagem, por exemplo.</li>
@@ -79,7 +80,6 @@
 </td><td width=50%>
 <img src='templates/celepar/images/012_menuprincipal.jpg'></td></tr>
-</table><br><br></li>
-
-
+</table></li>
+</div>
 <!--<table width =100% border=0 class='texto' style='text-indent:0'>
 <tr><td width=50%>
Index: trunk/instant_messenger/js/im_functions.js
===================================================================
--- trunk/instant_messenger/js/im_functions.js	(revision 36)
+++ trunk/instant_messenger/js/im_functions.js	(revision 44)
@@ -10,4 +10,5 @@
       	   this.array_prefe['ch_offline'] = true;	
       this.load_photo	  = false;
+      this.IM_Manutencao  = false;
    }
 
@@ -18,20 +19,27 @@
    IM.prototype.load_im = function()
    {
+	  	
 	  var force = ( arguments.length ) ? true : false;
       var _this = this;
       Sincro.count = 0;
-
-      var handler_contacts = function(data)
-      {
-          if( (data.length) >= (_this.array_users.length) || (data.length - 1) > 0){
-	          _this.array_users.splice(0,_this.array_users.length);
-    	      _this.array_users = data;
-        	  _this.mount_list(data);
-	          _this.conf_VcardUser(data[0]);
+	
+	  if( _this.IM_Manutencao )
+	  {
+	  	_this.Manutencao();	
+	  
+	  }else{
+	      var handler_contacts = function(data)
+	      {
+	          if( (data.length) >= (_this.array_users.length) || (data.length - 1) > 0){
+		          _this.array_users.splice(0,_this.array_users.length);
+	    	      _this.array_users = data;
+	        	  _this.mount_list(data);
+		          _this.conf_VcardUser(data[0]);
+		      }
 	      }
-      }
-	
-	  if ( force || this.getWinContactsState() )
-         cIM.cExecute("$this.Ujabber.list_user",handler_contacts);
+		
+		  if ( force || this.getWinContactsState() )
+	         cIM.cExecute("$this.Ujabber.list_user",handler_contacts);
+	  }
    }
 	
@@ -317,52 +325,59 @@
 	{
 		var _this = this;
-		var handler_message = function(data)
+		
+		if( _this.IM_Manutencao )
 		{
-			if( data.length > 0)
+			_this.Manutencao();
+			
+		}else{
+			var handler_message = function(data)
 			{
-				var TimeStamp		= "";
-				var jid 		    = "";
-				var nickname		= "";
-				var body_message 	= "";
-				var window_message  = "";
-
-				for( var i=0; i < data.length; i++)
-				{			
-					jid   	     = data[i].from;
-					body_message = data[i].body;
-					TimeStamp 	 = (_this.array_prefe['ch_time']) ? "[" + data[i].timestamp + "] " : " ";
+				if( data.length > 0)
+				{
+					var TimeStamp		= "";
+					var jid 		    = "";
+					var nickname		= "";
+					var body_message 	= "";
+					var window_message  = "";
+	
+					for( var i=0; i < data.length; i++)
+					{			
+						jid   	     = data[i].from;
+						body_message = data[i].body;
+						TimeStamp 	 = (_this.array_prefe['ch_time']) ? "[" + data[i].timestamp + "] " : " ";
+						
+						jid = jid.substr(0,jid.indexOf('/'));
+						body_message = decodeURI(body_message.replace(/\\\'/g, '\''));
+	
+						window_message  = document.getElementById(jid + "_chatMessages");
+						nickname = jid;
+	
+						for( var j=1; j < IM.array_users.length; j++ )
+						{
+							if( jid == IM.array_users[j].jid ){
+								nickname = decodeURI(IM.array_users[j].VCARD_NICKNAME);
+							}
+						}
+	
+		                if ( window_message )
+		                {
+		                   window_message.innerHTML += '<strong>' + TimeStamp + nickname + '</strong>&nbsp;' + IM.get_lang('speak') + ':<br/> ' + _this.emotions_icons(body_message) + '<br/><br/>';
+	                       if ( windowItems[jid].state != WINDOW_STATE_REGULAR && windowItems[jid].state != WINDOW_STATE_MAXIMIZED )
+	                          im_win.showWindowItem(jid);
+		                }
+		                else
+		                {
+		                   im_win.open_chat(jid);
+		                   window_message = document.getElementById(jid + '_chatMessages');
+		                   window_message.innerHTML += '<strong>' + TimeStamp + nickname + '</strong>&nbsp;' + IM.get_lang('speak') + ':<br/> ' + _this.emotions_icons(body_message) + '<br/><br/>';
+		                }
+					}
 					
-					jid = jid.substr(0,jid.indexOf('/'));
-					body_message = decodeURI(body_message.replace(/\\\'/g, '\''));
-
-					window_message  = document.getElementById(jid + "_chatMessages");
-					nickname = jid;
-
-					for( var j=1; j < IM.array_users.length; j++ )
-					{
-						if( jid == IM.array_users[j].jid ){
-							nickname = decodeURI(IM.array_users[j].VCARD_NICKNAME);
-						}
-					}
-
-	                if ( window_message )
-	                {
-	                   window_message.innerHTML += '<strong>' + TimeStamp + nickname + '</strong>&nbsp;' + IM.get_lang('speak') + ':<br/> ' + _this.emotions_icons(body_message) + '<br/><br/>';
-                       if ( windowItems[jid].state != WINDOW_STATE_REGULAR && windowItems[jid].state != WINDOW_STATE_MAXIMIZED )
-                          im_win.showWindowItem(jid);
-	                }
-	                else
-	                {
-	                   im_win.open_chat(jid);
-	                   window_message = document.getElementById(jid + '_chatMessages');
-	                   window_message.innerHTML += '<strong>' + TimeStamp + nickname + '</strong>&nbsp;' + IM.get_lang('speak') + ':<br/> ' + _this.emotions_icons(body_message) + '<br/><br/>';
-	                }
-				}
-				
-				window_message.scrollTop = window_message.scrollHeight;
-				im_win.newMessageNotification();
-			}	
-		}
-		cIM.cExecute("$this.Ujabber.getMessages", handler_message);			
+					window_message.scrollTop = window_message.scrollHeight;
+					im_win.newMessageNotification();
+				}	
+			}
+			cIM.cExecute("$this.Ujabber.getMessages", handler_message);			
+		}
 	}
 
