Index: trunk/instant_messenger/bkp/instant_messenger_64/setup/phpgw_pt-br.lang
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/setup/phpgw_pt-br.lang	(revision 260)
+++ 	(revision )
@@ -1,78 +1,0 @@
-Add	instant_messenger	pt-br	Adicionar
-Add Contatct	instant_messenger	pt-br	Adicionar Contato
-add contact	instant_messenger	pt-br	Adicionar Contato
-add new contact	instant_messenger	pt-br	Adicionar Novo Contato
-add user	instant_messenger	pt-br	Adicionar Usuário
-Added information!	instant_messenger	pt-br	Informações Adicionadas!
-Authorization	instant_messenger	pt-br	Autorização
-away	instant_messenger	pt-br	Ausente
-Birthday	instant_messenger	pt-br	Aniversário
-busy	instant_messenger	pt-br	Ocupado
-change your Status	instant_messenger	pt-br	Mude seu estado
-Choice Contact	instant_messenger	pt-br	Escolha Contato
-Close	instant_messenger	pt-br	Fechar
-Close this menu	instant_messenger	pt-br	Fechar Menu
-Color	instant_messenger	pt-br	Cor
-Contact	instant_messenger	pt-br	Contato
-Contact Add	instant_messenger	pt-br	Contato Adicionado
-Custom message...	instant_messenger	pt-br	Mensagem ...
-Delete	instant_messenger	pt-br	Remover
-Description	instant_messenger	pt-br	Descrição
-Error in the message!	instant_messenger	pt-br	Erro na mensagem!
-E-mail	instant_messenger	pt-br	E-mail
-Font	instant_messenger	pt-br	Fonte
-Full Name	instant_messenger	pt-br	Nome Completo
-Group	instant_messenger	pt-br	Grupo
-instant_messenger	common	pt-br	Mensageiro Instantâneo
-instant_messenger_t	instant_messenger	pt-br	Mensageiro Instantâneo
-Information	instant_messenger	pt-br	Informações Adicionais
-Information User	instant_messenger	pt-br	Informações Pessoais
-Jid Contact	instant_messenger	pt-br	Email Expresso
-List of Contacts	instant_messenger	pt-br	Lista de Contatos
-Loading...	instant_messenger	pt-br	Carregando...
-Maximize/Restore	instant_messenger	pt-br	Maximizar/Restaurar Janela
-Minimize	instant_messenger	pt-br	Minimizar Janela
-Name	instant_messenger	pt-br	Nome
-Name full	instant_messenger	pt-br	Nome Completo
-Name Organization	instant_messenger	pt-br	Nome Organização
-New Message!	instant_messenger	pt-br	Nova Mensagem!
-Nick	instant_messenger	pt-br	Apelido
-Nickname	instant_messenger	pt-br	Apelido
-Not Auth	instant_messenger	pt-br	Não Autorizado
-Orgname	instant_messenger	pt-br	Organização
-Orgunit	instant_messenger	pt-br	Setor
-online	instant_messenger	pt-br	Online
-offline	instant_messenger	pt-br	Offline
-Options	instant_messenger	pt-br	Opções
-Photo	instant_messenger	pt-br	Foto
-Problems in its register \n	instant_messenger	pt-br	Problemas em seu registro
-preferences	instant_messenger	pt-br	Preferências
-Quick Contacts	instant_messenger	pt-br	Contatos Rápidos
-Re-connect Expresso Messenger ?	instant_messenger	pt-br	Reconectar Expresso Messenger ?
-Remove	instant_messenger	pt-br	Remover
-Remove Contact	instant_messenger	pt-br	Remover Contato
-Resize	instant_messenger	pt-br	Redimensionar
-Role	instant_messenger	pt-br	Função
-save	instant_messenger	pt-br	Salvar
-Search	instant_messenger	pt-br	Pesquisar
-Search, add, or invite	instant_messenger	pt-br	Procure, adicione ou convide
-See Info	instant_messenger	pt-br	Ver Info
-Send	instant_messenger	pt-br	Enviar
-Send File	instant_messenger	pt-br	Enviar Arquivo
-Size	instant_messenger	pt-br	Tamanho
-speak	instant_messenger	pt-br	fala
-Successfully effected register!	instant_messenger	pt-br	Registro efetuado com sucesso!
-Status	instant_messenger	pt-br	Status
-Status of the Transference	instant_messenger	pt-br	Status da Transferência
-Style	instant_messenger	pt-br	Estilo
-Telephone	instant_messenger	pt-br	Telefone
-to see preferences	instant_messenger	pt-br	Ver Preferências
-To define user information	instant_messenger	pt-br	Definir informações do usuário
-Update	instant_messenger	pt-br	Atualizar
-Vcard	instant_messenger	pt-br	Vcard
-You desire to register in service IM?	instant_messenger	pt-br	Você deseja registrar no serviço IM?
-your status	instant_messenger	pt-br	Seu status
-Wait a moment !!	pt-br	instant_messenger	Aguarde um momento !!
-waiting	instant_messenger	pt-br	Aguardando
-without_group	instant_messenger	pt-br	Sem Grupo
-Workgroup	instant_messenger	pt-br	Setor
Index: trunk/instant_messenger/bkp/instant_messenger_64/setup/tables_current.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/setup/tables_current.inc.php	(revision 260)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<?php
-	/***************************************************************************\
-	* Mensageiro Instantâneo												    *
-	* Alexandre Correia / Rodrigo Souza										    *
-	* ------------------------------------------------------------------------- *
-	*  This program is free software; you can redistribute it and/or modify it  *
-	*  under the terms of the GNU General Public License as published by the    *
-	*  Free Software Foundation; either version 2 of the License, or (at your   *
-	*  option) any later version.                                               *
-	\***************************************************************************/
-  
-	$phpgw_baseline = array(
-		'phpgw_im_auth_user' => array(
-			'fd' => array(
-				'im_from' => array( 'type' => 'varchar', 'precision' => 150, 'nullable' => false ),
-				'im_to' => array( 'type' => 'varchar', 'precision' => 150, 'nullable' => false )
-			),
-			'pk' => array(),
-			'fk' => array(),
-			'ix' => array(),
-			'uc' => array()
-		),
-	);
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/setup/setup.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/setup/setup.inc.php	(revision 260)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?php
-	/****************************************************\
-	 * Im - Instant Messenger							*
-	 * Alexandre Correia								*
-	 * Rodrigo Souza									*
-	\****************************************************/
-	
-	$setup_info['instant_messenger']['name']      	= 'instant_messenger';
-	$setup_info['instant_messenger']['title']     	= 'Mensageiro Instantâneo';
-	$setup_info['instant_messenger']['version']   	= '0.2';
-	$setup_info['instant_messenger']['app_order'] 	= 9;
-	$setup_info['instant_messenger']['enable']    	= 1;
-	
-	/* Conf Table */
-	$setup_info['instant_messenger']['tables'][] = 'phpgw_im_auth_user';
-
-	$setup_info['instant_messenger']['author'] 			= '<b>Coordenadores do Projeto</b> : <br> - Joao Alfredo Knopik Junior (jakjr@celepar.pr.gov.br)<br> - Nilton Emilio Buhrer Neto (niltonneto@celepar.pr.gov.br)<br> <b>Desenvolvedores</b> <br> - Alexandre Correia (alexandrecorreia@celepar.pr.gov.br)<br>- Rodrigo Souza Santos (rodsouza@celepar.pr.gov.br)';
-	$setup_info['instant_messenger']['maintainer']	 	=  'Os mesmos';
-	$setup_info['instant_messenger']['maintainer_email']= '';
-
-	$setup_info['instant_messenger']['license']  	= 'GPL';
-	$setup_info['instant_messenger']['description'] = 'Módulo de IM com protocolo Jabber';
-
-	/* The hooks this app includes, needed for hooks registration */
-	$setup_info['instant_messenger']['hooks'][] = 'admin';
-		
-	/* Dependencies for this app to work */
-	$setup_info['instant_messenger']['depends'][] = array(
-		'appname' => 'phpgwapi',
-		'versions' => Array('0.9.14','0.9.15','1.0.0')
-	);
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/vcard_contacts.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/vcard_contacts.xsl	(revision 260)
+++ 	(revision )
@@ -1,29 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/retorno/vcard">
-   <html>
-   <head>
-   </head>
-   <body>
-      <div id="_im_vcard_contacts_childs">
-         <xsl:apply-templates select="div" />
-      </div>
-   </body>
-   </html>
-</xsl:template>
-
-<xsl:template match="div">
-   <div id="{@id}">
-      <FN><xsl:value-of select="FN" /></FN>
-      <NICKNAME><xsl:value-of select="NICKNAME" /></NICKNAME>      
-      <ROLE><xsl:value-of select="ROLE" /></ROLE>
-      <ORGNAME><xsl:value-of select="ORG/ORGNAME" /></ORGNAME>
-      <ORGUNIT><xsl:value-of select="ORG/ORGUNIT" /></ORGUNIT>
-      <BDAY><xsl:value-of select="BDAY" /></BDAY>
-      <DESC><xsl:value-of select="DESC" /></DESC>
-   </div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/contacts.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/contacts.xsl	(revision 260)
+++ 	(revision )
@@ -1,31 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/retorno/contacts">
-   <html>
-   <head>
-   </head>
-   <body>
-      <div id="all_groups">
-         <xsl:apply-templates select="group" />
-      </div>
-   </body>
-   </html>
-</xsl:template>
-
-<xsl:template match="group">
-   <div style="margin-left:16px;overflow:hidden;" id="{@name}">
-      <b><xsl:value-of select="@name" /></b>
-      <br />
-      <xsl:apply-templates select="item" />
-   </div>
-</xsl:template>
-
-<xsl:template match="item">
-   <div style="cursor:pointer;margin-left:8px;width:2000px" onmouseover="this.className='contato_hover'" onmouseout="this.className=''" onmousedown="javascript:IM.action_button(event, '{@jid}');" id="{@jid}">
-      <xsl:value-of select="@name" />
-   </div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/user_not_auth.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/user_not_auth.xsl	(revision 260)
+++ 	(revision )
@@ -1,41 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/jids">
-   <html>
-   <head>
-   </head>
-   <body>
-		<div style="margin-left:5px;margin-top:20px">
-			<b>
-			O(s) contato(s) abaixo aguarda(m) sua autorização.
-		    Para adicionar este(s) novo(s) contato(s) ou remover
-		    o(s) clique nas opções "Sim / Não". Para ver detalhes
-		    sobre o novo contato clique em "?".
-			<p />
-			Contato(s) :
-			</b>
-			<p />
-			<xsl:apply-templates select="item" />
-		</div>				
-   </body>
-   </html>
-</xsl:template>
-
-<xsl:template match="item">
-	 <div id="{@id}">
-        <span alt="Contato">
-        	<xsl:value-of select="@jid" />
-        </span>
-	    <span style="margin-left:20px" >
-	   		<a href="javascript:void(0);" onclick="IM_Preferences.Info_Contact('{@jid}');"> ? </a>
-	   	</span>
-		<span style="margin-left:10px">
-			<a href="javascript:void(0);" onclick="IM_Preferences.AcceptRequestUser('{@jid}');"> Sim </a>/<a href="javascript:void(0)" onclick="IM_Preferences.DenyRequestUser('{@jid}');" > Não </a>
-			<span id="_span_not_{@jid}"></span>
-		</span>
-	</div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/preferences.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/preferences.xsl	(revision 260)
+++ 	(revision )
@@ -1,32 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/preferences">
-   <html>
-   <head>
-   </head>
-   <body>
-	  <div id="im_preferences" style="margin-left:5px;margin-top:5px">
-		  <fieldset><legend> Opções :</legend>
-			  <input id="ch_offline" type="checkbox" /> Exibir amigos desconectados
-		  </fieldset>
-		  <br />
-		  <fieldset><legend> Ausente : </legend>	
-  			  Ficar ausente depois de <input id="in_time" type="input" size="2" maxlength="2"/> minutos :
-		  </fieldset>		
-		  <br />	
-  		  <fieldset>
-  		  	  <legend> Ativar aviso de mensagens recebidas :</legend>
-	    	  <input id="rd_nm" type="radio" name="rd_aviso" /> Normal <br />
-			  <input id="rd_ch" type="radio" name="rd_aviso" /> Treme Tela
-  		  </fieldset>
-		  	<br/>
-		  	<input type="button" value="Salvar" onclick="javascript:IM_Preferences.SetYourPreferences();" />
-			<input type="button" value="Fechar" onclick="javascript:im_win.windowClose('divYourPreferences_im');"/>
-	  </div>
-   </body>
-   </html>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/del_user.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/del_user.xsl	(revision 260)
+++ 	(revision )
@@ -1,23 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/deluser/body">
-	<html>
-		<head>
-		</head>
-		<body>	
-			<div style="margin-left:20px;margin-top:20px">
-				<span><b><xsl:value-of select="@lang1"/> .: </b></span> 
-				<div style="margin-top:3px">
-					<select id="sel_contact"></select>
-					<span style="margin-left:7px">
-						<input type="button" value="{@lang2}" onclick="javascript:IM_Preferences.RemoveContact()" />
-						<input type="button" value="{@lang3}" onclick="javascript:im_win.windowClose('divDelUser_im');"/>														
-					</span>
-				</div>
-			</div>
-		</body>
-	</html>
-</xsl:template>
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/information_user.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/information_user.xsl	(revision 260)
+++ 	(revision )
@@ -1,102 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/info_user">
-	<html>
-		<head>
-		</head>
-		<body>
-			<table border="0" cellpadding="1" cellspacing="2" width="90%" style="margin-top:10px">
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/FN"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/fn">
-						<td><input id="FN" type="text" size="40" maxlength="40" value="{vcard/fn}"/></td>			          
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="FN" type="text" size="40" maxlength="40" value="{vcard/FN}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/NICKNAME"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/nickname">
-						<td><input id="NICKNAME" type="text" size="20" maxlength="20" value="{vcard/nickname}" /></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="NICKNAME" type="text" size="20" maxlength="20" value="{vcard/NICKNAME}" /></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/ORGNAME"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/orgname">
-						<td><input id="ORGNAME" type="text" size="17" maxlength="17" value="{vcard/orgname}"/></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="ORGNAME" type="text" size="17" maxlength="17" value="{vcard/ORGNAME}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/ORGUNIT"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/orgunit">
-						<td><input id="ORGUNIT" type="text" size="10" maxlength="10" value="{vcard/orgunit}"/></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="ORGUNIT" type="text" size="10" maxlength="10" value="{vcard/ORGUNIT}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/ROLE"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/role">
-						<td><input id="ROLE" type="text" size="25" maxlength="25" value="{vcard/role}"/></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="ROLE" type="text" size="25" maxlength="25" value="{vcard/ROLE}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/BDAY"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/bday">
-						<td><input id="BDAY" type="text" size="10" maxlength="10" value="{vcard/bday}"/></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="BDAY" type="text" size="10" maxlength="10" value="{vcard/BDAY}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-				<tr>
-					<td width="30%" align="right"><xsl:value-of select="getlang/DESC"/> .: </td>
-			     	<xsl:choose>
-			          <xsl:when test="vcard/desc">
-						<td><input id="DESC" type="text" size="40" maxlength="40" value="{vcard/desc}"/></td>
-					  </xsl:when>
-			          <xsl:otherwise>
-						<td><input id="DESC" type="text" size="40" maxlength="40" value="{vcard/DESC}"/></td>
-			          </xsl:otherwise>
-			        </xsl:choose>
-				</tr>
-			</table>
-
-			<table border="0" cellpading="1" cellspacing="2" width="100%">
-				<tr>
-					<td>
-						<input type="button" value="{getlang/SAVE}" onclick="javascript:IM_Preferences.vCardAdd();" />
-						<input type="button" value="{getlang/CLOSE}" onclick="javascript:im_win.windowClose('divInfoUser_im');"/>									
-					</td>
-				</tr>
-			</table>
-		</body>
-	</html>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/message.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/message.xsl	(revision 260)
+++ 	(revision )
@@ -1,15 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/">
-   <html>
-   <head>
-   </head>
-   <body>
-      <xsl:copy-of select="." />
-   </body>
-   </html>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/menu_preferences.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/menu_preferences.xsl	(revision 260)
+++ 	(revision )
@@ -1,18 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/">
- <html>
-  <body>
-   <dl id="dl_im_menu_preferences">
-   <xsl:for-each select="menu/item">
-      <dt><a href="javascript:void(0);" onclick="javascript:{@function}">
-      	  <xsl:value-of select="@lang"/></a>
-      </dt>
-   </xsl:for-each>
-   </dl>
- </body>
- </html>
-</xsl:template>
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/add_user.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/add_user.xsl	(revision 260)
+++ 	(revision )
@@ -1,52 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/adduser">
- <html>
-  <head>
-  </head>
-  <body>
-	<div style="margin-left:5px;margin-top:5px">
-		<xsl:apply-templates select="top" />
-	</div>
-	<table border="0" cellpadding="1" cellspacing="2" style="margin-left:5px;margin-top:5px">
-	     <xsl:apply-templates select="bottom" />
-   	</table>
- </body>
- </html>
-</xsl:template>
-
-<xsl:template match="top">
-	<b><xsl:value-of select="@lang1"/> .: </b>
-	<select id="ImSelOrg" name="ImSelOrg" onchange="IM_Preferences.SearchContacts();"></select>
-	<span id="_span_load_im" style="background-color:#cc4444;color:white;display:none;position:absolute;right:0px;top:0px">Carregando .....</span>	
-	<select size="10" id="ImSelAddContact" name="ImSelAddContact" class="add_user" onclick="IM_Preferences.preenche();"></select>
-</xsl:template>
-
-<xsl:template match="bottom">
-	<tr>
-		<td><b><xsl:value-of select="@lang1"/>.:</b></td>
-		<td><input id="text0" type="text" size="40" maxlength="40" readonly="true" /></td>		
-	</tr>
-	<tr>
-		<td><b><xsl:value-of select="@lang2"/>.:</b></td>
-		<td><input id="text1" type="text" size="20" maxlength="20" /></td>		
-	</tr>
-	<tr>
-		<td><b><xsl:value-of select="@lang3"/>.:</b></td>
-		<td><input id="text2" type="text" size="20" maxlength="20" /></td>		
-	</tr>
-	<tr>
-		<td><input id="text3" type="hidden" size="30" maxlength="30" /></td>
-	</tr>							
-	<tr>
-		<td colspan="2">
-			<input type="button" value="{@lang4}" onclick="javascript:IM_Preferences.Add_user('divAddUser_im');" />
-			<input type="button" value="Fechar" onclick="javascript:im_win.windowClose('divAddUser_im');"/>
-			<span id="im_status_add" style="color:#f00;font-weight:bold;margin-left:10px;"></span>			
-		</td>
-	</tr>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/info_contact.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/info_contact.xsl	(revision 260)
+++ 	(revision )
@@ -1,61 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="no"/>
-
-<xsl:template match="/info_contact">
-	<html>
-		<head>
-		</head>
-		<body>
-			<table border="0" cellpading="1" cellspacing="2" width="90%" style="margin-top:10px">
-				<tr>
-					<td width="30%" align="right">
-						<xsl:value-of select="getlang/FN" /> :
-					</td>
-					<td width="70%" align="left">
-						<xsl:value-of select="vcard/FN" />
-						<xsl:value-of select="vcard/fn" />						
-					</td>
-				</tr>
-				<tr>
-					<td width="30%" align="right">
-						<xsl:value-of select="getlang/NICKNAME" /> :
-					</td>
-					<td width="70%" align="left">
-						<xsl:value-of select="vcard/NICKNAME" />
-						<xsl:value-of select="vcard/nickname" />						
-					</td>
-				</tr>
-				<tr>
-					<td width="30%" align="right">
-						<xsl:value-of select="getlang/ORGUNIT" /> :
-					</td>
-					<td width="70%" align="left">
-						<xsl:value-of select="vcard/ORGUNIT" />
-						<xsl:value-of select="vcard/orgunit" />						
-					</td>
-				</tr>
-				<tr>
-					<td width="30%" align="right">
-						<xsl:value-of select="getlang/ROLE" /> :
-					</td>
-					<td width="70%" align="left">
-						<xsl:value-of select="vcard/ROLE" />
-						<xsl:value-of select="vcard/role" />						
-					</td>
-				</tr>
-				<tr>
-					<td width="30%" align="right">
-						<xsl:value-of select="getlang/BDAY" /> :
-					</td>
-					<td width="70%" align="left">
-						<xsl:value-of select="vcard/BDAY" />
-						<xsl:value-of select="vcard/bday" />
-					</td>
-				</tr>
-			</table>
-		</body>
-	</html>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/info_contact_ldap.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/info_contact_ldap.xsl	(revision 260)
+++ 	(revision )
@@ -1,40 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/info_user">
- <html>
-  <head>
-  </head>
-  <body>
-	<table style="background-color:#cbdae4;width:100%;border:1px solid #809aa9">
-		<tr>
-		   <td style="vertical-align:top;width:80%">
-				<xsl:apply-templates select="item" />
-		   </td>
-		   <td style="vertical-align:top">
-		   		<span id="im_span_avatar"></span>
-	   	   </td>
-   	    </tr>
-	</table>	
- </body>
- </html>
-</xsl:template>
-
-<xsl:template match="item">
-	<div style="padding-bottom"> 
-	   <span>
-	   		<b><label><xsl:value-of select='@lang_name' /></label></b>
-	   		<br/><xsl:value-of select='@name' />
-	   </span>
-	   		<br/>
-	   		<br/>
-	   <span>
-	   		<b><label><xsl:value-of select='@lang_email' /></label></b>
-	   		<br/><xsl:value-of select='@email' />
-	   </span>
-	   		<br/>
-   </div>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/upd_user.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/upd_user.xsl	(revision 260)
+++ 	(revision )
@@ -1,40 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/updUser">
- <html>
-  <head>
-  </head>
-  <body>
-		<table border='0' cellpadding='1' cellspacing='2' align='center' width='90%'>
-			<xsl:apply-templates select="body" />
-		</table>
- </body>
- </html>
-</xsl:template>
-
-<xsl:template match="body">
-		<tr>
-			<td>
-				<input id="text0" type="hidden" size="40" maxlength="40" />
-			</td>
-		</tr>
-		<tr>
-			<td><b>Contato .:</b></td>
-			<td><span id="span0"></span></td>
-		</tr>
-		<tr>
-			<td><b><xsl:value-of select="@lang1" />.:</b></td>
-			<td><input id="text1" type="text" size="20" maxlength="20" /></td>
-		</tr>
-		<tr>
-			<td><b><xsl:value-of select="@lang2" />.:</b></td>
-			<td><input id="text2" type="text" size="20" maxlength="20" /></td>
-		</tr>
-		<tr>
-			<td colspan="2"><input type="button" value="{@lang3}" onclick="IM_Preferences.Add_user('divUpdateUser_im')" /></td>
-		</tr>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/xsl/window.xsl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/xsl/window.xsl	(revision 260)
+++ 	(revision )
@@ -1,57 +1,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output method="html" omit-xml-declaration="yes"/>
-
-<xsl:template match="/window">
-   <html>
-   <head>
-   </head>
-   <body>
-      <div id="{@id}_im_window_master" class="master" style="top:{@top};left:{@left};height:{(@height + 48)};width:{(@width + 12)};{@style};">
-        <div id="{@id}_im_window" class="pai" style="height:{(@height + 40)};">
-         	<div id="{@id}_im_window_icon" class="im_window_icon" />
-            <div class="tit"><xsl:value-of select="@title" /></div>
-            <xsl:apply-templates select="/" mode='buttons' />
-            <div class="filho" id="{@id}_im_window_body_inner" style="width:{@width};height:{@height};" />
-         </div>      
-      </div>
-
-      <div class="im-windowfantom-des" id="{@id}_im_window_fantom" />
-      <div class="im-windowfantom-des" id="{@id}_im_window_movable" />
-      <div class="im-window-resizehandle" id="{@id}_im_window_resize" style="visibility:hidden;" />
-   </body>
-   </html>
-</xsl:template>
-
-<xsl:template match="/window" mode="buttons">
-   <xsl:if test='@close and @close="true"'>
-      <div class="im-window-button im-window-closebutton" style="z-index:6000;right:4px" onclick="im_win.windowClose(this.parentNode.id);" />
-   </xsl:if>
-
-   <xsl:if test='@maximize and @maximize="true"'>
-      <xsl:choose>
-         <xsl:when test='@close and @close="true"'>
-            <div class="im-window-button im-window-maximizerestorebutton" style="z-index:6000;right:20px" onclick="im_win.windowMaximizeRestore(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:otherwise>
-            <div class="im-window-button im-window-maximizerestorebutton" style="z-index:6000;right:4px" onclick="im_win.windowMaximizeRestore(this.parentNode.id);" />
-         </xsl:otherwise>
-      </xsl:choose>
-   </xsl:if>
-
-   <xsl:if test='@minimize and @minimize="true"'>
-      <xsl:choose>
-         <xsl:when test='@close and @close="true" and @maximize and @maximize="true"'>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:36px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:when test='(@close and @close="true" or @maximize and @maximize="true") and not (@close and @close="true" and @maximize and @maximize="true")'>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:20px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:when>
-         <xsl:otherwise>
-            <div class="im-window-button im-window-minimizebutton" style="z-index:6000;right:4px" onclick="im_win.windowMinimize(this.parentNode.id);" />
-         </xsl:otherwise>
-      </xsl:choose>
-   </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: trunk/instant_messenger/bkp/instant_messenger_64/docs/change_log.txt
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/docs/change_log.txt	(revision 260)
+++ 	(revision )
@@ -1,23 +1,0 @@
-Esse arquivo descreve todas as correções, alterações e novas implementações do 
-módulo instant_messenger, e a partir da versão 27/04/2007 [0.001]
-Alexandre Luiz Correia
-Rodrigo Souza dos Santos.
-
-27/04/2007 [0.001]
-- Vcard, corrigido para a visualização de caracteres e acentos. 
-
-14/08/2007
-- Criado script IMManager.php, para conexão com o servidor Jabberd.
-- Mudança de status, offline, online, ausente,...etc, conforme documentação do xmpp
-- Novo layout para a troca de mensagens.
-
-16/08/2007
-- Permanência de estado ( online, offline, ausente, invisível), quando é feito o refresh
-de página no expresso.
-
-21/08/2007
-- Corrigido a mudança de status automática
-- Layout do adicionar contato não gera mais scrolls
-
-23/08/2007
-- Arrumado o tipo de cursor no IE na mudança de Status
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/Socket.abstract.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/Socket.abstract.php	(revision 260)
+++ 	(revision )
@@ -1,85 +1,0 @@
-<?php
-/*
-+-------------------------------------------------------------------------+
-|                                                                         |
-| @FILE_NAME:   Socket.abstract.php                                       |
-| @CLASS_NAME:  (abstract) Jabber                                         |
-|                                                                         |
-| @DATE:        Wed May,16 2007 07:58:59                                  |
-| @LAST_CHANGE: Wed May,16 2007 08:03:28                                  |
-|                                                                         |
-| @AUTHOR:      [NUTS] Rodrigo Souza - rodsouza@celepar.pr.gov.br         |
-|                                                                         |
-| @BRIEF:       Abstract class for connect with a socket                  |
-|                                                                         |
-+-------------------------------------------------------------------------+
-*/
-
-abstract class Socket
-{
-	protected final function open( $pSocket = false, $pTimeOut = 1, $pBlockingMode = 0 )
-	{
-      if ( !$pSocket )
-         return false;
-
-		$sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
-
-      $pSocket = substr($pSocket, 6);
-      if ( $socket = socket_connect($sock, substr($pSocket, 0, strpos($pSocket, ":")), substr($pSocket, strpos($pSocket, ":") + 1)) )
-      {
-         socket_set_block($sock);
-      }
-
-      return $sock;
-	}
-
-   protected final function blocking($pSocket = false, $pBlockingMode = 1)
-   {
-      if ( !$pSocket || !is_resource($pSocket) )
-         return false;
-
-      if ( $pBlockingMode == 1 )
-      	socket_set_block($pSocket);
-		else
-			socket_set_nonblock($pSocket);
-   }
-
-	protected function read( $pSocket = false, $pLength = 4096 )
-	{
-      ini_set( 'track_errors', '1' );
-
-      if ( !$pSocket || !is_resource($pSocket) )
-         return false;
-
-      $return = socket_read($pSocket, $pLength);
-
-      if ( $php_errormsg )
-         return false;
-
-      return $return;
-	}
-
-	protected function write( $pSocket = false, $pData = false )
-	{
-      ini_set( 'track_errors', '1' );
-      
-      if ( (!$pSocket || !is_resource($pSocket)) || !$pData )
-         return false;
-
-		$return = @socket_write($pSocket, $pData);
-      
-      if ( $php_errormsg )
-         return false;
-
-      return $return;
-	}
-
-	protected final function close( $pSocket = false )
-	{
-      if ( !$pSocket || !is_resource($pSocket) )
-         return false;
-
-		return socket_close($pSocket);
-	}
-}
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/im_acl.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/im_acl.inc.php	(revision 260)
+++ 	(revision )
@@ -1,77 +1,0 @@
-<?php
-   for ( $i = 0; $i < sizeof($GLOBALS['phpgw_info']['user']['acl']); $i++ )
-   {
-      if ( $GLOBALS['phpgw_info']['user']['acl'][$i]['appname'] == 'instant_messenger')
-      {
-			require_once("im_sessions.inc.php");
-         
-         $webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
-         $wz_dragdrop = $webserver_url."/phpgwapi/js/wz_dragdrop/";
-         $webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
-
-         if ( strrpos($webserver_url, '/') === false || strrpos($webserver_url, '/') != (strlen($webserver_url)-1) )
-            $webserver_url .= '/';
-
-         $webserver_url = $webserver_url . 'instant_messenger/';
-
-         require_once("IMConfigure.php");
-
-         $_transport = TRANSPORT_NON_SECURITY;
-         $_port = PORT_NON_SECURITY;
-
-			$SERVER = "127.0.0.1";
-
-			$fp  = "";
-			@$fp = stream_socket_client($_transport . "://" . $SERVER . ":" . $_port, $errno, $errstr, 10);
-
-         if ( $fp )
-         {
-
-            fwrite($fp, "GET /" . CONNECT . ";" . session_id() . " HTTP/1.1\r\nHost: " . $SERVER . ":" . $_port . "\r\nAccept: */*\r\n\r\n");
-
-            $js = array(
-                        $webserver_url . 'js/XMLTools.js',
-                        $webserver_url . 'js/im_functions.js',
-                        $webserver_url . 'js/im_fcommon.js',
-                        $webserver_url . 'js/im_var_globals.js',
-                        $webserver_url . 'js/im_images.js',
-                        $webserver_url . 'js/im_smiles.js',
-                        $webserver_url . 'js/im_templates.js',
-                        $webserver_url . 'js/im_win.js',
-                        $webserver_url . 'js/im_menu_action.js',
-                        $webserver_url . 'js/im_conf_font.js',
-                        $webserver_url . 'js/im_preferences.js',
-                        $webserver_url . 'js/im_init.js',
-						      $webserver_url . 'js/im_subscription.js',
-                       );
-
-            require_once('load_lang.php');
-
-         	print '
-               <link rel="stylesheet" href="' . $webserver_url . 'templates/default/css.css" />
-               <link rel="stylesheet" href="' . $webserver_url . 'templates/default/messenger.css" />
-               <script>
-                  var im_path="' . $webserver_url . '";
-                  var ini_wzdd = false;
-                  if ( !window.dd )
-                  {
-                     ini_wzdd = true;
-                     document.write(\'\<script src="' . $wz_dragdrop . 'wz_dragdrop.js"\>\<\/script\>\');
-                     var im_path="' . $webserver_url . '";
-                  }
-               </script>';
-         
-          print '
-               <script>
-                  if ( ini_wzdd )
-                     SET_DHTML("backFantom"+NO_DRAG);
-               </script>';
-
-          foreach ( $js as $key => $val )
-             print '<script src="' . $val . '?' . filemtime($_SERVER['DOCUMENT_ROOT'] . '/' . $val) . '"></script>';
-          
-         }
-         break;
-      }
-   }
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/Jabberd2.abstract.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/Jabberd2.abstract.php	(revision 260)
+++ 	(revision )
@@ -1,117 +1,0 @@
-<?php
-
-ini_set('include_path', $_SERVER['DOCUMENT_ROOT'] . '/instant_messenger/inc/');
-
-require_once 'Jabber.abstract.php';
-
-class Jabberd2 extends Jabber
-{
-   final function connect($pUser = false, $pPassword = false)
-   {
-      try
-      {
-         if ( parent::connect($pUser, $pPassword) )
-            if ( $this->presence() )
-               return true;
-
-         return false;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-   function disconnect()
-   {
-      $this->_disconnect();
-   }
-
-   final function readSocket()
-   {
-      return $this->read();
-   }
-
-   final function writeSocket($pData)
-   {
-      return $this->write($pData);
-   }
-	
-	final function setPresence($pPresence)
-	{
-		$type = ( isset($pPresence['type']) ) ? $pPresence['type'] : NULL;
-		$to = ( isset($pPresence['to']) ) ? $pPresence['to'] : NULL;
-		$show = ( isset($pPresence['show']) ) ? $pPresence['show'] : NULL;
-		$status = ( isset($pPresence['status']) ) ? $pPresence['status'] : NULL;
-		$priority = ( isset($pPresence['priority']) ) ? $pPresence['priority'] : NULL;
-		
-		$this->presence($type, $to, $show, $status, $priority);
-	}
-	/*
-	 * Vcard
-	 */
-
-   final function getVcard($pVcard)
-   {
-		$this->iq('get', $pVcard, $pVcard, NULL, "vcard-temp", "<vCard xmlns='vcard-temp'/>");
-   }
-
-   final function newVcard($NewVcard)
-   {
-   	$id = $_SESSION['phpgw_info']['instant_messenger']['user'];
-   	$this->iq('set', $id, NULL, NULL, "vcard-temp", "<vCard xmlns='vcard-temp'>".$NewVcard."</vCard>");	
-   }
-	
-	/*
-	 *  Contacts
-	 */
-
-   final function getContacts()
-   {
-		$this->iq('get', 'contacts', NULL, NULL, 'jabber:iq:roster');
-   }
-   
-   final function addContacts($pContact)
-   {
-   	$addid = "adduser_" . time();
-   	$this->iq('set', $addid, NULL, NULL, "jabber:iq:roster", $pContact);
-   }
-   
-   final function removeContact($pContact)
-   {
-   	$delid  = 'deluser_' . time();
-   	$this->iq('set',$delid,NULL,NULL,"jabber:iq:roster","<item jid='".$pContact."' subscription='remove'/>");
-   }
-   
-   final function updateContact($pContact)
-   {
-   	$upid = 'updateuser_' . time();
-   	$this->iq('set', $upid, NULL, NULL, "jabber:iq:roster", $pContact);
-   }
-   
-   /*
-    * Presence 
-    */
-   
-   final function SubscriptionAcceptRequest($to = NULL)
-	{
-		$this->presence("subscribed", $to);
-	}
-
-	final function SubscriptionDenyRequest($to = NULL)
-	{
-		$this->presence("unsubscribed", $to);
-	}
-
-	final function Subscribe($to = NULL)
-	{
-		$this->presence("subscribe", $to);
-	}
-
-	final function Unsubscribe($to = NULL)
-	{
-		$this->presence("unsubscribe", $to);
-	}
-}
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/class.contacts_im.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/class.contacts_im.inc.php	(revision 260)
+++ 	(revision )
@@ -1,120 +1,0 @@
-<?php
-
-require_once "class.ldap_im.inc.php";
-require_once "class.db_im.inc.php"; 
-
-class contacts_im
-{
-	private $ldap;
-	private $db_user;
-	
-	function __construct()
-	{
-		$this->ldap = new ldap_im();
-		$this->db_user = new db_im();		
-	}
-
-	private function users_auth_im()
-	{
-		$db_acls = $this->db_user->get_accounts_acl();
-		
-		$search_uids = "|";
-		foreach($db_acls as $tmp)
-			$search_uids .= "(uidNumber=".$tmp['acl_account'].")";
-
-		// Busca Usuarios
-		$uids = $this->ldap->list_users_ldap($search_uids);
-		
-		$search_groups = "|";
-		foreach($db_acls as $tmp)
-			$search_groups .= "(gidNumber=".$tmp['acl_account'].")";
- 
-		// Busca Grupos
-		$groups = $this->ldap->list_groups_ldap($search_groups);
-				
-		$search_uids = "|";
-		if($groups)
-		{
-			foreach($groups as $tmp)
-			{
-				$members = $tmp['members'];	
-				foreach($members as $mb)		
-					$search_uids .= "(uid=".$mb.")";			
-			}
-		}
-		
-		if($uids)
-		{
-			foreach($uids as $tmp)	
-				$search_uids .= "(uid=".$tmp['uid'].")";
-		}
-		$uids_members = $this->ldap->list_users_ldap($search_uids);	
-					
-		if(count($uids_members) > 0)
-			return $uids_members;
-		else
-			return 0; 
-	}
-		
-	function list_contacts($param)
-	{
-		$users = $this->users_auth_im();
-		$ordenar = array();
-		$return = array();
-		$i = 0;
-		
-		foreach($users as $tmp)
-			$ordenar[] = $tmp['cn'].";".$tmp['mail'].";".$tmp['uid'].";".$tmp['dn'];
-					
-		natsort($ordenar);
-		$uid_unique = @array_values(@array_unique($ordenar));
-		
-		foreach($uid_unique as $tmp)
-		{	
-			$result = explode(";",$tmp);
-			if(strtolower($result[3]) == strtolower($param['ou']))
-			{
-				$return[$i]['cn']   = $result[0];
-				$return[$i]['mail'] = $result[1];
-				$return[$i]['uid']  = $result[2];
-				$i++;
-			}
-			unset($result);
-		}			
-	
-		if(count($return) > 0)
-			return $return;
-		else
-			return 0;
-	}
-	
-	function UserPermission($param)
-	{
-		$db_acls = $this->db_user->get_accounts_acl();
-		$members = array();		
-		$search_uid 	= "";
-		$search_groups = "|";
-		
-		$search_uid = $this->ldap->list_users_ldap("uid=".$param['uid']);
-
-		foreach($db_acls as $tmp)
-			if($tmp['acl_account'] == $search_uid[0]['uidnumber'])
-				return 1;
-			else
-				$search_groups .= "(gidNumber=".$tmp['acl_account'].")";
-
-		$groups = $this->ldap->list_groups_ldap($search_groups);
-
-		if($groups)
-		foreach($groups as $tmp){
-			$members = $tmp['members'];	
-			foreach($members as $mb){		
-				if(trim($mb) == trim($search_uid[0]['uid']))
-					return 1;
-			}			
-		}
-		
-		return 0;
-	}
-}
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/hook_admin.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/hook_admin.inc.php	(revision 260)
+++ 	(revision )
@@ -1,22 +1,0 @@
-<?php
-	/**************************************************************************\
-	* eGroupWare                                                               *
-	* http://www.egroupware.org                                                *
-	* Written by Joseph Engo <jengo@phpgroupware.org>                          *
-	* --------------------------------------------                             *
-	*  This program is free software; you can redistribute it and/or modify it *
-	*  under the terms of the GNU General Public License as published by the   *
-	*  Free Software Foundation; either version 2 of the License, or (at your  *
-	*  option) any later version.                                              *
-	\**************************************************************************/
-
-// Only Modify the $file and $title variables.....
-	$title = 'instant_messenger';
-	$file = array(
-		'Site Configuration'	=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)
-	);
-	
-//Do not modify below this line
-	display_section($appname,$title,$file);
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/load_lang.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/load_lang.php	(revision 260)
+++ 	(revision )
@@ -1,26 +1,0 @@
-<?
-if ( !isset($_SESSION['phpgw_info']['instant_messenger']['lang']) || !is_array($_SESSION['phpgw_info']['instant_messenger']['lang']) )
-   if ( file_exists(($fn = dirname(__FILE__) . '/../setup/phpgw_pt-br.lang')) )
-      if ( ($fp = fopen($fn,'r')) )
-      {
-         while ($data = fgets($fp,16000))
-         {
-            list($message_id, $app_name, $null, $content) = explode("\t",substr($data,0,-1));
-            $_SESSION['phpgw_info']['instant_messenger']['lang'][$message_id] = $content;
-         }
-         fclose($fp);
-      }
-
-$script  = '<script>';
-$script .= 'var lang_im = [];';
-
-foreach ( $_SESSION['phpgw_info']['instant_messenger']['lang'] as $key => $value )
-   $script .= "lang_im['" . strtolower(addslashes($key)) . "'] = '" . addslashes($value) . "';";
-
-   #$_key = str_replace("'","\'",strtolower($key));
-   #$_val = str_replace("'","\'",$value);
-
-$script .= '</script>';
-
-echo $script;
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/class.ldap_im.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/class.ldap_im.inc.php	(revision 260)
+++ 	(revision )
@@ -1,183 +1,0 @@
-<?php
-class ldap_im
-{
-	private $ldap_host;
-	private $ldap_context;
-	private $conn;
-	private $user;
-	private $password;
-	
-	function __construct()
-	{
-		$this->ldap_host 	= $_SESSION['phpgw_info']['instant_messenger']['server_ldap_jabber'];
-		$this->ldap_context = $_SESSION['phpgw_info']['instant_messenger']['context_ldap_jabber'];
-		$this->user 		= $_SESSION['phpgw_info']['instant_messenger']['user_ldap_jabber'];
-		$this->password 	= $_SESSION['phpgw_info']['instant_messenger']['password_ldap_jabber'];
-		$this->connect_ldap(false);
-	}
-	
-	function __destruct()
-	{
-		ldap_close($this->conn);
-	}
-	
-	function connect_ldap($refer)
-	{
-		$this->conn = ldap_connect($this->ldap_host);
-		ldap_set_option($this->conn, LDAP_OPT_PROTOCOL_VERSION, 3);
-		ldap_set_option($this->conn, LDAP_OPT_REFERRALS, $refer);
-		if(trim($this->user) != "")
-			@ldap_bind($this->conn,$this->user,$this->password);
-		else		
-			@ldap_bind($this->conn);
-	}
-	
-	function get_photo_ldap($user,$getPhoto)
-	{
-		$user = ( $user == "user" ) ? $_SESSION['phpgw_info']['instant_messenger']['user'] : $user ;
-		
-		if ($this->conn) {
-			$filter="(&(uid=".$user.")(phpgwAccountType=u))";		
-			$justthese = array("jpegphoto");
-			$search = ldap_search($this->conn,$this->ldap_context, $filter, $justthese);
-			$entry = ldap_first_entry($this->conn, $search);
-			$jpeg_data = @ldap_get_values_len($this->conn, $entry, "jpegphoto");
-			
-			if( count($jpeg_data) > 1){
-
-				$photo = imagecreatefromstring($jpeg_data[0]);
-				if($photo){
-					if($getPhoto){
-						header("Content-Type: image/jpeg");
-						$width = imagesx($photo);
-						$height = imagesy($photo);
-						$twidth = 49;
-						$theight = 65;
-						$small_photo = imagecreatetruecolor ($twidth, $theight);
-						imagecopyresampled($small_photo, $photo, 0, 0, 0, 0,$twidth, $theight, $width, $height);
-						imagejpeg($small_photo,'',100);
-						return;		
-					}else{
-						return 1;
-					}				
-				}else{
-					return 0;
-				}
-			}else{
-				return 0;
-			}
-		}
-	}
-	
-	function photo_ldap($user)
-	{
-		$uid = ( $user['uid'] == "user" ) ? $_SESSION['phpgw_info']['instant_messenger']['user'] : $user['uid'] ;
-		return $this->get_photo_ldap($uid,false);
-	}
-	
-	function list_users_ldap($search)
-	{
-
-		if($this->conn){
-			$filter = "(&(".$search.")(phpgwAccountType=u))";
-			$justthese = array("uid","uidNumber","cn","mail","phpgwAccountVisible","dn");
-			$search = ldap_search($this->conn,$this->ldap_context,$filter,$justthese);
-			$entry = ldap_get_entries($this->conn,$search);
-		}
-		
-		if( $entry['count'] > 0){
-			$i = 0;
-			$result_user = array();
-			foreach($entry as $tmp)
-			{
-				if($tmp['uidnumber'][0] != "" && $tmp['phpgwaccountvisible'][0] != "-1"){
-					$result_user[$i]['uidnumber'] = $tmp['uidnumber'][0];			
-					$result_user[$i]['mail'] = $tmp['mail'][0];
-					$result_user[$i]['uid'] = $tmp['uid'][0];
-					$result_user[$i]['cn'] = $tmp['cn'][0];
-					$ou = explode("dc=",$tmp['dn']);
-					$ou = explode("ou=",$ou[0]);
-					$ou = array_pop($ou);
-					$result_user[$i]['dn'] = strtoupper(substr($ou,0,strlen($ou)-1));					
-					$i++;
-				}				
-			}
-			return $result_user;
-		}
-		return 0;
-	}
-	
-	function list_groups_ldap($search)
-	{
-	
-		if( $this->conn ){
-			$filter = "(&(".$search.")(objectClass=posixGroup))";
-			$justthese = array("gidnumber","cn","memberuid");			
-			$search = ldap_search($this->conn,$this->ldap_context, $filter, $justthese);
-			$entry = ldap_get_entries($this->conn,$search);
-		}
-
-		if($entry['count'] > 0){
-			$i = 0;
-			$result_groups = array();
-			foreach($entry as $tmpg){
-				if($tmpg['gidnumber'] != ""){
-					if(array_key_exists("memberuid", $tmpg)){
-						$result_groups[$i]['gidnumber'] = $tmpg['gidnumber'][0];						
-						@array_shift($tmpg['memberuid']);
-						foreach($tmpg['memberuid'] as $tmp)
-							$result_groups[$i]['members'][] = $tmp;					
-						$i++;
-					}
-				}
-			}	
-		}
-		
-		if(count($result_groups) > 0 ){
-			return $result_groups;
-		}else{
-			return 0;
-		}
-	}
-	
-	function list_organizations_ldap()
-	{
-		$result_org = array();
-		$i = 0;
-		if ($this->conn) {
-			$filter="ou=*";		
-			$justthese = array("ou");
-			$search = ldap_list($this->conn,$this->ldap_context, $filter, $justthese);
-			$entry = ldap_get_entries($this->conn, $search);
-		}
-		
-		foreach($entry as $tmp){
-			if($tmp['ou'][0] != ""){
-				$result_org[$i] = $tmp['ou'][0];
-				$i++;
-			}
-		}
-		sort($result_org);
-		return $result_org;
-	}
-	
-	function info_user($user)
-	{
-		$uid = "uid=".$user['uid'];
-		$i= 0;
-		
-		$entry = $this->list_users_ldap($uid);
-		
-		if( count($entry) > 0 )
-			return $entry;
-		else
-			return false;	
-	}
-}
-
-if(trim($_REQUEST['user']) != ""){
-	$obj_img = new ldap_im();
-	$obj_img->get_photo_ldap($_REQUEST['user'],true);
-}
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/class.download.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/class.download.inc.php	(revision 260)
+++ 	(revision )
@@ -1,155 +1,0 @@
-<?php
-
-class download
-{
-	
-	function Decode_String($string)
-	{
-		$base64 = $string;	
-		$base64_de = base64_decode($base64);
-		$array_info = unserialize($base64_de);
-	
-		if($array_info['server'] == $_SERVER['SERVER_ADDR']){
-			$this->down_file($array_info['fileUp']);
-		}else{
-			$url = "http://".$array_info['server'].$array_info['path'].$array_info['filePhp'].$base64;
-			header("Location:" . $url);
-		}
-	}
-
-	function down_file($file)
-	{   
-		 
-		ini_set("session.save_path","/php_sessions");
-		$size = filesize(ini_get("session.save_path").'/'. $file);
-		$NameFile = explode("_IM_SendFile_",$file);
-	
-		 if (!empty($file))
-	     {
-		        if (ereg('Opera(/| )([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']))
-		           $UserBrowser = "Opera";
-		        elseif (ereg('MSIE ([0-9].[0-9]{1,2})', $_SERVER['HTTP_USER_AGENT']))
-		            $UserBrowser = "IE";
-	            else
-		            $UserBrowser = '';
-
-				$strFileType = strrev(substr(strrev($NameFile),0,4));
-				$ContentType = "application/octet-stream";
-
-			   	if ($strFileType == ".asf") 
-			   		$ContentType = "video/x-ms-asf";
-			   	if ($strFileType == ".avi")
-			   		$ContentType = "video/avi";
-			   	if ($strFileType == ".doc")
-			   		$ContentType = "application/msword";
-			   	if ($strFileType == ".zip")
-			   		$ContentType = "application/zip";
-			   	if ($strFileType == ".xls")
-			   		$ContentType = "application/vnd.ms-excel";
-			   	if ($strFileType == ".gif")
-			   		$ContentType = "image/gif";
-			   	if ($strFileType == ".jpg" || $strFileType == "jpeg")
-			   		$ContentType = "image/jpeg";
-			   	if ($strFileType == ".wav")
-			   		$ContentType = "audio/wav";
-			   	if ($strFileType == ".mp3")
-			   		$ContentType = "audio/mpeg3";
-			   	if ($strFileType == ".mpg" || $strFileType == "mpeg")
-			   		$ContentType = "video/mpeg";
-			   	if ($strFileType == ".rtf")
-			   		$ContentType = "application/rtf";
-			   	if ($strFileType == ".htm" || $strFileType == "html")
-			   		$ContentType = "text/html";
-			   	if ($strFileType == ".xml") 
-			   		$ContentType = "text/xml";
-			   	if ($strFileType == ".xsl") 
-			   		$ContentType = "text/xsl";
-			   	if ($strFileType == ".css") 
-			   		$ContentType = "text/css";
-			   	if ($strFileType == ".php") 
-			   		$ContentType = "text/php";
-			   	if ($strFileType == ".asp") 
-			   		$ContentType = "text/asp";
-			   	if ($strFileType == ".pdf")
-			   		$ContentType = "application/pdf";
-			   	if ($strFileType == ".txt")
-			   		$ContentType = "text/plain";
-			   	if ($strFileType == ".log")
-			   		$ContentType = "text/plain";
-			   	if ($strFileType == ".wmv")
-			   		$ContentType = "video/x-ms-wmv";
-				if ($strFileType == ".sxc")
-					$ContentType = "application/vnd.sun.xml.calc";
-				if ($strFileType == ".odt")
-					$ContentType = "application/vnd.oasis.opendocument.text";
-				if ($strFileType == ".stc")
-					$ContentType = "application/vnd.sun.xml.calc.template";
-				if ($strFileType == ".sxd")
-					$ContentType = "application/vnd.sun.xml.draw";
-				if ($strFileType == ".std")
-					$ContentType = "application/vnd.sun.xml.draw.template";
-				if ($strFileType == ".sxi")
-					$ContentType = "application/vnd.sun.xml.impress";
-				if ($strFileType == ".sti")
-					$ContentType = "application/vnd.sun.xml.impress.template";
-				if ($strFileType == ".sxm")
-					$ContentType = "application/vnd.sun.xml.math";
-				if ($strFileType == ".sxw")
-					$ContentType = "application/vnd.sun.xml.writer";
-				if ($strFileType == ".sxq")
-					$ContentType = "application/vnd.sun.xml.writer.global";
-				if ($strFileType == ".stw")
-					$ContentType = "application/vnd.sun.xml.writer.template";
-				if ($strFileType == ".ps")
-					$ContentType = "application/postscript";
-				if ($strFileType == ".pps")
-					$ContentType = "application/vnd.ms-powerpoint";
-				if ($strFileType == ".odt")
-					$ContentType = "application/vnd.oasis.opendocument.text";
-				if ($strFileType == ".ott")
-					$ContentType = "application/vnd.oasis.opendocument.text-template";
-				if ($strFileType == ".oth")
-					$ContentType = "application/vnd.oasis.opendocument.text-web";
-				if ($strFileType == ".odm")
-					$ContentType = "application/vnd.oasis.opendocument.text-master";
-				if ($strFileType == ".odg")
-					$ContentType = "application/vnd.oasis.opendocument.graphics";
-				if ($strFileType == ".otg")
-					$ContentType = "application/vnd.oasis.opendocument.graphics-template";
-				if ($strFileType == ".odp")
-					$ContentType = "application/vnd.oasis.opendocument.presentation";
-				if ($strFileType == ".otp")
-					$ContentType = "application/vnd.oasis.opendocument.presentation-template";
-				if ($strFileType == ".ods")
-					$ContentType = "application/vnd.oasis.opendocument.spreadsheet";
-				if ($strFileType == ".ots")
-					$ContentType = "application/vnd.oasis.opendocument.spreadsheet-template";
-				if ($strFileType == ".odc")
-					$ContentType = "application/vnd.oasis.opendocument.chart";
-				if ($strFileType == ".odf")
-					$ContentType = "application/vnd.oasis.opendocument.formula";
-				if ($strFileType == ".odi")
-					$ContentType = "application/vnd.oasis.opendocument.image";
-				if ($strFileType == ".ndl")
-					$ContentType = "application/vnd.lotus-notes";
-								
-		        $mime_type = ($UserBrowser == 'IE' || $UserBrowser == 'Opera') ? 'application/octetstream' : 'application/octet-stream';
-	
-		        header("Content-Type: $ContentType");
-		        header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
-		        header("Pragma: public");
-		        header("Expires: 0");
-		        header("Content-Disposition: attachment; filename=\"" . $NameFile[1] . "\"");
-				header("Content-length: " . $size);
-				readfile(ini_get("session.save_path") . "/" . $file); 
-				die();
-	    }
-	}
-}
-
-if(isset ($_REQUEST['file'])){
-	$obj_down = new download();
-	$obj_down->Decode_String($_REQUEST['file']);
-}
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/im_sessions.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/im_sessions.inc.php	(revision 260)
+++ 	(revision )
@@ -1,24 +1,0 @@
-<?php
-
-	  $_SESSION['phpgw_info']['instant_messenger']['user']             = $GLOBALS['phpgw_info']['user']['account_lid'];
-	  $_SESSION['phpgw_info']['instant_messenger']['user_id']			 = $GLOBALS['phpgw_info']['user']['account_id'];         
-     $_SESSION['phpgw_info']['instant_messenger']['passwd']           = $GLOBALS['phpgw_info']['user']['passwd'];
-     $_SESSION['phpgw_info']['instant_messenger']['name_jabber']      = $GLOBALS['phpgw_info']['server']['name_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['port_jabber']      = $GLOBALS['phpgw_info']['server']['port_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['resource_jabber']  = $GLOBALS['phpgw_info']['server']['resource_jabber'];
-
-     # Conf. Ldap
-     $_SESSION['phpgw_info']['instant_messenger']['server_ldap_jabber']   = $GLOBALS['phpgw_info']['server']['server_ldap_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['context_ldap_jabber']  = $GLOBALS['phpgw_info']['server']['context_ldap_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['user_ldap_jabber']     = $GLOBALS['phpgw_info']['server']['user_ldap_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['password_ldap_jabber'] = $GLOBALS['phpgw_info']['server']['password_ldap_jabber'];
-     $_SESSION['phpgw_info']['instant_messenger']['size_file_jabber']  	= $GLOBALS['phpgw_info']['server']['size_file_jabber'];	
-
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass'];
-     $_SESSION['phpgw_info']['instant_messenger']['server']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/class.Ujabber.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/class.Ujabber.inc.php	(revision 260)
+++ 	(revision )
@@ -1,542 +1,0 @@
-<?php
-
-class Ujabber
-{
-   /*
-    * Listen 
-    */
-   
-   final function listen()
-   {
-      $return = null;
-		
-		if($_SESSION['phpgw_info']['instant_messenger']['IM_disconnect'])
-		{
-      	$_SESSION['phpgw_info']['instant_messenger']['IM_disconnect'] = false;
-      	return "disconnected";
-		}
-		
-	   $_SESSION['phpgw_info']['instant_messenger']['timeClient'] = time();
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['block'] = true;
-      $xml = $_SESSION['phpgw_info']['instant_messenger']['socket']['in'];
-
-      unset($_SESSION['phpgw_info']['instant_messenger']['socket']['in']);
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['block'] = false;
-
-      ### Arranjo Tecnico ### 
-      $vkrd = $xml;
-      
-      if(isset($_SESSION['phpgw_info']['instant_messenger']['contacts']))
-         unset($_SESSION['phpgw_info']['instant_messenger']['contacts']);
-
-      ### - messages - ###
-      $_messages = "/<message[^>]+from='(\S+)'[^>]*>(?(?=.*?<composing |.*?<paused ).*?<(composing|paused) )(?(?=.*?<html).*?<html[^>]*><body[^>]*>(.*?)<\/body><\/html>).*?<\/message>/s";
-      $_messages = preg_match_all($_messages, $xml, $messages);
-      if ( $_messages !== false && $_messages > 0 )
-      {
-         $xml = preg_replace("/<message.*?<\/message>/", "", $xml);         
-         $return .= $this->getMessages($messages);
-      }
-      ### - Fim messages - ###
-
-      ### - contacts - ###
-      $_contacts = "/<iq[^>]+id='contacts'[^>]*>.*?<\/iq>/";
-      $_contacts = preg_match_all($_contacts, $xml, $_xml);
-
-      $_contacts = "/<item.*?(?(?=[^>]+name)[^>]+name='(.*?)')[^>]+subscription='(.*?)'[^>]+jid='(.*?)'";
-      $_contacts .= "(?(?=[^>]*\/>)[^>]*\/>|[^>]*><group>(.*?)<\/group><\/item>)/";
-      $_contacts = preg_match_all($_contacts, $_xml[0][0], $contacts);
-      if ( $_contacts !== false && $_contacts > 0 )
-      {
-         $xml = preg_replace("/<iq[^>]+id='contacts'[^>]*>.*?<\/iq>/", "", $xml);
-         $return .= rawurldecode(urldecode($this->getContacts($contacts)));
-      }
-      ### - Fim contacts - ###
-
-      ### - presence - ###
-      $xml = $_SESSION['phpgw_info']['instant_messenger']['presences'] . $xml;
-
-      $_presence  = "/<presence(?(?=[^>]+\/>)[^>]+\/>|[^>]+>.*?<\/presence>)/";
-      $_presence = preg_match_all($_presence, $xml, $presence);
-
-      $patterns[0] = '/<priority>[^<]*<\/priority>|<(\S) (?(?=[^>]*\/>)[^>]*\/>|[^>]*>.*?<\/\1>)/';
-      $patterns[1] = '/ xmlns=\'.*?\'| to=\'.*?\'/';
-      $patterns[2] = '/> +</';
-      $replacements[0] = '';
-      $replacements[1] = '';
-      $replacements[2] = '><';
-      $_xml = preg_replace($patterns, $replacements, implode('', $presence[0]));
-
-      $_presence  = "/<presence[^>]+from='(\S+)'[^>]*type='(unavailable)'(?(?=[^>]*\/>)[^>]*\/>|[^>]*>.*?<\/presence>)|";
-      $_presence .= "<presence[^>]+from='(\S+)'(?(?=[^>]+type)[^>]+type='(\S+)')[^>]*";
-      $_presence .= "(?(?=\/>)\/>|>";
-      $_presence .= "(?(?=<s[^>]*?>)<s[^>]*?>(.*?)<\/s[^>]*?>(?(?=<s[^>]*?>)<s[^>]*?>(.*?)<\/s[^>]*?>))";
-      $_presence .= "<\/presence>)/";
-      $_presence = preg_match_all($_presence, $_xml, $presence);
-      if ( $_presence !== false && $_presence > 0 )
-      {
-         foreach ( $presence[5] as $key => $val )
-         {
-            if ( !empty($presence[1][$key]) && (strpos($presence[1][$key], '/') !== false) )
-               $presence[1][$key] = substr($presence[1][$key], 0, strpos($presence[1][$key], '/'));
-            
-            if ( !empty($presence[3][$key]) && strpos($presence[3][$key], '/') !== false )
-               $presence[3][$key] = substr($presence[3][$key], 0, strpos($presence[3][$key], '/'));
-   
-            if ( !empty($val) && !preg_match("/^(away|chat|dnd|xa)$/", $val) )
-               if ( preg_match("/^(away|chat|dnd|xa)$/", $presence[6][$key]) )
-               {
-                  $aux = $presence[5][$key];
-                  $presence[5][$key] = $presence[6][$key];
-                  $presence[6][$key] = $aux;
-               }
-               else
-               {
-                  if ( empty($presence[6][$key]) )          
-                     $presence[6][$key] = $presence[5][$key];
-                  $presence[5][$key] = '';
-               }
-         }
-         $xml = preg_replace("/<presence[^>]\/?>|<presence[^>]>.*?<\/presence>/", "", $xml);
-
-         $return .= $this->getPresence($presence);
-      }
-      ### - Fim presence - ###
-
-      
-      ### - vcard - ###
-      ### - Arranjo Tecnico - ###
-      $_xml = $vkrd;
-      $_vcard = "/<iq.*? id='(.*?)' .*?(<vCard [^>]+\/>|<vCard.*?<\/vCard>)<\/iq>/"; 
-      $_vcard = preg_match_all($_vcard, $_xml, $vcard);
-      if( $_vcard !== false && $_vcard > 0)
-      {
-         $xml = preg_replace("/<iq.*?<vCard.*?<\/iq>/", "", $xml);
-         $return .= urldecode($this->getVcard($vcard));
-      }
-      ### - Fim vcard - ###
-      ## Final do Listen;
-
-      return $return;
-   }
-   
-   function reconnect()
-   {
-      require_once("IMConfigure.php");
-
-      $_transport = TRANSPORT_NON_SECURITY;
-      $_port = PORT_NON_SECURITY;
-
-		$SERVER = "127.0.0.1";
-
-		$fp  = "";
-		@$fp = stream_socket_client($_transport . "://" . $SERVER . ":" . $_port, $errno, $errstr, 10);
-
-		if ( $fp )
-		{
-			fwrite($fp, "GET /" . CONNECT . ";" . session_id() . " HTTP/1.1\r\nHost: " . $SERVER . ":" . $_port . "\r\nAccept: */*\r\n\r\n");
-			return 'true';
-		}
-		else
-			return 'false';
-   } 
-   
-   /*
-    * Contacts
-    */
-
-   function getContacts(array $pContacts)
-   {
-      $_group = array();
-      $return = NULL;
-      $jid = array_unique($pContacts[3]);
-      
-      foreach ( $jid as $key => $val )
-      {
-         $_SESSION['phpgw_info']['instant_messenger']['contacts'][] = $val;
-
-         $item  = NULL;
-         $item .= '<item name="' . (( !empty($pContacts[1][$key]) ) ? $pContacts[1][$key] : $val);
-         $item .= '" jid="' . $val;
-         $item .= '" subscription="' . $pContacts[2][$key];
-         $item .= '" />';
-
-         $_group[utf8_decode(strtolower(!empty($pContacts[4][$key]) ? $pContacts[4][$key] : 'default'))][] = $item;
-      } 
-      
-      ksort($_group);
-
-      foreach ( $_group as $key => $val )
-         $return .= '<group name="' . $key . '">' . implode('', $val) . '</group>';
-
-      return '<contacts>' . $return . '</contacts>';
-   }
-
-   function requireContacts()
-   {
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['getContacts'] = NULL;
-   }
-   
-  /*
-   * Presence 
-   */
-
-   function setPresence($pPresence)
-   {
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['setPresence'] = $pPresence;
-      foreach($pPresence as $key=>$presence)
-      	if($key == 'show' || $key == 'type')
-      	{
-      		$_SESSION['phpgw_info']['instant_messenger']['MyPresence'] = $presence;
-      	}
-   }
-   
-   function MyPresence()
-   {
-   	if(isset($_SESSION['phpgw_info']['instant_messenger']['MyPresence']))
-	   	return $_SESSION['phpgw_info']['instant_messenger']['MyPresence'];
-   }
-   
-   function getPresence(array $pPresence)
-   {
-      $offline = array();
-      foreach ( $pPresence[1] as $key => $val )
-      {
-         if ( empty($val) )
-            continue;
-
-         $_offline = true;
-         for ( $i = $key; $i < sizeof($pPresence[1]); $i++ )
-            if ( $pPresence[1][$key] == $pPresence[3][$i] || $pPresence[1][$key] == $pPresence[5][$i] )
-               $_offline = false;
-
-         if ( $_offline )
-            $offline[$key] = $val;
-      }
-
-      $online = array();
-      foreach ( $pPresence[3] as $key => $val )
-      {
-         if ( empty($val) )
-            continue;
-
-         $_online = true;
-         for ( $i = ($key + 1); $i < sizeof($pPresence[3]); $i++ )
-            if ( in_array($val, $offline) || $pPresence[3][$key] == $pPresence[3][$i] )
-               $_online = false;
-
-         if ( $_online )
-            $online[$key] = $val;
-      }
-
-      $return = NULL;
-
-      foreach ( $offline as $key => $val )
-      {
-         $val = ( strpos($val, '/') ) ? substr($val, 0, strpos($val, '/')) : $val;
-         $return .= "<presence from='" . $val . "' type='unavailable' />";
-      }
-      
-      foreach ( $online as $key => $val )
-      {
-         $val = ( strpos($val, '/') ) ? substr($val, 0, strpos($val, '/')) : $val;
-
-         if ( empty($pPresence[4][$key]) )
-            $pPresence[4][$key] = ( empty($pPresence[5][$key]) ) ?
-               'available' : $pPresence[5][$key];
-
-         $return .= "<presence from='" . $val . "' type='" . $pPresence[4][$key];
-         if ( empty($pPresence[6][$key]) )
-            $return .= "' />";
-         else
-            $return .= "'>" . $pPresence[6][$key] . "</presence>";
-
-         if ( strpos($pPresence[4][$key], 'subscribe') === false )
-         {
-            $session .= "<presence from='" . $val . "'><show>" . $pPresence[4][$key] . "</show>";
-            if ( !empty($pPresence[6][$key]) )
-               $session .= "<status>" . $pPresence[6][$key] . "</status>";
-            $session .= "</presence>";
-         }
-      }
-
-      $_SESSION['phpgw_info']['instant_messenger']['presences'] = $session;
-
-      return $return;
-   }
-
-   /*
-    * GetMessage
-    */
-   
-   function getMessages(array $pMessages)
-   {
-      $_messages = array();
-      $return = NULL;
-
-      foreach ( $pMessages[1] as $key => $val )
-      {
-         trim($pMessages[3][$key]);
-         if ( !empty($pMessages[3][$key]) )
-            $_messages[$val][] = $pMessages[3][$key];
-            
-         if ( !empty($pMessages[2][$key]) )
-         {
-            $return .= '<' . $pMessages[2][$key] . ' from="';
-            $return .= ( strpos($val, '/') ) ? substr($val, 0, strpos($val, '/')) : $val;
-            $return .= '" />';
-         }
-      }
-
-      foreach ( $_messages as $key => $val )
-      {
-         $return .= '<messages from="' . $key . '">';
-         foreach ( $val as $msg )
-            $return .= '<message>' . $msg . '</message>';
-         $return .= '</messages>';
-      }
-
-      return $return;
-   }
-
-   /*
-    * SendMessage
-    */
-
-   function SendMessage($pSendMessage)
-   {
-      $pSendMessage['body'] = stripslashes($pSendMessage['body']);
-      $_emotions  = '/<img emotion="(\S+)?"[^>]+>/';
-      $_emotions = preg_match_all($_emotions, $pSendMessage['body'], $emotions);
-
-      foreach ( $emotions[0] as $key => $val )
-         $emotions[0][$key] = '/' . addcslashes($val, './()[]{}^$*&?') . '/i';
-
-      $pSendMessage['body'] = preg_replace($emotions[0], $emotions[1], $pSendMessage['body']);
-
-      $to = $pSendMessage['to'];
-      $type = "normal";
-      $id = "";
-      $content = array(
-         "subject" => $pSendMessage['subject'] ? $pSendMessage['subject'] : "",
-         "thread" => $pSendMessage['thread'] ? $pSendMessage['thread'] : "",
-         "body" => $pSendMessage['body'] ? $pSendMessage['body'] : ""
-      );
-
-      $payload = "";
-
-      if ($to && is_array($content))
-      {
-         if (!$id)
-         {
-            $id = $type . "_" . time();
-         }
-
-         $xml = "<message to='$to' type='$type' id='$id'>";
-
-         if ($content['subject'])
-         {
-            $xml .= "<subject>" . $content['subject'] . "</subject>";
-         }
-
-         if ($content['thread'])
-         {
-            $xml .= "<thread>" . $content['thread'] . "</thread>";
-         }
-
-         $xml .= "<html><body>" . $content['body'] . "</body></html>";
-         $xml .= $payload;
-         $xml .= "</message>";
-         unset($id);
-
-         $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['message'] .= $xml;
-      }
-      else
-      {
-         $this->writeLog("ERROR: SendMessage() #2");
-         return FALSE;
-      }
-   }
-
-   /*
-    * Composing / Paused Message
-    */
-
-   function composingMessage($pComposing)
-   {
-
-		$xml  = "<message xmlns='jabber:client' to='".$pComposing['to']."' id='".time()."' type='chat'>";
-		$xml .= "<x xmlns='jabber:x:event'>";
-		$xml .= "<composing/>";
-		$xml .= "</x>";
-		$xml .= "<composing xmlns='http://jabber.org/protocol/chatstates'/>";
-		$xml .= "</message>";
-   	$_SESSION['phpgw_info']['instant_messenger']['socket']['out']['message'] .= $xml;
-   }
-   
-   function pausedMessage($pComposing)
-   {
-		$xml  = "<message xmlns='jabber:client' to='".$pComposing['to']."' id='".time()."' type='chat'>";
-		$xml .= "<x xmlns='jabber:x:event'/>";
-		$xml .= "<paused xmlns='http://jabber.org/protocol/chatstates'/>";
-		$xml .= "</message>";
-
-		$_SESSION['phpgw_info']['instant_messenger']['socket']['out']['message'] .= $xml;
-   }
-   
-   /*
-    * UpdateContact
-    */
-   
-   function updateContact($pUser)
-   {
-      $jid   = $pUser['jid'];
-      $name  = $pUser['name'];
-      $group = $pUser['group'];
-      
-      if ( $jid )
-      {
-         $updatecontact  = "<item jid='$jid'";
-         $updatecontact .= " name='" . $name . "'";
-         $updatecontact .= "><group>" . $group . "</group></item>";
-         $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['updateContact'] = $updatecontact;
-      }
-      $this->requireContacts();
-   }
-   
-   /*
-    * AddContact
-    */
-   
-   function addContacts($pUser)
-   {
-      $jid = explode("@",$pUser['email']);
-      $pJid = $jid[0]."@".$_SESSION['phpgw_info']['instant_messenger']['name_jabber'];
-      $pName = $pUser['name'];
-      $pGroup = $pUser['group'];
-
-      if(trim($jid[0]) != trim($this->username))
-      {
-         if ( $pJid )
-         {
-            $newcontact  = "<item jid='$pJid'";
-            $newcontact .= " name='" . $pName . "'";
-            $newcontact .= "><group>" . $pGroup . "</group></item>";
-            $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['addContacts'] = $newcontact;
-            $this->subscribe($pJid);
-            $this->requireContacts();           
-         }
-      }
-   }
-   
-   /*
-    * RemoveContact
-    */
-    
-    function removeContact($pUser)
-    {
-         $pJid = $pUser['jid'];
-         $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['removeContact'] = $pJid;
-         $this->unsubscribed($pJid);
-         $this->requireContacts();
-    }
-
-   /*
-    * Vcard
-    */
-
-   function newVcard($pVcardUser)
-   {
-      $pVcard = explode("_vkrd_", $pVcardUser['vcard']);
-
-      $xmlVcard  = "<FN>".$pVcard[0]."</FN>";
-      $xmlVcard .= "<NICKNAME>".$pVcard[1]."</NICKNAME>";
-      $xmlVcard .= "<ORG>";
-      $xmlVcard .= "<ORGNAME>".$pVcard[2]."</ORGNAME>";
-      $xmlVcard .= "<ORGUNIT>".$pVcard[3]."</ORGUNIT>";
-      $xmlVcard .= "</ORG>";
-      $xmlVcard .= "<ROLE>".$pVcard[4]."</ROLE>";
-      $xmlVcard .= "<BDAY>".$pVcard[5]."</BDAY>";
-      $xmlVcard .= "<DESC>".$pVcard[6]."</DESC>";
-      
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['newVcard'] = $xmlVcard;
-
-   }
-   
-   function getVcard(array $Vcard)
-   {
-      $div = "";
-      $_expr = "/<[^<vCard xmlns=\'vcard\-temp\'>].*[^<\/vCard>]>/";
-      array_shift($Vcard);
-      $div = '<vcard>';
-      $jid_user = $_SESSION['phpgw_info']['instant_messenger']['user'];
-      $jid_user .= "@" . $_SESSION['phpgw_info']['instant_messenger']['name_jabber'];
-      for($i = 0 ; $i < count($Vcard[0]) ; $i++)
-      {
-         preg_match($_expr,$Vcard[1][$i],$div_vcard);
-         $div_new[] = $div_vcard;
-
-         if ( $jid_user == $Vcard[0][$i] )
-            $_SESSION['phpgw_info']['instant_messenger']['vcard'] = $div_new[$i][0];
-         
-         $div .= '<div id="vcard_'.$Vcard[0][$i].'">'.urldecode($div_new[$i][0]).'</div>';
-      }
-      $div .= '</vcard>';
-         
-      return $div;
-   }
-   
-   function Vcard()
-   {
-      $contacts = array();
-      $contacts = $_SESSION['phpgw_info']['instant_messenger']['contacts'];
-      $jid_user = $this->getJid();
-
-      if( count($contacts) > 0 )
-      {
-         array_unshift($contacts,$jid_user);
-
-         foreach($contacts as $user)
-            $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['vcard'][] = $user;
-         return "true";
-      }else{
-         return "false";
-      }
-   }
-   
-   function VcardUser()
-   {
-   	$_SESSION['phpgw_info']['instant_messenger']['socket']['out']['vcard'][] = $this->getJid();;
-   }
-   
-   function getJid()
-   {
-      $jid = $_SESSION['phpgw_info']['instant_messenger']['user'] . "@" . $_SESSION['phpgw_info']['instant_messenger']['name_jabber'];
-      return $jid;   
-   }
-   
-   function subscribe($pJid)
-   {
-      $jid = (is_array($pJid)) ? $pJid['jid'] : $pJid ;
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['Subscribe'] = $jid;
-   }
-   
-   function subscribed($pJid)
-   {
-      $jid = (is_array($pJid)) ? $pJid['jid'] : $pJid ;
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['SubscriptionAcceptRequest'] = $jid;
-   }
-   
-   function unsubscribe($pJid)
-   {
-      $jid = (is_array($pJid)) ? $pJid['jid'] : $pJid ;
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['Unsubscribe'] = $jid;
-   }
-   
-   function unsubscribed($pJid)
-   {
-      $jid = (is_array($pJid)) ? $pJid['jid'] : $pJid ;
-      $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['SubscriptionDenyRequest'] = $jid;   
-   }
-}
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/class.db_im.inc.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/class.db_im.inc.php	(revision 260)
+++ 	(revision )
@@ -1,97 +1,0 @@
-<?php
-define('PHPGW_INCLUDE_ROOT','../');	
-define('PHPGW_API_INC','../phpgwapi/inc');
-require_once(PHPGW_API_INC.'/class.db.inc.php');
-	
-class db_im
-{	
-	
-	var $db;
-	var $db_name;
-	var $db_host;
-	var $db_port;
-	var $db_user;
-	var $db_pass;
-	var $db_type;
-	var $teste;
-	
-	function db_im(){
-		$this->db_name = $_SESSION['phpgw_info']['instant_messenger']['server']['db_name'];
-		$this->db_host = $_SESSION['phpgw_info']['instant_messenger']['server']['db_host'];
-		$this->db_port = $_SESSION['phpgw_info']['instant_messenger']['server']['db_port'];
-		$this->db_user = $_SESSION['phpgw_info']['instant_messenger']['server']['db_user'];
-		$this->db_pass = $_SESSION['phpgw_info']['instant_messenger']['server']['db_pass'];
-		$this->db_type = $_SESSION['phpgw_info']['instant_messenger']['server']['db_type'];
-		
-		$this->db = new db();		
-		$this->db->connect($this->db_name,$this->db_host,$this->db_port,$this->db_user,$this->db_pass,$this->db_type);
-	}
-
-	function get_accounts_acl()
-	{
-		$result = array();
-		$query = "select acl_appname, acl_account from phpgw_acl where acl_appname = 'instant_messenger' order by acl_account";	
- 		
- 		if (!$this->db->query($query))
-        	return null;
-		
-		while($this->db->next_record())
-			$result[] = $this->db->row();
-
-		return $result;
-	}
-	
-	function query_db($pQuery)
-	{
-		if (!$this->db->query($pQuery))
-        	return false;
-		else
-			return true;
-	}
-	
-	function set_preferences($param)
-	{
-		$preferences = $param['preferences'];
-		$user_id  = $_SESSION['phpgw_info']['instant_messenger']['user_id']; 
-		$app_name = $this->name_app();
-
-		$query = "insert into phpgw_preferences values('".$user_id."','".$app_name."','".serialize($preferences)."')";
-		
-		if($this->query_db($query))	 
-			return "true";
-		else{
-			$query = "update phpgw_preferences set preference_value = '".serialize($preferences)."' where preference_app='".$app_name."' and preference_owner='".$user_id."'";
-			if($this->query_db($query))
-				return "true";
-			else
-				return "false";			
-		}		
-	}
-	
-	function get_preferences()
-	{
-		$result = array();
-		$user_id  = $_SESSION['phpgw_info']['instant_messenger']['user_id'];
-		$app_name = $this->name_app();
-		
-		$query = "select * from phpgw_preferences where preference_owner = '".$user_id."' and preference_app = '".$app_name."'";
-		
- 		if (!$this->db->query($query))
-        	return NULL;
-		
-		while($this->db->next_record())
-			$result[] = $this->db->row();
-
-		if(count($result) > 0){
-			return unserialize($result[0]['preference_value']);
-		}else{
-			return "ch_offline:true;in_time:1;rd_nm:true;rd_ch:false";
-		}
-	}
-	
-	function name_app()
-	{
-		return "instant_messenger";
-	}
-}
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/IMConfigure.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/IMConfigure.php	(revision 260)
+++ 	(revision )
@@ -1,33 +1,0 @@
-<?php
-   ###
-   # definitions of access - BEGIN
-   #
-      define('CONNECT', 'con');
-      define('CLOSE', 'close');
-      define('GET_MESSAGE', 'getMessage');
-      define('SEND_MESSAGE', 'send');
-   #
-   # definitions of access - END
-   ###
-
-   ###
-   # definitions of time - BEGIN
-   #
-      define('DISCONNECT_AFTERWARDS_OF', 20);
-      define('READ_SOCKET_AFTER_OF', 2);
-   #
-   # definitions of time - END
-   ###
-
-   ###
-   # definitions of socket - BEGIN
-   #
-      define('TRANSPORT_NON_SECURITY', 'tcp');
-      define('PORT_NON_SECURITY', '8000');
-
-      //define('TRANSPORT_SECURITY', 'sslv3');
-      //define('PORT_SECURITY', '9001');
-   #
-   # definitions of socket - END
-   ###
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/Jabber.abstract.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/Jabber.abstract.php	(revision 260)
+++ 	(revision )
@@ -1,317 +1,0 @@
-<?php
-/*
-+-------------------------------------------------------------------------+
-|                                                                         |
-| @FILE:        Jabber.abstract.php                                       |
-| @ABSTRACT:    Jabber                                                    |
-| @EXTENDS:     Socket (Socket.class.php)                                 |
-|                                                                         |
-| @DATE:        Wed May,16 2007 08:18:59                                  |
-| @LAST_CHANGE: Wed May,16 2007 09:03:28                                  |
-|                                                                         |
-| @AUTHOR:      [NUTS] Rodrigo Souza - rodsouza@celepar.pr.gov.br         |
-|                                                                         |
-| @BRIEF:       Abstract class for connect with any Jabber server         |
-|                                                                         |
-+-------------------------------------------------------------------------+
-*/
-
-require_once 'Socket.abstract.php';
-
-abstract class Jabber extends Socket
-{
-   const J_FILE    = '/var/log/expresso/Jabber.log';
-   const J_ALL     = false;
-   const J_ERROR   = true;
-   const J_WARNING = true;
-   const J_NOTICE  = true;
-
-   const ALL     = 'ALL';
-   const ERROR   = 'ERROR';
-   const WARNING = 'WARNING';
-   const NOTICE  = 'NOTICE';
-
-   private final function _connect( $pUser = false, $pPassword = false )
-   {
-      try
-      {	
-         if ( !preg_match('/^(.+)@(.+)\/(.+):(\d+)$/',$pUser, $matches) )
-            throw new Exception('[connect] #1 ' . $pUser . ' must be [USER]@[DOMAIN]/[RESOURCE]:[PORT] and [PORT] is integer. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         list($subject, $USER, $SERVER, $RESOURCE, $PORT) = $matches;
-
-         if ( !($socket = $this->open('tcp://' . $SERVER . ':' . $PORT, 1, 1)) )
-            throw new Exception('[connect] #2 can\'t access tcp://' . $SERVER . ':' . $PORT . '. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         $this->_socket = $socket;
-
-         $xml  = "<?xml version='1.0' encoding='UTF-8'?>";
-         $xml .= "<stream:stream to='" . $SERVER . "' xmlns='jabber:client' ";
-         $xml .= "xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>";
-
-         if ( $this->write($xml) === false )
-            throw new Exception('[connect] #3 it isn\'t possible write in the socket ' . $socket . '. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         $this->_server = $SERVER;
-         $this->_username = $USER;
-         $this->_password = $pPassword;
-         $this->_resource = $RESOURCE;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-   protected function connect( $pUser = false, $pPassword = false )
-   {   
-      try
-      {
-         $this->_connect($pUser, $pPassword);
-         $this->blocking($this->_socket, 0);
-			
-			$xml = $this->read();
-         
-         if ( $xml === false )
-            throw new Exception('[connect] #1 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-         
-         if ( preg_match('/(<starttls .*<required\/><\/starttls>)/', $xml, $matches) )
-         {
-            if ( !$this->starttls() )
-               throw new Exception('[connect] #2 it isn\'t possible start tls. File: ' . __FILE__ . '  ::  ' . __LINE__);
-         }
-         else
-	 		{
-            if ( !$this->_plain() )
-               throw new Exception('[connect] #3 it isn\'t possible carry out the verification. File: ' . __FILE__ . '  ::  ' . __LINE__);
-	 		}
-
-         return true;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         $this->_disconnect();
-         return false;
-      }
-   }
-
-   protected final function _disconnect()
-   {
-      try
-      {
-         $xml = "</stream:stream>";
-
-         if ( $this->write($xml) === false )
-            throw new Exception('[disconnect] #1 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         if ( ($xml = $this->read()) === false )
-            throw new Exception('[disconnect] #2 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-   private final function starttls()
-   {
-      try
-      {
-         $xml = "<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>";
-         
-         if ( $this->write($xml) === false )
-            throw new Exception('[starttls] #1 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         if ( ($xml = $this->read()) === false )
-            throw new Exception('[starttls] #2 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         if ( !preg_match('/<proceed.*\/>/', $xml, $matches) )
-            throw new Exception('[starttls] #3 can\'t start tls in the socket ' .$this->_socket . '. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-		   stream_socket_enable_crypto($this->_socket, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT);
-
-         $xml  = "<?xml version='1.0' encoding='UTF-8'?>";
-         $xml .= "<stream:stream to='" . $this->_server . "' xmlns='jabber:client' ";
-         $xml .= "xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>";
-         if ( $this->write($xml) === false )
-            throw new Exception('[starttls] #4 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         usleep(90000);
-         $this->blocking($this->_socket, 0);
-
-         if ( ($xml = $this->read()) === false )
-            throw new Exception('[starttls] #5 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         if ( !$this->_plain() )
-            throw new Exception('[starttls] #6 it isn\'t possible carry out the verification. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         return true;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-   private final function _plain()
-   {
-      try
-      {
-			//$this->blocking($this->_socket, 1);
-
-         if ( ($xml = $this->read()) === false )
-            throw new Exception('[_plain] #1 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         $xml  = "<username>" . $this->_username . "</username>";
-         $xml .= "<password>" . $this->_password . "</password>";
-         $xml .= "<resource>" . $this->_resource . "</resource>";
-
-         unset($this->_password);
-
-         if ( !$this->iq('set', 'auth_1', NULL, NULL, "jabber:iq:auth", $xml) )
-            throw new Exception('[_plain] #2 it isn\'t possible carry out the verification. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         while ( !preg_match("/<iq xmlns='jabber:client' id='auth_1' type='(result|error)'/", ($readSocket = $this->read()), $matches) )
-         	   usleep(10000);
-
-			if($matches[1] == "error")
-				return false;
-
-         if ( ($xml = $this->read()) === false )
-            throw new Exception('[_plain] #3 it isn\'t possible read the socket. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         return true;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-	private final function _iq($pType = false, $pId = false, $pTo = false, $pFrom = false, $pXmlns = false, $pLoad = false )
-	{
-		$xml  = "<iq type='" . $pType . "' id='" . $pId . "'";
-		$xml .= ( $pTo ) ? " to='" . $pTo . "'" : "";
-		$xml .= ( $pFrom ) ? " from='" . $pFrom . "'" : "";
-
-		if ( $pXmlns == "vcard-temp" )
-      {
-			$xml .= ">";
-			$xml .= $pLoad;
-		}
-      else
-      {
-			$xml .= "><query xmlns='" . $pXmlns . "'";
-			$xml .= ( $pLoad ) ? ">" . $pLoad . "</query>" : "/>";
-		}
-
-		$xml .= "</iq>";
-		
-		return $xml;	
-	}
-
-   protected final function iq($pType = false, $pId = false, $pTo = false, $pFrom = false, $pXmlns = false, $pLoad = false)
-   {
-      try
-      {
-         if ( !preg_match("/^(get|set|result|error)$/i", $pType, $matches) )
-            throw new Exception('[iq] #1 type must be GET, SET, RESULT or ERROR. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-		   if ( $this->write($this->_iq($pType, $pId, $pTo, $pFrom, $pXmlns, $pLoad)) === false )
-            throw new Exception('[iq] #2 Cannot write to socket (' . $this->_socket . '). File: ' . __FILE__ . '  ::  ' . __LINE__);
-         else
-            return true;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-   }
-
-	protected final function presence($pType = false, $pTo = false, $pShow = false, $pStatus = false, $pPriority = false)
-	{
-      try
-      {
-         $xml  = "<presence";
-         $xml .= ($pTo)   ? " to='{$pTo}'" : '';
-         $xml .= ($pType) ? " type='{$pType}'" : '';
-         
-         if ( !($pStatus || $pShow || $pPriority) )
-				$xml .= "/>";
-			else
-			{
-			 $xml .= ">";
-	         $xml .= ($pStatus) ? "<status>" . $pStatus . "</status>" : '';
-	         $xml .= ($pShow) ? "<show>" . $pShow . "</show>" : '';
-	         $xml .= ($pPriority) ? "<priority>" . $pPriority . "</priority>" : '';
-	         $xml .= ($pStatus || $pShow || $pPriority) ? "</presence>" : '';
-			}
-
-         if ( $this->write($xml) === false )
-            throw new Exception('[presence] #1 it isn\'t possible send presence for ' . $this->_server . '. File: ' . __FILE__ . '  ::  ' . __LINE__);
-
-         return true;
-      }
-      catch(Exception $e)
-      {
-         $this->writeLog('ERROR', $e->getMessage());
-         return false;
-      }
-	}
-
-   protected final function read()
-   {
-      $return = NULL;
-      do
-      {
-         $line = NULL;
-         $line = utf8_decode(parent::read($this->_socket, 4096));
-
-         if ( $line === false )
-         {
-            $return = false;
-            break;
-         }
-
-         if ( $line != NULL )
-            $return .= $line ;
-      }
-      while ( $line != NULL );
-
-      return $return;
-   }
-
-	protected final function write($pData = false)
-   {
-      if ( !$pData )
-         return false;
-
-      return parent::write($this->_socket, utf8_encode($pData));
-   }
-
-   protected final function writeLog($pType = false, $pLog = false)
-   {
-      if ( !defined('self::'.$pType) && !$pLog )
-         return false;
-
-      if ( !(bool)constant('self::J_'.$pType) && !(bool)constant('self::J_ALL') )
-         return false;
-
-      $log  = date('m/d/Y H:i:s');
-      $log .= ' [' . constant('self::'.$pType) . '] :: ';
-      $log .= $pLog . "\n";
-      if ( $fp = fopen (self::J_FILE, "a+") )
-      {
-         fwrite($fp, $log);
-         fclose($fp);
-      }
-   }
-}
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/inc/Language.class.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/inc/Language.class.php	(revision 260)
+++ 	(revision )
@@ -1,41 +1,0 @@
-<?php
-
-class Language
-{
-   const _DEFAULT_LANGUAGE_ = 'ENGLISH';
-   static private $_language = NULL;
-
-   static private $_phrase = NULL;
-
-   function __construct()
-   {
-      echo 'ok';
-   }
-
-   function setLanguage( $pLanguage = false )
-   {
-      if ( !$pLanguage || !is_file($pLanguage . '_language.txt') )
-         return false;
-
-      $this->_language = $pLanguage;
-      $this->_phrase = file($this->_language . '_language.txt');
-
-      foreach($this->_phrase as $val )
-      {
-         $_phrase = explode('§§', $val);
-         if ( sizeof($_phrase) != 2 )
-            continue;
-         $this->_phrase[$_phrase[0]] = $_phrase[1];
-      }
-   }
-
-   public function phrase( $pPhrase )
-   {
-      if ( !$this->_phrase || !isset($this->_phrase[$pPhrase]) )
-         return '** ' . self::_DEFAULT_LANGUAGE_;
-      else
-         return $this->_phrase[$pPhrase];
-   }
-}
-
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_menu_action.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_menu_action.js	(revision 260)
+++ 	(revision )
@@ -1,67 +1,0 @@
-// Instant Messenger
-// im_menu_action.js
-
-	var im_menu_action = {
-      "delay_hide" : 500,
-      "delayhide" : false,
-
-      "menu" : function()
-      {
-         try
-         {
-            var pElement = arguments[0];
-            delete arguments[0];
-            var pMenu = ( func.isString(arguments[1]) ) ? arguments[1] : arguments;
-            if ( document.getElementById(pElement).innerHTML == "" )
-            {
-               func.confEl(pElement, 'style', 'display:block;');
-               this.layout(pMenu, pElement);
-            }
-            else
-            {
-               func.confEl(pElement, 'style', 'display:none;');
-               this.del_innerHTML(pElement);
-               this.clear_delayhide();
-            }
-         }
-         catch(e)
-         {
-         }
-      },
-
-	  "layout" : function(pHtml, pElement)
-      {
-			var _this = this;
-			var el_dest_ = ( func.isString(pElement) ) ? func.byId(pElement) : pElement;
-			var div_menu = func.newEl("div");
-         func.confEl(div_menu, 'style', 'padding:0px;border:1px solid #809aa9');
-			div_menu.onmouseover = function(){_this.clear_delayhide();};
-			div_menu.onmouseout = function(){_this.resetit(pElement);};
-			if ( func.isString(pHtml) )
-				div_menu.innerHTML = pHtml;
-         else
-            for ( i = 1; i < pHtml.length; i++ )
-               func.insEl(pHtml[i], div_menu);
-
-			func.insEl(div_menu, el_dest_);
-			this.delayhide = setTimeout("im_menu_action.del_innerHTML('"+pElement+"')", 2000);
-		},
-
-	   "del_innerHTML": function(pElement)
-       {
-           func.confEl(pElement, 'style', 'display:none;');
-		   func.byId(pElement).innerHTML = "";
-		   document.oncontextmenu = new Function("return true");
-	   },
-
-	   "resetit": function(pElement)
-       {
-			this.delayhide = setTimeout("im_menu_action.del_innerHTML('"+pElement+"')",this.delay_hide);
-	   },
-
-	   "clear_delayhide" : function()
-       {
-			if ( this.delayhide )
-				clearTimeout(this.delayhide);
-	   }
-	}
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_preferences.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_preferences.js	(revision 260)
+++ 	(revision )
@@ -1,576 +1,0 @@
-// Instant Messenger
-// im_preferences.js
-
-	function IM_Preferences()
-	{
-		this.save_vcard = "";	
-		this.jid = false;
-		this.im_timer_xa = "";
-	}
-
-   /*
-	* Add
-	*/
-	
-	IM_Preferences.prototype.Add_userLoad = function()
-	{
-		Templates.add_user();
-		this.SearchOrganizationsLdap();
-		var select_contact = document.getElementById('ImSelAddContact');
-		select_contact.innerHTML = "";
-	}
-	
-	IM_Preferences.prototype.SearchOrganizationsLdap = function()
-	{
-		var handler_organizations = function(data)
-		{
-			var data = func.interface(data);
-			var select_org = document.getElementById('ImSelOrg');
-			if(select_org.options.length > 0)
-				select_org.options.splice(0,select_org.options.length);
-			var options = new Option("--Selecione -- ", -1, false, true);
-			select_org[select_org.length] = options;
-			
-			for(var i in data){
-				var options = new Option(data[i], data[i], false, true);
-				select_org[select_org.length] = options;
-			}
-			select_org[0].selected = true;
-		}
-		XMLTools.request('$this.ldap_im.list_organizations_ldap','GET',handler_organizations);
-	}
-	
-	IM_Preferences.prototype.SearchContacts = function()
-	{
-		var select_org = document.getElementById('ImSelOrg');
-		var organization = "";
-		var span_load = document.getElementById('_span_load_im');
-			span_load.style.display = "block";
-		
-		for(var i=0; i < select_org.options.length; i++){
-			if(select_org.options[i].selected == true){
-				organization = select_org.options[i].value;
-			}
-		}
-		var handler_contacts = function(XMLdata)
-		{
-			var data = func.interface(XMLdata);
-			var select_contact = document.getElementById('ImSelAddContact');
-			var text0 = document.getElementById('text0');
-			var text1 = document.getElementById('text1');
-			var content = "";
-			select_contact.innerHTML = "";
-			text0.value = "";
-			text1.value = "";
-			if(data)
-			{
-				for(var i in data)
-				{
-					var options =  new Option(data[i].cn + " ( "+ data[i].mail + " )", data[i].mail + ";" + data[i].uid, false, false);
-					select_contact[select_contact.length] = options;
-				}
-			}
-			span_load.style.display = "none";		
-		}
-		XMLTools.request('$this.contacts_im.list_contacts','POST',handler_contacts, 'ou='+organization);
-	}
-
-	IM_Preferences.prototype.preenche = function()
-	{
-		var select = document.getElementById('ImSelAddContact');
-		if(select.options.length > 0){
-			for(var i=0; i < select.options.length; i++){
-				if(select.options[i].selected == true){
-					var email = select.options[i].value.substr(0,select.options[i].value.indexOf(';'));
-					var uid = select.options[i].value.substr((select.options[i].value.indexOf(';')+1),select.options[i].value.length);
-					document.getElementById('text0').value = email;
-					document.getElementById('text1').value = select.options[i].value.substr(0,select.options[i].value.indexOf('@'));	
-					document.getElementById('text2').focus();
-					document.getElementById('text3').value = uid; 			
-				}
-			}
-		}
-	}
-	
-	IM_Preferences.prototype.Add_user = function(pFunc)
-	{
-		var text0 = document.getElementById('text0');
-		var text1 = document.getElementById('text1');
-		var text2 = document.getElementById('text2');
-		var text3 = ( document.getElementById('text3') != null ) ? document.getElementById('text3') : false;
-
-		var _this = this;
-		var jid   = text0.value;
-		var subscription = "";
-
-		if(func.trim(text0.value) != "" && func.trim(text1.value) != "" && func.trim(text2.value) != "")
-		{
-			var handler_add_contact = function(data)
-			{
-				IM.vcards = false;
-				IM.Vcard();
-				
-				text0.value = "";
-				text1.value = "";
-				text2.value = "";	
-
-				if(pFunc != 'divAddUser_im')
-				{
-					if(document.getElementById('im_cell_' + jid))
-					{
-						var div_jid = document.getElementById('im_cell_' + jid);
-						div_jid.parentNode.removeChild(div_jid);
-				
-						for(var i in IM.UsersNot)
-							if( IM.UsersNot[i] === jid )
-								IM.UsersNot.splice(i,1);
-	
-						im_win.windowClose(pFunc);
-						Subscription.subscribed(jid);
-						IM.setStatus(statusFlag);
-						setTimeout('Subscription.subscribe("'+jid+'")',2000);
-					}
-				}
-				else
-				{
-					Templates.Status_AddUser();
-					setTimeout("Templates.Status_AddUser();",3000);
-				}				
-				if( IM.UsersNot.length == 0 )
-					im_win.windowClose('divFormAuthUser_im');
-			}
-			var name = text1.value;
-			var group = text2.value;
-			if(text3){
-				var email = text3.value + "@" + text0.value.substr((text0.value.indexOf('@')+1),text0.value.length);
-			}else{
-				var email = text0.value;
-			}
-			XMLTools.request('$this.Ujabber.addContacts','POST',handler_add_contact,"email="+email+"&name="+name+"&group="+group);
-		}else{
-			alert("Informe todos os campos!");
-		}
-	}
-	
-	IM_Preferences.prototype.AcceptRequestUser = function(pJid)
-	{
-		Templates.AcceptRequestUser();
-   		document.getElementById('text0').value = pJid;
-   		document.getElementById('text1').value = pJid.substr(0,pJid.indexOf('@'));
-   		document.getElementById('text1').focus();
-   		document.getElementById('text1').select();
-   		document.getElementById('span0').innerHTML = pJid.substr(0,pJid.indexOf('@'));
-	}
-
-   /*
-	* Remove
-	*/
-
-	IM_Preferences.prototype.RemoveContact = function(pJid)
-	{
-		var _this = this;
-		if(!pJid)
-		{
-			var sel_box = document.getElementById('sel_contact');
-			for(var i=0; i < sel_box.options.length; i++)
-			{
-				if(sel_box[i].selected && sel_box.options[i].value != 0)
-					pJid = sel_box.options[i].value;
-			}
-		}
-		if( pJid )
-		{
-			if( confirm('Deseja remover o contato : ' + pJid) )
-			{
-				IM.vcards = false;
-				IM.Vcard();
-				var div_child = document.getElementById(pJid);
-				div_child.parentNode.removeChild(div_child);
-				_this.ComboRemoveUser(_this.LoadJids());		
-				var handler_remove_contact = function(data)
-				{
-				};
-				XMLTools.request('$this.Ujabber.removeContact','POST',handler_remove_contact,"jid="+pJid);
-			}
-		}else
-			alert('Opção inválida !!');
-	}
-	
-	IM_Preferences.prototype.Remove_userLoad = function()
-	{
-		Templates.remove_user();
-		var div_allg = document.getElementById('all_groups');
-		var _this = this;
-		_this.ComboRemoveUser(_this.LoadJids());		
-	}
-
-	IM_Preferences.prototype.ComboRemoveUser = function(pJids)
-	{
-		var sel_box = document.getElementById('sel_contact');
-		
-		if( document.getElementById('sel_contact') != null )
-		{
-			if( sel_box.options.length > 0 )
-			{
-				for(var i=0; i < sel_box.options.length; i++)
-				{
-					sel_box.options[i] = null;
-					i--;
-				}
-			}
-	
-			var opt = new Option('--- Selecione ---',0,false,true);
-			sel_box[sel_box.length] = opt;		
-			for(var i in pJids)
-			{
-				var opt = new Option(pJids[i].substr(0,pJids[i].indexOf('@')), pJids[i], false, true);
-				sel_box[sel_box.length] = opt;
-			}
-			sel_box[0].selected = true;
-		}
-	}
-
-	IM_Preferences.prototype.DenyRequestUser = function(pJid)
-	{
-		if(confirm('Deseja excluir ' + pJid + '?'))
-		{
-			var div_jid = document.getElementById('im_cell_' + pJid);
-			div_jid.parentNode.removeChild(div_jid);
-			
-			for(var i in IM.UsersNot)
-				if(IM.UsersNot[i] === pJid)
-					IM.UsersNot.splice(i,1);
-
-			if( IM.UsersNot.length == 0 )
-				im_win.windowClose('divFormAuthUser_im');
-
-			var handler_denyrequest = function(data)
-			{
-			};
-			XMLTools.request('$this.Ujabber.unsubscribe','POST',handler_denyrequest,'jid='+pJid);
-		}
-	}
-
-	/*
-	 * LoadJids
-	 */
-
-	IM_Preferences.prototype.LoadJids = function()
-	{
-		var div_allg = document.getElementById('all_groups');
-		var elements = div_allg.firstChild;
-		var jids = [];
-		while ( elements )
-		{			
-			var childs = elements.firstChild;
-			while( childs )
-			{
-				if(childs.tagName == "DIV")
-					jids[jids.length] = childs.id;
-				childs = childs.nextSibling;
-			}
-			elements = elements.nextSibling;
-		}
-		jids.sort();
-		
-		return jids;	
-	}
-	
-   /*
-    * Update
-    */
-   
-   IM_Preferences.prototype.Update_ = function(pJid,pType)
-   {
-		var div_child = document.getElementById(pJid);
-		var group = div_child.parentNode.id;
-		var name  = div_child.firstChild;
-			name = name.nextSibling.nodeValue;
-
-		if(pType)
-		{
-			var action = prompt('Digite um novo apelido para : ' + pJid, " ");
-			name = (action == "Apelido") ? "" : action ;
-		}else{
-			var action = prompt('Digite um novo grupo para : ' + pJid , " ");
-			group = action ;
-		}
-		
-		if( action != "" && action != null)
-		{
-			var handler_update_contact = function(XMLdata)
-			{
-			};
-			XMLTools.request('$this.Ujabber.updateContact','POST',handler_update_contact,"jid="+pJid+"&name="+name+"&group="+group);
-		}
-   }
-
-	IM_Preferences.prototype.Update_Group = function(pJid)
-	{
-		this.Update_(pJid,false);		
-	}
-		
-	IM_Preferences.prototype.Update_NickName = function(pJid)
-	{
-		this.Update_(pJid,true);   
-	}
-   
-   /*
-	* Vcard
-	*/
-
-	IM_Preferences.prototype.vCardInit = function()
-	{
-		var _this = this;
-		var nickname = "";
-		var message  = "";
-		var vcards   = "";
-
-		var handler_getId = function(_XMLdata)
-		{
-			var jid = _XMLdata.getElementsByTagName("retorno").item(0);
-			jid = jid.firstChild.nodeValue;
-			_this.jid = jid;
-			
-			if((vcards = _this.vCardLoad(jid)))
-			{
-				nickname = vcards.substr(vcards.indexOf('NICKNAME'),vcards.length);
-				nickname = nickname.substr(0,nickname.indexOf('|'));
-				nickname = nickname.substr(nickname.indexOf(':') + 1 , nickname.length);
-
-				message = vcards.substr(vcards.indexOf('DESC'),vcards.length);
-				message = message.substr(0,message.indexOf('|'));
-				message = message.substr(message.indexOf(':') + 1 , message.length);
-			}
-			
-			nickname = (func.trim(nickname) != "" ) ? nickname : _this.jid ;
-			message  = (func.trim(message) != "" ) ? message : "Sua Mensagem";
-			IM.custom_message = message;
-			
-			var span_nick = document.getElementById('span_nickname');
-				span_nick.innerHTML = ( nickname ) ? "<b>" + decodeURI(nickname.substring(0,15)) + "</b>" : "<b>" + IM.get_lang('Nickname') + "</b>";
-		}
-		XMLTools.request('$this.Ujabber.getJid','GET',handler_getId);
-	}
-
-	IM_Preferences.prototype.vCardLoad = function(Jid)
-	{
-		var div_jid  = document.getElementById("vcard_" + Jid);
-		var strg = div_jid.innerHTML;
-		var elements = div_jid.firstChild;
-		var exp , tag  = '';
-		
-		while ( elements )
-		{			
-			if(elements.tagName != undefined && elements.tagName.substr(0,1) != "/" )
-			{		
-				tag = elements.tagName;
-				exp = eval('/<'+tag+'>/gi');
-				strg = strg.replace(exp, tag + " : " );
-				exp = eval('/<\\/'+tag+'>/gi');
-				strg = strg.replace(exp, " | ");
-			}
-			elements = elements.nextSibling;
-		}			
-
-		return strg;
-	}
-		
-	IM_Preferences.prototype.vCard = function()
-	{
-		if(!this.jid){
-			alert('Carregando !!');
-		}else{
-			var div_jid  = document.getElementById("vcard_" + this.jid);
-			var strg = div_jid.innerHTML;
-			Templates.information_user(strg);
-		}	
-	}
-
-	IM_Preferences.prototype.vCardLoad_Contact = function(pJid)
-	{
-		if(!this.jid){
-			alert('Carregando !!');
-		}else{
-			if(document.getElementById('vcard_' + pJid) != null)
-			{
-				var vcards = document.getElementById('vcard_' + pJid);
-				Templates.information_Contact(vcards.innerHTML);
-			}else
-				alert('Vcard não carregado!');
-		}
-	}
-	
-	IM_Preferences.prototype.vCardAdd = function()
-	{
-		var Nvcard = new Array('FN','NICKNAME','ORGNAME','ORGUNIT','ROLE','BDAY','DESC');
-		var vcard = "";
-		var new_vcard = "";
-		var value = "";
-		for(var i in Nvcard)
-		{
-			if( Nvcard[i] === 'NICKNAME' )
-			{	
-				var nn = ( func.trim(document.getElementById(Nvcard[i]).value) != "") ? document.getElementById(Nvcard[i]).value : this.jid; 
-				document.getElementById('span_nickname').innerHTML = "<b>" + nn.substring(0,15) + "</b>";
-			}
-			
-			value = document.getElementById(Nvcard[i]).value;
-			new_vcard += '<'+Nvcard[i]+'>'+value+'</'+Nvcard[i]+'>';
-			value = (func.trim(value) != "") ? value : "";
-			vcard += value + "_vkrd_";
-		}
-
-		document.getElementById("vcard_" + this.jid).innerHTML = new_vcard;
-		vcard = vcard.substr(0,vcard.length - 6 );		
-
-		var handler_vcard_add = function(XMLdata)
-		{
-		};
-		XMLTools.request('$this.Ujabber.newVcard','POST',handler_vcard_add,"vcard="+escape(vcard));	
-		alert('Informações Cadastradas / Adicionadas !!!');	
-		im_win.windowClose('divInfoUser_im');
-	}
-	
-   /*
-	* IM_Preferences
-	*/
-	
-	IM_Preferences.prototype.yourPreferences = function()
-	{
-		Templates.yourPreferences();
-	}
-
-	IM_Preferences.prototype.SetYourPreferences = function()
-	{
-		var preferences = "";
-		preferences  = ( func.byId('ch_offline').checked ) ? 'ch_offline:true;' : 'ch_offline:false;';
-		if( func.byId('in_time').value )
-		{
-			var numbers = /^\d+$/;
-			if(numbers.test(func.byId('in_time').value) && func.byId('in_time').value != "0")
-				var minutes = func.byId('in_time').value;
-			else
-			{
-				alert('Informe valores válidos !');
-				func.byId('in_time').focus();
-				return false;
-			}
-		}
-
-		this.im_timer_xa = func.byId('in_time').value;
-		preferences += ( func.trim(func.byId('in_time').value )) ? 'in_time:' + func.byId('in_time').value + ";" : 'in_time:0;';
-		preferences += ( func.byId('rd_nm').checked ) ? 'rd_nm:true;' : 'rd_nm:false;';
-		preferences += ( func.byId('rd_ch').checked ) ? 'rd_ch:true' : 'rd_ch:false';
-		IM.userPrefe = preferences;
-		
-		var handler_preferences = function(XMLdata)
-		{
-			var data = XMLdata.getElementsByTagName('retorno').item(0);
-			data = eval(data.firstChild.nodeValue);
-			if(data)
-			{
-				IM.Contacts_Offline();
-				alert('Preferências salvas !');
-			}
-		};
-		XMLTools.request('$this.db_im.set_preferences','POST',handler_preferences,'preferences='+preferences);
-	}
-	
-	IM_Preferences.prototype.GetYourPreferences = function()
-	{
-		var _this = this;
-		if(!IM.userPrefe)
-		{
-			var handler_getPreferences = function(XMLdata)
-			{
-				var data = XMLdata.getElementsByTagName('retorno').item(0);
-				data = data.firstChild.nodeValue;
-				IM.userPrefe = data;
-				_this.TimerXa(_this.LoadPreferences('in_time'));
-			}
-			XMLTools.request('$this.db_im.get_preferences','GET',handler_getPreferences);
-		}
-	}
-	
-	IM_Preferences.prototype.LoadPreferences = function(pElement)
-	{
-		var preferences_im = IM.userPrefe;
-		
-		while( preferences_im !== "")
-		{
-			var values = "";
-			var value = "";
-			if(value = preferences_im.substr(0,preferences_im.indexOf(';')))
-			{
-				values = value + '\n';
-				preferences_im = preferences_im.replace(value,'');	
-			}
-			if(preferences_im.substr(0,1) == ";"){
-				preferences_im = preferences_im.substr(1,preferences_im.length);
-			}else{
-				values = preferences_im + '\n';
-				preferences_im = '';
-			}
-			
-			var ele = values.substr(0,values.indexOf(':'));
-			var val = values.substr((values.indexOf(':')+1),values.length);
-
-			if(ele == pElement)
-				return val;
-
-			if((document.getElementById(ele)!= null) && (document.getElementById(ele).type == 'text'))
-				document.getElementById(ele).value = val;
-			else
-				if(document.getElementById(ele) != null)
-					document.getElementById(ele).checked = eval(val);
-		}
-	}
-
-   /*
-    * Estado de Ausente Automático
-    */
-	
-	IM_Preferences.prototype.TimerXa = function(pTimer)
-	{
-		this.im_timer_xa = pTimer;
-		_awayTimer = setTimeout("IM.setAway()", parseInt(pTimer) * 60000 );
-	}
-
-   /*
-	*  Detalhes do Contato para Autorização
-	*/
-	
-	IM_Preferences.prototype.Info_Contact = function(pJid)
-	{
-		var element = "_span_not_" + pJid;
-		var uid = pJid.substr(0,pJid.indexOf('@'));
-		var handler_ldap =  function(data)
-		{
-			var data = func.interface(data);
-			var XMLinfoLdap = "";
-			if(data)
-			{
-				XMLinfoLdap = '<info_user>';
-				for(var i in data)			
-					XMLinfoLdap += '<item lang_name="'+IM.get_lang('Name')+'" name="'+ data[i].cn +'" lang_email="'+IM.get_lang('E-mail')+'" email="'+ data[i].mail +'" />';
-				XMLinfoLdap += '</info_user>';
-			}
-			im_menu_action.menu(element, parse_XmlXsl(XMLinfoLdap,'info_contact_ldap.xsl'));
-			if(document.getElementById('im_span_avatar') != null)
-			{
-				var span = document.getElementById('im_span_avatar');
-				var	img = func.newEl('img');
-				func.confEl(img, 'id', pJid + '_avatar');
-				func.confEl(img, 'src', img_photo.src);
-				func.confEl(img, 'style', 'height:65px;width:60px;align:right;');
-				span.appendChild(img);
-				// Foto Ldap;
-				im_win.get_photo_ldap(pJid);
-			}
-		}
-		XMLTools.request('$this.ldap_im.info_user','POST',handler_ldap,'uid='+uid);
-	}
-	
-	// Build Object	
-	var IM_Preferences = new IM_Preferences();
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_init.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_init.js	(revision 260)
+++ 	(revision )
@@ -1,15 +1,0 @@
-function init_jabber()
-{
-   try
-   {
-      if ( window.IM && window.im_win && window.func )
-         IM.load_im();
-      else
-         setTimeout('init_jabber()', 2000);
-   }
-   catch(e)
-   {
-         setTimeout('init_jabber()', 2000);
-   }
-}
-init_jabber();
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_subscription.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_subscription.js	(revision 260)
+++ 	(revision )
@@ -1,51 +1,0 @@
-// Instant Messenger
-// im_subscription.js
-
-	function Subscription()
-	{
-	}
-	
-	Subscription.prototype.subscribe = function(pJid)
-	{
-		var handler_subscribe = function(data)
-		{
-		};
-		XMLTools.request('$this.Ujabber.subscribe','POST',handler_subscribe,'jid='+pJid);
-	}		
-	
-	Subscription.prototype.subscribed = function(pJid)
-	{
-		var handler_subscribe = function(data)
-		{
-		};
-		XMLTools.request('$this.Ujabber.subscribed','POST',handler_subscribe,'jid='+pJid);
-	}
-	
-	Subscription.prototype.unsubscribe = function(pJid)
-	{
-		alert('#1 - O usuário ' + pJid + "\nnão aceitou seu convite ou o excluiu de sua lista!" );	
-	}
-	
-	Subscription.prototype.unsubscribed = function(pJid)
-	{
-		alert('#2 - O usuário ' + pJid + ' não aceitou seu convite!' );
-	}
-	
-	Subscription.prototype.RequestAutorization = function(pJid)
-	{
-		if(confirm('(Re)-requisitar Autorização para o usuário : ' + pJid))
-		{
-			var handler_requestAut = function(data)
-			{
-			};
-			XMLTools.request('$this.Ujabber.subscribe','POST',handler_requestAut,'jid='+pJid);
-		}
-	}
-
-	Subscription.prototype.complete_subscribe = function(pJid)
-	{
-		this.subscribed(pJid);
-	}
-	// Build Object;
-	
-	var Subscription = new Subscription();
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_images.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_images.js	(revision 260)
+++ 	(revision )
@@ -1,35 +1,0 @@
-// Instant Messenger
-// im_images.js
-
-		var navbar = new Image();
-		navbar.src = im_path + 'templates/default/images/navbar.png';
-		var img_group_close = new Image();
-		img_group_close.src = im_path + "templates/default/images/group_close.gif";
-		var img_group_open = new Image();
-		img_group_open.src = im_path + "templates/default/images/group_open.gif";
-		var img_available = new Image();
-		img_available.src = im_path + "templates/default/images/available.gif";
-		var img_unavailable = new Image();
-		img_unavailable.src = im_path + "templates/default/images/unavailable.gif";
-		var img_busy = new Image();
-		img_busy.src = im_path + "templates/default/images/busy.gif";
-		var img_chat = new Image();
-		img_chat.src = im_path + "templates/default/images/chat.gif";
-		var img_photo = new Image();
-		img_photo.src = im_path + "templates/default/images/photo.png";
-		var img_menu = new Image();
-		img_menu.src = im_path + "templates/default/images/menu.gif";
-		var img_chat_bubble = new Image();
-		img_chat_bubble.src = im_path + "templates/default/images/chat_bubble.gif";
-		var img_typing = new Image();
-		img_typing.src = im_path + "templates/default/images/typing.gif";
-		var img_edit = new Image();
-		img_edit.src = im_path + "templates/default/images/img/icon_edit.gif";
-		var img_xa = new Image();
-		img_xa.src = im_path + "templates/default/images/xa.gif";
-		var img_away = new Image();
-		img_away.src = im_path + "templates/default/images/away.gif";
-		var img_dnd = new Image();
-		img_dnd.src = im_path + "templates/default/images/dnd.gif";
-		var img_wait = new Image();
-		img_wait.src = im_path + "templates/default/images/wait.gif";
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_functions.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_functions.js	(revision 260)
+++ 	(revision )
@@ -1,963 +1,0 @@
-	function IM()
-	{
-	   this.vcards      = false;
-	   this.statusvcard = false;
-	   this.UsersNot	= [];
-	   this.userPrefe   = false;
-	   this.count_Vcard = 0;
-	   this._listen     = "";
-	   this.custom_message = "";
-	   this.timeout_composing = "";
-	}
-
-	IM.prototype.load_im = function()
-	{
-		this.listen();
-	    this.requireContacts();
-	    this.atalho();
-
-	    var handler_Status = function(XmlData)
-	    {
-			var data = XmlData.getElementsByTagName('retorno').item(0);
-			data = data.firstChild.nodeValue;
-			if( data )
-			{
-				if(data == 'available' || data == 'xa')
-					awayFlag = true;
-				statusFlag = data;
-				setTimeout('IM.ImgStatus("'+data+'")',4000);
-			}
-	    };
-	    XMLTools.request('$this.Ujabber.MyPresence', 'GET', handler_Status);
-	};
-
-	IM.prototype.listen = function()
-	{
-	   var _this = this;
-	   var handler = function(XMLdata)
-	   {
-	      try
-	      {
-				var data = XMLdata.documentElement;
-				if ( data.hasChildNodes() )
-				{
-					data = data.firstChild;
-					if ( data.nodeType == 3 && data.nodeValue == 'disconnected' ) 
-					{
-						document.getElementById('div_contacts').innerHTML = '<a href="javascript:void(0);" onclick="javascript:IM.reconnect();">'+_this.get_lang("Re-connect Expresso Messenger ?")+'</a>';
-						_this.ImgStatus('unavailable');
-						statusFlag = 'unavailable';
-						clearTimeout(_awayTimer);
-						return false;
-					}
-				}					
-				
-				if( !_this.userPrefe )
-				{
-					if(window.IM_Preferences)
-						IM_Preferences.GetYourPreferences();
-				}
-
-	            _this.getContacts(XMLdata);
-	            _this.getPresence(XMLdata);
-				_this.getComposing(XMLdata);
-	            _this.getMessages(XMLdata);
-				_this.getVcard(XMLdata);
-
-            	if(!_this.vcards)
-            	{
-	            	_this.Vcard();
-	            	_this.vcards = true;
-	            }
-
-	      }catch(e){}
-
-	      _this._listen = setTimeout('IM.listen()', 3000);
-	   };
-
-	   XMLTools.__RETURN_MODE__ = 'XML';
-	   XMLTools.request('$this.Ujabber.listen', 'GET', handler);
-	};
-	
-	IM.prototype.reconnect = function()
-	{
-		var _this = this;
-		var handler_reconnect = function(XMLdata)
-		{
-			if ( XMLdata.documentElement.firstChild.nodeValue == 'true' )
-			{
-				document.getElementById('div_contacts').innerHTML  = '<div><img src="' + img_wait.src + '" width="25px" heigth="25px" style="float:left;margin:3px "/>';
-				document.getElementById('div_contacts').innerHTML += '<font style="color:#0000FF;float:left;margin:9px 5px">' + _this.get_lang("Wait a moment !!") + '</font></div>';
-				setTimeout('IM.load_im()',2000);
-	           	_this.count_Vcard = 0;
-				_this.ImgStatus('available');
-				statusFlag = 'available';	   
-				_awayTimer = setTimeout("IM.setAway()", parseInt(IM_Preferences.im_timer_xa) * 60000 );				        	
-			}else{
-				document.getElementById('div_contacts').innerHTML = '<a href="javascript:void(0);" onclick="javascript:IM.reconnect();">'+_this.get_lang("Re-connect Expresso Messenger ?")+'</a>';
-				_this.ImgStatus('unavailable');
-				statusFlag = 'unavailable';				
-				return false;
-			}
-		};
-		XMLTools.__RETURN_MODE__ = 'XML';
-		XMLTools.request('$this.Ujabber.reconnect', 'GET', handler_reconnect);
- 	};
-
-   /*
-	*  Contacts
-	*/
-
-	IM.prototype.requireContacts = function()
-	{
-	   var handler = function(data)
-		{
-		};
-	   XMLTools.request('$this.Ujabber.requireContacts', 'GET', handler);
-	};
-
-	IM.prototype.getContacts = function(data)
-	{
-	   try
-	   {
-	      if ( data.getElementsByTagName('contacts').length > 0 )
-	      {
-	         var node = data.documentElement.firstChild;
-	         while ( node.nodeName != 'contacts' )
-	         	node = node.nextSibling;
-
-	         var div = document.getElementById("div_contacts");
-	         var xsl = XMLTools.load(im_path + 'xsl/contacts.xsl?' + Date.parse(new Date));
-	         var img = document.createElement('img');
-	         img.id  = 'img_all_groups';
-	         img.src = img_group_open.src;
-	         img.onclick = function(){IM.visible_group("all_groups")};
-
-	         var a = document.createElement('div');
-	         a.innerHTML = XMLTools.transform(node, xsl);
-
-	         div.innerHTML = '';
-	         div.appendChild(img);
-	         div.appendChild(document.createTextNode(this.get_lang('List of Contacts')));
-	         div.appendChild(a);
-
-			 var group = func.byId("all_groups").firstChild;
-			 while ( group )
-	         {
-					var contact = group.firstChild.nextSibling;
-					while ( contact = contact.nextSibling )
-					{
-						var img = func.newEl('img');
-						img.src = img_unavailable.src;
-
-						func.insElB(img, func.byId(contact.id).firstChild);
-					}
-
-					try
-					{
-						var img = document.createElement('img');
-						img.src = img_group_open.src;
-						img.id = "img_" + group.id;
-						var el_parent = group;
-
-						el_parent.insertBefore(img,el_parent.firstChild);
-
-					} catch(e){}
-					group = group.nextSibling;
-	         }
-	      }
-	   }catch(e){}
-
-	};
-
-   /*
-	*  Visible / Unvisible
-	*/
-
-	IM.prototype.visible_group = function(el)
-	{
-		var _this = this;
-		var divParent = document.getElementById(el);
-		divParent.style.display = "none";
-		var img = document.getElementById("img_" + el);
-		img.onclick = function(){_this.unvisible_group(el)};
-		img.src = img_group_close.src;
-	}
-
-	IM.prototype.unvisible_group = function(el)
-	{
-		var _this = this;
-		var div = document.getElementById(el);
-		div.style.display = "";
-		var img = document.getElementById("img_" + el);
-		img.onclick = function(){_this.visible_group(el)};
-		img.src = img_group_open.src;
-	}
-
-	/*
-	 * Presence
-	 */
-
-	IM.prototype.getPresence = function(data)
-	{
-	   try
-	   {
-	      var presence = data.documentElement.firstChild;
-		  var _this = this;
-	      while ( presence )
-	      {
-		      if ( presence.nodeName != 'presence' )
-		      {
-                 presence = presence.nextSibling;
-		         continue;
-		      }
-
-				var from = presence.getAttribute('from');
-				var type = presence.getAttribute('type');
-				if ( presence.hasChildNodes() )
-					var status_message = presence.firstChild.nodeValue;
-				else
-					var status_message = false;
-
-				if( from )
-				{
-			         switch ( type )
-			         {
-			         	case 'subscribe' :
-			         		if ( !func.byId(from) )
-								_this.UsersNot[_this.UsersNot.length] = from;
-							else
-							{
-								Subscription.subscribed(from);
-								this.setStatus(statusFlag);
-							}
-						break;
-			         	case 'subscribed' :
-			         		//
-			         	break;
-			         	case 'unsubscribe' :
-			         		Subscription.unsubscribe(from);
-			         		type = 'unavailable';
-			         		func.byId(from).firstChild.src = eval('img_' + type + '.src');
-			         		break;
-			         	case 'unsubscribed' :
-			         		Subscription.unsubscribed(from);
-			         		type = 'unavailable';
-			         		func.byId(from).firstChild.src = eval('img_' + type + '.src');
-			         		break;
-			         	default :
-			     			if ( func.byId(from) )
-			     			{
-			     				func.byId(from).firstChild.src = eval('img_' + type + '.src');
-			     				var status;
-
-			     				if ( (status = func.byId(from + '_im_window')) )
-			     				{
-						        	status.firstChild.style.background = 'url('+func.byId(from).firstChild.src+')';
-									status = func.byId(from + '_im_window_message');
-						        	if( status_message && status_message != "available" )
-						        		status.innerHTML = from.substr(0, from.indexOf('@')) + ' : ' + status_message;
-						        	else
-						        		status.innerHTML = '';
-						        }
-
-	     						if( document.getElementById('status_message_' + from) == null)
-	     						{
-		     						var lbl = document.createElement('label');
-		     						lbl.id = 'status_message_' + from;
-		     						if(!status_message)
-		     							lbl.innerHTML = "";
-		     						else
-		     							if( status_message != "available" )
-				     						lbl.innerHTML = "<span style='margin-left:10px'><br/> ( " + status_message + " )</span>";
-									func.byId(from).appendChild(lbl);
-		     					}else{
-									var lbl = document.getElementById('status_message_' + from);
-		     						if(!status_message)
-		     							lbl.innerHTML = "";
-		     						else
-		     							if( status_message != "available" )
-				     						lbl.innerHTML = "<span style='margin-left:10px'><br/> ( " + status_message + " )</span>";
-		     					}
-			     			}
-			         }
-				 }
-			    if( _this.UsersNot.length > 0 )
-			  		Templates.Users_Not_Auth(_this.UsersNot);
-	         presence = presence.nextSibling;
-	      }
-	      _this.Contacts_Offline();
-	   }catch(e){}
-	};
-
-	/*
-	 * Contatos - Offline
-	 */
-
-	IM.prototype.Contacts_Offline = function()
-	{
-		 var offline = true;
-		 if(IM.userPrefe)
-		 	offline = eval(IM_Preferences.LoadPreferences('ch_offline'));
-		 else
-		 	offline = eval(IM_Preferences.LoadPreferences('ch_offline'));
-
-		 var group = func.byId("all_groups").firstChild;
-		 while ( group )
-         {
-			var contact = group.firstChild;
-			while ( contact )
-			{
-				if(contact.tagName == "DIV")
-				{
-					var childF = contact.firstChild;
-					if( childF.src == img_unavailable.src && !offline)
-						func.byId(contact.id).style.display = "none";
-					else
-						func.byId(contact.id).style.display = "block";
-				}
-				contact = contact.nextSibling;
-			}
-			group = group.nextSibling;
-         }
-	}
-
-	/*
-	 * Get / Send - Messages
-	 */
-
-	IM.prototype.getMessages = function(data)
-	{
-	   try
-	   {
-	      data = data.documentElement;
-	      if ( data.childNodes.length > 0 )
-	      {
-	         var message = data.firstChild;
-	         while ( message )
-	         {
-	            if ( message.tagName == 'messages' )
-	            {
-	               var from = message.getAttribute('from');
-	               with ( from )
-	                  from = substr(0, indexOf('/'))
-
-	               if( document.getElementById('vcard_' + from) != null)
-	               {
-						var vcards = IM_Preferences.vCardLoad(from);
-						var nickname = vcards.substr(vcards.indexOf('NICKNAME'),vcards.length);
-						    nickname = nickname.substr(0,nickname.indexOf('|'));
-						    nickname = nickname.substr(nickname.indexOf(':') + 1 , nickname.length);
-						    nickname = ( func.trim(nickname) != "" ) ? nickname : from ;
-				   }
-				   else
-				      var nickname = from;
-				  
-				   if(nickname.indexOf('@') != -1)	
-				   		nickname = nickname.substr(0,nickname.indexOf('@'));
-
-	               var win = document.getElementById(from + '_chatMessages');
-	               if ( !win )
-	               {
-	                  im_win.open_chat(from);
-	                  win = document.getElementById(from + '_chatMessages');
-	               }
-
-	               var el = message.firstChild;
-	               while ( el )
-	               {
-	                  var xsl = XMLTools.load(im_path + 'xsl/message.xsl?' + Date.parse(new Date));
-	                  var next = el.nextSibling;
-
-	                  var label = document.createElement('strong');
-	                  label.appendChild(document.createTextNode(nickname));
-
-	                  win.appendChild(label);
-	                  win.appendChild(document.createElement('br'));
-	                  var msg = XMLTools.transform(el, xsl);
-	                  win.innerHTML += this.emotions_icons(msg);
-	                  win.appendChild(document.createElement('br'));
-	                  win.appendChild(document.createElement('br'));
-	                  win.scrollTop = win.scrollHeight;
-			   		  im_win.newMessageNotification();
-
-	                  el = next;
-	               }
-	            }
-
-				if ( (composing = func.byId(from + '_composing')) )
-					if ( composing.style.display = 'block' )
-						composing.style.display = 'none';
-
-	            message = message.nextSibling;
-	         }
-	      }
-	   }catch(e){}
-	}
-
-	IM.prototype.sendMessage = function (pJID)
-	{
-	   var _this = this;
-	   var name_document = document.getElementById(pJID + '_edita');
-	   var envio = name_document.contentWindow.document.getElementsByTagName('body').item(0);
-
-	   var imgs = envio.getElementsByTagName('img');
-	   var cod;
-	   var emotion_regexp;
-
-	   for ( i = imgs.length - 1; i > -1; i--)
-	   {
-	      if ( (cod = imgs[i].getAttribute('emotion')) )
-		  {
-			 emotion_regexp = new RegExp('<img[^>]*?emotion="' + cod_emotions[cod][1] + '"[^>]*?>', "i");
-             envio.innerHTML = envio.innerHTML.replace(emotion_regexp, cod);
-          }
-	      else
-	         imgs[i].parentNode.removeChild(imgs[i]);
-	   }
-
-	   envio.innerHTML = func.trim(envio.innerHTML);
-	   envio.innerHTML = envio.innerHTML.replace(/&nbsp;| +/gi, ' ');
-	   envio.innerHTML = envio.innerHTML.replace(/<br[^>]*>/gi, '<br />');
-
-	   if ( envio.innerHTML != "" )
-	   {
-	      var message_text  = "<div style='";
-	      message_text += (envio.style.fontFamily != "") ? "font-family:"+envio.style.fontFamily+";" : "";
-	      message_text += (envio.style.fontSize != "") ? "font-size:"+envio.style.fontSize+";" : "" ;
-	      message_text += (envio.style.fontWeight != "") ? "font-weight:"+envio.style.fontWeight+";": "";
-	      message_text += (envio.style.fontStyle != "" ) ? "font-style:"+envio.style.fontStyle+";" : "";
-	      message_text += (envio.style.color != "") ? "color:"+envio.style.color+";" : "color:black";
-	      message_text += "'>";
-	      message_text += envio.innerHTML + "</div>";
-
-	   	  message_text = message_text.replace(/&nbsp;| +/gi, ' ');
-	   	  message_text = message_text.replace(/<br[^>]*>/gi, '<br />');
-
-	      envio.innerHTML = '';
-
-	      var message_element = document.getElementById(pJID + '_chatMessages');
-	      var nickname = "me ";
-		  if( IM_Preferences.jid )
-		  {
-			  var vcards = IM_Preferences.vCardLoad(IM_Preferences.jid);
-			  nickname = vcards.substr(vcards.indexOf('NICKNAME'),vcards.length);
-			  nickname = nickname.substr(0,nickname.indexOf('|'));
-			  nickname = nickname.substr(nickname.indexOf(':') + 1 , nickname.length);
-			  nickname = (func.trim(nickname) != "") ? nickname : IM_Preferences.jid;
-			  if(nickname.indexOf('@') != -1)	
-				nickname = nickname.substr(0,nickname.indexOf('@'));
-		  }
-
-	      message_element.innerHTML += '<strong>' + nickname + ' ';
-	      message_element.innerHTML += ' ' + _this.get_lang('speak') + ':</strong><br />';
-		  message_element.innerHTML += this.emotions_icons(message_text) + '<br />';
-	      message_element.scrollTop = message_element.scrollHeight;
-
-	      var handler_sendMessage = function(data)
-	      {
-			 var data = func.interface(data);
-	         if(!data)
-	            alert(data);
-	      }
-	   	  XMLTools.request('$this.Ujabber.SendMessage','POST',handler_sendMessage,"to="+pJID+"&body="+escape(message_text));
-	   }
-	};
-    
-    /*
-     * Composing / GetComposing / Paused Message
-     */
-
-	IM.prototype.getComposing = function(data)
-	{
-		if ( data.hasChildNodes() )
-		{
-			var node = data.documentElement.firstChild;
-			while ( node )
-			{
-				var composing;
-				if ( node.nodeName == 'composing' )
-					if ( (composing = func.byId(node.getAttribute('from') + '_composing')) )
-						if ( composing.style.display = 'none' )
-							composing.style.display = 'block';
-
-				if ( node.nodeName == 'paused' )
-					if ( (composing = func.byId(node.getAttribute('from') + '_composing')) )
-						if ( composing.style.display = 'block' )
-							composing.style.display = 'none';
-
-				node = node.nextSibling;
-			}
-		}
-	};
-	
-	IM.prototype.composingMessage = function(pId)
-	{
-		if( IM.timeout_composing )
-		{	
-			clearTimeout(IM.timeout_composing);
-			IM.timeout_composing = eval('setTimeout("IM.pausedMessage(\'' + pId + '\')",2000)');
-		}
-		else
-		{
-			IM.timeout_composing = eval('setTimeout("IM.pausedMessage(\'' + pId + '\')",2000)');
-			var handler_composingMessage = function(data)
-			{
-			};
-			XMLTools.request('$this.Ujabber.composingMessage', 'POST', handler_composingMessage,"to="+pId);
-		}
-	};
-	
-	IM.prototype.pausedMessage = function(pId)
-	{
-		clearTimeout(IM.timeout_composing);
-		IM.timeout_composing = "";
-		var handler_pausedMessage = function(data)
-		{
-		};
-		XMLTools.request('$this.Ujabber.pausedMessage','POST',handler_pausedMessage,"to="+pId);
-	};
-
-	/*
-	 * Get_lang
-	 */
-
-	IM.prototype.get_lang = function(_key, _arg1, _arg2, _arg3, _arg4)
-	{
-	   var _value = "";
-
-	   if ( !lang_im[_key.toLowerCase()] )
-	      return _key + "*";
-
-	   _value = lang_im[_key.toLowerCase()];
-
-	   if ( _arg1 || _arg2 ||_arg3 || _arg4 )
-	   {
-	      for (j = 1; j <= 4; j++ )
-	         if( eval("_arg"+j) )
-	         {
-	            var regExp = new RegExp("%" + j + "");
-	            _value = _value.replace(regExp, eval("_arg"+j));
-	         }
-	   }
-
-	   return _value;
-	};
-
-	IM.prototype.getWinContactsState = function()
-	{
-	   try
-	   {
-	      var win_state = false;
-	          win_state = ( windowItems['contacts'].state == WINDOW_STATE_REGULAR ) ? true : false;
-	          win_state = ( win_state ) ? win_state : ( windowItems['contacts'].state == WINDOW_STATE_MAXIMIZED ) ? true : false;
-	      return win_state;
-
-	   }catch(e){}
-	};
-
-	IM.prototype.showContacts = function()
-	{
-	   if ( this.getWinContactsState() )
-	      im_win.windowClose('contacts_im');
-	   else
-	   {
-	      im_win.windowMaximizeRestore('contacts_im');
-	   }
-	};
-
-   /*
-	*  Smiles
-    */
-
-    IM.prototype.emotions_icons = function(pEmotion)
-    {
-	   var emotion_regexp;
-	   for ( i in cod_emotions )
-       {
-		  try
-		  {
-			 emotion_regexp = new RegExp(cod_emotions[i][1], 'gi');
-             if ( emotion_regexp.test(pEmotion) )
-             {
-                var image = eval('smile_' + cod_emotions[i][0] + '.src.substr(smile_' +cod_emotions[i][0]  + '.src.indexOf(im_path))');
-			    emotion_regexp = new RegExp(cod_emotions[i][1], 'gi');
-                pEmotion = pEmotion.replace(emotion_regexp, '<img emotion="' + i + '" src="' + image + '">');
-             }
-		  }catch(e){}
-       }
-       return pEmotion;
-    }
-
-	IM.prototype.atalho = function()
-	{
-	   if ( (local = func.byId('user_info')) && !(func.byId('myStatus')) )
-	   {
-         var aux  = new Array();
-         var _mix = func.newEl('a', 'a', 'img', 'img', 'dl');
-
-         var fast_menu_link  = _mix[0];
-         var contacts_link   = _mix[1];
-         var fast_menu_image = _mix[2];
-         var contacts_image  = _mix[3];
-         var im_fast_menu    = _mix[4];
-
-         fast_menu_link.onclick = function(){IM.showFastMenu();};
-         contacts_link.onclick  = function(){IM.showContacts();};
-
-         aux['fast_menu_image'] = new Array();
-         aux['fast_menu_image']['element'] = fast_menu_image;
-         aux['fast_menu_image']['style']   = 'width:9px;height:9px';
-         aux['fast_menu_image']['src']     = im_path + 'templates/default/images/menuarwopen.gif';
-
-         aux['im_fast_menu'] = new Array();
-         aux['im_fast_menu']['element'] = im_fast_menu;
-         aux['im_fast_menu']['id']      = 'fast_menu_im';
-         aux['im_fast_menu']['class']   = 'menu_im';
-
-         aux['contacts_image'] = new Array();
-         aux['contacts_image']['element'] = contacts_image;
-         aux['contacts_image']['id']      = 'myStatus';
-         aux['contacts_image']['src']     = eval('img_' + statusFlag + '.src');
-         aux['contacts_image']['style']   = 'width:15px;height:15px';
-         func.confEl(aux);
-
-         func.insEl(fast_menu_image, fast_menu_link);
-         func.insEl(contacts_image, contacts_link);
-         func.insElB(fast_menu_link, contacts_link, im_fast_menu, document.createTextNode(' '), local.firstChild);
-	   }
-	   else
-	      setTimeout('IM.atalho()', 5000);
-	};
-
-	/*
-	 * Vcard
-	 */
-
-	IM.prototype.Vcard = function()
-	{
-		var _this = this;
-		if( _this.count_Vcard < 4)
-		{
-			var handler_getVcard = function(_XMLdata)
-			{
-				var data = _XMLdata.getElementsByTagName('retorno').item(0);
-				data = eval(data.firstChild.nodeValue);
-				if(!data)
-					setTimeout("IM.Vcard()",2000);
-				_this.count_Vcard++;
-			};
-	   		XMLTools.request('$this.Ujabber.Vcard','GET',handler_getVcard);
-	   	}else{
-			var handler_getVcardUser = function(XMLdata)
-			{
-			};
-	   		XMLTools.request('$this.Ujabber.VcardUser','GET',handler_getVcardUser);
-	   	}
-
-	};
-
-	IM.prototype.getVcard = function(data)
-	{
-		  var _this = this;
-		  try
-		  {
-			     if ( data.getElementsByTagName('vcard').length > 0  && !_this.statusvcard )
-			     {
-			         var div = document.getElementById("im_vcard_contacts");
-			         var xsl = XMLTools.load(im_path + 'xsl/vcard_contacts.xsl?' + Date.parse(new Date));
-			         _this.statusvcard = true;
-
-			         div.innerHTML = "";
-			         div.innerHTML += XMLTools.transform(data, xsl);
-		 	         IM_Preferences.vCardInit();			         
-				 }
-
-
-		  }catch(e){}
-	};
-
-	IM.prototype.open_chat = function(pJID)
-	{
-	   im_win.open_chat(pJID);
-	};
-
-	IM.prototype.action_button = function(pEv, pJid)
-	{
-		try
-		{
-			if ( pEv.button > 1 )
-			{
-				var posx = 0;
-				var posy = 0;
-				if (pEv.pageX || pEv.pageY)
-				{
-					posx = pEv.pageX;
-					posy = pEv.pageY;
-				}
-				else if (pEv.clientX || pEv.clientY)
-				{
-					posx = pEv.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
-					posy = pEv.clientY + document.body.scrollTop + document.documentElement.scrollTop;
-				}
-				this.menu_button_right(pJid, posx, posy);
-				document.oncontextmenu = new Function("return false");
-			}
-			else
-				if ( func.byId(pJid).firstChild.src != img_unavailable.src )
-					this.open_chat(pJid);
-		}catch(e){}
-	};
-
-	IM.prototype.menu_button_right = function(pElement, pX, pY)
-	{
-	   var form_menu_button_right = '<dl style="z-index:99999">'+
-	                                '<dt><a href="javascript:void(0);" onclick="javascript:IM_Preferences.Update_NickName(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Nick') + '</a>'+
-	                                '<dt><a href="javascript:void(0);" onclick="javascript:IM_Preferences.Update_Group(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Group') + '</a>'+
-	                                '<dt><a href="javascript:void(0);" onclick="javascript:IM_Preferences.RemoveContact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('Delete') + '</a>'+
-									'<dt><a href="javascript:void(0);" onclick="javascript:Subscription.RequestAutorization(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('(Re)-requisitar Autorização') + '</a>' +	                                
-	                                '<dt><a href="javascript:void(0);" onclick="javascript:IM_Preferences.vCardLoad_Contact(\''+pElement+'\');"><img src="'+img_group_close.src+'">' + IM.get_lang('See Info') + '</a>'+
-	                                '</dl>';
-	   im_menu_action.menu('menu_contato', form_menu_button_right);
-	   func.byId('menu_contato').style.top = pY-10;
-	   func.byId('menu_contato').style.left = pX-10;
-	   func.byId('menu_contato').style.zIndex = zValue + 10;
-	};
-
-	/*
-	 * Menu
-	 */
-
-	IM.prototype.menu_preferences = function()
-	{
-		  var posx = 0;
-		  var posy = 0;
-		  var pEv = arguments[0];
-
-		  if (pEv.pageX || pEv.pageY)
-		  {
-			  posx = pEv.pageX;
-			  posy = pEv.pageY;
-		  }
-		  else if (pEv.clientX || pEv.clientY)
-		  {
-			  posx = pEv.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
-			  posy = pEv.clientY + document.body.scrollTop + document.documentElement.scrollTop;
-		  }
-
-		  var p_element = document.getElementById(arguments[1]);
-		  var _xmlDoc = "";
-		  var _this = this;
-
-		  _xmlDoc = '<menu>' +
-						'<item function="IM_Preferences.Add_userLoad()" lang="'+IM.get_lang('Add Contact')+'"/>' +
-						'<item function="IM_Preferences.Remove_userLoad()" lang="'+IM.get_lang('Remove Contact')+'"/>' +
-						'<item function="IM_Preferences.vCard()" lang="'+IM.get_lang('Vcard')+'"/>' +
-						'<item function="IM_Preferences.yourPreferences()" lang="'+IM.get_lang('preferences')+'"/>' +
-					'</menu>';
-
-	      im_menu_action.menu(p_element.id,parse_XmlXsl(_xmlDoc,'menu_preferences.xsl'));
-	      func.byId(p_element).style.top = posy;
-	      func.byId(p_element).style.left = posx;
-	      func.byId(p_element).style.zIndex = zValue + 10;
-
-	      _this.Load_Images_menu();
-	}
-
-	IM.prototype.Load_Images_menu = function(Element)
-	{
-		try
-		{
-			var group = document.getElementById("dl_im_menu_preferences");
-			var Child =  group.childNodes;
-
-			for(var i = 0; i < Child.length; i++)
-			{
-				var img = document.createElement('img');
-				img.src = img_menu.src;
-				Child[i].firstChild.insertBefore(img, Child[i].firstChild.firstChild);
-			}
-		}catch(e){}
-	}
-
-   /*
- 	*  Função Provisória - By AlC
- 	*/
-
-	function parse_XmlXsl(_xmlDoc, form_xsl)
-	{
-		  var xslWin = false;
-
-		  if ( !xslWin ) xslWin = XMLTools.load(im_path + 'xsl/' + form_xsl + '?' + Date.parse(new Date));
-
-		  a = document.createElement('div');
-		  if (window.ActiveXObject)
-		  {
-		     var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
-		     xmlDoc.async = "false";
-		     xmlDoc.loadXML(_xmlDoc);
-		  }
-		  else
-		  {
-		     var parser = new DOMParser();
-		     var xmlDoc = parser.parseFromString(_xmlDoc, "text/xml");
-		  }
-		  a.innerHTML = XMLTools.transform(xmlDoc, xslWin);
-
-		  return a;
-
-	}
-
-   IM.prototype.showFastMenu = function()
-   {
-		 var _dt = func.newEl('dt', 'dt', 'dt', 'dt', 'dt');
-		 var _a  = func.newEl('a', 'a', 'a', 'a', 'a');
-
-		 for ( var i in _dt )
-		 {
-		    if ( typeof _dt[i] == 'function' )
-		       continue;
-		    eval('var option' + (parseInt(i)+1) + ' = _dt[' + i + '];');
-		    eval('var option' + (parseInt(i)+1) + '_link = _a[' + i + '];');
-		 }
-
-		 var _img = func.newEl('img', 'img', 'img', 'img','img');
-
-		 for ( var i in _img )
-		 {
-		    if ( typeof _dt[i] == 'function' )
-		       continue;
-		    eval('var option' + (parseInt(i)+1) + '_image = _img[' + i + '];');
-		 }
-		
-		 option1_link.onclick = function(){statusFlag = 'available'; IM.setStatus('available');};
-		 option2_link.onclick = function(){statusFlag = 'xa'; awayFlag = false; IM.setStatus('xa');};
-		 option3_link.onclick = function(){statusFlag = 'dnd'; IM.setStatus('dnd');};
-		 option4_link.onclick = function(){statusFlag = 'unavailable'; IM.setStatus('unavailable');};
-		 option5_link.onclick = function(){IM.setStatus('custom')};
-
-		 func.confEl(option1_image, 'src', img_available.src);
-		 func.confEl(option1_image, 'style', 'width:16px;height:16px;cursor:pointer;');
-		 func.confEl(option2_image, 'src', img_xa.src);
-		 func.confEl(option2_image, 'style', 'width:16px;height:16px;cursor:pointer;');
-		 func.confEl(option3_image, 'src', img_dnd.src);
-		 func.confEl(option3_image, 'style', 'width:16px;height:16px;cursor:pointer;');
-		 func.confEl(option4_image, 'src', img_unavailable.src);
-		 func.confEl(option4_image, 'style', 'width:16px;height:16px;cursor:pointer;');
-		 func.confEl(option5_image, 'src', img_edit.src);
-		 func.confEl(option5_image, 'style', 'width:16px;height:16px;cursor:pointer;');
-
-		 func.insEl(option1_image, IM.get_lang('online'), option1_link);
-		 func.confEl(option1_link, 'style','cursor:pointer;');
-		 func.insEl(option1_link, option1);
-
-		 func.insEl(option2_image, IM.get_lang('away'), option2_link);
-		 func.confEl(option2_link, 'style','cursor:pointer;');
-		 func.insEl(option2_link, option2);
-
-		 func.insEl(option3_image, IM.get_lang('busy'), option3_link);
-		 func.confEl(option3_link, 'style','cursor:pointer;');
-		 func.insEl(option3_link, option3);
-
-		 func.insEl(option4_image, IM.get_lang('offline'), option4_link);
-		 func.confEl(option4_link, 'style','cursor:pointer;');
-		 func.insEl(option4_link, option4);
-
-		 func.insEl(option5_image, IM.get_lang('Custom message...'), option5_link);
-		 func.confEl(option5_link, 'style','cursor:pointer;');
-		 func.insEl(option5_link, option5);
-
-		 im_menu_action.menu('fast_menu_im', option1, option2, option3, option4, option5);
-   };
-
-	IM.prototype.setStatus = function(pStatus)
-	{
-		try
-		{
-			var handler = function()
-			{
-			};
-
-			if ( func.byId('fast_menu_im').style.display == 'block' )
-				im_menu_action.menu('fast_menu_im', null);
-			
-			if ( pStatus == 'custom' )
-			{
-				pStatus = prompt('Personalize seu Status : ', this.custom_message);
-				pStatus = 'show=' + statusFlag + '&status=' + pStatus;
-			}
-			else
-			{
-				if ( pStatus == 'unavailable' )
-				{
-					this.ImgStatus(pStatus);
-					pStatus = 'type=' + pStatus;
-				}
-				else
-				{
-					try
-					{
-						this.ImgStatus(pStatus);
-						pStatus = 'show=' + pStatus;
-					}catch(e){}
-				}
-			}
-			XMLTools.request('$this.Ujabber.setPresence', 'POST', handler, pStatus);
-		}catch(e){}
-	};
-
-   IM.prototype.ImgStatus = function(pStatus)
-   {
-		var myStatus;
-		if ( (myStatus = func.byId('myStatus')) )
-			myStatus.src = eval('img_' + pStatus + '.src');
-   };
-
-   IM.prototype.setAway = function()
-   {
-      if(statusFlag != 'dnd' && statusFlag != 'unavailable')
-      {
-		  if ( awayFlag )
-	      {
-		     this.setStatus('available');
-		     statusFlag = 'available';
-	         awayFlag = false;
-	      }
-	      else
-	      {
-	         this.setStatus('xa');
-	   	     statusFlag = 'xa';
-	       	 awayFlag = true;
-	      }		
-      }
-   };
-
-	IM.prototype.infoContact = function(pUid)
-	{
-		try
-		{
-			var info = false;
-			var div_allg = document.getElementById('all_groups');
-			var elements = div_allg.firstChild;
-			while ( elements )
-			{
-				var childs = elements.firstChild;
-				while( childs )
-				{
-					if(childs.tagName == "DIV" && childs.id.indexOf(pUid) === 0 )
-					{
-						info = {'jid':childs.id, 'src':childs.firstChild.src};
-						break;
-					}
-					childs = childs.nextSibling;
-				}
-				if ( !info )
-					elements = elements.nextSibling;
-				else
-					break;
-			}
-			return info;
-		}catch(e){return false;}
-	};
-
-var IM = new IM();
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_conf_font.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_conf_font.js	(revision 260)
+++ 	(revision )
@@ -1,55 +1,0 @@
-var im_conf_font = {
-    
-    content   : null,
-	
-	"get_element" : function()
-	{
-		var _document = document.getElementById(im_win.chat_pJid + '_edita');
-		this.content = _document.contentWindow.document.getElementsByTagName('body').item(0);
-
-	},
-
-	"changeFont" : function(nameFont)
-	{
-  	    this.get_element();
-	    this.content.style.fontFamily = nameFont;
-	    this.content.innerHTML = this.content.innerHTML;
-	    im_win.hideFontNameSelection();
-	},
-	
-	"changeSizeFont" : function(SizeFont)
-	{
-		this.get_element();
-		this.content.style.fontSize = SizeFont;
-		this.content.innerHTML = this.content.innerHTML;
-		im_win.hideFontSizeSelection();
-	},
-	
-	"changeFontColor" : function(ColorFont)
-	{
-		this.get_element();
-		this.content.style.color = ColorFont;
-		this.content.innerHTML = this.content.innerHTML;
-		im_win.hideFontColorSelection();
-	},
-	
-	"changeFontStyle" : function(StyleFont)
-	{
-		this.get_element();
-		if(StyleFont == "bold")
-			this.content.style.fontWeight = "bold";
-		else{
-			this.content.style.fontWeight = "normal";
-			this.content.style.fontStyle = StyleFont;
-		}
-		this.content.innerHTML = this.content.innerHTML;
-		im_win.hideFontStyleSelection();
-	},
-	
-	"defaultOptions" : function()
-	{
-		this.content.style.fontStyle = "normal"	;
-		this.content.style.color = "000000";
-		this.content.style.fontStyle = "10pt";
-	}
-}
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_var_globals.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_var_globals.js	(revision 260)
+++ 	(revision )
@@ -1,96 +1,0 @@
-/**
-* @AUTHOR: [NUTS] Rodrigo Souza
-* @DATE: 2006/10/23 11:37:30
-* @LAST CHANGE: Qui 14 Dez 2006 14:28:12 BRST::
-**/
-
-var focusFlag = true;
-
-window.document.onblur = windowBlur;
-window.document.onfocus = windowFocus;
-window.document.onclick = windowFocus;
-window.document.onmouseover = awayTimer;
-
-var window_title = document.title;
-
-var statusFlag = 'available';
-var awayFlag = false;
-var _awayTimer = null;
-
-function awayTimer()
-{
-	if( awayFlag )
-		IM.setAway();
-	
-	if(window.IM_Preferences)
-	{
-		if( _awayTimer )
-			clearTimeout(_awayTimer);
-		_awayTimer = setTimeout("IM.setAway()", parseInt(IM_Preferences.im_timer_xa) * 60000 );
-	}
-}
-
-awayTimer();
-
-function windowBlur() 
-{
-	try{
-		focusFlag = false; 
-		document.title = window_title;
-	}catch(e){}
-}
-function windowFocus()
-{
-	try{
-		focusFlag = true; 
-		document.title = window_title;
-	}catch(e){}
-}
-
-var WINDOW_STATE_REGULAR = "regular";
-var WINDOW_STATE_MINIMIZED = "minimized";
-var WINDOW_STATE_MAXIMIZED = "maximized";
-var WINDOW_STATE_CLOSED = "closed";
-
-var TASKBAR_STATE_SELECTED = "selected";
-var TASKBAR_STATE_UNSELECTED = "unselected";
-var TASKBAR_STATE_MINIMIZED = "minimized";
-var TASKBAR_STATE_FLASH = "flash";
-
-var windowState = WINDOW_STATE_REGULAR;
-var taskbarItems = new Object();
-var windowItems = new Object();
-
-var zValue = 1000;
-
-var TASKBAR_HEIGHT=27;
-
-var ACTIVE_OBJECTID = "contacts";
-	
-var isEmotionSelectionVisible = false;
-var isFontNameSelectionVisible = false;
-var isFontSizeSelectionVisible = false;
-var isFontColorSelectionVisible = false;
-var isFontStyleSelectionVisible = false;
-var activeChatWindowId = "";
-
-var newMessageTimer;
-var messages_timeout = false;
-var contacts_timeout = false;
-
-var im_busy = false;
-
-var cod_emotions = {
-	":)" : [1,"\\\:\\\)"],
-	":d" : [2,"\\\:d"],
-	";)" : [3,"\\\;\\\)"],
-	":o" : [4,"\\\:o"],
-	":p" : [5,"\\\:p"],
-	"(h)" : [6,"\\\(h\\\)"],
-	":@" : [7,"\\\:\\\@"],
-	":$" : [8,"\\\:\\\$"],
-	":s" : [9,"\\\:s"],
-	":(" : [10,"\\\:\\\("],
-	":'(" : [11,"\\\:\\\'\\\("],
-	":|" : [12,"\\\:\\\|"]
-};
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/XMLTools.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/XMLTools.js	(revision 260)
+++ 	(revision )
@@ -1,177 +1,0 @@
-var XMLTools = {
-   "__DEBUG__" : false,
-   "__DEFAULT_URI__" : im_path + 'controller.php?action=',
-   "__HTTP__" : null,
-   "__MODE__" : 'X',
-   "__RETURN_MODE_DEFAULT__" : 'JSON',
-   "__RETURN_MODE__" : false,
-   "__THREADS__" : [],
-   "http" : function()
-   {
-      try
-      {
-         this.__HTTP__ = new XMLHttpRequest();
-         this.__HTTP__.overrideMimeType('text/xml');
-      }
-      catch (e)
-      {
-         try
-         {
-            this.__HTTP__ = new ActiveXObject('Msxml2.XMLHTTP');
-         }
-         catch (e1)
-         {
-            try
-            {
-               this.__HTTP__ = new ActiveXObject('Microsoft.XMLHTTP');
-            }
-            catch (e2)
-            {
-               this.__HTTP__ = null;
-            }
-         }
-      }
-   },
-   "load" : function(pFile)
-   {
-      var data = null;
-      if ( document.implementation.createDocument )
-	     data = document.implementation.createDocument("", "", null);
-      else
-         data = new ActiveXObject("Msxml2.FreeThreadedDOMDocument");
-
-      data.async = false;
-      data.load(pFile);
-      return data;
-   },
-   "request" : function(pTarget, pMethod, pHandler, pData)
-   {
-      if ( typeof pHandler != 'function' || this.__THREADS__[pTarget] )
-         return false;
-
-      var __this = this;
-      var __pTarget = pTarget
-      this.http();
-      var __HTTP__ = this.__HTTP__;
-      this.__THREADS__[pTarget] = pHandler;
-
-      var __handler = function ()
-      {
-         try
-         {
-            if ( __HTTP__.readyState == 4 )
-            {
-               switch ( __HTTP__.status )
-               {
-                  case 200:
-                        var data = ( __this.__MODE__ == 'X' ) ?
-                                    __HTTP__.responseXML :
-                                    __HTTP__.responseText;
-
-                        var handler = __this.__THREADS__[__pTarget];
-                        delete __this.__THREADS__[__pTarget];
-                        handler(data, __pTarget);
-                  break; /* [case : status 200] */
-                  case 404:
-                        alert('Page Not Found!');
-                  break; /* [case : status 404] */
-                  default:
-               }
-            }
-         }
-         catch(e)
-         {
-            if ( __this.__DEBUG__ ) alert("request : #2\n\n" + e)
-         }
-      }
-
-      try
-      {
-         var target = this.__DEFAULT_URI__ + pTarget;
-         if ( this.__RETURN_MODE__ )
-         {
-            target += '&returnMode=' + this.__RETURN_MODE__;
-            this.__RETURN_MODE__ = false;
-         }
-         else
-            target += '&returnMode=' + this.__RETURN_MODE_DEFAULT__;
-
-         if ( pMethod == 'POST' )
-         {
-            __HTTP__.open("POST", target, true);
-            __HTTP__.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
-            __HTTP__.setRequestHeader('Cache-Control',  'no-store, no-cache, must-revalidate');
-            __HTTP__.setRequestHeader('Cache-Control', 'post-check=0, pre-check=0');
-            __HTTP__.setRequestHeader('Pragma', 'no-cache');
-            __HTTP__.onreadystatechange = __handler;
-            pData = ( pData ) ? pData : null ;
-         }
-         else
-         {
-            __HTTP__.open("GET", target, true);
-            __HTTP__.onreadystatechange = __handler;
-            pData = null;
-         }
-         __HTTP__.send(pData);
-      }
-      catch(e)
-      {
-         if ( this.__DEBUG__ ) alert("request : #1\n\n" + e)
-      }
-      return true;
-   },
-   "transform" : function(pXML, pXSL)
-   {
-		try
-		{
-			var fragment = null;
-			if ( window.XSLTProcessor )
-			{
-				var xslProc = new XSLTProcessor();
-				xslProc.importStylesheet(pXSL);
-				fragment = xslProc.transformToFragment(pXML, document);
-
-				// para retornar valor igual ao ie.
-				var aux = document.createElement("div");
-				aux.appendChild(fragment);
-				fragment = aux.innerHTML;
-			}
-			else
-			{
-				var xslTemplate = new ActiveXObject("MSXML2.XSLTemplate");
-				xslTemplate.stylesheet = pXSL;
-
-				var myXslProc = xslTemplate.createProcessor();
-				myXslProc.input = pXML;
-
-				myXslProc.transform();
-				fragment = myXslProc.output;
-			}
-			return fragment;
-		}
-		catch(e)
-		{
-			alert("transform\n\n" + e + "\n\n" + e.description);
-		}
-   },
-	"create" : function()
-	{
-		try
-		{
-			var a = false;
-			if ( document.implementation.createDocument )
-				a = document.implementation.createDocument("", "", null);
-			else if ( ActiveXObject )
-				a = new ActiveXObject("Msxml2.DOMDocument");
-
-			with ( a )
-				appendChild(createProcessingInstruction("xml", "version='1.0'"));
-
-			return a;
-		}
-		catch(e)
-		{
-			alert("create\n\n" + e + "\n\n" + e.description);
-		}
-	}
-}
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_smiles.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_smiles.js	(revision 260)
+++ 	(revision )
@@ -1,27 +1,0 @@
-// Instant Messenger
-// im_smiles.js
-
-	   var smile_1 = new Image();
-	   smile_1.src = im_path + "templates/default/images/img/smiles/1.gif"
-	   var smile_2 = new Image();
-	   smile_2.src = im_path + "templates/default/images/img/smiles/2.gif"
-	   var smile_3 = new Image();
-	   smile_3.src = im_path + "templates/default/images/img/smiles/3.gif"
-	   var smile_4 = new Image();
-	   smile_4.src = im_path + "templates/default/images/img/smiles/4.gif"
-	   var smile_5 = new Image();
-	   smile_5.src = im_path + "templates/default/images/img/smiles/5.gif"
-	   var smile_6 = new Image();
-	   smile_6.src = im_path + "templates/default/images/img/smiles/6.gif"
-	   var smile_7 = new Image();
-	   smile_7.src = im_path + "templates/default/images/img/smiles/7.gif"
-	   var smile_8 = new Image();
-	   smile_8.src = im_path + "templates/default/images/img/smiles/8.gif"
-	   var smile_9 = new Image();
-	   smile_9.src = im_path + "templates/default/images/img/smiles/9.gif"
-	   var smile_10 = new Image();
-	   smile_10.src = im_path + "templates/default/images/img/smiles/10.gif"
-	   var smile_11 = new Image();
-	   smile_11.src = im_path + "templates/default/images/img/smiles/11.gif"
-	   var smile_12 = new Image();
-	   smile_12.src = im_path + "templates/default/images/img/smiles/12.gif"
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_win.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_win.js	(revision 260)
+++ 	(revision )
@@ -1,1114 +1,0 @@
-var im_win = {
-
-   chat_pJid : null,
-   _imWindowTemplate : null,
-   xslWin : false,
-   photo  : false,
-	
-   "load" : function()
-   {
-      try
-      {
-			var backFantom = func.newEl('div');
-			func.confEl(backFantom, 'id', 'backFantom');
-			func.confEl(backFantom, 'style', 'position:absolute;top:0px;left:0px;width:100%;height:100%;z-Index:-1;');
-
-			var menu_contato = func.newEl('div');
-			func.confEl(menu_contato, 'id', 'menu_contato');
-			func.confEl(menu_contato, 'class', 'menu_im');
-			func.confEl(menu_contato, 'style', 'position:absolute;z-index:99999');
-
-			var emotions = func.newEl('div');
-			func.confEl(emotions, 'id', 'shared_emotions');
-			func.confEl(emotions, 'class', 'emotionFrame');
-			func.confEl(emotions, 'style', 'position:absolute;padding:1px;left:350px;visibility:hidden;top:0px');
-
-			var font_name = func.newEl('div');
-			func.confEl(font_name, 'id', 'shared_fontName');
-			func.confEl(font_name, 'class', 'statusMenu');
-			func.confEl(font_name, 'style', 'position:absolute;visibility:hidden;padding:1px;left:400px;top:0px');
-
-			var font_size = func.newEl('div');
-			func.confEl(font_size, 'id', 'shared_fontSize');
-			func.confEl(font_size, 'class', 'statusMenu');
-			func.confEl(font_size, 'style', 'position:absolute;visibility:hidden;padding:1px;left:400px;top:0px');
-
-			var font_color = func.newEl('div');
-			func.confEl(font_color, 'id', 'shared_fontColor');
-			func.confEl(font_color, 'class', 'statusMenu');
-			func.confEl(font_color, 'style', 'position:absolute;visibility:hidden;padding:1px;left:400px;top:0px');
-
-			var font_style = func.newEl('div');
-			func.confEl(font_style, 'id', 'shared_fontStyle');
-			func.confEl(font_style, 'class', 'statusMenu');
-			func.confEl(font_style, 'style', 'position:absolute;visibility:hidden;padding:1px;left:400px;top:0px');
-
-			func.insEl(backFantom, menu_contato, emotions, font_name, font_size, font_color, font_style, false);
-
-			emotions.innerHTML = Templates.emotions();
-			font_name.innerHTML = Templates.font_name();
-			font_size.innerHTML = Templates.font_size();
-			font_color.innerHTML = Templates.font_color();
-			/*font_style.innerHTML = Templates.font_style();*/
-
-			var pId = 'contacts';
-
-			var main_menu_all = func.newEl('div');
-			func.confEl(main_menu_all, 'style', 'margin: 3px;');
-
-			var main_menu_head = func.newEl('div');
-			func.confEl(main_menu_head, 'id', pId + '_im_window_body_inner_head');
-			func.confEl(main_menu_head, 'style', 'margin: 0px 0px 3px 0px; border: 1px solid #809aa9; display: block;');
-
-			var main_menu_vcard = func.newEl('div');
-			func.confEl(main_menu_vcard, 'id', 'im_vcard_contacts');
-			func.confEl(main_menu_vcard, 'style', 'display: none;');
-
-			var main_menu_body = func.newEl('div');
-			func.confEl(main_menu_body, 'id', 'div_contacts');
-			func.confEl(main_menu_body, 'style', 'border: 1px solid #809aa9;');
-			main_menu_body.innerHTML = '<b>Nenhum Contato</b>';
-
-			func.insEl(main_menu_head, main_menu_vcard, main_menu_body, main_menu_all);
-
-			var main_menu_head_picture = func.newEl('img');
-			func.confEl(main_menu_head_picture, 'id', pId + '_avatar');
-			func.confEl(main_menu_head_picture, 'src', img_photo.src);
-			func.confEl(main_menu_head_picture, 'style', 'float: left; height: 65px; margin: 2px; width: 49px;');
-
-			var main_menu_head_name_lable = func.newEl('span');
-			func.confEl(main_menu_head_name_lable,'style','margin: 3px;');
-			main_menu_head_name_lable.innerHTML = IM.get_lang('Nickname');
-
-			var br1 = func.newEl('br');
-						
-			var main_menu_head_name = func.newEl('span');
-			func.confEl(main_menu_head_name, 'id', 'span_nickname');
-			func.confEl(main_menu_head_name, 'style', 'margin-left: 5px;');
-			var main_menu_head_name_txt = document.createTextNode("your nickname");
-			func.insEl(main_menu_head_name_txt, main_menu_head_name);
-
-			var br2 = func.newEl('br');
-			var br3 = func.newEl('br');
-
-			func.insEl(main_menu_head_picture, main_menu_head_name_lable, br1, main_menu_head_name, br2, br3, main_menu_head);
-
-			var main_menu_head_div = func.newEl("div");
-			func.confEl(main_menu_head_div,'id','menu_preferences');
-			func.confEl(main_menu_head_div,'class','menu_im');
-			func.confEl(main_menu_head_div,'style','float: left;cursor:pointer');
-
-			func.insEl(main_menu_head_div, false);
-
-		    var params = [];
-			params['body']       = main_menu_all;
-			params['close']      = true;
-			params['height']     = 270;
-			params['left']       = 10;
-			params['id']         = pId;
-			params['maximize']   = true;
-			params['style']      = 'visibility:hidden';
-			params['title']      = 'Expresso Messenger';
-			params['top']        = 10;
-			params['width']      = 210;
-			this.build(params);
-
-			this.config(pId);
-
-			this.windowMinimize(pId + '_im');
-
-			main_menu_head.innerHTML += '<span id="span_menu_pref" style="float: left;cursor: pointer;" onmousedown="IM.menu_preferences(event ,\'menu_preferences\'); document.oncontextmenu = new Function(\'return false\');"></span>';
-
-			var br3 = func.newEl('br');
-			func.confEl(br3, 'style', 'clear: both');
-
-			var div_ie = func.newEl('div');
-
-			func.insEl(br3, div_ie, main_menu_head);
-
-			main_menu_head_pref_img = func.newEl('img');
-			func.confEl(main_menu_head_pref_img, 'src', img_group_close.src);
-			func.confEl(main_menu_head_pref_img, 'id', 'img_pref');
-
-			main_menu_head_pref_txt = document.createTextNode(IM.get_lang('Options'));
-
-			func.insEl(main_menu_head_pref_img, main_menu_head_pref_txt, 'span_menu_pref');
-      }
-      catch(e)
-      {
-         alert("load\n\n" + e + "\n\n" + e.description)
-      }
-   },
-
-   "config" : function(pId)
-   {
-      try
-      {
-         ADD_DHTML("backFantom"+NO_DRAG);
-         ADD_DHTML("shared_fontStyle"+NO_DRAG);
-         ADD_DHTML("shared_fontColor"+NO_DRAG);
-         ADD_DHTML("shared_fontSize"+NO_DRAG);
-         ADD_DHTML("shared_fontName"+NO_DRAG);
-         ADD_DHTML("shared_emotions"+NO_DRAG);
-         ADD_DHTML(pId+"_im_window_body_inner"+NO_DRAG);
-         ADD_DHTML(pId+"_im_window"+NO_DRAG);
-         ADD_DHTML(pId+"_im_window_master"+NO_DRAG);
-         ADD_DHTML(pId+"_im_window_fantom"+NO_DRAG);
-         ADD_DHTML(pId+"_im_window_movable"+CURSOR_MOVE);
-         ADD_DHTML(pId+"_im_window_resize"+CURSOR_NW_RESIZE);
-
-
-         dd.elements.backFantom.setOpacity(0);
-         document.getElementById("backFantom").style.zIndex = -1;
-
-
-         dd.elements.contacts_im_window_resize.moveTo(dd.elements.contacts_im_window.x+dd.elements.contacts_im_window.w-dd.elements.contacts_im_window_resize.w-2, dd.elements.contacts_im_window.y+dd.elements.contacts_im_window.h-dd.elements.contacts_im_window_resize.h-2);
-         dd.elements.contacts_im_window_movable.moveTo(dd.elements.contacts_im_window.x, dd.elements.contacts_im_window.y);
-         dd.elements.contacts_im_window_movable.setOpacity(0);
-
-         dd.elements.contacts_im_window_resize.setOpacity(1);
-         dd.elements.contacts_im_window_resize.moveTo(dd.elements.contacts_im_window_fantom.x+dd.elements.contacts_im_window_fantom.w-dd.elements.contacts_im_window_resize.w-2, dd.elements.contacts_im_window_fantom.y+dd.elements.contacts_im_window_fantom.h-dd.elements.contacts_im_window_resize.h-2);
-
-         var contacts_im_window = new Object();
-         contacts_im_window.x = dd.elements.contacts_im_window_master.x;
-         contacts_im_window.y = dd.elements.contacts_im_window_master.y;
-         contacts_im_window.w = dd.elements.contacts_im_window_master.w;
-         contacts_im_window.h = dd.elements.contacts_im_window_master.h;
-         contacts_im_window.state = WINDOW_STATE_REGULAR;
-         windowItems[pId] = contacts_im_window;
-      }
-      catch(e)
-      {
-         alert("config\n\n" + e + "\n\n" + e.description)
-      }
-   },
-
-   "build" : function()
-   {
-      var pBody       = '';
-      var pClose      = true;
-      var pHeight     = 360;
-      var pId         = false;
-      var pLeft       = NaN;
-      var pMaximize   = true;
-      var pMinimize   = true;
-      var pStyle      = '';
-      var pTitle      = '';
-      var pTop        = NaN;
-      var pWidth      = 250;
-
-      for ( var i = 0; i < arguments.length; i++ )
-      {
-            for ( var n in arguments[i] )
-               if ( !func.isUndefined(arguments[i][n]) )
-                  switch ( n )
-                  {
-                     case 'body'    : pBody     = arguments[i][n]; break;
-                     case 'close'   : pClose    = arguments[i][n]; break;
-                     case 'height'  : pHeight   = arguments[i][n]; break;
-                     case 'id'      : pId       = arguments[i][n]; break;
-                     case 'left'    : pLeft     = arguments[i][n]; break;
-                     case 'maximize': pMaximize = arguments[i][n]; break;
-                     case 'minimize': pMinimize = arguments[i][n]; break;
-                     case 'style'   : pStyle    = arguments[i][n]; break;
-                     case 'title'   : pTitle    = arguments[i][n]; break;
-                     case 'top'     : pTop      = arguments[i][n]; break;
-                     case 'width'   : pWidth    = arguments[i][n]; break;
-                  }
-      }
-
-      if ( !pId || pHeight < 60 || pWidth < 100 )
-         return false;
-
-      if ( isNaN(pLeft) )
-         if ( windowItems[pId] )
-            pLeft = windowItems[pId].x;
-         else
-            pLeft = Math.floor(Math.random()*(dd.getWndH()-100));
-
-      if ( isNaN(pTop) )
-         if ( windowItems[pId] )
-            pTop = windowItems[pId].y;
-         else
-            pTop = Math.floor(Math.random()*(dd.getWndW()-pHeight-480))
-
-      if ( windowItems[pId] )
-      {
-         pHeight = dd.elements[pId + "_im_window_body_inner"].h;
-         pWidth = dd.elements[pId + "_im_window_body_inner"].w;
-      }
-
-      if ( !this.xslWin ) this.xslWin = XMLTools.load(im_path + 'xsl/window.xsl?' + Date.parse(new Date));
-      _xmlDoc = '<window id="' + pId + '" title="' + pTitle + '" height="' + pHeight + '" width="' + pWidth + '" left="' + pLeft + '" top="' + pTop + '" minimize="' + pMinimize + '" maximize="' + pMaximize  + '" close="' + pClose + '" style="position:absolute;' + pStyle + '" />';
-
-      a = document.createElement('div');
-
-      if (window.ActiveXObject)
-      {
-         var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
-         xmlDoc.async = "false";
-         xmlDoc.loadXML(_xmlDoc);
-      }
-      else
-      {
-         var parser = new DOMParser();
-         var xmlDoc = parser.parseFromString(_xmlDoc, "text/xml");
-      }
-      a.innerHTML = XMLTools.transform(xmlDoc, this.xslWin);
-      document.getElementsByTagName('body').item(0).appendChild(a);
-
-      switch ( typeof pBody )
-      {
-         case 'object' :
-                        func.insEl(pBody, pId + '_im_window_body_inner');
-         break;
-         case 'string' :
-                        func.byId(pId + '_im_window_body_inner').innerHTML = pBody;
-
-      }
-
-      RoundedTop('div#' + pId + '_im_window_master', '', '#cbdae4');
-      this.windowMaximizeZ(pId);
-
-   },
-
-   "hideAllChatSelections" : function()
-   {
-      this.hideEmotionSelection();
-      this.hideFontNameSelection();
-      this.hideFontSizeSelection();
-      this.hideFontColorSelection();
-      this.hideFontStyleSelection();
-   },
-
-   "hideWindowItem" : function(pId)
-   {
-      try
-      {
-         dd.elements[pId + "_im_window"].hide();
-         dd.elements[pId + "_im_window_master"].hide();
-         dd.elements[pId + "_im_window_fantom"].hide();
-         dd.elements[pId + "_im_window_resize"].hide();
-         dd.elements[pId + "_im_window_movable"].hide();
-         if ( (name_document = document.getElementById(pId + '_divEdita')) )
-         {
-            name_document.innerHTML = '';
-            var contact = func.byId(pId);
-            var _status = IM.vcard_contacts[contact.getAttribute('nuncontact')].online
-            contact.firstChild.src = ( _status == parseInt(1) ) ? img_online.src : img_offline.src;
-         }
-      }
-      catch(e)
-      {}
-   },
-
-   "incZ" : function()
-   {
-      zValue += 5;
-      return zValue;
-   },
-
-   "drag" : function()
-   {
-      try
-      {
-         var objName = dd.obj.name;
-         i = objName.indexOf("_");
-         objName = objName.substr(0,i);
-
-         this.incZ();
-         document.getElementById(objName + "_im_window_fantom").style.zIndex = zValue;
-         dd.elements[objName + "_im_window_fantom"].setOpacity(0.5);
-
-         document.getElementById(objName + "_im_window_fantom").className = "im_window_fantom";
-
-         var posX = dd.obj.x;
-         var posY = dd.obj.y;
-         if ( posX < 0 )
-            posX = 0;
-         if ( posY < 0 )
-            posY = 0;
-
-         dd.elements[objName + "_im_window_resize"].setOpacity(0);
-
-         if ( dd.obj.name == (objName + "_im_window_resize") )
-         {
-            windowState = WINDOW_STATE_REGULAR;
-
-            // check if the re-size goes out of the screen
-            if ( posX > ( dd.getWndW() - 15 ) )
-               posX = dd.getWndW()-15;
-            if ( posY > ( dd.getWndH() - 13 ) )
-               posY = dd.getWndH()-13;
-
-            // everything is fine, let's change the size of all required objects
-            var newW = posX-dd.elements[objName + "_im_window_fantom"].x+15;
-            var newH = posY-dd.elements[objName + "_im_window_fantom"].y+15;
-            if ( newW < 100) newW = 100;
-            if ( newH < 100) newH = 100;
-            dd.elements[objName + "_im_window_fantom"].resizeTo(newW, newH);
-
-    		if( document.getElementById(objName + "_chatMessages"))
-    		{
-				func.confEl(document.getElementById(objName + "_chatMessages"),"style","width:" + (newW - 105) +";height:" + (newH - 150) +";margin: 2px 0px 2px 2px; overflow:auto;");
-				func.confEl(document.getElementById(objName + '_edita'),"style","width:" + (newW - 105) + ";height: 50px;margin: 3px 1px 0px 2px;float: left;");
-			}
-
-            dd.elements[objName + "_im_window_resize"].moveTo(dd.elements[objName + "_im_window_fantom"].x+dd.elements[objName + "_im_window_fantom"].w-dd.elements[objName + "_im_window_resize"].w-2, dd.elements[objName + "_im_window_fantom"].y+dd.elements[objName + "_im_window_fantom"].h-dd.elements[objName + "_im_window_resize"].h-2);
-            var windowItem = windowItems[objName];
-            windowItem.state = WINDOW_STATE_REGULAR;
-         }
-         else
-         {
-            if ( posX > ( dd.getWndW() - dd.elements[objName + "_im_window_master"].w ) )
-               posX = dd.getWndW() - dd.elements[objName + "_im_window_master"].w;
-
-            if ( posY > ( dd.getWndH() - dd.elements[objName + "_im_window_master"].h ) )
-               posY = dd.getWndH() - dd.elements[objName + "_im_window_master"].h;
-
-            dd.elements[objName + "_im_window_fantom"].moveTo(posX, posY);
-         }
-      }
-      catch(e)
-      {
-      }
-   },
-
-   "drop" : function()
-   {
-      try
-      {
-         document.getElementById("backFantom").style.zIndex = -1;
-
-         var objName = dd.obj.name;
-         i = objName.indexOf("_");
-         objName = objName.substr(0,i);
-
-         var posX = dd.obj.x;
-         var posY = dd.obj.y;
-         if ( posX < 0 )
-            posX = 0;
-         if ( posY < 0 )
-            posY = 0;
-         if ( posX > ( dd.getWndW() - dd.elements[objName + "_im_window_master"].w ) )
-            posX = dd.getWndW() - dd.elements[objName + "_im_window_master"].w;
-         if ( posY > ( dd.getWndH() - dd.elements[objName + "_im_window_master"].h ) )
-            posY = dd.getWndH() - dd.elements[objName + "_im_window_master"].h;
-
-         dd.elements[objName + "_im_window_resize"].setOpacity(1);
-
-         if ( dd.obj.name == (objName + "_im_window_resize") )
-         {
-            var newW = dd.obj.x-dd.elements[objName + "_im_window_fantom"].x+17;
-            var newH = dd.obj.y-dd.elements[objName + "_im_window_fantom"].y+17;
-
-            if ( newW < 100) newW = 100;
-            if ( newH < 100) newH = 100;
-
-            var winW = dd.elements[objName + "_im_window_master"].w - dd.elements[objName + "_im_window"].w;
-            var winH = dd.elements[objName + "_im_window_master"].h - dd.elements[objName + "_im_window"].h;
-
-            dd.elements[objName + "_im_window_fantom"].resizeTo(newW, newH);
-            dd.elements[objName + "_im_window_master"].resizeTo(newW, newH);
-
-            var bodyW = dd.elements[objName + "_im_window"].w - dd.elements[objName + "_im_window_body_inner"].w;
-            var bodyH = dd.elements[objName + "_im_window"].h - dd.elements[objName + "_im_window_body_inner"].h;
-
-            dd.elements[objName + "_im_window"].resizeTo(newW - winW, newH - winH);
-
-            bodyW = dd.elements[objName + "_im_window"].w - bodyW;
-            bodyH = dd.elements[objName + "_im_window"].h - bodyH;
-
-            dd.elements[objName + "_im_window_body_inner"].resizeTo(bodyW, bodyH);
-
-            dd.elements[objName + "_im_window_movable"].resizeTo(newW-55, 25);
-            dd.elements[objName + "_im_window_resize"].moveTo(dd.elements[objName + "_im_window_fantom"].x+dd.elements[objName + "_im_window_fantom"].w-dd.elements[objName + "_im_window_resize"].w-2, dd.elements[objName + "_im_window_fantom"].y+dd.elements[objName + "_im_window_fantom"].h-dd.elements[objName + "_im_window_resize"].h-2);
-         }
-         else
-         {
-            dd.elements[objName + "_im_window_fantom"].moveTo(posX, posY);
-            dd.elements[objName + "_im_window_master"].moveTo(posX, posY);
-            dd.elements[objName + "_im_window"].moveTo(posX, (posY+4));
-            dd.elements[objName + "_im_window_movable"].moveTo(posX, posY);
-            dd.elements[objName + "_im_window_resize"].moveTo(dd.elements[objName + "_im_window_fantom"].x+dd.elements[objName + "_im_window_fantom"].w-dd.elements[objName + "_im_window_resize"].w-3, dd.elements[objName + "_im_window_fantom"].y+dd.elements[objName + "_im_window_fantom"].h-dd.elements[objName + "_im_window_resize"].h-3);
-         }
-
-         this.windowMaximizeZ(objName);
-
-         dd.elements[objName + "_im_window_fantom"].setOpacity(0);
-         var windowItem = windowItems[objName];
-
-         if ( windowItem != null )
-         {
-            windowItem.x = dd.elements[objName + "_im_window_master"].x;
-            windowItem.y = dd.elements[objName + "_im_window_master"].y;
-            windowItem.w = dd.elements[objName + "_im_window_master"].w;
-            windowItem.h = dd.elements[objName + "_im_window_master"].h;
-         }
-      }catch(e){}
-   },
-
-   "pick" : function()
-   {
-      document.getElementById("backFantom").style.zIndex = zValue;
-      this.hideAllChatSelections();
-      var objName = dd.obj.name;
-      i = objName.indexOf("_im");
-      objName = objName.substr(0,i);
-      ACTIVE_OBJECTID = objName;
-   },
-
-   "showWindowItem" : function(pId)
-   {
-      /*
-       * Não tire esta linha
-       * Isso deve estar aqui para a janela 'oculta'
-       * não 'piscar' na tela no momento que é criada.
-       */
-      func.byId(pId + '_im_window_body_inner').style.overflow = 'auto';
-
-      if ( (name_document = document.getElementById(pId + '_divEdita')) )
-      {
-         name_document.innerHTML = '<iframe name="' + pId.replace('@', '_at_').replace(/\./g, '_dot_') + '_edita" class="edit_message" id="' + pId + '_edita" frameborder="0" style="border:margin: 3px 1px 0px 2px; width:220px; height:50px; float:left;"></iframe>';
-
-         name_document = document.getElementById(pId + '_edita');
-         name_document.contentWindow.document.write('<html><body id="' + pId.replace('@', '_at_').replace(/\./g, '_dot_') + '" style="margin:0px;padding:0px"></body></html>');
-         name_document.contentWindow.document.close();
-         name_document.contentWindow.document.designMode = "On";
-
-         func.attachEvent(name_document.contentWindow.document, 'keypress', im_win.getText);
-         func.attachEvent(name_document.contentWindow.document, 'keyup', im_win.clearText);
-
-         name_document.contentWindow.focus();
-      }
-
-      dd.elements[pId + "_im_window_master"].show();
-      dd.elements[pId + "_im_window"].show();
-      dd.elements[pId + "_im_window_fantom"].show();
-      dd.elements[pId + "_im_window_resize"].show();
-      dd.elements[pId + "_im_window_movable"].show();
-      
-   },
-
-   "windowMaximizeZ" : function(objName)
-   {
-      try
-      {
-         this.incZ();
-         document.getElementById(objName + "_im_window_fantom").style.zIndex = zValue-3;
-         document.getElementById(objName + "_im_window_master").style.zIndex = zValue-2;
-         document.getElementById(objName + "_im_window").style.zIndex = zValue-1;
-         document.getElementById(objName + "_im_window_body_inner").style.zIndex = zValue-1;
-         document.getElementById(objName + "_im_window_resize").style.zIndex = zValue;
-         document.getElementById(objName + "_im_window_movable").style.zIndex = zValue;
-         if ( dd.elements[objName + "_im_window_movable"] )
-            dd.elements[objName + "_im_window_movable"].z = zValue+1;
-      }catch(e){}
-   },
-
-   "windowMinimize" : function(objName)
-   {
-      with(objName)
-         objName = substr(0, indexOf('_im'));
-
-      this.hideWindowItem(objName);
-      windowItem = windowItems[objName];
-      if ( windowItem != null )
-      {
-         windowItem.state = WINDOW_STATE_MINIMIZED;
-      }
-
-   },
-
-   "windowMaximizeRestore" : function(objName)
-   { 
-      with(objName)
-         objName = substr(0, indexOf('_im'));
-
-      this.hideAllChatSelections();
-
-      windowItem = windowItems[objName];
-
-      if ( windowItem != null )
-      {
-         var bodyW = dd.elements[objName + "_im_window"].w - dd.elements[objName + "_im_window_body_inner"].w;
-         var bodyH = dd.elements[objName + "_im_window"].h - dd.elements[objName + "_im_window_body_inner"].h;
-
-         if ( windowItem.state==WINDOW_STATE_REGULAR )
-         {
-            windowItem.x = dd.elements[objName + "_im_window_master"].x;
-            windowItem.y = dd.elements[objName + "_im_window_master"].y;
-            windowItem.w = dd.elements[objName + "_im_window_master"].w;
-            windowItem.h = dd.elements[objName + "_im_window_master"].h;
-
-            var bodyX = dd.elements[objName + "_im_window_body_inner"].x + dd.elements[objName + "_im_window"].x;
-            var bodyY = dd.elements[objName + "_im_window_body_inner"].y + dd.elements[objName + "_im_window"].y;
-
-            dd.elements[objName + "_im_window_fantom"].moveTo(0, 0);
-            dd.elements[objName + "_im_window_master"].moveTo(0, 0);
-            dd.elements[objName + "_im_window"].moveTo(0, 4);
-
-            dd.elements[objName + "_im_window_fantom"].resizeTo(dd.getWndW(), dd.getWndH());
-            dd.elements[objName + "_im_window_master"].resizeTo(dd.getWndW(), dd.getWndH());
-            dd.elements[objName + "_im_window"].resizeTo(dd.getWndW(), dd.getWndH() - 5);
-            dd.elements[objName + "_im_window_body_inner"].resizeTo(dd.getWndW() - bodyW, dd.getWndH() - bodyH - 5);
-
-            dd.elements[objName + "_im_window_resize"].moveTo(dd.elements[objName + "_im_window_fantom"].x+dd.elements[objName + "_im_window_fantom"].w-dd.elements[objName + "_im_window_resize"].w-2, dd.elements[objName + "_im_window_fantom"].y+dd.elements[objName + "_im_window_fantom"].h-dd.elements[objName + "_im_window_resize"].h-2);
-            windowItem.state = WINDOW_STATE_MAXIMIZED;
-
-            window.status = objName + "'s Z: " + document.getElementById(objName+"_im_window").style.zIndex;
-
-         }
-         else
-         {
-            dd.elements[objName + "_im_window_fantom"].resizeTo(windowItem.w, windowItem.h);
-            dd.elements[objName + "_im_window_master"].resizeTo(windowItem.w, windowItem.h);
-            dd.elements[objName + "_im_window"].resizeTo(windowItem.w, windowItem.h - 5);
-            dd.elements[objName + "_im_window_body_inner"].resizeTo(windowItem.w - bodyW, windowItem.h - bodyH - 5);
-
-            dd.elements[objName + "_im_window_fantom"].moveTo(windowItem.x, windowItem.y);
-            dd.elements[objName + "_im_window_master"].moveTo(windowItem.x, windowItem.y);
-            dd.elements[objName + "_im_window_resize"].moveTo(dd.elements[objName + "_im_window_fantom"].x+dd.elements[objName + "_im_window_fantom"].w-dd.elements[objName + "_im_window_resize"].w-2, dd.elements[objName + "_im_window_fantom"].y+dd.elements[objName + "_im_window_fantom"].h-dd.elements[objName + "_im_window_resize"].h-2);
-            windowItem.state = WINDOW_STATE_REGULAR;
-         }
-
-      dd.elements[objName + "_im_window_movable"].moveTo(dd.elements[objName + "_im_window"].x, dd.elements[objName + "_im_window"].y);
-      dd.elements[objName + "_im_window_movable"].resizeTo(dd.elements[objName + "_im_window"].w-55, 25);
-
-      this.showWindowItem(objName);
-      this.windowMaximizeZ(objName);
-      }
-      
-  	  if( !this.photo )
-  	  {
-		setTimeout('im_win.get_photo_ldap(\"user@user\")',1000 );
-		this.photo = true;
-	  }
-   },
-
-   "create_window" : function()
-   {
-      pId = arguments[0]['id'];
-
-      if ( document.getElementById(pId + '_im_window'))
-      {
-         this.windowMaximizeZ(pId);
-      	 this.showWindowItem(pId);
-      }
-      else
-      {
-         this.build(arguments[0]);
-
-         ADD_DHTML(pId + "_im_window_body_inner"+NO_DRAG);
-         ADD_DHTML(pId + "_im_window"+NO_DRAG);
-         ADD_DHTML(pId + "_im_window_master"+NO_DRAG);
-         ADD_DHTML(pId + "_im_window_fantom"+NO_DRAG);
-         ADD_DHTML(pId + "_im_window_movable"+CURSOR_MOVE);
-         ADD_DHTML(pId + "_im_window_resize"+CURSOR_NW_RESIZE);
-
-         dd.elements[pId + "_im_window_movable"].moveTo(dd.elements[pId + "_im_window"].x, dd.elements[pId + "_im_window"].y);
-         dd.elements[pId + "_im_window_movable"].resizeTo(dd.elements[pId + "_im_window"].w-20, 25);
-         dd.elements[pId + "_im_window_movable"].setOpacity(0);
-
-         dd.elements[pId + "_im_window_resize"].setOpacity(1);
-
-         dd.elements[pId + "_im_window_resize"].moveTo(dd.elements[pId + "_im_window"].x+dd.elements[pId + "_im_window"].w-dd.elements[pId + "_im_window_resize"].w-2, dd.elements[pId + "_im_window"].y+dd.elements[pId + "_im_window"].h-dd.elements[pId + "_im_window_resize"].h-2);
-         dd.elements[pId + "_im_window_resize"].moveTo(dd.elements[pId + "_im_window_fantom"].x+dd.elements[pId + "_im_window_fantom"].w-dd.elements[pId + "_im_window_resize"].w-2, dd.elements[pId + "_im_window_fantom"].y+dd.elements[pId + "_im_window_fantom"].h-dd.elements[pId + "_im_window_resize"].h-2);
-
-         var windowItem = new Object();
-         windowItem.x = dd.elements[pId + "_im_window_master"].x;
-         windowItem.y = dd.elements[pId + "_im_window_master"].y;
-         windowItem.w = dd.elements[pId + "_im_window_master"].w;
-         windowItem.h = dd.elements[pId + "_im_window_master"].h;
-         windowItem.state = WINDOW_STATE_MINIMIZED;
-         windowItems[pId] = windowItem;
-
-         title = (arguments[0]['title']) ? arguments[0]['title'] : arguments[0]['id'];
-         this.windowMinimize(pId + '_im');
-         this.windowMaximizeRestore(pId + '_im');
-      }
-   },
-
-   "open_chat" : function(pId)
-   {
-      if ( !func.byId(pId + '_im_window') )
-      {
-         text = '';
-         text += '<div class="border" id="' + pId + '_chatMessages" style="width:220px; height:130px; margin: 2px 0px 2px 2px; overflow:auto;"></div>';
-         text += '<div style="float: left; position: relative; height:130px;">';
-         text += '   <div class="myAvatar">';
-         text += '      <img id="' + pId + '_avatar" alt="Display Picture" title="Display Picture" src="' + im_path + 'templates/default/images/photo.png" width="49" height="65" border="0" />';
-         text += '   </div>';
-         text += '   <div id="' + pId + '_composing" class="composing"><img src="' + img_typing.src + '" /></div>';
-         text += '</div>';
-         text += '<br style="clear:both;"/>';
-         text += '<dl>';
-         text += '   <dd class="small">';
-         text += '      &nbsp;<span id="selectEmotionsDiv" class="des-small" onmouseover="selectDiv(this)" onmouseout="unselectDiv(this)" onclick="im_win.showEmotionSelection(\'' + pId + '\');" title="Select Imotions here!"><img src="' + im_path + 'templates/default/images/img/1.gif" width="15" height="15" alt="Select Imotions here!" style="vertical-align:	text-top;" /></span>';
-         text += '   </dd>';
-         text += '   <dd class="small">|</dd>';
-         text += '   <dd class="small">';
-         text += '      <span id="selectFontNameDiv" class="des-small" onmouseover="selectDiv(this)" onmouseout="unselectDiv(this)" onclick="im_win.showFontNameSelection(\'' + pId + '\');" title="Select Font Name here!" style="height:19px;">'+IM.get_lang('Font')+'</span>';
-         text += '   </dd>';
-         text += '   <dd class="small">|</dd>';
-         text += '   <dd class="small">';
-         text += '      <span id="selectFontSizeDiv" class="des-small" onmouseover="selectDiv(this)" onmouseout="unselectDiv(this)" onclick="im_win.showFontSizeSelection(\'' + pId + '\')" title="Select Font Size here!" style="height:19px;">'+IM.get_lang('Size')+'</span>';
-         text += '   </dd>';
-         text += '   <dd class="small">|</dd>';
-         text += '   <dd class="small">';
-         text += '      <span id="selectFontColorDiv" class="des-small" onmouseover="selectDiv(this)" onmouseout="unselectDiv(this)" onclick="im_win.showFontColorSelection(\'' + pId + '\')" title="Select Font Color here!" style="height:19px;">'+IM.get_lang('Color')+'</span>';
-         text += '   </dd>';
-         text += '   <dd class="small">|</dd>';
-         text += '   <dd class="small">';
-         text += '      <span id="selectFontStyleDiv" class="des-small" onmouseover="selectDiv(this)" onmouseout="unselectDiv(this)" onclick="im_win.showFontStyleSelection(\'' + pId + '\')" title="Select Font Color here!" style="height:19px;">'+IM.get_lang('Style')+'</span>';
-         text += '   </dd>';
-         text += '</dl>';
-         text += '<div id="' + pId + '_divEdita" style="margin: 0px 2px"><iframe name="' + pId.replace('@', '_at_').replace(/\./g, '_dot_') + '_edita" class="edit_message" id="' + pId + '_edita" frameborder="0" style="margin: 3px 1px 0px 2px; width:220px; height:50px; float:left;"></iframe></div>';
-         text += '<br/><a onclick="javascript:IM.sendMessage(\'' + pId + '\')" title="Send a message" style="float:left;margin: 0px 2px;"><img src="' + im_path + 'templates/default/images/send.gif" width="50" height="25" border=0 style="margin-top:3px"></a>';
-         text += '<br style="clear:both" /><span id="' + pId + '_im_window_message" style="margin-left: 2px" />';
-
-         var params = [];
-         params['body']     = text;
-         params['height']   = 225;
-         params['id']       = pId;
-         params['maximize'] = false;
-         params['minimize'] = false;
-         params['title']    = pId;
-         params['width']    = 320;
-         this.create_window(params);
-
-         // Photo Ldap;
-         this.get_photo_ldap(pId);
-		
-         name_document = document.getElementById(pId + '_edita');
-         name_document.contentWindow.document.write('<html><body id="' + pId.replace('@', '_at_').replace(/\./g, '_dot_') + '" style="margin:0px;padding:0px"></body></html>');
-         name_document.contentWindow.document.close();
-         name_document.contentWindow.document.designMode = "On";
-
-         func.attachEvent(name_document.contentWindow.document, 'keypress', im_win.getText);
-         func.attachEvent(name_document.contentWindow.document, 'keyup', im_win.clearText);
-
-         name_document.contentWindow.focus();
-         
-         var status = func.byId(pId + '_im_window');
-         status.firstChild.style.background = 'url('+func.byId(pId).firstChild.src+')';
-      }
-      else
-      {
-         this.showWindowItem(pId);
-      }
-   },
-
-   "get_photo_ldap" : function(IdLdap)
-   {
-		var uid_ldap = IdLdap.substr(0,IdLdap.indexOf('@'));
-		var handler_photo_ldap = function(_XMLdata)
-		{
-			var data = _XMLdata.getElementsByTagName('retorno').item(0);
-			data = eval(data.firstChild.nodeValue);
-			if(data)
-			{
-				IdLdap = ( IdLdap == 'user@user' ) ? 'contacts' : IdLdap;
-				if( document.getElementById(IdLdap + "_avatar") != null ){
-					var ph_img = document.getElementById(IdLdap + "_avatar");
-					ph_img.src = (im_path + "inc/class.ldap_im.inc.php?user="+uid_ldap) ? im_path + "inc/class.ldap_im.inc.php?user="+uid_ldap : img_photo.src ;
-				}
-			}
-		}
-
-	    XMLTools.__RETURN_MODE__ = 'XML';
-		XMLTools.request('$this.ldap_im.photo_ldap','POST',handler_photo_ldap,'uid='+uid_ldap);
-   },
-
-   "windowClose" : function(objName)
-   {
-      with(objName)
-         objName = substr(0, indexOf('_im'));
-
-      this.hideWindowItem(objName);
-      this.hideAllChatSelections();
-
-      var windowItem = windowItems[objName];
-      if ( windowItem != null )
-         windowItem.state = WINDOW_STATE_CLOSED;
-
-      if ( objName != 'contacts' )
-      {
-         var win = document.getElementById(objName + '_im_window_master');
-         var resize = document.getElementById(objName + '_im_window_resize');
-         var fantom = document.getElementById(objName + '_im_window_fantom');
-         var movable = document.getElementById(objName + '_im_window_movable');
-
-         win.parentNode.removeChild(win);
-         resize.parentNode.removeChild(resize);
-         fantom.parentNode.removeChild(fantom);
-         movable.parentNode.removeChild(movable);
-
-         //delete windowItem;
-      }
-   },
-
-   "hideEmotionSelection" : function()
-   {
-      emotionsDiv = document.getElementById("shared_emotions");
-      if ( isEmotionSelectionVisible )
-      {
-         emotionsDiv.style.visibility = "hidden";
-         isEmotionSelectionVisible = false;
-      }
-   },
-
-   "highlightie5" : function (e)
-   {
-      if ( e.className == "emotionItem" )
-         e.className = "emotionItem-sel";
-      else if ( e.className == "menuitems" )
-         e.className = "menuitems-sel";
-
-   },
-
-   "lowlightie5" : function(e)
-   {
-      if ( e.className == "emotionItem-sel" )
-         e.className = "emotionItem";
-      else if ( e.className == "menuitems-sel" )
-         e.className = "menuitems";
-   },
-
-   "addEmotion" : function(emotion)
-   {
-      var n_document = document.getElementById(this.chat_pJid + '_edita');
-      var edita = n_document.contentWindow.document.getElementsByTagName('body').item(0);
-      edita.innerHTML += IM.emotions_icons(emotion);
-
-      this.hideEmotionSelection();
-   },
-
-   "showEmotionSelection" : function(objName)
-   {
-      this.chat_pJid = objName;
-      activeChatWindowId = objName;
-      var emotionsDiv = document.getElementById("shared_emotions");
-      if(!isEmotionSelectionVisible)
-      {
-         this.hideAllChatSelections();
-         chatObj = dd.elements[objName + "_im_window"];
-         x = chatObj.x + 6;
-         y = chatObj.y + chatObj.h - 200;
-         dd.elements.shared_emotions.moveTo(x,y);
-         this.incZ();
-         document.getElementById("shared_emotions").style.zIndex = zValue;
-         emotionsDiv.style.visibility = "visible";
-         isEmotionSelectionVisible = true;
-      }
-      else
-      {
-         this.hideAllChatSelections();
-      }
-   },
-
-   "showFontNameSelection" : function(objName)
-   {
-      this.chat_pJid = objName;
-      activeChatWindowId = objName;
-      var objDiv = document.getElementById("shared_fontName");
-      if(!isFontNameSelectionVisible)
-      {
-         this.hideAllChatSelections();
-         chatObj = dd.elements[objName + "_im_window"];
-         x = chatObj.x + 85;
-         y = chatObj.y + chatObj.h - 185;
-         dd.elements.shared_fontName.moveTo(x,y);
-         this.incZ();
-         document.getElementById("shared_fontName").style.zIndex = zValue;
-         objDiv.style.visibility = "visible";
-         isFontNameSelectionVisible = true;
-      }
-      else
-      {
-         this.hideAllChatSelections();
-      }
-   },
-
-   "hideFontNameSelection" : function()
-   {
-      var objDiv = document.getElementById("shared_fontName");
-      if ( isFontNameSelectionVisible )
-      {
-         objDiv.style.visibility = "hidden";
-         isFontNameSelectionVisible = false;
-      }
-   },
-
-   "showFontSizeSelection" : function(objName)
-   {
-
-      this.chat_pJid = objName;
-      activeChatWindowId = objName;
-      var objDiv = document.getElementById("shared_fontSize");
-      if ( !isFontSizeSelectionVisible )
-      {
-         this.hideAllChatSelections();
-         chatObj = dd.elements[objName + "_im_window"];
-         x = chatObj.x + 154;
-         y = chatObj.y + chatObj.h - 200;
-         dd.elements.shared_fontSize.moveTo(x,y);
-         this.incZ();
-         document.getElementById("shared_fontSize").style.zIndex = zValue;
-         objDiv.style.visibility = "visible";
-         isFontSizeSelectionVisible = true;
-      }
-      else
-      {
-         this.hideAllChatSelections();
-      }
-   },
-
-   "hideFontSizeSelection" : function()
-   {
-      var objDiv = document.getElementById("shared_fontSize");
-      if ( isFontSizeSelectionVisible )
-      {
-         objDiv.style.visibility = "hidden";
-         isFontSizeSelectionVisible = false;
-      }
-   },
-
-   "showFontColorSelection" : function(objName)
-   {
-      this.chat_pJid = objName;
-      activeChatWindowId = objName;
-      var objDiv = document.getElementById("shared_fontColor");
-      if ( !isFontColorSelectionVisible )
-      {
-         this.hideAllChatSelections();
-         chatObj = dd.elements[objName + "_im_window"];
-         x = chatObj.x + 191;
-         y = chatObj.y + chatObj.h - 200;
-         dd.elements.shared_fontColor.moveTo(x,y);
-         this.incZ();
-         document.getElementById("shared_fontColor").style.zIndex = zValue;
-         objDiv.style.visibility = "visible";
-         isFontColorSelectionVisible = true;
-      }
-      else
-      {
-         this.hideAllChatSelections();
-      }
-   },
-
-   "showFontStyleSelection" : function(objName)
-   {
-      this.chat_pJid = objName;
-      activeChatWindowId = objName;
-      var objDiv = document.getElementById("shared_fontStyle");
-      if ( !isFontStyleSelectionVisible )
-      {
-         this.hideAllChatSelections();
-         chatObj = dd.elements[objName + "_im_window"];
-         x = chatObj.x + 234;
-         y = chatObj.y + chatObj.h - 181;
-         dd.elements.shared_fontStyle.moveTo(x,y);
-         this.incZ();
-         document.getElementById("shared_fontStyle").style.zIndex = zValue;
-         objDiv.style.visibility = "visible";
-         isFontStyleSelectionVisible = true;
-      }
-      else
-      {
-         this.hideAllChatSelections();
-      }
-   },
-
-   "hideFontColorSelection" : function()
-   {
-      var objDiv = document.getElementById("shared_fontColor");
-      if ( isFontColorSelectionVisible )
-      {
-         objDiv.style.visibility = "hidden";
-         isFontColorSelectionVisible = false;
-      }
-   },
-
-   "hideFontStyleSelection" : function()
-   {
-      var objDiv = document.getElementById("shared_fontStyle");
-      if ( isFontStyleSelectionVisible )
-      {
-         objDiv.style.visibility = "hidden";
-         isFontStyleSelectionVisible = false;
-      }
-   },
-
-   "newMessageNotification" : function()
-   {
-      if ( !focusFlag )
-      {
-         if ( document.title=="......................" )
-            document.title = IM.get_lang("New Message!");
-         else
-            document.title = "......................";
-         
-         this.Mod_Notification();
-
-         if ( newMessageTimer )
-            clearTimeout(newMessageTimer);
-         newMessageTimer = setTimeout("im_win.newMessageNotification()", 1000);
-      }
-      else
-      {
-         if ( newMessageTimer ) clearTimeout(newMessageTimer);
-      }
-      
-   },
-
-   "Mod_Notification" : function()
-   {
-		// Aviso Normal
-		if(eval(IM_Preferences.LoadPreferences('rd_nm')))
-		{
-		}
-		// Aviso Chato		 
-	 	if(eval(IM_Preferences.LoadPreferences('rd_ch')))
-	 	{
-			if(self.moveBy)
-			{
-				for(i=10;i>0;i--)
-			 	{
-				  self.moveBy(i,0);
-			 	  self.moveBy(-i,0);
-			 	}
-			}
-		}
-   },
-
-   "getText" : function(e)
-   {
-
-      if ( !focusFlag ) windowFocus();
-      evt = e.keyCode;
-      pId = ( e.srcElement ) ? e.srcElement.id : e.target.getElementsByTagName('body').item(0).id;
-      pId = pId.replace('_at_', '@').replace(/_dot_/g, '.')
-	  IM.composingMessage(pId);	
-      switch ( evt )
-      {
-         case 13 :
-                  if ( !e.shiftKey )
-                     IM.sendMessage(pId);
-                  return false;
-         break;
-         case 27 :
-                  im_win.windowClose(pId + '_im');
-         break;
-      }
-   },
-
-   "clearText" : function(e)
-   {
-      if ( !focusFlag ) windowFocus();
-      evt = e.keyCode;
-      _text = ( e.srcElement ) ? e.srcElement.id : e.target.getElementsByTagName('body').item(0);
-
-      switch ( evt )
-      {
-         case 13 :
-                  //if ( !e.shiftKey )
-                     _text.innerHTML = '';
-                     return false;
-         break;
-      }
-   }
-}
-
-function my_DragFunc()
-{
-   im_win.drag();
-}
-function my_DropFunc()
-{
-   im_win.drop();
-}
-function my_PickFunc()
-{
-   im_win.pick();
-}
-function selectDiv(obj) {
-  obj.className = "sel-small";
-}
-function unselectDiv(obj) {
-  obj.className = "des-small";
-}
-function getElementsBySelector(selector)
-{
-   var i;
-   var s=[];
-   var selid="";
-   var selclass="";
-   var tag=selector;
-   var objlist=[];
-   if ( selector.indexOf(" ") > 0 )
-   {//descendant selector like "tag#id tag"
-      s=selector.split(" ");
-      var fs=s[0].split("#");
-      if ( fs.length == 1 )
-         return(objlist);
-      return(document.getElementById(fs[1]).getElementsByTagName(s[1]));
-   }
-   if ( selector.indexOf("#") > 0 )
-   {//id selector like "tag#id"
-      s=selector.split("#");
-      tag=s[0];
-      selid=s[1];
-   }
-   if ( selid != "" )
-   {
-      objlist.push(document.getElementById(selid));
-      return(objlist);
-   }
-   if ( selector.indexOf(".") > 0 )
-   {//class selector like "tag.class"
-      s=selector.split(".");
-      tag=s[0];
-      selclass=s[1];
-   }
-   var v = document.getElementsByTagName(tag);  // tag selector like "tag"
-   if ( selclass == "" )
-      return(v);
-
-   for ( i = 0; i < v.length; i++ )
-      if ( v[i].className ==selclass )
-         objlist.push(v[i]);
-
-   return(objlist);
-}
-function AddTop(el,bk,color,size)
-{
-   try
-   {
-      var i;
-      var d=document.createElement("b");
-      var cn="_r";
-      var lim=4;
-      if(size && size=="small"){ cn="_rs"; lim=2}
-      d.className="_rtop";
-      d.style.backgroundColor=bk;
-      for(i=1;i<=lim;i++)
-      {
-         var x=document.createElement("b");
-         x.className=cn + i;
-         x.style.backgroundColor=color;
-         d.appendChild(x);
-      }
-      el.insertBefore(d,el.firstChild);
-   }
-   catch(e)
-   {}
-}
-function RoundedTop(selector,bk,color,size){
-   var i;
-   var v=getElementsBySelector(selector);
-   for(i=0;i<v.length;i++)
-          AddTop(v[i],bk,color,size);
-}
-
-im_win.load();
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_fcommon.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_fcommon.js	(revision 260)
+++ 	(revision )
@@ -1,391 +1,0 @@
-/*
-+------------------------------------------------+
-| @FILE:    functions.js                         |
-| @AUTHOR:  [NUTS] Rodrigo Souza                 |
-| @DATE:    Sex 27 Out 2006 12:38:22 BRST        |
-| @LAST CHANGE: Seg 27 Nov 2006 12:35:22 BRST::  |
-+------------------------------------------------+
-*/
-
-/*
- * @DESC The method has one optional boolean argument
- *          deep which when set recursively creates a
- *          deep copy, otherwise (when deep is false
- *          or not defined) a shallow copy is created.
- */
-/*Object.prototype.clone = function(deep)
-{
-   objectClone = new this.constructor();
-   for (var property in this)
-   {
-      if (!deep)
-         objectClone[property] = this[property];
-      else if (typeof this[property] == 'object')
-         objectClone[property] = this[property].clone(deep);
-      else
-         objectClone[property] = this[property];
-   }
-
-      return objectClone;
-}*/
-
-/*
- *
- */
-var func = {
-   "json" : false,
-   "attachEvent" : function(obj, eventName, eventHandler) 
-   {
-      if ( obj )
-      {
-         if ( eventName.substring(0, 2) == 'on' )
-         {
-            eventName = eventName.substring(2,eventName.length);
-         }
-         if ( obj.addEventListener )
-         {
-            obj.addEventListener(eventName, eventHandler, false);
-         }
-         else if ( obj.attachEvent )
-         {
-            obj.attachEvent('on'+eventName, eventHandler);
-         }
-      }
-   },
-
-   "byId" : function()
-   {
-      var elements = new Array();
-      for ( var i = 0; i < arguments.length; i++ )
-      {
-         element = arguments[i];
-         if ( this.isString(element) )
-            element = document.getElementById(element);
-
-         if (arguments.length == 1)
-            return element;
-
-         elements.push(element);
-      }
-      return elements;
-   },
-
-   "byTag" : function()
-   {
-      var elements = new Array();
-      for ( var i = 0; i < arguments.length; i++ )
-      {
-         element = arguments[i];
-         if ( this.isString(element) )
-            element = document.getElementsByTagName(element);
-
-         if ( arguments.length == 1 )
-            return element;
-
-         elements.push(element);
-      }
-      return elements;
-   },
-
-   "client_height" : function()
-   {
-      if( typeof( window.innerWidth ) == 'number' )
-      {
-         //Non-IE
-         return window.innerHeight;
-      }
-      else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
-      {
-         //IE 6+ in 'standards compliant mode'
-         return document.documentElement.clientHeight;
-      }
-      else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
-      {
-         //IE 4 compatible
-         return document.body.clientHeight;
-      }
-   },
-
-   "client_width" : function()
-   {
-         if( typeof( window.innerWidth ) == 'number' )
-         {
-            //Non-IE
-            return window.innerWidth;
-         }
-         else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
-         {
-            //IE 6+ in 'standards compliant mode'
-            return document.documentElement.clientWidth;
-         }
-         else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
-         {
-            //IE 4 compatible
-            return document.body.clientWidth;
-         }
-   },
-
-   "_confEl" : function(pElement, pAttribute, pValue)
-   {
-      if ( !func.isString(pValue) )
-         return false;
-
-      if ( this.isString(pElement) )
-      {
-         pElement = document.getElementById(pElement);
-      }
-
-      switch ( pAttribute )
-      {
-         /*
-          * No IE a propriedade style nÃo funciona se adicionada via setAttribute()
-          */
-         case 'style' :
-                        pElement.style.cssText = pValue;
-         break;
-         case 'class' :
-                        pElement.setAttribute(pAttribute, pValue);
-                        pElement.setAttribute(pAttribute+'Name', pValue); // IE
-         break;
-         default :
-                        pElement.setAttribute(pAttribute, pValue);
-      } /* switch */
-   },
-
-   "confEl" : function()
-   {
-      switch ( arguments.length )
-      {
-         case 1 :
-                  matriz = arguments[0];
-                  if ( !this.isArray(matriz) )
-                     return false;
-
-                  for ( var i in matriz )
-                  {
-                     pElement = matriz[i]['element'];
-                     delete matriz[i]['element'];
-
-                     for ( var j in matriz[i] )
-                     {
-                        this._confEl(pElement, j, matriz[i][j]);
-                     }
-                  }
-         break;
-         case 2 :
-                  var pElement = arguments[0];
-
-                  if ( !this.isArray(arguments[1]) )
-                     return false;
-
-                  for ( var i in arguments[1] )
-                  {
-                     this._confEl(pElement, i, arguments[1][i]);
-                  }
-         break;
-         case 3 :
-                  var pElement = arguments[0];
-
-                  this._confEl(pElement, arguments[1], arguments[2]);
-         break;
-      }
-   },
-
-   "elH" : function(pEl)
-   {
-      // no IE a funcao scrollHeight nÃ£o retorna o valor correto
-      return document.getElementById(pEl).offsetHeight;
-   },
-
-   "elHW" : function(pEl)
-   {
-      aux = {
-               h:this.elH(pEl),
-               w:this.elW(pEl)
-            };
-      return aux;
-   },
-
-   "elW" : function(pEl)
-   {
-      return document.getElementById(pEl).offsetWidth;
-   },
-
-   "interface" : function(_XmlDoc)	
-   {
-	   var data = _XmlDoc.getElementsByTagName('retorno').item(0);
-	   if ( data.childNodes.length == 1 )
-	      data = data.firstChild.nodeValue;
-
-	   if ( /^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(data) )
-	   {
-	      eval('data = ' + data);
-	      if ( this.json ){
-	         this.json = false;
-	      }else{
-	         data = this.json2array(data);
-	      }
-	   }
-
-	   return data;
-  
-   },
-
-   "insEl" : function()
-   {
-      try
-      {
-         if ( arguments.length == 1 )
-         {
-            var body = document.getElementsByTagName('body');
-            body[0].appendChild(arguments[0]);
-         }
-         else
-         {
-            var parentEl;
-            switch ( typeof arguments[arguments.length-1] )
-            {
-               case 'object' :
-                              parentEl = arguments[arguments.length-1];
-               break;
-               case 'string' :
-                              parentEl = document.getElementById(arguments[arguments.length-1]);
-               break;
-               case 'boolean' : parentEl = document.getElementsByTagName('body').item(0);
-            }
-
-            for ( var i = 0; i < arguments.length-1; i++ )
-            {
-                  if ( this.isString(arguments[i]) )
-                     arguments[i] = document.createTextNode(arguments[i]);
-
-                  parentEl.appendChild(arguments[i]);
-            }
-         } /* else */
-         return true;
-      }
-      catch(e)
-      {}
-   },
-
-   "insElB" : function()
-   {
-      try
-      {
-         if ( arguments.length < 2 )
-         {
-            return false;
-         }
-         else
-         {
-            var referenceEl;
-            var parentEl;
-            switch ( typeof arguments[arguments.length-1] )
-            {
-               case 'object' :
-                              parentEl    = arguments[arguments.length-1].parentNode;
-                              referenceEl = arguments[arguments.length-1];
-               break;
-               case 'string' :
-                              referenceEl = document.getElementById(arguments[arguments.length-1]);
-                              parentEl    = referenceEl.parentNode;
-            }
-
-            for ( var i = 0; i < arguments.length-1; i++ )
-            {
-                  parentEl.insertBefore(arguments[i], referenceEl);
-            }
-         } /* else */
-         return true;
-      }
-      catch(e)
-      {}
-   },
-
-   "isArray" : function(a)
-   {
-      return this.isObject(a) && a.constructor == Array;
-   },
-
-   "isFunction" : function(a)
-   {
-      return typeof a == 'function';
-   },
-
-   "isNumber" : function(a)
-   {
-      return typeof a == 'number' && isFinite(a);
-   },
-
-   "isNull" : function(a)
-   {
-      return a === null;
-   },
-
-   "isObject" : function(a)
-   {
-      return (a && typeof a == 'object') || this.isFunction(a);
-   },
-
-   "isString" : function(a)
-   {
-      return typeof a == 'string';
-   },
-
-   "isUndefined" : function(a)
-   {
-      return typeof a == 'undefined';
-   },
-
-   "json2array" : function(pObject)
-   {
-	   var retorno = [];
-	   for( var i in pObject )
-	      if( pObject[i].constructor == Object )
-	      {
-	         retorno[i] = [];
-	         retorno[i] = this.json2array(pObject[i]);
-	      }
-	      else
-	         retorno[i] = pObject[i];
-	   return retorno;
-   },
-
-   "newEl" : function(pElement)
-   {
-      if ( arguments.length == 1 )
-      {
-         switch ( typeof pElement)
-         {
-            case 'string' :
-                           return document.createElement(pElement);
-            break;
-            case 'object' :
-                           var retorno = new Array();
-                           if (this.isArray(pElement))
-                           {
-                              for (var i in pElement)
-                              {
-                                 retorno[i] = document.createElement(pElement[i]);
-                              }
-                              return retorno;
-                           }
-            break;
-         } /* switch */
-      } /* if */
-      else
-      {
-         var retorno = new Array();
-         for ( var i = 0; i < arguments.length; i++ )
-         {
-            retorno[i] = document.createElement(arguments[i]);
-         }
-         return retorno;
-      }
-   },
-
-   "trim" : function(pString)
-   {
-      return pString.replace(/^( )*|( )*$/g, '');
-   }
-}
Index: trunk/instant_messenger/bkp/instant_messenger_64/js/im_templates.js
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/js/im_templates.js	(revision 260)
+++ 	(revision )
@@ -1,244 +1,0 @@
-/**
-* @AUTHOR: Alexandre Correia / Rodrigo Souza
-* @DATE: 2006/10/24 17:03:00
-* @LAST CHANGE: Seg 11 Dez 2006 10:21:34 BRST::
-* Instant Messenger
-* im_templates.js
-**/
-
-	function Templates(){
-
-		this.element 	= document.getElementById("im_expresso");
-		this.form 		= "";
-		this.time_set 	= "";
-		this.transfer	= 0;
-		this.arquivo 	= "";
-	}
-
-   /*
-	* Conf forms
-	*/
-
-	Templates.prototype.conf_form = function(pName,pWidth,pHeight,pHTML,pTitle)
-	{
-	     var params = new Array();
-    	 params['body'] = pHTML;
-      	 params['height'] = pHeight;
-     	 params['id'] = pName;
-     	 params['maximize'] = false;
-     	 params['minimize'] = false;
-     	 params['title'] = pTitle;
-     	 params['width'] = pWidth;
-		 im_win.create_window(params);
-	}
-
-   /*
-	* Add Usuario
-	*/
-
-	Templates.prototype.add_user = function()
-	{
-		var _this = this;
-		var _XmlAddUser = '<adduser>' +	
-							'<top lang1="'+IM.get_lang('Selecione uma Organização')+'" />' +
-							'<bottom lang1="'+IM.get_lang('Jid Contact')+'" lang2="'+IM.get_lang('Nickname')+'" lang3="'+IM.get_lang('Group')+'" lang4="'+IM.get_lang('Add')+'"/>' +
-  					  	  '</adduser>';
-		
-		_this.conf_form("divAddUser",525,295,parse_XmlXsl(_XmlAddUser,'add_user.xsl'),":: " + IM.get_lang('Add New Contact') + " - Expresso ::");
-	}
-	
-	Templates.prototype.AcceptRequestUser = function()
-	{
-		var _this = this;
-		var _XmlupdUser = '<updUser>' +
-							'<body lang1="'+IM.get_lang('Nickname')+'" lang2="'+IM.get_lang('Group')+'" lang3="'+IM.get_lang('Update')+'" />' +		
-						  '</updUser>';	
-						  
-		_this.conf_form("divUpdateUser",300,110,parse_XmlXsl(_XmlupdUser,'upd_user.xsl'),":: " + IM.get_lang('Add New Contact') + " - Expresso ::");
-	}
-	
-	Templates.prototype.Status_AddUser = function()
-	{
-		if( document.getElementById('im_status_add') != null )
-			if( document.getElementById('im_status_add').innerHTML != "" )
-				document.getElementById('im_status_add').innerHTML = "";
-			else
-				document.getElementById('im_status_add').innerHTML = IM.get_lang('Contact Add') + ' ... !!!';
-	}
-
-   /*
-	* Del Usuario
-	*/
-
-	Templates.prototype.remove_user = function()
-	{
-		var _this = this;
-		var _XmlDelUser = '<deluser>' +
-							'<body lang1="'+IM.get_lang('Contact')+'" lang2="'+IM.get_lang('Remove')+'" lang3="'+IM.get_lang('close')+'"/>' +
-						  '</deluser>';
-
-		_this.conf_form("divDelUser",300,110,parse_XmlXsl(_XmlDelUser,'del_user.xsl'),":: " + IM.get_lang('Remove Contact') + " - Expresso ::");
-	}
-
-   /*
-	* Update Usuario
-	*/
-
-	Templates.prototype.Users_Not_Auth = function (jids)
-	{
-		var _this = this;
-		var _XmlUserNAuth = '<jids>';	
-		for(var i in jids)
-		{		
-			_XmlUserNAuth += '<item id="im_cell_'+jids[i]+'" jid="'+jids[i]+'" />';
-		}
-		_XmlUserNAuth += '</jids>';
-		if(document.getElementById('divFormAuthUser_im') == null){
-			_this.conf_form("divFormAuthUser",360,250,parse_XmlXsl(_XmlUserNAuth,'user_not_auth.xsl'), ":: Contatos sem Cadastro - Expresso ::");
-		}else{
-			document.getElementById('divFormAuthUser_im').innerHTML = '';
-			document.getElementById('divFormAuthUser_im').innerHTML = parse_XmlXsl(_XmlUserNAuth,'user_not_auth.xsl');
-		}
-	}
-
-   /*
-	* Vcard Usuario
-	*/
-
-	Templates.prototype.information_user = function(pVcardUser)
-	{
-		var _this = this;
-		var _XmlInfoUser = '<info_user>' +
-								'<vcard>' +
-									pVcardUser +	
-								'</vcard>' +
-							    '<getlang>' +
-									'<FN>' + IM.get_lang('Full Name') + '</FN>'+
-									'<NICKNAME>' + IM.get_lang('NickName') + '</NICKNAME>' +
-									'<ORGNAME>' + IM.get_lang('Orgname') + '</ORGNAME>' +
-									'<ORGUNIT>' + IM.get_lang('Orgunit') + '</ORGUNIT>' +
-									'<ROLE>' + IM.get_lang('Role') + '</ROLE>' +
-									'<BDAY>' + IM.get_lang('Birthday') + '</BDAY>' +
-									'<DESC>' + IM.get_lang('Status') + '</DESC>' +
-									'<SAVE>' +IM.get_lang('save') + '</SAVE>' +
-									'<CLOSE>' +IM.get_lang('close') + '</CLOSE>' +									
-								'</getlang>' +
-						   '</info_user>';	
-		_this.conf_form("divInfoUser",400,220,parse_XmlXsl(_XmlInfoUser,'information_user.xsl'), ":: " + IM.get_lang('Information User') + " - Expresso ::");
-	}
-
-	Templates.prototype.information_Contact = function(pVcardContact)
-	{
-		var _this = this;
-		var _XmlInfoContact = '<info_contact>' + 
-								 '<vcard> ' +
-								 	pVcardContact +
-								 '</vcard> ' +		
-								 '<getlang>'+
-								  	'<FN>' + IM.get_lang('Full Name') + '</FN>' +
-								  	'<NICKNAME>' + IM.get_lang('NickName') + '</NICKNAME>' +	
-								  	'<ORGUNIT>' + IM.get_lang('Orgunit') + '</ORGUNIT>' +	
-								  	'<ROLE>' + IM.get_lang('Role') + '</ROLE>' +	
-								  	'<BDAY>' + IM.get_lang('Birthday') + '</BDAY>' +	
-		 				 	     '</getlang>' +
-		 				 	  '</info_contact>';
-		_this.conf_form("divInfoContact",430,110,parse_XmlXsl(_XmlInfoContact,'info_contact.xsl'),":: Informações do Contato - Expresso ::");
-
-	}
-
-   Templates.prototype.emotions = function()
-   {
-	  var smiles = new Array("\':)\'#smile_1.src","\':d\'#smile_2.src","\';)\'#smile_3.src","\':o\'#smile_4.src","\':p\'#smile_5.src","\'(h)\'#smile_6.src","\':@\'#smile_7.src","\':$\'#smile_8.src","\':s\'#smile_9.src","\':(\'#smile_10.src","\':\\\'\(\'#smile_11.src","\':|\'#smile_12.src");
-	  var grid = '';
-	      grid += '<table cellpadding="0" cellspacing="0" border="0">';
-	      grid += '<tr>';
-	   	  for(var i = 0 ; i < 4; i++)	
-		      grid += '<td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion('+smiles[i].substr(0,smiles[i].indexOf('#'))+')" id="sendMessageMenuId"><img width="19" height="19" src="'+eval(smiles[i].substr(smiles[i].indexOf('#') + 1))+'" /></div></td>';
-		  grid += '</tr>';	
-	      grid += '<tr>';
-	   	  for(var i = 4 ; i < 8; i++)	
-		      grid += '<td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion('+smiles[i].substr(0,smiles[i].indexOf('#'))+')" id="sendMessageMenuId"><img width="19" height="19" src="'+eval(smiles[i].substr(smiles[i].indexOf('#') + 1))+'" /></div></td>';
-		  grid += '</tr>';	
-	      grid += '<tr>';
-	   	  for(var i = 8 ; i < 12; i++)	
-		      grid += '<td><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.addEmotion('+smiles[i].substr(0,smiles[i].indexOf('#'))+')" id="sendMessageMenuId"><img width="19" height="19" src="'+eval(smiles[i].substr(smiles[i].indexOf('#') + 1))+'" /></div></td>';
-		  grid += '</tr>';	
-	      grid += '<tr>';
-	      grid += '<td colspan="18"><hr style="background:#cccccc;margin:1px:size:1px;"/></td>';
-	      grid += '</tr>';
-	      grid += '<tr>';
-	      grid += '<td colspan="18"><div class="emotionItem" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideEmotionSelection()" id="closeEmotionSelectionDiv">Close This Menu</div></td>';
-	      grid += '</tr>';
-	      grid += '</table>';
-      return grid;
-   }
-
-   Templates.prototype.font_name = function()
-   {
-	  var fonts_n = new Array("Arial:Arial","Courier:Courier","Times:Times New Roman");
-	  var grid = '';
-
-	  for( var i = 0 ; i < fonts_n.length; i++ )
-    	  grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFont(\'' + fonts_n[i].substr(0,fonts_n[i].indexOf(':') + 1 )+'\')" id="fontStyle1" style="width:120px;font-family:'+fonts_n[i].substr(fonts_n[i].indexOf(':') + 1 )+'">' + fonts_n[i].substr(fonts_n[i].indexOf(':') + 1 ) + '</div>';	  
-
-      grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>';
-  	  grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontNameSelection()" id="fontStyle1" style="width:120px">Close This Menu</div>';
-
-      return grid;
-   }
-
-   Templates.prototype.font_size = function()
-   {
-      var fonts_s = new Array("9pt:9","10pt:10","11pt:11","12pt:12","14pt:14","16pt:16","18pt:18");
-      var grid = '';
-
-	  for( var i = 0 ; i < fonts_s.length ; i++ )
-	      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeSizeFont(\'' + fonts_s[i].substr(0,fonts_s[i].indexOf(':')) + '\');" id="fontStyle1" style="width:100px">' + fonts_s[i].substr(fonts_s[i].indexOf(':') + 1 ) + '</div>';
-
-      grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>';
-      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontSizeSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>';
-
-      return grid;
-   }
-
-   Templates.prototype.font_color = function()
-   {
-      var fonts_c = new Array("#000000:Black","#c0c0c0:Silver","#ffff00:Yellow","#ff0000:Red","#ff00ff:Pink","#00ff00:Green","#1111ff:Blue","#800080:Magenta");
-	  var grid = '';		 
-	  
-	  for( var i = 0; i < fonts_c.length ; i++ )	
-	      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontColor(\'' + fonts_c[i].substr(0,fonts_c[i].indexOf(':')) + '\')" id="fontStyle1" style="width:100px">' + fonts_c[i].substr(fonts_c[i].indexOf(':') + 1 )  + '</div>';
-
-      grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>';
-      grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontColorSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>';
-	  	      
-      return grid;
-   }
-
-   Templates.prototype.font_style = function()
-   {
-     var fonts_st = new Array("normal:Regular","italic:Italic","bold:Bold");
-     var grid = '';
-     
-     for( var i = 0 ; i < fonts_st.length; i++ )
-     	grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_conf_font.changeFontStyle(\'' + fonts_st[i].substr(0,fonts_st.indexOf(':')) + '\')" id="fontStyle1" style="width:100px">' + fonts_st[i].substr( fonts_st[i].indexOf(':') + 1 ) + '</div>';
-     grid += '<hr style="background:#cccccc;margin:1px:size:1px;width:120px;"/>';
-     grid += '<div class="menuitems" onMouseover="im_win.highlightie5(this)" onMouseout="im_win.lowlightie5(this)" onclick="im_win.hideFontStyleSelection()" id="fontStyle1" style="width:100px">Close This Menu</div>';
-	 
-     return grid;
-   }
-
-  /*
-   * Preferências do usuário
-   */
-   
-   Templates.prototype.yourPreferences = function()
-   {
-		var _this = this;
-		var _XmlPreferences = '<preferences />';
-		_this.conf_form("divYourPreferences",345,222,parse_XmlXsl(_XmlPreferences,'preferences.xsl'),":: Informações do Contato - Expresso ::");
-		IM_Preferences.LoadPreferences(null);
-   }
-
-   //Templates
-   var Templates = new Templates();
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/css.css
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/css.css	(revision 260)
+++ 	(revision )
@@ -1,405 +1,0 @@
-b.rnd
-{
-   background:	#fff;
-   display:	block;
-   font-size:	1px;
-}
-b.rnd b
-{
-   display:	block;
-   height:		1px;
-   overflow:	hidden;
-}
-b.rnd1
-{
-   border-color:     #809aa9;
-   border-width:     1px 1px 0px 1px;
-   border-style:     solid;
-   background:						#cbdae4;
-   margin:							0px 2px;
-}
-b.rnd2
-{
-      border-color:     #809aa9;
-      border-width:     0px 1px 0px 1px;
-      border-style:     solid;
-      background:					   #cbdae4;
-	  margin:							0px 1px;
-}
-
-/* IM:WINDOW - ADD USER */
-
-select.add_user
-{
-   font-family:   Tahoma, Verdana, sans-serif;
-   font-size:     8pt;
-   font-weight:   normal;
-   border-color:  #809aa9;
-   border-width:  1px 1px;
-   border-style:  solid;
-   margin:        2px 2px 2px 2px;
-   width:    	  493px;
-
-
-}
-
-/* IM:WINDOW */
-
-.im_window_fantom
-{
-	position: absolute;
-	padding: 0px;
-	border-style: dashed;
-	border-width: 1px 1px 1px 1px;
-	border-color: #000000;
-	background-color: #ffffff;
-	overflow: hidden;
-}
-
-.im-windowfantom-des
-{
-	position: absolute;
-	padding: 0px;
-	overflow: hidden;
-}
-
-.im-window
-{
-    background: transparent;
-	position:   absolute;
-}
-
-.im-window-resizehandle
-{
-	position: relative;
-	overflow: auto;
-	width: 15px;
-	height: 15px;
-    background-image: url(images/img/winresize2.gif);
-}
-
-.im-window-sel {
-	z-index: 100;
-}
-
-.im-window-des {
-	z-index: 50;
-}
-
-/* IM:WINDOWHEAD */
-
-.im_window_head
-{
-   background:    #cbdae4;
-   border-color:  #809aa9;
-   border-width:  0px 1px;
-   border-style:  solid;
-   height:        24px;
-	margin:        0px;
-	overflow:      hidden;
-	width:         258px;
-}
-
-.im-window-sel .im-windowhead {
-	background-position: 0 0;
-}
-
-.im-window-des .im-windowhead {
-	background-position: 0 -25px;
-}
-
-.im-window-flash .im-windowhead {
-	background-position: 0 0px;
-        background-image: url(images/img/flash_win_top_left2.gif);
-}
-
-.im-windowhead-right{
-	padding-right: 5px;
-	margin: 0;
-	background: 100% 0 transparent no-repeat;
-        background-image: url(images/img/win_top_right.gif);
-	overflow: hidden;
-}
-
-.im-window-sel .im-windowhead-right{
-	background-position: 100% 0;
-}
-
-.im-window-des .im-windowhead-right{
-	background-position: 100% -25px;
-}
-
-.im-window-flash .im-windowhead-right{
-	background-position: 100% 0;
-        background-image: url(images/img/flash_win_top_right2.gif);
-}
-
-.im-windowhead-mid {
-	position: relative;
-	background-position: 0 0;
-        background-image: url(images/img/win_top_mid.gif);
-	background-repeat: repeat-x;
-	overflow: hidden;
-	line-height: 25px;
-	height: 25px;
-	cursor: auto;
-	font-weight: bold;
-	padding-left: 24px;
-}
-
-.im-window-sel .im-windowhead-mid {
-	background-position: 0 0;
-	color: #000000;
-}
-
-.im-window-des .im-windowhead-mid {
-	background-position: 0 -25px;
-	color: #aaaaaa;
-}
-
-.im-window-flash .im-windowhead-mid {
-	background-position: 0 0;
-        background-image: url(images/img/flash_win_top_mid2.gif);
-	color: #aaaaaa;
-}
-
-.im_window_title
-{
-   cursor:        move;
-   float:         left;
-   font-weight:   bolder;
-   height:        16px;
-   left:          8px;
-   overflow:      hidden;
-   position:   	  relative;
-   top:           3px;
-   width:         166px;
-}
-
-.im_window_icon
-{
-   float: left;
-   height: 16px;
-   margin: 0px 5px;
-   width: 16px;
-}
-
-
-/* IM:WINDOWBODY */
-
-
-.im_window_body
-{
-	background-color: #cbdae4;
-	border-color:     #809aa9;
-	border-style:     solid;
-	border-width:     0px 1px 1px 1px;
-}
-
-.im_window_body_inner
-{
-	background: #fff;
-    border:     1px solid #809aa9;
-    margin:  0px 3px;
-	overflow: auto;
-}
-
-.im-window-des .im-windowbody {
-	border-color: #d0dfe5;
-	background-color: #f0f5f8;
-
-}
-
-.im-window-flash .im-windowbody {
-	border-color: #d0dfe5;
-	background-color: #f0f5f8;
-    background-image: url(images/img/flash_window_background.gif);
-}
-
-.im-window-des .im-windowbody-inner {
-	border-color: #b9cfd8;
-}
-
-.edit_message
-{
-	background-color: #fff;
-   border:           2px solid #c9d9e8;
-	color:            #000;
-	font-family:      Tahoma, Verdana, sans-serif;
-	font-size:        10pt;
-	font-weight:      normal;
-   padding:          0px;
-}
-
-/* WINDOWBUTTONS */
-
-.im_window_head_buttons
-{
-    display:       block;
-    float:         left;
-	height:        15px;
-    padding-top:   6px;
-	position:      relative;
-	right:         0px;
-	width:         53px;
-}
-
-.im-window-sel .im-windowbutton-container {
-	background-position: 0 0;
-}
-
-.im-window-des .im-windowbutton-container {
-	background-position: 0 -25px;
-}
-
-.im-window-button {
-	margin: 1px 0px 0 2px;
-	/*float: left;*/
-   /*float: right;*/
-   /*clear: both;*/
-	height: 13px;
-	width: 13px;
-   position: absolute;
-	cursor: pointer;
-   top: 3px;
-   /*left: 20px;
-   /*right: 10px;*/
-}
-
-.im-window-sel .im-window-button {
-	background-position: 0 0;
-}
-
-.im-window-sel .im-window-button-hov {
-	background-position: 0 -13px;
-}
-
-.im-window-sel .im-window-button-pres {
-	background-position: 0 -26px;
-}
-
-.im-window-des .im-window-button {
-	background-position: 0 -39px;
-}
-
-.im-window-des .im-window-button-hov {
-	background-position: 0 -52px;
-}
-
-.im-window-des .im-window-button-pres {
-	background-position: 0 -65px;
-}
-
-.im-window-closebutton {
-   background-image: url(images/img/close.gif);
-}
-
-.im-window-maximizerestorebutton {
-   background-image: url(images/img/max.gif);
-}
-
-.im-window-minimizebutton {
-   background-image: url(images/img/min.gif);
-}
-
-/* IM:TASKBAR */
-
-.im-taskbar
-{
-	position: absolute;
-	width: 100%;
-	height: 27px;
-	z-index: 101; 
-	background-position: 0 0;
-	background-repeat: repeat;
-    overflow: hidden;
-}
-
-/* IM:TASKBARITEM */
-
-.im-taskbaritem-des {
-	position: absolute;
-	top: 0;
-	right: 0;
-	width: 150px;
-	height: 22px;
-    border-style: solid;
-	border-width: 1px 1px 1px 1px;
-	border-color: #B9CFD8;
-    background-position: 0 -4px;
-    background-image: url(images/img/win_top_mid.gif);
-    padding: 3px 10px;
-    color: #555555;
-    -moz-box-sizing: border-box;
-    cursor:pointer ;
-}
-
-.im-taskbaritem-flash {
-	position: absolute;
-	top: 0;
-	right: 0;
-	width: 150px;
-	height: 22px;
-        border-style: solid;
-        border-color: #B9CFD8;
-	border-width: 1px 1px 1px 1px;
-        background-position: 0 0;
-        background-image: url(images/img/flash_window_background.gif);
-        background-repeat: repeat;
-        padding: 3px 10px;
-        color: #555555;
-        -moz-box-sizing: border-box;
-        cursor:pointer ;
-}
-
-.im-taskbaritem {
-    position: absolute;
-	top: 0;
-	right: 0;
-	width: 150px;
-	height: 22px;
-    border-style: solid;
-	border-width: 1px 1px 1px 1px;
-	border-color: #B9CFD8;
-        background-position: 0 -26px;
-        background-image: url(images/img/win_top_mid.gif);
-        padding: 3px 10px;
-        color: #999999;
-        -moz-box-sizing: border-box;
-        cursor:pointer;
-}
-
-.menu_im
-{
-   /*border-bottom: 1px solid #ccc;*/
-   display:       none;
-   /*float:         left;*/
-   list-style:    none;
-   margin:        0px;
-   padding:       0px;
-   position:      absolute;
-   width:         150px; /* Width of Menu Items */
-	z-index:       1000;
-}
-
-.menu_im dt a
-{
-   background:      #cbdae4;
-   border:          1px solid #b9cfd8;
-   border-bottom:   0px;
-   color:           #000;
-   display:         block;
-   padding:         2px;
-   text-decoration: none;
-}
-
-.menu_im dt a:hover
-{
-   color:      #e2144a;
-   background: #f9f9f9;
-}
-
-.contato_hover
-{
-   background-color: #cbdae4;
-}
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/messenger.css
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/messenger.css	(revision 260)
+++ 	(revision )
@@ -1,361 +1,0 @@
-div.border
-{
-   margin-top: 0px;
-   border: 2px solid #C9D9E8;
-   padding: 0px;
-   float: left;
-}
-
-div.popupChecker
-{
-   position : absolute;
-   left : 15px;
-   top : 100px;
-   background : #FFFFFF;
-   width : 200px;
-   height : 100px;
-   text-align : center;
-   visibility : hidden;
-}
-
-div.deleteContact
-{
-    position : absolute;
-    left : 20px;
-    top : 100px;
-    background : #FFFFFF;
-    width : 250px;
-    height : 150px;
-    text-align : center;
-    visibility : hidden;
-}
-
-div.flyMenu
-{
-    position : absolute;
-    left : 75px;
-    top : 100px;
-    border: 2px solid #C9D9E8;
-    background : #DFEFFE;
-    width : 150px;
-    height : 60px;
-    text-align : left;
-    visibility : hidden;
-}
-
-div.statusMenu
-{
-    position : absolute;
-    border: 1px solid #C9D9E8;
-    background : #DFEFFE;
-    text-align : left;
-    visibility : hidden;
-}
-
-.flyMenuClass
-{
-    position:absolute;
-    width:150px;
-    border:2px solid #C9D9E8;
-    background-color:#DFEFFE;
-    line-height:20px;
-    cursor:default;
-    font-size:11px;
-    z-index:100;
-    visibility:hidden;
-}
-
-.menuitems
-{
-    padding-left:10px;
-    padding-right:10px;
-    font-size:11px;
-    border: 1px solid #DFEFFE;
-    cursor:pointer ;
-}
-
-.padding
-{
-    padding-left:10px;
-    padding-right:10px;
-    font-size:11px;
-}
-
-.contactItem
-{
-    font-size:11px;
-}
-
-table.border
-{
-    margin-top: 0px;
-    border: 2px solid #C9D9E8;
-    padding: 0px;
-    float: left;
-}
-
-p.small
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-
-}
-
-span.small
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-}
-
-p.small-red
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-    color: #FF0000;
-}
-
-font.small
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-}
-
-font.small-grey
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-}
-
-font.large
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 12pt;
-}
-
-table.window
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 10pt;
-	border : 1px solid Black;
-}
-
-table.excel
-{
-	font-family : Tahoma, Verdana, Arial, sans-serif ;
-	font-size : 8pt;
-	border : 0px dashed Black;
-}
-
-div.sel
-{
-  	position: absolute;
-  	padding: 0px 4px 2px;
-  	border: solid 1px;
-  	border-color: #C9D9E8;
-  	background: #ffffff;
-}
-
-div.des
-{
-  	position: absolute;
-  	border: 0px;
-  	padding: 1px 5px 3px;
-}
-
-div.sel-small
-{
-  	position: relative;
-  	padding: 1px 6px 1px 6px;
-  	border: solid 1px;
-  	border-color: #C9D9E8;
-  	background: #DFEFFF;
-  	cursor:pointer;
-  	-moz-box-sizing: border-box;
-}
-
-div.des-small
-{
-  	position: relative;
-  	border: 0px;
-  	padding: 2px 7px 2px 7px;
-  	cursor:pointer ;
-  	-moz-box-sizing: border-box;
-}
-
-span.sel-small
-{
-  	position: relative;
-  	padding: 0px 2px;
-  	border: solid 1px;
-  	border-color: #C9D9E8;
-  	background: #DFEFFF;
-  	cursor:pointer;
-  	-moz-box-sizing: border-box;
-}
-
-span.des-small
-{
-  	position: relative;
-  	border: 0px;
-  	padding: 1px 3px;
-  	cursor:pointer ;
-  	-moz-box-sizing: border-box;
-}
-
-div.menuitems
-{
-    padding: 2px;
-    padding-left:10px;
-    padding-right:10px;
-    font-size:11px;
-    border: 1px solid #DFEFFE;
-    background : #DFEFFE;
-    cursor:pointer ;
-}
-
-div.menuitems-sel
-{
-    padding: 2px;
-    padding-left:10px;
-    padding-right:10px;
-    font-size:11px;
-    border: 1px solid #C9D9E8;
-    background: #ffffff;
-    cursor:pointer ;
-}
-
-div.emotionFrame 
-{
-    position: absolute;
-    border: 1px solid #A9B9C8;
-    background: #DFEFFE;
-}
-
-div.emotionItem
-{
-    padding: 2px;
-    font-size:11px;
-    background: #ffffff;
-    border: 1px solid #DFEFFE;
-    cursor:pointer ;
-}
-
-div.emotionItem-sel
-{
-    padding: 1px;
-    font-size:11px;
-    background: #FFFFFF;
-    border: 2px solid #99a9b8;
-    cursor: pointer;
-}
-
-div.myAvatar
-{
-    background: #fff;
-    border: 2px solid #C9D9E8;
-    height:     65px;
-	margin:     2px;
-    padding:    2px;
-    width:      49px;
-}
-
-div.composing
-{
-    background: #fff;
-	bottom:     0px;
-	display:    none;
-    height:     14px;
-	position:   absolute;
-    width:      14px;
-}
-
-div.avatarSelection
-{
-    position: relative;
-    border-style: solid;
-	border-width: 1px 1px 1px 1px;
-	border-color: #B9CFD8;
-    background-color: #ffffff;
-    padding: 2px;
-    cursor:pointer ;
-    -moz-box-sizing: border-box;
-}
-
-dl
-{
-    margin: 0px;
-    padding: 0px;
-}
-dd
-{
-    margin: 0px;
-    padding: 0px;
-   display: inline;   
-}
-
-   .master
-   {
-      height:     250px;
-      margin:     0px;
-      padding:    0px;
-	   position:   absolute;
-      overflow:   hidden;
-      width:      350px;
-      z-index:    1;
-   }
-   .pai
-   {
-	  background: #cbdae4 4px 2px no-repeat;
-      border:     1px solid #809aa9;
-      border-top: 0px;
-      height:     242px;
-      margin:     0px 0px 0px 0px;
-      padding:    3px 2px 0px 0px;
-	  position:   relative;
-      z-index:    1;
-   }
-   .filho
-   {
-      background: #fff;
-      border:     1px solid #809aa9;
-      height:     208px;
-      left:       4px;
-      margin:     0px 0px 15px 0px;
-      position:   absolute;
-      top: 23px;
-      width:      338px;
-      z-index:    2;
-   }
-   .header
-   {
-      margin:     0px 0px 3px 3px;
-      padding:    0px 0px 0px 20px;
-      height:     20px;
-   }
-   .but
-   {
-      border:  1px solid #809aa9;
-      height:  13px;
-      width:   13px;
-      margin:  3px 58px 3px -3px;
-      padding: 0px;
-   }
-   .tit
-   {
-      float:   left;
-      height: 13px;
-      margin:  0px;
-      padding: 0px;
-      overflow: hidden;
-   }
-._rtop{display:block;}
-._rtop *{display:block;height: 1px;overflow: hidden}
-._r1{margin: 0 4px;height: 0px}
-._r2{margin: 0 3px}
-._r3{margin: 0 2px}
-._r4{margin: 0 1px}
-
-._rs1{margin: 0 2px}
-._rs2{margin: 0 1px}
-._rtop *{border-width: 0px 1px;border-style: solid; border-color: #809aa9}
-._rtop ._r1{border-top: 1px solid #809aa9;}
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/stop_script.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/stop_script.php	(revision 260)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#!/usr/bin/php5 -q
-<?php
-
-	exec("killall php >/dev/null &");
-	set_time_limit(1);
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/config.tpl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/config.tpl	(revision 260)
+++ 	(revision )
@@ -1,78 +1,0 @@
-<!-- BEGIN header -->
-<form method="POST" action="{action_url}">
-<table border="0" align="center">
-   <tr bgcolor="{th_bg}">
-    <td colspan="2"><font color="{th_text}">&nbsp;<b>{title} - Jabber</b></font></td>
-   </tr>
-<!-- END header -->
-
-<!-- BEGIN body -->
-   <tr bgcolor="{row_on}">
-    <td colspan="2">&nbsp;</td>
-   </tr>
-
-   <tr bgcolor="{row_off}">
-    <td colspan="2">&nbsp;<b>Configuração do Servidor Jabber</b></td>
-   </tr>
-
-   <tr bgcolor="{row_on}">
-    <td>Digite o nome da máquina Servidor Jabber:</td>
-    <td><input id="IM_name_jabber" name="newsettings[name_jabber]" value="{value_name_jabber}"></td>
-   </tr>
-
-   <tr bgcolor="{row_off}">
-    <td>Digite Nome da Conexão:</td>
-    <td><input id="IM_resource_jabber" name="newsettings[resource_jabber]" value="{value_resource_jabber}"></td>
-   </tr>
-
-   <tr bgcolor="{row_on}">
-    <td>Digite a porta do Servidor Jabber:</td>
-    <td><input id="IM_port_jabber" name="newsettings[port_jabber]" value="{value_port_jabber}"></td>
-   </tr>
-
-   <tr bgcolor="{row_off}">
-    <td>Servidor Ldap:</td>
-    <td><input id="IM_server_ldap_jabber" name="newsettings[server_ldap_jabber]" value="{value_server_ldap_jabber}"></td>
-   </tr>
-
-   <tr bgcolor="{row_on}">
-    <td>Contexto:</td>
-    <td><input id="IM_context_ldap_jabber" name="newsettings[context_ldap_jabber]" value="{value_context_ldap_jabber}" size="30"></td>
-   </tr>
-
-   <tr bgcolor="{row_off}">
-    <td>Usuário Ldap:</td>
-    <td><input id="IM_user_ldap_jabber" name="newsettings[user_ldap_jabber]" value="{value_user_ldap_jabber}" size="30"></td>
-   </tr>
-
-   <tr bgcolor="{row_on}">
-    <td>Password:</td>
-    <td><input type="password" name="newsettings[password_ldap_jabber]" value="{value_password_ldap_jabber}"></td>
-   </tr>
-
-   <tr bgcolor="{row_off}">
-    <td colspan="2"> Gerenciamento IMManager</td>
-   </tr>
-
-   <tr bgcolor="{row_on}">
-	<td colspan="2">
-		<iframe src ="instant_messenger/templates/default/script_load.php?user={value_user_ldap_jabber}" frameborder="0" height="60px" scrolling="no"></iframe>
-	</td>
-   </tr>
-<!-- END body -->
-
-<!-- BEGIN footer -->
-  <tr bgcolor="{th_bg}">
-    <td colspan="2">
-&nbsp;
-    </td>
-  </tr>
-  <tr>
-    <td colspan="2" align="center">
-      <input type="submit" name="submit" value="{lang_submit}">
-      <input type="submit" name="cancel" value="{lang_cancel}">
-    </td>
-  </tr>
-</table>
-</form>
-<!-- END footer -->
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/index.tpl
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/index.tpl	(revision 260)
+++ 	(revision )
@@ -1,164 +1,0 @@
-<!-- BEGIN index -->
-    <h1>Como Utilizar o Expresso Messenger</h1>
-    <h2><a name="toc">Conteúdo</a></h2>
-    <ol>
-      <li><a href="#intro">Introdução</a>
-      <li><a href="#acesso_primeiro">Acessando o Expresso Messenger pela Primeira Vez</a>
-      <li><a href="#supported">Browsers Suportados</a>
-	  <li><a href="#prefe">Menu Opções</a>
-      <li><a href="#contact_list">Lista de Contatos</a>
-        <ol>
-          <li><a href="#status">Indicador de Status</a>
-          <li><a href="#useradd">Adicionando um novo contato</a>
-          <li><a href="#userdel">Removendo um contato</a>          
-        </ol>
-      <li><a href="#menu_right">Preferências Avançadas</a>
-      <li><a href="#info_ad">Vcard - Informações Adicionais</a>
-      <li><a href="#info_prefe">Preferências</a>      
-	  <li><a href="#troca_mens">Troca de Mensagens</a>
-	  <li><a href="#troca_status">Troca de Status</a>      
-    </ol>
-
-    <h2><a name="intro">1. Introdução</a></h2>
-    
-    O Expresso Messenger é uma aplicação que permite o envio e recebimento de mensagens instantaneamente. Através da sua lista de contatos, você pode trocar mensagens e arquivos com seus contatos. Através da lista também é possível saber se seus contatos estão Online ou Offline. Para a troca de mensagens basta clicar em cima do nome do seu contato, se o mesmo estiver online ( verifique a sessão <a href="#status">Indicador de Status</a> ) abrirá uma janela onde você poderá enviar/receber as mensagens. O Expresso Messenger está associado
-    a um serviço de mensagens instantâneas Jabber, este serviço é responsável pelo armazenamento dos seus contatos, preferências e mensagens.
-	
-	<br clear="all">
-	<br>
-	( figura 1 )
-    <img src="templates/default/images/lista_contatos.png" width="242" height="381" alt="Im Screenshot" align="left" style="padding-right:4px;"> 
-	
-    <br clear="all">
-
-	<h2><a name="acesso_primeiro">2. Acessando o Expresso Messenger pela Primeira Vez</a></h2>
-	
-	Para o acessar o Expresso Messenger, basta clicar em cima da figura <img src="templates/default/images/available.gif">("bolinha verde"), abrirá uma uma janela igual a figura 2. A lista de contatos aparecerá com a seguinte frase : "Nenhum Contato", até que sejam cadastrados novos contatos. 
-
-	<br clear="all">
-	<br>
-	( figura 2 )
-    <img src="templates/default/images/lista_contatos_primeira.png" width="222" height="337" alt="Im Screenshot" align="left" style="padding-right:4px;"> 
-    
-    <br clear="all">
-
-    <h2><a name="supported">3. Browsers Suportados</a></h2>
-
-    <p>
-      <b>Windows XP/2000/ME/98/95:</b>
-	  <ul>
-	    <li>MS Internet Explorer desde a versão 6.0</li>
-	    <li>Mozilla Firefox desde a versão 1.5</li>
-	  </ul>
-	  
-    <p>
-      <b>Linux:</b>
-      <ul>
-	    <li>Mozilla Firefox desde a versão 1.5</li>
-      </ul>
-    </p>
-
-    <h2><a name="prefe">4. Menu Opções</a></h2>
-	( figura 3 )
-    <img src="templates/default/images/menu_preferencias.png" width="272" height="173" alt="Menu Preferências" align="left">
-    <br clear="all">
-    <br>
-
-	Para acessar o menu "Opções" ( conforme figura 3 ), basta dar um clique com o mouse e abrirá um menu com as opções de Adicionar Contato ( <b>veja <a href="#useradd">Adicionando um novo contato</a></b> ), Remover Contato ( <b>veja <a href="#userdel">Removendo um contato</a></b> ), 
-	Vcard - Informações Adicionais ( <b>veja <a href="#info_ad">Vcard - Informações Adicionais</a></b> ) e Preferências ( <b>veja <a href="#info_prefe">Preferências</a></b> ).
-    
-    <h2><a name="contact_list">5. Lista de Contatos</a></h2>
-	( figura 4 )
-    <img src="templates/default/images/lista_contatos1.png" width="236" height="242" alt="Lista de Contatos" align="left">
-    <br clear="all">
-    <br>
-    
-    Na lista de contato ( conforme figura 4 ), você visualizará seus contatos. 
-    <h3><a name="status">1. Status dos Usuários</a></h3>
-    
-    <img src="templates/default/images/available.gif" align="top"> - Contato Online<br>
-    <img src="templates/default/images/away.gif" align="top"> - Contato Ausente<br>
-    <img src="templates/default/images/dnd.gif" align="top"> - Contato Ocupado<br>
-    <img src="templates/default/images/unavailable.gif" align="top"> - Contato Offline<br>    
-
-    <h3><a name="useradd">2. Adicionando um novo contato </a></h3>
-	( figura 4.1 )
-	<br/>
-    <img src="templates/default/images/adicionar_contato.png" width="536" height="342" alt="Adicionar Contato" align="left">
-    <br clear="all">
-    <br>
-
-	Para adicionar um novo contato ( conforme figura 4.1 ), selecione uma organização e automaticamente carregará os usuários que tem permissão para usar o Mensageiro Instantâneo Expresso. Para escolher
-	seu novo contato basta apenas dar um clique em cima do nome desejado. Logo abaixo, três campos são necessários para adicionar o novo contato, sendo que o campo "Email Expresso" e
-	"Nickname" são preenchidos no momento da escolha do novo contato e o campo grupo terá que ser definido. Tendo os três campos preenchidos basta clicar no Botão Adicionar ( <input type="button" value="Adicionar"> ) .
-
-	<h3><a name="userdel">3. Removendo um contato </a></h3>
-	( figura 4.2 )
-	<br/>	
-    <img src="templates/default/images/remover_contato.png" width="314" height="157" alt="Remover Contato" align="left">
-    <br clear="all">
-    <br>
-
-	Para remover um contato da sua lista ( conforme figura 4.2 ), selecione na lista e clique no botao Botão Remover ( <input type="button" value="Remover"> ) .
-    
-    <h2><a name="menu_right">6. Preferências Avançadas</a></h2>
-	( figura 4.3 )
-	<br/>
-    <img src="templates/default/images/menu_right.png" width="151" height="108" alt="Preferências Avançadas" align="left">
-    <br clear="all"/>
-    <br/>
-
-    Clicando com o botão direito do mouse, você tera acesso a um menu ( conforme figura 3.3 ), com as seguintes funcionalidades :
-
-    <ul>
-      <li>Apelido: Renomeia o Apelido ( Nickname ) do seu contato
-      <li>Grupo: Muda seu contato para um novo grupo
-      <li>Remover: Exclui o contato
-      <li>(Re)-requisitar Autorização: Requisitar autorização
-      <li>Ver Info: Visualize as informações dos seus contatos
-    </ul>
-
-    <h2><a name="info_ad">7. Vcard - Informações Adicionais</a></h2>
-	( figura 5 )
-    <img src="templates/default/images/info_adicionais.png" width="410" height="267" alt="Informações Adicionais" align="left">
-    <br clear="all"/>
-    <br/>
-
-	Efetuando o cadastro ( conforme figura 5 ) com seus dados, os contatos que você adicionou em sua lista poderão ver essas informações. Cada contato cadastrado em sua lista
-	também possui esta opção ( <b>veja <a href="#menu_right">Preferências Avançadas</a></b>, opção Ver Info).
-
-    <h2><a name="info_prefe">8. Preferências</a></h2>
-	( figura 6 )
-    <img src="templates/default/images/preferencias.png" width="356" height="270" alt="Preferências" align="left">
-    <br clear="all"/>
-    <br/>
-
-	Personalize seu tempo para ficar ausente, se em sua lista de contato aparecerá seus contatos offline e um tipo de aviso para uma nova mensagem. 
-
-    <h2><a name="troca_mens">9. Troca de Mensagens</a></h2>
-	( figura 7 )
-    <img src="templates/default/images/troca_mensagem.png" width="332" height="272" alt="Troca de Mensagens" align="left">
-    <br clear="all"/>
-    <br/>
-
-	Clicando com o mouse em cima do nome do contato escolhido, abrirá uma janela ( conforme figura 7 ), para a troca de mensagens. Nessa mesma janela existe um menu, o qual é possível
-	configurar o formato da : Fonte, Tamanho, Cor e o Estilo. Você também pode enviar os Smiles, clicando nessa figura <img src="templates/default/images/img/1.gif">.
-
-    <h2><a name="troca_status">10. Troca de Status</a></h2>
-	( figura 8 )
-    <img src="templates/default/images/troca_status.png" width="449" height="313" alt="Troca de Status" align="left">
-    <br clear="all"/>
-    <br/>
-
-	Para mudar o seu status basta dar um click em cima do status desejado.
-
-	<br/><br/>
-
-    <img src="templates/default/images/available.gif" align="top"> - Online <br/>
-    <img src="templates/default/images/away.gif" align="top"> - Ausente <br/>
-    <img src="templates/default/images/dnd.gif" align="top"> - Ocupado <br/>
-    <img src="templates/default/images/unavailable.gif" align="top"> - Offline - Não recebe mensagem <br/>    
-    <img src="templates/default/images/img/icon_edit.gif" align="top"> - Mensagem - Personalize sua mensagem <br/>        
-
-    <hr noshade>
-<!-- END index -->
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/start_script.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/start_script.php	(revision 260)
+++ 	(revision )
@@ -1,6 +1,0 @@
-#!/usr/bin/php5 -q
-<?php
-	
-	exec("php -q /var/www/expresso/instant_messenger/IMManager.php &>/dev/null &");
-	set_time_limit(1);
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/templates/default/script_load.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/templates/default/script_load.php	(revision 260)
+++ 	(revision )
@@ -1,107 +1,0 @@
-<html>
-<head>
-<script type="text/javascript">
-	var number_process = "";
-
-	function init()
-	{
-		info_process_id();
-		if(!validate_form() || number_process != "")
-			document.im_script_load.start_script.disabled = true;
-		
-	}
-	function info_process_id()
-	{
-		var element = document.getElementById('span_process_id');
-		if(number_process)		
-			element.innerHTML = number_process;
-		else
-			element.innerHTML = "<font color='red'>Serviço parado</font>";	
-	}
-	function validate_form()
-	{
-		if(trim(parent.document.getElementById('IM_name_jabber').value) == "")
-			return false;
-		if(trim(parent.document.getElementById('IM_resource_jabber').value) == "")
-			return false;
-		if(trim(parent.document.getElementById('IM_port_jabber').value) == "")
-			return false;
-		if(trim(parent.document.getElementById('IM_server_ldap_jabber').value) == "")
-			return false;
-		if(trim(parent.document.getElementById('IM_context_ldap_jabber').value) == "")
-			return false;
-		if(trim(parent.document.getElementById('IM_user_ldap_jabber').value) == "")
-			return false;
-
-		return true;
-	}
-	
-	function trim(pString)
-   {
-      return pString.replace(/^( )*|( )*$/g, '');
-   }
-   
-</script>
-<?php
-	
-	if( isset($_SESSION['phpgw_info']['instant_messenger']['user']) )
-	{
-		if($_REQUEST['user'] || $_SESSION['phpgw_info']['instant_messenger']['user'] == "rodsouza" || $_SESSION['phpgw_info']['instant_messenger']['user'] == "alexandrecorreia")
-		{
-			if($_POST['start_script'])
-			{
-				exec("php -q start_script.php");		
-				unset($_POST['start_script']);
-			}
-			
-			if($_POST['stop_script'])
-			{
-				exec("php -q stop_script.php");		
-				unset($_POST['stop_script']);
-			}
-			
-			$process = shell_exec("ps aux | grep IMManager.php$ | cut -c10-14");
-			$process = preg_replace("/\\n/","",$process);
-			echo "<script>number_process='".$process."'</script>";
-			
-		}else
-			exit;
-	}else
-		exit;
-
-?>
-<style>
-div
-{
-	font-weight : bold;
-	font-size: 11px !important; 
-	color: #006699 !important; 
-	font-family: Arial, Helvetica, sans-serif !important;
-}
-input,button
-{
-	font-size: 11px !important; 
-	color: #006699 !important; 
-	font-family: Arial, Helvetica, sans-serif !important;
-	border: 1px #bbbbbb solid !important;
-}
-
-input[type=submit],input[type=button],button
-{
-	margin:1px !important;
-	padding:1px !important;
-	cursor: pointer !important; 
-	cursor: hand !important;
-}
-</style>
-</head>
-<body onload="javascript:init();">
-	<div>Número do Processo : <span id="span_process_id"></span></div>
-	<br />
-	<form name="im_script_load" method="POST" action="script_load.php">
-		<input type="submit" value="Start Script" name="start_script" />
-		<input type="submit" value="Stop Script" name="stop_script" />
- 		<input type="hidden" name="user" value="user" />		
-	</form>
-</body>
-</html>
Index: trunk/instant_messenger/bkp/instant_messenger_64/IMManager.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/IMManager.php	(revision 260)
+++ 	(revision )
@@ -1,272 +1,0 @@
-#!/usr/bin/php -Cq
-<?php
-
-   require_once('inc/IMConfigure.php');
-	require_once('inc/Jabberd2.abstract.php');
-
-	## limit to indefinite execution
-	set_time_limit (0);
-   
-   ###
-   # definitions of socket - BEGIN
-   #
-      define('URI', '0.0.0.0');
-      define('TARGET_NON_SECURITY', TRANSPORT_NON_SECURITY . '://' . URI  . ':' . PORT_NON_SECURITY);
-      define('SOCKET_NON_SECURITY', socket_create(AF_INET, SOCK_STREAM, SOL_TCP));
-   #
-   # definitions of socket - END
-   ###
-      // create a streaming socket, of type TCP/IP
-      // set the option to reuse the port
-      socket_set_option(SOCKET_NON_SECURITY, SOL_SOCKET, SO_REUSEADDR, 1);
-
-      // "bind" the socket to the address to "localhost", on port $port
-      // so this means that all connections on this port are now our resposibility to send/recv data, disconnect, etc..
-      socket_bind(SOCKET_NON_SECURITY, 0, 8000);
-
-      // start listen for connections
-      socket_listen(SOCKET_NON_SECURITY);
-
-   if ( !SOCKET_NON_SECURITY )
-   {
-      printf("NON SECURITY:\n(%d) %s", $errno_non_security, $errstr_non_security);
-      exit(0);
-   }
-
-   $master = array(SOCKET_NON_SECURITY);
-   $users = array();
-   $send = false;
-
-   while ( true )
-   {
-      $read = $master;
-      $_w = NULL;
-      $_e = NULL;
-      //$mod_fd = @stream_select($read, $_w , $_e , READ_SOCKET_AFTER_OF );
-      $mod_fd = socket_select($read, $_w = NULL, $_e = NULL, READ_SOCKET_AFTER_OF);
-
-      if ( $mod_fd === FALSE )
-      {
-         break;
-      }
-
-      for ( $i = 0; $i < $mod_fd; ++$i )
-      {
-         if ( $read[$i] === SOCKET_NON_SECURITY )
-         {
-            $conn_non_security = socket_accept(SOCKET_NON_SECURITY);
-            $master[] = &$conn_non_security;
-         }
-         else
-         {
-	    $sock_data = socket_read($read[$i], 1024);
-            if ( strlen($sock_data) === 0 )
-            {
-               $key_to_del = array_search($read[$i], $master, TRUE);
-               socket_close($read[$i]);
-               unset($master[$key_to_del]);
-            }
-            else if ( $sock_data === FALSE )
-            {
-               $key_to_del = array_search($read[$i], $master, TRUE);
-               unset($master[$key_to_del]);
-            }
-            else
-            {
-               $headers = (split("\n", $sock_data));
-
-               preg_match('/^(GET|POST) \/(.+) HTTP\/1\.\d/U', $headers[0], $request);
-               preg_match('/^Host: \w*:(.+)/', $headers[1], $host);
-
-               $conn = &$conn_non_security;
-
-               $request = explode(';', $request[2]);
-
-               if ( $request[0] == CONNECT && isset($request[1]) && !isset($users[$request[1]]) )
-               {
-                  connect($users, $request[1]);
-               }
-
-               if ( $request[0] == CLOSE && isset($request[1]) && isset($users[$request[1]]) )
-               {   
-               	close($request[1]);
-               }
-
-               socket_close($read[$i]);
-               unset($master[array_search($read[$i], $master)]);
-            }
-         }
-      }	
-      
-      foreach ( $users as $key => $val )
-      {
-   		$time_now = time();
-   		if ( ( $time_now - $users[$key]['timeClient'] ) < DISCONNECT_AFTERWARDS_OF )         
-         {
-         	readSocket($users, $key);
-         }
-         else
-         {
-				if((($time_now - $users[$key]['timeClient']) / DISCONNECT_AFTERWARDS_OF) > 2 )
-				{
-     				$users[$key]['jabber']->disconnect();
-     				unset($users[$key]);     				
-				}
-				else
-				{
-					readSocket($users, $key);
-				}         	
-         }
-      }
-   }
-	
-   exit(0);
-
-   function connect(&$pUsers, $pSession)
-   {
-	global $users;
-		      
-      $sessionpath = explode(';', session_save_path());
-      foreach ( $sessionpath as $path )
-      {
-         $path = ( strrpos($path, '/') == strlen($path) - 1 ) ? $path : $path . '/';
-
-         if ( file_exists($path . 'sess_' . $pSession) )
-         {
-            session_id($pSession);
-
-            ob_start();
-            session_start();
-            ob_clean();
-            ob_end_flush();
-
-            $is_user = isset($_SESSION['phpgw_info']['instant_messenger']['user']) and isset($_SESSION['phpgw_info']['instant_messenger']['passwd']);
-            if ( $is_user )
-            {
-               $_user     = $_SESSION['phpgw_info']['instant_messenger']['user'];
-               $_pass     = $_SESSION['phpgw_info']['instant_messenger']['passwd'];
-               $_server   = $_SESSION['phpgw_info']['instant_messenger']['name_jabber'];
-               $_port     = $_SESSION['phpgw_info']['instant_messenger']['port_jabber'];
-               $_resource = $_SESSION['phpgw_info']['instant_messenger']['resource_jabber'];
-               $_time     = time();
-               $_SESSION['phpgw_info']['instant_messenger']['timeClient'] = $_time;
-					$_SESSION['phpgw_info']['instant_messenger']['timeServer'] = $_time;               
-               $_SESSION['phpgw_info']['instant_messenger']['socket'] = NULL;
-               $_SESSION['phpgw_info']['instant_messenger']['socket']['in'] = NULL;
-               $_SESSION['phpgw_info']['instant_messenger']['socket']['out'] = array();
-               $_SESSION['phpgw_info']['instant_messenger']['socket']['out']['message'] = NULL;
-               $_SESSION['phpgw_info']['instant_messenger']['socket']['block'] = false;
-
-               session_write_close();
-
-               $a = new Jabberd2;
-               if ( ($a->connect($_user . '@' . $_server . '/' . $_resource . ':' . $_port, $_pass)) )
-               {
-                  $pUsers[$pSession] = array();
-                  $pUsers[$pSession]['jabber'] = $a;
-                  $pUsers[$pSession]['timeClient'] = $_time;
-               }
-               else
-               {
-                  unset($a);
-               }
-               break;
-            }
-            session_write_close();
-         }
-      }
-   }
-
-   function close($pUser)
-   {
-      global $users;
-      $users[$pUser]['jabber']->disconnect();
-      unset($users[$pUser]);
-   }
-
-   function readSocket(&$pUsers, $pSession)
-   {
-      global $send;
-      $sessionpath = explode(';', session_save_path());
-      foreach ( $sessionpath as $path )
-      {
-         $path = ( strrpos($path, '/') == strlen($path) - 1 ) ? $path : $path . '/';
-
-         if ( file_exists($path . 'sess_' . $pSession) )
-         {
-            session_id($pSession);
-
-            ob_start();
-            session_start();
-            ob_clean();
-            ob_end_flush();
-
-            $is_user = isset($_SESSION['phpgw_info']['instant_messenger']['user']) and isset($_SESSION['phpgw_info']['instant_messenger']['passwd']);
-            if ( $is_user )
-            {
-               $pUsers[$pSession]['timeClient'] = $_SESSION['phpgw_info']['instant_messenger']['timeClient'];
-               $_SESSION['phpgw_info']['instant_messenger']['timeServer'] = time();
-               
-					$readSocket = @$pUsers[$pSession]['jabber']->readSocket();
-               
-               $connection_close_timeout = strpos($readSocket, "<stream:error");
-               $connection_close_server = strpos($readSocket,"</stream:stream>");
-               
-               if ( ($readSocket !== false) && ($connection_close_timeout === false ) && ($connection_close_server === false ))
-               {
-                  $_SESSION['phpgw_info']['instant_messenger']['IM_disconnect'] = false;
-                  if ( !empty($readSocket) )
-                  {
-                     $_SESSION['phpgw_info']['instant_messenger']['socket']['in'] .= $readSocket;
-                  }
-
-						if ( $_SESSION['phpgw_info']['instant_messenger']['socket']['out'] )
-							foreach ( $_SESSION['phpgw_info']['instant_messenger']['socket']['out'] as $action => $value )
-							{
-								if ( $action === 'message' )
-								{
-									if ( !is_null($value) )
-									{
-										$pUsers[$pSession]['jabber']->writeSocket($value);
-										$_SESSION['phpgw_info']['instant_messenger']['socket']['out']['message'] = NULL;
-									}
-								}
-								else if ( $action === 'vcard' )
-								{
-									if ( !empty($value) )
-									{
-										foreach ( $value as $key => $val )
-										{
-											$pUsers[$pSession]['jabber']->getVcard($val);
-											unset($_SESSION['phpgw_info']['instant_messenger']['socket']['out']['vcard'][$key]);
-										}
-									}
-								}
-								else
-								{
-									if ( method_exists($pUsers[$pSession]['jabber'], $action) )
-										if ( $value )
-											$pUsers[$pSession]['jabber']->$action($value);
-										else
-											$pUsers[$pSession]['jabber']->$action();
-									unset($_SESSION['phpgw_info']['instant_messenger']['socket']['out'][$action]);
-								}
-							}
-               }
-               else
-               {
-               	$_SESSION['phpgw_info']['instant_messenger']['IM_disconnect'] = true;
-               	close($pSession);               	
-               }
-               break;
-            }
-            else
-            {
-               close($pSession);
-            }
-            break;
-         }
-      }
-      session_write_close();
-   }
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/controller.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/controller.php	(revision 260)
+++ 	(revision )
@@ -1,103 +1,0 @@
-<?php
-	//	Explode action from cExecuteForm function
-	$cExecuteFormReturn = false;
-   $returnMode = $_REQUEST['returnMode'];
- 	if($_POST['_action']) {
- 		if($_FILES) {
- 			$count_files = $_POST['countFiles'];
-			$array_files = array();
- 			for($idx = 1; $idx <= $count_files; $idx++) {
- 				if($_FILES['file_'.$idx] && !$_FILES['file_'.$idx]['error'])
- 					$array_files[] = $_FILES['file_'.$idx];
- 			}
- 			$_POST['FILES'] = $array_files;
- 		}
- 		list($app,$class,$method) = explode('.',@$_POST['_action']);
- 		$cExecuteFormReturn = true;
- 	}
- 	//	Explode action from cExecute function
- 	else if($_GET['action'])
-   {
-      unset($_GET['returnMode']);
-		list($app,$class,$method) = explode('.',@$_GET['action']);
-   }
-	// NO ACTION
-	else
-		return $_SESSION['response'] = 'false';
-
-	// Load dinamically class file.
-	if($app == '$this')
-		$filename = 'inc/class.'.$class.'.inc.php';
-	else
-		$filename = '../'.$app.'/inc/class.'.$class.'.inc.php';
-
-	include_once($filename);
-
-	// Create new Object  (class loaded).
-	$obj = new $class;
-
-	// Prepare parameters for execution.
-	$params = array();
-
-	// If array $_POST is not null , the submit method is POST.
-	if($_POST) {
-		$params = $_POST;
-	}
-	// If array $_POST is null , and the array $_GET > 1, the submit method is GET.
-	else if(count($_GET) > 1)	{
-		array_shift($_GET);
-		$params = $_GET;
-	}
-
-	$result = array();
-
-
-	// if params is not empty, then class method with parameters.
-	if($params)
-		$result = $obj -> $method($params);
-	else
-		$result = $obj -> $method();
-
-	// Return result json string into xml object.
-	if(!$cExecuteFormReturn)
-   {
-      $dom = new DOMDocument;//('1.0', 'UTF-8');
-
-      if ( $returnMode == 'JSON')
-      {
-         $root = $dom->appendChild(new DOMElement('retorno'));
-         encode($result, 'encode');
-         $result = ( !is_object($result) && !is_array($result) ) ? $result : json_encode($result);
-
-         $root->appendChild($dom->createCDATASection($result));
-      }
-      else
-		{
-			$_SESSION['phpgw_info']['instant_messenger']['debug2'] = $result;
-			$dom->loadXML('<retorno>' . utf8_encode($result) . '</retorno>');
-		}
-
-      $dom->normalizeDocument();
-		$retorno = $dom->saveXML();
-      header('Pragma: anytextexeptno-cache', true);
-      header('Content-type: text/xml, charset=UTF-8');
-		print $retorno;
-   }
-	else
-		$_SESSION['response'] = $result;
-
-   function encode(&$item, $val = 'encode')
-   {
-      switch( gettype($item) )
-      {
-         case 'object' :
-                     $item = get_object_vars($item);
-                     encode($item);
-         break;
-         case 'array' :
-                     array_walk_recursive($item, 'encode');
-         break;
-         default : $item = utf8_encode($item);
-      }
-   }
-?>
Index: trunk/instant_messenger/bkp/instant_messenger_64/index.php
===================================================================
--- trunk/instant_messenger/bkp/instant_messenger_64/index.php	(revision 260)
+++ 	(revision )
@@ -1,45 +1,0 @@
-<?php
-	/****************************************************\
-	 *													*
-	 * 	 			Im - Instant Messenger				*
-	 *													*
-	\****************************************************/
-	
-	$GLOBALS['phpgw_info']['flags'] = array(
-		'currentapp' => 'instant_messenger',
-		'im_version'	=> '0.2'
-	);
-	
-	include("../header.inc.php");
-    $im_version = $GLOBALS['phpgw_info']['flags']['im_version'];
-
-	// Template  
-	$template_1 = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
-	$template_1->set_file(Array('instant_messenger' => 'index.tpl'));
-	$template_1->set_block('instant_messenger','index');
-	$template_1->pfp('out','index');
-	
-	// Session
-	$_SESSION['phpgw_info']['instant_messenger']['user'] 			      	= $GLOBALS['phpgw_info']['user']['account_lid'];
-	$_SESSION['phpgw_info']['instant_messenger']['passwd'] 			      = $GLOBALS['phpgw_info']['user']['passwd'];
-	$_SESSION['phpgw_info']['instant_messenger']['name_jabber'] 	      = $GLOBALS['phpgw_info']['server']['name_jabber'];
-	$_SESSION['phpgw_info']['instant_messenger']['port_jabber'] 	      = $GLOBALS['phpgw_info']['server']['port_jabber'];
-	$_SESSION['phpgw_info']['instant_messenger']['resource_jabber']       = $GLOBALS['phpgw_info']['server']['resource_jabber'];
-
-	// Conf. Ldap
-	$_SESSION['phpgw_info']['instant_messenger']['server_ldap_jabber']    = $GLOBALS['phpgw_info']['server']['server_ldap_jabber'];
-	$_SESSION['phpgw_info']['instant_messenger']['context_ldap_jabber']   = $GLOBALS['phpgw_info']['server']['context_ldap_jabber'];
-	$_SESSION['phpgw_info']['instant_messenger']['user_ldap_jabber']      = $GLOBALS['phpgw_info']['server']['user_ldap_jabber'];
-	$_SESSION['phpgw_info']['instant_messenger']['password_ldap_jabber']  = $GLOBALS['phpgw_info']['server']['password_ldap_jabber'];	
-	$_SESSION['phpgw_info']['instant_messenger']['size_file_jabber']  	  = $GLOBALS['phpgw_info']['server']['size_file_jabber'];	
-	
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass'];	
-	$_SESSION['phpgw_info']['instant_messenger']['server']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];
-
-	// Footer
-	$GLOBALS['phpgw']->common->phpgw_footer();
-?>
