Index: /trunk/expressoAdmin1_2/docs/change_log.txt
===================================================================
--- /trunk/expressoAdmin1_2/docs/change_log.txt	(revision 23)
+++ /trunk/expressoAdmin1_2/docs/change_log.txt	(revision 24)
@@ -53,2 +53,5 @@
 - Implementado restrição de criação de contas/listas/grupos com nomes
 de contas/grupos de sistemas. Ex: root, amanda, etc ...
+
+08/05/2007
+- Melhorado performance ao editar listas e grupos.
Index: /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 23)
+++ /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 24)
@@ -238,5 +238,4 @@
 			// GET all infomations about the group.
 			$group_info = $this->group->get_info($_GET['gidnumber'], $manager_context);
-			//_debug_array($group_info);
 
 			unset($GLOBALS['phpgw_info']['flags']['noheader']);
@@ -254,16 +253,30 @@
 
 			// Usuarios do grupo.
+			$user_count = 0;
 			if (count($group_info['memberuid_info']) > 0)
 			{
-				foreach ($group_info['memberuid_info'] as $user)
-				{
-					$array_users[$user['uidnumber']] = $user['cn'];
-					$array_users_uid[$user['uidnumber']] = $user['uid'];
+				foreach ($group_info['memberuid_info'] as $uid=>$user_data)
+				{
+					$array_users[$user_data['uidnumber']] = $user_data['cn'];
+					$array_users_uid[$user_data['uidnumber']] = $uid;
+					$array_users_type[$user_data['uidnumber']] = $user_data['type'];
 				}
 				natcasesort($array_users);
 				foreach ($array_users as $uidnumber=>$cn)
 				{
-					$ea_select_usersInGroup .= "<option value=" . $uidnumber . ">" . $cn . " [" . $array_users_uid[$uidnumber] . "]</option>";
-				}
+					$user_count++;
+					if ($array_users_type[$uidnumber] == 'u')
+					{
+						$users .= "<option value=" . $uidnumber . ">" . $cn . " [" . $array_users_uid[$uidnumber] . "]</option>";
+					}
+					else
+					{
+						$unknow .= "<option value=-1>" . $cn . " [Corrigir manualmente]</option>";
+					}
+				}
+				
+				$opt_tmp_users  = '<option  value="-1" disabled>-----------------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuários&nbsp;&nbsp;&nbsp;&nbsp;---------------------------- </option>'."\n";
+				$opt_tmp_unknow = '<option  value="-1" disabled>--------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuários não encontrados&nbsp;&nbsp;&nbsp;&nbsp;------------------ </option>'."\n";
+				$ea_select_usersInGroup = $unknow != '' ? $opt_tmp_unknow . $unknow . $opt_tmp_users . $users : $opt_tmp_users . $users;
 			}
 			
@@ -289,4 +302,5 @@
 				'manager_context'			=> $manager_context,
 				'cn'						=> $group_info['cn'],
+				'user_count'				=> $user_count,
 				'description'				=> $group_info['description'],
 				'apps'						=> $apps,
Index: /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 23)
+++ /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 24)
@@ -260,13 +260,26 @@
 						$users .= "<option value=" . $uidnumber . ">" . $cn .  " [" . $array_users_uid[$uidnumber] . "]</option>";
 					}
+					elseif ($array_users_type[$uidnumber] == 'l')
+					{
+						$lists .= "<option value=" . $uidnumber . ">" . $cn .  " [" . $array_users_uid[$uidnumber] . "]</option>";
+					}
 					else
 					{
-						$lists .= "<option value=" . $uidnumber . ">" . $cn .  " [" . $array_users_uid[$uidnumber] . "]</option>";
-					}
-				}
-				$opt_tmp_lists = '<option  value="-1" disabled>------------------------------&nbsp;&nbsp;&nbsp;&nbsp;Listas&nbsp;&nbsp;&nbsp;&nbsp;------------------------------ </option>'."\n";
-				$opt_tmp_users = '<option  value="-1" disabled>-----------------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuários&nbsp;&nbsp;&nbsp;&nbsp;---------------------------- </option>'."\n";
+						$unknow .= "<option value=" . $uidnumber . ">" . $cn .  " [" . $array_users_uid[$uidnumber] . "]</option>";
+					}
+				}
 				
-				$ea_select_usersInMaillist = $opt_tmp_lists . $lists . $opt_tmp_users . $users;
+				if ($unknow != '')
+				{
+					$opt_tmp_unknow = '<option  value="-1" disabled>--------------------&nbsp;&nbsp;&nbsp;&nbsp;E-mails não encontrados&nbsp;&nbsp;&nbsp;&nbsp;------------------ </option>'."\n";
+					$ea_select_usersInMaillist .= $opt_tmp_unknow . $unknow;
+				}
+				if ($lists != '')
+				{
+					$opt_tmp_lists  = '<option  value="-1" disabled>------------------------------&nbsp;&nbsp;&nbsp;&nbsp;Listas&nbsp;&nbsp;&nbsp;&nbsp;------------------------------ </option>'."\n";
+					$ea_select_usersInMaillist .= $opt_tmp_lists . $lists;
+				}
+				$opt_tmp_users  = '<option  value="-1" disabled>-----------------------------&nbsp;&nbsp;&nbsp;&nbsp;Usuários&nbsp;&nbsp;&nbsp;&nbsp;---------------------------- </option>'."\n";
+				$ea_select_usersInMaillist .= $opt_tmp_users . $users;
 			}
 
Index: /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 23)
+++ /trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php	(revision 24)
@@ -694,20 +694,44 @@
 		{
 			$justthese = array("cn","uid","uidnumber");
-			$filter="(&(phpgwAccountType=u)(uid=".$entry[0]['memberuid'][$i]."))";
+			
+			// Montagem dinamica do filtro
+			$filter="(&(phpgwAccountType=u)(|";
+			for ($k=0; (($k<10) && ($i<$entry[0]['memberuid']['count'])); $k++)
+			{
+				$filter .= "(uid=".$entry[0]['memberuid'][$i].")";
+				$i++;
+			}
+			$i--;
+			$filter .= "))";
+			
 			$search = ldap_search($this->ldap, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese);
 			$user_entry = ldap_get_entries($this->ldap, $search);
 
-			if ($user_entry[0]['uid'][0] == '')
-			{
-				$result['memberuid_info'][$i]['cn'] = '0-UID NAO EXISTE, corrigir manualmente: ' . $entry[0]['memberuid'][$i];
-				$result['memberuid_info'][$i]['uid'] = $entry[0]['memberuid'][$i];
-				$result['memberuid_info'][$i]['uidnumber'] = $entry[0]['memberuid'][$i];
-			}
-			else
-			{
-				$result['memberuid_info'][$i]['cn'] = $user_entry[0]['cn'][0];
-				$result['memberuid_info'][$i]['uid'] = $user_entry[0]['uid'][0];
-				$result['memberuid_info'][$i]['uidnumber'] = $user_entry[0]['uidnumber'][0];
-			}
+			for ($j=0; $j<$user_entry['count']; $j++)
+			{
+				$result['memberuid_info'][$user_entry[$j]['uid'][0]]['cn'] = $user_entry[$j]['cn'][0];
+				$result['memberuid_info'][$user_entry[$j]['uid'][0]]['uidnumber'] = $user_entry[$j]['uidnumber'][0];
+				$result['memberuid_info'][$user_entry[$j]['uid'][0]]['type'] = 'u';
+			}
+		}
+		
+		// Retira o count do array
+		array_shift($entry[0]['memberuid']);
+		
+		// Checamos e-mails que não fazem parte do expresso.
+		// Criamos um array temporario
+		$tmp_array = array();
+		foreach ($result['memberuid_info'] as $uid => $user_data)
+		{
+			$tmp_array[] = $uid;
+		}
+
+		// Vemos a diferença
+		$array_diff = array_diff($entry[0]['memberuid'], $tmp_array);
+		
+		// Incluimos no resultado
+		foreach ($array_diff as $index=>$uid)
+		{
+			$result['memberuid_info'][$uid]['cn'] = $uid;
 		}
 		
@@ -718,4 +742,5 @@
 				$result['sambaGroup'] = true;
 		}
+
 		return $result;
 	}	
@@ -726,5 +751,5 @@
 		$search = ldap_search($this->ldap, $context, $filter);
 		$entry = ldap_get_entries($this->ldap, $search);
-
+	
 		//Pega o dn do setor do usuario.
 		$entry[0]['dn'] = strtolower($entry[0]['dn']);
@@ -734,5 +759,5 @@
 		//Retira ultimo pipe.
 		$sector_dn = substr($sector_dn,0,(strlen($sector_dn) - 1));
-		
+			
 		$result['context']				= $sector_dn;
 		$result['uidnumber']			= $entry[0]['uidnumber'][0];
@@ -742,31 +767,56 @@
 		$result['accountStatus']		= $entry[0]['accountstatus'][0];
 		$result['phpgwAccountVisible']	= $entry[0]['phpgwaccountvisible'][0];
-		
+			
 		//Members
 		for ($i=0; $i<$entry[0]['mailforwardingaddress']['count']; $i++)
 		{
-			$justthese = array("cn", "uidnumber", "uid", "phpgwaccounttype");
-			$filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(mail=".$entry[0]['mailforwardingaddress'][$i]."))";
+			$justthese = array("cn", "uidnumber", "uid", "phpgwaccounttype", "mail");
+				
+			// Montagem dinamica do filtro
+			$filter="(&(|(phpgwAccountType=u)(phpgwAccountType=l))(|";
+			for ($k=0; (($k<10) && ($i<$entry[0]['mailforwardingaddress']['count'])); $k++)
+			{
+				$filter .= "(mail=".$entry[0]['mailforwardingaddress'][$i].")";
+				$i++;
+			}
+			$i--;
+			$filter .= "))";
+				
 			$search = ldap_search($this->ldap, $GLOBALS['phpgw_info']['server']['ldap_context'], $filter, $justthese);
 			$user_entry = ldap_get_entries($this->ldap, $search);
-			
-			if ($user_entry['count'] != 0)
-			{
-				$result['members_info'][$user_entry[0]['uidnumber'][0]]['uid'] = $user_entry[0]['uid'][0];
-				$result['members_info'][$user_entry[0]['uidnumber'][0]]['cn'] = $user_entry[0]['cn'][0];
-				$result['members_info'][$user_entry[0]['uidnumber'][0]]['type'] = $user_entry[0]['phpgwaccounttype'][0];
-				$result['members_info'][$user_entry[0]['uidnumber'][0]]['mailforwardingaddress'] = $entry[0]['mailforwardingaddress'][$i];
-				$result['members'][] = $user_entry[0]['uidnumber'][0];
-			}
-			else
-			{
-				$result['members_info'][$entry[0]['mailforwardingaddress'][$i]]['uid'] = $entry[0]['mailforwardingaddress'][$i];
-				$result['members_info'][$entry[0]['mailforwardingaddress'][$i]]['cn'] = 'E-Mail nao encontrado (' . $entry[0]['mailforwardingaddress'][$i] . ')';
-				$result['members_info'][$entry[0]['mailforwardingaddress'][$i]]['mailforwardingaddress'] = $entry[0]['mailforwardingaddress'][$i];
-				$result['members'][] = $entry[0]['mailforwardingaddress'][$i];
-			}
-		}
-		
-		return $result;
+				
+			for ($j=0; $j<$user_entry['count']; $j++)
+			{
+				$result['members_info'][$user_entry[$j]['uidnumber'][0]]['uid'] = $user_entry[$j]['uid'][0];
+				$result['members_info'][$user_entry[$j]['uidnumber'][0]]['cn'] = $user_entry[$j]['cn'][0];
+				$result['members_info'][$user_entry[$j]['uidnumber'][0]]['type'] = $user_entry[$j]['phpgwaccounttype'][0];
+				$result['members_info'][$user_entry[$j]['uidnumber'][0]]['mail'] = $user_entry[$j]['mail'][0];
+				$result['members'][] = $user_entry[$j]['uidnumber'][0];
+			}
+		}
+
+		// Retira o count do array
+		array_shift($entry[0]['mailforwardingaddress']);
+
+		// Checamos e-mails que não fazem parte do expresso.
+		// Criamos um array temporario
+		$tmp_array = array();
+		foreach ($result['members_info'] as $uid => $user_data)
+		{
+			$tmp_array[] = $user_data['mail'];
+		}
+
+		// Vemos a diferença
+		$array_diff = array_diff($entry[0]['mailforwardingaddress'], $tmp_array);
+
+		// Incluimos no resultado
+		foreach ($array_diff as $index=>$mailforwardingaddress)
+		{
+			$result['members_info'][$mailforwardingaddress]['uid'] = $mailforwardingaddress;
+			$result['members_info'][$mailforwardingaddress]['cn'] = 'E-Mail nao encontrado';
+			$result['members_info'][$mailforwardingaddress]['mailforwardingaddress'] = $mailforwardingaddress;
+			$result['members'][] = $mailforwardingaddress;
+		}
+		return $result;	
 	}	
 
Index: /trunk/expressoAdmin1_2/templates/default/groups_form.tpl
===================================================================
--- /trunk/expressoAdmin1_2/templates/default/groups_form.tpl	(revision 23)
+++ /trunk/expressoAdmin1_2/templates/default/groups_form.tpl	(revision 24)
@@ -30,5 +30,5 @@
 							Ocultar este grupo no Expresso? <input type="checkbox" {phpgwaccountvisible_checked} name="phpgwaccountvisible"><br>							
 							
-							<b>{lang_group_users}:</b><br>
+							<b>{lang_group_users} (<font color=red>{user_count}</font>):</b><br>
 							<select id="ea_select_usersInGroup" name="members[]" style="width: 400px" multiple size="13">{ea_select_usersInGroup}</select>
 						</td>
Index: /trunk/instant_messenger/docs/change_log.txt
===================================================================
--- /trunk/instant_messenger/docs/change_log.txt	(revision 21)
+++ /trunk/instant_messenger/docs/change_log.txt	(revision 24)
@@ -6,2 +6,3 @@
 27/04/2007 [0.001]
 - Vcard, corrigido para a visualização de caracteres e acentos. 
+
Index: /trunk/instant_messenger/inc/class.Jabber.inc.php
===================================================================
--- /trunk/instant_messenger/inc/class.Jabber.inc.php	(revision 20)
+++ /trunk/instant_messenger/inc/class.Jabber.inc.php	(revision 24)
@@ -34,6 +34,4 @@
 	private $log_error = false;
 	
-	private $array_teste = array();
-
 	function __construct($pJid = false, $pPassword = false, $pPort = false)
 	{
Index: /trunk/instant_messenger/inc/class.Ujabber.inc.php
===================================================================
--- /trunk/instant_messenger/inc/class.Ujabber.inc.php	(revision 21)
+++ /trunk/instant_messenger/inc/class.Ujabber.inc.php	(revision 24)
@@ -1,10 +1,10 @@
 <?php
-	/************************************************************
-	 * 	Classe Jabber - Expresso								*
-	 *  ------------------------------------------------------- *  
-	 *	Com Autenticação no Servidor Jabber com Tls			    *
-	 * 	Rodrigo Souza - rodsouza@celepar.pr.gov.br				*
-	 * 	Alexandre Correia - alexandrecorreia@celepar.pr.gov.br  *
-	 ************************************************************/
+	/*************************************************************
+	 * 	Classe Jabber - Expresso										 *
+	 *  -------------------------------------------------------  *  
+	 *	   Com Autenticação no Servidor Jabber 					    *
+	 * 	Rodrigo Souza - rodsouza@celepar.pr.gov.br				 *
+	 * 	Alexandre Correia - alexandrecorreia@celepar.pr.gov.br *
+	 *************************************************************/
 
 require_once "class.Jabber.inc.php";
@@ -70,5 +70,5 @@
 		$group_nusers[0]['VCARD_DESC'] = $VCARD_P['DESC'];
 		$group_nusers[0]['VCARD_JID'] = $VCARD_P['JID'];				
-
+		
 		natcasesort($group_users);		
 		$i=1;
@@ -146,7 +146,7 @@
             {
 				$array_return[$j]['subscription'] = 'to';
-				$array_return[$j]['name'] = '';
+				$array_return[$j]['name'] = $array_db[$i]['im_from'];
 				$array_return[$j]['jid'] = $array_db[$i]['im_from'];
-				$array_return[$j]['group'] = '';
+				$array_return[$j]['group'] = 'sem_grupo';
 				$array_return[$j]['online'] = 0;
 				$j++;
Index: /trunk/instant_messenger/inc/class.db_im.inc.php
===================================================================
--- /trunk/instant_messenger/inc/class.db_im.inc.php	(revision 20)
+++ /trunk/instant_messenger/inc/class.db_im.inc.php	(revision 24)
@@ -14,5 +14,4 @@
 	var $db_pass;
 	var $db_type;
-	var $teste;
 	
 	function db_im(){
Index: /trunk/instant_messenger/js/im_win.js
===================================================================
--- /trunk/instant_messenger/js/im_win.js	(revision 20)
+++ /trunk/instant_messenger/js/im_win.js	(revision 24)
@@ -268,5 +268,5 @@
          name_document.innerHTML = '';
          var contact = func.byId(pId);
-         var _status = IM.vcard_contacts[contact.getAttribute('nuncontact')].online
+         var _status = IM.array_users[contact.getAttribute('nuncontact')].online
          contact.firstChild.src = ( _status == parseInt(1) ) ? img_online.src : img_offline.src;
       }
Index: /trunk/instant_messenger/js/im_templates.js
===================================================================
--- /trunk/instant_messenger/js/im_templates.js	(revision 20)
+++ /trunk/instant_messenger/js/im_templates.js	(revision 24)
@@ -93,18 +93,25 @@
 	Templates.prototype.Users_Not_Auth = function ()
 	{
-		var _this = this;
-		var form_auth_user = "<div style='margin-left:10px;margin-top:5'>" +
-							 "<br>"+
-							 "<b>O(s) contato(s) abaixo aguarda(m) sua autorização." +
-							 "<br>Para adicionar este(s) novo(s) contato(s), basta dar um " +
-							 "<br>clique em cima do contato." +
-							 "<p>Contato(s) :" + 
-							 "</b><br>" +
-							 "<div id='divChildrenFormAuthUser'>" +		
-							 "<p>" + document.getElementById('not_aut').innerHTML + 
-							 "</div></div>";
-
-		_this.conf_form("divFormAuthUser",370,200,form_auth_user, ":: Contatos sem Cadastro - Expresso ::");
-	
+		var cont = 0;
+		var _this = this;
+				
+		for(var i=0 ; i < IM.array_users.length; i++)
+			if(IM.array_users[i].group == "sem_grupo")
+				cont++;
+		
+		if(cont > 0){
+			var form_auth_user = "<div style='margin-left:10px;margin-top:5'>" +
+								 "<br>"+
+								 "<b>O(s) contato(s) abaixo aguarda(m) sua autorização." +
+								 "<br>Para adicionar este(s) novo(s) contato(s), basta dar um " +
+								 "<br>clique em cima do contato." +
+								 "<p>Contato(s) :" + 
+								 "</b><br>" +
+								 "<div id='divChildrenFormAuthUser'>" +		
+								 "<p>" + document.getElementById('sem_grupo').innerHTML + 
+								 "</div></div>";
+	
+			_this.conf_form("divFormAuthUser",370,200,form_auth_user, ":: Contatos sem Cadastro - Expresso ::");
+		}
 	}
 
@@ -141,5 +148,5 @@
 							 	'<tr><td width="30%" align="right">'+IM.get_lang('Birthday')+'&nbsp;.:&nbsp;</td><td width="70%" align="left"><label id="_lbl_Birthday"></label></td></tr>'+							
 								'<table>';
-		_this.conf_form("divInfoContact",400,130,form_info_contact,":: Informações do Contato - Expresso ::");
+		_this.conf_form("divInfoContact",430,130,form_info_contact,":: Informações do Contato - Expresso ::");
 	
 	}
@@ -206,5 +213,5 @@
       grid += '      <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'^o)\')" id="sendMessageMenuId"><img alt="^o)" width="19" height="19" src="' + smile_51.src + '" /></div></td>';
       grid += '      <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\':-*\')" id="sendMessageMenuId"><img alt=":-*" width="19" height="19" src="' + smile_52.src + '" /></div></td>';
-      grid += '      <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'+o(\')" id="sendMessageMenuId"><img alt="+o(" width="19" height="19" src="' + smile_53.src + '" /></div></td>';
+      grid += '      <td><div class="emotionItem" onMouseover="im_win.hAuthorizationighlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'+o(\')" id="sendMessageMenuId"><img alt="+o(" width="19" height="19" src="' + smile_53.src + '" /></div></td>';
       grid += '      <td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion(\'(sn)\')" id="sendMessageMenuId"><img alt=(sn)"" width="19" height="19" src="' + smile_54.src + '" /></div></td>';
       grid += '    </tr>';
Index: /trunk/instant_messenger/js/im_preferences.js
===================================================================
--- /trunk/instant_messenger/js/im_preferences.js	(revision 23)
+++ /trunk/instant_messenger/js/im_preferences.js	(revision 24)
@@ -86,14 +86,5 @@
 		var text2 = document.getElementById('text2');
 		var _this = this;
-		
-		if(pFunc != "divUpdateUser_im"){
-			var jid = text0.value.substr(0,text0.value.indexOf('@'));
-			for(var i=0; i < IM.user_not_aut.length; i++){
-				if(IM.user_not_aut[i].substr(0,IM.user_not_aut[i].indexOf('@')) == jid){
-					return;
-				}					
-			}
-		}
-			
+
 		if(IM.LTrim(text0.value) != "" && IM.LTrim(text1.value) != "" && IM.LTrim(text2.value) != ""){
 			var handler_add_contact = function(data){
@@ -130,11 +121,11 @@
 		sel_contact.options[sel_contact.length] = opt;
 
-		for(var i=1; i < IM.vcard_contacts.length; i++){
-			if(IM.vcard_contacts[i].name != ""){
-				opt = new Option(IM.vcard_contacts[i].name,IM.vcard_contacts[i].jid, false, false);
+		for(var i=1; i < IM.array_users.length; i++){
+			if(IM.array_users[i].name != ""){
+				opt = new Option(IM.array_users[i].name,IM.array_users[i].jid, false, false);
 				sel_contact.options[sel_contact.length] = opt;
 			}else{
-				name = IM.vcard_contacts[i].jid.substr(0,IM.vcard_contacts[i].jid.indexOf('@'));
-				opt = new Option(name,IM.vcard_contacts[i].jid, false, false);
+				name = IM.array_users[i].jid.substr(0,IM.array_users[i].jid.indexOf('@'));
+				opt = new Option(name,IM.array_users[i].jid, false, false);
 				sel_contact.options[sel_contact.length] = opt;
 			}
@@ -150,7 +141,7 @@
 				if(confirm("Excluir o contato " + sel_contact.options[i].innerHTML + "?")){
 					var in_el = sel_contact.options[i].innerHTML;
-					for(var j=1 ; j < IM.vcard_contacts.length; j++){
-						var name = IM.vcard_contacts[j].jid.substr(0,IM.vcard_contacts[j].jid.indexOf('@'));
-						if(IM.vcard_contacts[j].name == in_el || name == in_el){
+					for(var j=1 ; j < IM.array_users.length; j++){
+						var name = IM.array_users[j].jid.substr(0,IM.array_users[j].jid.indexOf('@'));
+						if(IM.array_users[j].name == in_el || name == in_el){
 							var handler_remove_contact = function(data){
 								if(!data){
@@ -161,5 +152,5 @@
 							}
 							cIM.cExecute("$this.Ujabber.RosterRemoveUser",handler_remove_contact,"jid="+sel_contact.options[i].value);
-							IM.vcard_contacts.splice(j,1);
+							IM.array_users.splice(j,1);
 							_this.ComboRemove();							
 							j--;
@@ -183,6 +174,6 @@
 		var opt = new Option("-- "+IM.get_lang('Choice Contact')+" -- ","0",true,true);
 		sel_contact.options[sel_contact.length] = opt;
-		for(var i=0; i < IM.vcard_contacts.length; i++){
-			opt = new Option(IM.vcard_contacts[i].name,IM.vcard_contacts[i].jid, false, false);
+		for(var i=0; i < IM.array_users.length; i++){
+			opt = new Option(IM.array_users[i].name,IM.array_users[i].jid, false, false);
 			sel_contact.options[sel_contact.length] = opt;
 		}
@@ -191,7 +182,7 @@
 	Preferences.prototype.Remove_Contact = function(pJid)
 	{
-		for(var i=0; i < IM.vcard_contacts.length; i++){
-			if(IM.vcard_contacts[i].jid == pJid){
-				if(confirm("Excluir o contato " + IM.vcard_contacts[i].name + "?")){
+		for(var i=0; i < IM.array_users.length; i++){
+			if(IM.array_users[i].jid == pJid){
+				if(confirm("Excluir o contato " + IM.array_users[i].name + "?")){
 					var handler_remove_contact = function(data){
 						if(!data){
@@ -215,5 +206,5 @@
    Preferences.prototype.updateLoad = function(i)
    {
-   		Jid = IM.vcard_contacts[i].jid;
+   		Jid = IM.array_users[i].jid;
    		Templates.update_user();   	
    		document.getElementById('text0').value = Jid;
@@ -227,8 +218,8 @@
 		var jid   = pJid;
 		
-		for(var i=1; i < IM.vcard_contacts.length; i++){
-			if(IM.vcard_contacts[i].jid == pJid){
-				name  = IM.vcard_contacts[i].name;
-				group = IM.vcard_contacts[i].group;
+		for(var i=1; i < IM.array_users.length; i++){
+			if(IM.array_users[i].jid == pJid){
+				name  = IM.array_users[i].name;
+				group = IM.array_users[i].group;
 			}
 		}
@@ -314,11 +305,11 @@
 	{
 		Templates.information_Contact();
-		for(var i=0; i < IM.vcard_contacts.length; i++){
-			if(IM.vcard_contacts[i].jid == pJid){
-				document.getElementById('_lbl_FN').innerHTML = decodeURI(IM.vcard_contacts[i].VCARD_FN);
-				document.getElementById('_lbl_Nickname').innerHTML = decodeURI(IM.vcard_contacts[i].VCARD_NICKNAME);
-				document.getElementById('_lbl_Orgunit').innerHTML = decodeURI(IM.vcard_contacts[i].VCARD_ORGUNIT);
-				document.getElementById('_lbl_Role').innerHTML = decodeURI(IM.vcard_contacts[i].VCARD_ROLE);
-				document.getElementById('_lbl_Birthday').innerHTML = decodeURI(IM.vcard_contacts[i].VCARD_BDAY);																
+		for(var i=0; i < IM.array_users.length; i++){
+			if(IM.array_users[i].jid == pJid){
+				document.getElementById('_lbl_FN').innerHTML = decodeURI(IM.array_users[i].VCARD_FN);
+				document.getElementById('_lbl_Nickname').innerHTML = decodeURI(IM.array_users[i].VCARD_NICKNAME);
+				document.getElementById('_lbl_Orgunit').innerHTML = decodeURI(IM.array_users[i].VCARD_ORGUNIT);
+				document.getElementById('_lbl_Role').innerHTML = decodeURI(IM.array_users[i].VCARD_ROLE);
+				document.getElementById('_lbl_Birthday').innerHTML = decodeURI(IM.array_users[i].VCARD_BDAY);																
 				return;
 			}	
Index: /trunk/instant_messenger/js/im_images.js
===================================================================
--- /trunk/instant_messenger/js/im_images.js	(revision 23)
+++ /trunk/instant_messenger/js/im_images.js	(revision 24)
@@ -34,13 +34,11 @@
 	var img_wait = new Image();
 	img_wait.src = im_path + "templates/default/images/wait.gif";
+	var img_wait_auth = new Image();
+	img_wait_auth.src = im_path + "templates/default/images/wait_auth.gif";
 	var img_chat_bubble = new Image();
 	img_chat_bubble.src = im_path + "templates/default/images/chat_bubble.gif";
-	// MANUTENÇÃO
-	var img_manutencao_im = new Image();
-	img_manutencao_im.src = im_path + "templates/default/images/manutencao_im.png";
 
-
-
-	var smile_1 = new Image();
+   // Smiles
+   var smile_1 = new Image();
    smile_1.src = im_path + "templates/default/images/img/smiles/1.gif"
    var smile_2 = new Image();
Index: /trunk/instant_messenger/js/im_functions.js
===================================================================
--- /trunk/instant_messenger/js/im_functions.js	(revision 23)
+++ /trunk/instant_messenger/js/im_functions.js	(revision 24)
@@ -4,8 +4,7 @@
    function IM()
    {
-      this.array_lang_im  = [];
-      this.user_not_aut   = [];
-      this.vcard_contacts = [];
-      this.vcard_user     = [];
+      this.array_lang_im  = new Array();
+      this.array_users	  = new Array();
+      this.vcard_user	  = new Array();
       this.load_photo	  = false;
    }
@@ -25,9 +24,7 @@
          if ( data[1] )
          {
-            _this.vcard_contacts.splice(0,_this.vcard_contacts.length);
-            _this.vcard_user.splice(0,_this.vcard_user.length);
-            _this.user_not_aut.splice(0,_this.user_not_aut.length);
+            _this.array_users.splice(0,_this.array_users.length);
+            _this.array_users = data;
             _this.mount_list(data);
-
          }
          _this.conf_VcardUser(data[0]);
@@ -73,7 +70,7 @@
       }
    }
-	/*
-	 * Monta Lista de Contatos
-	 */
+   /*
+	* Monta Lista de Contatos
+	*/
 	
 	IM.prototype.mount_list = function(pList)
@@ -82,105 +79,50 @@
 		var div = document.getElementById("div_contacts");
 			div.innerHTML = "";
+
+			div.innerHTML += '<img id="img_all_groups" src=' + img_group_open.src + 
+			             	 ' onclick=javascript:IM.visible_group("all_groups")>' +
+				           	 '<b>'+_this.get_lang('list of contacts') + ' - ' + ( pList.length - 1 ) + '</b><br>' +
+		        	         '<div id="all_groups"></div>';
+
+		for(var i=1; i < pList.length; i++){
+
+			var div_agroups = document.getElementById("all_groups");
 		
-		var groups = "<b>"+_this.get_lang("list of contacts")+" - 0 </b><br>";
-	
-		if(pList.length > 0){
-			var name_group = "";
-			groups = "<img id='img_all_groups' src=" + img_group_open.src + " onclick=javascript:IM.visible_group('all_groups')>" +
-			         "<b>"+_this.get_lang("list of contacts")+" - " + ( pList.length - 1 ) + "</b><br>"+
-			         "<div id='all_groups'>";
-			for(var i=1; i < pList.length; i++){
-				if( i == 1 ){
-					if(pList[i].group != "" && pList[i].name != ""){
-						name_group = pList[i].group;
-						groups += '<img id="img_' + pList[i].group.rm_space() + '" src="' + img_group_open.src + '" onclick="javascript:IM.visible_group(\'' + pList[i].group.rm_space() + '\')" style="margin-left:16px;">';
-						groups += "<b>" + pList[i].group + "</b><br>";
-						groups += "<div id='" + pList[i].group.rm_space() + "'>";
-						if(pList[i].subscription == "both"){
-							groups += '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+pList[i].online + '\', \'' + pList[i].jid + '\');" style="cursor:pointer;padding-left:32px;"><img src="' + ((pList[i].online) == parseInt(1) ? img_online.src : img_offline.src) + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
-						}else{
-							groups += _this.FromToNone(pList[i].jid,pList[i].subscription,pList[i].group,pList[i].name);
-						}
-					}else
-						_this.user_not_aut[_this.user_not_aut.length] = pList[i].jid + ";" + i;
+			if(document.getElementById("img_" + pList[i].group.rm_space()) == null ){
+				div_agroups.innerHTML += '<img id="img_' + pList[i].group.rm_space() + '" src="' + img_group_open.src + '" onclick="javascript:IM.visible_group(\'' + pList[i].group.rm_space() + '\')" style="margin-left:16px;">';
+				div_agroups.innerHTML += '<b>' + pList[i].group + '</b></br>';
+
+				if(pList[i].group.rm_space() != 'sem_grupo'){
+					var div_group = document.createElement('DIV');
+						div_group.id = pList[i].group.rm_space();
+						if(pList[i].subscription.rm_space() == "both")
+							div_group.innerHTML = '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+pList[i].online + '\', \'' + pList[i].jid + '\' ,false);" style="cursor:pointer;padding-left:32px;"><img src="' + ((pList[i].online) == parseInt(1) ? img_online.src : img_offline.src) + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
+						else
+							div_group.innerHTML = '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+parseInt(0)+'\', \'' + pList[i].jid + '\' ,true);" style="cursor:pointer;padding-left:32px;"><img src="' + img_wait_auth.src + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
+						div_agroups.appendChild(div_group);
 				}else{
-					if(pList[i].group != "" && pList[i].name != ""){
-						if(pList[i].group == name_group){
-							if(pList[i].subscription == "both"){
-								groups += '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+pList[i].online + '\', \'' + pList[i].jid + '\');" style="cursor:pointer;padding-left:32px;"><img src="' + ((pList[i].online) == parseInt(1) ? img_online.src : img_offline.src) + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
-							}else{
-								groups += _this.FromToNone(pList[i].jid,pList[i].subscription,pList[i].group,pList[i].name);
-							}
-							name_group = pList[i].group;
-						}else{
-							groups += "</div>";
-							groups += '<img id="img_' + pList[i].group.rm_space() + '" src="' + img_group_open.src + '" onclick="javascript:IM.visible_group(\'' + pList[i].group.rm_space() + '\')" style="margin-left:16px;">';
-							groups += "<b>" + pList[i].group + "</b><br>";
-							groups += "<div id='" + pList[i].group.rm_space() + "'>";
-							if(pList[i].subscription == "both"){
-								groups += '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+pList[i].online + '\', \'' + pList[i].jid + '\');" style="cursor:pointer;padding-left:32px;"><img src="' + ((pList[i].online) == parseInt(1) ? img_online.src : img_offline.src) + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
-							}else{
-								groups += _this.FromToNone(pList[i].jid,pList[i].subscription,pList[i].group,pList[i].name);
-							}
-							name_group = pList[i].group;
-						}
-					}else{
-						_this.user_not_aut[_this.user_not_aut.length] = pList[i].jid + ";" + i;
-					}
+					var div_group = document.createElement('DIV');
+						div_group.id = pList[i].group.rm_space();
+						div_group.innerHTML = '<div id="'+pList[i].jid+'" onclick=Preferences.updateLoad("'+i+'") style="cursor:pointer;padding-left:32px;">'+
+											  '<img src="'+img_not_authorized.src+'">'+pList[i].jid+'</div>';
+						div_agroups.appendChild(div_group);					
 				}
+			}else{
+
+				if(pList[i].group.rm_space() != 'sem_grupo'){
+					var div_group = document.getElementById(pList[i].group.rm_space());
+					if(pList[i].subscription.rm_space() == "both")
+						div_group.innerHTML += '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+pList[i].online + '\', \'' + pList[i].jid + '\',false);" style="cursor:pointer;padding-left:32px;"><img src="' + ((pList[i].online) == parseInt(1) ? img_online.src : img_offline.src) + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';
+					else
+						div_group.innerHTML = '<div id="' + pList[i].jid + '" nuncontact="'+ i +'" onmouseover="this.className=\'contato_hover\'" onmouseout="this.className=\'\'" onmousedown="javascript:IM.action_button(event, \''+parseInt(0)+'\', \'' + pList[i].jid + '\',true);" style="cursor:pointer;padding-left:32px;"><img src="' + img_wait_auth.src + '">' + pList[i].name + '</div><span id="_span_' + pList[i].jid + '" class="menu_im"></span>';					
+					div_agroups.appendChild(div_group);
+				}else{
+					var div_group = document.getElementById(pList[i].group.rm_space());
+						div_group.innerHTML += '<div id="'+pList[i].jid+'" onclick=Preferences.updateLoad("'+i+'") style="cursor:pointer;padding-left:32px;">'+
+											   '<img src="'+img_not_authorized.src+'">'+pList[i].jid+'</div>';
+						div_agroups.appendChild(div_group);
+				}	
 			}
-			groups += "</div><div id='out_list'></div></div>";
 		}
-		
-		// Vcard Contato;
-		if(pList.length > 0)
-			_this.vcard_contacts =  pList;
-
-		// Imprime valor de groups;
-		div.innerHTML = groups;
-
-		// Usuários sem grupo e nome;
-		if(_this.user_not_aut.length > 0)
-			_this.Group_Name(document.getElementById('out_list'));
-	}
-
-	/*
-	 * Define se From - To - None
-	 */
-
-	IM.prototype.FromToNone = function(pJid,pSubscription,pGroup,pName)
-	{
-		var n_groups = "";
-		var _this = this;
-		if(pSubscription == "from")
-			n_groups += "<div id='" + pJid + "' nucontact="+ i +" style='cursor:pointer;padding-left:32px;' onclick=javascript:IM.Authorization(\'"+pJid+"\',\'"+pSubscription+"\')><img src="+img_not_authorized.src+" title='Aguardando/Enviar Autorização'>"+pName+"</div>";
-		else if(pSubscription == "to")
-			n_groups += "<div id='" + pJid + "' nucontact="+ i +" style='cursor:pointer;padding-left:32px;' onclick=javascript:IM.Authorization(\'"+pJid+"\',\'"+pSubscription+"\')><img src="+img_not_authorized.src+" title='Enviar Autorização'>"+pName+"</div>";																			
-		else if(pSubscription == "none"){
-			n_groups += "<div id='" + pJid + "' nucontact="+ i +" style='cursor:pointer;padding-left:32px;' onclick=javascript:IM.Authorization(\'"+pJid+"\',\'"+pSubscription+"\')><img src="+img_not_authorized.src+" title='Pedir Autorização'>"+pName+"</div>";																			
-		}	
-		return n_groups;
-	}
-
-	/*
-	 *  Usuário sem grupo e nome
-	 */
-
-	IM.prototype.Group_Name = function(el)
-	{
-		var _this = this;
-		var group_nt = "";
-		
-		group_nt += '<img	id="img_not_aut" src="' + img_group_open.src + '" onclick="javascript:IM.visible_group(\'not_aut\')" style="margin-left:16px;">';
-		group_nt += "<b>" + _this.get_lang("Sem Cadastro") + "</b><br>";
-		group_nt += "<div id='not_aut'>";
-		for(var i=0; i < _this.user_not_aut.length; i++){
-			var pos = _this.user_not_aut[i].indexOf("@");
-			var ind = _this.user_not_aut[i].substr((_this.user_not_aut[i].indexOf(";")+1),1);
-			group_nt += '<div id="'+_this.user_not_aut[i]+'" onclick=Preferences.updateLoad("'+ind+'") style="cursor:pointer;padding-left:32px;">'+
-						'<img src="'+img_not_authorized.src+'">'+_this.user_not_aut[i].substr(0,pos)+'</div>';
-		}
-		group_nt += "</div>";
-		el.innerHTML = group_nt;
 		setTimeout("Templates.Users_Not_Auth()",2500);
 	}
@@ -238,5 +180,4 @@
 
 		// Vcard pessoal;
-
 		if ( !_this.load_photo ){
 
@@ -249,6 +190,6 @@
 			_this.vcard_user['VCARD_DESC'] = decodeURI(data.VCARD_DESC);
 			_this.vcard_user['VCARD_JID']  = decodeURI(data.VCARD_JID);
-
-			im_win.get_photo_ldap(_this.vcard_user['VCARD_JID']);
+			
+			im_win.get_photo_ldap(decodeURI(data['VCARD_JID']));
 			_this.load_photo = true;
 		}
@@ -341,11 +282,22 @@
 	                mensagens = document.getElementById(data[i].from.substr(0, data[i].from.indexOf('/')) + '_chatMessages');
 	         	    var nickname = data[i].from.substr(0, data[i].from.indexOf('/'));
-    	            for(var j=1 ; j < _this.vcard_contacts.length ; j++)
+    	            for(var j=1 ; j < _this.array_users.length ; j++)
                     {
-			          if(data[i].from.substr(0, data[i].from.indexOf('/')) == _this.vcard_contacts[j].VCARD_JID)
-			             if(_this.vcard_contacts[j].VCARD_NICKNAME != "")
-				             nickname = _this.vcard_contacts[j].VCARD_NICKNAME;	
+					  var nick_user = decodeURI(_this.array_users[j].VCARD_JID);	
+
+			          if( nickname.rm_space() == nick_user.rm_space())
+			          {
+			             var vcard_nick = decodeURI(_this.array_users[j].VCARD_NICKNAME);
+			             if( vcard_nick != "")
+			             {
+				             nickname = vcard_nick;	
+				             if(nickname.rm_space() == decodeURI(_this.array_users[j].VCARD_NICKNAME))
+				             	nickname = nickname;
+				             else
+				             	nickname = decodeURI(_this.array_users[j].VCARD_NICKNAME);
+				         }
+					   }
 	                }
-                    
+                   
                     minuto = ( hora.getMinutes() > 9 ) ? hora.getMinutes() : '0' + hora.getMinutes();
                     _hora = '[' + hora.getHours() + ':' + minuto + '] ';
@@ -372,7 +324,7 @@
 	}
 
-	/*
-	 * Envia Mensagens
-	 */
+   /*
+	* Envia Mensagens
+	*/
 
    IM.prototype.sendMessage = function (pJID)
@@ -591,13 +543,17 @@
    }
 
-   IM.prototype.menu_button_right = function(pElement)
-   {
-      var form_menu_button_right = '<dl>'+
-                                   '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Update_NickName(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Nick') + '</a>'+
-                                   '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.SendFile(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Send File') + '</a>'+
-                                   '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Update_Group(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Group') + '</a>'+
-                                   '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Remove_Contact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Delete') + '</a>'+
-                                   '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.vCardLoad_Contact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('See Info') + '</a>'+
-                                   '</dl>';
+   IM.prototype.menu_button_right = function(pElement,pReq)
+   {
+      var form_menu_button_right = '<dl>';
+	      if(pReq)
+	      {
+		    form_menu_button_right += '<dt><a href="javascript:void(0);" onclick="javascript:IM.Authorization(\''+pElement+'\',\'from\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Authorization') + '</a>';                                   
+		  }
+          form_menu_button_right += '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Update_NickName(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Nick') + '</a>'+
+                                    '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.SendFile(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Send File') + '</a>'+
+                                    '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Update_Group(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Group') + '</a>'+
+                                    '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.Remove_Contact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Delete') + '</a>'+
+								    '<dt><a href="javascript:void(0);" onclick="javascript:Preferences.vCardLoad_Contact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('See Info') + '</a>'+
+                                    '</dl>';
       im_menu_action.menu("_span_" + pElement, form_menu_button_right);
    }
@@ -608,5 +564,5 @@
 	
 	function url_encode(str)
-   { 
+    { 
 	    var hex_chars = "0123456789ABCDEF"; 
 	    var noEncode = /^([a-zA-Z0-9\_\-\.])$/; 
@@ -634,9 +590,9 @@
 	 */
 
-	IM.prototype.action_button = function(pEv,pStatus,pJid)
+	IM.prototype.action_button = function(pEv,pStatus,pJid,pReq)
 	{
 		var _this = this;
 		if(pEv.button > 1){
-			_this.menu_button_right(pJid);
+			_this.menu_button_right(pJid,pReq);
 			document.oncontextmenu = new Function("return false");
 		}else{
@@ -684,23 +640,4 @@
 	}
 
-	function teste(pJID)
-	{
-		document.getElementById(pJID + '_edita').onkeydown = function (e){
-			if (is_ie)
-			{
-				if ((window.event.keyCode) == 13)
-					send(pJID);
-			}
-			else
-			{
-				if ((e.keyCode) == 13)
-				{
-					send(pJID);
-					return false;
-				}
-			}
-		}
-	}
-
 // Build Object	
 	var IM = new IM();
Index: /trunk/contactcenter/doc/change_log.txt
===================================================================
--- /trunk/contactcenter/doc/change_log.txt	(revision 16)
+++ /trunk/contactcenter/doc/change_log.txt	(revision 24)
@@ -20,3 +20,4 @@
 - Foi adicionado importação e exportação aos contatos do outlook 2000 (em inglês e português)
 - Foi adicionado a importação e exportação com suporte ao campo de telefone. Em todos os tipos de arquivos.
+- Corrigido problema de lentidão ao buscar o nome/email dos participantes de uma lista pública grande.
 
Index: /trunk/contactcenter/inc/class.ui_data.inc.php
===================================================================
--- /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 19)
+++ /trunk/contactcenter/inc/class.ui_data.inc.php	(revision 24)
@@ -2390,5 +2390,5 @@
 				$info = ldap_get_entries($ds, $sr);							
 				for($z = 0; $z < $info['count']; $z++) {
-					$participant =  '&quot;'.$info[$z]['cn'][0].'&quot; &lt;'.$info[$z]['mail'][0].'&gt;';
+					$participant =  '<font color=\'DARKBLUE\'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;'.$info[$z]['cn'][0].'&quot; &lt;'.$info[$z]['mail'][0].'&gt;</font><br>';
 					$array_emails[$info[$z]['mail'][0]] = null; 								
 					array_push($array_participants, $participant);					
@@ -2397,11 +2397,15 @@
 				foreach($array_emails as $index => $email)
 					if($email) 
-						array_push($array_participants, $email);				
+						array_push($array_participants, "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$email."<br>");				
 												
 				ldap_close($ds);
 			}
 			sort($array_participants);
-			$array_participants['names_ordered'] = $contact['names_ordered']; 
-			echo serialize($array_participants);
+			$innerHTML = '';			
+			foreach($array_participants as $index => $participant){
+				$innerHTML .= $participant;
+			}
+			$return = array('size' => count($array_participants), 'names_ordered'=> $contact['names_ordered'], 'inner_html' => $innerHTML);			 
+			echo serialize($return);
 		}	
 
Index: /trunk/contactcenter/js/ccListParticipants.js
===================================================================
--- /trunk/contactcenter/js/ccListParticipants.js	(revision 2)
+++ /trunk/contactcenter/js/ccListParticipants.js	(revision 24)
@@ -76,18 +76,12 @@
 			var handler = function (responseText) {
 				var contacts = unserialize(responseText);
-				var title = contacts['names_ordered'];			
-				document.body.appendChild(el);
-				
+				var title = contacts.names_ordered;	
+				document.body.appendChild(el);				
 				el.innerHTML = "";	
 				el.innerHTML = "<br>&nbsp;&nbsp;<b><font color='BLUE' nowrap>"+title+"</font></b>"+
 				"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<u>"+
-				Element('cc_participants').value+"</u>&nbsp;&nbsp;&nbsp;<br><br>";	
-				
-				if(contacts.length) {
-					for (var d = 0; d < contacts.length; d++) {
-						el.innerHTML +=	
-						"<font color='DARKBLUE'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"+
-						contacts[d]+"</font>&nbsp;&nbsp;&nbsp;<br>";																	
-					}
+				Element('cc_participants').value+"</u>&nbsp;&nbsp;&nbsp;<br><br>";				
+				if(contacts.size > 0) {
+						el.innerHTML +=	contacts.inner_html;
 				}
 				else {
Index: /trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.uicalendar.inc.php	(revision 23)
+++ /trunk/calendar/inc/class.uicalendar.inc.php	(revision 24)
@@ -341,6 +341,6 @@
 				$new_body = '<html>'."\n"
 					.'<head>'."\n"
-					.'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'].'/app_print.css" type=text/css rel=StyleSheet>'."\n"
 					.'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'].'/app.css" type=text/css rel=StyleSheet>'."\n"
+					.'<LINK href="'.$GLOBALS['phpgw_info']['server']['webserver_url'].'/calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'].'/app_print.css" type=text/css rel=StyleSheet media="print">'."\n"
 					.'</head>
 					<table id="calendar_print_main" class="calendar_print_main">						
Index: /trunk/calendar/templates/default/link_pict.tpl
===================================================================
--- /trunk/calendar/templates/default/link_pict.tpl	(revision 2)
+++ /trunk/calendar/templates/default/link_pict.tpl	(revision 24)
@@ -18,5 +18,5 @@
 
 <!-- BEGIN link_text -->
-<nobr>&nbsp;<span style="color: black">{time}</span> {users_status}</nobr><br><b>{title}</b><br><i>{desc}</i> {location}
+<nobr>&nbsp;<FONT SIZE=1><span style="color: black">{time}</span> {users_status}</nobr><br><b>{title}</b><br><i>{desc}</i> {location}
 <!-- END link_text -->
 
Index: /trunk/calendar/templates/celepar/month_day.tpl
===================================================================
--- /trunk/calendar/templates/celepar/month_day.tpl	(revision 21)
+++ /trunk/calendar/templates/celepar/month_day.tpl	(revision 24)
@@ -2,5 +2,5 @@
 <!-- BEGIN m_w_table -->
 
-<table id="calendar_m_w_table" class="calendar_print_main" border="1" width="100%">
+<table id="calendar_m_w_table" class="calendar_m_w_table" border="1" width="100%">
 	<! from month_header.tpl -->
 	{row}
@@ -9,5 +9,5 @@
 
 <!-- BEGIN month_daily -->
-<span id="calendar_m_w_table_daynumber" style="font-size:10px">[ {day_number} ]</span>{new_event_link}<br />
+<span class="screen_only">[ </span><span class="calendar_m_w_table_daynumber" >{day_number}</span><span class="screen_only"> ]</span>{new_event_link}<br />
     {daily_events}
 <!-- END month_daily -->
Index: /trunk/calendar/templates/celepar/app_print.css
===================================================================
--- /trunk/calendar/templates/celepar/app_print.css	(revision 21)
+++ /trunk/calendar/templates/celepar/app_print.css	(revision 24)
@@ -1,2 +1,5 @@
+/* Este documento é um css somente para impressão do calendário no papel!
+O seu efeito não aparece na tela  */
+
 .calendar_print_main {
 	text-align:center;
@@ -8,12 +11,283 @@
 	margin: 5px;
 	padding: 5px;
-	height: 116px;
-	width: 480px;
+	height: 700px;
+	width: 600px;
 }
 .button {
-	font-family: Verdana, Arial, Helvetica, sans-serif;
+	display: none;
+}
+
+
+.to_continue
+{
+	font-size: 9px;
+}
+
+A.minicalendar 
+{ 
+	color: #000000; 
+	font-size: 9px;
+	
+}
+
+A.bminicalendar 
+{ 
+	color: #336699; 
+	font-style: italic;
+	font-weight: bold;
+	font-size: 9px; 
+}
+
+A.minicalendargrey 
+{ 
+	color: #999999; 
+	font-size: 10px;
+	font-weight: bold;
+}
+
+A.bminicalendargrey 
+{ 
+	color: #336699; 
+	font-style: italic; 
+	font-size:10px; 
+}
+
+A.minicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #000000; 
+	font-size: 10px; 
+}
+
+A.bminicalhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #336699; 
+	font-size: 10px; 
+}
+
+A.minicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+A.bminicalgreyhol
+{ 
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #999999; 
+	font-size: 10px; 
+}
+
+
+.event-on
+{ 
+	background: #D3DCE3;
+	border: #E8F0F0 1px solid;
+}
+
+.event-off
+{ 
+	background: #E8F0F0;
+	border: #D3DCE3 1px solid;
+}
+
+.event-holiday
+{
+	font-size: 100%;
+	background: #dac0c0;
+	color:#000000;
+	vertical-align: middle;
+}
+
+.time
+{
+	background: #D3DCE3;
+	color:#000000;
+	font-size: 10px;
+	font-weight: bold;
+	vertical-align: middle;
+	width: 5.2%;
+	text-align: right;
+	padding-right: 5px;
+	line-height: 11px;
+	border: #E8F0F0 1px solid;
+}
+
+
+.planner-cell
+{
+	cursor: pointer;
+	cursor: hand;
+	border: thin solid black;
+}
+
+/* common */
+.calendar_link_print
+{
+	text-align: center;
+	font-size: 10px;
+}
+
+//Mini Calendar
+
+.calendar_minical_table
+{
+	width: 180px;
+	font-weight: bold;
+}
+
+.calendar_minical_daytable
+{
+	width: 100%;
+}
+
+.calendar_minical_dayname
+{
+	font-size: 9px;
+	text-align: right;
+}
+
+.calendar_minical_hrule
+{
+	width: 96%;
+}
+
+/* Header */
+.calendar_dropbuttons
+{
+	align: center;
+	text-align: center;
+	vertical-align: bottom;
+	font-weight: bold;
+	font-size: 8px;
+}
+
+.calendar-weekidentifier
+{
+	font-size:16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_header
+{
+	font-size: 16px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_table_header
+{
+	font-size: 13px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.calendar_dayview_todo_header
+{
+	margin: 0px; 
+	padding: 2px;
+	font-weight: bold;
+}
+
+/* week view */
+.calendar_week_identifier_table
+{
+	border: 0px solid black;
+	width: 100%;
+}
+
+.calendar_week_identifier
+{
+	font-size: 13px;
+	text-align: center;
+	font-weight: bold;
+}
+
+.calendar_weekview_daytitle
+{
+	font-weight: bold;
 	font-size: 12px;
-	color: 006699;
-	background-color: #D4D0C8;
-	border: 2px solid #666666;
-}
+	background: #D3DCE3;
+}
+
+.calendar_m_w_table
+{
+	table-layout:fixed;
+	overflow:hidden;
+	height: 95%;
+	width: 100%;
+	border: 0px #000000 solid;
+}
+
+.calendar_m_w_tablecell
+{
+	overflow:hidden;
+	vertical-align: top;
+	padding-left: 4px;
+	padding-right: 4px;
+	padding-bottom: 6px;
+}
+
+.screen_only
+{
+	display:none;
+}
+
+.calendar_m_w_table_daynumber
+{
+	font-weight: bold;
+	font-family: Arial;
+	font-size: 13px;
+	vertical-align: top;
+	background-color: #778899;
+	border: 1px solid #000000;
+	margin: 1px;
+	padding: 1px;
+}
+
+A.event_entry
+{
+	font-size:10px;
+}
+
+/* month view */
+
+.calendar_month_identifier
+{
+	font-size:18px;
+	font-weight: bold;
+}
+
+.calendar_user_identifier
+{
+	font-size:12px;
+	color: #009999;
+	font-weight: bold;
+}
+
+.calendar_week_minical_table
+{
+	width:100%;
+	border: 0px solid #000000
+}
+
+.calendar_weekinfo
+{
+	color: #000000;
+	padding-left: 2px;
+	padding-right: 2px;
+	font-size: 10px;
+	font-weight: bold;
+	font-style: italic;
+}
Index: /trunk/calendar/templates/celepar/app.css
===================================================================
--- /trunk/calendar/templates/celepar/app.css	(revision 23)
+++ /trunk/calendar/templates/celepar/app.css	(revision 24)
@@ -1,3 +1,24 @@
 /* CSS Document */
+.calendar_print_main {
+	text-align:center;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 8px;
+	color: #000066;
+	background-color: #F7F7F7;
+	border: 1px solid #CCCCCC;
+	margin: 5px;
+	padding: 5px;
+	height: 116px;
+	width: 480px;
+}
+
+.button
+{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	color: 006699;
+	background-color: #D4D0C8;
+	border: 2px solid #666666;
+}
 
 .to_continue
@@ -207,6 +228,6 @@
 {
 	table-layout:fixed;
-	overflow:auto;
-	height: 100%;
+	overflow:hidden;
+	height: 95%;
 	width: 100%;
 	border: 0px #000000 solid;
@@ -215,4 +236,5 @@
 .calendar_m_w_tablecell
 {
+	overflow:hidden;
 	vertical-align: top;
 	padding-left: 4px;
@@ -221,4 +243,15 @@
 }
 
+.screen_only
+{
+	font-size: 10px;
+}
+
+.calendar_m_w_table_daynumber
+{
+	font-weight: bold;
+	font-size: 10px;
+}
+
 A.event_entry
 {
Index: /trunk/expressoMail1_2/setup/setup.inc.php
===================================================================
--- /trunk/expressoMail1_2/setup/setup.inc.php	(revision 8)
+++ /trunk/expressoMail1_2/setup/setup.inc.php	(revision 24)
@@ -12,5 +12,5 @@
 	$setup_info['expressoMail1_2']['name']      	= 'expressoMail1_2';
 	$setup_info['expressoMail1_2']['title']     	= 'ExpressoMail 1.2';
-	$setup_info['expressoMail1_2']['version']   	= '1.2028';
+	$setup_info['expressoMail1_2']['version']   	= '1.2030';
 	$setup_info['expressoMail1_2']['app_order'] 	= 2;
 //	$setup_info['expressoMail1_2']['tables'][]    	= 'phpgw_expressoMail1_2';
Index: /trunk/expressoMail1_2/docs/change_log.txt
===================================================================
--- /trunk/expressoMail1_2/docs/change_log.txt	(revision 21)
+++ /trunk/expressoMail1_2/docs/change_log.txt	(revision 24)
@@ -62,9 +62,10 @@
 - Adicionada funcionalidade que compatibiliza mensagens encapsuladas, e com formato 7bit, serem visualizadas no ExpressoMail.
 
-09/04/2007 - [1.2030]
+10/05/2007 - [1.2030]
 - Implementado mesma funcionalidade do expandir Campo "Para" para o campo "CC", abrir uma mensagem. O objetivo é evitar travamento
 do navegador quando existem muito destinatários a serem expandidos com o plugin do Contact Center.
 - Corrigido problema de mensagens que têm nome de arquivos nos atributos "parameters" e "dparameters" de sua estrutura.
-
-27/04/2007 - [1.2030]
 - Implementado ocultação de usuários e grupos no expressoMail e na Calendar.
+- Corrigido imagem down.button.png que aparecia com fundo branco no IE;
+- Alterado nome do link "Mais opções" para "Opções", no menu de mensagem aberta;
+- Colocado link "Imprimir" entre os links "Opções" e "Encaminhar", no menu de mensagem aberta;
Index: /trunk/expressoMail1_2/js/draw_api.js
===================================================================
--- /trunk/expressoMail1_2/js/draw_api.js	(revision 13)
+++ /trunk/expressoMail1_2/js/draw_api.js	(revision 24)
@@ -746,9 +746,9 @@
 	{
 	var options = document.createElement("TD");
-	options.width = "1%";
+	options.width = "100%";
 	options.setAttribute("noWrap","true");
 	var option_hide_more = document.createElement("SPAN");
 	option_hide_more.className = 'message_options';
-	option_hide_more.style.textDecoration = 'underline'
+	options.align = 'right';
 	option_hide_more.value = 'more_options';
 	option_hide_more.id = 'option_hide_more_'+ID;
@@ -758,5 +758,5 @@
 		var _offset = 35;
 		if (this.value == 'more_options'){
-			this.innerHTML = get_lang('Hide options');
+			this.innerHTML = "<b><u>"+get_lang('Options')+"</u></b>";
 			this.value = 'hide_options';
 			Element("div_message_scroll_"+ID).style.height = (_height - _offset)+"px";
@@ -766,5 +766,5 @@
 		}
 		else{
-			this.innerHTML = get_lang('More options');
+			this.innerHTML = get_lang('Options');
 			this.value = 'more_options';
 			Element("div_message_scroll_"+ID).style.height = (_height + _offset)+"px";
@@ -773,16 +773,24 @@
 		}
 	};
-	option_hide_more.innerHTML = get_lang('More options');
+	option_hide_more.innerHTML = get_lang('Options');
 	options.appendChild(option_hide_more);
 	
+	var space0 = document.createElement("SPAN");
+	space0.innerHTML = '&nbsp;';
 	var space1 = document.createElement("SPAN");
-	space1.innerHTML = ' | ';
+	space1.innerHTML = '&nbsp;';
 	var space2 = document.createElement("SPAN");
-	space2.innerHTML = ' | ';
+	space2.innerHTML = '&nbsp;';
 	var space3 = document.createElement("SPAN");
-	space3.innerHTML = ' | ';
+	space3.innerHTML = '&nbsp;';
 	var space4 = document.createElement("SPAN");
-	space4.innerHTML = ' | ';
-
+	space4.innerHTML = '&nbsp;';
+
+	var option_print = document.createElement("SPAN");
+	option_print.className = 'message_options';
+	option_print.onclick = function(){print_msg(info_msg.msg_folder,info_msg.msg_number,ID);};
+	option_print.innerHTML = get_lang('Print');
+	options.appendChild(space0);
+	options.appendChild(option_print);
 	var option_forward = document.createElement("SPAN");
 	option_forward.className = 'message_options';
@@ -826,5 +834,4 @@
 	
 	var option_move							= '<span class="message_options" onclick=wfolders.makeWindow("'+ID+'","move_to");>'+get_lang("Move")+'</span> | ';
-	var option_print						= '<span class="message_options" onclick=print_msg("'+info_msg.msg_folder+'","'+info_msg.msg_number+'","'+ID+'");>'+get_lang("Print")+'</span> | ';
 	var option_reply_to_all					= '<span class="message_options" onclick=new_message("reply_to_all_with_history","'+ID+'");>'+get_lang("Reply to all")+'</span> | ';
 	var option_reply_without_history		= '<span class="message_options" onclick=new_message("reply_without_history","'+ID+'");>'+get_lang("Reply without history")+'</span> | ';
@@ -832,5 +839,5 @@
 	var option_source_msg					= '<span class="message_options" onclick=source_msg("'+ID+'","'+url_encode(info_msg.msg_folder)+'");>'+get_lang("Font Message")+'</span>';	
 
-	div_other_options.innerHTML = option_mark_as + option_mark_as_unseen + option_mark_as_important + option_mark_as_normal + option_move + option_print + option_reply_to_all + option_reply_without_history + option_reply_to_all_without_history + option_source_msg;
+	div_other_options.innerHTML = option_mark_as + option_mark_as_unseen + option_mark_as_important + option_mark_as_normal + option_move + option_reply_to_all + option_reply_without_history + option_reply_to_all_without_history + option_source_msg;
 	td_other_options.appendChild(div_other_options);
 	//td_other_options.innerHTML = option_print + option_reply_to_all + option_source_msg;
