Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins.xml	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins.xml	(revision 697)
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<plugins>
+    <plugin>
+        <name>filetransfer</name>
+        <description>filetransfer.File_Transfer</description>
+        <version>0.1</version>
+        <min_jeti_version>0.6.1</min_jeti_version>
+        
+    </plugin>
+    <plugin>
+        <name>xhtml</name>
+        <description>xhtml.Formats_messages</description>
+        <version>0.3</version>
+        <min_jeti_version>0.5</min_jeti_version>
+        
+    </plugin>
+</plugins>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins/rostericons/rostericons.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins/rostericons/rostericons.xml	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/plugins/rostericons/rostericons.xml	(revision 382)
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<plugins>
+    <plugin>
+        <name>Crystal (MSN)</name>
+        <description>Crystal MSN Iconset</description>
+        <version>msn</version>
+        <min_jeti_version>crystal_msn.jisp</min_jeti_version>
+    </plugin>
+    <plugin>
+        <name>ICQ</name>
+        <description>Default ICQ iconset</description>
+        <version>icq</version>
+        <min_jeti_version>icq.jisp</min_jeti_version>
+    </plugin>
+    <plugin>
+        <name>MSN</name>
+        <description>Default MSN messenger iconset</description>
+        <version>msn</version>
+        <min_jeti_version>msn.jisp</min_jeti_version>
+    </plugin>
+    <plugin>
+        <name>Crystal (ICQ)</name>
+        <description>Crystal ICQ Iconset</description>
+        <version>icq</version>
+        <min_jeti_version>crystal_icq.jisp</min_jeti_version>
+    </plugin>
+</plugins>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/profiles.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/profiles.xml	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/profiles.xml	(revision 382)
@@ -0,0 +1,3 @@
+<?xml version="1.0"?>
+<profiles>
+</profiles>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/default.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/default.xml	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/default.xml	(revision 697)
@@ -0,0 +1,44 @@
+<?xml version='1.0'?>
+<preferences>
+	<!-- File Transfer -->
+	<preference key="filetransfer.closeOnComplete" value="true"/>
+	<preference key="filetransfer.useLocalIP" value="true"/>
+	
+	<!--Main Jeti menu-->
+	<preference key="jeti.country" value="BR"/>
+	<preference key="jeti.jetimenuShowMessage" value="false"/>
+	<preference key="jeti.jetimenuShowAccount" value="false"/>
+	<preference key="jeti.jetimenuShowOptions" value="false"/>
+	<preference key="jeti.jetimenuShowLog" value="false"/>
+	<preference key="jeti.jetimenuShowAddContact" value="false"/>
+	<preference key="jeti.jetimenuShowChat" value="false"/>
+	<preference key="jeti.jetimenuShowExit" value="false"/>
+	<preference key="jeti.jetimenuShowComment" value="false"/>
+
+	<!--Roster menu-->
+	<preference key="jeti.rostermenuShowMessage" value="false"/>
+	<preference key="jeti.rostermenuShowChat" value="false"/>
+	<preference key="jeti.rostermenuSubscriptions" value="true"/>
+	<preference key="jeti.rostermenuRemove" value="true"/>
+	<preference key="jeti.rostermenuRename" value="true"/>
+	<preference key="jeti.rostermenuGroup" value="true"/>
+	<preference key="jeti.rostermenuLocalTime" value="false"/>
+	<preference key="jeti.rostermenuLocalVersion" value="false"/>
+	<preference key="jeti.rostermenuLastSeen" value="false"/>
+	<preference key="jeti.rostermenuInvisible" value="false"/>
+	<preference key="jeti.Language" value="pt"/>
+	<preference key="jeti.jetiShowError" value="false"/>
+	<preference key="jeti.hideLoginWindow" value="false"/>
+
+	<!--Hide the server selection box-->
+	<preference key="jeti.hideServerSelect" value="true"/>
+	<!--Hide the port and ssl selection in the login window-->
+	<preference key="jeti.hidePortSelect" value="true"/>
+	<!--Hide the resource input field-->
+	<preference key="jeti.hideResourceInput" value="true"/>
+	<!--Hide the register button-->
+	<plugins>
+		<plugin type="plugins" name="xhtml" enabled="true" transport="0.3"/>
+		<plugin type="plugins" name="filetransfer" enabled="true" transport="0.1"/>
+   	</plugins>
+</preferences>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/index.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/index.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/index.php	(revision 697)
@@ -0,0 +1,22 @@
+<?php
+	/*******************************************************
+	 * Im - JabberIt
+	 * Colaboradores : Alexandre Correia / Rodrigo Souza
+	 *
+	 * ****************************************************/
+
+	$GLOBALS['phpgw_info']['flags']['currentapp'] = 'jabberit_messenger';
+	$GLOBALS['phpgw_info']['flags']['jabberit_version'] = '0.7.11';
+
+	include("../header.inc.php");
+
+	$jabberit_version = $GLOBALS['phpgw_info']['flags']['jabberit_version'];
+	
+	$template = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
+	$template->set_file(Array('jabberit_messenger' => 'indexIM.tpl'));
+	$template->set_block('jabberit_messenger','index');
+	$template->pfp('out','index');
+
+	$GLOBALS['phpgw']->common->phpgw_footer();
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/groupslocked.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/groupslocked.tpl	(revision 563)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/groupslocked.tpl	(revision 563)
@@ -0,0 +1,56 @@
+<!-- BEGIN groups_locked -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.glocked"></script>
+<form method="POST" action="{action_url}">
+	<table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
+		<tr class="th">
+			<td colspan="2">&nbsp;<b>{lang_Jabberit_settings}</b></td>
+		</tr>
+		<tr class="row_off">
+			<td colspan="2" style="color:red !important">{lang_description}</td>
+		</tr>
+		<tr class="row_on">
+			<td colspan="2">
+				{lang_organizations} :
+				&nbsp;
+				<select id="admin_organizations_ldap" name="organizations" onchange="locked.gLdap(this);">
+					{ous_ldap}
+				</select>
+				<span id="admin_span_loading" style="color:red;visibility:hidden;">&nbsp;{lang_load}</span>
+			</td>
+		</tr>
+		<tr class="row_off">
+			<td colspan="2">
+				<table align="center" cellspacing="0">
+					<tr>
+						<td class="row_off">	
+							{lang_grupos_ldap} :
+							<br/>
+							<select id="groups_ldap_jabberit" size="10" style="width: 300px" multiple></select>
+						</td>
+						<td class="row_off">
+							<input type="button" value="{lang_add}" onclick="locked.add();" />
+							<br/>
+							<br/>
+							<input type="button" value="{lang_remove}" onclick="locked.remove();" />
+						</td>
+						<td class="row_off">
+							{lang_grupos_restritos} :
+							<br/>
+							<select id="groups_locked_jabberit" size="10" style="width: 300px" multiple name="groups_locked_jabberit[]">{groups_restricts}</select>
+						</td>
+					</tr>
+				</table>
+			</td>
+		</tr>
+		<tr>
+			<td colspan="2" align="center">
+			  <input type="submit" name="save" value="{lang_save}" onclick="locked.selectAll();">
+			  <input type="submit" name="cancel" value="{lang_cancel}">
+			  <br>
+			</td>
+		</tr>
+	</table>
+</form>
+<!-- END groups_locked -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/config.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/config.tpl	(revision 563)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/config.tpl	(revision 563)
@@ -0,0 +1,105 @@
+<!-- BEGIN header -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.setup"></script>
+<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} - Jetti Applet</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 com Jeti Applet</b></td>
+   </tr>
+
+   <tr bgcolor="{row_on}">
+    <td id="JETTI_name_jabberit__label">Digite o nome do Servidor Jabber:</td>
+    <td><input type="text" id="JETTI_name_jabberit" name="newsettings[name_jabberit]" value="{value_name_jabberit}"></td>
+   </tr>
+
+   <tr bgcolor="{row_off}">
+    <td id="JETTI_port_jabberit__label">Digite a porta do Servidor Jabber:</td>
+    <td><input type="text" id="JETTI_port_jabberit" name="newsettings[port_jabberit]" value="{value_port_jabberit}"></td>
+   </tr>
+   
+   <tr bgcolor="{row_on}">
+    <td id="JETTI_resource_jabberit__label">Digite Nome da Conexão:</td>
+    <td><input type="text" id="JETTI_resource_jabberit" name="newsettings[resource_jabberit]" value="{value_resource_jabberit}"></td>
+   </tr>
+   
+   <tr bgcolor="{row_off}">
+    <td id="JETTI_group_chat_server_jabberit__label">Digite GroupChatServer :</td>
+    <td><input type="text" id="JETTI_group_chat_server_jabberit" name="newsettings[group_chat_server_jabberit]" value="{value_group_chat_server_jabberit}" size="30"></td>
+   </tr>
+
+   <tr bgcolor="{row_on}">
+    <td>SSL:</td>
+    <td>
+		<select name="newsettings[use_ssl_jabberit]">
+			<option value="false" {selected_use_ssl_jabberit_false}>Não</option>
+			<option value="true" {selected_use_ssl_jabberit_true}>Sim</option>
+		</select>
+	</td>
+   </tr>
+
+   <tr bgcolor="{row_off}">
+   	<td>Usar Proxy do Java:</td>
+   	<td>	
+   		<select name="newsettings[use_proxy_java]">
+   			<option value="false" {selected_use_proxy_java_false}>Não</option>
+   			<option value="true" {selected_use_proxy_java_true}>Sim</option>
+   		</select>
+   	</td>
+   </tr>
+
+   <tr bgcolor="{row_on}">
+		<td colspan="2">&nbsp;<b>Configurando o Nome da Empresa</b></td>
+   </tr>
+	
+	<tr bgcolor="{row_off}">
+		<td id="JETTI_name_company_applet_jabberit__label">Digite o Nome da sua Empresa:</td> 
+		<td><input type="text" id="JETTI_name_company_applet_jabberit" name="newsettings[name_company_applet_jabberit]" value="{value_name_company_applet_jabberit}"></td>	
+	</tr>
+
+   <tr bgcolor="{row_on}">
+    <td colspan="2">&nbsp;<b>Configuração do Servidor Ldap</b></td>
+   </tr>
+
+   <tr bgcolor="{row_off}">
+    <td id="JETTI_server_ldap_jabberit__label">Servidor Ldap:</td>
+    <td><input type="text" id="JETTI_server_ldap_jabberit" name="newsettings[server_ldap_jabberit]" value="{value_server_ldap_jabberit}"></td>
+   </tr>
+
+   <tr bgcolor="{row_on}">
+    <td id="JETTI_context_ldap_jabberit__label">Contexto:</td>
+    <td><input type="text" id="JETTI_context_ldap_jabberit" name="newsettings[context_ldap_jabberit]" value="{value_context_ldap_jabberit}" size="30"></td>
+   </tr>
+
+   <tr bgcolor="{row_off}">
+    <td id="JETTI_user_ldap_jabberit__label">Usuário Ldap:</td>
+    <td><input type="text" id="JETTI_user_ldap_jabberit" name="newsettings[user_ldap_jabberit]" value="{value_user_ldap_jabberit}" size="30"></td>
+   </tr>
+
+   <tr bgcolor="{row_on}">
+    <td id="JETTI_password_ldap_jabberit__label">Password:</td>
+    <td><input type="password" id="JETTI_password_ldap_jabberit" name="newsettings[password_ldap_jabberit]" value="{value_password_ldap_jabberit}"></td>
+   </tr>
+
+<!-- END body -->
+
+<!-- BEGIN footer -->
+  <tr>
+    <td colspan="2" align="center">
+      <input type="submit" name="submit" value="{lang_submit}" onclick="return constructScript.sendf(document);">
+      <input type="submit" name="cancel" value="{lang_cancel}">
+    </td>
+  </tr>
+</table>
+</form>
+<!-- END footer -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/module.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/module.tpl	(revision 514)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/module.tpl	(revision 514)
@@ -0,0 +1,43 @@
+<!-- BEGIN module -->
+<form method="POST" action="{action_url}">
+<table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
+	<tr class="th">
+		<td colspan="2">&nbsp;<b>{lang_Enable_the_Expresso_Messenger_module}</b></td>
+	</tr>
+	<tr class="row_on">
+		<td style="height:30px;">&nbsp;{lang_Select_the_modules_where_the_Expresso_Messenger_will_be_loaded}</td>
+	</tr>
+	<tr class="row_off">
+		<td colspan="2">
+			<table align="center" cellspacing="0" style="margin-top:15px">
+				<tr>
+					<td class="row_off">	
+						{lang_Modules_List} :
+						<br/>
+						<select id="apps_list" size="10" style="width: 300px" multiple>{apps_list}</select>
+					</td>
+					<td class="row_off">
+						<input type="button" value="Adicionar" onclick="javascript:App.add();" />
+						<br/>
+						<br/>
+						<input type="button" value="Remover" onclick="javascript:App.remove();" />
+					</td>
+					<td class="row_off">
+						{lang_Modules_Enabled} :
+						<br/>
+						<select id="apps_enabled" size="10" style="width: 300px" multiple name="apps_enabled[]">{apps_enabled}</select>
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+		  <input type="submit" name="save" value="{lang_save}" onclick="javascript:App.select_();">
+		  <input type="submit" name="cancel" value="{lang_cancel}">
+		  <br>
+		</td>
+	</tr>
+</table>
+</form>
+<!-- END module -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confGroupsLocked.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confGroupsLocked.tpl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confGroupsLocked.tpl	(revision 697)
@@ -0,0 +1,59 @@
+<!-- BEGIN confGroups -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.setup"></script>
+<form>
+<table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
+	<tr class="th">
+		<td colspan="2">&nbsp;<b>{lang_Informe_as_Organizacoes}</b></td>
+	</tr>
+	<tr class="row_on">	
+		<td colspan="2" style="padding:5 0 5 0px;">
+			&nbsp;<b>&nbsp;{lang_Nome_Grupo}&nbsp;:</b><span style="font-size:12px;color:red;">&nbsp;{value_Name_Group}&nbsp;</span>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>&nbsp;{lang_Cadastrar_Organizacao}&nbsp;</b></td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2">
+			<table>
+				<tr>
+					<td colspan="3">
+						<label>{lang_Organization}</label>&nbsp;.:&nbsp;
+						<select id="organizations_ldap_jabberit">
+				   			{value_organizations_ldap}
+				   		</select>
+					</td>
+					<td class="row_on" style="border:1px solid #00000">
+					  <input type="button" name="add" value="{lang_save}" {value_flag} onclick="constructScript.setOrgFgroups();">
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>{lang_Organizacoes_cadastradas_para_grupo}</b></td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<table id="tableOrganizationsEnabledGroupsJabberit" cellspacing="2" style="width:100%">
+				<tr class='th'>
+					<td align="left" class="row_on">{lang_Organization}</td>
+					<td align="left" class="row_on" style="width:30% !important">{lang_Delete}</td>					
+				</tr>
+				{value_Groups_Organizations}
+			</table>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+		  <input type="button" name="back" value="{lang_Back}" onClick="document.location.href='{action_url}'">
+		  <input type="hidden" id="nameGroup" value="{value_Name_Group}"/>
+		  <input type="hidden" id="gidNumber" value="{value_gidNumber}"/>
+		  <br/>
+		</td>
+	</tr>
+</table>
+</form>
+<!-- END confGroups -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/index.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/index.tpl	(revision 514)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/index.tpl	(revision 514)
@@ -0,0 +1,15 @@
+<!-- BEGIN index -->
+<html>
+<head>
+<link rel='stylesheet' type='text/css' href='../help/templates/{template_default}/css/index.css'>
+</head>
+<body style="margin:0px;padding:0px">
+<table width='100%'>
+<tr><td align='right' background="../help/templates/{template_default}/images/fundo_topo.jpg">
+<img src="../help/templates/{template_default}/images/topo.jpg" style="overflow:hidden;z-index:-1;">
+<p class='titulo' style="font-color:blue;text-align:center;position:absolute;top:20px;left:5px;z-index:0;">Ajuda</p>
+</td></tr></table>
+	<iframe bgcolor="WHITE" frameborder='0' width='100%' height='410px' src="templates/{template_set}/content.html"></iframe>
+</body>
+</html>
+<!-- END index -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM_IE.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM_IE.tpl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM_IE.tpl	(revision 697)
@@ -0,0 +1,60 @@
+<!-- BEGIN index -->
+<html> 
+	<head>
+	<script type="text/javascript" src="../jabberit_messenger/js/changeStatus.js"></script>
+	<script type="text/javascript">
+		
+		// Pop-up or Layer
+		if( window.parent.loadscript )
+			var element = window.parent.loadscript;
+		else
+			var element = self.opener.parent.loadscript;
+
+		changestatus.setpath('{path}');
+		
+		function getArgumentsApplet()
+		{
+			if( arguments.length > 0 )
+			{
+			 	if( arguments[0] == "getArgumentsApplet" )
+					changestatus.get(arguments[1], element.getElement());
+
+				if( arguments[0] == "cleanStatus" )
+					element.autoStatusIM();
+			}
+		}
+
+		window.onunload = function()
+		{
+			var url_img = '{path}' + 'templates/default/images/unavailable.gif';
+			elementStatus.style.backgroundImage = 'url(' + url_img +')';
+		}
+		
+	</script>
+	</head>
+	<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
+		<object classid='clsid:8AD9C840-044E-11D1-B3E9-00805F499D93' width='250px' height='400px'>
+			<param name='name' value='jeti'>
+			<param name='archive' value='{java_files}'>
+			<param name='code' value='nu.fw.jeti.applet.Jeti.class'>
+			<param name='codebase' value='.'>	
+			<param name='MAYSCRIPT' value='true'>
+			<param name='SERVER' value='{value_server}'>
+			<param name='HOST' value='{value_host}'>
+			<param name='PORT' value='{value_port}'>
+			<param name='RESOURCE' value='{value_resource}'>
+			<param name='USER' value='{value_user}'>
+			<param name='PASSWORD'	value='{value_password}'>
+			<param name='SSL' value='{value_ssl}'>
+			<param name='HIDELOGINSTATUS' value='TRUE'>
+			<param name='USEPROXY' value='{value_userproxy}'>
+			<param name='EXPRESSO' value='{value_expresso}'>
+			<param name='USEHTTPS' value='{value_use_https}'>
+			<param name='NAMECOMPANY' value='{value_company}'>
+			<param name='CNNAME' value='{value_cnname}'>
+			<param name='PREFERENCE_USEROFFLINE' value='{value_preference_userOfflineJabberit}'>		
+			<param name='EXTIPAGE' value='javascript:window.close();'>
+		</object>
+	</body>
+</html>
+<!-- END index -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confOrganization.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confOrganization.tpl	(revision 551)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confOrganization.tpl	(revision 551)
@@ -0,0 +1,57 @@
+<!-- BEGIN confOrg -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.setup"></script>
+<form method="POST" action="{action_url}">
+<table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
+	<input type="hidden" name="HiddenJabberit" value="">
+	<tr class="th">
+		<td colspan="2">&nbsp;<b>Informe o atributo de autenticação no Servidor Jabber</b></td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>Cadastrar Organização</b></td>
+	</tr>
+	<tr class="row_off">
+		<td colspan="2">
+			<table>
+				<tr>
+					<td align="right" class="row_on">Ogranização : </td>
+					<td class="row_on"><input id="organization_ldap_jabberit" type="text" size="30" maxlength="30"></td>
+				</tr>
+				<tr>
+					<td align="right" class="row_on">Atributo :</td>
+					<td class="row_on"><select id="attributes_ldap_list_jabberit">{attributes_list}</select></td>
+				</tr>
+				<tr>
+					<td colspan="2" class="row_on" style="border:1px solid #00000">
+					  <input type="button" name="add" value="{lang_save}" onclick="return constructScript.sendf(document);">
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>Organizações Cadastradas</b></td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<table id="tableHiddenJabberit" cellspacing="2" style="width:100%">
+				<tr style="width:60%">
+					<td align="left" class="row_on">{lang_Organization}</td>
+					<td align="left" class="row_on">{lang_Attribute}</td>
+					<td align="left" class="row_on">{lang_Delete}</td>					
+				</tr>
+				{organizations_attributes}
+			</table>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+		  <input type="hidden" name="confOrganization" value="confOrganization">
+		  <input type="submit" name="back" value="{lang_Back}">
+		  <br>
+		</td>
+	</tr>
+</table>
+</form>
+<!-- END confOrg -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/common.css
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/common.css	(revision 514)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/common.css	(revision 514)
@@ -0,0 +1,162 @@
+/* IM:WINDOW - ADD USER */
+
+div.add_organization_members
+{
+	margin-bottom: 30px;
+}
+
+div.add_organization_members span
+{
+	border-bottom: 1px solid #809aa9;
+	float:left;
+	font-size: 8pt !important;
+	font-family: Arial, Verdana, helvetica, sans-serif !important;
+	font-weight: bold;
+	position:aboslute;
+	width: 200px;
+}
+
+div.add_organization_members div
+{
+	font-weight: normal;
+	margin: 2px;
+	padding: 3px;
+	height: 230px;
+	overflow: auto;
+}
+
+div.add_organization_members div span
+{
+	background: url(../images/photo.png) no-repeat;
+	border-bottom: 1px dashed #809aa9;
+	border-right: 1px dashed #809aa9;
+	clear:both;
+	float:left;
+	font-weight: normal;
+	height: 65px;
+	letter-spacing: 0.2em;
+	padding: 4px 0 4px 80px;
+	margin-bottom: 20px;
+	width: 300px;
+}
+
+div.add_organization_members div#im_ldap_ou
+{
+	float: left;
+	width: 200px;
+}
+
+div.add_member_info
+{
+	margin: 10px 0;
+	display: none;
+}
+
+div.add_member_info span
+{
+	float: left;
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	margin-right: 3px;
+	text-align: right;
+	width: 80px;
+}
+
+div.add_action
+{
+	padding-top: 30px;
+	padding-bottom: 30px;
+	margin-left: 83px;
+	display: none;
+}
+
+div.add_action span
+{
+	background: #dedede;
+	border: 1px solid;
+	float: left;
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	letter-spacing: 1px;
+	margin-right: 5px;
+	padding: 0 15px;
+	text-align: center;
+	line-height: 1.5em;
+}
+
+div.search_user 
+{
+	font-size: 8pt !important;
+	font-family: Arial, Verdana, helvetica, sans-serif !important;
+	font-weight: bold;
+	margin: 0 0 0 5px;
+}
+
+.search_user_button
+{
+	border: 1px solid #000 !important;
+}
+
+span.im_button
+{
+	background: #dedede;
+	border: 1px solid;
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+	font-weight: bold;
+	letter-spacing: 1px;
+	padding: 0 15px;
+	text-align: center;
+	line-height: 1.5em;
+}
+
+div.loading
+{
+	background: #fdd url(../images/loading.gif) no-repeat 1px 1px;
+	border: 1px dashed #f00;
+	margin:	2px;
+	padding: 3px 3px 3px 20px;
+	text-align: center;
+}
+
+span.message_time
+{
+	color: #aaa;
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+}
+
+.font_menu
+{
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+}
+
+.layer
+{
+	background: url(../images/photo.png) no-repeat 2px 2px;
+	border:	1px solid #dedede;
+	height: 65px;
+	margin:	2px;
+	padding: 2px 0px 2px 54px;
+}
+
+/* Disconnected */
+
+.disconnected
+{
+	font: 9pt Verdana, Arial, Helvetica, sans-serif;
+	border: 1px solid #dedede;
+	margin: 2px;
+}
+
+/* Vcard */
+
+.vcard_user
+{
+	font: 9pt Verdana, Arial, Helvetica, sans-serif;
+	margin:10px;
+}
+
+.vcard_contact
+{
+	font: 9pt Verdana, Arial, Helvetica, sans-serif;
+	margin:10px;
+}
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/selectEditStyle.css
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/selectEditStyle.css	(revision 514)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/selectEditStyle.css	(revision 514)
@@ -0,0 +1,50 @@
+	.selectBoxArrow
+	{
+		margin-top:1px;
+		float:left;
+		position:absolute;
+		right:1px;
+
+	}	
+	
+	.selectBoxInput
+	{
+		font-family: Verdana, Helvetica, sans;
+		font-size: 11px !important;
+		border:0px !important;
+		padding-left:1px;
+		height:16px;
+		position:absolute;
+		bottom:0px;
+		left:0px;
+	}
+
+	.selectBox
+	{
+		border:1px solid #cecece !important;
+		height:20px;	
+	}
+	
+	.selectBoxOptionContainer
+	{
+		position:absolute;
+		border:1px solid #cecece !important;
+		font-size:12px;
+		background-color:#FFF;
+		left:-1px;
+		top:20px;
+		visibility:hidden;
+		height: 100px;
+		overflow-y:auto;
+		
+	}
+
+	.selectBoxAnOption
+	{
+		font-family: Verdana, Helvetica, sans;
+		font-size:12px;
+		cursor:default;
+		margin:1px;
+		overflow:hidden;
+		white-space:nowrap;
+	}
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/window.css
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/window.css	(revision 514)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/css/window.css	(revision 514)
@@ -0,0 +1,108 @@
+/***** Cantos Arredondados *****/
+.corner { display: block; }
+.corner * { display: block; height: 1px; overflow: hidden; font-size: 0; }
+.corner1 { padding: 0 1px; margin: 0 3px; }
+.corner2 { padding: 0 1px; margin: 0 1px; }
+.corner3 { margin: 0 1px; }
+.blackcorner *{ background: #dedede; }
+/***** Cantos Arredondados *****/
+
+/***** Window  *****/
+.window
+{
+	font: 10pt Verdana, Arial, Helvetica, sans-serif;
+	margin: 0px;
+	position:fixed;
+}
+
+* html .window
+{
+	position:absolute;
+}
+
+#jabberit_messenger_content .body
+{
+	background: #dedede;
+}
+
+#jabberit_messenger_content .titulo
+{
+	background: #dedede;
+	cursor: pointer;
+	font: 8pt Verdana, Arial, Helvetica, sans-serif;
+	height: 20px;
+	line-height: 1.5em;
+	margin: 0 0;
+	overflow: hidden;
+	padding: 0 0 0 5px;
+}
+
+#jabberit_messenger_content .titulo .icon
+{
+	float:left;
+	height: 15px;
+	width: 15px;
+}
+
+#jabberit_messenger_content .titulo span
+{
+	float:left;
+	margin-left: 2px;
+}
+
+#jabberit_messenger_content .buttons
+{
+	position:absolute !important;
+	right:3px !important;
+	width:50px !important;
+}
+
+#jabberit_messenger_content .titulo .buttons div
+{
+	cursor: pointer;
+	float: right;
+	margin-right: 2px;
+	position: relative;
+	width: 13px;
+	height:13px;
+}
+
+#jabberit_messenger_content .button_minimize
+{
+	background: #dedede url(../images/window_min.gif) no-repeat top center;
+}
+
+#jabberit_messenger_content .button_maximize1
+{
+	background: #dedede url(../images/window_max1.gif) no-repeat top center;
+}
+
+#jabberit_messenger_content .button_maximize
+{
+	background: #dedede url(../images/window_max.gif) no-repeat top center;
+}
+
+#jabberit_messenger_content .button_close
+{
+	background: #dedede url(../images/window_close.gif) no-repeat top center;
+	margin-right: 0px;
+}
+
+#jabberit_messenger_content .content
+{
+	font: 9pt Verdana, Arial, Helvetica, sans-serif;
+	background: #fff;
+	border: 1px solid;
+	border-color: #b3b3b3 #dedede #dedede #b3b3b3;
+	margin: 0px 5px;
+	cursor: default;
+	overflow: auto;
+}
+
+#jabberit_messenger_content .rodape
+{
+	background: #dedede; 
+	height: 15px;
+}
+
+/***** Window - *****/
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confExternals.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confExternals.tpl	(revision 561)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/confExternals.tpl	(revision 561)
@@ -0,0 +1,84 @@
+<!-- BEGIN confOrg -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.setup"></script>
+<form method="POST" action="{action_url}">
+<table align="center" width="60%" cellspacing="2" style="border: 1px solid #000000;">
+	<input type="hidden" name="HiddenJabberitExternals" value="">
+	<tr class="th">
+		<td colspan="2">&nbsp;<b>{lang_Informe_as_Organizacoes_Externas}</b></td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>&nbsp;{lang_Cadastrar_Organizacao}&nbsp;</b></td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2">
+			<table>
+				<tr>
+					<td colspan="3">
+						<label>{lang_Habilitar_Participantes_Externos}&nbsp;.:&nbsp;</label>
+						<select name="use_external_participants_jabberit" onchange="constructScript.setPartExternal(this,document);">
+				   			{value_use_external_participants_jabberit}
+				   		</select>
+					</td>
+				</tr>
+				<tr>
+					<td align="right" class="row_on"><label id="label_CadOrgJabberit">{lang_Organization}</label>&nbsp;.:&nbsp;</td>
+					<td class="row_on">
+						<input name="text_CadOrgJabberit" {value_flag} type="text" size="30" maxlength="30">
+					</td>
+					<td class="row_on" style="border:1px solid #00000">
+					  <input type="button" name="add" value="{lang_save}" {value_flag} onclick="return constructScript.sendf(document);">
+					</td>
+				</tr>
+			</table>
+		</td>
+	</tr>
+	<tr class="row_on">
+		<td colspan="2" style="padding:5 0 5 0px;">&nbsp;<b>{lang_Organizacoes_Cadastradas}</b></td>
+	</tr>
+	<tr>
+		<td colspan="2">
+			<table id="tableExternalParticipantsJabberit" cellspacing="2" style="width:100%">
+				<tr>
+					<td align="left" class="row_on">{lang_Organization}</td>
+					<td align="left" class="row_on" style="width:30% !important">{lang_Delete}</td>					
+				</tr>
+				{organizations_attributes}
+			</table>
+		</td>
+	</tr>
+	<tr>
+		<td colspan="2" align="center">
+		  <input type="submit" name="back" value="{lang_Back}">
+		  <br>
+		</td>
+	</tr>
+</table>
+</form>
+<script>
+	
+	var form = document.forms[0];
+
+	for(var i = 0; i < form.elements.length; i++)
+	{
+		switch(form.elements[i].type)
+		{
+			case 'text':
+			case 'button':
+							
+				if({value_flag} == 'true')
+				{
+					form.elements[i].disabled = eval('true');
+					//alert('PRIMEIRO');
+				}
+				else
+				{
+					form.elements[i].disabled = eval('false');
+					//alert('SEGUNDO');
+				}
+				break;
+		}
+	}
+</script>
+<!-- END confOrg -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM.tpl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/jabberIM.tpl	(revision 697)
@@ -0,0 +1,55 @@
+<!-- BEGIN index -->
+<html> 
+	<head>
+	<script type="text/javascript" src="../jabberit_messenger/js/changeStatus.js"></script>
+	<script type="text/javascript">
+		
+		// Pop-up or Layer
+		if( window.parent.loadscript )
+			var element = window.parent.loadscript;
+		else
+			var element = self.opener.parent.loadscript;
+
+		changestatus.setpath('{path}');
+		
+		function getArgumentsApplet()
+		{
+			if( arguments.length > 0 )
+			{ 
+				if( arguments[0] == "getArgumentsApplet" )
+					changestatus.get(arguments[1], element.getElement());
+				
+				if( arguments[0] == "cleanStatus" )
+					element.autoStatusIM();
+			}
+		}
+		
+		window.onunload = function()
+		{
+			var url_img = '{path}' + 'templates/default/images/unavailable.gif';
+			elementStatus.style.backgroundImage = 'url(' + url_img +')';
+		}
+		
+	</script>
+	</head>
+	<body leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>
+		<applet name='jeti' archive='{java_files}' code='nu.fw.jeti.applet.Jeti.class' codebase='.' width='220px' height='400px' MAYSCRIPT>
+			<param name='SERVER' value='{value_server}'>
+			<param name='HOST' value='{value_host}'>
+			<param name='PORT' value='{value_port}'>
+			<param name='RESOURCE' value='{value_resource}'>
+			<param name='USER' value='{value_user}'>
+			<param name='PASSWORD'	value='{value_password}'>
+			<param name='SSL' value='{value_ssl}'>
+			<param name='HIDELOGINSTATUS' value='TRUE'>
+			<param name='USEPROXY' value='{value_userproxy}'>
+			<param name='EXPRESSO' value='{value_expresso}'>
+			<param name='USEHTTPS' value='{value_use_https}'>
+			<param name='NAMECOMPANY' value='{value_company}'>
+			<param name='CNNAME' value='{value_cnname}'>
+			<param name='PREFERENCE_USEROFFLINE' value='{value_preference_userOfflineJabberit}'>		
+			<param name='EXTIPAGE' value='javascript:window.close();'>
+		</applet>
+	</body>
+</html>
+<!-- END index -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/enabled_ou_groups.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/enabled_ou_groups.tpl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/enabled_ou_groups.tpl	(revision 697)
@@ -0,0 +1,21 @@
+<!-- BEGIN enabled_ous -->
+<script type="text/javascript" src="jabberit_messenger/js/connector.js"></script>
+<script type="text/javascript" src="jabberit_messenger/js/xtools.js"></script>
+<script type="text/javascript" src="jabberit_messenger/controller.php?act=j.glocked"></script>
+	<form>
+		<table align="center" width="90%" cellspacing="2" style="border:1px solid #000;margin-top:20px;">
+			<tr class="th">
+				<td width="30%"><b>Grupos<b/></td>
+				<td width="55%"><b>Organizações Liberadas<b/></td>
+				<td width="5%" align="center"><b>Editar</b></td>
+			</tr>
+			{list_groups}
+		</table>
+		<br/>
+		<table align="center" width="90%" cellspacing="2">
+			<tr>
+				<td><input type="button" value="{lang_back}" onClick="document.location.href='{action_url}'"></td>
+			</tr>
+		</table>
+	</form>
+<!-- END enabled_ous -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/indexIM.tpl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/indexIM.tpl	(revision 596)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/indexIM.tpl	(revision 596)
@@ -0,0 +1,153 @@
+<!-- BEGIN index -->
+    <h1>JMessenger - Como Utilizar</h1>
+    <ol>
+      <li><a href="#intro">Introdução</a>
+      <li><a href="#supported">Browsers Suportados</a>
+	  <li><a href="#prefe">Opções - Troca de Status</a>
+	  <li><a href="#conf_status">Mensagens de Status</a>
+	  <li><a href="#contact_list">Lista de Contatos</a>
+      <li><a href="#status">Indicador de Status</a>
+      <li><a href="#useradd">Adicionando um novo contato</a>
+      <li><a href="#menu_right">Preferências Avançadas</a>
+	  <li><a href="#troca_mens">Troca de Mensagens</a>
+	  <li><a href="#certi_java">Assinatura de Applet - Java</a>	  
+    </ol>
+
+    <h2><a name="intro">1. Introdução</a></h2>
+    
+    O JMessenger é 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 JMessenger está associado
+    a um serviço de mensagens instantâneas Jabber e este serviço é responsável pelo armazenamento dos seus contatos, preferências e mensagens.
+	<br>
+	<br>
+	<img src="templates/default/images/tela_inicial.png" style="width:228px; height:442px;" alt="Im Screenshot" title="Im Screenshot" align="left" style="padding-right:4px;"> 
+    <br clear="all">
+	( figura 1 )
+    <h2><a name="supported">2. 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>Internet Explorer 6.0</li>
+	    <li>Mozilla Firefox desde a versão 2.0</li>
+	    <li>Mozilla Firefox desde a versão 3.0</li>
+	  </ul>
+	  
+    <p>
+      <b>Linux:</b>
+      <ul>
+	    <li>Mozilla Firefox desde a versão 2.0</li>
+	    <li>Mozilla Firefox desde a versão 3.0</li>
+      </ul>
+    </p>
+	<h2><a name="prefe">3. Opções - Troca de Status</a></h2>
+	<br/>
+	Para a troca de status ( conforme figura 2 ), basta dar um clique com o mouse e em cima do botão <img src="templates/default/images/botao_opcoes.png" width="116" height="21" style="margin-left:5px; margin-right:5px;"/> .
+	<br/>
+	<br/>
+    <img src="templates/default/images/menu_opcoes.png" style="width:180px; height:213px; margin-top:5px;" alt="Menu Opções" title="Menu Opções" align="left"/>
+    <br clear="all">
+	( figura 2 )    
+    <h2><a name="conf_status">4. Mensagens de Status</a></h2>
+    <br/>
+    É possível configurar as mensagens para cada status escolhido (figura 3) clicando no item Personalizar.<br><br>
+	<img src="templates/default/images/conf_status.png" style="width:317px; height:235px; margin-top:5px;" alt="Mensagens de Status" title="Mensagens de Status" align="left"/>
+	<br clear="all"/>
+	( Figura 3 )
+	<br clear="all"/>
+	<h2><a name="contact_list">5. Lista de Contatos</a></h2>
+	<br/>
+    Na lista de contato ( conforme figura 4 ), você visualizará seus contatos.	
+    <br/>
+    <br/>
+    <img src="templates/default/images/lista_contatos.png" width="214" height="185" alt="Lista de Contatos" align="left" style="margin:5px;"/>
+    <br clear="all">
+    ( figura 4 )
+    <br/>
+    <h2><a name="status">6. Status dos Usuários</a></h2>
+    <img src="templates/default/images/available.png" style="margin:1px;" align="top"> - Disponível<br/>
+    <img src="templates/default/images/away.png" style="margin:1px;" align="top"> - Ausente<br/>
+    <img src="templates/default/images/chat.png" style="margin:1px;" align="top"> - Bate-papo<br/>
+    <img src="templates/default/images/dnd.png" style="margin:1px;" align="top"> - Não Perturbe<br/>
+    <img src="templates/default/images/invisible.png" style="margin:1px;" align="top"> - Invisível<br/>    
+    <img src="templates/default/images/unavailable.png" style="margin:1px;" align="top"> - Offline / Desconectado<br/>    
+    <img src="templates/default/images/xa.png" style="margin:1px;" align="top"> - Ausência Prolongada<br/>    
+    <h2><a name="useradd">7. Adicionando um novo contato </a></h2>
+	<br/>
+	Para adicionar um novo contato, clique na imagem <img src="templates/default/images/group_open.gif"/>, no canto superior esquerdo (figura 5) e abrirá uma janela para adição dos contatos (figura 6) e
+	faça uma pesquisa pelo nome. O resultado retornará <u>somente</u> os usuários que <u>tem permissão</u> para usar o Mensageiro Instantâneo do Expresso. 
+	Clique sobre o link "Adicionar Contato" e aparecerá dois campos, sendo que o campo "Apelido" é preenchido no momento da escolha do novo contato e o campo grupo
+	terá que ser definido. Preenchendo estes dois campos basta clicar no "Botão Adicionar", e o contato será adicionado em sua Lista de Contatos.
+	<br/>
+	<br/>
+    <img src="templates/default/images/adicionar_contato.png" width="247px" height="191px" alt="Adicionar Contato" title="Adicionar Contato" align="left" style="margin-top:5px;"/>
+    <br clear="all"/>
+	( figura 5 )
+    <br/>
+	<br/>
+	<img src="templates/default/images/janela_adicionar_contatos.png" width="452" height="399" style="margin-top:5px;" alt="Adicionar Contato" title="Adicionar Contato"/>
+	<br clear="all"/>
+	( figura 6 )
+	<br/>	
+	<br/>
+	<h3>Adicionando um novo contato por Email</h3>
+	Também existe a opção de adicionar um novo usuário utilizando o seu email para as <span style="color:red; font-weight:bold;">organizações</span> listadas dentro do menu informações, que pode ser acessado clicando na imagem <img src="templates/default/images/view.png">.
+	Para adicionar um novo contato utilizando o seu email, marque a opção ( figura 6.1 ) e informe o email.
+	<b>Esta opção é apenas um informativo e nem todos os usuários possuem acesso a essa funcionalidade</b>. 
+	<br/>
+	<br/>
+	<img src="templates/default/images/janela_adicionar_contatos_email.png" width="452" height="399" style="margin-top:5px;" alt="Adicionar Contato" title="Adicionar Contato"/>
+	<br clear="all"/>
+	( figura 6.1 )
+	
+	<br/>
+
+    <h2><a name="menu_right">8. Preferências Avançadas</a></h2>
+	<br/>
+	<br/>
+    Clicando com o botão direito do mouse, você tera acesso a um menu ( conforme figura 7 ), com as seguintes funcionalidades :
+
+    <ul>
+      <li>Autorizações : Requisitar e autorizar permissões ( Depois de adicionar um novo contato, é importante solicitar a autorização ).
+      <li>Grupo: Trocar / Adicionar / Remover do grupo.
+      <li>Renomear : Renomeia o contato.
+      <li>Remover: Exclui o contato.
+    </ul>
+	<br/>
+	<br/>
+    <img src="templates/default/images/menu_right.png" width="392px" height="110px" alt="Preferências Avançadas" align="left" style="margin-top:5px;"/>
+    <br clear="all"/>
+	( figura 7 )    
+    <br/>
+    <br/>
+    <h2><a name="troca_mens">9. Troca de Mensagens</a></h2>
+	<br/>
+	<br/>
+	Clicando com o mouse em cima do nome do contato escolhido, abrirá uma janela ( conforme figura 8 ), para a troca de mensagens. Nessa mesma janela existe um menu, o qual é possível
+	configurar o formato da fonte e enviar smiles.
+	<br/>
+	<br/>
+    <img src="templates/default/images/troca_de_mensagem.png" width="494" height="341" alt="Troca de Mensagens" title="Troca de Mensagens" align="left" style="margin-top:5px;"/>
+    <br clear="all"/>
+    ( figura 8 )
+    <br/>
+	<br/>
+    <h2><a name="certi_java">10. Assinatura de Applet - Java</a></h2>
+	<br/>
+	<br/>
+	O modelo de segurança implementado pela plataforma Java, está sobre o conceito que um código remoto (applet) não é confiável, garantindo assim que um applet malicioso não danifique
+	o computador. Porém existem applets que são de confiança e necessitam de permissões para fornecer determinado tipo de serviço. O Expresso Messenger é desenvolvido em
+	Java e precisa dessas permissões para fornecer o serviço de mensagens instantâneas. Quando carregado pela primeira vez, o Java que está instalado no computador, mostrará uma
+	janela ( figura 9), perguntando se deseja realmente rodar este código remoto e mostra dois botões, "Run" e o "Cancel". É necessário que seja marcada a opção "Run", e caso não queira
+	que esta janela abra, marque a opção "Always trust content from this publisher".
+	<br/>
+	<br/>
+    <img src="templates/default/images/cert_java.png" width="520" height="356" alt="Troca de Mensagens" title="Troca de Mensagens" align="bottom" style="margin-top:5px;"/>
+    <br clear="all"/>
+    ( figura 9 )
+    <br/>
+	<br/>
+
+
+	<hr noshade>
+<!-- END index -->
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/setup.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/setup.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/setup.js	(revision 697)
@@ -0,0 +1,344 @@
+(function()
+{
+	// Envio para o PHP
+	var _conn   = new JITConnector('jabberit_messenger/');
+	var _xtools = new JITXTools('jabberit_messenger/');	
+
+	function addLdapAttributes(pDocument)
+	{
+		var form = pDocument.forms[0];
+		var values = "";
+
+		for(var i = 0; i < form.elements.length; i++)
+		{
+			if( form.elements[i].id == 'attributes_ldap_list_jabberit')
+			{
+				if( form.elements[i].value == -1)
+				{
+					alert('Defina um atributo !');
+					return;
+				}
+				values += form.elements[i].value;
+				form.elements[i].options[0].selected = true;
+			}				
+
+			if( form.elements[i].id == 'organization_ldap_jabberit')
+			{
+				values += form.elements[i].value + ";";
+				form.elements[i].value = '';
+			}
+			
+		}
+	
+		_conn.go("$this.db_im.setAttributesLdap",
+				function(data)
+				{
+					if ( data )
+					{
+						var _params = {
+							'lang1': jabberitGetLang('Organization'),
+							'lang2': jabberitGetLang('Attribute'),
+							'lang3': jabberitGetLang('Delete')
+						};
+		
+						var Table = document.getElementById('tableHiddenJabberit');
+							Table.parentNode.innerHTML = _xtools.parse( data, 'tableOrganizations.xsl', _params);
+					}
+				},
+				"conf=" + values);
+	}
+
+	function addParticipantsExternals(pDocument)
+	{
+		var form = pDocument.forms[0];
+		var organization = "";
+		
+		for(var i = 0; i < form.elements.length; i++)
+		{
+			if( form.elements[i].type == 'text' )
+			{
+				var nameElement = form.elements[i].name;
+					nameElement = nameElement.substring(nameElement.indexOf('_') +1);
+				
+				if( form.elements[i].value != "" && ltrim(form.elements[i].value) != "" )
+				{
+						document.getElementById('label_' + nameElement).style.color = "black";
+						organization = form.elements[i].value;
+						form.elements[i].value = '';
+				}
+				else
+				{
+						document.getElementById('label_' + nameElement).style.color = "red";
+						alert(jabberitGetLang('Define Organization!'));
+						return false;
+				}
+			}
+		}
+		
+		_conn.go("$this.db_im.setOrganization",
+				function(data)
+				{
+					if ( data )
+					{
+						var _params = {
+							'lang1': jabberitGetLang('Organization'),
+							'lang2': jabberitGetLang('Delete')
+						};
+		
+						var Table = document.getElementById('tableExternalParticipantsJabberit');
+						Table.parentNode.innerHTML = _xtools.parse( data, 'tableExternalParticipants.xsl', _params);
+					}
+				},
+				"organization=" + organization);
+	}
+	
+	function setParticipantsExternal()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = arguments[0];
+			var form = arguments[1].forms[0];
+			var value = false;
+			
+			for(var i = 0; i < element.options.length; i++)
+			{
+				if( element.options[i].selected == true && element.options[i].value == 'true')
+					value = true;
+			}
+			
+			for(var i = 0; i < form.elements.length; i++)
+			{
+				switch(form.elements[i].type)
+				{
+					case 'text':
+					case 'button':
+						form.elements[i].disabled = false;			
+						if(!value)
+							form.elements[i].disabled = true;
+
+						break;
+				}
+			}
+			
+			_conn.go("$this.db_im.setUseParticipantsExternal",
+				function(data)
+				{
+					if(!data)
+						alert('Error !');
+				},
+				"value=" + value);
+		}
+	}
+
+	function getInputs(pDocument)
+	{
+		var form = pDocument.forms[0];
+		var values = "";
+		var field_blank = false;
+
+		for( var i = 0 ; i < form.elements.length; i++ )	
+		{
+		
+			switch(form.elements[i].type)
+			{
+				case "text" :
+							if ( form.elements[i].value != "" )
+							{
+								values += form.elements[i].id.toUpperCase() + ";" + escape(form.elements[i].value) + "\n";
+								document.getElementById(form.elements[i].id + "__label").style.color = "black";
+							}						
+							else
+								if( form.elements[i].id.toUpperCase() != "JETTI_GROUP_CHAT_SERVER_JABBERIT")
+								{
+									document.getElementById(form.elements[i].id + "__label").style.color = "red";
+									field_blank = true;
+								}
+							break;
+
+				case "password"	:
+							if ( form.elements[i].value == "" )
+							{
+								document.getElementById(form.elements[i].id + "__label").style.color = "red";
+								field_blank = true;
+							}
+							else
+							{
+								values += form.elements[i].id.toUpperCase() + ";" + escape(form.elements[i].value) + "\n";
+								document.getElementById(form.elements[i].id + "__label").style.color = "black";
+							}
+							break;
+			}
+		}
+
+		if(!field_blank)
+		{
+			values = values.substring(0,(values.length - 1 ));
+			_conn.go("$this.FileDefine.getParams","val=" + values);
+			return true;
+		}
+		else
+		{
+			alert('Preencha os campos em vermelho !');
+			return false;
+		}
+	}
+
+	function ltrim(value)
+	{
+		var w_space = String.fromCharCode(32);
+		var strTemp = "";
+		var iTemp = 0;
+		
+		if(v_length < 1)
+			return "";
+	
+		var v_length = value ? value.length : 0;
+		
+		while(iTemp < v_length)
+		{
+			if(value && value.charAt(iTemp) != w_space)
+			{
+				strTemp = value.substring(iTemp,v_length);
+				break;
+			}
+			iTemp++;
+		}	
+		return strTemp;
+	}
+
+	function sendf()
+	{
+		var doc = ( arguments.length == 1) ? arguments[0] : false;
+		var form = doc.forms[0];
+		var flag = false;
+		var nameForm = '';
+		
+		for( var i = 0; i < form.elements.length; i++ )
+		{
+			if( form.elements[i].type == 'hidden' )
+			{
+				flag = true;
+				if( form.elements[i].name == 'HiddenJabberitExternals')
+					nameForm = form.elements[i].name;
+			}
+		
+		}
+	
+		if( flag )
+		{
+			if(flag && nameForm == 'HiddenJabberitExternals')
+				addParticipantsExternals(doc);
+			else
+				addLdapAttributes(doc);
+		}	
+		else
+		{
+			if( doc )
+				return getInputs(doc);
+		}
+	}
+
+	function setOrganizationsForGroups()
+	{
+		var elementSel = document.getElementById('organizations_ldap_jabberit');
+		var Organization = "";
+		
+		for(var i = 0; i < elementSel.options.length; i++)
+		{
+			if( elementSel.options[i].selected == true && elementSel.options[i].value != "-1" )
+				Organization = elementSel.options[i].value;
+		}
+		
+		if( Organization )
+		{
+		
+			var group = document.getElementById('nameGroup').value;
+			var gidNumber = document.getElementById('gidNumber').value;
+	
+			
+			_conn.go("$this.db_im.setOuGroupsLocked",
+					 function(data)
+					 {
+	 					if ( data )
+						{
+							var _params = {
+								'lang1': jabberitGetLang('Organization'),
+								'lang2': jabberitGetLang('Delete')
+							};
+							
+							var Table = document.getElementById('tableOrganizationsEnabledGroupsJabberit');
+							Table.parentNode.innerHTML = _xtools.parse( data, 'tableOrganizationsEnabledGroupsJabberit.xsl', _params);
+						}
+					 }, 	
+					 "group="+group+"&gidnumber="+gidNumber+"&ou="+Organization);
+		}
+	}
+
+	function removeOrgGroupsLocked()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = document.getElementById(arguments[0]);
+			var org = arguments[0];
+			var group = document.getElementById('nameGroup').value;
+			var gidNumber = document.getElementById('gidNumber').value;
+			
+			
+			_conn.go("$this.db_im.removeOuGroupsLocked",
+					function(data)
+					{
+						if( data )
+							element.parentNode.removeChild(element);
+					},
+					"group="+group+"&gidnumber="+gidNumber+"&ou="+org);
+		}
+	}
+
+
+	function removeOrgLdapAttributes()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = document.getElementById(arguments[0]);
+			var org = arguments[0];
+			
+			_conn.go("$this.db_im.removeAttributesLdap",
+					function(data)
+					{
+						if( data )
+							element.parentNode.removeChild(element);
+					},
+					"org=" + org);
+		}
+	}
+	
+	function removeParticipantsExternal()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = document.getElementById(arguments[0]);
+			var participantsExternal = arguments[0];
+			
+			_conn.go("$this.db_im.removeParticipantsExternal",
+					function(data)
+					{
+						if( data )
+							element.parentNode.removeChild(element);
+					},
+					"participants=" + participantsExternal);
+		}
+	}
+
+	function constructScript(){}
+
+	constructScript.prototype.setPartExternal = setParticipantsExternal;
+	constructScript.prototype.removePartExternal = removeParticipantsExternal;
+	constructScript.prototype.removeOrg = removeOrgLdapAttributes;
+	constructScript.prototype.removeOrgGroupsLocked = removeOrgGroupsLocked;
+	constructScript.prototype.setOrgFgroups = setOrganizationsForGroups;
+	constructScript.prototype.setPartExternal = setParticipantsExternal;	
+	constructScript.prototype.sendf = sendf;
+	
+	window.constructScript = new constructScript;
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/content.html
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/content.html	(revision 596)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/templates/default/content.html	(revision 596)
@@ -0,0 +1,136 @@
+<html>
+<head>
+<title>Ajuda</title>
+<link rel='stylesheet' type='text/css' href='../../../help/templates/celepar/css/index.css'>
+</head>
+<body bgcolor="WHITE">
+<a name='indice'/>
+<table width='100%'>
+    <p class='item'>JMessenger - Como Utilizar</p>
+    <ol>
+      <a href="#intro"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Introdução</li></font></a>
+      <a href="#supported"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Browsers Suportados</li></font></a>
+      <a href="#prefe"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Opções - Troca de Status</li></font></a>
+      <a href="#conf_status"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Mensagens de Status</li></font></a>
+	  <a href="#contact_list"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Lista de Contatos</li></font></a>
+      <a href="#status"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Indicador de Status</li></font></a>
+      <a href="#useradd"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Adicionando um novo contato</li></font></a>
+      <a href="#menu_right"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Preferências Avançadas</li></font></a>
+	  <a href="#troca_mens"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Troca de Mensagens</li></font></a>
+	  <a href="#certi_java"><font size="2" style="text-decoration:underline" color="DARKBLUE"><li>Assinatura de Applet - Java</li></font></a>		  
+    </ol>
+
+    <a name="intro"><p class='item'>1. Introdução</p></a>
+    <div class='texto'>
+    O JMessenger é 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 JMessenger está associado
+    a um serviço de mensagens instantâneas Jabber e este serviço é responsável pelo armazenamento dos seus contatos, preferências e mensagens.
+    <br><br>
+	<img src="images/tela_inicial.png" style="width:228px; height:442px;" alt="Im Screenshot" title="Im Screenshot" align="bottom" style="padding:4px;">
+	<br clear="all">
+	( Figura 1 )
+	</div>
+    <br clear="all">
+    <p class='item'><a name="supported">2. Navegadores Suportados</a></p>
+    <div class='texto'>
+      	<p><u>Windows XP/2000/ME/98/95</u></p>
+	    <li>Internet Explorer 6.0</li>
+	    <li>Mozilla Firefox desde a versão 2.0</li>
+	    <li>Mozilla Firefox desde a versão 3.0</li>
+	 	<p><u>Linux</u></p>
+	    <li>Mozilla Firefox desde a versão 2.0</li>
+	    <li>Mozilla Firefox desde a versão 3.0</li>
+   </div>
+	<p class='back'><a href="#indice">Voltar</a></p>
+	<p class='item'><a name="prefe">3. Opções - Troca de Status</a></p>
+    <div class='texto'>
+	Para a troca de status ( conforme figura 2 ), basta dar um clique com o mouse e em cima do botão <img src="images/botao_opcoes.png" width="116" height="21" style="margin-left:5px; margin-right:5px;"/> .
+	<br><br>
+    <img src="images/menu_opcoes.png" style="width:180px; height:213px;" alt="Menu Opções" title="Menu Opções" align="bottom"/><br>( figura 2 )
+	</div>
+    <p class='item'><a name="conf_status">4. Mensagens de Status</a></p>
+	<div class='texto'>
+	É possível configurar as mensagens para cada status escolhido (figura 3) clicando no item Personalizar.<br><br>
+	<img src="images/conf_status.png" style="width:317px; height:235px; margin-top:5px;" alt="Mensagens de Status" title="Mensagens de Status" align="bottom"/>
+	<br>
+	( figura 3 )
+	</div>
+	<p class='back'><a href="#indice">Voltar</a></p>
+    <p class='item'><a name="contact_list">5. Lista de Contatos</a></p>
+	<div class='texto'> 
+	Na lista de contato (figura 4), você visualizará seus contatos.<br><br>
+    <img src="images/lista_contatos.png" width="214px" height="185px" alt="Lista de Contatos" align="bottom" style="border:1px solid black;margin:5px;"/>
+    <br>
+    ( figura 4 )
+	</div>
+    <p class='item'><a name="status">6. Status dos Usuários</a></p>    
+    <div class='texto' style="border:1px solid black;width:30%"><br>
+    <img src="images/available.png" style="margin:1px;" align="top"> - Disponível<br/>
+    <img src="images/away.png" style="margin:1px;" align="top"> - Ausente<br/>
+    <img src="images/chat.png" style="margin:1px;" align="top"> - Bate-papo<br/>
+    <img src="images/dnd.png" style="margin:1px;" align="top"> - Não Perturbe<br/>
+    <img src="images/invisible.png" style="margin:1px;" align="top"> - Invisível<br/>    
+    <img src="images/unavailable.png" style="margin:1px;" align="top"> - Offline / Desconectado<br/>    
+    <img src="images/xa.png" style="margin:1px;" align="top"> - Ausência Prolongada<br/>    
+	</div>
+    <p class='item'><a name="useradd">7. Adicionando um novo contato </a></p>
+	<div class='texto'>
+	Para adicionar um novo contato, clique na imagem <img src="images/group_open.gif"/>, no canto superior esquerdo (figura 5) e abrirá uma janela para adição dos contatos (figura 6) e
+	faça uma pesquisa pelo nome. O resultado retornará <u>somente</u> os usuários que <u>tem permissão</u> para usar o Mensageiro Instantâneo do Expresso. 
+	Clique sobre o link "Adicionar Contato" e aparecerá dois campos, sendo que o campo "Apelido" é preenchido no momento da escolha do novo contato e o campo grupo
+	terá que ser definido. Preenchendo estes dois campos basta clicar no "Botão Adicionar", e o contato será adicionado em sua Lista de Contatos.
+	<br/>
+    <img src="images/adicionar_contato.png" alt="Adicionar Contato" title="Adicionar Contato" align="bottom" style="margin-top:5px;"/>
+   	<br>( figura 5 )
+	<br><br>
+	<img align="bottom" src="images/janela_adicionar_contatos.png" style="margin-top:5px;" alt="Adicionar Contato" title="Adicionar Contato"/>
+	<br/>	
+	<br/>
+	<h3>Adicionando um novo contato por Email</h3>
+	Também existe a opção de adicionar um novo usuário utilizando o seu email para as <span style="color:red; font-weight:bold;">organizações</span> listadas dentro do menu informações, que pode ser acessado clicando na imagem <img src="images/view.png">.
+	Para adicionar um novo contato utilizando o seu email, marque a opção ( figura 6.1 ) e informe o email.
+	<b>Esta opção é apenas um informativo e nem todos os usuários possuem acesso a essa funcionalidade</b>. 
+	<br/>
+	<br/>
+	<img src="images/janela_adicionar_contatos_email.png" width="452" height="399" style="margin-top:5px;" alt="Adicionar Contato" title="Adicionar Contato"/>
+	<br clear="all"/>
+	( figura 6.1 )
+	<br/>
+	</div>
+	<p class='back'><a href="#indice">Voltar</a></p>
+    <p class='item'><a name="menu_right">8. Preferências Avançadas</a></p>
+	<div class='texto'>
+    Clicando com o botão direito do mouse, você terá acesso a um menu (figura 7), com as seguintes funcionalidades:
+    <blockquote><br>
+      - Autorizações: Requisitar e autorizar permissões.<br>
+      - Grupo: Trocar / Adicionar / Remover do grupo.<br>
+      - Renomear : Renomeia o contato.<br>
+      - Remover: Exclui o contato.
+     </blockquote>
+    <br>
+    <img src="images/menu_right.png" width="392" height="110" alt="Preferências Avançadas" align="bottom" style="margin-top:5px;"/>
+    <br>( figura 7 )
+	</div>
+	<p class='back'><a href="#indice">Voltar</a></p>
+	<p class='item'><a name="troca_mens">9. Troca de Mensagens</a></p>
+	<div class='texto'>
+	Clicando duas vezes com o botão esquerdo sobre o nome do contato escolhido, abrirá uma janela (figura 8), para a troca de mensagens. Nessa mesma janela existe um menu, o qual é possível
+	configurar o formato da fonte e enviar smiles.<br><br>
+    <img src="images/troca_de_mensagem.png" width="494" height="341" alt="Troca de Mensagens" title="Troca de Mensagens" align="bottom" style="margin-top:5px;"/><br>( figura 8 )
+	</div>	
+	<br/>
+	<p class='back'><a href="#indice">Voltar</a></p>
+	<p class='item'><a name="certi_java">10. Assinatura de Applet - Java</a></p>
+	<div class='texto'>
+	O modelo de segurança implementado pela plataforma Java, está sobre o conceito que um código remoto (applet) não é confiável, garantindo assim que um applet malicioso não danifique
+	o computador. Porém existem applets que são de confiança e necessitam de permissões para fornecer determinado tipo de serviço. O Expresso Messenger é desenvolvido em
+	Java e precisa dessas permissões para fornecer o serviço de mensagens instantâneas. Quando carregado pela primeira vez, o Java que está instalado no computador, mostrará uma
+	janela ( figura 9), perguntando se deseja realmente rodar este código remoto e mostra dois botões, "Run" e o "Cancel". É necessário que seja marcada a opção "Run", e caso não queira
+	que esta janela abra, marque a opção "Always trust content from this publisher".
+	<br><br>
+    <img src="images/cert_java.png" width="520" height="356" alt="Troca de Mensagens" title="Troca de Mensagens" align="bottom" style="margin-top:5px;"/><br>( figura 9 )
+	</div>	
+	<br/>	
+	<p class='back'><a href="#indice">Voltar</a></p>
+	<hr noshade>
+</body>
+</html>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/phpgw_pt-br.lang
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/phpgw_pt-br.lang	(revision 697)
@@ -0,0 +1,142 @@
+Add	jabberit_messenger	pt-br	Adicionar
+Add Contatct	jabberit_messenger	pt-br	Adicionar Contato
+Add Contacts	jabberit_messenger	pt-br	Adicionar Contatos
+add contact	jabberit_messenger	pt-br	Adicionar Contato
+add new contact	jabberit_messenger	pt-br	Adicionar Novo Contato
+add user	jabberit_messenger	pt-br	Adicionar Usuário
+allow	jabberit_messenger	pt-br	Adicionar
+Added information!	jabberit_messenger	pt-br	Informações Adicionadas!
+Applications List	jabberit_messenger	pt-br	Lista de Módulos
+Authorization	jabberit_messenger	pt-br	Autorização
+Auto Connection	jabberit_messenger	pt-br	Conectar Automaticamente
+Ativar aviso de mensagem recebida	jabberit_messenger	pt-br	Ativar aviso de mensagem recebida
+Attention	jabberit_messenger	pt-br	Atenção
+ATTENTION	jabberit_messenger	pt-br	ATENÇÃO
+Attribute	jabberit_messenger	pt-br	Atributo
+available	jabberit_messenger	pt-br	Disponível
+away	jabberit_messenger	pt-br	Volto Logo
+Away	jabberit_messenger	pt-br	Ausente
+Birthday	jabberit_messenger	pt-br	Aniversário
+busy	jabberit_messenger	pt-br	Ocupado
+change your Status	jabberit_messenger	pt-br	Mude seu estado
+Cancel	jabberit_messenger	pt-br	Cancelar
+Change Status	jabberit_messenger	pt-br	Status
+Choice attribute	common	pt-br	Escolha o Atributo
+Choice Contact	jabberit_messenger	pt-br	Escolha Contato
+Close	jabberit_messenger	pt-br	Fechar
+Close this menu	jabberit_messenger	pt-br	Fechar Menu
+Color	jabberit_messenger	pt-br	Cor
+Config External Participants	common	pt-br	Configurar Participantes Externos
+Configuration of authentication attribute by Organization (OU)	common	pt-br	Configuração do atributo de autenticação por Organização (OU)
+Contact	jabberit_messenger	pt-br	Contato
+Contact Add	jabberit_messenger	pt-br	Contato Adicionado
+Contact was not added!	jabberit_messenger	pt-br	Contato não foi adicionado!
+Connection	jabberit_messenger	pt-br	Conexão
+Custom message...	jabberit_messenger	pt-br	Mensagem ...
+Delete	jabberit_messenger	pt-br	Excluir
+Define Organization!	common	pt-br	Defina uma Organização!
+Description	jabberit_messenger	pt-br	Descrição
+dnd	jabberit_messenger	pt-br	Não Perturbe
+deny	jabberit_messenger	pt-br	Negar
+Deny module's use by group	common	pt-br	Restringir o Uso do Módulo por Grupo
+Error in the message!	jabberit_messenger	pt-br	Erro na mensagem!
+Error saving your preferences!	jabberit_messenger	pt-br	Erro salvando suas preferências! 
+Enable Auto Login IM	jabberit_messenger	pt-br	Conectar Automaticamente IM 
+Enable the Expresso Messenger inside of the modules	common	pt-br	Habilitar o Expresso Messenger dentro dos módulos
+Enable the Expresso Messenger module	jabberit_messenger	pt-br	Habilitar o módulo Expresso Messenger 
+Enter a value greater than or equal to 1!	jabberit_messenger	pt-br	Informe um valor igual ou maior que 1!
+E-mail	jabberit_messenger	pt-br	E-mail
+External Participants	common	pt-br	Participantes Externos
+External Participants	jabberit_messenger	pt-br	Participantes Externos
+Font	jabberit_messenger	pt-br	Fonte
+Full Name	jabberit_messenger	pt-br	Nome Completo
+Free For Chat	jabberit_messenger	pt-br	Livre Bate-Papo
+Group	jabberit_messenger	pt-br	Grupo
+Help	jabberit_messenger	pt-br	Ajuda
+Inform a valid e-mail!	jabberit_messenger	pt-br	Informe um email válido!
+Information Contacts	jabberit_messenger	pt-br	Informações do Contato
+Information	jabberit_messenger	pt-br	Informações Adicionais
+Information User	jabberit_messenger	pt-br	Informações Pessoais
+It requisition permission	jabberit_messenger	pt-br	Requisitar Permissão
+Invisible	jabberit_messenger	pt-br	Invisível
+Jid Contact	jabberit_messenger	pt-br	Email Expresso
+jabberit_messenger	common	pt-br	Expresso JMessenger
+List of Contacts	jabberit_messenger	pt-br	Lista de Contatos
+Loading...	jabberit_messenger	pt-br	Carregando...
+member of organization	jabberit_messenger	pt-br	Usuários da Organização
+Maximize/Restore	jabberit_messenger	pt-br	Maximizar/Restaurar Janela
+Minimize	jabberit_messenger	pt-br	Minimizar Janela
+Minutes	jabberit_messenger	pt-br	Minutos
+My Settings	jabberit_messenger	pt-br	Minhas Configurações
+Modules Enabled	jabberit_messenger	pt-br	Módulos Habilitados
+Modules List	jabberit_messenger	pt-br	Lista de Módulos
+More than 50 results. Please, try to refine your search.	jabberit_messenger	pt-br	Mais que 50 resultados foram encontrados. Tente refinar sua pesquisa.
+Name	jabberit_messenger	pt-br	Nome
+Name of Contacts	jabberit_messenger	pt-br	Nome do Contato
+Name Organization	jabberit_messenger	pt-br	Nome Organização
+New Message!	jabberit_messenger	pt-br	Nova Mensagem!
+Nick	jabberit_messenger	pt-br	Apelido
+Nickname	jabberit_messenger	pt-br	Apelido
+No	jabberit_messenger	pt-br	Não
+Not Auth	jabberit_messenger	pt-br	Não Autorizado
+Normal	jabberit_messenger	pt-br	Normal
+None result was found.	jabberit_messenger	pt-br	Nenhum resultado foi encontrado.
+Others Expressos	jabberit_messenger	pt-br	Outros Expressos
+Organization Unit	jabberit_messenger	pt-br	Selecione uma Organização
+Organization	jabberit_messenger	pt-br	Organização
+Organizations	common	pt-br	Organizações
+online	jabberit_messenger	pt-br	Online
+offline	jabberit_messenger	pt-br	Offline
+Open IM	jabberit_messenger	pt-br	Abrir IM
+Open as Pop-Up Window	jabberit_messenger	pt-br	Abrir janela como Pop-up
+Options	jabberit_messenger	pt-br	Opções
+Photo	jabberit_messenger	pt-br	Foto
+Problems in its register \n	jabberit_messenger	pt-br	Problemas em seu registro
+Preferences	jabberit_messenger	pt-br	Preferências
+Preferences saved with success!	jabberit_messenger	pt-br	Preferências salvas com sucesso!
+Quick Contacts	jabberit_messenger	pt-br	Contatos Rápidos
+Re-connect Expresso Messenger ?	jabberit_messenger	pt-br	Reconectar Expresso Messenger ?
+Remove	jabberit_messenger	pt-br	Remover
+Remove Contact	jabberit_messenger	pt-br	Remover Contato
+Resize	jabberit_messenger	pt-br	Redimensionar
+Role	jabberit_messenger	pt-br	Função
+save	jabberit_messenger	pt-br	Salvar
+says	jabberit_messenger	pt-br	diz
+Sector	jabberit_messenger	pt-br	Setor
+Select Organization	common	pt-br	Selecione Organização
+Select the modules where the Expresso Messenger will be loaded.	jabberit_messenger	pt-br	Selecione os módulos onde o Expresso Messenger será carregado.
+Select the LDAP attribute for Jabber authentication	jabberit_messenger	pt-br	Informe o atributo LDAP para autenticação do Servidor Jabber
+Search	jabberit_messenger	pt-br	Pesquisar
+Search, add, or invite	jabberit_messenger	pt-br	Procure, adicione ou convide
+See Info	jabberit_messenger	pt-br	Ver Info
+Send	jabberit_messenger	pt-br	Enviar
+Send File	jabberit_messenger	pt-br	Enviar Arquivo
+Set status to away after	jabberit_messenger	pt-br	Definir status de ausente depois de
+Show friends Offline	jabberit_messenger	pt-br	Exibir amigos Offline
+Size	jabberit_messenger	pt-br	Tamanho
+speak	jabberit_messenger	pt-br	fala
+Successfully effected register!	jabberit_messenger	pt-br	Registro efetuado com sucesso!
+Status	jabberit_messenger	pt-br	Status
+Status of the Transference	jabberit_messenger	pt-br	Status da Transferência
+Style	jabberit_messenger	pt-br	Estilo
+Telephone	jabberit_messenger	pt-br	Telefone
+This user is part of a small group!	jabberit_messenger	pt-br	Este usuário faz parte de um grupo restrito!
+Treme Tela	jabberit_messenger	pt-br	Treme Tela
+to see preferences	jabberit_messenger	pt-br	Ver Preferências
+To define user information	jabberit_messenger	pt-br	Definir informações do usuário
+Update	jabberit_messenger	pt-br	Atualizar
+Users OffLine	jabberit_messenger	pt-br	Usuários OffLine
+Username	jabberit_messenger	pt-br	Username
+unavailable	jabberit_messenger	pt-br	Desconectado
+Vcard	jabberit_messenger	pt-br	Vcard
+Xa	jabberit_messenger	pt-br	Ausente Estendido
+Yes	jabberit_messenger	pt-br	Sim
+You desire to register in service IM?	jabberit_messenger	pt-br	Você deseja registrar no serviço IM?
+Your Preferences	jabberit_messenger	pt-br	Suas Preferências
+Your search argument must be longer than 4 characters.	jabbertit_messenger	pt-br	Seus argumentos para a pesquisa precisam ter mais que 4 dígitos.
+your status	jabberit_messenger	pt-br	Seu status
+Wait a moment !!	pt-br	jabberit_messenger	Aguarde um momento !!
+waiting	jabberit_messenger	pt-br	Aguardando
+without_group	jabberit_messenger	pt-br	Sem Grupo
+Window	jabberit_messenger	pt-br	Janela
+Workgroup	jabberit_messenger	pt-br	Setor
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/setup.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/setup.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/setup/setup.inc.php	(revision 697)
@@ -0,0 +1,31 @@
+<?php
+	/******************************************************\
+	 * Im - Instant Messenger										*
+	 * Alexandre Correia												*
+	 * Rodrigo Souza													*
+	\******************************************************/
+	
+	$setup_info['jabberit_messenger']['name']      	= 'jabberit_messenger';
+	$setup_info['jabberit_messenger']['title']     	= 'Jeti Applet';
+	$setup_info['jabberit_messenger']['version']   	= '0.7.11';
+	$setup_info['jabberit_messenger']['app_order'] 	= 9;
+	$setup_info['jabberit_messenger']['enable']    	= 1;
+	
+	/* Conf Table */
+	
+	$setup_info['jabberit_messenger']['author'] 		  = 'http://jeti-im.org/';
+	$setup_info['jabberit_messenger']['maintainer']	 	  = 'Alexandre Correia <br/> Rodrigo Souza';
+	$setup_info['jabberit_messenger']['maintainer_email'] = 'Os mesmos';
+
+	$setup_info['jabberit_messenger']['license']  	 = 'GPL';
+	$setup_info['jabberit_messenger']['description'] = 'Módulo de Mensagens Instantâneas com o Serviço Jabber';
+
+	/* The hooks this app includes, needed for hooks registration */
+	$setup_info['jabberit_messenger']['hooks'][] = 'admin';
+		
+	/* Dependencies for this app to work */
+	$setup_info['jabberit_messenger']['depends'][] = array(
+		'appname' => 'phpgwapi',
+		'versions' => Array('0.9.14','0.9.15','1.0.0')
+	);
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/license.txt
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/license.txt	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/license.txt	(revision 382)
@@ -0,0 +1,278 @@
+		    GNU GENERAL PUBLIC LICENSE
+		       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/client.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/client.php	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/client.php	(revision 382)
@@ -0,0 +1,18 @@
+<?php
+   /*****************************************************
+	* Applet - JabberIt
+ 	* Colaboradores : Alexandre Correia / Rodrigo Souza
+	*
+	***************************************************/
+
+
+	$GLOBALS['phpgw_info']['flags'] = array(
+						'currentapp' => 'jabberit_messenger',
+						'nonavbar'   => true,
+						'noheader'   => true,
+						);
+
+	include('../header.inc.php');
+
+	require_once 'inc/login.php';
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/default_preferences.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/default_preferences.xml	(revision 551)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/default_preferences.xml	(revision 551)
@@ -0,0 +1,1 @@
+<preference key="jeti.toFrontOnNewMessage" value="false"/>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/options.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/options.xsl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/options.xsl	(revision 697)
@@ -0,0 +1,18 @@
+<?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:param name="style" />
+
+	<xsl:template match="/">
+
+		<dl style="margin:0;">
+			<xsl:apply-templates select="." mode="option" />
+		</dl>
+	</xsl:template>
+
+	<xsl:template match="option" mode="option">
+		<dt style="{style}" onmouseover="elementOnMouseOver(this);" onmouseout="elementOnMouseOut(this);"><xsl:value-of select="item"/></dt>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableExternalParticipants.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableExternalParticipants.xsl	(revision 561)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableExternalParticipants.xsl	(revision 561)
@@ -0,0 +1,23 @@
+<?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:param name="lang1" />
+	<xsl:param name="lang2" />
+	
+	<xsl:template match="/">
+		<table id="tableExternalParticipantsJabberit" cellspacing="2" style="width:100%">
+			<tr>
+				<td align="left" class="row_on"><xsl:value-of select="$lang1" /></td>
+				<td align="left" class="row_on" style="width:30% !important"><xsl:value-of select="$lang2" /></td>
+			</tr>
+			<xsl:for-each select="return/ou	">
+				<tr id="{.}" style="width:40%" class="row_off">
+					<td><xsl:value-of select="." /></td>
+					<td><a href="javascript:constructScript.removePartExternal('{.}');"><xsl:value-of select="$lang2" /></a></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizationsEnabledGroupsJabberit.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizationsEnabledGroupsJabberit.xsl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizationsEnabledGroupsJabberit.xsl	(revision 697)
@@ -0,0 +1,23 @@
+<?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:param name="lang1" />
+	<xsl:param name="lang2" />
+	
+	<xsl:template match="/">
+		<table id="tableOrganizationsEnabledGroupsJabberit" cellspacing="2" style="width:100%">
+			<tr class="th">
+				<td align="left" class="row_on"><xsl:value-of select="$lang1" /></td>
+				<td align="left" class="row_on" style="width:30% !important"><xsl:value-of select="$lang2" /></td>
+			</tr>
+			<xsl:for-each select="return/ou	">
+				<tr id="{.}" style="width:40%" class="row_off">
+					<td class="row_on"><xsl:value-of select="." /></td>
+					<td class="row_on" style="width:30% !important"><a href="javascript:constructScript.removeOrgGroupsLocked('{.}');"><xsl:value-of select="$lang2"/></a></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizations.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizations.xsl	(revision 562)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/tableOrganizations.xsl	(revision 562)
@@ -0,0 +1,27 @@
+<?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:param name="lang1" />
+	<xsl:param name="lang2" />
+	<xsl:param name="lang3" />
+	
+	<xsl:template match="/">
+		<table id="tableHiddenJabberit" cellspacing="2" style="width:100%">
+			<tr style="width:60%">
+				<td align="left" class="row_on"><xsl:value-of select="$lang1" /></td>
+				<td align="left" class="row_on"><xsl:value-of select="$lang2" /></td>
+				<td align="left" class="row_on"><xsl:value-of select="$lang3" /></td>					
+			</tr>
+			<xsl:for-each select="return/ou	">
+				<tr id="{.}" style="width:40%" class="row_off">
+					<td><xsl:value-of select="." /></td>
+					<td><xsl:value-of select="@attr" /></td>
+					<td><a href="javascript:constructScript.removeOrg('{.}');"><xsl:value-of select="$lang3" /></a></td>
+				</tr>
+			</xsl:for-each>
+		</table>
+		
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/contacts_jabberit.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/contacts_jabberit.xsl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/contacts_jabberit.xsl	(revision 697)
@@ -0,0 +1,11 @@
+<?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:param name="path" />
+
+	<xsl:template match="contacts_jabberit">
+		<iframe id="iframe_applet_jabberit" src="{$path}client.php" frameborder="0" width="100%" height="400px"></iframe>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_org.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_org.xsl	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_org.xsl	(revision 382)
@@ -0,0 +1,12 @@
+<?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="organizations">
+		<xsl:for-each select="ou">
+			<xsl:sort select="." case-order="upper-first" />
+			<span><xsl:value-of select="." /></span><br/>
+		</xsl:for-each>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/preferences_jabberit.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/preferences_jabberit.xsl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/preferences_jabberit.xsl	(revision 697)
@@ -0,0 +1,55 @@
+<?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:param name="path" />
+	<xsl:param name="lang1" />
+	<xsl:param name="lang2" />
+	<xsl:param name="lang3" />
+	<xsl:param name="lang4" />	
+	<xsl:param name="lang5" />	
+	<xsl:param name="lang6" />
+	<xsl:param name="lang7" />
+	<xsl:param name="lang8" />
+	<xsl:param name="lang9" />
+	<xsl:param name="lang10" />
+	<xsl:param name="lang11" />
+	<xsl:param name="lang12" />
+	<xsl:param name="langYes" />
+	<xsl:param name="langNo" />		
+	
+	<xsl:template match="preferences_jabberit">
+		<fieldset style="padding:5px;border:1px solid #cecece;">
+			<legend><xsl:value-of select="$lang1"/></legend>
+			<fieldset style="height:60px;margin-top:6px;padding:5px; border:1px solid #cecece;">
+				<legend><xsl:value-of select="$lang2"/></legend>	
+				<br/>
+				<label><xsl:value-of select="$lang3"/> .: </label>
+				<select id="openWindowJabberit">
+					<option value="true"><xsl:value-of select="$langYes"/></option>
+					<option value="false"><xsl:value-of select="$langNo"/></option>					
+				</select>
+			</fieldset>
+			<fieldset style="height:60px;margin-bottom:6px;padding:5px; border:1px solid #cecece;">
+				<legend><xsl:value-of select="$lang8"/></legend>
+				<br/>
+				<label><xsl:value-of select="$lang9"/> .: </label>
+				<select id="openWindowJabberitPopUp">
+					<option value="true"><xsl:value-of select="$langYes"/></option>
+					<option value="false"><xsl:value-of select="$langNo"/></option>
+				</select>
+			</fieldset>
+			<fieldset style="height:60px;margin-top:6px;padding:5px; border:1px solid #cecece;">
+				<legend><xsl:value-of select="$lang10"/></legend>			
+				<br/>
+				<label><xsl:value-of select="$lang11"/><input id="flagAwayIM" type="text" size="2" maxlength="2" style="margin-left:4px; margin-right:4px;" onclick="this.select();" /><xsl:value-of select="$lang12"/></label>
+			</fieldset>
+		</fieldset>
+
+		<div style="margin-top:6px;padding:5px;cellpadding:5px;">
+			<input type="button" value="{$lang6}" onclick="javascript:loadscript.setPrefe();"/>
+			<input type="button" value="{$lang7}" />
+		</div>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/add_user.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/add_user.xsl	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/add_user.xsl	(revision 697)
@@ -0,0 +1,58 @@
+<?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:param name="lang1" />
+	<xsl:param name="lang2" />
+	<xsl:param name="lang3" />
+	<xsl:param name="lang4" />
+	<xsl:param name="lang5" />
+	<xsl:param name="lang6" />
+	<xsl:param name="lang7" />
+	<xsl:param name="lang8" />
+	
+	<xsl:template match="adduser">
+		
+		<div>
+			<div class="search_user">
+				<span style="width:130px;"><xsl:value-of select="$lang1" /> .: </span>
+				<input type="text" size="30" onclick="this.select();" onkeypress="javascript:loadscript.keyPress(event, this);" style="margin: 0 10 0 0px;"/>
+				<input type="image" src='../jabberit_messenger/templates/default/images/users.png' value="{$lang2}" onclick="javascript:loadscript.search(this);" />
+				<div id="external_Participants_Jabberit" style="display:none;margin:3 0 0 0px;border-bottom:1px dashed #000;width:430px;">
+					<input type="checkbox" name="checkbox_external_Participants_Jabberit" style="margin:10 5 0 0px;" onclick="javascript:loadscript.cLabel(this);"/>
+					<span style="width:130px;"><xsl:value-of select="$lang8" /> .: </span> - <span onclick="javascript:loadscript.openWinParExt(this);" style="cursor:pointer;">
+					<img src='../jabberit_messenger/templates/default/images/view.png' alt='Ver Organizações' title='Ver Organizações' />
+					</span>
+				</div> 
+			</div>
+			<br/>
+			<div class="add_organization_members">
+				<span style="margin: 5px; width:auto;"><xsl:value-of select="$lang3"/> .: </span>
+				<br style="clear:both"/>
+				<div id="im_ldap_user"></div>
+			</div>
+		</div>
+
+		<div class="add_member_info">
+			<span><xsl:value-of select="$lang4"/> :</span>
+			<input style="" id="im_name" type="text" size="50" maxlength="50" class="add_user" onclick="this.select();"/>
+			<br/><br style="line-height:4px"/>
+			<span><xsl:value-of select="$lang5"/> :</span>
+			<input id="im_group" type="text" size="50" maxlength="50" selectBoxOptions="" onclick="this.select();"/>
+			<br/>
+			<span id="__span_load_im_group" style="position:absolute;float:left;background-color:#cc4444;color:white;display:none;width:auto;margin:2 0 5 83px;">Carregando Grupos .....</span>			
+		</div>
+		
+		<div class="add_action">
+			<span><xsl:value-of select="$lang6"/></span>
+			<span><xsl:value-of select="$lang7"/></span>
+		</div>
+
+		<span id="im_status_add" style="color:#f00;font-weight:bold;"></span>
+		<span id="__span_load_im" style="background-color:#cc4444;color:white;display:none;position:absolute;right:5px;top:26px">Carregando .....</span>
+		<input id="im_jid" type="hidden" />
+		<input id="im_uid" type="hidden" />
+
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/window.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/window.xsl	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/window.xsl	(revision 382)
@@ -0,0 +1,28 @@
+<?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">
+		<b class="corner blackcorner">
+			<b class="corner1 blackcorner1"><b></b></b>
+			<b class="corner2 blackcorner2"><b></b></b>
+			<b class="corner3 blackcorner3"></b>
+			<b class="corner4 blackcorner4"></b>
+			<b class="corner5 blackcorner5"></b>
+		</b>
+		<div class="titulo">
+			<div class="icon"></div>
+			<span id="{name}__window_title" style=""></span>
+			<div id="{name}__window_title_buttons" class="buttons">
+				<div title="close" class="button_close"></div>
+				<div title="maximize" class="button_maximize"></div>
+				<div title="minimize" class="button_minimize"></div>
+			</div>
+		</div>
+		<div id="{name}__window_body" class="body">
+			<div id="{name}__window_body_content" class="content"></div>
+		</div>
+		<div id="{name}__window_bottom" class="rodape"></div>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_contacts.xsl
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_contacts.xsl	(revision 459)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/xsl/list_ldap_contacts.xsl	(revision 459)
@@ -0,0 +1,37 @@
+<?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:param name="many_results" />
+	<xsl:param name="empty" />
+
+	<xsl:template match="/">
+		<xsl:choose>
+			<xsl:when test="error">
+				<label><xsl:value-of select="$many_results" /></label>
+			</xsl:when>
+			<xsl:when test="empty">
+				<label><xsl:value-of select="$empty" /></label>
+			</xsl:when>
+			<xsl:otherwise>
+				<xsl:apply-templates select="uids/*" mode="uids" />
+			</xsl:otherwise>
+		</xsl:choose>
+	</xsl:template>
+
+	<xsl:template match="*" mode="uids">
+		<xsl:for-each select="data">
+			<xsl:sort select="cn"/>
+			<span value="{mail};{uid}" photo="{photo}">
+				<span id="{mail};{uid}" style="display:none;"><xsl:value-of select="cn" /></span>
+				<b><xsl:value-of select="name(..)"/></b>
+				<br/><xsl:value-of select="cn" />
+				<br/><xsl:value-of select="mail" />
+				<br/>
+				<br/>
+				<label style="color:blue;cursor:pointer;">Adicionar Contato</label>
+			</span>
+		</xsl:for-each>
+	</xsl:template>
+
+</xsl:stylesheet>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/languages/jeti_pt_BR.properties
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/languages/jeti_pt_BR.properties	(revision 459)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/languages/jeti_pt_BR.properties	(revision 459)
@@ -0,0 +1,612 @@
+#jeti_pt_BR.properties
+Abort=&Abortar
+alertwindow.Alpha_is_{0},_Time_is_{1}=Alpha is {0}, Time is {1}
+alertwindow.Background_color=Cor de Fundo
+alertwindow.Color=Cor
+alertwindow.Demonstration=Demonstra\u00E7\u00E3o
+alertwindow.Foreground_color=Cor da Frente
+alertwindow.sec=seg.
+alertwindow.Shows_an_alert_window_when_a_message_arrives=Mostra uma mensagem de alerta quando uma mensagem \u00E9 recebida
+alertwindow.This_is_a_Demonstration_PopupWindow=Esta \u00E9 uma demonstra\u00E7\u00E3o de pop-up
+alertwindow.Time_to_show_alert=Tempo para mostrar alerta\:
+alertwindow.Transparancy,_100%_is_opaque=Transpar\u00EAncia, 100% opaco
+Apply=&Aplicar
+autoloadgroupchat.Loads_a_groupchat_on_login=Carrega uma confer\u00EAncia
+cam.Description=&Descri\u00E7\u00E3o\:
+cam.Refresh_time_in_seconds=&Atualiza\u00E7\u00E3o em segundos\:
+cam.Send_Webcam=Mandar para a WebCAM
+cam.Show_Webcam=Mostrar para a WebCAM
+cam.Shows_an_image_from_a_website_and_refreshes_every_x_times=Mostra uma imagem de um website e atualiza a cada X segundos
+cam.Webcam_URL=&Webcam URL\:
+cam.Wrong_URL=URL Inv\u00E1lida
+Cancel=Cancelar
+Close=&Fechar
+emoticons.Change_Set=Trocar
+emoticons.Description=Descri\u00E7\u00E3o
+emoticons.Emoticons=Emoticons
+emoticons.Enabled=Habilitado
+emoticons.Name=Nome
+emoticons.No_Emoticons=Sem Emoticons
+emoticons.Scan_Emoticons=&Procurar Emoticons
+emoticons.Select_Icon=Selecionar \u00CDcones
+emoticons.Shows_graphical_emoticons=Mostrar gr\u00E1ficos emoticons
+emoticons.Type=Tipo
+emoticons.Version=Vers\u00E3o
+filetransfer.{0}_already_exist,_overwrite?={0} j\u00E1 existe, sobrescrever?
+filetransfer.{0}_could_not_be_openend_in_write_mode={0} n\u00E3o p\u00F4de ser aberto em modo de escrita.
+filetransfer.{0}_did_not_accept_the_file={0} n\u00E3o p\u00F4de aceitar o arquivo
+filetransfer.{0}_does_not_exist={0} n\u00E3o existe
+filetransfer.{0}_does_not_support_file_transfer_or_is_offline={0} n\u00E3o suporta transfer\u00EAncia de arquivos ou est\u00E1 offline.
+filetransfer.{0}_is_not_online={0} n\u00E3o esta online.
+filetransfer.{0}_is_not_readable={0} n\u00E3o esta leg\u00EDvel.
+filetransfer.Abort=Abortar
+filetransfer.automatic=autom\u00E1tico
+filetransfer.behind_firewall_or_NAT=atr\u00E1s de um firewall ou  NAT
+filetransfer.Can_not_transfer_directories=N\u00E3o pode transferir diret\u00F3rios
+filetransfer.Close=Fechar
+filetransfer.close_download_windows_when_download_ready=Fechar a janela quando terminar o download.
+filetransfer.Description=&Descri\u00E7\u00E3o
+filetransfer.Download=Download
+filetransfer.File_Error=Erro no arquivo
+filetransfer.File_Name=&Nome do arquivo
+filetransfer.File_Size=Tamhando do arquivo
+filetransfer.File_Transfer=Transfer\u00EAncia de arquivo
+filetransfer.From=De
+filetransfer.ip=ip
+filetransfer.No_compatible_transfer_protocols_found=Sem protocolos compat\u00EDveis para transfer\u00EAncia
+filetransfer.No_recipient_specified=Destinat\u00E1rio n\u00E3o especificado.
+filetransfer.Opening_connection=Estabelecendo conex\u00E3o
+filetransfer.port=porta
+filetransfer.Problem_during_file_transfer,_transfer_aborted=Problemas durante a transfer\u00EAncia, transfer\u00EAncia abortada.
+filetransfer.Recipient?=Destinat\u00E1rio?
+filetransfer.Send=&Enviar
+filetransfer.Send_file_to=Mandar arquivo para
+filetransfer.To=Para
+filetransfer.Transfer_complete=Transfer\u00EAncia completa
+filetransfer.Transfer_File=Transferir arquivo
+filetransfer.Transferring=Transferindo
+filetransfer.URL=&URL
+fontsize.change_the_fontsize_of_the_chatwindows=Trocar tamhando de fonte na tela de chat
+fontsize.Font_Size=Tamanho da Fonte
+fontsize.The_default_font_size_in_chat_windows=Tamanho padr\u00E3o da fonte em janelas de chat
+groupchat.{0}_changed_state_to_{1}={0} trocou seu satus para {1}
+groupchat.{0}_changed_status_message_to_{1}={0} trocou seu status de mensagem para {1}
+groupchat.{0}_has_entered_the_room={0} acaba de entrar na sala
+groupchat.{0}_has_left={0} partiu da sala
+groupchat.{0}_invites_you_to_{1}={0} convida voc\u00EA para {1}
+groupchat.{0}_is_an_invalid_user_name={0} \u00E9 um nome de usu\u00E1rio inv\u00E1lido
+groupchat.Accept=Acceitar
+groupchat.Add_JID=Adicionar JID
+groupchat.Add_Nickname_to_Output=adicionar @Nickname
+groupchat.Affiliation=Empresa
+groupchat.affiliation.admin=Admin
+groupchat.affiliation.member=Membros
+groupchat.affiliation.none=Nenhum
+groupchat.affiliation.outcast=Outcast
+groupchat.affiliation.owner=Dono
+groupchat.Auto_open=Abrir Jeti automaticamente ao iniciar
+groupchat.Automatically_start_groupchat_on_startup?=Automaticamente inciar confer\u00EAncia quando iniciar o Jeti?
+groupchat.Ban_User=Banir Usu\u00E1rio
+groupchat.Banned_from_room=Banido da Sala
+groupchat.Bookmark_room=&Favorito na Sala
+groupchat.bookmarks=Favoritos
+groupchat.Change_nickname=&Trocar apelido
+groupchat.Change_nickname_to=Trocar apelido para\:
+groupchat.Change_room_subject_to=Trocar informa\u00E7\u00E3o da sala para
+groupchat.Change_Subject=&Trocar informa\u00E7\u00E3o para \:
+groupchat.Change_subject_to=Trocar informa\u00E7\u00E3o para 
+groupchat.Chat_Server=Servidor de Bate-papo
+groupchat.Choose_groupchat_room=Escolher sala de bate-papo
+groupchat.Configure_Room=&Configurar sala
+groupchat.Decline=Recusar
+groupchat.delete_bookmark=Deletar favorito
+groupchat.Destroy_{0}=Destr\u00F3i {0}
+groupchat.Destroy_Room=Destruir sala
+groupchat.Exit_Room=Sair da sala
+groupchat.Forbidden=Proibido
+groupchat.Grant_Admin=Permitir Admin
+groupchat.Grant_Moderator=Permitir Moderador
+groupchat.Grant_Owner=Permitir propriet\u00E1rio
+groupchat.Grant_Voice=Permitir voz
+groupchat.groupchat=Confer\u00EAncia (MUC)
+groupchat.Groupchat_Invitation=Convite para confer\u00EAncia
+groupchat.Illegal_group_name=Nome ilegal para grupo
+groupchat.invalid_user_name=nome de usu\u00E1rio inv\u00E1lido
+groupchat.Invite_for_groupchat=Convite para confer\u00EAncia
+groupchat.Invite_user=Convidar usu\u00E1rio
+groupchat.JID=JID
+groupchat.Join/Create=&Participar/Criar
+groupchat.Kick_User=Chutar usu\u00E1rio
+groupchat.Manage_Bookmarks=Organizar Favoritos
+groupchat.Manage_Members=Organizar Membros
+groupchat.Members=Membros
+groupchat.Members_only_room=Membros somente na sala
+groupchat.Myself=Eu mesmo
+groupchat.Nickname=&Apelido
+groupchat.Nickname_in_use,_please_choose_another=Apelido em uso, por favor, escolha outro
+groupchat.No_Actions=Sem a\u00E7\u00E3o
+groupchat.None=Nenhum
+groupchat.options.Link_Status_Buttons=Bot\u00E3o de status do Link
+groupchat.options.Show_presence_messages_in_chat_window=Mostrar mensagens de presen\u00E7a nas janelas de bate-papo
+groupchat.options.tooltip.Changing_status_in_one_window_affects_all_windows=Trocando status de uma janela afeta todas as outras
+groupchat.options.tooltip.Insert_a_message_in_the_chat_window_each_time_a_participant_changes_availability=Insere uma mensagem na janela de bate-papo a medida que cada participante se torna dispon\u00EDvel
+groupchat.Owner=&Dono
+groupchat.Password=Senha
+groupchat.Password_required_to_join_this_room=Senha \u00E9 requirida para entrar nesse sala
+groupchat.Private_chat=Mensagem Privada
+groupchat.Private_message=Mensagem Privada
+groupchat.Reason=Raz\u00E3o
+groupchat.Reason_(optional)=Raz\u00E3o (opcional)
+groupchat.Reason_{0}=Raz\u00E3o\: {0}
+groupchat.Revoke_Admin=Revogar Admin
+groupchat.Revoke_Membership=Revogar Membros
+groupchat.Revoke_Moderator=Revogar Moderador
+groupchat.Revoke_Owner=Revogar Propriet\u00E1rio
+groupchat.Revoke_Voice=Revogar Voz
+groupchat.Role=Responsabilidade
+groupchat.role.moderator=Moderador
+groupchat.role.none=Nenhum
+groupchat.role.participant=Participante
+groupchat.role.visitor=Visitante
+groupchat.Room=&Sala
+groupchat.Room_does_not_exist_yet=Sala n\u00E3o existe ainda
+groupchat.Send=Enviar
+groupchat.Server=Servidor
+groupchat.Subject=Informa\u00E7\u00E3o\:
+groupchat.Subject_{0}=Informa\u00E7\u00E3o\: {0}
+groupchat.The_name_of_the_bookmark=Nome do Favorito
+groupchat.Thrown_out_from_room=Sair da sala
+groupchat.User=Usu\u00E1rio
+groupchat.with_status_message_{0}=com status de mensagem {0}
+groupchat.You_are_banned_from_this_room=Voc\u00EA foi banido desta sala
+groupchat.You_are_not_allowed_to_create_a_new_room=Voc\u00EA n\u00E3o tem permiss\u00E3o para criar novas salas de confer\u00EAncia
+groupchat.You_are_not_in_any_rooms=Voc\u00EA n\u00E3o est\u00E1 em sala alguma
+groupchatalerter.Alerter_Status_Message=Mensagem de Alerta
+groupchatalerter.Alerts_you_when_there_is_something_interesting=Alertar quando h\u00E1 algo interessante
+groupchatalerter.Change_alerter_status_when_extended_away=Trocar mensagem de alerta quando a aus\u00EAncia for prolongada 
+groupchatalerter.Enable_Alerter_on_minimize=Habilitar alerta quando minizar
+groupchatalerter.Groupchat_room=Sala de confer\u00EAncia
+groupchatalerter.Match_on=Item achado
+groupchatalerter.Room_to_monitor_Add_/nickname_to_set_your_nickname=Monitor de Salas. Digite  /nickname para trocar seu apelido
+groupchatalerter.Rule_what_to_match,_use_keywords_separated_by_the_|_character,_regular_expressions_are_supported=A regra para valer, use palavras-chaves separadas por | , express\u00F5es regulares s\u00E3o suportadas
+groupchatalerter.Test=Testar
+groupchatalerter.Test_Match_On=Teste ok
+groupchatalerter.Test_rule_to_test_if_the_rule_works_on_test_text=Teste de texto
+groupchatalerter.Test_Text=Teste de texto
+groupchatalerter.Test_text_to_test_Test_Match_rule_on=Texto de teste
+ichatavatars.Avatar_Size=Tamanho do Avatar
+ichatavatars.Show_avatar_in_chat_window?=Mostrar avatar na janela de bate-papo?
+ichatavatars.shows_avatars=Mostrar avatars
+idle.Auto_Away_Message=Mensagem de aus\u00EAncia autom\u00E1tica
+idle.Auto_Extended_Away_Message=Mensage de aus\u00EAncia extendida autom\u00E1tica
+idle.Minutes_of_no_activity_before_auto_Away=Minutos de inatividade antes do Away
+idle.Minutes_of_no_activity_before_auto_Extended_Away=Minutos de inatividade antes de entrar em Away extendido
+idle.Sets_status_to_away_when_no_activity=Setar away quando n\u00E3o houver atividade
+keyboardflash.Flashes_the_scrollock_led_on_new_message=Piscar scrollock quando receber nova mensagem
+links.Choose_a_Browser_to_display_links_in=Escolher um browser como padr\u00E3o
+links.Make_hyperlinks_clickable=Fazer hiperlinks
+Loading=Carregando
+lookandfeel.{0}_Could_not_be_loaded={0} N\u00E3o p\u00F4de ser carregado
+lookandfeel.Changes_Look_and_Feel=Trocar apar\u00EAncia
+lookandfeel.Configure=&Configurar
+lookandfeel.File_not_Found=Arquivo n\u00E3o encontrado
+lookandfeel.Look_and_feel_error=Erro apar\u00EAncia
+lookandfeel.lookandfeel_cfg_not_found=lookandfeel.cfg n\u00E3o encontrado
+lookandfeel.lookandfeel_could_not_be_loaded=lookandfeel n\u00E3o pode ser carregado
+lookandfeel.Oyoaha_options=Oyoaha op\u00E7\u00F5es
+lookandfeel.Set_Metal_Theme=Colocar Metal Tema
+lookandfeel.Set_Oyoaha_Theme=Colocar Oyoaha Tema
+lookandfeel.Set_Theme=Colocar Tema
+lookandfeel.Show_Look_and_Feels=Mostrar apar\u00EAncias e ajustes
+lookandfeel.SkinLF_options=SkinLF op\u00E7\u00F5es
+main.about.About_JETI=Sobre Jeti
+main.about.About_the_Plugins=Sobre Plugins
+main.about.Build=Jeti Build
+main.about.Contributions_by=Contribui\u00E7\u00F5es por
+main.about.Designed_by=Desenhado
+main.about.eCS_/_OS/2_version_by=eCS / OS/2 version_by
+main.about.Tested_by=Testado por
+main.about.Translated_by_(PUT_YOUR_NAME_HERE)=Translated by Marcelo Moreira de Mello marcelonegao@gmail.com
+main.about.Version=Jeti Vers\u00E3o
+main.AddContact.Add_Contact=Adicionar contatos
+main.AddContact.Address=Endere\u00E7o
+main.AddContact.Contactname@Transport=Contato@servidor\:
+main.AddContact.Group=&Grupo
+main.AddContact.Nickname=&Apelido
+main.AddContact.Other=Outro
+main.AddContact.Screen_Name=Apelido na Tela
+main.AddContact.Select_Service=&Selecionar servi\u00E7o\:
+main.ChangePassword.Change_Password=Trocar senha
+main.ChangePassword.New_Password=Nova senha
+main.ChangePassword.Old_Password=Senha antiga
+main.ChangePassword.Password_not_equal=Senha n\u00E3o confere
+main.chat.{0}_(offline)={0} (desconectado)
+main.chat.{0}_says_{1}={0} diz\: {1}
+main.chat.changed_status_to=trocou status para\:
+main.chat.Chat_started_on=Chat iniciou em\: 
+main.chat.is_currently_offline=\ est\u00E1 desconectado
+main.chat.menu=Menu
+main.chat.menu.Close=Fechar aba
+main.chat.menu.Convert_to_tab=Converter aba em janela
+main.chat.menu.Move_to_Window=Move para janela
+main.chat.menu.To_front_on_new_message=Para frente numa nova mensagem
+main.chat.with_status_message=com status de mensagem\:
+main.chat.You_are_about_to_close_{0}_tabs_Are_you_sure_you_want_to_close_them?=Voc\u00EA vai fechar {0} abas. Tem certeza que deseja fech\u00E1-las? 
+main.comment.Architecture=Arquitetura\: 
+main.comment.Bug=&Bug
+main.comment.Comment/Bug=Comentar/Bug
+main.comment.Comment/Request=&Comment/Request
+main.comment.Include=Incluir\:
+main.comment.Java_Vendor=Java Ven&dor\: 
+main.comment.Java_Version=Java Ver&sion\: 
+main.comment.JETI_Version=Jeti &Version\: 
+main.comment.OS=&OS\:
+main.EditProfile.Advanced=&Avan\u00E7ado
+main.EditProfile.Automatic_login_on_start=Logar automaticamento no Jeti quando iniciar
+main.EditProfile.Connect_to=Conectar em
+main.EditProfile.Create_New_Account=Criar nova conta
+main.EditProfile.Edit_Profile_Info=Editar informa\u00E7\u00F5es pessoais
+main.EditProfile.Hide_Status_Window=&Esconder janela de status
+main.EditProfile.Hide_the_login_status_window=Esconder janela de login
+main.EditProfile.Jabber_Server=&Servidor Jabber
+main.EditProfile.New_Profile_Info=Novas informa\u00E7\u00F5es pessoais
+main.EditProfile.Only_fill_in_password_on_private_computers,_to_prevent_theft_of_password=Somente completar a senha em computadores privados.
+main.EditProfile.Password=Senha
+main.EditProfile.Password_(leave_blank_to_ask)=&Senha (deixe em branco para perguntar)
+main.EditProfile.Please_enter_a_username_first=Por favor, informe o primeiro nome
+main.EditProfile.Please_select_a_server_first=Por favor, informe o servidor
+main.EditProfile.Port=Porta
+main.EditProfile.Priority=Prioridade
+main.EditProfile.Profile_name=Nome do Perfil
+main.EditProfile.Proxy=Proxy
+main.EditProfile.Proxy_Host=Proxy Host
+main.EditProfile.Proxy_Port=Proxy Porta
+main.EditProfile.Really_remove_{0}?=Realmente remover {0}?
+main.EditProfile.Register=Registrar
+main.EditProfile.Remove=&Remover
+main.EditProfile.Remove_this_profile=Remover este perfil
+main.EditProfile.Request_new_account=Requisitar nova conta
+main.EditProfile.Resource=Recurso
+main.EditProfile.Save_profile=Salvar perfil
+main.EditProfile.Use_Socks_Proxy=Usar Sockets Proxy
+main.EditProfile.Use_SSL=Usar &SSL
+main.EditProfile.Use_this_profile_only_for_this_session=Usar esse perfil somente para essa sess\u00E3o
+main.EditProfile.Use_this_profile_only_to_login_this_time=Usar esse perfil somente nesse login
+main.EditProfile.Username=&Nome do Usu\u00E1rio
+main.error.{0}_contains_no_plugins={0} n\u00E3o cont\u00E9m plugins
+main.error.{0}_is_not_valid={0} n\u00E3o \u00E9 v\u00E1lido
+main.error.{0}_plugin_failed_to_load={0} plugin falhou ao carregar
+main.error.{0}_plugin_not_found={0} plugin n\u00E3o encontrado
+main.error.Error=Erro
+main.error.Error_in_chat=Erro no bate-papo\:
+main.error.Illegal_errorcode=C\u00F3digo de erro ilegal
+main.error.invalid_server=servidor inv\u00E1lido
+main.error.invalid_url_in_OOB_packet=url inv\u00E1lida no pacote OOB
+main.error.Last_Seen_Error=\u00DAltimo erro
+main.error.No_JID_found=JID n\u00E3o encontrado
+main.error.No_services=Sem servi\u00E7o
+main.error.No_type=Sem tipo
+main.error.Preferences_load_Error=Erro ao carregar as prefer\u00EAncias
+main.error.Register_Error=Erro no registro
+main.error.Register_Services=Registrar servi\u00E7os
+main.error.registration_aborted,_code_{0}=registro abortado, c\u00F3digo {0}.
+main.error.Server_doesn't_support_browse=Servidor n\u00E3o suporta navega\u00E7\u00E3o
+main.error.Server_has_no_value=Servidor n\u00E3o tem valor
+main.error.Server_must_start_with_a_letter_(see_english_translation)=Servidor precisa come\u00E7ar com uma letra ou conter [A-Z], [a-z], [0-9], '.' or '-'
+main.error.Server_or_Username_contains_a_'@'=Servidor ou Usu\u00E1rio cont\u00E9m '@'
+main.error.Service_error=Erro de servi\u00E7o
+main.error.statusicons_dir_not_found=statusicons n\u00E3o encontrado
+main.error.Subscription_error=Erro de descri\u00E7\u00E3o
+main.error.Time_Error=Erro de tempo
+main.error.type_must_be_specified=tipo precisa ser informado
+main.error.Unknown_error=erro desconhecido
+main.error.Unknown_Extension=extens\u00E3o desconhecida
+main.error.Unknown_Packet=pacote desconhecido
+main.error.User_{0}_could_not_be_found=Usu\u00E1rio {0} n\u00E3o foi encontrado
+main.error.Username_>_255_Characters=Usu\u00E1rio > 255 caracteres
+main.error.Username_contains_illegal_chars_(see_english_translation)=Usu\u00E1rio cont\u00E9m caracteres inv\u00E1lidos ' ', '\:', '@', '"', '<', '>', '/', '\\' or '&'
+main.error.Version_Error=Erro na vers\u00E3o
+main.error.Wrong_contact_name=Nome de contato inv\u00E1lido
+main.error.Wrong_Jabber_Identifier=Identificador Jabber inv\u00E1lido (JID)
+main.error.wrong_type=tipo errado
+main.error.xmpp.bad-request=m\u00E1-requisi\u00E7\u00E3o
+main.error.xmpp.forbidden=Proibido
+main.error.xmpp.remote-server-not-found=Servidor n\u00E3o encontrado
+main.error.xmpp.remote-server-timeout=Servidor remoto expirou
+main.error.xmpp.service-unavailable=servi\u00E7o indispon\u00EDvel
+main.error.xmpp.text=texto
+main.log.Clear_Log=&Texto puro
+main.log.Errors=Erros
+main.log.For_security_reasons_it_is_not_possible_to_change_passwords,_please_use_the_jeti_functions_for_that=Por raz\u00F5es de seguran\u00E7a, n\u00E3o \u00E9 poss\u00EDvel trocar sua senha, use as fun\u00E7\u00F5es do Jeti para isso.
+main.log.For_security_reasons_it_is_not_possible_to_remove_accounts,_please_use_the_jeti_functions_for_that=Por raz\u00F5es de seguran\u00E7a, n\u00E3o \u00E9 poss\u00EDvel remover contas, use as fun\u00E7\u00F5es do Jeti para isso.
+main.log.JETI_Log=Jeti Log
+main.log.Please_wait_loading_log=Por favor aguarde, carregando log
+main.log.Refresh=&Atualizar
+main.log.Send_XML=Enviar XML
+main.log.Send_XML_to_the_Jabber_server,_use_this_at_your_own_risk=Enviar XML para o servidor Jabber, use isso por sua conta pr\u00F3pria.
+main.log.XML=XML
+main.log.XML_Errors=XML Erros
+main.login.Edit=&Editar
+main.login.Login=&Login
+main.login.New=&Novo
+main.login.Password=Senha
+main.login.Profile=&Perfil
+main.login.Wrong_Password_Try_again=Senha inv\u00E1lida, tente novamente.
+main.loginstatus.An_error_has_occured_while_logging_in=Um erro ocorreu durante a tentativa de login
+main.loginstatus.An_error_has_occured,_trying_again_{0}_X=Um erro ocorreu, reconectando em  {0} X
+main.loginstatus.Authenticated=Autenticado
+main.loginstatus.Authenticating=Autenticando
+main.loginstatus.Connected=Conectado
+main.loginstatus.Could_not_login_with_SHA=N\u00E3o poder carregar login com SHA
+main.loginstatus.Could_not_open_input_because=N\u00E3o pode abrir entrada porque 
+main.loginstatus.Could_not_open_output_because=N\u00E3o pode abrir sa\u00EDda porque 
+main.loginstatus.Getting_available_login_methods=Capturando m\u00E9todos de login dispon\u00EDveis
+main.loginstatus.Loading_roster=Carregando lista de contato
+main.loginstatus.Logged_in=Logado em
+main.loginstatus.Logging_in=Logando em 
+main.loginstatus.Logging_in_on_your_jabber_account=Logando sua conta
+main.loginstatus.Lost_Input=Entrada perdida
+main.loginstatus.Not_logged_in_because=N\u00E3o conectado porque
+main.loginstatus.Opening_Input=Abrindo entrada
+main.loginstatus.Opening_Output=Abrindo sa\u00EDda
+main.loginstatus.Opening_socket=Abrind sockets
+main.loginstatus.Sending_password_as_plain_text_over_an_unencrypted_connection,_continue?=Permitir autenticação em texto puro sobre fluxos não-encriptados?
+main.loginstatus.Server_{0}_could_not_be_found=Servidor {0} n\u00E3o pode ser encontrado.
+main.loginstatus.XML_stream_error,_lost_input=XML erro de stream, Entrada perdida
+main.main.jetimenu.About=Sobre Jeti
+main.main.jetimenu.About_this_Account=&Sobre essa conta (JID)
+main.main.jetimenu.Account=&Conta
+main.main.jetimenu.Add_Contact=Adicionar Contato
+main.main.jetimenu.Are_you_sure_You_want_to_delete_your_account?=Voc\u00EA tem certeza que quer deletar essa conta?
+main.main.jetimenu.Change_Password=Trocar senha
+main.main.jetimenu.Chat=&Bate-papo
+main.main.jetimenu.Comment/Bug=Comentar/&Bug
+main.main.jetimenu.Delete_Account=Deletar Conta
+main.main.jetimenu.Exit=Sair
+main.main.jetimenu.Login=&Logar / Editar / Nova
+main.main.jetimenu.Manage_Services=Gerenciar Servi\u00E7os
+main.main.jetimenu.Message=&Mensagem
+main.main.jetimenu.Options=&Op\u00E7\u00F5es
+main.main.jetimenu.Please_enter_your_password_to_delete_your_account=Por favor, informe sua senha para deletar essa conta.
+main.main.jetimenu.Show_Log=Mostrar Jeti &Log
+main.main.List_Contacts=Lista de Contatos
+main.main.Offline=Desconectado
+main.main.Online=Conectado
+main.main.presencebutton.Available=Conectado
+main.main.presencebutton.Away=&Ausente
+main.main.presencebutton.DND=&N\u00E3o pertube
+main.main.presencebutton.FreeforChat=&Livre para bate-papo
+main.main.presencebutton.Invisible=&Invis\u00EDvel
+main.main.presencebutton.Offline=&Desconectado
+main.main.presencebutton.XA=&Volto Logo
+main.main.roster.Friends=Contatos
+main.main.roster.Servers=Servidores
+main.main.roster.Status=Status\:
+main.main.roster.Subscription=Descri\u00E7\u00E3o\:
+main.main.roster.Unfiled=Unfiled
+main.main.roster.Waiting_Status=Aguardando Status\:
+main.main.rostermenu.Add_to_Group=Adicionar no grupo
+main.main.rostermenu.Change_Group=Trocar Grupo
+main.main.rostermenu.Chat=&Bate-papo
+main.main.rostermenu.Edit_Registration=Editar registro
+main.main.rostermenu.Group=&Grupo
+main.main.rostermenu.Invisible=&Invis\u00EDvel
+main.main.rostermenu.Last_Seen=\u00DAltimo acesso
+main.main.rostermenu.Local_Time=Local &Data
+main.main.rostermenu.Local_Version=Local &Vers\u00E3o
+main.main.rostermenu.Log_Off=Desconectar
+main.main.rostermenu.Log_On=Conectar
+main.main.rostermenu.Message=&Mensagem
+main.main.rostermenu.Remove=Remover
+main.main.rostermenu.Remove_from_group=&Remover do grupo
+main.main.rostermenu.Rename=&Renomear
+main.main.rostermenu.Set_Invisible=Ficar invis\u00EDvel
+main.main.rostermenu.Set_Visible=Ficar vis\u00EDvel
+main.main.rostermenu.Subscribe_from=Autorizar
+main.main.rostermenu.Subscriptions=Autoriza\u00E7\u00F5es
+main.main.rostermenu.Unsubscribe_from=Cancelar autoriza\u00E7\u00E3o
+main.main.statusmenu.Change_message=&Mensagem
+main.main.statusmenu.Manage_messages=&Personalizar
+main.main.statusmenu.Status_message=Mensagem de Status\:
+main.manageservices.Change_Server=&Trocar servidor
+main.manageservices.Manage_Services=&Gerenciar servi\u00E7os
+main.manageservices.Register=&Registrar
+main.manageservices.Server=&Servidor
+main.options.Description=Descri\u00E7\u00E3o
+main.options.Enabled=Habilitado
+main.options.Name=Nome
+main.options.Options=Op\u00E7\u00F5es
+main.options.Plugins=Plugins
+main.options.RosterIcons=Roster Icones
+main.options.Scan_plugins=&Procurar plugins
+main.options.Standard=Padr\u00E3o
+main.options.standard.Beep_on_new_message=Bipar quando receber nova mensagem
+main.options.standard.Country=Pa\u00EDs
+main.options.standard.Don't_show_the_mainscreen_in_the_taskbar=N\u00E3o mostrar janela principal na \u00E1rea de trabalho (Jeti precisa ser reiniciado)
+main.options.standard.Enter_key_sends_messages=Enter envia mensagem
+main.options.standard.Java_window_decorations=Decora\u00E7\u00D5es de javela no estilo (Jeti precisa ser reiniciado)
+main.options.standard.Jeti_as_Menu_instead_of_button=Mostrar menu ao inv\u00E9s de bot\u00E3o  (Jeti precisa ser reiniciado)
+main.options.standard.Jeti_with_tabs=Jeti com abas
+main.options.standard.Language=Idioma
+main.options.standard.Loading_Languages,_please_wait=Carregando idiomas, por favor espere
+main.options.standard.Other=Outros
+main.options.standard.Show_Offline_contacts=Mostrar contatos offline
+main.options.standard.Show_remote_msn_nicknames=Mostrar apelidos remotos
+main.options.standard.Show_timestamps=Mostrar data/hora
+main.options.standard.To_front_on_new_message=Janela na frente quando nova mensagem recebida
+main.options.standard.tooltip.Beep_on_new_message_arrival=Bipar quando nova messagem recebida
+main.options.standard.tooltip.Change_the_Jeti_button_to_a_menu_(restart_required)=Trocar bot\u00E3o para menu (Jeti precisa ser reiniciado)
+main.options.standard.tooltip.Makes_the_main_window_white_(restart_required)=Fazer a tela principal branca (Jeti precisa ser reiniciado)
+main.options.standard.tooltip.Restart_required=Reiniciar requerido
+main.options.standard.tooltip.Send_message_with_enter_key_instead_of_ctrl_or_shift_and_enter=Enviar mensagem com enter ao inv\u00E9s do ctrl ou shift e enter
+main.options.standard.tooltip.Set_java_look_and_feel_decorations_for_windows_(restart_required)=Ajustar tema java (Jeti precisa ser reiniciado)
+main.options.standard.tooltip.Show_Offline_contacts=Mostrar contatos desconectados
+main.options.standard.tooltip.Show_remote_nicknames_instead_of_the_local_ones=Mostrar apelidos remotos ao inv\u00E9s the apelidos locais.
+main.options.standard.tooltip.Show_timestamps_on_all_messages=Mostrar data/hora em todas as mensagens.
+main.options.standard.White_background_main_window=Fundo branco na janela principal.
+main.options.Version=Vers\u00E3o
+main.options.Version_{0}_(Jeti_{1})=Vers\u00E3o {0} (Jeti {1})
+main.popup.{0}_is_in_the_last_group,_remove_completely?={0} \u00E9 o \u00FAltimo grupo, remover completamente?
+main.popup.{0}_is_in_timezone_{1}={0} fuso-hor\u00E1rio {1}
+main.popup.{0}_not_found={0} n\u00E3o encontrado.
+main.popup.{0}_not_found_until_the_end_of_this_file,_start_again_from_the_beginning?={0} n\u00E3o encontrado o final no arquivo, come\u00E7ar novamente no in\u00EDcio do arquivo?
+main.popup.{0}_uses_{1},_version_{2},_On_{3}={0} use\: {1}, vers\u00E3o\: {2}, On\: {3}
+main.popup.{0}_wants_to_subscribe_to_your_presence={0} quer registrar sua presen\u00E7a
+main.popup.{0}_was_last_seen_{1}_seconds_ago={0} foi visto {1} segundos atr\u00E1s.
+main.popup.{0}_was_last_seen_on_{1}={0} foi visto em {1}
+main.popup.Add_{0}_to=Adicionar {0} para \:
+main.popup.Add_to_roster=Adicionar
+main.popup.Change_{0}_from_{1}_to=Trocar {0} para {1} to \:
+main.popup.Chat_with=Bate-papo com
+main.popup.Chat_with_who?=Bate-papo com quem?
+main.popup.Deny_subscription=Negar
+main.popup.Enter_the_text_to_search_for=Entre o texto de pesquisa para 
+main.popup.Find=Procurar
+main.popup.Jeti=&Jeti
+main.popup.Last_Seen=Visto em
+main.popup.Local_time_for_{0}_is=Hora local para {0} \u00E9
+main.popup.logged_in_as_{0}_on_server_{1}_with_resource_{2}=Logado como\: {0}\non server\: {1}\nwith resource\: {2}\nJID \= {0}@{1}/{2}
+main.popup.Message=Mensagem
+main.popup.Really_remove_{0}_from_all_groups_?=Realmente remover {0} todos os grupos?
+main.popup.Really_remove_{0}?_All_JIDs_in_this_group_will_be_removed\!=Realmente remover {0}? Todos JIDs neste grupo ser\u00E3o removidos\!
+main.popup.Remove_Group=Remover Grupo
+main.popup.Rename_{0}_to=Renomear {0} to\:
+main.popup.Reply=Responder
+main.popup.Subject=Informa\u00E7\u00E3o
+main.popup.Subscription_request=Requer assinatura
+main.popup.Time=Tempo
+main.popup.Version=Vers\u00E3o
+main.presence.Available=Dispon\u00EDvel
+main.presence.Away=Ausente
+main.presence.Do_not_Disturb=N\u00E3o Perturbe
+main.presence.Extended_Away=Volto Logo
+main.presence.Free_for_Chat=Bate-papo
+main.presence.Invisible=Invis\u00EDvel
+main.presence.Unavailable=Indispon\u00EDvel
+main.presence.Unknown=Desconhecido
+main.register.Instructions=Instru\u00E7\u00F5es
+main.register.Password=Senha
+main.register.Register=Registar
+main.register.registration_succeded=registrado com sucesso.
+main.register.Username=Usu\u00E1rio
+main.statusmessages.Add=&Adicionar
+main.statusmessages.Manage_Status_Messages=Personalizar
+main.statusmessages.Remove=&Remover
+messagelog.{0}_could_not_be_opened_in_write_mode={0} n\u00E3o pode abrir em modo de escrita
+messagelog.I_say=Eu disse\:
+messagelog.Logfile_Error=Logfile Erro
+messagelog.message_logger=mensagem logger
+messagelog.says=diz\:
+messagelog.Search=Procurar
+messagelog.Search_Next=Procurar pr\u00F3ximo
+messagelog.Show_MessageLog=Mostrar Log de Mensagem
+OK=&OK
+Remove=&Remover
+Retry=&Tentar
+Save=Salvar
+search.Next=Pr\u00F3ximo
+search.No_User_Found,_try_with_different_search_terms=Usu\u00E1rio n\u00E3o encontrado, tente outros parametros para pesquisa
+search.Previous=Anterior
+search.Search_a_user_on_a_Jabber_Server=Procurar usu\u00E1rio no servidor Jabber
+search.Search_Again=Procurar novamente
+search.Search_user=Procurar usu\u00E1rio
+search.Select_the_user_directory_to_search=Selecione o diret\u00F3rio para pesquisa
+search.User_Search=Procurar usu\u00E1rio
+Send=&Enviar
+sound.{0}_is_an_unsupported_format={0} \u00E9 um formato n\u00E3o suportado
+sound.{0}_not_found={0} n\u00E3o encontrado
+sound.Block_repeats_of_sound_within=Bloco repete com som
+sound.Choose=Escolher
+sound.Enable=Habilitar
+sound.Format_not_supported=Formato n\u00E3o suportado
+sound.Max=Max
+sound.message=Mensagem
+sound.Min=Min
+sound.offline=Desconectado
+sound.online=Conectado
+sound.own_offline=Desconectado
+sound.own_online=Conectado
+sound.Path_to_sound=Caminho para o som
+sound.Plays_a_sound_on_new_message_or_person_available=Tocar som quando uma nova mensagem ou pessoa ficar dispon\u00EDvel
+sound.Problem_playing_sound_check_your_sound_system=Problemas para tocar som. Cheque sua placa de som.
+sound.seconds=segundos
+sound.Sound_not_found=Som n\u00E3o encontrado
+sound.Test=Teste
+sound.Volume=Volume
+spell.Default=Padr\u00E3o
+spell.Dictionary=Dicion\u00E1rio
+spell.Dictionary_not_found=Diction\u00E1rio n\u00E3o encontrado
+spell.Enabled=Habilitado
+spell.Ignore=Ignorar
+spell.Language=Idioma
+spell.None=Nenhum
+spell.Scan_Dictionaries=Procurar diret\u00F3rios
+spell.Spellcheck=Corretor ortogr\u00E1fico
+systemtray.shows_system_tray_icon=mostrar Jeti como \u00EDcone na barra de sistema (Windows)
+systemtray.Status=Status
+titleflash.Flashes_the_titlebar_when_a_message_arrives=Piscar barra de t\u00EDtulo quando recebida uma mensagem
+titlescroller.ms=ms
+titlescroller.s=s
+titlescroller.Scrolling_speed=Scrolling velocidade
+titlescroller.Scrolls_the_window_title_of_chat_windows_on_new_messages=Rolar a janela de bate-papo quando receber novas mensagens
+titlescroller.Time_to_scroll_(0_for_no_time_limit)=Tempo para rolar (0 for no time limit)
+vcard.add_Telephone_Number=Adicionar n\u00FAmero de telefone
+vcard.BDAY=Anivers\u00E1rio
+vcard.Business=Neg\u00F3cios
+vcard.change_logo=Trocar Logo
+vcard.change_photo=Trocar Foto
+vcard.CTRY=Pa\u00EDs
+vcard.DESC=Descri\u00E7\u00E3o
+vcard.Details_for_{0}=Detalhes para {0}
+vcard.Edit_Details=Editar Detalhes
+vcard.EMAIL=Email
+vcard.EXTADR=Sala/Departamento
+vcard.FAMILY=Sobrenome
+vcard.FN=Nome Completo
+vcard.GIVEN=Nome
+vcard.Image_may_not_be_larger_then_50kB=Imagem n\u00E3o pode ser maior que 50kB
+vcard.Image_to_large=imagem muito grande
+vcard.JABBERID=Jabber ID (JID)
+vcard.LOCALITY=Cidade
+vcard.MIDDLE=Sobrenome
+vcard.NICKNAME=Apelido
+vcard.ORGNAME=Organiza\u00E7\u00E3o
+vcard.ORGUNIT=Unidade
+vcard.PCODE=CEP
+vcard.Personal=Pessoal
+vcard.PHOTO=Foto
+vcard.POBOX=Caixa Postal
+vcard.REGION=Estado
+vcard.ROLE=Cargo
+vcard.Show_Details=Mostrar Detalhes
+vcard.shows_contact_details=Mostrar detalhes da conta
+vcard.STREET=Rua
+vcard.Submit=Enviar
+vcard.TITLE=T\u00EDtulo
+vcard.URL=Website
+windowsutils.Make_opaque=Ficar opaco
+windowsutils.Make_transparent=Ficar transparente
+windowsutils.Not_Always_On_Top=N\u00E3o ficar no topo
+windowsutils.Provides_always_on_top,_transparency_and_flashing_windows=Ficar sempre no topo, transparente e piscando
+windowsutils.Set_Always_On_Top=Ficar sempre no topo
+windowsutils.Sorry_transparency_not_supported_by_your_OS=Desculpe, transpar\u00EAncia n\u00E3o \u00E9 suportada pelo seu sistema operacional.
+windowsutils.Transparancy,_100%_is_opaque=Transpar\u00EAncia, 100% opaco
+xhtml.{0}_does_not_support_formatted_messages={0} n\u00E3o suporta mensagens formatadas
+xhtml.background=fundo
+xhtml.Bold=Negrito
+xhtml.BoldItalic=Negrito/It\u00E1lico
+xhtml.Choose_Font=Escolher fonte
+xhtml.Color=Cor
+xhtml.Font=Fonte
+xhtml.Font_Family=Fam\u00EDlia de Fonte
+xhtml.foreground=primeiro plano
+xhtml.Formats_messages=Formartar mensagens
+xhtml.Italic=It\u00E1lico
+xhtml.Plain=Plano
+xhtml.Preview=Pre-vizualizar
+xhtml.Select_Color=Selecionar cor
+xhtml.Size=Tamanho
+xhtml.Style=Estilo
+xhtml.The_font_used_when_sending_messages=A fonte usada para mandar mensagem 
+xhtml.The_quick_brown_fox_jumped_over_the_lazy_dogs=A ligeira raposa ultrapassou os lobos pregui\u00E7osos. 
+xhtml.Underline=Sublinhado
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/controller.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/controller.php	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/controller.php	(revision 382)
@@ -0,0 +1,25 @@
+<?php
+
+$request_method = '_' . $_SERVER['REQUEST_METHOD'];
+switch ( $request_method )
+{
+	case '_GET' :
+		$params = $_GET;
+	break;
+	case '_POST' :
+		$params = $_POST;
+	break;
+	case '_HEAD' :
+	case '_PUT' :
+	default :
+		echo "controller - request method not avaible";
+		return false;
+}
+
+require_once dirname(__FILE__) . '/inc/Controller.class.php';
+
+$controller = new Controller;
+printf("%s", $controller->exec($$request_method));
+
+exit(0);
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/getphoto.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/getphoto.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/getphoto.php	(revision 697)
@@ -0,0 +1,213 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+function ldap_rebind($ldap_connection, $ldap_url){
+	include('conf_Ldap_Photos.php');
+	$handle   = unserialize(base64_decode($CONF_SERVER));
+	@ldap_bind($ldap_connection, $handle['dn'],$handle['passwd']);
+}
+
+class ldapPhoto
+{
+	private $host;
+	private $dn;
+	private $passwd;
+	private $refer;
+	private $user_referral;
+	private $password_referral;
+	private $conn;
+	private $context;
+	private $photo_user = array();
+	private $handle;
+
+
+	function __construct()
+	{
+		require_once('conf_Ldap_Photos.php');
+		$handle   = unserialize(base64_decode($CONF_SERVER));
+
+		$this->host		= $handle['host'];
+		$this->context	= $handle['context'];
+		$this->dn		= $handle['dn'];
+		$this->passwd	= $handle['passwd'];
+		
+		$this->refer  	= true;
+		$this->version3 = true;
+	}
+
+
+	private final function ldapConnect()
+	{
+		if(!function_exists('ldap_connect'))
+		{
+			printf("<b>Erro : Ldap Não suportado %s</b><br>" , $this->host);
+			return False;
+		}
+		
+		if(!$this->conn = ldap_connect($this->host))
+		{
+			printf("<b>Erro: não pode conectar no servidor ldap %s!</b><br>", $this->host);
+			return False;
+		}
+
+		if( $this->version3 )
+		{
+			if( !ldap_set_option($this->conn,LDAP_OPT_PROTOCOL_VERSION,3) )
+				$this->version = false;
+		}
+		ldap_set_option($this->conn, LDAP_OPT_REFERRALS, $this->refer);
+
+		// verifica refer
+		if( $this->refer )
+		{
+			@ldap_set_rebind_proc($this->conn, ldap_rebind);
+		}
+		
+		// bind as admin
+		if($this->dn && $this->passwd && !ldap_bind($this->conn, $this->dn, $this->passwd)){
+			echo "<center><b>ExpressoLivre indisponível no momento</b></center>";
+			return False;
+		}
+
+		// bind as anonymous
+		if(!$this->dn && !$this->passwd && !@ldap_bind($this->conn))
+		{
+			echo "<center><b>ExpressoLivre indisponível no momento</b></center>";
+			return False;
+		}						
+	}
+	
+	public final function getNameOrganization($pUid, $pCharset)
+	{
+		$this->ldapConnect();
+		
+		if( $this->conn )
+		{
+			$filter = "(&(phpgwaccounttype=u)(uid=".$pUid.")(!(phpgwaccountvisible=-1)))";
+			$justthese = array("uid","cn","dn");
+			$search = ldap_search($this->conn,$this->context,$filter,$justthese);
+			$entry = ldap_get_entries($this->conn,$search);
+			$cn = $entry[0]['cn'][0];
+			$ou = explode("dc=", $entry[0]['dn']);
+			$ou = explode("ou=",$ou[0]);
+			$ou = array_pop($ou);
+			$dn = strtoupper(substr($ou,0,strlen($ou)-1));
+
+			$return = utf8_encode("Nome : " . $cn . ";Organização : " . $dn);
+
+			if( $pCharset === "1" )
+				return $return;
+			else
+				return mb_convert_encoding($return, "ISO-8859-1", "UTF-8");
+
+			$return = utf8_encode("Nome : Não Identificado ;Organização : Não Identificado");			
+
+			if( $pCharset === 1 )
+				return $return;
+			else
+				return mb_convert_encoding($return, "ISO-8859-1", "UTF-8");
+		}
+	}
+	
+	public final function getPhotoLdap($uid)
+	{
+		$this->ldapConnect();
+		if( $this->conn )
+		{
+			$filter = "(&(phpgwaccounttype=u)(uid=".$uid.")(!(phpgwaccountvisible=-1)))";
+			$justthese = array("uid","jpegPhoto");
+			$search = ldap_search($this->conn,$this->context,$filter,$justthese);
+			$entry1 = ldap_get_entries($this->conn,$search);
+			$entry = ldap_first_entry( $this->conn, $search );
+			if( $entry1['count'] > 0 )
+			{
+				$i = 0;
+				$photo = "";
+				$return_photo = "";
+				$photo = @ldap_get_values_len($this->conn, $entry, 'jpegphoto');
+				if ($photo)
+					$return_photo = $photo[0];								
+				return $return_photo;
+			}
+		}
+		return false;
+	}
+	
+	public final function getPhotoSession($pUid)
+	{
+		if(isset($_SESSION['phpgw_info']['jabberit_messenger']['photo'][$pUid]))
+		{
+			$photo = imagecreatefromstring($_SESSION['phpgw_info']['jabberit_messenger']['photo'][$pUid]);
+			
+			header("Content-Type: image/jpeg");
+			$width = imagesx($photo);
+			$height = imagesy($photo);
+			$twidth = 60;
+			$theight = 80;
+			$small_photo = imagecreatetruecolor ($twidth, $theight);
+			imagecopyresampled($small_photo, $photo, 0, 0, 0, 0,$twidth, $theight, $width, $height);
+			imagejpeg($small_photo,'',100);
+			
+			unset($_SESSION['phpgw_info']['jabberit_messenger']['photo'][$pUid]);	
+			return;	
+		}
+	}
+}
+
+if(trim($_REQUEST['uid']) != "")
+{
+	$uid = trim($_REQUEST['uid']);
+	$a = new ldapPhoto();
+	
+	if( strpos($uid,"@"))
+	{
+		$uid = substr($uid, 0, strpos($uid,"@"));	
+		$photo = $a->getPhotoLdap($uid);
+		$photoWidth = 70;
+		$photoHeight = 90;
+		$newImage = imagecreatetruecolor($photoWidth,$photoHeight);		
+
+		if($photo)
+		{
+			$photo = imagecreatefromstring($photo);
+			imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo));
+		}
+		else
+		{
+			$photo = @imagecreatefrompng("../templates/default/images/photo.png");
+			imagecopyresized($newImage,$photo,0,0,0,0,$photoWidth,$photoHeight,imagesx($photo),imagesy($photo));
+		}
+
+		ob_start();
+		imagepng($newImage);
+		$imagePhoto = ob_get_contents();
+		imagedestroy($newImage);
+		ob_end_clean();
+		printf("%s",base64_encode($imagePhoto));
+	}
+	else
+	{
+		$a->getPhotoSession($uid);
+	}
+}
+
+if(trim($_POST['jid']) != "")
+{
+	$jid = trim($_POST['jid']);
+	if( strpos($jid,"@"))
+		$jid = substr($jid, 0, strpos($jid,"@"));
+	$charset = trim($_POST['charset']);
+	$a = new ldapPhoto();
+	
+	printf("%s",$a->getNameOrganization($jid, $charset));
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/controller.xml
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/controller.xml	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/controller.xml	(revision 697)
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<controller>
+	<controller-security>
+		<string-access>act</string-access>
+		<string-delimiter>.</string-delimiter>
+	</controller-security>
+	<controller-contentes>
+		<item param="c" section="css" />
+		<item param="j" section="js" />
+		<item param="p" section="php" />
+		<item param="php" section="php" />
+		<item param="xm" section="xml" />
+		<item param="xs" section="xsl" />
+		<item param="t" section="php" />
+		<item param="$this" section="php" />
+	</controller-contentes>
+	<controller-sections>
+		<css></css>
+		<js path="/var/www/expresso/jabberit_messenger/js" suffix=".js" debug="false">
+			<item ref="connector" js="connector" />
+			<item ref="dragdrop" js="dragdrop" />
+			<item ref="editSelect" js="editSelect" />
+			<item ref="glocked" js="glocked" />			
+			<item ref="images" js="images" />
+			<item ref="ldap" js="ldap" />
+			<item ref="load" js="load" />
+			<item ref="show_hidden" js="show_hidden" />
+			<item ref="setup" js="setup" path="/var/www/expresso/jabberit_messenger/templates/default"/>
+			<item ref="xtools" js="xtools" />
+			<item ref="windows" js="windows" />
+		</js>
+		<php path="/var/www/expresso/jabberit_messenger/inc" suffix=".class.php">
+			<item ref="contacts_im" alias="getParticipantsExternal" class="contacts_im" method="getParticipantsExternal" prefix="class." suffix=".inc.php"/>
+			<item ref="contacts_im" alias="list_contacts" class="contacts_im" method="list_contacts" prefix="class." suffix=".inc.php"/>
+			<item ref="contacts_im" alias="verifyAddNewContact" class="contacts_im" method="verifyAddNewContact" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="getPreferences" class="db_im" method="getPreferences" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="setAttributesLdap" class="db_im" method="setAttributesLdap" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="setPreferences" class="db_im" method="setPreferences" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="setUseParticipantsExternal" class="db_im" method="setUseParticipantsExternal" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="setOuGroupsLocked" class="db_im" method="setOuGroupsLocked" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="setOrganization" class="db_im" method="setOrganization" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="removeAttributesLdap" class="db_im" method="removeAttributesLdap" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="removeOuGroupsLocked" class="db_im" method="removeOuGroupsLocked" prefix="class." suffix=".inc.php"/>
+			<item ref="db_im" alias="removeParticipantsExternal" class="db_im" method="removeParticipantsExternal" prefix="class." suffix=".inc.php"/>
+			<item ref="ldap_im" alias="list_organizations_ldap" class="ldap_im" method="list_organizations_ldap" prefix="class." suffix=".inc.php"/>
+			<item ref="ldap_im" alias="list_participants_externals" class="ldap_im" method="list_participants_externals" prefix="class." suffix=".inc.php"/>
+			<item ref="ldap_im" alias="getGroupsLdap" class="ldap_im" method="getGroupsLdap" prefix="class." suffix=".inc.php"/>
+			<item ref="ldap_im" alias="photo_ldap" class="ldap_im" method="photo_ldap" prefix="class." suffix=".inc.php"/>
+			<item ref="ujabber" alias="AddNewContact" class="ujabber" method="AddNewContact" prefix="class." suffix=".inc.php"/>
+			<item ref="ujabber" alias="getGroupsJabber" class="ujabber" method="getGroupsJabber" prefix="class." suffix=".inc.php"/>			
+			<item ref="FileDefine" alias="getParams" class="FileDefine" method="getParams" prefix="class." suffix=".inc.php"/>			
+		</php>
+		<xml></xml>
+		<xsl></xsl>
+	</controller-sections>
+</controller>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bogroupslocked.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bogroupslocked.inc.php	(revision 559)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bogroupslocked.inc.php	(revision 559)
@@ -0,0 +1,31 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.db_im.inc.php";
+require_once "jabberit_sessions.inc.php";
+
+class bogroupslocked
+{
+	private $db;
+	
+	function __construct()
+	{
+		$this->db = new db_im();
+	}
+	
+	public final function setGroupsLocked($pGroups)
+	{
+		return $this->db->setGroupsLocked($pGroups);
+	}	
+}  
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uimodule.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uimodule.inc.php	(revision 423)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uimodule.inc.php	(revision 423)
@@ -0,0 +1,113 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.bomodule.inc.php"; 
+
+class uimodule
+{
+	public $public_functions = array(
+		'add'      => True,
+		'edit_conf' => True,
+	);
+
+	private $bo;
+	
+	final function __construct()
+	{
+		$this->bo = new bomodule();	
+	}	
+	
+	public final function edit_conf()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Configurar o Uso do Módulo';	
+		
+		if(!@is_object($GLOBALS['phpgw']->js))
+		{
+			$GLOBALS['phpgw']->js = CreateObject('phpgwapi.javascript');
+		}
+			
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+		
+		$js = array('functions');
+		
+		foreach( $js as $tmp )
+			$GLOBALS['phpgw']->js->validate_file('',$tmp,'jabberit_messenger');
+		
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+		
+		if( $apps_list = $this->bo->getApplicationsEnabled())
+		{
+			$apps_list = unserialize($apps_list);
+			if(is_array($apps_list))
+			{
+				foreach($apps_list as $tmp)
+					$apps_en .= "<option value='".$tmp."'>".substr($tmp,strpos($tmp, ";")+1)."</option>";
+			}
+		}
+
+		if( $apps_enabled = $this->bo->getApplicationsList() )
+		{
+			if(is_array($apps_enabled))
+			{
+				foreach($apps_enabled as $tmp )
+					$apps .= "<option value='".$tmp['name'].";".$tmp['title']."'>".$tmp['title']."</option>";
+			}
+		}
+
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'module.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','module');	
+		$GLOBALS['phpgw']->template->set_var(array(
+										'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.add'),
+										'apps_enabled' => $apps_en,
+										'apps_list' => $apps,
+										'lang_Select_the_modules_where_the_Expresso_Messenger_will_be_loaded' => lang('Select the modules where the Expresso Messenger will be loaded.'),										
+										'lang_Enable_the_Expresso_Messenger_module' => lang('Enable the Expresso Messenger module'),
+										'lang_Modules_List' => lang('Modules List'),
+										'lang_Modules_Enabled' => lang('Modules Enabled'),
+										'lang_save' => lang('Save'),
+										'lang_cancel' => lang('Cancel')
+										));
+	
+		$GLOBALS['phpgw']->template->pparse('out','module');
+	}
+	
+	public final function add()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		if ($_POST['cancel'])
+		{
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}
+
+		if ( $_POST['save'] )
+		{
+			if(is_array($_POST['apps_enabled']))
+				$this->bo->setApplications($_POST['apps_enabled']);
+			else
+				$this->bo->setApplications("");
+		}
+
+		$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.jabber.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.jabber.inc.php	(revision 459)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.jabber.inc.php	(revision 459)
@@ -0,0 +1,1936 @@
+<?php
+
+	/***************************************************************************
+		Class.Jabber.PHP v0.4.2
+		(c) 2004 Nathan "Fritzy" Fritz
+		http://cjphp.netflint.net *** fritzy@netflint.net
+	 ***************************************************************************/
+
+class Jabber
+{
+	var $server;
+	var $port;
+	var $username;
+	var $password;
+	var $resource;
+	var $jid;
+
+	var $connection;
+	var $delay_disconnect;
+
+	var $stream_id;
+	var $roster;
+
+	var $enable_logging;
+	var $log_array;
+	var $log_filename;
+	var $log_filehandler;
+
+	var $iq_sleep_timer;
+	var $last_ping_time;
+
+	var $packet_queue;
+	var $subscription_queue;
+
+	var $iq_version_name;
+	var $iq_version_os;
+	var $iq_version_version;
+
+	var $error_codes;
+
+	var $connected;
+	var $keep_alive_id;
+	var $returned_keep_alive;
+	var $txnid;
+
+	var $CONNECTOR;
+
+
+
+	function Jabber()
+	{
+		$this->port					= "5222";
+
+		$this->enable_logging		= FALSE;
+		$this->log_array			= array();
+		$this->log_filename			= '';
+		$this->log_filehandler		= FALSE;
+
+		$this->packet_queue			= array();
+		$this->subscription_queue	= array();
+
+		$this->iq_sleep_timer		= 1;
+		$this->delay_disconnect		= 1;
+
+		$this->returned_keep_alive	= TRUE;
+		$this->txnid				= 0;
+
+		$this->iq_version_name		= "Class.Jabber.PHP -- http://cjphp.netflint.net -- by Nathan 'Fritzy' Fritz, fritz@netflint.net";
+		$this->iq_version_version	= "0.4";
+		$this->iq_version_os		= $_SERVER['SERVER_SOFTWARE'];
+
+		$this->connection_class		= "CJP_StandardConnector";
+
+		$this->error_codes			= array(400 => "Bad Request",
+											401 => "Unauthorized",
+											402 => "Payment Required",
+											403 => "Forbidden",
+											404 => "Not Found",
+											405 => "Not Allowed",
+											406 => "Not Acceptable",
+											407 => "Registration Required",
+											408 => "Request Timeout",
+											409 => "Conflict",
+											500 => "Internal Server Error",
+											501 => "Not Implemented",
+											502 => "Remove Server Error",
+											503 => "Service Unavailable",
+											504 => "Remove Server Timeout",
+											510 => "Disconnected");
+	}
+
+
+
+	function Connect()
+	{
+		$this->_create_logfile();
+
+		$this->CONNECTOR = new $this->connection_class;
+
+		if ($this->CONNECTOR->OpenSocket($this->server, $this->port))
+		{
+			$this->SendPacket("<?xml version='1.0' encoding='UTF-8' ?" . ">\n");
+			$this->SendPacket("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
+
+			sleep(1);
+
+			if ($this->_check_connected())
+			{
+				$this->connected = TRUE;	// Nathan Fritz
+				return TRUE;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: Connect() #1");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: Connect() #2");
+			return FALSE;
+		}
+	}
+
+
+
+	function Disconnect()
+	{
+		if (is_int($this->delay_disconnect))
+		{
+			sleep($this->delay_disconnect);
+		}
+
+		$this->SendPacket("</stream:stream>");
+		$this->CONNECTOR->CloseSocket();
+
+		$this->_close_logfile();
+		$this->PrintLog();
+	}
+
+
+
+	function SendAuth()
+	{
+		$this->auth_id	= "auth_" . md5(time() . $_SERVER['REMOTE_ADDR']);
+
+		$this->resource	= ($this->resource != NULL) ? $this->resource : ("Class.Jabber.PHP " . md5($this->auth_id));
+		$this->jid		= "{$this->username}@{$this->server}/{$this->resource}";
+
+		// request available authentication methods
+		$payload	= "<username>{$this->username}</username>";
+		$packet		= $this->SendIq(NULL, 'get', $this->auth_id, "jabber:iq:auth", $payload);
+
+		// was a result returned?
+		if ($this->GetInfoFromIqType($packet) == 'result' && $this->GetInfoFromIqId($packet) == $this->auth_id)
+		{
+			// yes, now check for auth method availability in descending order (best to worst)
+
+			if (!function_exists("mhash"))
+			{
+				$this->AddToLog("ATTENTION: SendAuth() - mhash() is not available; screw 0k and digest method, we need to go with plaintext auth");
+			}
+
+			// auth_0k
+			if (function_exists("mhash") && isset($packet['iq']['#']['query'][0]['#']['sequence'][0]["#"]) && isset($packet['iq']['#']['query'][0]['#']['token'][0]["#"]))
+			{
+				return $this->_sendauth_0k($packet['iq']['#']['query'][0]['#']['token'][0]["#"], $packet['iq']['#']['query'][0]['#']['sequence'][0]["#"]);
+			}
+			// digest
+			elseif (function_exists("mhash") && isset($packet['iq']['#']['query'][0]['#']['digest']))
+			{
+				return $this->_sendauth_digest();
+			}
+			// plain text
+			elseif ($packet['iq']['#']['query'][0]['#']['password'])
+			{
+				return $this->_sendauth_plaintext();
+			}
+			// dude, you're fucked
+			{
+				$this->AddToLog("ERROR: SendAuth() #2 - No auth method available!");
+				return FALSE;
+			}
+		}
+		else
+		{
+			// no result returned
+			$this->AddToLog("ERROR: SendAuth() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function AccountRegistration($reg_email = NULL, $reg_name = NULL)
+	{
+		$packet = $this->SendIq($this->server, 'get', 'reg_01', 'jabber:iq:register');
+
+		if ($packet)
+		{
+			$key = $this->GetInfoFromIqKey($packet);	// just in case a key was passed back from the server
+			unset($packet);
+
+			$payload = "<username>{$this->username}</username>
+						<password>{$this->password}</password>
+						<email>$reg_email</email>
+						<name>$reg_name</name>\n";
+
+			$payload .= ($key) ? "<key>$key</key>\n" : '';
+
+			$packet = $this->SendIq($this->server, 'set', "reg_01", "jabber:iq:register", $payload);
+
+			if ($this->GetInfoFromIqType($packet) == 'result')
+			{
+				if (isset($packet['iq']['#']['query'][0]['#']['registered'][0]['#']))
+				{
+					$return_code = 1;
+				}
+				else
+				{
+					$return_code = 2;
+				}
+
+				if ($this->resource)
+				{
+					$this->jid = "{$this->username}@{$this->server}/{$this->resource}";
+				}
+				else
+				{
+					$this->jid = "{$this->username}@{$this->server}";
+				}
+
+			}
+			elseif ($this->GetInfoFromIqType($packet) == 'error' && isset($packet['iq']['#']['error'][0]['#']))
+			{
+				// "conflict" error, i.e. already registered
+				if ($packet['iq']['#']['error'][0]['@']['code'] == '409')
+				{
+					$return_code = 1;
+				}
+				else
+				{
+					$return_code = "Error " . $packet['iq']['#']['error'][0]['@']['code'] . ": " . $packet['iq']['#']['error'][0]['#'];
+				}
+			}
+
+			return $return_code;
+
+		}
+		else
+		{
+			return 3;
+		}
+	}
+
+
+
+	function SendPacket($xml)
+	{
+		$xml = trim($xml);
+
+		if ($this->CONNECTOR->WriteToSocket($xml))
+		{
+			$this->AddToLog("SEND: $xml");
+			return TRUE;
+		}
+		else
+		{
+			$this->AddToLog('ERROR: SendPacket() #1');
+			return FALSE;
+		}
+	}
+
+
+
+	function Listen()
+	{
+		unset($incoming);
+
+		while ($line = $this->CONNECTOR->ReadFromSocket(4096))
+		{
+			$incoming .= $line;
+		}
+
+		$incoming = trim($incoming);
+
+		if ($incoming != "")
+		{
+			$this->AddToLog("RECV: $incoming");
+		}
+
+		if ($incoming != "")
+		{
+			$temp = $this->_split_incoming($incoming);
+
+			for ($a = 0; $a < count($temp); $a++)
+			{
+				$this->packet_queue[] = $this->xmlize($temp[$a]);
+			}
+		}
+
+		return TRUE;
+	}
+
+
+	function StripJID($jid = NULL)
+	{
+		preg_match("/(.*)\/(.*)/Ui", $jid, $temp);
+		return ($temp[1] != "") ? $temp[1] : $jid;
+	}
+
+
+	function SendMessage($to, $type = "normal", $id = NULL, $content = NULL, $payload = NULL)
+	{
+		if ($to && is_array($content))
+		{
+			if (!$id)
+			{
+				$id = $type . "_" . time();
+			}
+
+			$content = $this->_array_htmlspecialchars($content);
+
+			$xml = "<message to='$to' type='$type' id='$id'>\n";
+
+			if ($content['subject'])
+			{
+				$xml .= "<subject>" . $content['subject'] . "</subject>\n";
+			}
+
+			if ($content['thread'])
+			{
+				$xml .= "<thread>" . $content['thread'] . "</thread>\n";
+			}
+
+			$xml .= "<body>" . $content['body'] . "</body>\n";
+			$xml .= $payload;
+			$xml .= "</message>\n";
+
+
+			if ($this->SendPacket($xml))
+			{
+				return TRUE;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: SendMessage() #1");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: SendMessage() #2");
+			return FALSE;
+		}
+	}
+
+
+
+	function SendPresence($type = NULL, $to = NULL, $status = NULL, $show = NULL, $priority = NULL)
+	{
+		$xml = "<presence";
+		$xml .= ($to) ? " to='$to'" : '';
+		$xml .= ($type) ? " type='$type'" : '';
+		$xml .= ($status || $show || $priority) ? ">\n" : " />\n";
+
+		$xml .= ($status) ? "	<status>$status</status>\n" : '';
+		$xml .= ($show) ? "	<show>$show</show>\n" : '';
+		$xml .= ($priority) ? "	<priority>$priority</priority>\n" : '';
+
+		$xml .= ($status || $show || $priority) ? "</presence>\n" : '';
+
+		if ($this->SendPacket($xml))
+		{
+			return TRUE;
+		}
+		else
+		{
+			$this->AddToLog("ERROR: SendPresence() #1");
+			return FALSE;
+		}
+	}
+
+	function SendError($to, $id = NULL, $error_number, $error_message = NULL)
+	{
+		$xml = "<iq type='error' to='$to'";
+		$xml .= ($id) ? " id='$id'" : '';
+		$xml .= ">\n";
+		$xml .= "	<error code='$error_number'>";
+		$xml .= ($error_message) ? $error_message : $this->error_codes[$error_number];
+		$xml .= "</error>\n";
+		$xml .= "</iq>";
+
+		$this->SendPacket($xml);
+	}
+
+	function RosterGroups()
+	{
+		$roster_request_id = "roster_" . time();
+		$incoming_array = $this->SendIq(NULL, 'get', $roster_request_id, "jabber:iq:roster");
+		$groups = array();
+
+		if (is_array($incoming_array))
+		{
+			if ($incoming_array['iq']['@']['type'] == 'result'
+				&& $incoming_array['iq']['@']['id'] == $roster_request_id
+				&& $incoming_array['iq']['#']['query']['0']['@']['xmlns'] == "jabber:iq:roster")
+			{
+				$number_of_contacts = count($incoming_array['iq']['#']['query'][0]['#']['item']);
+				$this->roster = array();
+
+				for ($a = 0; $a < $number_of_contacts; $a++)
+					 $groups[] = $incoming_array['iq']['#']['query'][0]['#']['item'][$a]['#']['group'][0]['#'];
+
+				return $groups;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: RosterGroups() #1");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: RosterGroups() #2");
+			return FALSE;
+		}
+
+	}
+
+	function RosterUpdate()
+	{
+		$roster_request_id = "roster_" . time();
+
+		$incoming_array = $this->SendIq(NULL, 'get', $roster_request_id, "jabber:iq:roster");
+
+		if (is_array($incoming_array))
+		{
+			if ($incoming_array['iq']['@']['type'] == 'result'
+				&& $incoming_array['iq']['@']['id'] == $roster_request_id
+				&& $incoming_array['iq']['#']['query']['0']['@']['xmlns'] == "jabber:iq:roster")
+			{
+				$number_of_contacts = count($incoming_array['iq']['#']['query'][0]['#']['item']);
+				$this->roster = array();
+
+				for ($a = 0; $a < $number_of_contacts; $a++)
+				{
+					$this->roster[$a] = array(	"jid"			=> strtolower($incoming_array['iq']['#']['query'][0]['#']['item'][$a]['@']['jid']),
+												"name"			=> $incoming_array['iq']['#']['query'][0]['#']['item'][$a]['@']['name'],
+												"subscription"	=> $incoming_array['iq']['#']['query'][0]['#']['item'][$a]['@']['subscription'],
+												"group"			=> $incoming_array['iq']['#']['query'][0]['#']['item'][$a]['#']['group'][0]['#']
+											);
+				}
+
+				return TRUE;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: RosterUpdate() #1");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: RosterUpdate() #2");
+			return FALSE;
+		}
+	}
+
+    // Mod by ALC;
+	function RosterAddUser($jid = NULL, $id = NULL, $name = NULL, $group = NULL)
+	{
+		$id = ($id) ? $id : "adduser_" . time();
+
+		if ($jid)
+		{
+			$payload = "<item jid='$jid'";
+			$payload .= ($name) ? " name='" . htmlspecialchars($name) . "'" : '';
+			$payload .= (($group) ? "><group>". htmlspecialchars($group). "</group></item>": "/") . ">";
+			
+			$packet = $this->SendIq(NULL, 'set', $id, "jabber:iq:roster", $payload);
+
+			if ($this->GetInfoFromIqType($packet) == 'result')
+			{
+				$this->RosterUpdate();
+				return TRUE;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: RosterAddUser() #2");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: RosterAddUser() #1");
+			return FALSE;
+		}
+	}
+
+	function RosterRemoveUser($jid = NULL, $id = NULL)
+	{
+		$id = ($id) ? $id : 'deluser_' . time();
+
+		if ($jid && $id)
+		{
+			$packet = $this->SendIq(NULL, 'set', $id, "jabber:iq:roster", "<item jid='$jid' subscription='remove'/>");
+
+			if ($this->GetInfoFromIqType($packet) == 'result')
+			{
+				$this->RosterUpdate();
+				return TRUE;
+			}
+			else
+			{
+				$this->AddToLog("ERROR: RosterRemoveUser() #2");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: RosterRemoveUser() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function RosterExistsJID($jid = NULL)
+	{
+		if ($jid)
+		{
+			if ($this->roster)
+			{
+				for ($a = 0; $a < count($this->roster); $a++)
+				{
+					if ($this->roster[$a]['jid'] == strtolower($jid))
+					{
+						return $a;
+					}
+				}
+			}
+			else
+			{
+				$this->AddToLog("ERROR: RosterExistsJID() #2");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: RosterExistsJID() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function GetFirstFromQueue()
+	{
+		return array_shift($this->packet_queue);
+	}
+
+
+
+	function GetFromQueueById($packet_type, $id)
+	{
+		$found_message = FALSE;
+
+		foreach ($this->packet_queue as $key => $value)
+		{
+			if ($value[$packet_type]['@']['id'] == $id)
+			{
+				$found_message = $value;
+				unset($this->packet_queue[$key]);
+
+				break;
+			}
+		}
+
+		return (is_array($found_message)) ? $found_message : FALSE;
+	}
+
+
+
+	function CallHandler($packet = NULL)
+	{
+		$packet_type	= $this->_get_packet_type($packet);
+
+		if ($packet_type == "message")
+		{
+			$type		= $packet['message']['@']['type'];
+			$type		= ($type != "") ? $type : "normal";
+			$funcmeth	= "Handler_message_$type";
+		}
+		elseif ($packet_type == "iq")
+		{
+			$namespace	= $packet['iq']['#']['query'][0]['@']['xmlns'];
+			$namespace	= str_replace(":", "_", $namespace);
+			$funcmeth	= "Handler_iq_$namespace";
+		}
+		elseif ($packet_type == "presence")
+		{
+			$type		= $packet['presence']['@']['type'];
+			$type		= ($type != "") ? $type : "available";
+			$funcmeth	= "Handler_presence_$type";
+		}
+
+
+		if ($funcmeth != '')
+		{
+			if (function_exists($funcmeth))
+			{
+				call_user_func($funcmeth, $packet);
+			}
+			elseif (method_exists($this, $funcmeth))
+			{
+				call_user_func(array(&$this, $funcmeth), $packet);
+			}
+			else
+			{
+				$this->Handler_NOT_IMPLEMENTED($packet);
+				$this->AddToLog("ERROR: CallHandler() #1 - neither method nor function $funcmeth() available");
+			}
+		}
+	}
+
+
+
+	function CruiseControl($seconds = -1)
+	{
+		$count = 0;
+
+		while ($count != $seconds)
+		{
+			$this->Listen();
+
+			do {
+				$packet = $this->GetFirstFromQueue();
+
+				if ($packet) {
+					$this->CallHandler($packet);
+				}
+
+			} while (count($this->packet_queue) > 1);
+
+			$count += 0.25;
+			usleep(250000);
+			
+			if ($this->last_ping_time + 180 < time())
+			{
+				// Modified by Nathan Fritz
+				if ($this->returned_keep_alive == FALSE)
+				{
+					$this->connected = FALSE;
+					$this->AddToLog('EVENT: Disconnected');
+				}
+				if ($this->returned_keep_alive == TRUE)
+				{
+					$this->connected = TRUE;
+				}
+
+				$this->returned_keep_alive = FALSE;
+				$this->keep_alive_id = 'keep_alive_' . time();
+				//$this->SendPacket("<iq id='{$this->keep_alive_id}'/>", 'CruiseControl');
+				$this->SendPacket("<iq type='get' from='" . $this->username . "@" . $this->server . "/" . $this->resource . "' to='" . $this->server . "' id='" . $this->keep_alive_id . "'><query xmlns='jabber:iq:time' /></iq>");
+				// **
+
+				$this->last_ping_time = time();
+			}
+		}
+
+		return TRUE;
+	}
+
+
+
+	function SubscriptionAcceptRequest($to = NULL)
+	{
+		return ($to) ? $this->SendPresence("subscribed", $to) : FALSE;
+	}
+
+
+
+	function SubscriptionDenyRequest($to = NULL)
+	{
+		return ($to) ? $this->SendPresence("unsubscribed", $to) : FALSE;
+	}
+
+
+
+	function Subscribe($to = NULL)
+	{
+		return ($to) ? $this->SendPresence("subscribe", $to) : FALSE;
+	}
+
+
+
+	function Unsubscribe($to = NULL)
+	{
+		return ($to) ? $this->SendPresence("unsubscribe", $to) : FALSE;
+	}
+
+
+
+	function SendIq($to = NULL, $type = 'get', $id = NULL, $xmlns = NULL, $payload = NULL, $from = NULL)
+	{
+		if (!preg_match("/^(get|set|result|error)$/", $type))
+		{
+			unset($type);
+
+			$this->AddToLog("ERROR: SendIq() #2 - type must be 'get', 'set', 'result' or 'error'");
+			return FALSE;
+		}
+		elseif ($id && $xmlns)
+		{
+			$xml = "<iq type='$type' id='$id'";
+			$xml .= ($to) ? " to='" . htmlspecialchars($to) . "'" : '';
+			$xml .= ($from) ? " from='$from'" : '';
+			$xml .= ">
+						<query xmlns='$xmlns'>
+							$payload
+						</query>
+					</iq>";
+
+			$this->SendPacket($xml);
+			sleep($this->iq_sleep_timer);
+			$this->Listen();
+
+			return (preg_match("/^(get|set)$/", $type)) ? $this->GetFromQueueById("iq", $id) : TRUE;
+		}
+		else
+		{
+			$this->AddToLog("ERROR: SendIq() #1 - to, id and xmlns are mandatory");
+			return FALSE;
+		}
+	}
+
+
+
+	// get the transport registration fields
+	// method written by Steve Blinch, http://www.blitzaffe.com 
+	function TransportRegistrationDetails($transport)
+	{
+		$this->txnid++;
+		$packet = $this->SendIq($transport, 'get', "reg_{$this->txnid}", "jabber:iq:register", NULL, $this->jid);
+
+		if ($packet)
+		{
+			$res = array();
+
+			foreach ($packet['iq']['#']['query'][0]['#'] as $element => $data)
+			{
+				if ($element != 'instructions' && $element != 'key')
+				{
+					$res[] = $element;
+				}
+			}
+
+			return $res;
+		}
+		else
+		{
+			return 3;
+		}
+	}
+	
+
+
+	// register with the transport
+	// method written by Steve Blinch, http://www.blitzaffe.com 
+	function TransportRegistration($transport, $details)
+	{
+		$this->txnid++;
+		$packet = $this->SendIq($transport, 'get', "reg_{$this->txnid}", "jabber:iq:register", NULL, $this->jid);
+
+		if ($packet)
+		{
+			$key = $this->GetInfoFromIqKey($packet);	// just in case a key was passed back from the server
+			unset($packet);
+		
+			$payload = ($key) ? "<key>$key</key>\n" : '';
+			foreach ($details as $element => $value)
+			{
+				$payload .= "<$element>$value</$element>\n";
+			}
+		
+			$packet = $this->SendIq($transport, 'set', "reg_{$this->txnid}", "jabber:iq:register", $payload);
+		
+			if ($this->GetInfoFromIqType($packet) == 'result')
+			{
+				if (isset($packet['iq']['#']['query'][0]['#']['registered'][0]['#']))
+				{
+					$return_code = 1;
+				}
+				else
+				{
+					$return_code = 2;
+				}
+			}
+			elseif ($this->GetInfoFromIqType($packet) == 'error')
+			{
+				if (isset($packet['iq']['#']['error'][0]['#']))
+				{
+					$return_code = "Error " . $packet['iq']['#']['error'][0]['@']['code'] . ": " . $packet['iq']['#']['error'][0]['#'];
+					$this->AddToLog('ERROR: TransportRegistration()');
+				}
+			}
+
+			return $return_code;
+		}
+		else
+		{
+			return 3;
+		}
+	}
+
+
+
+	function GetvCard($jid = NULL, $id = NULL)
+	{
+		if (!$id)
+		{
+			$id = "vCard_" . md5(time() . $_SERVER['REMOTE_ADDR']);
+		}
+
+		if ($jid)
+		{
+			$xml = "<iq type='get' to='$jid' id='$id'>
+						<vCard xmlns='vcard-temp'/>
+					</iq>";
+
+			$this->SendPacket($xml);
+			sleep($this->iq_sleep_timer);
+			$this->Listen();
+
+			return $this->GetFromQueueById("iq", $id);
+		}
+		else
+		{
+			$this->AddToLog("ERROR: GetvCard() #1 - to and id are mandatory");
+			return FALSE;
+		}
+	}
+
+
+
+	function PrintLog()
+	{
+		if ($this->enable_logging)
+		{
+			if ($this->log_filehandler)
+			{
+				echo "<h2>Logging enabled, logged events have been written to the file {$this->log_filename}.</h2>\n";
+			}
+			else
+			{
+				echo "<h2>Logging enabled, logged events below:</h2>\n";
+				echo "<pre>\n";
+				echo (count($this->log_array) > 0) ? implode("\n\n\n", $this->log_array) : "No logged events.";
+				echo "</pre>\n";
+			}
+		}
+	}
+
+
+
+	// ======================================================================
+	// private methods
+	// ======================================================================
+
+
+
+	function _sendauth_0k($zerok_token, $zerok_sequence)
+	{
+		// initial hash of password
+		$zerok_hash = mhash(MHASH_SHA1, $this->password);
+		$zerok_hash = bin2hex($zerok_hash);
+
+		// sequence 0: hash of hashed-password and token
+		$zerok_hash = mhash(MHASH_SHA1, $zerok_hash . $zerok_token);
+		$zerok_hash = bin2hex($zerok_hash);
+
+		// repeat as often as needed
+		for ($a = 0; $a < $zerok_sequence; $a++)
+		{
+			$zerok_hash = mhash(MHASH_SHA1, $zerok_hash);
+			$zerok_hash = bin2hex($zerok_hash);
+		}
+
+		$payload = "<username>{$this->username}</username>
+					<hash>$zerok_hash</hash>
+					<resource>{$this->resource}</resource>";
+
+		$packet = $this->SendIq(NULL, 'set', $this->auth_id, "jabber:iq:auth", $payload);
+
+		// was a result returned?
+		if ($this->GetInfoFromIqType($packet) == 'result' && $this->GetInfoFromIqId($packet) == $this->auth_id)
+		{
+			return TRUE;
+		}
+		else
+		{
+			$this->AddToLog("ERROR: _sendauth_0k() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function _sendauth_digest()
+	{
+		$payload = "<username>{$this->username}</username>
+					<resource>{$this->resource}</resource>
+					<digest>" . bin2hex(mhash(MHASH_SHA1, $this->stream_id . $this->password)) . "</digest>";
+
+		$packet = $this->SendIq(NULL, 'set', $this->auth_id, "jabber:iq:auth", $payload);
+
+		// was a result returned?
+		if ($this->GetInfoFromIqType($packet) == 'result' && $this->GetInfoFromIqId($packet) == $this->auth_id)
+		{
+			return TRUE;
+		}
+		else
+		{
+			$this->AddToLog("ERROR: _sendauth_digest() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function _sendauth_plaintext()
+	{
+		$payload = "<username>{$this->username}</username>
+					<password>{$this->password}</password>
+					<resource>{$this->resource}</resource>";
+
+		$packet = $this->SendIq(NULL, 'set', $this->auth_id, "jabber:iq:auth", $payload);
+
+		// was a result returned?
+		if ($this->GetInfoFromIqType($packet) == 'result' && $this->GetInfoFromIqId($packet) == $this->auth_id)
+		{
+			return TRUE;
+		}
+		else
+		{
+			$this->AddToLog("ERROR: _sendauth_plaintext() #1");
+			return FALSE;
+		}
+	}
+
+
+
+	function _listen_incoming()
+	{
+		unset($incoming);
+
+		while ($line = $this->CONNECTOR->ReadFromSocket(4096))
+		{
+			$incoming .= $line;
+		}
+
+		$incoming = trim($incoming);
+
+		if ($incoming != "")
+		{
+			$this->AddToLog("RECV: $incoming");
+		}
+
+		return $this->xmlize($incoming);
+	}
+
+
+
+	function _check_connected()
+	{
+		$incoming_array = $this->_listen_incoming();
+
+		if (is_array($incoming_array))
+		{
+			if ($incoming_array["stream:stream"]['@']['from'] == $this->server
+				&& $incoming_array["stream:stream"]['@']['xmlns'] == "jabber:client"
+				&& $incoming_array["stream:stream"]['@']["xmlns:stream"] == "http://etherx.jabber.org/streams")
+			{
+				$this->stream_id = $incoming_array["stream:stream"]['@']['id'];
+
+				if ($incoming_array["stream:stream"]["#"]["stream:features"][0]["#"]["starttls"][0]["@"]["xmlns"] == "urn:ietf:params:xml:ns:xmpp-tls")
+				{
+					return $this->_starttls();
+				}
+				else
+				{
+					return TRUE;
+				}
+			}
+			else
+			{
+				$this->AddToLog("ERROR: _check_connected() #1");
+				return FALSE;
+			}
+		}
+		else
+		{
+			$this->AddToLog("ERROR: _check_connected() #2");
+			return FALSE;
+		}
+	}
+
+
+
+	function _starttls()
+	{ 
+		if (!function_exists("stream_socket_enable_crypto"))
+		{
+			$this->AddToLog("WARNING: TLS is not available");
+			return TRUE;
+		}
+
+		$this->SendPacket("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>\n");
+		sleep(1);
+		$incoming_array = $this->_listen_incoming();
+
+		if (!is_array($incoming_array))
+		{
+			$this->AddToLog("ERROR: _starttls() #1");
+			return FALSE;
+		}
+
+		if ($incoming_array["proceed"]["@"]["xmlns"] != "urn:ietf:params:xml:ns:xmpp-tls")
+		{
+			$this->AddToLog("ERROR: _starttls() #2");
+			return FALSE;
+		}
+
+		$meta = stream_get_meta_data($this->CONNECTOR->active_socket);
+		socket_set_blocking($this->CONNECTOR->active_socket, 1);
+		//if (!stream_socket_enable_crypto($this->CONNECTOR->active_socket, TRUE, STREAM_CRYPTO_METHOD_SSLv23_CLIENT))
+		if (!stream_socket_enable_crypto($this->CONNECTOR->active_socket, TRUE, STREAM_CRYPTO_METHOD_TLS_CLIENT))
+		{
+			socket_set_blocking($this->CONNECTOR->active_socket, $meta["blocked"]);
+			$this->AddToLog("ERROR: _starttls() #3");
+			return FALSE;
+		}
+		socket_set_blocking($this->CONNECTOR->active_socket, $meta["blocked"]);
+
+		$this->SendPacket("<?xml version='1.0' encoding='UTF-8' ?" . ">\n");
+		$this->SendPacket("<stream:stream to='{$this->server}' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'>\n");
+		sleep(1);
+
+		if (!$this->_check_connected())
+		{
+			$this->AddToLog("ERROR: _starttls() #4");
+			return FALSE;
+		}
+
+		return TRUE;
+	}
+
+
+
+	function _get_packet_type($packet = NULL)
+	{
+		if (is_array($packet))
+		{
+			reset($packet);
+			$packet_type = key($packet);
+		}
+
+		return ($packet_type) ? $packet_type : FALSE;
+	}
+
+
+
+	function _split_incoming($incoming)
+	{
+		$temp = preg_split("/<(message|iq|presence|stream)/", $incoming, -1, PREG_SPLIT_DELIM_CAPTURE);
+		$array = array();
+
+		for ($a = 1; $a < count($temp); $a = $a + 2)
+		{
+			$array[] = "<" . $temp[$a] . $temp[($a + 1)];
+		}
+
+		return $array;
+	}
+
+
+
+	function _create_logfile()
+	{
+		if ($this->log_filename != '' && $this->enable_logging)
+		{
+			$this->log_filehandler = fopen($this->log_filename, 'w');
+		}
+	}
+
+
+
+	function AddToLog($string)
+	{
+		if ($this->enable_logging)
+		{
+			if ($this->log_filehandler)
+			{
+				#fwrite($this->log_filehandler, $string . "\n\n");
+				print "$string \n\n";
+			}
+			else
+			{
+				$this->log_array[] = htmlspecialchars($string);
+			}
+		}
+	}
+
+
+
+	function _close_logfile()
+	{
+		if ($this->log_filehandler)
+		{
+			fclose($this->log_filehandler);
+		}
+	}
+
+
+
+	// _array_htmlspecialchars()
+	// applies htmlspecialchars() to all values in an array
+
+	function _array_htmlspecialchars($array)
+	{
+		if (is_array($array))
+		{
+			foreach ($array as $k => $v)
+			{
+				if (is_array($v))
+				{
+					$v = $this->_array_htmlspecialchars($v);
+				}
+				else
+				{
+					$v = htmlspecialchars($v);
+				}
+			}
+		}
+
+		return $array;
+	}
+
+
+
+	// ======================================================================
+	// <message/> parsers
+	// ======================================================================
+
+
+
+	function GetInfoFromMessageFrom($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['@']['from'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageType($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['@']['type'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageId($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['@']['id'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageThread($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['#']['thread'][0]['#'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageSubject($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['#']['subject'][0]['#'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageBody($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['#']['body'][0]['#'] : FALSE;
+	}
+
+	function GetInfoFromMessageXMLNS($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['message']['#']['x'] : FALSE;
+	}
+
+
+
+	function GetInfoFromMessageError($packet = NULL)
+	{
+		$error = preg_replace("/^\/$/", "", ($packet['message']['#']['error'][0]['@']['code'] . "/" . $packet['message']['#']['error'][0]['#']));
+		return (is_array($packet)) ? $error : FALSE;
+	}
+
+
+
+	// ======================================================================
+	// <iq/> parsers
+	// ======================================================================
+
+
+
+	function GetInfoFromIqFrom($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['iq']['@']['from'] : FALSE;
+	}
+
+
+
+	function GetInfoFromIqType($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['iq']['@']['type'] : FALSE;
+	}
+
+
+
+	function GetInfoFromIqId($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['iq']['@']['id'] : FALSE;
+	}
+
+
+
+	function GetInfoFromIqKey($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['iq']['#']['query'][0]['#']['key'][0]['#'] : FALSE;
+	}
+
+
+
+	function GetInfoFromIqError($packet = NULL)
+	{
+		$error = preg_replace("/^\/$/", "", ($packet['iq']['#']['error'][0]['@']['code'] . "/" . $packet['iq']['#']['error'][0]['#']));
+		return (is_array($packet)) ? $error : FALSE;
+	}
+
+
+
+	// ======================================================================
+	// <presence/> parsers
+	// ======================================================================
+
+
+
+	function GetInfoFromPresenceFrom($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['presence']['@']['from'] : FALSE;
+	}
+
+
+
+	function GetInfoFromPresenceType($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['presence']['@']['type'] : FALSE;
+	}
+
+
+
+	function GetInfoFromPresenceStatus($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['presence']['#']['status'][0]['#'] : FALSE;
+	}
+
+
+
+	function GetInfoFromPresenceShow($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['presence']['#']['show'][0]['#'] : FALSE;
+	}
+
+
+
+	function GetInfoFromPresencePriority($packet = NULL)
+	{
+		return (is_array($packet)) ? $packet['presence']['#']['priority'][0]['#'] : FALSE;
+	}
+
+
+
+	// ======================================================================
+	// <message/> handlers
+	// ======================================================================
+
+
+
+	function Handler_message_normal($packet)
+	{
+		$from = $packet['message']['@']['from'];
+		$this->AddToLog("EVENT: Message (type normal) from $from");
+	}
+
+
+
+	function Handler_message_chat($packet)
+	{
+		$from = $packet['message']['@']['from'];
+		$this->AddToLog("EVENT: Message (type chat) from $from");
+	}
+
+
+
+	function Handler_message_groupchat($packet)
+	{
+		$from = $packet['message']['@']['from'];
+		$this->AddToLog("EVENT: Message (type groupchat) from $from");
+	}
+
+
+
+	function Handler_message_headline($packet)
+	{
+		$from = $packet['message']['@']['from'];
+		$this->AddToLog("EVENT: Message (type headline) from $from");
+	}
+
+
+
+	function Handler_message_error($packet)
+	{
+		$from = $packet['message']['@']['from'];
+		$this->AddToLog("EVENT: Message (type error) from $from");
+	}
+
+
+
+	// ======================================================================
+	// <iq/> handlers
+	// ======================================================================
+
+
+
+	// application version updates
+	function Handler_iq_jabber_iq_autoupdate($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:autoupdate from $from");
+	}
+
+
+
+	// interactive server component properties
+	function Handler_iq_jabber_iq_agent($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:agent from $from");
+	}
+
+
+
+	// method to query interactive server components
+	function Handler_iq_jabber_iq_agents($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:agents from $from");
+	}
+
+
+
+	// simple client authentication
+	function Handler_iq_jabber_iq_auth($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:auth from $from");
+	}
+
+
+
+	// out of band data
+	function Handler_iq_jabber_iq_oob($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:oob from $from");
+	}
+
+
+
+	// method to store private data on the server
+	function Handler_iq_jabber_iq_private($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:private from $from");
+	}
+
+
+
+	// method for interactive registration
+	function Handler_iq_jabber_iq_register($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:register from $from");
+	}
+
+
+
+	// client roster management
+	function Handler_iq_jabber_iq_roster($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:roster from $from");
+	}
+
+
+
+	// method for searching a user database
+	function Handler_iq_jabber_iq_search($packet)
+	{
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: jabber:iq:search from $from");
+	}
+
+
+
+	// method for requesting the current time
+	function Handler_iq_jabber_iq_time($packet)
+	{
+		if ($this->keep_alive_id == $this->GetInfoFromIqId($packet))
+		{
+			$this->returned_keep_alive = TRUE;
+			$this->connected = TRUE;
+			$this->AddToLog('EVENT: Keep-Alive returned, connection alive.');
+		}
+		$type	= $this->GetInfoFromIqType($packet);
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+		$id		= ($id != "") ? $id : "time_" . time();
+
+		if ($type == 'get')
+		{
+			$payload = "<utc>" . gmdate("Ydm\TH:i:s") . "</utc>
+						<tz>" . date("T") . "</tz>
+						<display>" . date("Y/d/m h:i:s A") . "</display>";
+
+			$this->SendIq($from, 'result', $id, "jabber:iq:time", $payload);
+		}
+
+		$this->AddToLog("EVENT: jabber:iq:time (type $type) from $from");
+	}
+
+
+
+	// method for requesting version
+	function Handler_iq_jabber_iq_version($packet)
+	{
+		$type	= $this->GetInfoFromIqType($packet);
+		$from	= $this->GetInfoFromIqFrom($packet);
+		$id		= $this->GetInfoFromIqId($packet);
+		$id		= ($id != "") ? $id : "version_" . time();
+
+		if ($type == 'get')
+		{
+			$payload = "<name>{$this->iq_version_name}</name>
+						<os>{$this->iq_version_os}</os>
+						<version>{$this->iq_version_version}</version>";
+
+			#$this->SendIq($from, 'result', $id, "jabber:iq:version", $payload);
+		}
+
+		$this->AddToLog("EVENT: jabber:iq:version (type $type) from $from -- DISABLED");
+	}
+
+
+
+	// keepalive method, added by Nathan Fritz
+	/*
+	function Handler_jabber_iq_time($packet)
+	{
+		if ($this->keep_alive_id == $this->GetInfoFromIqId($packet))
+		{
+			$this->returned_keep_alive = TRUE;
+			$this->connected = TRUE;
+			$this->AddToLog('EVENT: Keep-Alive returned, connection alive.');
+		}
+	}
+	*/
+	
+	
+	// ======================================================================
+	// <presence/> handlers
+	// ======================================================================
+
+
+
+	function Handler_presence_available($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+
+		$show_status = $this->GetInfoFromPresenceStatus($packet) . " / " . $this->GetInfoFromPresenceShow($packet);
+		$show_status = ($show_status != " / ") ? " ($addendum)" : '';
+
+		$this->AddToLog("EVENT: Presence (type: available) - $from is available $show_status");
+	}
+
+
+
+	function Handler_presence_unavailable($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+
+		$show_status = $this->GetInfoFromPresenceStatus($packet) . " / " . $this->GetInfoFromPresenceShow($packet);
+		$show_status = ($show_status != " / ") ? " ($addendum)" : '';
+
+		$this->AddToLog("EVENT: Presence (type: unavailable) - $from is unavailable $show_status");
+	}
+
+
+
+	function Handler_presence_subscribe($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+		$this->SubscriptionAcceptRequest($from);
+		$this->RosterUpdate();
+
+		$this->log_array[] = "<b>Presence:</b> (type: subscribe) - Subscription request from $from, was added to \$this->subscription_queue, roster updated";
+	}
+
+
+
+	function Handler_presence_subscribed($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+		$this->RosterUpdate();
+
+		$this->AddToLog("EVENT: Presence (type: subscribed) - Subscription allowed by $from, roster updated");
+	}
+
+
+
+	function Handler_presence_unsubscribe($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+		$this->SendPresence("unsubscribed", $from);
+		$this->RosterUpdate();
+
+		$this->AddToLog("EVENT: Presence (type: unsubscribe) - Request to unsubscribe from $from, was automatically approved, roster updated");
+	}
+
+
+
+	function Handler_presence_unsubscribed($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+		$this->RosterUpdate();
+
+		$this->AddToLog("EVENT: Presence (type: unsubscribed) - Unsubscribed from $from's presence");
+	}
+
+
+
+	// Added By Nathan Fritz
+	function Handler_presence_error($packet)
+	{
+		$from = $this->GetInfoFromPresenceFrom($packet);
+		$this->AddToLog("EVENT: Presence (type: error) - Error in $from's presence");
+	}
+	
+	
+	
+	// ======================================================================
+	// Generic handlers
+	// ======================================================================
+
+
+
+	// Generic handler for unsupported requests
+	function Handler_NOT_IMPLEMENTED($packet)
+	{
+		$packet_type	= $this->_get_packet_type($packet);
+		$from			= call_user_func(array(&$this, "GetInfoFrom" . ucfirst($packet_type) . "From"), $packet);
+		$id				= call_user_func(array(&$this, "GetInfoFrom" . ucfirst($packet_type) . "Id"), $packet);
+
+		$this->SendError($from, $id, 501);
+		$this->AddToLog("EVENT: Unrecognized <$packet_type/> from $from");
+	}
+
+
+
+	// ======================================================================
+	// Third party code
+	// m@d pr0ps to the coders ;)
+	// ======================================================================
+
+
+
+	// xmlize()
+	// (c) Hans Anderson / http://www.hansanderson.com/php/xml/
+
+	function xmlize($data, $WHITE=1, $encoding='UTF-8') {
+
+		$data = trim($data);
+		$vals = $index = $array = array();
+		$parser = xml_parser_create($encoding);
+		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+		xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, $WHITE);
+		xml_parse_into_struct($parser, $data, $vals, $index);
+		xml_parser_free($parser);
+
+		$i = 0;
+
+		$tagname = $vals[$i]['tag'];
+		if ( isset ($vals[$i]['attributes'] ) )
+		{
+			$array[$tagname]['@'] = $vals[$i]['attributes'];
+		} else {
+			$array[$tagname]['@'] = array();
+		}
+
+		$array[$tagname]["#"] = $this->_xml_depth($vals, $i);
+
+
+		return $array;
+	}
+
+
+
+	// _xml_depth()
+	// (c) Hans Anderson / http://www.hansanderson.com/php/xml/
+
+	function _xml_depth($vals, &$i) {
+		$children = array();
+
+		if ( isset($vals[$i]['value']) )
+		{
+			array_push($children, $vals[$i]['value']);
+		}
+
+		while (++$i < count($vals)) {
+
+			switch ($vals[$i]['type']) {
+
+				case 'open':
+
+					if ( isset ( $vals[$i]['tag'] ) )
+					{
+						$tagname = $vals[$i]['tag'];
+					} else {
+						$tagname = '';
+					}
+
+					if ( isset ( $children[$tagname] ) )
+					{
+						$size = sizeof($children[$tagname]);
+					} else {
+						$size = 0;
+					}
+
+					if ( isset ( $vals[$i]['attributes'] ) ) {
+						$children[$tagname][$size]['@'] = $vals[$i]["attributes"];
+
+					}
+
+					$children[$tagname][$size]['#'] = $this->_xml_depth($vals, $i);
+
+					break;
+
+
+				case 'cdata':
+					array_push($children, $vals[$i]['value']);
+					break;
+
+				case 'complete':
+					$tagname = $vals[$i]['tag'];
+
+					if( isset ($children[$tagname]) )
+					{
+						$size = sizeof($children[$tagname]);
+					} else {
+						$size = 0;
+					}
+
+					if( isset ( $vals[$i]['value'] ) )
+					{
+						$children[$tagname][$size]["#"] = $vals[$i]['value'];
+					} else {
+						$children[$tagname][$size]["#"] = array();
+					}
+
+					if ( isset ($vals[$i]['attributes']) ) {
+						$children[$tagname][$size]['@']
+						= $vals[$i]['attributes'];
+					}
+
+					break;
+
+				case 'close':
+					return $children;
+					break;
+			}
+
+		}
+
+		return $children;
+
+
+	}
+
+
+
+	// TraverseXMLize()
+	// (c) acebone@f2s.com, a HUGE help!
+
+	function TraverseXMLize($array, $arrName = "array", $level = 0) {
+
+		if ($level == 0)
+		{
+			echo "<pre>";
+		}
+
+		foreach($array as $key=>$val)
+		{
+			if ( is_array($val) )
+			{
+				$this->TraverseXMLize($val, $arrName . "[" . $key . "]", $level + 1);
+			} else {
+				$GLOBALS['traverse_array'][] = '$' . $arrName . '[' . $key . '] = "' . $val . "\"\n";
+			}
+		}
+
+		if ($level == 0)
+		{
+			echo "</pre>";
+		}
+
+		return 1;
+
+	}
+}
+
+
+
+class MakeXML extends Jabber
+{
+	var $nodes;
+
+
+	function MakeXML()
+	{
+		$nodes = array();
+	}
+
+	function AddPacketDetails($string, $value = NULL)
+	{
+		if (preg_match("/\(([0-9]*)\)$/i", $string))
+		{
+			$string .= "/[\"#\"]";
+		}
+
+		$temp = @explode("/", $string);
+
+		for ($a = 0; $a < count($temp); $a++)
+		{
+			$temp[$a] = preg_replace("/^[@]{1}([a-z0-9_]*)$/i", "[\"@\"][\"\\1\"]", $temp[$a]);
+			$temp[$a] = preg_replace("/^([a-z0-9_]*)\(([0-9]*)\)$/i", "[\"\\1\"][\\2]", $temp[$a]);
+			$temp[$a] = preg_replace("/^([a-z0-9_]*)$/i", "[\"\\1\"]", $temp[$a]);
+		}
+
+		$node = implode("", $temp);
+
+		// Yeahyeahyeah, I know it's ugly... get over it. ;)
+		echo "\$this->nodes$node = \"" . htmlspecialchars($value) . "\";<br/>";
+		eval("\$this->nodes$node = \"" . htmlspecialchars($value) . "\";");
+	}
+
+	function BuildPacket($array = NULL)
+	{
+
+		if (!$array)
+		{
+			$array = $this->nodes;
+		}
+
+		if (is_array($array))
+		{
+			array_multisort($array, SORT_ASC, SORT_STRING);
+
+			foreach ($array as $key => $value)
+			{
+				if (is_array($value) && $key == "@")
+				{
+					foreach ($value as $subkey => $subvalue)
+					{
+						$subvalue = htmlspecialchars($subvalue);
+						$text .= " $subkey='$subvalue'";
+					}
+
+					$text .= ">\n";
+
+				}
+				elseif ($key == "#")
+				{
+					$text .= htmlspecialchars($value);
+				}
+				elseif (is_array($value))
+				{
+					for ($a = 0; $a < count($value); $a++)
+					{
+						$text .= "<$key";
+
+						if (!$this->_preg_grep_keys("/^@/", $value[$a]))
+						{
+							$text .= ">";
+						}
+
+						$text .= $this->BuildPacket($value[$a]);
+
+						$text .= "</$key>\n";
+					}
+				}
+				else
+				{
+					$value = htmlspecialchars($value);
+					$text .= "<$key>$value</$key>\n";
+				}
+			}
+
+			return $text;
+		}
+	}
+
+
+
+	function _preg_grep_keys($pattern, $array)
+	{
+		while (list($key, $val) = each($array))
+		{
+			if (preg_match($pattern, $key))
+			{
+				$newarray[$key] = $val;
+			}
+		}
+		return (is_array($newarray)) ? $newarray : FALSE;
+	}
+}
+
+
+
+class CJP_StandardConnector
+{
+	var $active_socket;
+
+	function OpenSocket($server, $port)
+	{
+		if (function_exists("dns_get_record"))
+		{
+			$record = dns_get_record("_xmpp-client._tcp.$server", DNS_SRV);
+			if (!empty($record))
+			{
+				$server = $record[0]["target"];
+				$port = $record[0]["port"];
+			}
+		}
+
+		if ($this->active_socket = fsockopen($server, $port))
+		{
+			socket_set_blocking($this->active_socket, 0);
+			socket_set_timeout($this->active_socket, 31536000);
+
+			return TRUE;
+		}
+		else
+		{
+			return FALSE;
+		}
+	}
+
+
+
+	function CloseSocket()
+	{
+		return fclose($this->active_socket);
+	}
+
+
+
+	function WriteToSocket($data)
+	{
+		return fwrite($this->active_socket, $data);
+	}
+
+
+
+	function ReadFromSocket($chunksize)
+	{
+		set_magic_quotes_runtime(0);
+		$buffer = fread($this->active_socket, $chunksize);
+		set_magic_quotes_runtime(get_magic_quotes_gpc());
+
+		return $buffer;
+	}
+}
+
+
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uienabledgroups.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uienabledgroups.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uienabledgroups.inc.php	(revision 697)
@@ -0,0 +1,168 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+  
+require_once "class.boenabledgroups.inc.php";
+
+class uienabledgroups
+{
+	private $bo;
+	
+	public $public_functions = array(
+		'backPage'  => True,
+		'editGroups' => True,
+		'getGroups' => True,
+	);
+	
+	function __construct()
+	{
+		$this->bo = new boenabledgroups();
+	}
+	
+	public final function backPage()
+	{
+		echo "<pre>";
+		print_r($_POST);
+		echo "</pre>";
+	}	
+
+	public final function editGroups()
+	{
+		if($_GET['menuaction'])
+		{
+			if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+			{
+				$GLOBALS['phpgw']->redirect_link('/index.php');
+			}		
+			
+			$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Liberar Organizações para grupos restritos';
+	
+			$GLOBALS['phpgw']->common->phpgw_header();
+			echo parse_navbar();
+	
+			$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+			$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+	
+			if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1))
+				$webserver_url .= '/';
+	
+			// Load Language;
+			require_once "load_lang.php";
+			
+			// Load Ldap;
+			require_once "class.ldap_im.inc.php";
+			
+			$ldap = new ldap_im();
+			
+			$ous = "<option value='-1'>-- ".lang('Select Organization')." --</option>";	
+			if( ($LdapOus = $ldap->listOrganizationsLdap()) )
+			{
+				foreach($LdapOus as $tmp )
+					$ous .= "<option value='".$tmp."'>".$tmp."</option>";
+			}
+
+			$group = unserialize($_GET['groups']);
+			$valueGroupsOrganizations = "";
+			
+			if( $group[2] )
+			{
+				$ou_groups = explode(",",$group[2]);
+			
+				natcasesort($ou_groups);
+			
+				foreach($ou_groups as $tmp)
+				{
+					$valueGroupsOrganizations .= "<tr id='".$tmp."'>";
+					$valueGroupsOrganizations .= "<td align='left' class='row_on'>".$tmp."</td>";
+					$valueGroupsOrganizations .= "<td align='left' class='row_on' style='width:30% !important'><a href='javascript:constructScript.removeOrgGroupsLocked(\"".$tmp."\");'>Excluir</a></td>";					
+					$valueGroupsOrganizations .= "</tr>";
+				}
+			}
+			
+			
+			$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'confGroupsLocked.tpl'));
+			$GLOBALS['phpgw']->template->set_block('jabberit_messenger','confGroups');	
+			$var = array(
+							'action_url' => "./index.php?menuaction=jabberit_messenger.uienabledgroups.getGroups",
+							'lang_Back' => "Voltar",	
+							'lang_Cadastrar_Organizacao' => "Cadastrar Organização",	
+							'lang_Delete' => "Excluir",							
+							'lang_Informe_as_Organizacoes' => "Informe as Organizações",
+							'lang_Nome_Grupo' => "Nome do Grupo",
+							'lang_Organizacoes_cadastradas_para_grupo' => "Organizações cadastradas para o grupo",	
+							'lang_Organization' => "Organização",
+							'lang_save' => "Salvar",
+							'value_Groups_Organizations' => $valueGroupsOrganizations,	
+							'value_organizations_ldap' => $ous,							
+							'value_Name_Group' => $group[0],
+							'value_gidNumber' => $group[1],
+						);	
+			$GLOBALS['phpgw']->template->set_var($var);
+			$GLOBALS['phpgw']->template->pparse('out','confGroups');
+		}
+	}
+
+	public final function getGroups()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Liberar Organizações para grupos restritos';
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+
+		if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1))
+			$webserver_url .= '/';
+
+		echo '<script type="text/javascript">var path_jabberit="'.$webserver_url .'"</script>';
+
+		// Load Language;
+		require_once "load_lang.php";
+
+		$groups_locked_jabberit = $this->bo->getGroupsBlocked();
+
+		if(trim($groups_locked_jabberit))
+		{
+			$glocked = explode(';',$GLOBALS['phpgw_info']['server']['groups_locked_jabberit']);
+			$list_groups = "";
+
+			natcasesort($glocked);
+						
+			foreach( $glocked as $tmp )
+			{
+				$groups = explode(":",$tmp);
+				$list_groups .= "<tr class='row_off'>";
+				$list_groups .= "<td width='30%'>".$groups[0]."</td>";
+				$list_groups .= "<td width='55%'>".$groups[2]."</td>";
+				$list_groups .= "<td width='5%' align='center'><a href='./index.php?menuaction=jabberit_messenger.uienabledgroups.editGroups&groups=".serialize($groups)."'>Editar</a></td>";
+				$list_groups .= "</tr>";
+			}
+		}
+
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'enabled_ou_groups.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','enabled_ous');	
+		$var = array(
+						'action_url' => './admin',						
+						'lang_back' => lang("Back"),
+						'list_groups' => (trim($list_groups) != "") ? $list_groups : "",
+					);	
+		$GLOBALS['phpgw']->template->set_var($var);
+		$GLOBALS['phpgw']->template->pparse('out','enabled_ous');
+	}
+}
+
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.FileDefine.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.FileDefine.inc.php	(revision 551)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.FileDefine.inc.php	(revision 551)
@@ -0,0 +1,71 @@
+<?php
+ /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+class FileDefine
+{
+
+	public final function getParams($pParam)
+	{
+		$array_values = explode("\n", $pParam['val']);	
+		$infoServer = array();
+
+		foreach($array_values as $tmp )
+		{
+			$nvalue = explode(";", $tmp);
+			
+			switch(trim($nvalue[0]))
+			{
+				case "JETTI_SERVER_LDAP_JABBERIT" :
+							$infoServer['host'] = $nvalue[1];							
+							break;			
+			
+				case "JETTI_CONTEXT_LDAP_JABBERIT" :	
+							$infoServer['context'] = $nvalue[1];
+							break;
+			
+				case "JETTI_USER_LDAP_JABBERIT" :
+							$infoServer['dn'] = $nvalue[1];
+							break;
+			
+				case "JETTI_PASSWORD_LDAP_JABBERIT" :
+							$infoServer['passwd'] = $nvalue[1];				
+							break;
+			}
+		}
+		
+		$this->writeFile($infoServer);
+	}
+
+	private final function writeFile($pContent)
+    {
+ 	
+		$filename = dirname(__FILE__).'/conf_Ldap_Photos.php';
+		$caracter = "$";
+		$content = "<?php ".$caracter."CONF_SERVER="."\"" . base64_encode(serialize($pContent)) ."\""." ?>";
+
+		if (!$handle = fopen($filename, 'w'))
+		{
+			echo "Não foi possível abrir o arquivo : \n($filename)";
+			exit;
+		}
+		
+		if (fwrite($handle, $content) === FALSE)
+		{
+			echo "Não foi possível escrever no arquivo : \n($filename)";
+			exit;
+		}
+		
+		echo "Arquivo : \n $filename \ncriado com sucesso !!";
+		fclose($handle);
+    }
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/login.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/login.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/login.php	(revision 697)
@@ -0,0 +1,115 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+	define('PHPGW_API_INC','../../phpgwapi/inc');
+	require_once(PHPGW_API_INC . '/class.Template.inc.php');
+	require_once('class.db_im.inc.php');
+
+	if(isset($_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']))
+    {
+		// Path Server
+		$path = $_SESSION['phpgw_info']['jabberit_messenger']['webserver_url'];
+		$SERVER_EXPRESSO = $_SERVER['HTTP_HOST'] . $path;
+
+		/** 
+		 ******  Type Protocol http / https **********************************************************
+		 *	Esta variável é carregada no header.inc.php, onde é possível definir
+		 * 	se será com http ou https. Verifique em seu arquivo header.inc.php como está configurada
+		 *	a variável $GLOBALS['phpgw_info']['server']['use_https']. 
+		 *	Abaixo segue esquema :
+		 *	Expresso 0 = Sem https
+		 *	Expresso 1 = Com https apenas no login
+		 * 	Expresso 2 = Completo
+		 *********************************************************************************************
+		 **/
+
+		$PROTOCOL = trim("http");
+		if( $_SESSION['phpgw_info']['jabberit_messenger']['use_https'] === 2 )
+			$PROTOCOL = trim("https");
+
+		// Uid user
+		$uid = $_SESSION['phpgw_info']['jabberit_messenger']['user'];
+		
+		$organization = explode(",", $_SESSION['phpgw_info']['jabberit_messenger']['attributes_org_ldap_jabberit']);
+
+		$organization_user = $_SESSION['phpgw_info']['jabberit_messenger']['account_dn'];
+		$organization_user = substr($organization_user, strpos($organization_user,"ou=") + 3 , strlen($organization_user));
+		$organization_user = substr($organization_user, 0, strpos($organization_user, ","));
+		
+		// FirstName
+		$CnName = explode(" ",$_SESSION['phpgw_info']['jabberit_messenger']['fullname']);
+		
+		// Preferences
+		$obj = new db_im();
+		$preferences = $obj->getPreferences();
+		$preferences = substr($preferences,(strpos($preferences,";") + 1), strlen($preferences));
+		$preferences = explode(":", $preferences);
+		
+		if(is_array($organization))
+		{
+			foreach($organization as $attr)
+			{
+				$tmp = explode(";",$attr);
+				if( strtolower(trim($tmp[0])) == strtolower(trim($organization_user)))
+				{
+					switch(strtolower(trim($tmp[1])))
+					{
+						case "mail" :
+								$uid = $_SESSION['phpgw_info']['jabberit_messenger']['mail'];
+								$uid = substr($uid,0,strpos($uid,"@"));	
+								break;
+	
+						case "description" :
+								// SERPRO
+								// parte antes do arroba;
+								// Informe aqui a parte da sessão correspondente; 
+								$uid = "description"; 										
+								break;
+					}
+				}
+			}
+		}
+
+		// Enable Plugins Java;
+		$pluginsJava[] = $path . "applet.jar?" . filemtime("applet.jar");
+		$pluginsJava[] = $path . "plugins/filetransfer.jar?" . filemtime("plugins/filetransfer.jar");
+		$pluginsJava[] = $path . "plugins/xhtml.jar?" . filemtime("plugins/xhtml.jar");
+		
+		for($i = 0; $i < count($pluginsJava); $i++)
+			$javaFiles .= $pluginsJava[$i] . ",";
+
+		// Load Template;
+		$template = new Template('templates/default');
+		$template->set_var("path", $path);
+		$template->set_var("java_files", $javaFiles);
+		$template->set_var("value_server",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']);
+		$template->set_var("value_host",$_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']);			
+		$template->set_var("value_port",$_SESSION['phpgw_info']['jabberit_messenger']['port_jabberit']);
+		$template->set_var("value_resource",$_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit']);
+		$template->set_var("value_user",$uid);
+		$template->set_var("value_password",$_SESSION['phpgw_info']['jabberit_messenger']['passwd']);
+		$template->set_var("value_ssl",$_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit']);
+		$template->set_var("value_hideloginstatus","TRUE");
+		$template->set_var("value_userproxy",$_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java']);
+		$template->set_var("value_expresso",$SERVER_EXPRESSO);
+		$template->set_var("value_use_https", $PROTOCOL);
+		$template->set_var("value_company", $_SESSION['phpgw_info']['jabberit_messenger']['name_company']);
+		$template->set_var("value_cnname",$CnName[0]);
+		$template->set_var("value_preference_userOfflineJabberit", strtoupper($preferences[1]));
+		if( strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") )
+			$template->set_file(Array('jabberit_messenger' => 'jabberIM_IE.tpl'));
+		else
+			$template->set_file(Array('jabberit_messenger' => 'jabberIM.tpl'));
+		$template->set_block('jabberit_messenger','index');
+		$template->pfp('out','index');
+    }
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_acl.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_acl.inc.php	(revision 697)
@@ -0,0 +1,97 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+$size_of_acl = sizeof($GLOBALS['phpgw_info']['user']['acl']);
+
+for( $i = 0; $i < $size_of_acl && $GLOBALS['phpgw_info']['user']['acl'] != "jabberit_messenger"; $i++ )
+{
+	$apps = unserialize($GLOBALS['phpgw_info']['server']['apps_jabberit']);
+	$flag = false;
+
+	if( is_array($apps) )
+	{
+		foreach($apps as $tmp)
+		{
+			$app_enabled = substr($tmp,0,strpos($tmp,";"));
+			if( $GLOBALS['phpgw_info']['flags']['currentapp'] == $app_enabled )
+				$flag = true;
+		}	
+	}
+	
+	if ( $GLOBALS['phpgw_info']['user']['acl'][$i]['appname'] == 'jabberit_messenger' && ( $flag || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'jabberit_messenger' ))
+	{
+
+		$ldapManager = CreateObject('contactcenter.bo_ldap_manager');
+		$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager'] = $ldapManager->srcs[1];
+		
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$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 . 'jabberit_messenger/'; 
+		
+		require_once PHPGW_SERVER_ROOT . '/jabberit_messenger/inc/jabberit_sessions.inc.php';
+		
+		$_SESSION['phpgw_info']['jabberit_messenger']['webserver_url'] = $webserver_url;
+		
+		$ExternalParticipants = ""; 
+		if(isset($_SESSION['phpgw_info']['jabberit_messenger']['conf_organization_jabberit']))
+			$ExternalParticipants = explode(",",$_SESSION['phpgw_info']['jabberit_messenger']['conf_organization_jabberit']);
+		
+		if(is_array($ExternalParticipants))	
+		{
+			natcasesort($ExternalParticipants);
+			$ExternalParticipants = implode(",", $ExternalParticipants);
+		}
+		
+		require_once dirname(__FILE__) . '/load_lang.php';
+		
+		$var_js  = "var path_jabberit='".$webserver_url."';";
+		$var_js	.= "var externalParticipantsJabberit='".$ExternalParticipants."';";
+
+		echo "<script type=\"text/javascript\">".$var_js."</script>";
+
+		$js = array(
+				'connector',
+				'xtools',
+				'dragdrop',
+				'windows',	
+				'ldap',
+				'images',
+				'show_hidden',
+				'load',
+				'editSelect'
+				);
+
+		require_once dirname(__FILE__) . '/Controller.class.php';
+
+		$controller = new Controller;
+		$script = '';
+		foreach( $js as $key => $val ) 
+		{
+			$val = array('act' => 'j.' . $val );
+			$script .= $controller->exec($val);
+		}	
+		
+		printf("<script type=\"text/javascript\">%s</script>", $script);
+		
+		print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/default/css/window.css">';
+		print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/default/css/common.css">';
+		print '<link rel="stylesheet" type="text/css" href="' . $webserver_url . 'templates/default/css/selectEditStyle.css">';		
+
+		break;
+	}
+	
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uigroupslocked.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uigroupslocked.inc.php	(revision 570)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uigroupslocked.inc.php	(revision 570)
@@ -0,0 +1,127 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.bogroupslocked.inc.php";
+
+class uigroupslocked
+{
+	
+	private $bo;
+	
+	public $public_functions = array(
+		'add'  => True,
+		'editGroups' => True,
+	);
+	
+	function __construct()
+	{
+		$this->bo = new bogroupslocked();
+		
+		if(!isset($_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['host']))
+		{
+			$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['host'] = $GLOBALS['phpgw_info']['server']['ldap_host'];
+			$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['acc'] = $GLOBALS['phpgw_info']['server']['ldap_root_dn'];
+			$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['pw'] = $GLOBALS['phpgw_info']['server']['ldap_root_pw'];
+			$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['dn'] = $GLOBALS['phpgw_info']['server']['ldap_context'];
+		}
+	}
+
+	public final function editGroups()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Restringir o Uso do Módulo por Grupo';	
+
+		$_SESSION['phpgwinfo']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];
+    	$_SESSION['phpgwinfo']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];
+    	$_SESSION['phpgwinfo']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];
+    	$_SESSION['phpgwinfo']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];
+    	$_SESSION['phpgwinfo']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass']; 
+    	$_SESSION['phpgwinfo']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];			
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+
+		if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1))
+			$webserver_url .= '/';
+
+		echo '<script type="text/javascript">var path_jabberit="'.$webserver_url .'"</script>';
+
+		// Load Language;
+		require_once "load_lang.php";
+		require_once "class.ldap_im.inc.php";
+		
+		$ldap = new ldap_im();
+		
+		$ous = "<option value='-1'>-- ".lang('Select Organization')." --</option>";	
+		if( ($LdapOus = $ldap->listOrganizationsLdap()) )
+		{
+			foreach($LdapOus as $tmp )
+				$ous .= "<option value='".$tmp."'>".$tmp."</option>";
+		}
+		
+		$groupsRestricts = "";
+
+		if(isset($GLOBALS['phpgw_info']['server']['groups_locked_jabberit']))
+		{
+			$glocked = explode(';',$GLOBALS['phpgw_info']['server']['groups_locked_jabberit']);
+			natcasesort($glocked);
+			
+			foreach( $glocked as $tmp ){
+				$option = explode(":",$tmp);
+				$groupsRestricts .= "<option value='".$tmp."'>".$option[0]."</option>";
+			}
+		}
+		
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'groupslocked.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','groups_locked');	
+		$GLOBALS['phpgw']->template->set_var(array(
+										'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uigroupslocked.add'),
+										'lang_add' => "Adicionar",
+										'lang_cancel' => lang('Cancel'),										
+										'lang_description' => "Os grupos cadastrados como restritos, só poderão adicionar contatos da sua própria organização",
+										'lang_grupos_ldap' => "Grupos Ldap",
+										'lang_grupos_restritos' => "Grupos Restritos",
+										'lang_save' => lang('Save'),
+										'lang_Jabberit_settings' => "Configurações",
+										'lang_remove' => "Remover",
+										'lang_organizations' => lang('Organizations'),										
+										'groups_restricts' => trim($groupsRestricts),
+										'ous_ldap' => $ous										
+										));
+	
+		$GLOBALS['phpgw']->template->pparse('out','groups_locked');
+	}	
+	
+	public final function add()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		if ( $_POST['save'] )
+		{
+			$this->bo->setGroupsLocked($_POST['groups_locked_jabberit']);
+		}
+
+		$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.contacts_im.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.contacts_im.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.contacts_im.inc.php	(revision 697)
@@ -0,0 +1,248 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+
+require_once "class.ldap_im.inc.php";
+require_once "class.db_im.inc.php"; 
+
+class contacts_im
+{
+	private $ldap;
+	private $db;
+	private $ou_User;
+		
+	public final function __construct()
+	{
+		$this->ldap = new ldap_im();
+		$this->db = new db_im();
+
+		$ou_User = $_SESSION['phpgw_info']['jabberit_messenger']['account_dn'];
+		$ou_User = substr($this->ou_User,strpos($this->ou_User, "ou="));
+		$ou_User = strtoupper(substr($this->ou_User, 0, strpos($this->ou_User, ",dc=")));
+
+		// (OU) User
+		$this->ou_User = $_SESSION['phpgw_info']['jabberit_messenger']['account_dn'];
+		$this->ou_User = substr($this->ou_User,strpos($this->ou_User, "ou="));
+		$this->ou_User = strtoupper(substr($this->ou_User, 0, strpos($this->ou_User, ",dc=")));
+	}
+
+	public final function getParticipantsExternal()
+	{		
+		if( !$this->groupsLocked() && $_SESSION['phpgw_info']['jabberit_messenger']['use_external_participants_jabberit'] )		
+			return "true";
+		else
+			return "false";		
+	}
+
+	private final function groupsLocked()
+	{
+		$memberShip = array();
+		$groupsLocked =  explode(";",$_SESSION['phpgw_info']['jabberit_messenger']['groups_locked']);
+		
+		foreach($_SESSION['phpgw_info']['jabberit_messenger']['membership'] as $tmp)
+			$memberShip[] = $tmp['account_name'];
+		
+		foreach($groupsLocked as $tmp)
+		{
+			$groups = explode(":", $tmp);
+			if( array_search($groups[1], $memberShip) !== False )
+			{	
+				$_SESSION['phpgw_info']['jabberit_messenger']['organizationsGroupsLocked'] = $groups[2]; 
+				return true;
+			}
+		}
+		
+		return false;
+	}
+
+	public final function list_contacts($param)
+	{
+		$users	= $this->users_auth_im($param['name']);
+		$order	= array();
+
+		if (!is_array($users) && trim($users) === 'Many Results')
+			return "<error>Many Results</error>";
+
+		if( is_array($users) )
+		{	
+			foreach($users as $tmp)
+			{
+				if ( !array_key_exists($tmp['dn'], $order) )
+					$order[$tmp['dn']] = array();
+
+				$order[$tmp['dn']][] = '<data><cn>' . $tmp['cn'] . '</cn><mail>' . $tmp['mail'] .'</mail><uid>' . $tmp['uid'] . '</uid><photo>' . $tmp['photo'] . '</photo></data>';
+			}
+			
+			ksort($order);
+				
+			$return	= '<uids>';
+			foreach ( $order as $key => $val )
+				$return .= '<'.$key.'>'.implode('',$val).'</'.$key.'>';
+			$return .= '</uids>';
+		}
+		else
+			$return = '<empty/>';
+		
+		return $return;
+	}
+
+	private final function users_auth_im($pName)
+	{   
+        $array_uids = $this->db->get_accounts_acl();
+        $count = count($array_uids);
+        $uids_members = array();
+        $result = array();
+        
+        for($i = 0; $i < $count ;$i+=50)
+        {   
+            $partial_uids = array_slice($array_uids,$i,50);
+            $filter_uid = implode(")(uidnumber=",$partial_uids);
+            $filter_uid = "(uidnumber=". $filter_uid. ")";
+
+			if( $this->groupsLocked() )
+			{
+	            $orgs[] = $this->ou_User;
+	            $orgsGroupsLocked = explode(",", $_SESSION['phpgw_info']['jabberit_messenger']['organizationsGroupsLocked']); 
+	            
+				foreach( $orgsGroupsLocked as $tmp )
+				{
+					if( $tmp != "" )
+						$orgs[] = "OU=". $tmp;            
+				}
+				
+	            $orgs = array_unique($orgs);
+
+				foreach( $orgs as $tmp )
+					$result[] = $this->ldap->list_users_ldap("cn=*".$pName."*", $filter_uid, $tmp);
+			}
+			else
+	            $result[] = $this->ldap->list_users_ldap("cn=*".$pName."*", $filter_uid);
+        }
+
+        if ( is_array($result) )
+        {
+          	for($i = 0; $i < count($result); $i++)
+           		if(is_array($result[$i]))
+           			$uids_members = array_merge($uids_members,$result[$i]);
+        }
+	        
+        if( count($uids_members) > 50 )
+        {
+        	unset($_SESSION['phpgw_info']['jabberit_messenger']['photo']);	        
+          	return 'Many Results';
+        }            
+        
+        if( count($uids_members) > 0 )
+            return $uids_members;
+        else
+            return 0;  
+	}
+	
+	public final function verifyAddNewContact($pUid)
+	{
+		$groupsLocked =  explode(";",$_SESSION['phpgw_info']['jabberit_messenger']['groups_locked']);
+		$gidNumbers = array();
+		$uid = $pUid['uid'];
+
+		foreach($groupsLocked as $tmp)
+		{
+			$groups = explode(":", $tmp);
+			$gidNumbers[] = $groups[1];
+		}
+		
+		$filter_gid = implode(")(gidnumber=",$gidNumbers);
+	    $filter_gid = "(gidnumber=". $filter_gid. ")";
+		
+		$result = $this->ldap->list_groups_memberUid($filter_gid);
+
+		if( $result && is_array($result) )
+		{
+			array_shift($result);
+			$i = 0;
+			
+			foreach($result as $value)
+			{
+				$Groups[$i]['dn'] = $value['dn'];
+				$Groups[$i]['gidnumber'] = $value['gidnumber'][0];
+				if(array_key_exists('memberuid',$value))
+				{
+					array_shift($value['memberuid']);
+					$Groups[$i++]['memberuid'] = $value['memberuid'];
+				}
+			}
+
+			$search = array();
+			$search_Gid = array();
+			
+			// Verifica Uid em Grupo Bloqueado
+			foreach($Groups as $value)
+			{			
+				if( array_search( $uid , $value['memberuid'] ) !== false )
+				{
+					$ou = substr($value['dn'],strpos($value['dn'], "ou="));
+					$search[] = strtoupper(substr($ou, 0, strpos($ou, ",dc=")));
+					$search_Gid[] = $value['gidnumber'];
+				}	
+			}
+		}
+
+		if( $this->groupsLocked() )
+		{
+			if( count($search) > 0 )
+			{
+				// Verifica permissões do grupo
+				foreach($groupsLocked as $value)
+				{							
+					$tpGroups = explode(":",$value);
+					if( $tpGroups[1] == $search_Gid[0] )
+					{
+						$ousTp = explode(",",$tpGroups[2]);
+						$ou_User = substr($this->ou_User,3);
+						
+						if( array_search( $ou_User, $ousTp) !== false )
+							return "true";
+					}
+				}
+				return "false";
+			}
+			else
+				return "true";
+		} 
+		else
+		{		
+			// Se Bloqueado verifica o Grupo	
+			if( count($search) > 0 )
+			{
+				if( array_search($this->ou_User, $search) === false )
+				{
+					// Verifica permissões do grupo
+					foreach($groupsLocked as $value)
+					{							
+						$tpGroups = explode(":",$value);
+						if( $tpGroups[1] == $search_Gid[0] )
+						{
+							$ousTp = explode(",",$tpGroups[2]);
+							$ou_User = substr($this->ou_User,3);
+								
+							if( array_search( $ou_User, $ousTp) !== false )
+								return "true";
+						}
+					}
+					return "false";
+				}
+				return "true";
+			}					
+			return "true";
+		}
+	}
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiexternals.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiexternals.inc.php	(revision 560)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiexternals.inc.php	(revision 560)
@@ -0,0 +1,120 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+class uiexternals
+{
+	
+	
+	public $public_functions = array(
+		'backPage' => True,
+		'editParticipantsExternals' => True,
+	);
+	
+	final function __construct()
+	{
+		
+	}
+	
+	public final function editParticipantsExternals()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') . ' - ' . lang('Config External Participants');
+		
+		$_SESSION['phpgwinfo']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];
+    	$_SESSION['phpgwinfo']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];
+    	$_SESSION['phpgwinfo']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];
+    	$_SESSION['phpgwinfo']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];
+    	$_SESSION['phpgwinfo']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass']; 
+    	$_SESSION['phpgwinfo']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];			
+
+
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+
+
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+
+		$organizations = explode(",",$GLOBALS['phpgw_info']['server']['conf_organization_jabberit']);
+		natcasesort($organizations);
+		
+		foreach($organizations as $tmp)
+		{
+			if( $tmp != "" )
+			{
+				$orgs .= "<tr id='".$tmp."' style='width:40%' class='row_off'>";
+				$orgs .= "<td>".$tmp."</td>";
+				$orgs .= "<td><a href=\"javascript:constructScript.removePartExternal('".$tmp."');\">Excluir</a>";
+				$orgs .= "</td></tr>";
+			}
+		}
+		
+		$pExternal = $GLOBALS['phpgw_info']['server']['use_external_participants_jabberit'];
+
+		if( $GLOBALS['phpgw_info']['server']['use_external_participants_jabberit'] === "true")
+		{
+			$optionExternal = "<option value='false'>".lang('No')."</option>".
+							  "<option value='true' selected>".lang('Yes')."</option>";
+			$flagInputs = "selected=\"false\"";
+		}
+		else
+		{
+			$optionExternal = "<option value='false' selected>".lang('No')."</option>".
+							  "<option value='true'>".lang('Yes')."</option>";
+			$flagInputs = "selected=\"true\"";							  
+		}
+		
+		// Load Language;
+		require_once "load_lang.php";
+		
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'confExternals.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','confOrg');	
+		$teste = $GLOBALS['phpgw']->template->set_var(array(
+										'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uiexternals.backPage'),
+										'attributes_list' => '',			
+										'lang_add' => 'Adicionar',
+										'lang_Back' => 'Voltar',
+										'lang_cancel' => lang('Cancel'),
+										'lang_Informe_as_Organizacoes_Externas' => 'Informe as Organizações Externas',
+										'lang_Cadastrar_Organizacao' => 'Cadastrar Organização',
+										'lang_Habilitar_Participantes_Externos' => 'Habilitar Participantes Externos',
+										'lang_Delete' => lang('Delete'),										
+										'lang_save' => lang('Save'),
+										'lang_Organization' => lang('Organization'),
+										'lang_Organizacoes_Cadastradas' => 'Organizações Cadastradas',
+										'organizations_attributes' => $orgs,
+										'value_flag' => $flagInputs,
+										'value_use_external_participants_jabberit' => $optionExternal,
+										));
+	
+		$GLOBALS['phpgw']->template->pparse('out','confOrg');
+	}	
+	
+	public final function backPage()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		if ($_POST['cancel'])
+		{
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}
+
+		$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+	}
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/load_lang.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/load_lang.php	(revision 417)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/load_lang.php	(revision 417)
@@ -0,0 +1,25 @@
+<?php
+
+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));
+			$LANG_IM[$message_id] = $content;
+		}
+		fclose($fp);
+	}
+
+$script  = '<script>function jabberitGetLang(pKey){';
+$script .= 'var lang = [];';
+
+foreach ( $LANG_IM as $key => $value )
+   $script .= "lang['" . strtolower(addslashes($key)) . "'] = '" . addslashes($value) . "';";
+
+$script .= "return lang[pKey.toLowerCase()] || '* ' + pKey;}</script>";
+
+echo $script;
+
+unset($LANG_IM);
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_sessions.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_sessions.inc.php	(revision 563)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/jabberit_sessions.inc.php	(revision 563)
@@ -0,0 +1,60 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+		//User
+		$_SESSION['phpgw_info']['jabberit_messenger']['user']       = $GLOBALS['phpgw_info']['user']['account_lid'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['user_id']    = $GLOBALS['phpgw_info']['user']['account_id'];		
+        $_SESSION['phpgw_info']['jabberit_messenger']['passwd']		= $GLOBALS['phpgw_info']['user']['passwd'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['mail']		= $GLOBALS['phpgw_info']['user']['email'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['fullname']	= $GLOBALS['phpgw_info']['user']['fullname'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['account_dn']	= $GLOBALS['phpgw_info']['user']['account_dn'];
+
+		//Members Group
+		$_SESSION['phpgw_info']['jabberit_messenger']['membership']	= $GLOBALS['phpgw']->accounts->membership();
+
+		//Groups Locked
+		$_SESSION['phpgw_info']['jabberit_messenger']['groups_locked'] = $GLOBALS['phpgw_info']['server']['groups_locked_jabberit'];
+
+		//Server http or https 
+		$_SESSION['phpgw_info']['jabberit_messenger']['use_https'] 	= $GLOBALS['phpgw_info']['server']['use_https'];
+
+		//Organization Ldap
+		$_SESSION['phpgw_info']['jabberit_messenger']['account_dn']	= $GLOBALS['phpgw_info']['user']['account_dn'];
+
+		//Ldap
+		$_SESSION['phpgw_info']['jabberit_messenger']['server_ldap_jabberit']   = $GLOBALS['phpgw_info']['server']['server_ldap_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['context_ldap_jabberit']  = $GLOBALS['phpgw_info']['server']['context_ldap_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['user_ldap_jabberit']     = $GLOBALS['phpgw_info']['server']['user_ldap_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['password_ldap_jabberit'] = $GLOBALS['phpgw_info']['server']['password_ldap_jabberit'];
+        
+        //DB
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_name']	 = $GLOBALS['phpgw_info']['server']['db_name'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_host']	 = $GLOBALS['phpgw_info']['server']['db_host'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_port']	 = $GLOBALS['phpgw_info']['server']['db_port'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_user']	 = $GLOBALS['phpgw_info']['server']['db_user'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_pass']	 = $GLOBALS['phpgw_info']['server']['db_pass'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_type'] 	 = $GLOBALS['phpgw_info']['server']['db_type'];
+
+		//Jabberd
+        $_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit']			= $GLOBALS['phpgw_info']['server']['name_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['port_jabberit']			= $GLOBALS['phpgw_info']['server']['port_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['resource_jabberit']		= $GLOBALS['phpgw_info']['server']['resource_jabberit'];
+        $_SESSION['phpgw_info']['jabberit_messenger']['group_chat_jabberit']	= $GLOBALS['phpgw_info']['server']['group_chat_server_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['use_ssl_jabberit']		= $GLOBALS['phpgw_info']['server']['use_ssl_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['use_proxy_java']			= $GLOBALS['phpgw_info']['server']['use_proxy_java'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['name_company']			= $GLOBALS['phpgw_info']['server']['name_company_applet_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['use_attribute_jabberit'] = $GLOBALS['phpgw_info']['server']['use_attribute_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['attributes_org_ldap_jabberit']		= $GLOBALS['phpgw_info']['server']['attributes_org_ldap_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['use_external_participants_jabberit'] = $GLOBALS['phpgw_info']['server']['use_external_participants_jabberit'];
+		$_SESSION['phpgw_info']['jabberit_messenger']['conf_organization_jabberit']			= $GLOBALS['phpgw_info']['server']['conf_organization_jabberit'];		
+		
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/hook_admin.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/hook_admin.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/hook_admin.inc.php	(revision 697)
@@ -0,0 +1,27 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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 = 'jabberit_messenger';
+	$file = array(
+		'Site Configuration'	=> $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname),
+		'Enable the Expresso Messenger inside of the modules' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.edit_conf'),
+		'Configuration of authentication attribute by Organization (OU)' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uiconforganization.edit_conf'),
+		'External Participants' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uiexternals.editParticipantsExternals'),
+		'Deny module\'s use by group' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uigroupslocked.editGroups'),
+		'Liberar Organizações para grupos restritos' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uienabledgroups.getGroups'),
+	);
+
+//Do not modify below this line
+	display_section($appname,$title,$file);
+	
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ldap_im.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ldap_im.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ldap_im.inc.php	(revision 697)
@@ -0,0 +1,316 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+define('PHPGW_INCLUDE_ROOT', '../');
+define('PHPGW_API_INC','../phpgwapi/inc');
+require_once( PHPGW_API_INC . '/class.common.inc.php');
+
+class ldap_im
+{
+	private $ldap;
+	private $ldap_host;
+	private $ldap_context;
+	private $ldap_dn;
+	private $ldap_pass;
+	private $common;
+	private $jid;
+	private $max_result;
+	private $ou_User;
+	
+	public final function __construct()
+	{
+		$this->ldap_host 	= (isset($_SESSION['phpgw_info']['jabberit_messenger']['server_ldap_jabberit'])) ? $_SESSION['phpgw_info']['jabberit_messenger']['server_ldap_jabberit'] : $GLOBALS['phpgw_info']['server']['ldap_host'];
+		$this->ldap_context	= (isset($_SESSION['phpgw_info']['jabberit_messenger']['context_ldap_jabberit'])) ? $_SESSION['phpgw_info']['jabberit_messenger']['context_ldap_jabberit'] : $GLOBALS['phpgw_info']['server']['ldap_context'];
+		$this->ldap_dn		= (isset($_SESSION['phpgw_info']['jabberit_messenger']['user_ldap_jabberit'])) ? $_SESSION['phpgw_info']['jabberit_messenger']['user_ldap_jabberit'] : $GLOBALS['phpgw_info']['server']['ldap_root_dn'];
+		$this->ldap_pass	= (isset($_SESSION['phpgw_info']['jabberit_messenger']['password_ldap_jabberit'])) ? $_SESSION['phpgw_info']['jabberit_messenger']['password_ldap_jabberit'] : $GLOBALS['phpgw_info']['server']['ldap_root_pw'];
+		$this->jid			= $_SESSION['phpgw_info']['jabberit_messenger']['user'];
+		$this->max_result	= 50;
+	}
+
+	public final function __destruct()
+	{
+		if( $this->ldap )
+			ldap_close($this->ldap);
+	}	
+
+	private final function _connect_ldap()
+	{
+		$this->common = new common();
+		
+		if( !$this->ldap )
+		{
+			$GLOBALS['phpgw_info']['server']['ldap_version3'] = true;
+			$this->ldap = $this->common->ldapConnect( $this->ldap_host,$this->ldap_dn,$this->ldap_pass, false );
+		}
+	}
+	
+	private final function _ldapConnect($refer = false)
+	{
+		function ldapRebindJabberit($ldap_connection, $ldap_url)
+		{
+			$acc = $_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['acc'];
+			$pw = $_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['pw'];
+			
+			@ldap_bind($ldap_connection, $acc,$pw);
+		}
+
+		// Using ContactCenter configuration.
+		$this->ldap_host	=	$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['host'];
+		$this->ldap_context	=	$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['dn'];
+		$this->ldap_dn		=	$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['acc'];
+		$this->ldap_pass	=	$_SESSION['phpgw_info']['jabberit_messenger']['ldapManager']['pw'];
+
+		$this->ldap = ldap_connect($this->ldap_host);
+		ldap_set_option($this->ldap, LDAP_OPT_PROTOCOL_VERSION, 3);
+		ldap_set_option($this->ldap, LDAP_OPT_REFERRALS, $refer);
+		
+		if ($refer)
+		{
+			ldap_set_rebind_proc($this->ldap, ldapRebindJabberit);
+		}
+		
+		@ldap_bind($this->ldap,$this->ldap_dn,$this->ldap_pass);
+	}
+
+	public final function list_groups_memberUid($pGroup)
+	{
+		$this->_ldapConnect();
+		
+		if( $this->ldap )
+		{
+			$filter = "(&(objectclass=posixgroup)(|".$pGroup."))";
+			$justthese = array("dn","memberuid","gidnumber");
+			$search = ldap_search($this->ldap,$this->ldap_context,$filter, $justthese);
+			$result = ldap_get_entries($this->ldap,$search);
+			
+			if( $result['count'] > 0 )
+				return $result;
+		}		
+		
+		return false;
+	}
+
+	public final function list_participants_externals($pSearch)
+	{
+		$this->_ldapConnect(true);
+		
+		$mail = $pSearch['mail'];
+		
+		if( $this->ldap )
+		{
+			$filter = "(&(phpgwaccounttype=u)(mail=".$mail."))";
+			$justthese = array("uid","uidNumber","cn","mail","phpgwAccountVisible","dn","jpegPhoto");
+			$search = ldap_search($this->ldap,$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1);
+			$entry1 = ldap_get_entries($this->ldap,$search);
+			$entry = ldap_first_entry( $this->ldap, $search );
+		}			
+		
+		if( $entry1['count'] > 0 )
+		{
+			$i = 0;
+			$result_user = array();
+			$result = array();
+
+			while($entry)
+			{
+			
+				if ( $entry1[$i]['phpgwaccountvisible'][0] != '-1' )
+				{
+					$result['uidnumber'] = @ldap_get_values($this->ldap, $entry, 'uidnumber');			
+					$result['mail'] = @ldap_get_values($this->ldap, $entry, 'mail');
+					$result['uid'] = @ldap_get_values($this->ldap, $entry, 'uid');
+					$result['cn'] = @ldap_get_values($this->ldap, $entry, 'cn');
+
+					foreach ( $result as $key => $value )
+						$result_user[$i][$key] = $value[0];
+
+					$ou = explode('dc=', $entry1[$i]['dn']);
+					$ou = explode("ou=",$ou[0]);
+					$ou = array_pop($ou);
+					$result_user[$i]['dn'] = strtoupper(substr($ou,0,strlen($ou)-1));
+
+					$result_user[$i]['photo'] = 0;
+
+					$photo = @ldap_get_values_len($this->ldap, $entry, 'jpegphoto');
+
+					if ( $photo )
+					{
+						$result_user[$i]['photo'] = 1;
+						$_SESSION['phpgw_info']['jabberit_messenger']['photo'][trim($result_user[$i]['uid'])] = $photo[0];
+					}
+
+					$i++;
+				}				
+				$entry = ldap_next_entry($this->ldap,$entry);	
+			}
+			
+			$return  = "<uids>";
+			$return .= "<".$result_user[0]['dn']."><data>";
+			$return .= "<cn>".$result_user[0]['cn']."</cn>";
+			$return .= "<mail>".$result_user[0]['mail']."</mail>";
+			$return .= "<uid>".$result_user[0]['uid']."</uid>";
+			$return .= "<photo>".$result_user[0]['photo']."</photo>";									
+			$return .= "</data></".$result_user[0]['dn'].">";			
+			$return .= "</uids>";
+
+			return $return;		
+		}
+		
+		return '<empty/>';
+	}
+
+	public final function list_users_ldap( $search, $uidnumber, $ous = false )
+	{
+		$this->_connect_ldap();
+	
+		if( $this->ldap )
+		{
+			$filter = "(&(phpgwaccounttype=u)(|".$uidnumber.")(".$search ."))";
+			$justthese = array("uid","uidNumber","cn","mail","phpgwAccountVisible","dn","jpegPhoto");
+			// SERPRO
+			//$justthese = array("uid","uidNumber","cn","mail","description","phpgwAccountVisible","dn","jpegPhoto");
+	
+			if( $ous != false )
+				$search = ldap_search($this->ldap,$ous.",".$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1);
+			else
+				$search = ldap_search($this->ldap,$this->ldap_context,$filter,$justthese, 0, $this->max_result + 1);
+
+			$entry1 = ldap_get_entries($this->ldap,$search);
+			$entry  = ldap_first_entry($this->ldap,$search);
+		}
+
+		if( $entry1['count'] > 0 )
+		{
+			if( count($entry1) < $this->max_result )
+			{
+				$i = 0;
+				$result_user = array();
+				$result = array();
+
+				while($entry)
+				{
+				
+					if ( $entry1[$i]['phpgwaccountvisible'][0] != '-1' )
+					{
+						$result['uidnumber'] = @ldap_get_values($this->ldap, $entry, 'uidnumber');			
+						$result['mail'] = @ldap_get_values($this->ldap, $entry, 'mail');
+						$result['uid'] = @ldap_get_values($this->ldap, $entry, 'uid');
+						$result['cn'] = @ldap_get_values($this->ldap, $entry, 'cn');
+						// SERPRO
+						//$result['description'] = @ldap_get_values($this->ldap, $entry, 'description');
+
+						foreach ( $result as $key => $value )
+							$result_user[$i][$key] = $value[0];
+
+						$ou = explode('dc=', $entry1[$i]['dn']);
+						$ou = explode("ou=",$ou[0]);
+						$ou = array_pop($ou);
+						$result_user[$i]['dn'] = strtoupper(substr($ou,0,strlen($ou)-1));
+
+						$result_user[$i]['photo'] = 0;
+						$photo = @ldap_get_values_len($this->ldap, $entry, 'jpegphoto');
+						if ( $photo )
+						{
+							$result_user[$i]['photo'] = 1;
+							$_SESSION['phpgw_info']['jabberit_messenger']['photo'][trim($result_user[$i]['uid'])] = $photo[0];
+						}
+						
+						$organization = explode(",", $_SESSION['phpgw_info']['jabberit_messenger']['attributes_org_ldap_jabberit']);
+
+						if(is_array($organization))
+						{
+							foreach($organization as $attr)
+							{
+								$tmp = explode(";",$attr);
+								if( strtolower(trim($tmp[0])) == strtolower(trim($result_user[$i]['dn'])) )
+								{
+									switch(strtolower(trim($tmp[1])))
+									{
+										case "mail" :
+												$uid = $result_user[$i]['mail'];
+												$uid = substr($uid,0,strpos($uid,"@"));	
+												$result_user[$i]['uid'] = $uid;
+												break;
+	
+										case "description" :
+												// SERPRO
+												// parte antes do arroba; 
+												$result_user[$i]['uid'] = $result_user[$i]['description']; 										
+												break;
+									}
+								}
+							}
+						}
+						
+						$i++;
+					}				
+					$entry = ldap_next_entry($this->ldap,$entry);	
+				}
+				
+				return $result_user;
+			}
+			else
+			{
+				return "Many Results";
+			}
+		}
+		return 0;
+	}
+	
+	public final function listOrganizationsLdap()
+	{
+
+		$this->_connect_ldap();
+	
+		if( $this->ldap )
+		{
+			$filter="ou=*";		
+			$justthese = array("ou");
+			$search = ldap_search($this->ldap,$this->ldap_context,$filter,$justthese);			
+			$entry = ldap_get_entries($this->ldap, $search);
+		}
+
+		foreach($entry as $tmp)
+			if($tmp['ou'][0] != "")
+				$result_org[] = $tmp['ou'][0];  
+
+		return $result_org;
+	}
+	
+	public final function getGroupsLdap($pOrg)
+	{
+		$this->_ldapConnect(true);
+		$organization = 'ou=' . $pOrg['ou'] .",". $this->ldap_context;
+ 		
+		if( $this->ldap )	
+		{
+			$filter = "(&(phpgwAccountType=g)(objectClass=posixGroup))";
+			$justthese = array("cn","gidNumber");
+			$search = ldap_list($this->ldap, $organization, $filter, $justthese);
+			$entry = ldap_get_entries( $this->ldap, $search );
+
+			if( $entry )
+			{					
+				$result_groups = "<ldap>";
+				foreach($entry as $tmp)
+					if( $tmp['gidnumber'][0] != "" )
+						$result_groups .= "<org><cn>".$tmp['cn'][0]."</cn><gid>".$tmp['gidnumber'][0]."</gid></org>";
+				
+				$result_groups .= "</ldap>";						
+			}
+		}
+
+		return $result_groups;
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bomodule.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bomodule.inc.php	(revision 417)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.bomodule.inc.php	(revision 417)
@@ -0,0 +1,40 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.db_im.inc.php";
+require_once "jabberit_sessions.inc.php";
+
+class bomodule
+{
+	private $db;
+	
+	function __construct()
+	{
+		$this->db = new db_im();
+	}
+	
+	public final function getApplicationsEnabled()
+	{
+		return $this->db->getApplicationsEnabled();
+	}
+	
+	public final function getApplicationsList()
+	{
+		return $this->db->getApplicationsList();
+	}
+	
+	public final function setApplications($Applications)
+	{
+		return $this->db->setApplications($Applications);
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiconforganization.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiconforganization.inc.php	(revision 563)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.uiconforganization.inc.php	(revision 563)
@@ -0,0 +1,112 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.ldap_im.inc.php";
+
+class uiconforganization
+{
+
+	private $bo;
+	private $ldap;
+
+	public $public_functions = array(
+		'backPage'  => True,
+		'edit_conf' => True,
+	);
+
+	final function __construct()
+	{
+		//$this->bo = new bomodule();	
+	}	
+	
+	public final function edit_conf()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Configurar o Atributo de Autenticação';	
+		
+		$_SESSION['phpgwinfo']['db_host'] = $GLOBALS['phpgw_info']['server']['db_host'];
+    	$_SESSION['phpgwinfo']['db_port'] = $GLOBALS['phpgw_info']['server']['db_port'];
+    	$_SESSION['phpgwinfo']['db_name'] = $GLOBALS['phpgw_info']['server']['db_name'];
+    	$_SESSION['phpgwinfo']['db_user'] = $GLOBALS['phpgw_info']['server']['db_user'];
+    	$_SESSION['phpgwinfo']['db_pass'] = $GLOBALS['phpgw_info']['server']['db_pass']; 
+    	$_SESSION['phpgwinfo']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];
+			
+		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+		
+		$GLOBALS['phpgw']->common->phpgw_header();
+		echo parse_navbar();
+
+		$options_attributes = array('uid','mail','description');
+		$attributes .= "<option value='-1'>-- ".lang('Choice attribute')." --</option>";
+		foreach($options_attributes as $tmp )
+			$attributes .= "<option value='".$tmp."'>".$tmp."</option>";
+
+		$options_orgAttributes = explode(",",$GLOBALS['phpgw_info']['server']['attributes_org_ldap_jabberit']);
+		natcasesort($options_orgAttributes);
+		
+		foreach($options_orgAttributes as $key => $tmp)
+		{
+			if( $tmp != "" )
+			{
+				$attr = explode(";", $tmp);
+				$orgAttributes .= "<tr id='".$attr[0]."' style='width:40%' class='row_off'>";
+				$orgAttributes .= "<td>".$attr[0]."</td>";
+				$orgAttributes .= "<td>".$attr[1]."</td>";
+				$orgAttributes .= "<td><a href=\"javascript:constructScript.removeOrg('".$attr[0]."');\">Excluir</a>";
+				$orgAttributes .= "</td></tr>";
+			}
+		}
+		
+		// Load Language;
+		require_once "load_lang.php";
+				
+		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'confOrganization.tpl'));
+		$GLOBALS['phpgw']->template->set_block('jabberit_messenger','confOrg');	
+		$GLOBALS['phpgw']->template->set_var(array(
+										'action_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uiconforganization.backPage'),
+										'attributes_list' => $attributes,			
+										'lang_add' => 'Adicionar',
+										'lang_Attribute' => lang('Attribute'),	
+										'lang_Back' => 'Voltar',
+										'lang_cancel' => lang('Cancel'),
+										'lang_Delete' => lang('Delete'),										
+										'lang_save' => lang('Save'),
+										'lang_Organization' => lang('Organization'),
+										'organizations_attributes' => $orgAttributes,
+										));
+	
+		$GLOBALS['phpgw']->template->pparse('out','confOrg');
+	}
+	
+	public final function backPage()
+	{
+		if($GLOBALS['phpgw']->acl->check('applications_access',1,'admin'))
+		{
+			$GLOBALS['phpgw']->redirect_link('/index.php');
+		}		
+		
+		if ($_POST['cancel'])
+		{
+			$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+		}
+
+		$GLOBALS['phpgw']->redirect_link('/admin/index.php');
+	}
+	
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ujabber.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ujabber.inc.php	(revision 526)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.ujabber.inc.php	(revision 526)
@@ -0,0 +1,142 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+require_once "class.jabber.inc.php";
+
+class ujabber
+{
+	private $jabber;
+	private $error;
+
+	function __construct()
+	{
+		
+		$this->jabber = new Jabber();
+		
+		$organization = explode(",", $_SESSION['phpgw_info']['jabberit_messenger']['attributes_org_ldap_jabberit']);
+		$organization_user = $_SESSION['phpgw_info']['jabberit_messenger']['account_dn'];
+		$organization_user = substr($organization_user, strpos($organization_user,"ou=") + 3 , strlen($organization_user));
+		$organization_user = substr($organization_user, 0, strpos($organization_user, ","));
+
+		// Default para autenticação é o UID;
+		$uid = $_SESSION['phpgw_info']['jabberit_messenger']['user'];
+		
+		if(is_array($organization))
+		{
+			foreach($organization as $attr)
+			{
+				$tmp = explode(";",$attr);
+				if( strtolower(trim($tmp[0])) == strtolower(trim($organization_user)))
+				{
+					switch(strtolower(trim($tmp[1])))
+					{
+						case "mail" :
+								$uid = $_SESSION['phpgw_info']['jabberit_messenger']['mail'];
+								$uid = substr($uid,0,strpos($uid,"@"));	
+								break;
+	
+						case "description" :
+								// SERPRO
+								// parte antes do arroba;
+								// Informe aqui a parte da sessão correspondente; 
+								$uid = "description"; 										
+								break;
+					}
+				}
+			}
+		}
+		
+		$this->jabber->username	 = $uid;
+		$this->jabber->password	 = $_SESSION['phpgw_info']['jabberit_messenger']['passwd'];
+		$this->jabber->server	 = $_SESSION['phpgw_info']['jabberit_messenger']['name_jabberit'];
+		$this->jabber->resource  = "JABADD";
+	}	
+	
+	private final function connect()
+	{
+		if(!$this->jabber->Connect())
+		{
+			$this->error = "No Connect";
+			return false;	
+		}
+		if(!$this->jabber->SendAuth())
+		{
+			$this->error = "No Auth";
+			return false;
+		}
+		
+		return true;
+	}
+	
+	private final function disconnect()
+	{
+		
+		$this->jabber->Disconnect();
+	}
+	
+	public final function AddNewContact($pNewUser)
+	{
+		$this->connect();
+		$jid	= $pNewUser['uid']."@". $this->jabber->server;
+		$id		= 'add_user'.time();
+		$name	= $pNewUser['name'];
+		$group	= $pNewUser['group'];
+
+		if($this->jabber->RosterAddUser($jid,$id,$name,$group))
+		{
+			$_SESSION['phpgw_info']['jabberit_messenger']['groups_user'][] = $group;
+			$_SESSION['phpgw_info']['jabberit_messenger']['groups_user'] = array_unique($_SESSION['phpgw_info']['jabberit_messenger']['groups_user']);
+			
+			if($this->jabber->Subscribe($jid))
+			{
+				$this->disconnect();
+				return true;
+			}
+		}
+		else
+		{
+			$this->disconnect();
+			return false;
+		}
+
+		
+	}
+	
+	public final function getGroupsJabber()
+	{
+		$groups = array();
+		$return = '';
+		
+		if(!isset($_SESSION['phpgw_info']['jabberit_messenger']['groups_user']))
+		{		
+			$this->connect();
+			$groups = $this->jabber->RosterGroups();
+			$this->disconnect();
+			
+			$groups = array_unique($groups);
+			$_SESSION['phpgw_info']['jabberit_messenger']['groups_user'] = $groups;
+			
+		}else
+			$groups = $_SESSION['phpgw_info']['jabberit_messenger']['groups_user'];
+
+		natcasesort($groups);
+	
+		foreach($groups as $tmp)
+			$return .= $tmp . ";";
+		
+		if( trim($return) != '' )
+			$return = substr( $return, 0, strlen($return)-1 );
+	
+		return $return;
+	}
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.db_im.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.db_im.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.db_im.inc.php	(revision 697)
@@ -0,0 +1,620 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- Alexandre Correia / Rodrigo Souza							          *
+  *  	- JETI - http://jeti-im.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.                                               *
+  \***************************************************************************/
+
+define('PHPGW_INCLUDE_ROOT','../');	
+define('PHPGW_API_INC','../phpgwapi/inc');
+require_once(PHPGW_API_INC . '/class.db.inc.php');
+	
+class db_im
+{	
+	private $db;
+	private $db_name;
+	private $db_host;
+	private $db_port;
+	private $db_user;
+	private $db_pass;
+	private $db_type;
+	private $user_id;
+	
+	public final function __construct()
+	{
+		$this->db_name = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_name'];
+		$this->db_host = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_host'];
+		$this->db_port = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_port'];
+		$this->db_user = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_user'];
+		$this->db_pass = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_pass'];
+		$this->db_type = $_SESSION['phpgw_info']['jabberit_messenger']['server']['db_type'];
+		$this->user_id = $_SESSION['phpgw_info']['jabberit_messenger']['user_id'];
+		$this->connectDB();
+	}
+
+	private final function connectDB()
+	{
+		$this->db = new db();
+		$this->db_name = ( !$this->db_name ) ? $_SESSION['phpgwinfo']['db_name'] : $this->db_name;
+		$this->db_host = ( !$this->db_host ) ? $_SESSION['phpgwinfo']['db_host'] : $this->db_host;
+		$this->db_port = ( !$this->db_port ) ? $_SESSION['phpgwinfo']['db_port'] : $this->db_port;
+		$this->db_user = ( !$this->db_user ) ? $_SESSION['phpgwinfo']['db_user'] : $this->db_user;
+		$this->db_pass = ( !$this->db_pass ) ? $_SESSION['phpgwinfo']['db_pass'] : $this->db_pass;
+		$this->db_type = ( !$this->db_type ) ? $_SESSION['phpgwinfo']['db_type'] : $this->db_type;
+		
+		$this->db->connect($this->db_name,$this->db_host,$this->db_port,$this->db_user,$this->db_pass,$this->db_type);		
+	}	
+
+	public final function getApplicationsEnabled()
+	{
+		
+		$this->db->query("SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' and config_name ='apps_jabberit'");
+		if($this->db->num_rows())
+		{
+			$tmp = "";
+			while($this->db->next_record())
+			{
+				$tmp[]= $this->db->row();
+			}
+			return $tmp[0]['config_value'];
+		}
+		return false;
+	}
+	
+	public final function getApplicationsList()
+	{
+		$this->db->query("SELECT * FROM phpgw_applications WHERE app_enabled = '1' order by app_name");
+		if($this->db->num_rows())
+		{
+			while ($this->db->next_record())
+			{
+				$app = $this->db->f('app_name');
+				$title = @$GLOBALS['phpgw_info']['apps'][$app]['title'];
+				if (empty($title))
+				{
+					$title = lang($app) == $app.'*' ? $app : lang($app);
+				}
+				$apps[$app] = array(
+					'title'  => $title,
+					'name'   => $app,
+					'status' => $this->db->f('app_enabled')
+				);
+			}
+		}
+		return $apps;
+	}
+
+	public final function get_accounts_acl()
+	{
+		$query  = "select acl_account from phpgw_acl where acl_location in (select acl_account from phpgw_acl where acl_appname = 'jabberit_messenger') ";
+		$query .= "union select acl_account from phpgw_acl where acl_appname = 'jabberit_messenger'";
+		
+		if( $this->db->query($query) )	
+		{
+			$users = array();
+			$new_users = array();
+			while($this->db->next_record())
+				$users[] = $this->db->row();
+
+			if(is_array($users))
+				foreach($users as $tmp)
+					$new_users[] = $tmp['acl_account'];
+			
+			return $new_users;
+		}
+		
+		return false;
+	}
+	
+	public final function getGroupsBlocked()
+	{
+		$return = "";
+		
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";	
+			
+			if($this->db->query($query))
+			{
+
+				if ( $this->db->query($query) )
+				{	
+					while($this->db->next_record())
+						$result[] = $this->db->row();
+				}
+				
+				if( count($result) > 0 )
+					$return = $result[0]['config_value'];
+			}
+		}
+		
+		return $return;
+	}
+	
+	public final function getPreferences()
+	{
+		$result = array();
+		$query = "select * from phpgw_preferences where preference_owner = '".$this->user_id."' and preference_app = 'jabberit_messenger'";
+		
+ 		if ( $this->db->query($query) )
+		{	
+			while($this->db->next_record())
+				$result[] = $this->db->row();
+	
+			if(count($result) > 0)
+				return unserialize($result[0]['preference_value']);
+		}
+
+		return "openWindowJabberit:true;openWindowJabberitPopUp:false;flagAwayIM:5";
+		//return "openWindowJabberit:true;openWindowJabberitPopUp:false";		
+	}
+
+	public final function setPreferences($pParam)
+	{
+		$preferences = $pParam['preferences1'];
+		
+		if(isset($pParam['preferences2']))
+			$preferences .= ";". $pParam['preferences2'];
+		
+		if(isset($pParam['preferences3']))
+			$preferences .= ";". $pParam['preferences3'];
+		
+		$user_id  = $this->user_id;
+		
+		$query = "insert into phpgw_preferences values('".$user_id."','jabberit_messenger','".serialize($preferences)."')";
+				
+		if($this->db->query($query))
+		{ 
+			return "true";
+		}
+		else
+		{
+			$query = "update phpgw_preferences set preference_value = '".serialize($preferences)."' where preference_app='jabberit_messenger' and preference_owner='".$user_id."'";
+
+			if($this->db->query($query))
+				return "true";
+			else
+				return "false";			
+		}		
+	}
+	
+	public final function setApplications($pApplications)
+	{
+		$apps = serialize($pApplications);
+		
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' and config_name ='apps_jabberit'";
+				
+			$this->db->query($query);
+					
+			if(!$this->db->next_record())
+			{
+				$query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','apps_jabberit','".$apps."')";
+				$this->db->query($query);
+				return true;
+			}
+			else
+			{
+				$query = "UPDATE phpgw_config SET config_value = '".$apps."' WHERE config_app = 'phpgwapi' AND config_name = 'apps_jabberit'";
+				$this->db->query($query);
+				return true;
+			}
+		}
+		return false;	
+	}
+	
+	public final function setAttributesLdap($pAttributes)
+	{
+		$values = $pAttributes['conf'];
+		$attributesOrg = "";		
+
+		if( $this->db )
+		{
+			$query = "SELECT * from phpgw_config WHERE config_app = 'phpgwapi' and config_name = 'attributes_org_ldap_jabberit'";
+
+			if ( $this->db->query($query) )
+			{	
+				while($this->db->next_record())
+					$result[] = $this->db->row();
+		
+				if(count($result) > 0)
+					$attributesOrg = $result[0]['config_value'];
+			}
+
+			if( trim($attributesOrg) == "" )
+			{
+				$query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','attributes_org_ldap_jabberit','".$values."')";
+				$this->db->query($query);
+				
+				$attr = explode(";", $values);
+				$values = "<return><ou attr='".$attr[1]."'>".$attr[0]."</ou></return>";
+				return $values;
+			}
+			else
+			{
+				$org = explode(",", $attributesOrg);
+				$newValue = explode(";", $values);
+				
+				foreach( $org as $tmp )
+				{
+					$attr = explode(";",$tmp);
+					if( strtolower(trim($attr[0])) == strtolower(trim($newValue[0])) )
+						return false;
+				}
+
+				$values = $values . "," . $attributesOrg;
+				$query = "UPDATE phpgw_config SET config_value = '".$values."' WHERE config_app = 'phpgwapi' AND config_name = 'attributes_org_ldap_jabberit'";
+				$this->db->query($query);
+
+				$return = explode(",",$values);
+				natcasesort($return);
+
+				$values = "<return>";
+				
+				foreach($return as $tmp)
+				{
+					$attr = explode(";", $tmp);
+					$values .= "<ou attr='" . $attr[1] . "'>" . $attr[0] . "</ou>";
+				}
+					
+				$values .= "</return>";
+				
+				return $values;				
+			}
+		}
+		return false; 
+	}
+
+	public final function setGroupsLocked($pGroups)
+	{
+		$groups = "";
+		
+		if( is_array($pGroups) )
+		{
+			foreach($pGroups as $tmp)		
+				if(trim($tmp) != "")
+					$groups .= $tmp . ";";
+		
+			$groups = substr($groups, 0, strlen($groups) - 1 );		
+		}
+		
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";	
+			
+			if($this->db->query($query))
+			{
+
+				if ( $this->db->query($query) )
+				{	
+					while($this->db->next_record())
+						$result[] = $this->db->row();
+				}
+
+				if( count($result) == 0 )
+				{
+					$query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','groups_locked_jabberit','".$groups."');";
+					$this->db->query($query);
+					return true;
+				}
+				else
+				{
+					$query = "UPDATE phpgw_config SET config_value = '".trim($groups)."' WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";
+					$this->db->query($query);
+					return true;
+				}
+			}
+		}
+		
+		return false;
+	}
+	
+	public final function setOuGroupsLocked($pGroup)
+	{
+		$group = $pGroup['group'];
+		$gidnumber = $pGroup['gidnumber'];
+		$organization = strtoupper($pGroup['ou']);
+
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";	
+			
+			if($this->db->query($query))
+			{
+
+				if ( $this->db->query($query) )
+				{	
+					while($this->db->next_record())
+						$result[] = $this->db->row();
+				}
+
+				$groupsLocked = explode(";",$result[0]['config_value']);
+					
+				foreach( $groupsLocked as $tmp )
+				{
+					$aux = explode(":", $tmp);
+					if(($group.":".$gidnumber) == ($aux[0].":".$aux[1]))
+					{
+						if( $aux[2] )
+						{
+							$ou_groups = explode(",",$aux[2]);
+							natcasesort($ou_groups);
+							$key = array_search($organization, $ou_groups);
+							
+							if( $key === false )
+								array_push($ou_groups, $organization);
+							
+							$groups .= $group.":".$gidnumber.":";
+							
+							$return = "<return>";						
+							
+							foreach($ou_groups as $tmp)
+							{
+								$return .= "<ou attr='".$tmp."'>".$tmp."</ou>";
+								$groups .= $tmp .",";	
+							}
+							
+							$return .= "</return>";
+							
+							$groups  = substr($groups,0,strlen($groups)-1);
+							$groups .= ";";
+						}
+						else
+						{
+							$groups .= $group.":".$gidnumber.":".$organization.";";
+							$return = "<return><ou attr='".$organization."'>".$organization."</ou></return>";
+						}
+					}
+					else
+						$groups .= $tmp . ";" ;
+				}
+
+				$groups = substr($groups,0,strlen($groups)-1);
+
+				$query = "UPDATE phpgw_config SET config_value = '".trim($groups)."' WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";
+				$this->db->query($query);
+				
+				return $return;
+			}
+		}
+		
+		return false;
+	}
+	
+	public final function setUseParticipantsExternal($pFlag)
+	{
+		$flag = $pFlag['value'];
+		$return = "";
+		
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'use_external_participants_jabberit';";
+
+			if ( $this->db->query($query) )
+			{	
+				while($this->db->next_record())
+					$result[] = $this->db->row();
+			}
+
+			if(count($result) == 0)
+			{
+				$query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','use_external_participants_jabberit','".$flag."')";
+				$this->db->query($query);
+				return true;
+			}
+			else
+			{
+				$query = "UPDATE phpgw_config SET config_value = '".$flag."' WHERE config_app = 'phpgwapi' AND config_name = 'use_external_participants_jabberit'";
+				$this->db->query($query);
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	public final function setOrganization($pOrganization)
+	{
+		$organization = $pOrganization['organization'];
+		$orgConfiguration = "";
+		
+		if( $this->db )
+		{
+			$query = "SELECT * from phpgw_config WHERE config_app = 'phpgwapi' and config_name = 'conf_organization_jabberit'";
+
+			if ( $this->db->query($query) )
+			{	
+				while($this->db->next_record())
+					$result[] = $this->db->row();
+		
+				if(count($result) > 0)
+					$orgConfiguration = $result[0]['config_value'];
+			}
+
+			if( trim($orgConfiguration) == "" )
+			{
+				$query = "INSERT INTO phpgw_config(config_app,config_name,config_value) VALUES('phpgwapi','conf_organization_jabberit','".$organization."')";
+				$this->db->query($query);
+				
+				return "<return><ou attr='".$organization."'>".$organization."</ou></return>";
+			}
+			else
+			{
+				$orgAux = explode(",",$orgConfiguration);
+				
+				foreach( $orgAux as $tmp )
+				{
+					if(strtolower(trim($tmp)) === strtolower(trim($organization)))
+						return false;
+				}
+
+				$value = $orgConfiguration . "," . $organization;
+				$query = "UPDATE phpgw_config SET config_value = '".$value."' WHERE config_app = 'phpgwapi' AND config_name = 'conf_organization_jabberit'";
+				$this->db->query($query);
+
+				$return = explode(",",$value);
+				natcasesort($return);
+
+				$values = "<return>";
+				
+				foreach($return as $tmp)
+					$values .= "<ou attr='" . $tmp . "'>" . $tmp . "</ou>";
+					
+				$values .= "</return>";
+				
+				return $values;			
+			}
+		}
+		return false; 
+	}
+	
+	public final function removeOuGroupsLocked($pGroup)
+	{
+		$group = $pGroup['group'];
+		$gidnumber = $pGroup['gidnumber'];
+		$organization = strtoupper($pGroup['ou']);
+		$return = false;
+		
+		if( $this->db )
+		{
+			$query = "SELECT * FROM phpgw_config WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";	
+			
+			if($this->db->query($query))
+			{
+
+				if ( $this->db->query($query) )
+				{	
+					while($this->db->next_record())
+						$result[] = $this->db->row();
+				}
+
+				$groupsLocked = explode(";",$result[0]['config_value']);
+				
+				foreach( $groupsLocked as $tmp )
+				{
+					$aux = explode(":",$tmp);
+					
+					if(($group.":".$gidnumber) == ($aux[0].":".$aux[1]))
+					{
+						$ous = explode(",", $aux[2]);
+						$key = array_search($organization, $ous);
+
+						if( $key !== false )
+							unset($ous[$key]);
+
+						$groups .= $group.":".$gidnumber.":";
+						
+						foreach($ous as $ouTmp)
+							$groups .= $ouTmp .",";	
+						
+						$groups  = substr($groups,0,strlen($groups)-1);
+						$groups .= ";";
+					}
+					else
+						$groups .= $tmp . ";" ;									
+				}
+					
+				$groups  = substr($groups,0,strlen($groups)-1);
+			
+				$query = "UPDATE phpgw_config SET config_value = '".trim($groups)."' WHERE config_app = 'phpgwapi' AND config_name = 'groups_locked_jabberit';";
+
+				if( $this->db->query($query))
+					$return = true;
+			}
+		}	
+		
+		return $return;
+	}
+	
+	public final function removeAttributesLdap($pOrg)
+	{
+		$organization = $pOrg['org'];
+		
+		if( $this->db )
+		{
+			$query = "SELECT * from phpgw_config WHERE config_app = 'phpgwapi' and config_name = 'attributes_org_ldap_jabberit'";
+				
+			if ( $this->db->query($query) )
+			{	
+				while( $this->db->next_record() )
+					$result[] = $this->db->row();
+		
+				if( count($result) > 0 )
+					$attributesOrg = $result[0]['config_value'];
+			}
+
+			$attributesOrg = explode(",", $attributesOrg);
+			$newValue = ""; 
+			foreach($attributesOrg as $tmp)
+			{
+				$attr = explode(";",$tmp);
+				 
+				if( strtolower(trim($attr[0])) != strtolower(trim($organization)))
+				{
+					$newValue .= $attr[0] . ";" . $attr[1] . ",";
+				}
+			}
+			
+			$newValue = substr($newValue, 0,(strlen($newValue) -1 ));
+			
+			if( trim($newValue) != "")
+				$query = "UPDATE phpgw_config SET config_value = '".$newValue."' WHERE config_app = 'phpgwapi' AND config_name = 'attributes_org_ldap_jabberit'";
+			else
+				$query = "DELETE from phpgw_config where config_name = 'attributes_org_ldap_jabberit'";
+				
+			if( $this->db->query($query))
+				return true;
+			else
+				return false;
+		}
+		return false;	
+	}
+	
+	public final function removeParticipantsExternal($pOrganization)
+	{
+		
+		$organization = $pOrganization['participants'];	
+		
+		if( $this->db )
+		{
+			$query = "SELECT * from phpgw_config WHERE config_app = 'phpgwapi' and config_name = 'conf_organization_jabberit'";
+				
+			if ( $this->db->query($query) )
+			{	
+				while( $this->db->next_record() )
+					$result[] = $this->db->row();
+		
+				if( count($result) > 0 )
+					$valueDB = $result[0]['config_value'];
+			}
+
+			$OrgDB = explode(",", $valueDB);
+			$newValue = ""; 
+
+			foreach($OrgDB as $tmp)
+			{
+				if( strtolower(trim($tmp)) != strtolower(trim($organization)))
+					$newValue .= $tmp . ",";
+			}
+			
+			$newValue = substr($newValue, 0,(strlen($newValue) -1 ));
+			
+			if( trim($newValue) != "")
+				$query = "UPDATE phpgw_config SET config_value = '".$newValue."' WHERE config_app = 'phpgwapi' AND config_name = 'conf_organization_jabberit'";
+			else
+				$query = "DELETE from phpgw_config where config_name = 'conf_organization_jabberit'";
+				
+			if( $this->db->query($query))
+				return true;
+			else
+				return false;
+		}
+		return false;	
+	}
+}
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.boenabledgroups.inc.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.boenabledgroups.inc.php	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/class.boenabledgroups.inc.php	(revision 697)
@@ -0,0 +1,31 @@
+<?php
+
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+require_once "class.db_im.inc.php";
+require_once "jabberit_sessions.inc.php";
+
+class boenabledgroups
+{
+	private $db;
+	
+	function __construct()
+	{
+		$this->db = new db_im();
+	}
+
+	public final function getGroupsBlocked()
+	{
+		return $this->db->getGroupsBlocked();		
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/Controller.class.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/Controller.class.php	(revision 459)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/inc/Controller.class.php	(revision 459)
@@ -0,0 +1,901 @@
+<?php
+  /***************************************************************************\
+  *  Expresso - Expresso Messenger                                            *
+  *  	- 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.                                               *
+  \***************************************************************************/
+
+class Controller
+{
+	const __CONTROLLER_SECURITY__				= 'controller-security';
+	const __CONTROLLER_CONTENTES__				= 'controller-contentes';
+	const __CONTROLLER_SECTIONS__				= 'controller-sections';
+
+	const __STRING_ACCESS__						= 'string-access';
+	const __STRING_DELIMITER__					= 'string-delimiter';
+
+	const __CONTROLLER_CONTENTES_ITEM__			= 'item';
+	const __CONTROLLER_CONTENTES_ITEM_PARAM__	= 'param';
+	const __CONTROLLER_CONTENTES_ITEM_SECTION__	= 'section';
+
+	const __CONTROLLER_SECTIONS_ITEM__			= 'item';
+
+	private $fatalError							= false;
+
+	public function __construct()
+	{
+		try
+		{
+			$controler_xml = dirname(__FILE__) . '/controller.xml';
+			if ( !file_exists($controler_xml) )
+				throw new Exception(__CLASS__ . ' [ ERROR ] :: the configuration file does not exist');
+
+			$this->dom = new DOMDocument;
+			$this->dom->preserveWhiteSpace = FALSE;
+			$this->dom->load($controler_xml);
+
+			unset($controler_xml);
+
+			$this->controller_security = $this->dom->getElementsByTagName(self::__CONTROLLER_SECURITY__);
+			if ( $this->controller_security->length === (int)0 )
+				throw new Exception(__CLASS__ . ' [ ERROR #0 ] :: the tag "' . self::__CONTROLLER_SECURITY__ . '" does not exist');
+			if ( $this->controller_security->length !== (int)1 )
+				throw new Exception(__CLASS__ . ' [ ERROR #1 ] :: exists more of a tag "' . self::__CONTROLLER_SECURITY__ . '"');
+
+			$this->controller_contentes = $this->dom->getElementsByTagName(self::__CONTROLLER_CONTENTES__);
+			if ( $this->controller_contentes->length === (int)0 )
+				throw new Exception(__CLASS__ . ' [ ERROR #2 ] :: the tag "' . self::__CONTROLLER_CONTENTES__ . '" does not exist');
+			if ( $this->controller_contentes->length !== (int)1 )
+				throw new Exception(__CLASS__ . ' [ ERROR #3 ] :: exists more of a tag "' . self::__CONTROLLER_CONTENTES__ . '"');
+			$this->controller_contentes = $this->controller_contentes->item(0);
+
+			$this->controller_sections = $this->dom->getElementsByTagName("controller-sections");
+			if ( $this->controller_sections->length === (int)0 )
+				throw new Exception(__CLASS__ . ' [ ERROR #4 ] :: the tag "' . self::__CONTROLLER_SECTIONS__ . '" does not exist');
+			if ( $this->controller_sections->length !== (int)1 )
+				throw new Exception(__CLASS__ . ' [ ERROR #5 ] :: exists more of a tag "' . self::__CONTROLLER_SECTIONS__ . '"');
+			$this->controller_sections = $this->controller_sections->item(0);
+
+			$this->string_access = $this->controller_security->item(0)->getElementsByTagName(self::__STRING_ACCESS__);
+			if ( $this->string_access->length === (int)0 )
+				throw new Exception(__CLASS__ . ' [ ERROR #6 ] :: the tag "' . self::__STRING_ACCESS__ . '" does not exist');
+			if ( $this->string_access->length !== (int)1 )
+				throw new Exception(__CLASS__ . ' [ ERROR #7 ] :: exists more of a tag "' . self::__STRING_ACCESS__ . '"');
+			$this->string_access = $this->string_access->item(0)->nodeValue;
+
+			$this->string_delimiter = $this->controller_security->item(0)->getElementsByTagName(self::__STRING_DELIMITER__);
+			( $this->string_delimiter->length === (int)0 )
+				and die(__CLASS__ . ' [ ERROR #8 ] :: the tag "' . self::__STRING_DELIMITER__ . '" does not exist');
+			if ( $this->string_delimiter->length !== (int)1 )
+				throw new Exception(__CLASS__ . ' [ ERROR #9 ] :: exists more of a tag "' . self::__STRING_DELIMITER__ . '"');
+			$this->string_delimiter = $this->string_delimiter->item(0)->nodeValue;
+		}
+		catch(Exception $e)
+		{
+			$this->fatalError = true;
+			return $e->getMessage();
+		}
+	}
+
+	public function __call($name, $arguments)
+	{
+		if ( !$this->fatalError )
+			switch ( $name )
+			{
+				case 'exec' :
+					return $this->_exec($arguments[0]);
+				break;
+				default : return "Method not avaible";
+			}
+	}
+
+	public function __toString()
+	{
+		return __CLASS__;
+	}
+
+	private final function _exec(array &$pRequest)
+	{
+		( $pRequest[$this->string_access] )
+			or die(__CLASS__ . ' [ ERROR #10 ] :: bad string action argument');
+
+		list($section_name, $ref, $alias) = explode($this->string_delimiter, $pRequest[$this->string_access]);
+		unset($pRequest[$this->string_access]);
+
+		$contents_itens = $this->controller_contentes->getElementsByTagName(self::__CONTROLLER_CONTENTES_ITEM__);
+
+		for ( $i = 0; $i < $contents_itens->length && $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_PARAM__) != $section_name; $i++ );
+		( !($i < $contents_itens->length) )
+			and die(__CLASS__ . ' [ ERROR #11 ] :: invalid section "' . $section_name . '"');
+
+		$section_name = $contents_itens->item($i)->getAttribute(self::__CONTROLLER_CONTENTES_ITEM_SECTION__);
+
+		$section = $this->controller_sections->getElementsByTagName($section_name);
+		( $section->length === (int)0 )
+			and die(__CLASS__ . ' [ ERROR #12 ] :: the tag "' . $section_name . '" does not exist');
+		( $section->length === (int)1 )
+			or die(__CLASS__ . ' [ ERROR #13 ] :: exists more of a tag "' . $section_name . '"');
+		$section = $section->item(0);
+
+		$section_itens = $section->getElementsByTagName(self::__CONTROLLER_SECTIONS_ITEM__);
+
+		if ( empty($alias) && $alias !== '0' )
+			for ( $i = 0; $i < $section_itens->length && $section_itens->item($i)->getAttribute('ref') != $ref; $i++ );
+		else
+			for ( $i = 0; $i < $section_itens->length && ( $section_itens->item($i)->getAttribute('ref') != $ref || $section_itens->item($i)->getAttribute('alias') !== $alias); $i++ );
+
+		( !($i < $section_itens->length) )
+			and die(__CLASS__ . ' [ ERROR #14 ] :: invalid reference "' . $ref . '"');
+
+		$path = $section_itens->item($i)->getAttribute('path')
+			or $path = $section->getAttribute('path')
+			or die(__CLASS__ . ' [ ERROR #15 ] :: bad path argument');
+
+		$prefix = $section_itens->item($i)->getAttribute('prefix')
+			or $prefix = $section->getAttribute('prefix');
+
+		$suffix = $section_itens->item($i)->getAttribute('suffix')
+			or $suffix = $section->getAttribute('suffix')
+			or die(__CLASS__ . ' [ ERROR #16 ] :: bad suffix argument');
+
+		return $this->$section_name(array("pSectionItem" => $section_itens->item($i), "pPath" => $path, "pPrefix" => $prefix, "pSuffix" => $suffix, "pRequest" => $pRequest));
+	}
+
+	private final function php()
+	{
+		$params = func_get_args();
+		extract($params[0]);
+
+		$class = $pSectionItem->getAttribute('class')
+			and $method = $pSectionItem->getAttribute('method')
+			or die(__CLASS__ . ' [ ERROR #17 ] :: bad class or method argument');
+
+		$file = "{$pPath}/{$pPrefix}{$class}{$pSuffix}";
+
+		file_exists($file)
+			or die(__CLASS__ . ' [ ERROR #18 ] :: the file that has the class was not opened');
+
+		require_once $file;
+
+		$obj = new ReflectionClass($class);
+
+		if ( $pRequest['classConstructor'] )
+		{
+			$obj = $obj->newInstance($pRequest['classConstructor']);
+			unset($pRequest['classConstructor']);
+		}
+		else
+			$obj = $obj->newInstance();
+
+		$method = new ReflectionMethod($class, $method);
+		$result = $method->invoke($obj, $pRequest);
+
+		#$obj = new $class;
+
+		#if ( $pRequest )
+		#	$result = $obj -> $method($pRequest);
+		#else
+		#	$result = $obj -> $method();
+
+		return $result;
+	}
+
+	private final function js()
+	{
+		$params = func_get_args();
+		extract($params[0]);
+
+		$js = $pSectionItem->getAttribute('js')
+			or die(__CLASS__ . ' [ ERROR #18 ] :: bad js argument');
+
+		$file = "{$pPath}/{$pPrefix}{$js}{$pSuffix}";
+
+		file_exists($file)
+			or die(__CLASS__ . ' [ ERROR #19 ] :: the file that has the class was not opened');
+
+		$debug = $pSectionItem->parentNode->getAttribute('debug');
+		if ( $debug && ($debug === 'true') )
+			return file_get_contents($file);
+
+		$packed_file = "{$pPath}/.packer.{$pPrefix}{$js}{$pSuffix}";
+
+		(
+			file_exists($packed_file)
+			and filemtime($packed_file) > filemtime($file)
+			and $packed = file_get_contents($packed_file)
+		)
+		or
+		(
+			$packer = new JavaScriptPacker(file_get_contents($file), 'High ASCII', true, true)
+			and $packed = $packer->pack()
+			and file_put_contents($packed_file, $packed)
+		);
+
+		return $packed;
+	}
+}
+
+class JavaScriptPacker
+{
+	const IGNORE = '$1';
+
+	private $_script = '';
+	private $_encoding = 62;
+	private $_fastDecode = true;
+	private $_specialChars = false;
+
+	private $_parsers = array();
+
+	private $LITERAL_ENCODING = array(
+		'None' => 0,
+		'Numeric' => 10,
+		'Normal' => 62,
+		'High ASCII' => 95
+	);
+
+	public function __construct ($pScript, $pEncoding = 62, $pFastDecode = true, $pSpecialChars = false)
+	{
+		$this->_script = $pScript . "\n";
+		if ( array_key_exists($pEncoding, $this->LITERAL_ENCODING) )
+			$pEncoding = $this->LITERAL_ENCODING[$pEncoding];
+
+		$this->_encoding = min((int)$pEncoding, 95);
+		$this->_fastDecode = $pFastDecode;
+		$this->_specialChars = $pSpecialChars;
+	}
+
+	public function pack()
+	{
+		$this->_addParser('_basicCompression');
+
+		if ( $this->_specialChars )
+			$this->_addParser('_encodeSpecialChars');
+
+		if ( $this->_encoding )
+			$this->_addParser('_encodeKeywords');
+
+		return $this->_pack($this->_script);
+	}
+
+	private function _pack($script)
+   	{
+		for ( $i = 0; isset($this->_parsers[$i]); $i++ )
+			$script = call_user_func(array(&$this,$this->_parsers[$i]), $script);
+
+		return $script;
+	}
+
+	// keep a list of parsing functions, they'll be executed all at once
+	private function _addParser($parser)
+	{
+		$this->_parsers[] = $parser;
+	}
+
+	// zero encoding - just removal of white space and comments
+	private function _basicCompression($script)
+   	{
+		$parser = new ParseMaster();
+		// make safe
+		$parser->escapeChar = '\\';
+		// protect strings
+		$parser->add('/\'[^\'\\n\\r]*\'/', self::IGNORE);
+		$parser->add('/"[^"\\n\\r]*"/', self::IGNORE);
+		// remove comments
+		$parser->add('/\\/\\/[^\\n\\r]*[\\n\\r]/', ' ');
+		$parser->add('/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//', ' ');
+		// protect regular expressions
+		$parser->add('/\\s+(\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?)/', '$2'); // IGNORE
+		$parser->add('/[^\\w\\x24\\/\'"*)\\?:]\\/[^\\/\\n\\r\\*][^\\/\\n\\r]*\\/g?i?/', self::IGNORE);
+		// remove: ;;; doSomething();
+		if ($this->_specialChars) $parser->add('/;;;[^\\n\\r]+[\\n\\r]/');
+		// remove redundant semi-colons
+		$parser->add('/\\(;;\\)/', self::IGNORE); // protect for (;;) loops
+		$parser->add('/;+\\s*([};])/', '$2');
+		// apply the above
+		$script = $parser->exec($script);
+
+		// remove white-space
+		$parser->add('/(\\b|\\x24)\\s+(\\b|\\x24)/', '$2 $3');
+		$parser->add('/([+\\-])\\s+([+\\-])/', '$2 $3');
+		$parser->add('/\\s+/', '');
+		// done
+		return $parser->exec($script);
+	}
+
+	private function _encodeSpecialChars($script)
+	{
+		$parser = new ParseMaster();
+		// replace: $name -> n, $$name -> na
+		$parser->add('/((\\x24+)([a-zA-Z$_]+))(\\d*)/',
+					 array('fn' => '_replace_name')
+		);
+		// replace: _name -> _0, double-underscore (__name) is ignored
+		$regexp = '/\\b_[A-Za-z\\d]\\w*/';
+		// build the word list
+		$keywords = $this->_analyze($script, $regexp, '_encodePrivate');
+		// quick ref
+		$encoded = $keywords['encoded'];
+
+		$parser->add($regexp,
+			array(
+				'fn' => '_replace_encoded',
+				'data' => $encoded
+			)
+		);
+		return $parser->exec($script);
+	}
+
+	private function _encodeKeywords($script) {
+		// escape high-ascii values already in the script (i.e. in strings)
+		if ($this->_encoding > 62)
+			$script = $this->_escape95($script);
+		// create the parser
+		$parser = new ParseMaster();
+		$encode = $this->_getEncoder($this->_encoding);
+		// for high-ascii, don't encode single character low-ascii
+		$regexp = ($this->_encoding > 62) ? '/\\w\\w+/' : '/\\w+/';
+		// build the word list
+		$keywords = $this->_analyze($script, $regexp, $encode);
+		$encoded = $keywords['encoded'];
+
+		// encode
+		$parser->add($regexp,
+			array(
+				'fn' => '_replace_encoded',
+				'data' => $encoded
+			)
+		);
+		if (empty($script)) return $script;
+		else {
+			//$res = $parser->exec($script);
+			//$res = $this->_bootStrap($res, $keywords);
+			//return $res;
+			return $this->_bootStrap($parser->exec($script), $keywords);
+		}
+	}
+
+	private function _analyze($script, $regexp, $encode) {
+		// analyse
+		// retreive all words in the script
+		$all = array();
+		preg_match_all($regexp, $script, $all);
+		$_sorted = array(); // list of words sorted by frequency
+		$_encoded = array(); // dictionary of word->encoding
+		$_protected = array(); // instances of "protected" words
+		$all = $all[0]; // simulate the javascript comportement of global match
+		if (!empty($all)) {
+			$unsorted = array(); // same list, not sorted
+			$protected = array(); // "protected" words (dictionary of word->"word")
+			$value = array(); // dictionary of charCode->encoding (eg. 256->ff)
+			$this->_count = array(); // word->count
+			$i = count($all); $j = 0; //$word = null;
+			// count the occurrences - used for sorting later
+			do {
+				--$i;
+				$word = '$' . $all[$i];
+				if (!isset($this->_count[$word])) {
+					$this->_count[$word] = 0;
+					$unsorted[$j] = $word;
+					// make a dictionary of all of the protected words in this script
+					//  these are words that might be mistaken for encoding
+					//if (is_string($encode) && method_exists($this, $encode))
+					$values[$j] = call_user_func(array(&$this, $encode), $j);
+					$protected['$' . $values[$j]] = $j++;
+				}
+				// increment the word counter
+				$this->_count[$word]++;
+			} while ($i > 0);
+			// prepare to sort the word list, first we must protect
+			//  words that are also used as codes. we assign them a code
+			//  equivalent to the word itself.
+			// e.g. if "do" falls within our encoding range
+			//      then we store keywords["do"] = "do";
+			// this avoids problems when decoding
+			$i = count($unsorted);
+			do {
+				$word = $unsorted[--$i];
+				if (isset($protected[$word]) /*!= null*/) {
+					$_sorted[$protected[$word]] = substr($word, 1);
+					$_protected[$protected[$word]] = true;
+					$this->_count[$word] = 0;
+				}
+			} while ($i);
+
+			// sort the words by frequency
+			// Note: the javascript and php version of sort can be different :
+			// in php manual, usort :
+			// " If two members compare as equal,
+			// their order in the sorted array is undefined."
+			// so the final packed script is different of the Dean's javascript version
+			// but equivalent.
+			// the ECMAscript standard does not guarantee this behaviour,
+			// and thus not all browsers (e.g. Mozilla versions dating back to at
+			// least 2003) respect this.
+			usort($unsorted, array(&$this, '_sortWords'));
+			$j = 0;
+			// because there are "protected" words in the list
+			//  we must add the sorted words around them
+			do {
+				if (!isset($_sorted[$i]))
+					$_sorted[$i] = substr($unsorted[$j++], 1);
+				$_encoded[$_sorted[$i]] = $values[$i];
+			} while (++$i < count($unsorted));
+		}
+		return array(
+			'sorted'  => $_sorted,
+			'encoded' => $_encoded,
+			'protected' => $_protected);
+	}
+
+	private $_count = array();
+	private function _sortWords($match1, $match2) {
+		return $this->_count[$match2] - $this->_count[$match1];
+	}
+
+	// build the boot function used for loading and decoding
+	private function _bootStrap($packed, $keywords) {
+		$ENCODE = $this->_safeRegExp('$encode\\($count\\)');
+
+		// $packed: the packed script
+		$packed = "'" . $this->_escape($packed) . "'";
+
+		// $ascii: base for encoding
+		$ascii = min(count($keywords['sorted']), $this->_encoding);
+		if ($ascii == 0) $ascii = 1;
+
+		// $count: number of words contained in the script
+		$count = count($keywords['sorted']);
+
+		// $keywords: list of words contained in the script
+		foreach ($keywords['protected'] as $i=>$value) {
+			$keywords['sorted'][$i] = '';
+		}
+		// convert from a string to an array
+		ksort($keywords['sorted']);
+		$keywords = "'" . implode('|',$keywords['sorted']) . "'.split('|')";
+
+		$encode = ($this->_encoding > 62) ? '_encode95' : $this->_getEncoder($ascii);
+		$encode = $this->_getJSFunction($encode);
+		$encode = preg_replace('/_encoding/','$ascii', $encode);
+		$encode = preg_replace('/arguments\\.callee/','$encode', $encode);
+		$inline = '\\$count' . ($ascii > 10 ? '.toString(\\$ascii)' : '');
+
+		// $decode: code snippet to speed up decoding
+		if ($this->_fastDecode) {
+			// create the decoder
+			$decode = $this->_getJSFunction('_decodeBody');
+			if ($this->_encoding > 62)
+				$decode = preg_replace('/\\\\w/', '[\\xa1-\\xff]', $decode);
+			// perform the encoding inline for lower ascii values
+			elseif ($ascii < 36)
+				$decode = preg_replace($ENCODE, $inline, $decode);
+			// special case: when $count==0 there are no keywords. I want to keep
+			//  the basic shape of the unpacking funcion so i'll frig the code...
+			if ($count == 0)
+				$decode = preg_replace($this->_safeRegExp('($count)\\s*=\\s*1'), '$1=0', $decode, 1);
+		}
+
+		// boot function
+		$unpack = $this->_getJSFunction('_unpack');
+		if ($this->_fastDecode) {
+			// insert the decoder
+			$this->buffer = $decode;
+			$unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastDecode'), $unpack, 1);
+		}
+		$unpack = preg_replace('/"/', "'", $unpack);
+		if ($this->_encoding > 62) { // high-ascii
+			// get rid of the word-boundaries for regexp matches
+			$unpack = preg_replace('/\'\\\\\\\\b\'\s*\\+|\\+\s*\'\\\\\\\\b\'/', '', $unpack);
+		}
+		if ($ascii > 36 || $this->_encoding > 62 || $this->_fastDecode) {
+			// insert the encode function
+			$this->buffer = $encode;
+			$unpack = preg_replace_callback('/\\{/', array(&$this, '_insertFastEncode'), $unpack, 1);
+		} else {
+			// perform the encoding inline
+			$unpack = preg_replace($ENCODE, $inline, $unpack);
+		}
+		// pack the boot function too
+		$unpackPacker = new JavaScriptPacker($unpack, 0, false, true);
+		$unpack = $unpackPacker->pack();
+
+		// arguments
+		$params = array($packed, $ascii, $count, $keywords);
+		if ($this->_fastDecode) {
+			$params[] = 0;
+			$params[] = '{}';
+		}
+		$params = implode(',', $params);
+
+		// the whole thing
+		return 'eval(' . $unpack . '(' . $params . "))\n";
+	}
+
+	private $buffer;
+	private function _insertFastDecode($match) {
+		return '{' . $this->buffer . ';';
+	}
+	private function _insertFastEncode($match) {
+		return '{$encode=' . $this->buffer . ';';
+	}
+
+	// mmm.. ..which one do i need ??
+	private function _getEncoder($ascii) {
+		return $ascii > 10 ? $ascii > 36 ? $ascii > 62 ?
+		       '_encode95' : '_encode62' : '_encode36' : '_encode10';
+	}
+
+	// zero encoding
+	// characters: 0123456789
+	private function _encode10($charCode) {
+		return $charCode;
+	}
+
+	// inherent base36 support
+	// characters: 0123456789abcdefghijklmnopqrstuvwxyz
+	private function _encode36($charCode) {
+		return base_convert($charCode, 10, 36);
+	}
+
+	// hitch a ride on base36 and add the upper case alpha characters
+	// characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+	private function _encode62($charCode) {
+		$res = '';
+		if ($charCode >= $this->_encoding) {
+			$res = $this->_encode62((int)($charCode / $this->_encoding));
+		}
+		$charCode = $charCode % $this->_encoding;
+
+		if ($charCode > 35)
+			return $res . chr($charCode + 29);
+		else
+			return $res . base_convert($charCode, 10, 36);
+	}
+
+	// use high-ascii values
+	// characters: Â¡Â¢Â£Â€Â¥ÂŠÂ§ÂšÂ©ÂªÂ«Â¬Â­Â®Â¯Â°Â±Â²Â³ÂŽÂµÂ¶Â·ÂžÂ¹ÂºÂ»ÂŒÂœÂŸÂ¿ÃÃÃÃÃÃ
+ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ Ã¡Ã¢Ã£Ã€Ã¥ÃŠÃ§ÃšÃ©ÃªÃ«Ã¬Ã­Ã®Ã¯Ã°Ã±Ã²Ã³ÃŽÃµÃ¶Ã·ÃžÃ¹ÃºÃ»ÃŒÃœÃŸ
+	private function _encode95($charCode) {
+		$res = '';
+		if ($charCode >= $this->_encoding)
+			$res = $this->_encode95($charCode / $this->_encoding);
+
+		return $res . chr(($charCode % $this->_encoding) + 161);
+	}
+
+	private function _safeRegExp($string) {
+		return '/'.preg_replace('/\$/', '\\\$', $string).'/';
+	}
+
+	private function _encodePrivate($charCode) {
+		return "_" . $charCode;
+	}
+
+	// protect characters used by the parser
+	private function _escape($script) {
+		return preg_replace('/([\\\\\'])/', '\\\$1', $script);
+	}
+
+	// protect high-ascii characters already in the script
+	private function _escape95($script) {
+		return preg_replace_callback(
+			'/[\\xa1-\\xff]/',
+			array(&$this, '_escape95Bis'),
+			$script
+		);
+	}
+	private function _escape95Bis($match) {
+		return '\x'.((string)dechex(ord($match)));
+	}
+
+
+	private function _getJSFunction($aName) {
+		if (defined('self::JSFUNCTION'.$aName))
+			return constant('self::JSFUNCTION'.$aName);
+		else
+			return '';
+	}
+
+	// JavaScript Functions used.
+	// Note : In Dean's version, these functions are converted
+	// with 'String(aFunctionName);'.
+	// This internal conversion complete the original code, ex :
+	// 'while (aBool) anAction();' is converted to
+	// 'while (aBool) { anAction(); }'.
+	// The JavaScript functions below are corrected.
+
+	// unpacking function - this is the boot strap function
+	//  data extracted from this packing routine is passed to
+	//  this function when decoded in the target
+	// NOTE ! : without the ';' final.
+	const JSFUNCTION_unpack =
+
+'function($packed, $ascii, $count, $keywords, $encode, $decode) {
+    while ($count--) {
+        if ($keywords[$count]) {
+            $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]);
+        }
+    }
+    return $packed;
+}';
+/*
+'function($packed, $ascii, $count, $keywords, $encode, $decode) {
+    while ($count--)
+        if ($keywords[$count])
+            $packed = $packed.replace(new RegExp(\'\\\\b\' + $encode($count) + \'\\\\b\', \'g\'), $keywords[$count]);
+    return $packed;
+}';
+*/
+
+	// code-snippet inserted into the unpacker to speed up decoding
+	const JSFUNCTION_decodeBody =
+//_decode = function() {
+// does the browser support String.replace where the
+//  replacement value is a function?
+
+'    if (!\'\'.replace(/^/, String)) {
+        // decode all the values we need
+        while ($count--) {
+            $decode[$encode($count)] = $keywords[$count] || $encode($count);
+        }
+        // global replacement function
+        $keywords = [function ($encoded) {return $decode[$encoded]}];
+        // generic match
+        $encode = function () {return \'\\\\w+\'};
+        // reset the loop counter -  we are now doing a global replace
+        $count = 1;
+    }
+';
+//};
+/*
+'	if (!\'\'.replace(/^/, String)) {
+        // decode all the values we need
+        while ($count--) $decode[$encode($count)] = $keywords[$count] || $encode($count);
+        // global replacement function
+        $keywords = [function ($encoded) {return $decode[$encoded]}];
+        // generic match
+        $encode = function () {return\'\\\\w+\'};
+        // reset the loop counter -  we are now doing a global replace
+        $count = 1;
+    }';
+*/
+
+	 // zero encoding
+	 // characters: 0123456789
+	 const JSFUNCTION_encode10 =
+'function($charCode) {
+    return $charCode;
+}';//;';
+
+	 // inherent base36 support
+	 // characters: 0123456789abcdefghijklmnopqrstuvwxyz
+	 const JSFUNCTION_encode36 =
+'function($charCode) {
+    return $charCode.toString(36);
+}';//;';
+
+	// hitch a ride on base36 and add the upper case alpha characters
+	// characters: 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
+	const JSFUNCTION_encode62 =
+'function($charCode) {
+    return ($charCode < _encoding ? \'\' : arguments.callee(parseInt($charCode / _encoding))) +
+    (($charCode = $charCode % _encoding) > 35 ? String.fromCharCode($charCode + 29) : $charCode.toString(36));
+}';
+
+	// use high-ascii values
+	// characters: Â¡Â¢Â£Â€Â¥ÂŠÂ§ÂšÂ©ÂªÂ«Â¬Â­Â®Â¯Â°Â±Â²Â³ÂŽÂµÂ¶Â·ÂžÂ¹ÂºÂ»ÂŒÂœÂŸÂ¿ÃÃÃÃÃÃ
+ÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃÃ Ã¡Ã¢Ã£Ã€Ã¥ÃŠÃ§ÃšÃ©ÃªÃ«Ã¬Ã­Ã®Ã¯Ã°Ã±Ã²Ã³ÃŽÃµÃ¶Ã·ÃžÃ¹ÃºÃ»ÃŒÃœÃŸ
+	const JSFUNCTION_encode95 =
+'function($charCode) {
+    return ($charCode < _encoding ? \'\' : arguments.callee($charCode / _encoding)) +
+        String.fromCharCode($charCode % _encoding + 161);
+}';
+
+}
+
+
+class ParseMaster {
+	public $ignoreCase = false;
+	public $escapeChar = '';
+
+	// constants
+	const EXPRESSION = 0;
+	const REPLACEMENT = 1;
+	const LENGTH = 2;
+
+	// used to determine nesting levels
+	private $GROUPS = '/\\(/';//g
+	private $SUB_REPLACE = '/\\$\\d/';
+	private $INDEXED = '/^\\$\\d+$/';
+	private $TRIM = '/([\'"])\\1\\.(.*)\\.\\1\\1$/';
+	private $ESCAPE = '/\\\./';//g
+	private $QUOTE = '/\'/';
+	private $DELETED = '/\\x01[^\\x01]*\\x01/';//g
+
+	public function add($expression, $replacement = '') {
+		// count the number of sub-expressions
+		//  - add one because each pattern is itself a sub-expression
+		$length = 1 + preg_match_all($this->GROUPS, $this->_internalEscape((string)$expression), $out);
+
+		// treat only strings $replacement
+		if (is_string($replacement)) {
+			// does the pattern deal with sub-expressions?
+			if (preg_match($this->SUB_REPLACE, $replacement)) {
+				// a simple lookup? (e.g. "$2")
+				if (preg_match($this->INDEXED, $replacement)) {
+					// store the index (used for fast retrieval of matched strings)
+					$replacement = (int)(substr($replacement, 1)) - 1;
+				} else { // a complicated lookup (e.g. "Hello $2 $1")
+					// build a function to do the lookup
+					$quote = preg_match($this->QUOTE, $this->_internalEscape($replacement))
+					         ? '"' : "'";
+					$replacement = array(
+						'fn' => '_backReferences',
+						'data' => array(
+							'replacement' => $replacement,
+							'length' => $length,
+							'quote' => $quote
+						)
+					);
+				}
+			}
+		}
+		// pass the modified arguments
+		if (!empty($expression)) $this->_add($expression, $replacement, $length);
+		else $this->_add('/^$/', $replacement, $length);
+	}
+
+	public function exec($string) {
+		// execute the global replacement
+		$this->_escaped = array();
+
+		// simulate the _patterns.toSTring of Dean
+		$regexp = '/';
+		foreach ($this->_patterns as $reg) {
+			$regexp .= '(' . substr($reg[self::EXPRESSION], 1, -1) . ')|';
+		}
+		$regexp = substr($regexp, 0, -1) . '/';
+		$regexp .= ($this->ignoreCase) ? 'i' : '';
+
+		$string = $this->_escape($string, $this->escapeChar);
+		$string = preg_replace_callback(
+			$regexp,
+			array(
+				&$this,
+				'_replacement'
+			),
+			$string
+		);
+		$string = $this->_unescape($string, $this->escapeChar);
+
+		return preg_replace($this->DELETED, '', $string);
+	}
+
+	public function reset() {
+		// clear the patterns collection so that this object may be re-used
+		$this->_patterns = array();
+	}
+
+	// private
+	private $_escaped = array();  // escaped characters
+	private $_patterns = array(); // patterns stored by index
+
+	// create and add a new pattern to the patterns collection
+	private function _add() {
+		$arguments = func_get_args();
+		$this->_patterns[] = $arguments;
+	}
+
+	// this is the global replace function (it's quite complicated)
+	private function _replacement($arguments) {
+		if (empty($arguments)) return '';
+
+		$i = 1; $j = 0;
+		// loop through the patterns
+		while (isset($this->_patterns[$j])) {
+			$pattern = $this->_patterns[$j++];
+			// do we have a result?
+			if (isset($arguments[$i]) && ($arguments[$i] != '')) {
+				$replacement = $pattern[self::REPLACEMENT];
+
+				if (is_array($replacement) && isset($replacement['fn'])) {
+
+					if (isset($replacement['data'])) $this->buffer = $replacement['data'];
+					return call_user_func(array(&$this, $replacement['fn']), $arguments, $i);
+
+				} elseif (is_int($replacement)) {
+					return $arguments[$replacement + $i];
+
+				}
+				$delete = ($this->escapeChar == '' ||
+				           strpos($arguments[$i], $this->escapeChar) === false)
+				        ? '' : "\x01" . $arguments[$i] . "\x01";
+				return $delete . $replacement;
+
+			// skip over references to sub-expressions
+			} else {
+				$i += $pattern[self::LENGTH];
+			}
+		}
+	}
+
+	private function _backReferences($match, $offset) {
+		$replacement = $this->buffer['replacement'];
+		$quote = $this->buffer['quote'];
+		$i = $this->buffer['length'];
+		while ($i) {
+			$replacement = str_replace('$'.$i--, $match[$offset + $i], $replacement);
+		}
+		return $replacement;
+	}
+
+	private function _replace_name($match, $offset){
+		$length = strlen($match[$offset + 2]);
+		$start = $length - max($length - strlen($match[$offset + 3]), 0);
+		return substr($match[$offset + 1], $start, $length) . $match[$offset + 4];
+	}
+
+	private function _replace_encoded($match, $offset) {
+		return $this->buffer[$match[$offset]];
+	}
+
+
+	// php : we cannot pass additional data to preg_replace_callback,
+	// and we cannot use &$this in create_function, so let's go to lower level
+	private $buffer;
+
+	// encode escaped characters
+	private function _escape($string, $escapeChar) {
+		if ($escapeChar) {
+			$this->buffer = $escapeChar;
+			return preg_replace_callback(
+				'/\\' . $escapeChar . '(.)' .'/',
+				array(&$this, '_escapeBis'),
+				$string
+			);
+
+		} else {
+			return $string;
+		}
+	}
+	private function _escapeBis($match) {
+		$this->_escaped[] = $match[1];
+		return $this->buffer;
+	}
+
+	// decode escaped characters
+	private function _unescape($string, $escapeChar) {
+		if ($escapeChar) {
+			$regexp = '/'.'\\'.$escapeChar.'/';
+			$this->buffer = array('escapeChar'=> $escapeChar, 'i' => 0);
+			return preg_replace_callback
+			(
+				$regexp,
+				array(&$this, '_unescapeBis'),
+				$string
+			);
+
+		} else {
+			return $string;
+		}
+	}
+	private function _unescapeBis() {
+		if (!empty($this->_escaped[$this->buffer['i']])) {
+			 $temp = $this->_escaped[$this->buffer['i']];
+		} else {
+			$temp = '';
+		}
+		$this->buffer['i']++;
+		return $this->buffer['escapeChar'] . $temp;
+	}
+
+	private function _internalEscape($string) {
+		return preg_replace($this->ESCAPE, '', $string);
+	}
+}
+
+?>
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/readme.txt
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/readme.txt	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/readme.txt	(revision 382)
@@ -0,0 +1,95 @@
+To deploy Jeti copy the extracted contents to your website, you only have to copy the plugins and emoticons that you want to use. If you changed some plugins or emoticons you should update the plugins.xml and/or the emoticons.xml files. You can do that by hand with a text editor, or by running Jeti as standalone java application (java -jar applet.jar, or double click on the applet.jar file). If you can't run it at you webhost run it localy and copy the xml file to your webhost. You should also add the plugins you use to the applet tag in the html file you use to start Jeti
+
+There are no requirements to your webhost, only the browsers of your users must have at least java 1.4
+
+If you want some advertisment for your applet you can add it to the Jeti applets page: http://jeti.sourceforge.net/mwiki/index.php/Jeti_Sites
+
+The Jeti applet can be configured in different ways to match your requirements, if your changes don't work, you can try to restart your browser or clear the java cache All things that can be changed in the normal Jeti can also be changed in the applet version, just start it as java application as written above. If you want the applet to use automatic language detection open the preferences.xml file and remove the lines <preference key="jeti.country" value="(country ID)"/>
+<preference key="spell.defaultLanguage" value="(language)"/>
+and upload the preferences.xml file to your webhost
+
+If you want to lock the preferences so the users can't change them you can copy the lines you don't want the users to change to a new file called default.xml and put it in the root jeti directory. The default.xml also has some extra options to remove some menu entries, just add them to that file. The default.xml file should start with <?xml version='1.0'?> <preferences> and end with </preferences> with some <preference key="" value="false"> between.
+
+Extra default.xml options:
+Main Jeti menu
+<preference key="jeti.jetimenuShowMessage" value="false"/>
+<preference key="jeti.jetimenuShowAccount" value="false"/>
+<preference key="jeti.jetimenuShowOptions" value="false"/>
+<preference key="jeti.jetimenuShowLog" value="false"/>
+<preference key="jeti.jetimenuShowAddContact" value="false"/>
+<preference key="jeti.jetimenuShowChat" value="false"/>
+<preference key="jeti.jetimenuShowExit" value="false"/>
+<preference key="jeti.jetimenuShowComment" value="false"/>
+
+Roster menu
+<preference key="jeti.rostermenuShowMessage" value="false"/>
+<preference key="jeti.rostermenuShowChat" value="false"/>
+<preference key="jeti.rostermenuSubscriptions" value="false"/>
+<preference key="jeti.rostermenuRemove" value="false"/>
+<preference key="jeti.rostermenuRename" value="false"/>
+<preference key="jeti.rostermenuGroup" value="false"/>
+<preference key="jeti.rostermenuLocalTime" value="false"/>
+<preference key="jeti.rostermenuLocalVersion" value="false"/>
+<preference key="jeti.rostermenuLastSeen" value="false"/>
+<preference key="jeti.rostermenuInvisible" value="false"/>
+
+Change the jid where comments are send to from the comment/bug window <preference key="jeti.commentJID" value="a jid"/>
+
+Hide the servers pane in the Jeti main window
+<preference key="jeti.hideServerPanel" value="true"/>
+
+Hide the text error in the servers pane on a error
+<preference key="jeti.jetiShowError" value="false"/>
+
+Hide the groupchat Menu in the groupchat window
+<preference key="groupchat.hideGroupchatMenu" value="true"/>
+Hide the groupchat menu entry in the Jeti menu
+<preference key="groupchat.hideGroupchatMenuEntry" value="true"/>
+Hide the groupchat status change button
+<preference key="groupchat.hideGroupchatStatusButton" value="true"/>
+<preference key="groupchat.hideServerChooser" value="true"/>
+<preference key="groupchat.defaultGroupchatServer" value="groupchat.server.tld"/>The groupchat server to use
+<preference key="groupchat.hideNicknameChooser" value="true"/>
+
+Disable the private chat options in groupchat
+<preference key="groupchat.privateMessageingAllowed" value="false"/>
+
+Things to hide in the login window
+Hide the whole window
+<preference key="jeti.hideLoginWindow" value="true"/>
+Hide the server selection box
+<preference key="jeti.hideServerSelect" value="true"/>
+Hide the port and ssl selection in the login window
+<preference key="jeti.hidePortSelect" value="true"/>
+Hide the resource input field
+<preference key="jeti.hideResourceInput" value="true"/>
+Hide the register button
+<preference key="jeti.hideRegisterButton" value="true"/>
+
+Anonymous Login
+Anonymous login using SASL only works with the xmpp plugin enabled and the server supporting it
+<preference key="xmpp.anonymousLogin" value="true"/>
+The jabber server basil.cd.chalmers.se supports this, but only allows you to use the groupchats at conference.jabber.cd.chalmers.se. You can also use this server without the XMPP plugin by just login in with any username/password
+
+There are also some options you can set in the applet tag in the jeti.html file (see jetiParams.html for an example)
+
+<PARAM NAME=SERVER VALUE="The jabber server to connect with" >
+<PARAM NAME=HOST VALUE="The server to connect with, if it is different then the jabber server" >
+<PARAM NAME=PORT VALUE=5223 > The port to connect to
+<PARAM NAME=SSL VALUE=true > (Use SSL or not)
+<PARAM NAME=USER VALUE="username" > The username
+<PARAM NAME=PASSWORD VALUE="password" > The password of the user (for automatic login)
+<PARAM NAME=GROUPCHATSERVER VALUE="groupchat.server"> The groupchat server to connect to on load
+<PARAM NAME=GROUPCHATROOM VALUE="room" > The groupchat room to connect to on load
+<PARAM NAME=GROUPINVITE VALUE="jid1,jid2,jid3" > Invite the specified users users to the room if the applet is started
+<PARAM NAME=GROUPCHATROOM2 VALUE="room" > The second groupchat room to connect to on load, only works with SHOWGROUPCHATASMAIN
+<PARAM NAME=RESOURCE VALUE=JetiApplet > The resource, when "random" Jeti will choose a random one
+<PARAM NAME=CHATTO VALUE="user@server" > open a chat to user on login
+<PARAM NAME=SHOWCHATTOASMAIN value="TRUE"> show the chatwindow defined in chatto as main window <PARAM NAME=SHOWGROUPCHATASMAIN VALUE="TRUE"> hide the main Jeti window and show only the groupchat window
+<PARAM NAME=HIDELOGINSTATUS VALUE="TRUE" > Hide the login status window
+<PARAM NAME=EXITPAGE VALUE="an url" > The url Jeti should go to on exit. Use "javascript:window.close();" as value to close the window on exit
+<PARAM NAME=GROUPCHATNICK VALUE="nickname"> The nickname to use in the groupchat on load (otherwise it uses the JID username as nick, or it asks the user if RESOURCE has the value random)
+<PARAM NAME=OWNNAME VALUE="nickname"> Your name in the chatwindows
+
+You can also use the jeti preferences in the applet parameters to allow for dynamic per user preferences for example:
+<PARAM NAME=DEFAULTPREFERENCES VALUE="jeti.enterSends#false;jeti.menutop#true;jeti.language#it;metaltheme.color1#-3088897; 
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/editSelect.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/editSelect.js	(revision 519)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/editSelect.js	(revision 519)
@@ -0,0 +1,184 @@
+(function()
+{
+	// Path to arrow images
+	var arrowImage = path_jabberit + 'templates/default/images/select_arrow.gif';				// Regular arrow
+	var arrowImageOver = path_jabberit + 'templates/default/images/select_arrow_over.gif';		// Mouse over
+	var arrowImageDown = path_jabberit + 'templates/default/images/select_arrow_down.gif';		// Mouse down
+
+	var activeOption;
+	var selectBoxIds = 0;
+	var currentlyOpenedOptionBox = false;
+	var editableSelect_activeArrow = false;
+	
+	function configEvents(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+	
+	function createEditableSelect()
+	{
+		if( arguments.length > 0 )
+			dest = arguments[0];
+		else
+			return false; 
+			
+		dest.className='selectBoxInput';		
+		
+		var div = document.createElement('DIV');
+			div.style.styleFloat = 'left';
+			div.style.left = '92px';
+			div.style.width = dest.offsetWidth + 16 + 'px';
+			div.style.position = 'absolute';
+			div.id = 'selectBox' + selectBoxIds;
+		
+		var parent = dest.parentNode;
+			parent.insertBefore(div,dest);
+		
+		div.appendChild(dest);	
+		div.className='selectBox';
+		div.style.zIndex = 10000 - selectBoxIds;
+
+		var img = document.createElement('IMG');
+		img.src = arrowImage;
+		img.className = 'selectBoxArrow';
+		
+		img.onclick = selectBox_showOptions;
+		img.id = 'arrowSelectBox' + selectBoxIds;
+
+		div.appendChild(img);
+		
+		var optionDiv = document.createElement('DIV');
+			optionDiv.id = 'selectBoxOptions' + selectBoxIds;
+			optionDiv.className='selectBoxOptionContainer';
+			optionDiv.style.width = div.offsetWidth-2 + 'px';
+		
+		div.appendChild(optionDiv);
+		
+		if(dest.getAttribute('selectBoxOptions'))
+		{
+			var options = dest.getAttribute('selectBoxOptions').split(';');
+			var optionsTotalHeight = 0;
+			var optionArray = new Array();
+			for(var no = 0 ; no < options.length ; no++)
+			{
+				var anOption = document.createElement('DIV');
+					anOption.innerHTML = options[no];
+					anOption.className='selectBoxAnOption';
+					anOption.onclick = selectOptionValue;
+					anOption.style.width = optionDiv.style.width.replace('px','') - 2 + 'px'; 
+					anOption.onmouseover = highlightSelectBoxOption;
+				
+				optionDiv.appendChild(anOption);	
+				optionsTotalHeight = optionsTotalHeight + anOption.offsetHeight;
+				optionArray.push(anOption);
+			}
+		
+			if(optionsTotalHeight > optionDiv.offsetHeight)
+			{				
+				for(var no = 0; no < optionArray.length ; no++)
+				{
+					optionArray[no].style.width = optionDiv.style.width.replace('px','') - 22 + 'px';
+				} 	
+			}		
+			optionDiv.style.display = 'none';
+			optionDiv.style.visibility = 'visible';
+		}
+
+		configEvents(dest,
+					'onkeydown',
+					function(e)
+					{
+						switch(e.keyCode)
+						{
+							case 13:
+							case 27:							
+								dest.value = dest.value;
+						        dest.focus();
+        						dest.select();
+    							break;
+						}
+					});
+					
+		configEvents(dest,
+					 'onclick',
+					 function(e)
+					 {	
+						dest.value = dest.value;
+						dest.focus();
+        				dest.select();
+						document.getElementById('selectBoxOptions0').style.display='none';
+						document.getElementById('arrowSelectBox0').src = arrowImageOver;														
+					 });		
+	}
+
+	function highlightSelectBoxOption()
+	{
+		if( this.style.backgroundColor == '#316AC5' )
+		{
+			this.style.backgroundColor = '';
+			this.style.color = '';
+		}
+		else
+		{
+			this.style.backgroundColor = '#316AC5';
+			this.style.color = '#FFF';			
+		}	
+		
+		if( activeOption )
+		{
+			activeOption.style.backgroundColor='';
+			activeOption.style.color='';			
+		}
+		activeOption = this;
+	}
+
+	function selectOptionValue()
+	{
+		var parentNode = this.parentNode.parentNode;
+		var textInput = parentNode.getElementsByTagName('INPUT')[0];
+		textInput.value = this.innerHTML;
+		this.parentNode.style.display='none';
+		document.getElementById('arrowSelectBox' + parentNode.id.replace(/[^\d]/g,'')).src = arrowImageOver;
+	}
+
+	function selectBox_showOptions()
+	{
+		if( editableSelect_activeArrow && editableSelect_activeArrow!=this )
+			editableSelect_activeArrow.src = arrowImage;
+
+		editableSelect_activeArrow = this;
+		
+		var numId = this.id.replace(/[^\d]/g,'');
+		var optionDiv = document.getElementById('selectBoxOptions' + numId);
+		if(optionDiv.style.display=='block')
+		{
+			optionDiv.style.display='none';
+			this.src = arrowImageOver;	
+		}
+		else
+		{			
+			optionDiv.style.display='block';
+			this.src = arrowImageDown;	
+			
+			if( currentlyOpenedOptionBox && currentlyOpenedOptionBox!=optionDiv)
+				currentlyOpenedOptionBox.style.display='none';	
+			
+			currentlyOpenedOptionBox= optionDiv;			
+		}
+	}
+
+	function editableSelect(){}
+	
+	editableSelect.prototype.create = createEditableSelect;
+	window.editS = new editableSelect;
+		
+})();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/images.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/images.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/images.js	(revision 697)
@@ -0,0 +1,28 @@
+// Images IM
+	
+	var jabberit_add_user = new Image();
+	jabberit_add_user.src = path_jabberit + 'templates/default/images/adduser_azul.png';
+
+	var jabberit_group_close = new Image();
+	jabberit_group_close.src = path_jabberit + 'templates/default/images/group_close.gif';
+
+	var jabberit_group_open = new Image();
+	jabberit_group_open.src = path_jabberit + 'templates/default/images/group_open.gif';
+
+	var available_jabberit = new Image();
+	available_jabberit.src =  path_jabberit + 'templates/default/images/available.gif';
+
+	var chat_jabberit = new Image();
+	chat_jabberit.src =  path_jabberit + 'templates/default/images/chat.gif';
+
+	var away_jabberit = new Image();
+	away_jabberit.src =  path_jabberit + 'templates/default/images/away.gif';
+
+	var xa_jabberit = new Image();
+	xa_jabberit.src =  path_jabberit + 'templates/default/images/xa.gif';
+	
+	var dnd_jabberit = new Image();
+	dnd_jabberit.src = path_jabberit + 'templates/default/images/dnd.gif';
+	
+	var invisible_jabberit = new Image();
+	invisible_jabberit.src = path_jabberit + 'templates/default/images/invisible.gif';
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/functions.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/functions.js	(revision 417)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/functions.js	(revision 417)
@@ -0,0 +1,49 @@
+(function()
+{
+	
+	function addApplication()
+	{
+		var select_appList = document.getElementById('apps_list');
+		for(var i = 0; i < select_appList.options.length ; i++)
+			if( select_appList.options[i].selected )
+			{
+				var select_appEnabled =  document.getElementById('apps_enabled');
+				var flag = false;
+				for(var j = 0; j < select_appEnabled.options.length ; j++ )
+				{
+					if( select_appEnabled.options[j].value === select_appList.options[i].value )
+						flag = true;
+				}
+				
+				if ( !flag )
+					select_appEnabled.options[select_appEnabled.length] = new Option(select_appList.options[i].text, select_appList.options[i].value, false, true);
+			}
+	}
+	
+	function removeApplication()
+	{
+		var select_appEnabled = document.getElementById('apps_enabled');
+		
+		for(var i = 0 ; i < select_appEnabled.options.length; i++ )
+			if( select_appEnabled.options[i].selected )
+			{
+				select_appEnabled.options[i].parentNode.removeChild(select_appEnabled.options[i]);
+				i--;
+			}
+	}
+	
+	function Selected()
+	{
+		var select_appEnabled = document.getElementById('apps_enabled');
+		for(var i = 0 ; i < select_appEnabled.options.length; i++ )
+			select_appEnabled.options[i].selected = true;
+	}
+	
+	function AppJabberit(){}
+
+	AppJabberit.prototype.add = addApplication;
+	AppJabberit.prototype.remove = removeApplication;
+	AppJabberit.prototype.select_ = Selected; 
+	window.App = new AppJabberit;
+	
+})();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/glocked.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/glocked.js	(revision 560)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/glocked.js	(revision 560)
@@ -0,0 +1,132 @@
+(function()
+{
+	var _conn = '';
+	var _xtools = '';
+
+	function addGroup()
+	{
+		var select_ldap = document.getElementById('groups_ldap_jabberit');
+		var select_locked =  document.getElementById('groups_locked_jabberit');
+		
+		for(var i = 0; i < select_locked.options.length; i++)
+		{
+			if(select_locked.options[i].value === "")
+			{
+				select_locked.options[i].parentNode.removeChild(select_locked.options[i]);
+				i--;
+			}
+		}
+		
+		for(var i = 0; i < select_ldap.options.length ; i++)
+		{
+			if( select_ldap.options[i].selected )
+			{
+				
+				var flag = false;
+				for(var j = 0; j < select_locked.options.length ; j++ )
+				{
+					if( select_locked.options[j].value === select_ldap.options[i].value )
+						flag = true;
+				}
+				
+				if ( !flag )
+				{					
+					var option = select_ldap.options[i].value.split(":");
+					select_locked.options[select_locked.length] = new Option(option[0], select_ldap.options[i].value, false, true);
+				}
+			}
+		}
+	}
+
+	function createObject()
+	{
+		if ( typeof(_conn) != "object" )
+			_conn   = new JITConnector(path_jabberit + 'jabberit_messenger/');				
+
+		if ( typeof(_xtools) != "object" )
+			_xtools = new JITXTools(path_jabberit + 'jabberit_messenger/');
+	}
+
+	function CompleteSelect(data)
+	{
+		var select_ldap = document.getElementById('groups_ldap_jabberit');
+		data = _xtools.convert(data);
+
+		while( select_ldap.hasChildNodes())
+			select_ldap.removeChild(select_ldap.firstChild);
+		
+		try
+		{
+			if ( data && data.documentElement && data.documentElement.hasChildNodes() )
+			{
+				data = data.documentElement.firstChild;
+				var label = "";
+				var value = "";
+				
+				while(data)
+				{
+					var no = data.firstChild;
+					while(no)
+					{
+						if( label == "" )
+							var label = no.firstChild.nodeValue;
+						else
+							var value = no.firstChild.nodeValue;
+						no = no.nextSibling;
+					}
+					select_ldap.options[select_ldap.options.length] = new Option(label,label + ":" + value, false, false);
+					label = value = ""; 
+					data = data.nextSibling;
+				}
+			}
+		}catch(e){}
+	}
+
+	function groupsLdap()
+	{
+		createObject();
+		var organization = "";
+		
+		if( arguments.length > 0 )
+		{
+			var element = arguments[0];
+			
+			if( element.options.length > 0 )
+				for(var i = 0; i < element.options.length ; i++ )
+					if( element.options[i].selected )
+						organization =  'ou=' + element.options[i].value;
+	
+			_conn.go('$this.ldap_im.getGroupsLdap', CompleteSelect, organization);
+		}
+	}
+
+	function Selected()
+	{
+		var select_locked = document.getElementById('groups_locked_jabberit');
+		for( var i = 0 ; i < select_locked.options.length; i++ )
+			select_locked.options[i].selected = true;
+	}
+	
+	function removeGroup()
+	{
+		var select_locked = document.getElementById('groups_locked_jabberit');
+		
+		for(var i = 0 ; i < select_locked.options.length; i++ )
+		{
+			if( select_locked.options[i].selected )
+			{
+				select_locked.options[i].parentNode.removeChild(select_locked.options[i]);
+				i--;
+			}
+		}
+	}
+	
+	function Locked(){}
+
+	Locked.prototype.add = addGroup;
+	Locked.prototype.remove = removeGroup;
+	Locked.prototype.gLdap = groupsLdap;
+	Locked.prototype.selectAll = Selected;
+	window.locked = new Locked;
+
+})();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/xtools.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/xtools.js	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/xtools.js	(revision 382)
@@ -0,0 +1,151 @@
+(function()
+{
+	var _FILES = [];
+
+	function _convert(pString)
+	{
+		if ( typeof pString != 'string' )
+			return false;
+
+		if ( window.ActiveXObject )
+		{
+			var _xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
+			_xmlDoc.async = "false";
+			_xmlDoc.loadXML(pString);
+		}
+		else
+		{
+			var parser = new DOMParser();
+			var _xmlDoc = parser.parseFromString(pString, "text/xml");
+		}
+
+		return _xmlDoc;
+	}
+
+	function _load(pFile)
+	{
+		pFile = this._PATH + 'xsl/' + pFile;
+		if ( !(_FILES[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 + '?' + Date.parse(new Date));
+			_FILES[pFile] = _data;
+		}
+		return _FILES[pFile];
+	}
+
+	function _parse()
+	{
+		if ( arguments.length == 1 )
+		{
+			pXML = _xml('root');
+			pXSL = arguments[0];
+		}
+		else
+		{
+			pXML = arguments[0];
+			pXSL = arguments[1];
+		}
+		switch ( typeof pXML )
+		{
+			case 'object' :
+			break;
+			case 'string' :
+				if ( pXML.indexOf('<') == 0 )
+					pXML = _convert(pXML);
+				else
+					pXML = _load.call(this, pXML);
+			break;
+			default :
+				return {'error':'invalid xml'}
+		}
+		switch ( typeof pXSL )
+		{
+			case 'object' :
+			break;
+			case 'string' :
+				pXSL = _load.call(this, pXSL);
+			break;
+			default :
+				return {'error':'invalid xsl'}
+		}
+
+		var fragment = null;
+		if ( window.XSLTProcessor )
+		{
+			var xslProc = new XSLTProcessor();
+			xslProc.importStylesheet(pXSL);
+
+			if ( (arguments.length == 3) && (typeof arguments[2] == 'object') )
+			{
+				var params = arguments[2];
+				for (var i in params )
+					 xslProc.setParameter(null, i, params[i]);
+			}
+
+			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 xslProc = xslTemplate.createProcessor();
+			xslProc.input = pXML;
+
+			if ( (arguments.length == 3) && (typeof arguments[2] == 'object') )
+			{
+				var params = arguments[2];
+				for (var i in params )
+					 xslProc.addParameter(i, params[i], '');
+			}
+
+			xslProc.transform();
+			fragment = xslProc.output;
+		}
+		return fragment;
+	}
+
+	function _xml()
+	{
+		var a = false;
+		if ( document.implementation.createDocument )
+			a = document.implementation.createDocument("", "", null);
+		else if ( ActiveXObject )
+			a = new ActiveXObject("Msxml2.DOMDocument");
+
+		if ( arguments.length == 1 && typeof arguments[0] == 'string' )
+			a.appendChild(a.createElement(arguments[0]));
+		//with ( a )
+		//	appendChild(createProcessingInstruction("xml", "version='1.0'"));
+
+		return a;
+	}
+
+	function XTools()
+	{
+		var _argv = arguments;
+		this._PATH = ( _argv.length > 0 ) ?
+			_argv[0] : '';
+		if ( this._PATH != '' && this._PATH.lastIndexOf('/') != (this._PATH.length - 1) )
+			this._PATH += '/';
+	}
+
+	XTools.prototype.convert = _convert;
+	XTools.prototype.load = _load;
+	XTools.prototype.parse = _parse;
+	XTools.prototype.xml = _xml;
+	window.JITXTools = XTools;
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/changeStatus.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/changeStatus.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/changeStatus.js	(revision 697)
@@ -0,0 +1,28 @@
+(function()
+{
+	// Path JabberIt 
+	var path_jabberit = null;
+	
+	function getStatus(pStatus, pElement)
+	{
+    	var element = pElement;
+		var status = pStatus;
+
+		var url_img = path_jabberit + 'templates/default/images/' + status + '.gif';
+		element.style.backgroundImage = 'url(' + url_img +')';
+	}
+
+	function setPath()
+	{
+		if( arguments.length > 0 && path_jabberit == null )
+			path_jabberit = arguments[0];
+	}
+	
+	function changeStatus(){}
+
+	changeStatus.prototype.get			= getStatus;
+	changeStatus.prototype.setpath		= setPath;
+	
+	window.changestatus = new changeStatus;
+
+})();	
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/connector.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/connector.js	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/connector.js	(revision 382)
@@ -0,0 +1,295 @@
+(function()
+{
+	var _THREADS = [];
+	var _ie;
+
+	function _config(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+
+	// xhr = XMLHttpRequest
+	function _xhr()
+	{
+		try
+		{
+			return new XMLHttpRequest();
+		}
+		catch (_e)
+		{
+			_ie = true;
+			try
+			{
+				return new ActiveXObject('Msxml2.XMLHTTP');
+			}
+			catch (_e1)
+			{
+				try
+				{
+					return new ActiveXObject('Microsoft.XMLHTTP');
+				}
+				catch (_e2)
+				{
+					return false;
+				}
+			}
+		}
+	}
+
+	function _HANDLER()
+	{
+		var _ID = arguments[0];
+
+		if  ( _THREADS[_ID] )
+		{
+			if ( _ie && _THREADS[_ID]._XHR.readyState != 4 )
+				return false;
+
+			switch ( _THREADS[_ID]._XHR.readyState )
+			{
+				case 3 :
+					if ( _THREADS[_ID]._HANDLER.stream )
+					{
+						var _data = _THREADS[_ID]._XHR.responseText.substr(_THREADS[_ID]._index).replace(/^ +| +$/g, '');
+						//alert(_data);
+						_THREADS[_ID]._rtlen = _THREADS[_ID]._XHR.responseText.length;
+
+						if ( _THREADS[_ID]._index < _THREADS[_ID]._rtlen && _data.length )
+							try
+							{
+								_THREADS[_ID]._HANDLER.stream(_data);
+							}
+							catch(_e)
+							{
+								//alert("#stream\n\n" + _e + "\n\n" + _e.description);
+							}
+
+						if ( _THREADS[_ID] )
+							_THREADS[_ID]._index = _THREADS[_ID]._rtlen;
+					}
+				break;
+				case 4 :
+					try
+					{
+						switch ( _THREADS[_ID]._XHR.status )
+						{
+							case 200:
+								var _data = ( _THREADS[_ID]._MODE == 'XML' ) ?
+									_THREADS[_ID]._XHR.responseXML :
+									_THREADS[_ID]._XHR.responseText;
+
+								if ( _ie && _THREADS[_ID]._HANDLER.stream )
+									_THREADS[_ID]._HANDLER.stream(_data);
+
+								var _request = ( _THREADS[_ID]._HANDLER.request ) ?
+									_THREADS[_ID]._HANDLER.request : false;
+
+								delete _THREADS[_ID];
+
+								if ( _request )
+									try
+									{
+										_request(_data);
+									}
+									catch(_e)
+									{
+										//alert("#request\n\n" + _e + "\n\n" + _e.description);
+									}
+
+							break; // [case : status 200]
+							case 404:
+								delete _THREADS[_ID];
+								alert('Page Not Found!');
+							break; // [case : status 404]
+							default:
+								delete _THREADS[_ID];
+						}
+					}
+					catch(e)
+					{
+					}
+				break;
+				default :
+			}
+		}
+	}
+
+	function _execute()
+	{
+		var _ID = arguments[0];
+		var _ACTION = 'act=' + _ID;
+		var _TARGET = this._PATH;
+		var _SEND = null;
+
+		if ( _TARGET != '' && _TARGET.lastIndexOf('/') != (_TARGET.length - 1) )
+			_TARGET += '/';
+
+		_TARGET += ( this._CONTROLLER ) ?
+			this._CONTROLLER  : 'controller.php';
+
+		if ( _THREADS[_ID]._METHOD == 'GET' )
+			_TARGET += '?' + _ACTION;
+
+		_THREADS[_ID]._XHR.open(_THREADS[_ID]._METHOD, _TARGET, true);
+
+		if ( _THREADS[_ID]._METHOD == 'POST' )
+		{
+			_THREADS[_ID]._XHR.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
+			_THREADS[_ID]._XHR.setRequestHeader('Cache-Control',  'no-store, no-cache, must-revalidate');
+			_THREADS[_ID]._XHR.setRequestHeader('Cache-Control', 'post-check=0, pre-check=0');
+			_THREADS[_ID]._XHR.setRequestHeader('Pragma', 'no-cache');
+			_SEND = _ACTION + '&' + arguments[1];
+		}
+
+		_THREADS[_ID]._XHR.onreadystatechange = function(){_HANDLER(_ID);};
+		_THREADS[_ID]._XHR.send(_SEND);
+	}
+
+	function usage()
+	{
+		return ""+
+			"Description:\n"+
+			"\t<obj>.go(string access, [mixed handler[, mixed post]])\n\n"+
+			"Parameters:\n"+
+			"\taccess : assinatura de acesso Ã  camada de controle.\n"+
+			"\thandler : uma funÃ§Ã£o a ser executada no fim da requisiÃ§Ã£o\n"+
+			"\t\tou um objeto que poderÃ¡ conter dois Ã­ndices sendo\n"+
+			"\t\tque ambos deverÃ£o ser uma funÃ§Ã£o que serÃ¡ executada\n"+
+			"\t\tconforme o status do objeto xhr, sendo que na posiÃ§Ã£o\n"+
+			"\t\t'stream' serÃ¡ a funÃ§Ã£o a ser executada a cada iteraÃ§Ã£o\n"+
+			"\t\tdo objeto xhr e na posiÃ§Ã£o 'request' serÃ¡ a funÃ§Ã£o\n"+
+			"\t\ta ser executada no fim da requisiÃ§Ã£o.\n"+
+			"\tpost : se especificado deverÃ¡ ser uma query string ou um\n"+
+			"\tXML bem formatado.\n\n";
+	}
+
+	// @PARAM arguments[0] string :
+	//		assinatura de acesso Ã  camada de controle
+	//
+	// @PARAM arguments[1] object :
+	//		OBS : neste caso a conexÃ£o assumirÃ¡ que se trata de uma stream
+	//		objeto contendo dois duas funÃ§Ãµes, sendo,
+	//		no Ã­ndice stream deverÃ¡ conter uma funÃ§Ã£o que serÃ¡ execultada
+	//		a cada mudanÃ§a de status do objeto xhr
+	//	or
+	// @PARAM arguments[1] function : funcÃ£o a ser executada no retorno da
+	//		requisiÃ§Ã£o
+	//		OBS : neste caso a conexÃ£o assumirÃ¡ que se trata de uma
+	//		requisiÃ§Ã£o funÃ§Ã£o que serÃ¡ execultada no final da requisiÃ§Ã£o
+	//
+	// @PARAM arguments[2] string :
+	//		este parÃ¢metro define se a conexÃ£o Ã© via GET ou POST
+	//		caso o parÃ¢metro nÃ£o esteja presente a conexÃ£o serÃ¡ execultada
+	//		via GET, por outro lado, caso ele exista deverÃ¡ ser uma query
+	//		string vÃ¡lida ou um xml bem formatado
+	//
+	function go()
+	{
+		var _argv = arguments;
+		var _argc = _argv.length;
+		var _ID = _argv[0];
+		var _POST;
+		if ( _argc < 1 || _argc > 3 )
+			return {'error' : "#0\n\n" + usage()};
+
+		if ( typeof _ID != 'string' )
+			return {'error' : "#1\n\n" + usage()};
+
+		//if ( _THREADS[_ID] )
+		//	return {'error' : '#2 - there is a equal request running'};
+
+		_THREADS[_ID] = {
+			'_HANDLER'	: {},
+			'_METHOD'	: ( _argv[2] ) ? 'POST' : 'GET',  // [GET | POST]
+			'_MODE'		: null,	// [XML | TEXT]
+			'_TYPE'		: null,	// [4 for request | 3 for stream]
+			'_XHR'		: null	// [4 for request | 3 for stream]
+		};
+
+		if ( _argv[2] )
+			_POST = _argv[2];
+
+		if ( _argv[1] )
+			switch ( typeof _argv[1] )
+			{
+				case 'function' :
+					_THREADS[_ID]._HANDLER = {'request' : _argv[1]};
+				break;
+				case 'object' :
+					for ( var i in _argv[1] )
+						if ( i != 'stream' && i != 'request' )
+						{
+							delete _THREADS[_ID];
+							return {'error' : "#3\n\n" + usage()};
+						}
+						else if ( i == 'stream' )
+						{
+							_THREADS[_ID]._index = 0;
+							_THREADS[_ID]._rtlen = 0;
+						}
+						_THREADS[_ID]._HANDLER = _argv[1];
+				break;
+				case 'string' :
+					if ( _argc == 2 )
+					{
+						_THREADS[_ID]._METHOD = 'POST';
+						_POST = _argv[1];
+					}
+				break;
+				default :
+					//delete _THREADS[_ID];
+					//return {'error' : "#4\n\n" + usage()};
+			}
+
+		if ( !(_THREADS[_ID]._XHR = _xhr()) )
+			return {'error' : "#4 it cannot make a xhr object"};
+
+		( _THREADS[_ID]._METHOD == 'GET' ) ?
+			_execute.call(this, _ID) : _execute.call(this, _ID, _POST);
+		return {'success' : "your thread is running and the response "+
+							"will be manipulated by the handler"};
+	}
+
+	function _abort()
+	{
+		for ( var _ID in _THREADS )
+		{
+			// @TODO
+			// try/catch for unknown error of IE.
+			// Check, store and retrieve the try/catch.
+			try
+			{
+				if ( _THREADS[_ID] && _THREADS[_ID]._XHR && _THREADS[_ID]._XHR.abort )
+					_THREADS[_ID]._XHR.abort();
+
+				delete _THREADS[_ID];
+			}
+			catch(e){}
+		}
+	}
+
+	function Connector()
+	{
+		var _argv = arguments;
+		this._PATH = ( _argv.length > 0 ) ?
+			_argv[0] : '';
+		this._CONTROLLER = ( _argv.length == 2 ) ?
+			_argv[1] : false;
+	}
+
+	Connector.prototype.go = go;
+	Connector.prototype.abort = _abort;
+	window.JITConnector = Connector;
+
+	_config(window, 'onbeforeunload', _abort);
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/windows.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/windows.js	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/windows.js	(revision 382)
@@ -0,0 +1,339 @@
+(function()
+{
+	var _drag_drop = new JITDragDrop();
+
+	var _xtools;
+	var index = 10000;
+	var _all_windows = [];
+
+	function _load(pId)
+	{
+		if ( !(document.getElementById(pId + '__window_master')) )
+		{
+			var xml = _xtools.xml('window');
+
+			var name = xml.createElement('name');
+			name.appendChild(xml.createTextNode(pId));
+			xml.documentElement.appendChild(name);
+
+			var _window = document.createElement("div");
+			_window.innerHTML = _xtools.parse(xml, 'window.xsl');
+			_window.setAttribute('id', pId + '__window_master');
+			_window.setAttribute('class', 'window');
+			_window.setAttribute('className', 'window');
+
+			_window = this._TARGET.appendChild(_window);
+
+			_focus(_window);
+
+			function _click(e)
+			{
+				_focus(e);
+				_window.oncontextmenu = new Function("return false");
+				return false;
+			}
+
+			_config(_window, 'onmousedown', _click);
+
+			_drag_drop.drag(_window);
+			_window.childNodes[1].setAttribute('dragdrop_child','true');
+			_window.childNodes[1].childNodes[0].setAttribute('dragdrop_child','true');
+			_window.childNodes[1].childNodes[1].setAttribute('dragdrop_child','true');
+
+			_config(_window.childNodes[1].childNodes[2].childNodes[0], 'onclick', _button);
+			_config(_window.childNodes[1].childNodes[2].childNodes[1], 'onclick', _button);
+			_config(_window.childNodes[1].childNodes[2].childNodes[2], 'onclick', _button);
+
+			_all_windows[pId + '__window_master'] = {
+				'id' : pId,
+				'wm' : _window, // wm - window master
+				'ic' : _window.childNodes[1].firstChild, // wt - window title
+				'wt' : _window.childNodes[1].childNodes[1], // wt - window title
+				'bc' : _window.childNodes[1].childNodes[2].childNodes[0], // bc - button close
+				'bx' : _window.childNodes[1].childNodes[2].childNodes[1], // bx - button maximize
+				'bz' : _window.childNodes[1].childNodes[2].childNodes[2], // bz - button minimize
+				'wc' : _window.childNodes[2].firstChild, // wc - window content
+				'wf' : _window.childNodes[3], // wf - window footer
+				'button' : _button,
+				'content' : _content,
+				'close' : function()
+				{
+					_button(_window.childNodes[1].childNodes[2].childNodes[0]);
+				},
+				'focus' : _focus,
+				'hidden' : function()
+				{
+					_button(_window.childNodes[1].childNodes[2].childNodes[2]);
+				},
+				'icon' : _icon,
+				'loading' : function()
+				{
+					var _information = document.createElement('span');
+						_information.appendChild(
+							document.createTextNode(imGetLang('Loading'))
+						);
+
+					var _loading = document.createElement('div');
+						_loading.className = 'loading';
+						_loading.appendChild(_information);
+
+					_content.call(this, _loading);
+				},
+				'position' : _position,
+				'show' : function()
+				{
+					_window.style.display = 'block';
+				},
+				'size' : _size,
+				'title' : _title
+			};
+
+		}
+		return _all_windows[pId + '__window_master'];
+	}
+
+	function _browser()
+	{
+		var _width = 0, _height = 0;
+		if ( typeof( window.innerWidth ) == 'number' )
+		{
+			//Non-IE
+			_width = window.innerWidth;
+			_height = window.innerHeight;
+		}
+		else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
+		{
+			//IE 6+ in 'standards compliant mode'
+			_width = document.documentElement.clientWidth;
+			_height = document.documentElement.clientHeight;
+		}
+		else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
+		{
+			//IE 4 compatible
+			_width = document.body.clientWidth;
+			_height = document.body.clientHeight;
+		}
+
+		return {'width' : _width, 'height' : _height}
+	}
+
+	function _button()
+	{
+		var b = arguments[0];
+		b = ( !b.type ) ?
+			b : ( b.target ) ?
+				b.target : b.srcElement;
+
+		var w = b.parentNode.parentNode.parentNode;
+		switch ( b.title )
+		{
+			case 'close' :
+				w.parentNode.removeChild(w);
+				delete _all_windows[w.id];
+			break;
+			case 'minimize' :
+				w.style.display = 'none';
+			break;
+			case 'maximize' :
+				if ( !w.getAttribute('wParams') )
+				{
+					var _wParams  = (parseFloat(w.style.width) - 13);
+						_wParams += ':' + parseFloat(w.childNodes[2].firstChild.style.maxHeight);
+						_wParams += ':' + parseFloat(w.style.left);
+						_wParams += ':' + parseFloat(w.style.right);
+						_wParams += ':' + parseFloat(w.style.top);
+						_wParams += ':' + parseFloat(w.style.bottom);
+					w.setAttribute('wParams', _wParams);
+
+					var _bwr = _browser();
+					w.style.top = "0px";
+					w.style.left = "0px";
+					w.style.height = "100%";
+					w.style.width = "100%";
+
+					var _style = w.childNodes[2].firstChild.getAttribute('style');
+					if ( typeof _style == 'object' && _style.cssText )
+						_style = _style.cssText;
+
+					if ( w.childNodes[2].firstChild.style.cssText )
+						w.childNodes[2].firstChild.style.cssText = '';
+
+					_style = _style.replace(/max-height: ?\d+;?/i, '');
+
+					w.childNodes[2].firstChild.setAttribute('style', _style);
+
+					w.childNodes[2].firstChild.style.height = (_bwr.height - 41) + "px";
+				}
+				else
+				{
+					var _wParams = w.getAttribute('wParams').split(':');
+					w.removeAttribute('wParams');
+
+					var _style = w.getAttribute('style');
+					if ( typeof _style == 'object' && _style.cssText )
+						_style = _style.cssText;
+
+					_style = _style.replace(/height: ?100%;?/i, '').replace(/width: ?100%;?/i, '');
+					_style = _style.replace(/left: ?0px;?/i, '').replace(/top: ?0px;?/i, '');
+
+					// for IE
+					if ( w.style.cssText )
+						w.style.cssText = '';
+
+					w.setAttribute('style', _style);
+
+					w = _all_windows[w.id];
+
+					_style = w.wc.getAttribute('style');
+					if ( typeof _style == 'object' && _style.cssText )
+						_style = _style.cssText;
+
+					_style = _style.replace(/height: ?\d+px;?/i, '');
+
+					// for IE
+					if ( w.wc.style.cssText )
+						w.wc.style.cssText = '';
+
+					w.wc.setAttribute('style', _style);
+
+					w.size(parseFloat(_wParams[0]), parseFloat(_wParams[1]));
+
+					var x = '';
+					var _right = false;
+					if ( !isNaN(_wParams[2]) )
+						x = parseFloat(_wParams[2]);
+					else if ( !isNaN(_wParams[3]) )
+					{
+						x = parseFloat(_wParams[3]);
+						_right = true;
+					}
+
+					var y = '';
+					var _bottom = false;
+					if ( !isNaN(_wParams[4]) )
+						y = parseFloat(_wParams[4]);
+					else if ( !isNaN(_wParams[5]) )
+					{
+						y = parseFloat(_wParams[5]);
+						_bottom = true;
+					}
+
+					w.position(x, y, _right, _bottom);
+				}
+			break;
+		}
+	}
+
+	function _config(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+
+	function _content()
+	{
+		var _content = this.wc;
+		while ( _content.hasChildNodes() )
+			_content.removeChild(_content.firstChild);
+		var l = arguments.length;
+		for ( var i = 0; i < l; i++ )
+			if ( typeof arguments[i] == 'object' )
+				_content.appendChild(arguments[i]);
+			else if ( typeof arguments[i] == 'string' )
+				_content.innerHTML += arguments[i];
+	}
+
+	function _focus()
+	{
+		var w;
+		if ( arguments.length )
+			w = arguments[0];
+		else
+			w = this.wm;
+
+		w = ( !w.type ) ?
+			w : ( w.target ) ?
+				w.target : w.srcElement;
+
+		while ( w.id.indexOf('__window_master') == -1 )
+			w = w.parentNode;
+
+		index += 10;
+		w.style.zIndex = index;
+	}
+
+	function _get(_pId)
+	{
+		var _win = false;
+		if ( _all_windows[_pId + '__window_master'] )
+			_win = _all_windows[_pId + '__window_master'];
+		return _win;
+	}
+
+	function _icon(_pIcon)
+	{
+		if ( typeof _pIcon == 'string' )
+			this.ic.style.backgroundImage = 'url(' + _pIcon + ')';
+	}
+
+	function _position(pX, pY)
+	{
+		// for IE
+		//if ( window.ActiveXObject )
+		//	this.wm.style.position = 'absolute';
+
+		if ( typeof pX == 'number' )
+			if ( arguments[2] === true )
+				this.wm.style.right = pX + 'px';
+			else
+				this.wm.style.left = pX + 'px';
+
+		if ( typeof pY == 'number' )
+			if ( arguments[3] === true )
+				this.wm.style.bottom = pY + 'px';
+			else
+				this.wm.style.top = pY + 'px';
+	}
+
+	function _size(pWidth, pHeight)
+	{
+		if ( typeof pWidth == 'number' && !isNaN(pWidth) )
+			this.wm.style.width = (13 + pWidth) + 'px';
+
+		if ( typeof pHeight == 'number' && !isNaN(pHeight) )
+			this.wc.style.maxHeight = pHeight + 'px';
+	}
+
+	function _title(pTitle)
+	{
+		var _title = this.wt;
+		while ( _title.hasChildNodes() )
+			_title.removeChild(_title.firstChild);
+		_title.appendChild(document.createTextNode(pTitle));
+	}
+
+	function Windows()
+	{
+		var _argv = arguments;
+		var _argc = _argv.length;
+		if ( (_argv[_argc - 1] != null) && (_argv[_argc - 1]).id )
+				this._TARGET = _argv[_argc - 1];
+		else
+			this._TARGET = document.body;
+
+		_xtools = arguments[0];
+	}
+
+	Windows.prototype.load = _load;
+	Windows.prototype.get = _get;
+	window.JITWindows = Windows;
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/show_hidden.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/show_hidden.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/show_hidden.js	(revision 697)
@@ -0,0 +1,104 @@
+(function()
+{
+	var _delay;
+
+	var _last_displayed;
+	var _timeout = false;
+
+	var _event_show = false;
+	var _event_hidden = false;
+	var count = 0;
+
+	function _config(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+
+	function hdObject()
+	{
+		if( _last_displayed )
+		{
+			_last_displayed.style.display = 'none';
+			_last_displayed = false;
+		}
+	}
+
+	function _hidden()
+	{
+		if( arguments.length > 0 )
+		{
+			if( arguments[0] )
+				clearTimeout(_timeout);
+			else
+				_timeout = setTimeout( hdObject, _delay);
+		}
+	}
+
+	function _show(_element)
+	{
+		_element.style.display = 'block';
+		_last_displayed = _element;
+	}
+
+	function _view()
+	{
+		if ( arguments.length == 3 )
+		{
+			var _event = [
+				'onclick',
+				'onmousedown',
+				'onmouseout',
+				'onmouseover',
+				'onmouseup'
+			];
+
+			_event_show = false;
+			_event_hidden = false;
+
+			for ( var i in _event )
+			{
+				if ( _event[i] == arguments[0] )
+					_event_show = arguments[0];
+
+				if ( _event[i] == arguments[1] )
+					_event_hidden = arguments[1];
+			}
+
+			if ( _event_show && _event_hidden )
+			{
+				var _element = false;
+				switch ( typeof arguments[2] )
+				{
+					case 'object' :
+						_element = arguments[2];
+					break;
+					case 'string' :
+						_element = document.getElementById(arguments[2]);
+					break;
+				}
+
+				if ( _element )
+					_show(_element);
+			}
+		}
+	}
+
+	function ShowHidden()
+	{
+		_delay = ( (arguments.length > 0) && !isNaN(arguments[0]) ) ? arguments[0] : 3000;
+	}
+
+	ShowHidden.prototype.action  = _view;
+	ShowHidden.prototype.hiddenObject = _hidden;
+    window.ShowHidden = ShowHidden;
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/load.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/load.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/load.js	(revision 697)
@@ -0,0 +1,775 @@
+(function()
+{
+	var _autoStatusTime = 60000; // 1 minuto
+	var _autoStatus;
+	var _conn   = new JITConnector(path_jabberit);
+	var _xtools = new JITXTools(path_jabberit);
+	var _showhidden = new ShowHidden(1000);
+	var myWindow	  = '';
+	var flagMouseOver = '';
+	var flagOpenIM	  = '';
+	var flagOpenPopup = '';
+	var flagAwayIM	  = '';
+    
+	// Sniffer Browser
+	var agt=navigator.userAgent.toLowerCase();
+    var is_major = parseInt(navigator.appVersion);
+    var is_minor = parseFloat(navigator.appVersion);    
+    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
+                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
+                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
+    var is_gecko = (agt.indexOf('gecko') != -1);
+    var is_gecko1_5 = (agt.indexOf('firefox/1.5') != -1 || agt.indexOf('firefox/2') != -1 || agt.indexOf('iceweasel/2') != -1);
+    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
+    var is_ie3    = (is_ie && (is_major < 4));
+    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
+    var is_ie4up  = (is_ie && (is_major >= 4));
+    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
+    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
+    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
+    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
+    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
+    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);    
+    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
+
+	if ( !(document.getElementById('jabberit_messenger_content')) )
+	{
+		var _jabberit_content = document.createElement('div');
+		_jabberit_content.setAttribute('id', 'jabberit_messenger_content');
+		_jabberit_content = document.body.appendChild(_jabberit_content);
+	}
+
+	var _window = new JITWindows(_xtools, _jabberit_content);
+	var _ldap	= new JITLdap( _conn, _xtools, _window);
+
+	function addContacts()
+	{
+		_ldap.add();
+	}
+
+	function addIcon()
+	{
+		
+		var StatusBar = document.getElementById('divStatusBar');
+
+		/**
+		 * @quando estiver habilitada a opção fora de escritório nos filtros. 
+		 */
+		
+		if( div_write_msg = document.getElementById('em_div_write_msg') )
+		{		
+			var StatusBarIM = document.getElementById('JabberMessenger');
+			div_write_msg.parentNode.insertBefore(StatusBarIM, div_write_msg);
+			StatusBarIM.style.paddingLeft = '33px';
+			return;			
+		}
+		
+		if( StatusBar )
+		{
+			StatusBar.style.paddingLeft = '33px';
+			
+			var _div = document.createElement('div');
+			_div.appendChild(StatusBar.parentNode.removeChild(StatusBar.previousSibling));
+			StatusBar.parentNode.insertBefore(_div,StatusBar);
+			
+			var divJabber = document.createElement('div');
+				divJabber.setAttribute('id', 'JabberMessenger');
+			
+			var _status = top.document.createElement('div');
+				_status.setAttribute('id', 'jabberit_login');
+				_status.style.background = 'no-repeat';
+				_status.style.backgroundImage = 'url(' + jabberit_group_open.src + ')';
+				_status.style.float = 'left';
+				_status.style.height = '15px';
+				_status.style.left = '7px';
+				_status.style.margin = '8 0 0 10px';
+				_status.style.padding = '0px';
+				_status.style.position = 'absolute';
+				_status.style.width = '15px';
+				_status.style.cursor = 'pointer';
+
+			divJabber.insertBefore(_status,divJabber.firstChild);
+
+			var _menu;
+				_menu = top.document.createElement('div');
+				_menu.setAttribute('id','fast_menu_jabberit');
+				_menu.style.backgroundColor = 'cecece';
+				_menu.style.border = '1px dashed #000';
+				_menu.style.display = 'none';
+				_menu.style.margin = '20px 5px 0px -15px';
+				_menu.style.position = 'absolute';
+				_menu.style.zIndex = '99999';
+				_menu.onmouseout = function(){ _showhidden.hiddenObject(false); };
+				_menu.onmouseover = function(){ _showhidden.hiddenObject(true); };
+				
+			divJabber.insertBefore(_menu, divJabber.firstChild);
+
+			var _menu_div = top.document.createElement('div');
+				_menu_div.setAttribute('id','status_Jabber_Expresso');
+				_menu_div.style.background = 'no-repeat';
+				_menu_div.style.backgroundImage = 'url(' + jabberit_add_user.src + ')';
+				_menu_div.style.float = 'left';
+				_menu_div.style.height = '18px';
+				_menu_div.style.left = '19px';
+				_menu_div.style.margin = '0 0 0 10px';
+				_menu_div.style.padding = '0px';
+				_menu_div.style.position = 'absolute';
+				_menu_div.style.width = '18px';
+				_menu_div.style.cursor = 'pointer';
+				_menu_div.style.zindex = '99999999';
+			
+			statusJabberExpresso = _menu_div;
+			
+			divJabber.insertBefore(_menu_div, divJabber.firstChild);
+			StatusBar.insertBefore(divJabber, StatusBar.firstChild);			
+			
+			configEvents(_menu_div,'onclick',showWindow);
+
+			configEvents(
+				_status,
+				'onclick',
+				function()
+				{
+					var _options = [
+						['Add Contacts',addContacts],
+						['Help',helpJabberit],
+						['Preferences', preferences],
+						['Change Status', subMenuChangeStatus]
+					];
+
+					var _style_text = 'cursor: pointer; padding:2px 2px 2px 15px; border-bottom:1px solid #dedede; background: no-repeat url(' + jabberit_group_close.src + ');';					
+
+					var _xml = _xtools.xml('menu');
+					var _option;
+					var _item;
+					var _action;
+					var _style;
+
+					for ( var i in _options )
+					{
+						_option = _xml.createElement('option');
+
+						_item = _xml.createElement('item');
+						_item.appendChild(_xml.createTextNode(jabberitGetLang(_options[i][0])));
+						
+						_style = _xml.createElement('style');
+						_style.appendChild(_xml.createTextNode(_style_text));
+
+						_option.appendChild(_item);
+						_option.appendChild(_style);
+
+						_xml.documentElement.appendChild(_option);
+					}
+
+					_menu.innerHTML = _xtools.parse(_xml, 'options.xsl');
+					_showhidden.action('onmouseover', 'onmouseout', _menu);
+
+					_item = _menu.firstChild;
+
+					for ( var i in _options )
+					{
+						_item.childNodes[i].setAttribute('presence', _options[i]);
+						configEvents(
+							_item.childNodes[i],
+							'onclick',
+							_options[i][1]
+						);
+					}
+				});
+		}
+	}
+
+	function autoStatus()
+	{
+		
+		if ( _autoStatus )
+			clearTimeout(_autoStatus);
+
+		var _div_status = document.getElementById('status_Jabber_Expresso');
+		if ( _div_status )
+		{
+			var _status = _div_status.style.backgroundImage;
+			_status = _status.substr(_status.lastIndexOf('/') + 1);
+			_status = _status.substr(0, _status.indexOf('.'));
+			if ( _status == 'xa' && _div_status.getAttribute('autoStatus') )
+			{
+				_div_status.removeAttribute('autoStatus');
+				changeStatusJava("2");
+			}
+		}
+
+		var TimeStatus = flagAwayIM.split(':');
+
+		if( TimeStatus[1] )
+			_autoStatus = setTimeout(autoStatusHandler, parseInt(TimeStatus[1])*_autoStatusTime);
+		else
+			_autoStatus = setTimeout(autoStatusHandler, parseInt(_autoStatusTime));
+	}
+
+	function autoStatusHandler()
+	{
+		var _div_status = document.getElementById('status_Jabber_Expresso');
+		if ( _div_status )
+		{
+			var _status = _div_status.style.backgroundImage;
+			_status = _status.substr(_status.lastIndexOf('/') + 1);
+			_status = _status.substr(0, _status.indexOf('.'));
+			if ( _status == 'available' )
+			{
+				_div_status.setAttribute('autoStatus','true');
+				changeStatusJava("5");
+			}
+		}
+	}
+
+	function changeLabel()
+	{
+		if( arguments.length > 0 )
+		{
+			var element = arguments[0].parentNode.parentNode.firstChild;
+
+			if(arguments[0].checked)
+				element.innerHTML = "<span style='color:red;'>Digite o Email .: </span>";
+			else
+				element.innerHTML = "Nome do Contato .: ";
+		}
+	}
+
+	function changeStatusJava()
+	{
+  		if(arguments.length > 0 )
+  		{
+	 		try
+	 		{
+	 			// If Layer;
+	 			if( elementIframe = document.getElementById('iframe_applet_jabberit') )
+	 			{
+					if( !is_ie )
+						elementIframe.contentDocument.applets[0].changeStatusfromExpresso(arguments[0]);
+					else
+						elementIframe.contentWindow.document.applets[0].changeStatusfromExpresso(arguments[0]);
+				}
+				else // If Pop-Up
+				{
+					myWindow.document.applets[0].changeStatusfromExpresso(arguments[0]);
+				}
+			}
+			catch(e)
+			{
+				if( confirm('Deseja conectar o IM ?') )
+					showWindow();
+			}
+	   	}		
+	}
+
+	function configEvents(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+
+	function closeWindow()
+	{
+		myWindow = '';
+	}
+
+	function getElementStatus()
+	{
+		return document.getElementById('status_Jabber_Expresso');
+	}
+
+	function getPreferences()
+	{
+		if( flagOpenIM == '' )
+		{
+			_conn.go("$this.db_im.getPreferences",
+						function(data)
+						{
+							var autoConnect = '';
+							flagOpenIM = data;
+
+							if( data.indexOf(';') != -1)
+							{
+								var temp = data.split(';');
+								autoConnect = flagOpenIM = temp[0];
+								
+								// Open as Pop-Up
+								flagOpenPopup = 'openWindowJabberitPopUp:false';
+								
+								if( temp[1] )
+								{ 
+									if( temp[1] == 'openWindowJabberitPopUp:true' || temp[1] == 'openWindowJabberitPopUp:false')
+										flagOpenPopup = temp[1];
+								}
+								
+								// Away
+								flagAwayIM = 'flagAwayIM:5';
+								
+								if( temp[2] )
+								{
+									flagAwayIM = temp[2];
+								}
+							}
+							else
+							{
+								autoConnect = flagOpenIM;
+							}
+							
+							if( autoConnect == 'openWindowJabberit:true' )
+							{
+								setTimeout('loadscript.showW();', 2500);
+							}
+					 	});
+		}
+
+	}
+
+	function helpJabberit()
+	{
+		var myWindowHelp = window.open( path_jabberit + 'help.php', 'HelpjabberIM', 'width=800,height=495,top=50,left=50,scrollbars=yes');
+	}
+
+	function keyPressSearch()
+	{
+		var ev = arguments[0];
+		var element = arguments[1];
+
+		if ( ev.keyCode == 13 )
+			if( element.value.length >= 4 )
+				_ldap.search( element.value );	
+			else
+				alert(jabberitGetLang('Your search argument must be longer than 4 characters.'));
+	}
+
+	function openPopup()
+	{
+		var widPopup = '220';
+
+		if( is_ie )
+			widPopup = '250';
+
+		try{
+
+			if(!myWindow )
+			{	
+				myWindow = window.open('','JabberIM','width='+widPopup+',height=400,top=50,left=50,toolbar=0,menubar=0,resizable=0,scrollbars=0,status=0,location=0,titlebar=0');
+				myWindow.close();
+				myWindow = window.open(path_jabberit + 'client.php','JabberIM','width='+widPopup+',height=400,top=50,left=50,toolbar=0,menubar=0,resizable=0,scrollbars=0,status=0,location=0,titlebar=0');
+				myWindow.blur();
+				configEvents(myWindow,'onbeforeunload', closeWindow );
+			}
+			else
+			{
+				for( var i = 15 ; i > 0 ; i-- )
+				{
+					myWindow.moveBy(i,0); myWindow.moveBy(-i,0);
+				}
+				myWindow.focus();
+			}
+		}
+		catch(e)
+		{
+			delete myWindow;
+			myWindow = window.open(path_jabberit + 'client.php','JabberIM','width='+widPopup+',height=400,top=50,left=50,toolbar=0,menubar=0,resizable=0,scrollbars=0,status=0,location=0,titlebar=0');
+			myWindow.blur();
+			configEvents(myWindow,'onbeforeunload', closeWindow );
+		}
+	}
+
+	function openWindow()
+	{
+		var _win_contacts = _window.load('jabberit_contacts');
+
+		var flagOpenAux = '';
+		
+		if( flagOpenIM.indexOf(';') != -1 )
+		{
+			var aux = flagOpenIM.split(';');
+			flagOpenAux = aux[0];
+		}
+		else
+			flagOpenAux = flagOpenIM;
+
+		if( flagOpenAux == 'openWindowJabberit:false' )
+		{
+			if( !is_ie )
+				_win_contacts.size(220,400);
+			else	
+			 	_win_contacts.size(250,400);
+		}					
+		else
+		{ 
+			if( !is_ie )
+			{
+				_win_contacts.size(1,1);
+				_win_contacts.wm.style.visibility = 'hidden';
+			}
+			else
+			{
+				_win_contacts.size(0,0);
+			}
+		}
+
+		_win_contacts.bc.style.display = "none";
+		_win_contacts.bx.style.display = "none";
+
+		if( _win_contacts.bz.removeEventListener )
+			_win_contacts.bz.removeEventListener('click',_win_contacts.button, false);
+		else
+			_win_contacts.bz.detachEvent('onclick',_win_contacts.button);
+
+		configEvents(
+			_win_contacts.bz,
+			"onclick",
+			function()
+			{
+				_win_contacts.size(1,1);
+				_win_contacts.wm.style.visibility = 'hidden';
+				_win_contacts.position(50,50);
+				_win_contacts.title('');
+			}
+		);
+
+		var _params = {'path' : path_jabberit};
+		_win_contacts.content(_xtools.parse(_xtools.xml('contacts_jabberit'), 'contacts_jabberit.xsl', _params));
+
+		if( flagOpenAux == 'openWindowJabberit:false' )
+		{
+			if( !is_ie )
+			{
+				_win_contacts.wm.style.visibility = "visible";
+				_win_contacts.size(220,400);
+				_win_contacts.title('.:: Expresso - JMessenger ::.');
+			}
+			else
+			{
+				_win_contacts.size(250,400);
+				_win_contacts.title('.:: Expresso - JMessenger ::.');
+			}
+			_win_contacts.position(50,50);
+		}
+		else
+		{ 
+			if( !is_ie )
+				_win_contacts.wm.style.visibility = "hidden";
+		}
+	}
+
+	function openWindowParticipantsExternal()
+	{
+		if( arguments.length > 0)
+		{
+			var element = arguments[0]; 
+			var orgPartExternal = externalParticipantsJabberit.split(",");
+			
+			var _splash = top.document.createElement('span');
+				_splash.setAttribute('id','fast_splash_jabberit');
+				_splash.style.backgroundColor = 'dedede';
+				_splash.style.position = 'absolute';
+				_splash.style.display = 'block';
+				_splash.style.width = '200px';
+				_splash.style.height = 'auto';
+				_splash.style.margin = ( !is_ie ) ? '0px 5px 0px 130px' : '20px 0px 0px 0px';
+				_splash.style.zIndex = '99999';
+				_splash.style.border = '2px outset #000';
+				_splash.onmouseout = function(){ _showhidden.hiddenObject(false); };
+				_splash.onmouseover = function(){ _showhidden.hiddenObject(true); };
+			
+				for(var i = 0; i < orgPartExternal.length; i++)
+					_splash.innerHTML += '<div style="margin:5px;border-bottom:1px dashed #000;cursor:default !important;">' + (i + 1) + " - " + orgPartExternal[i] + '</div>';	
+				
+			_showhidden.action('onmouseover', 'onmouseout', _splash);
+			element.appendChild(_splash);
+		}
+	}
+
+	function preferences()
+	{
+		if( !(_window.get('jabberit_preferences')) )
+		{
+			var _win_preferences = _window.load('jabberit_preferences');
+				_win_preferences.size(400,310);				
+				_win_preferences.position(150,100);
+				_win_preferences.title('.:: Expresso - JMessenger '+jabberitGetLang('Preferences')+'::.');
+				_win_preferences.bc.style.display = "none";
+				_win_preferences.bx.style.display = "none";
+				_win_preferences.wc.style.padding = "5px";								
+
+			if( _win_preferences.bz.removeEventListener )
+				_win_preferences.bz.removeEventListener('click',_win_preferences.button, false);
+			else
+				_win_preferences.bz.detachEvent('onclick',_win_preferences.button);
+				
+			configEvents(
+				_win_preferences.bz,
+				"onclick",
+				function()
+				{
+					_win_preferences.size(1,1);
+					_win_preferences.wm.style.visibility = 'hidden';
+					_win_preferences.position(50,50);
+					_win_preferences.title('');
+				});
+
+			var _params = {'path'  : path_jabberit,
+						   'lang1' : jabberitGetLang('Your Preferences'),
+						   'lang2' : jabberitGetLang('Connection'),	
+						   'lang3' : jabberitGetLang('Enable Auto Login IM'),
+						   'lang4' : jabberitGetLang('Users OffLine'),
+						   'lang5' : jabberitGetLang('Show friends Offline'),
+						   'lang6' : jabberitGetLang('Save'),
+						   'lang7' : jabberitGetLang('Cancel'),
+						   'lang8' : jabberitGetLang('Window'),
+						   'lang9' : jabberitGetLang('Open as Pop-Up Window'),
+						   'lang10' : jabberitGetLang('Away'),
+						   'lang11' : jabberitGetLang('Set status to away after'),
+						   'lang12' : jabberitGetLang('minutes'),						   
+						   'langYes': jabberitGetLang('Yes'),
+						   'langNo' : jabberitGetLang('No')											   
+						  };
+			_win_preferences.content(_xtools.parse(_xtools.xml('preferences_jabberit'), 'preferences_jabberit.xsl', _params));
+ 			_win_preferences.wc.lastChild.lastChild.onclick = _win_preferences.close;
+		}
+		else
+		{
+			var _win_preferences = _window.get('jabberit_preferences');
+			_win_preferences.wm.style.visibility = "visible";
+			_win_preferences.position(150,100);							
+			_win_preferences.title('.:: Expresso - JMessenger '+jabberitGetLang('Preferences')+'::.');
+			_win_preferences.size(320,250);
+		}
+		
+		// Element openWindowJabberit
+		var value1 = flagOpenIM.split(':');
+		var element1 = document.getElementById(value1[0]);
+		var valueSelect1 = value1[1];
+		
+		for(var i = 0; i < element1.options.length; i++)
+			if( element1.options[i].value == valueSelect1 )
+				element1.options[i].selected = true;
+
+		
+		// Element openWindowJabberitPopUp
+		var value2 = flagOpenPopup.split(':');
+		var element2 = document.getElementById(value2[0]);
+		var valueSelect2 = value2[1];
+			
+		for(var i = 0; i < element2.options.length; i++)
+			if( element2.options[i].value == valueSelect2 )
+				element2.options[i].selected = true;
+				
+		// Element flagAwayIM
+		var value3 = flagAwayIM.split(':');
+		var element3 = document.getElementById(value3[0]);
+		element3.value = value3[1];
+		
+	}
+
+	function searchUser()
+	{
+		var element = arguments[0].previousSibling;
+		
+		if( element.value.length >= 4 )
+			_ldap.search( element.value );	
+		else
+			alert(jabberitGetLang('Your search argument must be longer than 4 characters.'));
+	}
+	
+	function setPreferences()
+	{
+		// Element openWindowJabberit
+		var elementOpenW = document.getElementById('openWindowJabberit');
+		var value = '';
+		var flagReload = false;
+		
+		for(var i = 0 ; i < elementOpenW.options.length; i++)
+			if( elementOpenW.options[i].selected == true)
+			{
+				value = 'preferences1=openWindowJabberit:' + elementOpenW.options[i].value;
+				flagOpenIM = 'openWindowJabberit:' + elementOpenW.options[i].value;
+			}
+
+		// Element openWindowJabberitPopUp
+		var elementOpenPop = document.getElementById('openWindowJabberitPopUp');	
+
+		for(var i = 0; i < elementOpenPop.options.length; i++ )
+			if( elementOpenPop.options[i].selected ==  true )
+			{
+				value += '&preferences2=openWindowJabberitPopUp:' + elementOpenPop.options[i].value;
+				
+				if( flagOpenPopup != 'openWindowJabberitPopUp:' + elementOpenPop.options[i].value)
+					flagReload = true;
+					
+				flagOpenPopup = 'openWindowJabberitPopUp:' + elementOpenPop.options[i].value;
+			}
+		
+		// Element flagAwayIM
+		var elementFlagIM = document.getElementById('flagAwayIM');
+		
+		if( elementFlagIM.value.length > 0 && parseInt(elementFlagIM.value) > 0 )
+		{
+			flagAwayIM = 'flagAwayIM:' + elementFlagIM.value;
+			value += '&preferences3=flagAwayIM:' + elementFlagIM.value;
+		}
+		else
+		{
+			alert(jabberitGetLang('Enter a value greater than or equal to 1!'));
+			return false;
+		}
+
+		_conn.go('$this.db_im.setPreferences',
+				 function(data)
+				 {
+					if(data == 'true')
+					{
+						if( flagReload )
+						{
+							window.location.reload();
+							myWindow.close();							
+						}
+					}
+					else{ alert(jabberitGetLang('Error saving your preferences!')); }
+										
+					var _win_preferences = _window.get('jabberit_preferences');
+						_win_preferences.close();
+				 },
+				 value);
+	}
+	
+	function showDiv()
+	{
+		var _element = ( myWindow ) ? myWindow.document.body.firstChild : null ;
+		if( _element != null )
+			_element.style.visibility = 'visible';
+	}
+
+	function showWindow()
+	{
+		var _win_contacts = _window.get('jabberit_contacts');
+		
+		if( flagOpenPopup === 'openWindowJabberitPopUp:true' )
+		{
+			openPopup();					
+		}
+		else
+		{
+			if ( _win_contacts )
+			{	
+				_win_contacts.wm.style.visibility = "visible";
+				_win_contacts.title('.:: Expresso - JMessenger ::.');
+	
+				if( !is_ie )
+					_win_contacts.size(220,400);
+				else
+					_win_contacts.size(250,400);
+	
+				_win_contacts.position(60,60);
+			}
+			else
+				openWindow();
+		}
+	}
+
+	function subMenuChangeStatus()
+	{
+		if(document.getElementById('subMenu_Change_Status_JabberIt') == null )
+		{
+			var _itens  = [
+								['Online', 'loadscript.chstatusJava("2")', 'available_jabberit.src'],
+								['Free For Chat', 'loadscript.chstatusJava("1")', 'chat_jabberit.src'],
+								['Xa', 'loadscript.chstatusJava("3")','xa_jabberit.src'],
+								['Dnd', 'loadscript.chstatusJava("4")','dnd_jabberit.src'],
+								['Away', 'loadscript.chstatusJava("5")','away_jabberit.src'],
+								['Invisible', 'loadscript.chstatusJava("6")','invisible_jabberit.src']
+						  ];
+	
+			var _itensMenu = "<dl style='padding:1px !important; margin:2px 2px !important;font-size:8pt !important;background: #cecece;color: #000;'>";
+			
+			for(var i in _itens)
+			{
+				if( i == 5 )
+					_itensMenu += "<dt onmouseover='elementOnMouseOver(this);' onmouseout='elementOnMouseOut(this, false);' style='cursor: pointer;' onclick=" + _itens[i][1] + ">";
+				else
+					_itensMenu += "<dt onmouseover='elementOnMouseOver(this);' onmouseout='elementOnMouseOut(this, false);' style='cursor: pointer;border-bottom:1px solid #dedede;' onclick=" + _itens[i][1] + ">";
+				_itensMenu += "<img src='" + eval(_itens[i][2]) + "' style='margin-right:3px;'/>" + jabberitGetLang(_itens[i][0]) + "</dt>";
+			}
+
+			_itensMenu += "</dl>";
+	
+			var _subMenu_div = document.createElement("div");
+				_subMenu_div.setAttribute('id','subMenu_Change_Status_JabberIt');
+				_subMenu_div.style.margin = '-10px 5px 0px 0px';
+				_subMenu_div.style.background = '#cecece';
+				_subMenu_div.style.border = '1px dashed #000';
+				_subMenu_div.style.float = 'left';
+				_subMenu_div.style.position = 'absolute';
+				_subMenu_div.style.left = '55px';
+				_subMenu_div.style.width = '120px';
+				_subMenu_div.style.zindex = '99999';
+				_subMenu_div.innerHTML = _itensMenu; 
+	
+			var elementParent = document.getElementById('fast_menu_jabberit');
+			elementParent.appendChild(_subMenu_div);
+		}
+	}
+
+	function Load()
+	{
+		addIcon();
+		getPreferences();
+		
+		// AutoStatus Away		
+		autoStatus();
+		configEvents(document, 'onmousemove', autoStatus);
+		configEvents(document, 'onkeypress', autoStatus);
+	}
+
+	Load.prototype.adIcon		= addIcon;
+	Load.prototype.autoStatusIM	= autoStatus;
+	Load.prototype.chstatusJava	= changeStatusJava;
+	Load.prototype.closeW		= closeWindow;
+	Load.prototype.cLabel		= changeLabel;
+	Load.prototype.getElement	= getElementStatus;
+	Load.prototype.keyPress		= keyPressSearch;
+	Load.prototype.openWinParExt = openWindowParticipantsExternal;
+	Load.prototype.search		= searchUser;
+	Load.prototype.setPrefe 	= setPreferences;
+	Load.prototype.show			= showDiv;
+	Load.prototype.showW		= showWindow;
+	
+	window.loadscript = new Load;
+
+})();
+
+// Functions OnMouseOver e OnMouseOut
+
+function elementOnMouseOut()
+{
+	if( arguments.length > 0 )
+	{
+		var _element = arguments[0];
+			_element.style.backgroundColor = '';
+			_element.style.border = '';
+			if( !arguments[1] )
+				_element.style.borderBottom = '1px solid #dedede';
+	}
+}
+
+function elementOnMouseOver()
+{
+	if( arguments.length > 0 )
+	{
+		var _element = arguments[0];
+			_element.style.backgroundColor = 'white';
+			_element.style.border = '1px solid black';
+	}
+}
+
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/ldap.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/ldap.js	(revision 697)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/ldap.js	(revision 697)
@@ -0,0 +1,296 @@
+(function()
+{
+	var _conn;
+	var _xtools;
+	var _window;
+
+	function _add_user()
+	{
+		var _win_add = _window.load('add_user_im');
+			_win_add.title('.:: Adicionar Novos Contatos ::.');
+			_win_add.size(440);
+			_win_add.position(200,80);
+			_win_add.wc.style.padding = "3px";
+		
+		var _params = {
+			'lang1':jabberitGetLang('Name of Contacts'),
+			'lang2':jabberitGetLang('Search'),
+			'lang3':jabberitGetLang('member of organization'),
+			'lang4':jabberitGetLang('nickname'),
+			'lang5':jabberitGetLang('group'),
+			'lang6':jabberitGetLang('add'),
+			'lang7':jabberitGetLang('close'),
+			'lang8':jabberitGetLang('Others Expressos')			
+		};
+
+		_win_add.bz.style.display = "none";
+		_win_add.bx.style.display = "none";
+
+		_win_add.content( _xtools.parse(_xtools.xml('adduser'), 'add_user.xsl', _params));
+
+		_conn.go('$this.contacts_im.getParticipantsExternal',
+				function(data)
+				{
+					var data = eval(data);
+					var elementDiv =  document.getElementById('external_Participants_Jabberit');					
+					
+					if( data ) 
+						elementDiv.style.display = 'block';
+				});
+
+		_config( _win_add.wc.childNodes[2].childNodes[0],
+			'onclick',
+			function()
+			{
+				var _name = document.getElementById('im_name');
+				var _group = document.getElementById('im_group');
+				var	_jid = document.getElementById('im_jid').value;
+				var _status = document.getElementById('im_status_add');
+
+				_status.innerHTML = '';
+				_name.previousSibling.style.color = "#000";
+
+				if ( !_jid )
+				{
+					_status.innerHTML = 'Selecione uma organização no campo da esquerda e em<br/>'
+										+ ' seguida, no campo da direita, um membro da organização<br/>'
+										+ ' para adicionar como contato';
+				}
+				else
+				{
+					_name.value = _name.value.replace(/^( )*|( )*$/g, '');
+					_group.value = _group.value.replace(/^( )*|( )*$/g, '');
+
+					if ( !(_name.value) || !(_group.value) )
+					{
+						if ( !(_name.value) )
+							alert( jabberitGetLang('ATTENTION') + "!!\nInforme um \"NOME\".");
+
+						if ( !(_group.value) )
+							alert( jabberitGetLang('ATTENTION') + "!!\nInforme um \"GRUPO\".");							
+					}
+					else
+					{
+						var _uid;
+						
+						if ( (_uid = document.getElementById('im_uid')) )
+							_uid = _uid.value;
+						else
+							_uid = _jid.substr(0, (_jid.indexOf('@') - 1));
+
+						
+						_conn.go('$this.contacts_im.verifyAddNewContact',
+								 function(data)
+								 {
+									data = eval(data);
+									
+									if( !data )
+									{
+										alert("*********** " + jabberitGetLang("Attention") + "!! ***********\n" + 
+											  jabberitGetLang("This user is part of a small group!") + 
+											  "\n" + jabberitGetLang("Contact was not added!"));
+
+										_name.value = '';
+										_group.value = '';
+											  
+									}
+									else
+									{	
+										
+										_name.parentNode.style.display = 'none';
+										_name.parentNode.nextSibling.style.display = 'none';
+										_status.innerHTML = '<br/>Adicionando contato, aguarde....<br/>';
+				
+										_conn.go(
+											'$this.ujabber.AddNewContact',
+											function()
+											{
+												_status.innerHTML = '<br/>Contato adicionado !<br/>';
+												setTimeout('cleanStatusAddContactIM();',2500);
+											},
+											'uid='+_uid+'&name='+_name.value+'&group='+_group.value
+										);
+
+										_name.value = '';
+										_group.value = '';
+										
+									}
+								 }, "uid="+_uid);
+					}
+				}
+			}
+		);
+
+		_config(_win_add.wc.childNodes[2].childNodes[1],
+			'onclick',
+			function()
+			{
+				_win_add.button(_win_add.bc);
+			}
+		);
+	}
+
+	function _config(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( pObj.addEventListener )
+				pObj.addEventListener(pEvent, pHandler, false);
+			else if ( pObj.attachEvent )
+				pObj.attachEvent('on' + pEvent, pHandler);
+		}
+	}
+
+	function _highlight(e)
+	{
+		var el = ( e.target ) ? e.target : e.srcElement;
+		var color = "#fff";
+		if ( e.type.indexOf('mouseover') != -1 )
+			color = "#dedede";
+		el.style.backgroundColor = color;
+	}
+
+	function _search()
+	{
+		var _loading = document.getElementById('__span_load_im');
+		var _target = document.getElementById('im_ldap_user');
+		var _particiExt = document.getElementById('external_Participants_Jabberit').firstChild;
+
+		function getUsersLdap(_data)
+		{
+			var _params = {
+				'many_results' : jabberitGetLang('More than 50 results. Please, try to refine your search.'),
+				'empty' : jabberitGetLang('None result was found.')
+			 };
+		
+			_target.innerHTML = _xtools.parse(_data,'list_ldap_contacts.xsl', _params);
+			
+			function _show(m)
+			{
+				m = ( m.target ) ? m.target : m.srcElement;
+				if ( m.getAttribute('value'))
+					m = m.getAttribute('value');
+				else
+					m = m.parentNode.getAttribute('value');
+				
+				if ( !m )
+					return false;
+
+				document.getElementById('__span_load_im_group').style.display = 'block';
+				document.getElementById('im_jid').value = m.substr(0, m.indexOf(';'));
+				document.getElementById('im_uid').value = m.substr((m.indexOf(';')+1));
+				
+				var _name = document.getElementById('im_name');
+
+				var first_name = document.getElementById(m).innerHTML;
+					first_name = first_name.substr(0, first_name.indexOf(' '));
+					
+					_name.value = first_name;							
+					_name.previousSibling.style.color = "#000";
+					_name.parentNode.style.display = 'block';
+					_name.parentNode.nextSibling.style.display = 'block';
+					_name.parentNode.nextSibling.nextSibling.innerHTML = '';
+				
+				_conn.go('$this.ujabber.getGroupsJabber',
+						function(data)
+						{
+							if( data = data.replace(/(^\s*)|(\s*$)/g,''))
+							{
+								var _group = document.getElementById('im_group');
+								var _groupOptions = '';
+
+								_group.setAttribute('selectBoxOptions', data);
+								if( document.getElementById('selectBox0') == null)
+									editS.create(document.getElementById('im_group'));
+							}
+							document.getElementById('__span_load_im_group').style.display = 'none';
+						});
+
+				document.getElementById('im_group').value = '';
+				document.getElementById('im_group').focus();
+			}
+
+			var _member = _target.firstChild;
+			
+			while ( _member )
+			{
+				if( _member.getAttribute('photo') === '1' )
+				{
+					var uid = _member.getAttribute('value'); 
+					uid = uid.substr(uid.indexOf(';') + 1);
+					_member.style.backgroundImage = 'url(' + path_jabberit + 'inc/getphoto.php?uid=' + uid + ')';
+				}
+				_config(_member, 'onclick', _show);
+				
+				_member = _member.nextSibling;
+			}
+		
+		}
+
+		_loading.style.display = "block";	
+		
+		if(!_particiExt.checked)
+		{
+			_conn.go(
+					'$this.contacts_im.list_contacts',		
+					function(_data)
+					{
+						getUsersLdap(_data);
+						_loading.style.display = "none";						
+					},
+					'name='+ arguments[0]
+				    );
+		}
+		else
+		{
+
+			function checkMail(pMail)
+			{
+				var er = new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
+				if(er.test(pMail))
+					return true;
+				else
+					return false;
+			}
+			
+			if( checkMail(arguments[0]) )			
+			{			
+				_conn.go(
+					'$this.ldap_im.list_participants_externals',		
+					function(data)
+					{
+						getUsersLdap(data);
+						_loading.style.display = "none";
+					},
+					'mail=' + arguments[0]
+					);
+			}
+			else
+			{
+				alert(jabberitGetLang('Inform a valid e-mail!'));
+				_loading.style.display = "none";	
+			}
+		}
+				
+	}
+
+	function LDAP()
+	{
+		_conn = arguments[0];
+		_xtools = arguments[1];
+		_window = arguments[2];
+	}
+
+	LDAP.prototype.search = _search;
+	LDAP.prototype.add = _add_user;
+	window.JITLdap = LDAP;
+}
+)();
+
+function cleanStatusAddContactIM()
+{
+	document.getElementById('im_status_add').innerHTML = '';
+}
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/dragdrop.js
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/dragdrop.js	(revision 382)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/js/dragdrop.js	(revision 382)
@@ -0,0 +1,166 @@
+(function()
+{
+	var _element = null;
+
+	function _config(pObj, pEvent, pHandler)
+	{
+		if ( typeof pObj == 'object' )
+		{
+			if ( pEvent.substring(0, 2) == 'on' )
+				pEvent = pEvent.substring(2, pEvent.length);
+
+			if ( arguments.length == 3 )
+			{
+				if ( pObj.addEventListener )
+					pObj.addEventListener(pEvent, pHandler, false);
+				else if ( pObj.attachEvent )
+					pObj.attachEvent('on' + pEvent, pHandler);
+			}
+			else if ( arguments.length == 4 )
+			{
+				if ( pObj.removeEventListener )
+					pObj.removeEventListener(pEvent, pHandler, false);
+				else if ( pObj.detachEvent )
+					pObj.detachEvent('on' + pEvent, pHandler);
+			}
+		}
+	}
+
+	function _getMouseOffset(e, el)
+	{
+		var docPos = _getPosition(el);
+		var mousePos = _mouseCoords(e);
+		return {
+			'x' : mousePos.x - docPos.x,
+			'y' : mousePos.y - docPos.y
+		};
+	}
+
+	function _getPosition(_pObject)
+	{
+		var left = 0;
+		var top  = 0;
+
+		while ( _pObject.offsetParent )
+		{
+			left += _pObject.offsetLeft;
+			top  += _pObject.offsetTop;
+			_pObject = _pObject.offsetParent;
+		}
+
+		left += _pObject.offsetLeft;
+		top  += _pObject.offsetTop;
+
+		return {
+			'x' : left,
+			'y' : top
+		};
+	}
+
+	function _mouseCoords(ev)
+	{
+		var CoordX = "";
+		var CoordY = "";
+
+		if ( ev.pageX || ev.pageY )
+			return {
+				'x' : ev.pageX,
+				'y' : ev.pageY
+			};
+
+		CoordX = ev.clientX + document.body.scrollLeft - document.body.clientLeft;
+		CoordY = ev.clientY + document.body.scrollTop  - document.body.clientTop;
+		return {
+			'x' : CoordX,
+			'y' : CoordY
+		};
+	}
+
+	function _mouseMove(e)
+	{
+		if ( _element )
+		{
+			if ( _element.mouseOffset == null )
+				_element.mouseOffset = _getMouseOffset(e, _element);
+
+			var mousePos = _mouseCoords(e);
+
+			var x = mousePos.x - _element.mouseOffset.x;
+			var y = mousePos.y - _element.mouseOffset.y;
+			_element.style.left = (( x < 0 ) ? 0 : x) + 'px';
+			_element.style.top  = (( y < 0 ) ? 0 : y) + 'px';
+		}
+	}
+
+	function _mouseUp()
+	{
+		if ( _element )
+		{
+			_config(_element, 'onmousemove', _mouseMove, 'remove');
+			_config(top.document, 'onmousemove', _mouseMove, 'remove');
+
+			_config(_element, 'onmouseup', _mouseUp, 'remove');
+			_config(top.document, 'onmouseup', _mouseUp, 'remove');
+
+			_element.mouseOffset = null;
+			_element = null;
+		}
+	}
+
+	function _toDrag(el)
+	{
+		if ( el.getAttribute('dragdrop_parent') == null )
+		{
+			if ( el.getAttribute('dragdrop_child') != null )
+			{
+				var children = 0;
+				while ( (++children < 5) && (el.getAttribute('dragdrop_parent') == null) )
+					el = el.parentNode;
+			}
+			if ( el.getAttribute('dragdrop_parent') == null )
+				el = false;
+		}
+		return el;
+	}
+
+	function _drag(e)
+	{
+		if (typeof e.preventDefault != 'undefined')
+			e.preventDefault();
+		else
+			e.onselectstart = new Function("return false;");
+
+		var el = ( e.target ) ? e.target : e.srcElement;
+
+		el = _toDrag(el);
+
+		if ( el )
+		{
+			_element = el;
+
+			_config(el, 'onmousemove', _mouseMove);
+			_config(top.document, 'onmousemove', _mouseMove);
+
+			_config(el, 'onmouseup', _mouseUp);
+			_config(top.document, 'onmouseup', _mouseUp);
+		}
+	}
+
+	function _set(_pObject)
+	{
+		if ( typeof _pObject != 'object' )
+			return false;
+
+		_pObject.setAttribute('dragdrop_parent', 'true');
+
+		_config(_pObject, 'onmousedown', _drag);
+	}
+
+	function DragDrop()
+	{
+	}
+
+	DragDrop.prototype.drag = _set;
+	window.JITDragDrop = DragDrop;
+}
+)();
Index: /tags/jabberit_messenger/0.7.11/jabberit_messenger/help.php
===================================================================
--- /tags/jabberit_messenger/0.7.11/jabberit_messenger/help.php	(revision 494)
+++ /tags/jabberit_messenger/0.7.11/jabberit_messenger/help.php	(revision 494)
@@ -0,0 +1,28 @@
+<?php
+	/*******************************************************
+	 * Im - JabberIt
+	 * Colaboradores : Alexandre Correia / Rodrigo Souza
+	 *
+	 * ****************************************************/
+
+
+	$GLOBALS['phpgw_info']['flags'] = array(
+						'currentapp' => 'jabberit_messenger',
+						'nonavbar'   => true,
+						'noheader'   => false,
+						'jabberit_version' => '0.7.7',
+						);
+
+	include("../header.inc.php");
+
+	$jabberit_version = $GLOBALS['phpgw_info']['flags']['jabberit_version'];
+
+	$template = CreateObject('phpgwapi.Template', PHPGW_APP_TPL);
+	$template->set_file(Array('jabberit_messenger' => 'index.tpl'));
+	$template->set_var('template_default', $GLOBALS['phpgw_info']['user']['preferences']['common']['template_set']);
+	$template->set_var('template_set', 'default');	
+	$template->set_block('jabberit_messenger','index');
+	$template->pfp('out','index');
+
+
+?>
