Index: sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.categories.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.categories.inc.php	(revision 577)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/phpgwapi/inc/class.categories.inc.php	(revision 4778)
@@ -253,5 +253,5 @@
 			}
 
-
+                        $this->app_name = pg_escape_string($this->app_name);
 			$sql = "SELECT".$table_column."FROM phpgw_categories WHERE (cat_appname='" . $this->app_name. "' ".
 					($grant_cats ? " AND".$grant_cats : "") .($global_cats ? " OR".$global_cats: "").
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/setup/phpgw_pt-br.lang
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/setup/phpgw_pt-br.lang	(revision 4051)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/setup/phpgw_pt-br.lang	(revision 4778)
@@ -64,4 +64,5 @@
 This message don't have attachment(s)	mobile	pt-br	Este e-mail não possui anexo(s)
 This message has the follow attachments:	mobile	pt-br	Esta mensagem possui anexo:
+Tips	mobile	pt-br	Dicas
 Catalog	mobile	pt-br	Catálogo
 Phone	mobile	pt-br	Telefone
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/inc/class.mobiletemplate.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/inc/class.mobiletemplate.inc.php	(revision 4188)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/inc/class.mobiletemplate.inc.php	(revision 4778)
@@ -19,8 +19,11 @@
 			if( $template == "mini_desktop" )
 			{
+				$url_expresso = $this->getUrlExpresso() . "index.php";
+				
 				$this->template->set_file(array('home_t' => 'pc_template.tpl'));
 				$this->template->set_file(array('home_t_search_bar' => 'search_bar.tpl'));
 				$this->template->set_block('home_t_search_bar','search_bar');
 				$this->template->set_var('search',$this->template->fp('out','search_bar'));
+				$this->template->set_var('url_expresso',$url_expresso);
 				$this->template->set_var('lang_mini_mobile', lang('mini mobile'));
 				$this->template->set_var('lang_search_error_message',lang("need choose one option"));
@@ -133,26 +136,27 @@
 			
 			$this->template->set_var('global_title', lang('expresso mini'));
-			// button logout
-			if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) )
-			{
-				$this->template->set_var('style_1','padding-left:65%;');
-				$this->template->set_var('style_2','position:relative; float: right; display: none');
-			}
-			else
-			{
-				$this->template->set_var('style_1','position:absolute; float: left;');
-				$this->template->set_var('style_2','position:relative; float: right; display: block');
-			}
-
-			if( isset($_SESSION['mobile']['displayIOS']) && $_SESSION['mobile']['displayIOS'] == "true" )
-				$this->template->set_var('display_IOS', "none");
-			else
-				$this->template->set_var('display_IOS', "block");
-				
+			$this->template->set_var('style_1','position:absolute; float: left;');
+			$this->template->set_var('style_2','position:relative; float: right; display: block');
 			$this->template->set_var('lang_tips', lang('Tips'));
 			$this->template->set_var('lang_logout', lang('logout'));
 			$this->template->set_var('lang_search', lang('search'));
 			
-			$this->template->set_var('href_logout', 'login.php?cd=1');
+			if( isset($_SESSION['mobile']['displayIOS']) && $_SESSION['mobile']['displayIOS'] == "true" )
+			{
+				$this->template->set_var('display_IOS', "none");
+			}
+			else
+			{
+				$this->template->set_var('display_IOS', "block");
+			}
+
+			if( isset($_COOKIE['lem']) && isset($_COOKIE['pem']) )
+			{
+				$this->template->set_var('href_logout', 'login.php?cd=logout_mobile');
+			}
+			else
+			{
+				$this->template->set_var('href_logout', 'login.php?cd=1');
+			}
 		}
 		
@@ -249,4 +253,17 @@
 			return $url;
 		}
+		
+		private function getUrlExpresso()
+		{
+			$url_expresso = $GLOBALS['phpgw_info']['server']['webserver_url'];
+			$url_expresso = ( !empty($url_expresso) ) ? $url_expresso : '/';
+	
+			if(strrpos($url_expresso,'/') === false || strrpos($url_expresso,'/') != (strlen($url_expresso)-1))
+			{
+				$url_expresso .= '/';
+			}
+
+			return $url_expresso;
+		}
 
 		function get_back_link(){
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/login.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/login.php	(revision 4134)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/login.php	(revision 4778)
@@ -17,6 +17,11 @@
 	$GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
 	
-	if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1)
-		start_prefered_app();
+	if( isset($GLOBALS['sessionid']) )
+	{
+		if( $_GET['cd'] != 10 && $_GET['cd'] != 1 && $_GET['cd'] !== 'logout_mobile' )
+		{
+			start_prefered_app();
+		}
+	}
 		
 	if ( $GLOBALS['phpgw_info']['server']['use_https'] > 0 )
@@ -35,8 +40,23 @@
 	$tmpl = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
 	$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
+	
+	//URL Expresso
+	$url_expresso = $GLOBALS['phpgw_info']['server']['webserver_url'];
+	$url_expresso = ( !empty($url_expresso) ) ? $url_expresso : '/';
+	
+	if(strrpos($url_expresso,'/') === false || strrpos($url_expresso,'/') != (strlen($url_expresso)-1))
+	{
+		$url_expresso .= '/';
+	}
+	
 	$tmpl->set_file(array('login_form' => 'login.tpl'));
 	$tmpl->set_block('login_form','page');
 	$tmpl->set_block('login_form','success_message');
 	$tmpl->set_block('login_form','error_message');
+	$tmpl->set_var('url_expresso', $url_expresso);
+	$tmpl->set_var('lang_username', lang('username'));
+	$tmpl->set_var('lang_password', lang('password'));
+	$tmpl->set_var('lang_login', lang('login'));
+	
 	
 	//verificando a mensagem erro ou sucesso
@@ -68,4 +88,5 @@
 	function check_logoutcode($code) {
 		switch($code) {
+			case 'logout_mobile': 
 			case 1:
 				logout();
@@ -94,4 +115,5 @@
 				}
 				return lang('Your session could not be verified.');
+			
 			default:
 				return '';
@@ -108,13 +130,18 @@
 	elseif(get_var('lem',array('GET','COOKIE')) && get_var('pem',array('GET','COOKIE')))
 	{
-		if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10') { 
-			$submit = True;
-			$login  = base64_decode(get_var('lem',array('GET','COOKIE')));
-			$passwd = base64_decode(get_var('pem',array('GET','COOKIE')));
-			$passwd_type = 'text';
-		}
-		else {
-			$GLOBALS['phpgw']->session->phpgw_setcookie('lem');
-			$GLOBALS['phpgw']->session->phpgw_setcookie('pem');
+		if( $_GET['cd'] !== 'logout_mobile' )
+		{
+			if(!$_GET['cd'] || $_GET['cd'] == '1' || $_GET['cd'] == '10')
+			{ 
+				$submit = True;
+				$login  = base64_decode(get_var('lem',array('GET','COOKIE')));
+				$passwd = base64_decode(get_var('pem',array('GET','COOKIE')));
+				$passwd_type = 'text';
+			}
+			else
+			{
+				$GLOBALS['phpgw']->session->phpgw_setcookie('lem');
+				$GLOBALS['phpgw']->session->phpgw_setcookie('pem');
+			}
 		}
 	}
@@ -180,7 +207,4 @@
 	$tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());
 	$tmpl->set_var('cookie',$last_loginid);
-	$tmpl->set_var('lang_username', lang('username'));
-	$tmpl->set_var('lang_password', lang('password'));
-	$tmpl->set_var('lang_login', lang('login'));
 	$tmpl->set_var('lang_notices', lang('notices'));
 	$tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/pc_template.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/pc_template.tpl	(revision 4200)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/pc_template.tpl	(revision 4778)
@@ -95,5 +95,5 @@
 			<p>Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</p>
 			<p><a href="index.php?menuaction=mobile.ui_home.change_template&template=mini_mobile">{lang_mini_mobile}</a></p>
-			<p><a href="/index.php">Versão Clássica</a></p>
+			<p><a href="{url_expresso}">Versão Clássica</a></p>
 		</div>
 	</body>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/login.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/login.tpl	(revision 4200)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/login.tpl	(revision 4778)
@@ -63,5 +63,5 @@
 
 		<div class="rodape">Projeto ExpressoLivre 2004 - 2010 :: Licen&ccedil;a de Software</div>
-		<div class="rodape center"><a href="/login.php?dont_redirect_if_moble=1">Versão Clássica</a></div>
+		<div class="rodape center"><a href="{url_expresso}login.php?dont_redirect_if_moble=1">Versão Clássica</a></div>
 	</body>
 </html>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/template.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/template.tpl	(revision 4149)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/mobile/templates/default/template.tpl	(revision 4778)
@@ -13,5 +13,5 @@
 			<div style="position:absolute; float:left; width:50%;">
 				<div style="position:relative; float:left;">
-					<h1 onclick="window.location='index.php?menuaction=mobile.ui_home.index'">{global_title}</h1>
+					<h1 onclick="document.location='index.php?menuaction=mobile.ui_home.index'">{global_title}</h1>
 				</div>
 			</div>
@@ -19,9 +19,9 @@
 			<div style="position:relative; float:right; width:50%; margin:2px;">
 				<div style="{style_1}">
-					<h1 onclick="window.location='index.php?menuaction=mobile.ui_home.dicas'">Dicas</h1>
+					<h1 onclick="document.location='index.php?menuaction=mobile.ui_home.dicas'">{lang_tips}</h1>
 				</div>
 				
 				<div style="{style_2}">
-					<h1 onclick="window.location='{href_logout}'">{lang_logout}</h1>
+					<h1 onclick="document.location='{href_logout}'">{lang_logout}</h1>
 				</div>
 			</div>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/inc/class.uimaillists.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 4216)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 4778)
@@ -271,5 +271,5 @@
 					else
 					{
-						$mail_not_found .= "<option value=" . $mail . ">" . $cn .  " [" . $array_users_uid[$mail] . "]</option>";
+						$mail_not_found .= "<option value=" . $mail . ">"  . $array_users_uid[$mail] . "</option>";
 					}
 				}
@@ -277,5 +277,5 @@
 				if ($mail_not_found != '')
 				{
-					$opt_tmp_mail_not_found = '<option  value="-1" disabled>--------------------&nbsp;&nbsp;&nbsp;&nbsp;'.lang('emails did not find').'&nbsp;&nbsp;&nbsp;&nbsp;------------------ </option>'."\n";
+					$opt_tmp_mail_not_found = '<option  value="-1" disabled>--------------------&nbsp;&nbsp;&nbsp;&nbsp;'.lang('external users').'&nbsp;&nbsp;&nbsp;&nbsp;------------------ </option>'."\n";
 					$ea_select_usersInMaillist .= $opt_tmp_mail_not_found . $mail_not_found;
 				}
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/js/jscode/maillists.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/js/jscode/maillists.js	(revision 3351)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/js/jscode/maillists.js	(revision 4778)
@@ -460,2 +460,113 @@
 	return ufn.substring(0,(ufn.length-1));
 }
+function LTrim(value)
+{
+        var w_space = String.fromCharCode(32);
+        var strTemp = "";
+        var iTemp = 0;
+
+        var v_length = value ? value.length : 0;
+        if(v_length < 1)
+                return "";
+
+        while(iTemp < v_length){
+                if(value && value.charAt(iTemp) != w_space){
+                        strTemp = value.substring(iTemp,v_length);
+                        break;
+                }
+                iTemp++;
+        }
+        return strTemp;
+}
+
+function validateEmail()
+{
+
+        externalEmail = document.getElementById('ea_input_externalUser');
+
+        if( externalEmail.value )
+        {
+                //var element = arguments[0];
+                var validate = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
+
+                if(this.LTrim(externalEmail.value) != "" && externalEmail.value != "")
+                {
+                        if(!validate.test(externalEmail.value))
+                        {
+                                alert(get_lang('Email address is not valid') + '.');
+                                externalEmail.focus();
+                                return false;
+                        }else {
+                                this.add_externalUser2maillist(externalEmail.value);
+                        }
+                }
+
+        }
+}
+
+function add_externalUser2maillist(mailAddress)
+{
+        input_externalUsers = mailAddress.toLowerCase(); //document.getElementById('ea_input_externalUser').value;
+        select_usersInMaillist = document.getElementById('ea_select_usersInMaillist');
+
+        var count_externalUsers = input_externalUsers.length;
+        var count_usersInMaillist = select_usersInMaillist.options.length;
+        var new_options = '';
+
+        var teste = ''; //Variavel que ira receber mensagem de alerta ao usuario;
+        var alerta = new Boolean(0); //Variavel que sera usada para verificar se o alerta ao usuario sera exibido ou nao;
+
+        //Laco abaixo compara se o valor escolhido em select_available_users ja existe em select_usersInMaillist
+        //se existir, adiciona o valor em teste e muda a variavel alerta para true; teste sera exibido em tela
+        //apenas de alerta  true; ver if no fim da funcao;
+        for(j = 0; j < count_usersInMaillist; j++)
+        {
+                var tmp = select_usersInMaillist.options[j].text
+
+                if(tmp.match(input_externalUsers))
+                {
+                        teste = get_lang("User already belongs to the list") + "\n" + input_externalUsers + "\n";
+                        alerta = new Boolean(1);
+                }
+        }
+
+        if(alerta != true)
+        {
+                if(document.all)
+                {
+                        if ( (select_usersInMaillist.innerHTML.indexOf('value='+input_externalUsers)) == '-1' )
+                        {
+                                new_options +=  "<option value="
+                                                        + input_externalUsers
+                                                        + ">"
+                                                        + input_extenalUsers
+                                                        + "</options>";
+                        }
+                }
+                else
+                {
+                        if ( (select_usersInMaillist.innerHTML.indexOf('value="'+input_externalUsers+'"')) == '-1' )
+                        {
+                                new_options +=  "<option value="
+                                                        + input_externalUsers
+                                                        + ">"
+                                                        + input_externalUsers
+                                                        + "</options>";
+                        }
+                }
+        }
+
+        if(alerta == true)
+        {
+                alert(teste);
+        }
+
+
+        if (new_options != '')
+        {
+                select_usersInMaillist.innerHTML = new_options + select_usersInMaillist.innerHTML;
+                select_usersInMaillist.outerHTML = select_usersInMaillist.outerHTML;
+        }
+
+        document.getElementById('ea_input_externalUser').value = '';
+}
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/templates/default/maillists_form.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/templates/default/maillists_form.tpl	(revision 3351)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoAdmin1_2/templates/default/maillists_form.tpl	(revision 4778)
@@ -75,4 +75,10 @@
 							<b>{lang_users}:</b><br>
 							<select id="ea_select_available_users" style="width:400px; height:200px" multiple size="13"></select>
+							<br/><br/> 
+							<b>{lang_external_user}:</b> 
+							<br/> 
+							<input id="ea_input_externalUser" size="35" type="text"> 
+							<input id="input_user" value="Adicionar" onclick="javascript:validateEmail();" type="button"> 
+							<br/> 
 						</td>
 					</tr>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/setup/check_install.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/setup/check_install.php	(revision 2)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/setup/check_install.php	(revision 4778)
@@ -63,13 +63,4 @@
 				lang('*** Do NOT update your database via setup, as the update might be interrupted by the max_execution_time, which leaves your DB in an unrecoverable state (your data is lost) !!!')
 		),
-/* not longer needed, as it gets set now on runtime (works even with safe_mode)
-		'error_reporting' => array(
-			'func' => 'php_ini_check',
-			'value' => E_NOTICE,
-			'verbose_value' => 'E_NOTICE',
-			'check' => 'not set',
-			'safe_mode' => 'error_reporting = E_ALL & ~E_NOTICE'
-		),
-*/
 		'magic_quotes_runtime' => array(
 			'func' => 'php_ini_check',
@@ -105,8 +96,4 @@
 			'save_mode' => 'max_execution_time = 30'
 		),
-#		'mysql' => array(
-#			'func' => 'extension_check',
-#			'warning' => "<div id='setup_info'>" . lang('The %1 extension is needed, if you plan to use a %2 database.','mysql','MySQL').'</div>'
-#		),
 		'ldap' => array(
 			'func' => 'extension_check',
@@ -128,7 +115,7 @@
 		'mbstring.func_overload' => array(
 			'func' => 'php_ini_check',
-			'value' => 7,
-			'warning' => '<div id="setup_info">' . lang('The mbstring.func_overload = 7 is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>",
-			'change' => extension_loaded('mbstring')  || function_exists('dl') && @dl(PHP_SHLIB_PREFIX.'mbstring.'.PHP_SHLIB_SUFFIX) ? 'mbstring.func_overload = 7' : '',
+			'value' => 0,
+			'warning' => '<div id="setup_info">' . lang('The mbstring.func_overload = 0 is needed to fully support unicode (utf-8) or other multibyte-charsets.') . "</div>",
+			'change' => extension_loaded('mbstring')  || function_exists('dl') && @dl(PHP_SHLIB_PREFIX.'mbstring.'.PHP_SHLIB_SUFFIX) ? 'mbstring.func_overload = 0' : '',
 		),
 		'imap' => array(
@@ -154,12 +141,4 @@
 			'is_writable' => True
 		),
-#		'fudforum' => array(
-#			'func' => 'permission_check',
-#			'is_writable' => True,
-#			'only_if_exists' => True
-#		),
-#		'gd' => array(
-#			'func' => 'gd_check'
-#		)
 	);
 
@@ -474,5 +453,4 @@
 			$GLOBALS['phpgw_setup']->html->show_header(lang('Checking the Expresso Livre (eGroupWare) Installation'),False,'config',$ConfigDomain ? $ConfigDomain . '(' . @$phpgw_domain[$ConfigDomain]['db_type'] . ')' : '');
 			echo '<h1>'.lang('Checking the Expresso Livre (eGroupWare) Installation')."</h1>\n";
-			# echo "<pre style=\"text-align: left;\">\n";;
 		}
 	}
@@ -492,5 +470,4 @@
 	if ($run_by_webserver)
 	{
-		# echo "</pre>\n";;
 
 		if ($GLOBALS['phpgw_info']['setup']['stage']['header'] != 10)
@@ -519,5 +496,4 @@
 		}
 		$setup_tpl->pparse('out','T_footer');
-		//echo "</body>\n</html>\n";
 	}
 ?>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.uicalendar.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.uicalendar.inc.php	(revision 4427)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/calendar/inc/class.uicalendar.inc.php	(revision 4778)
@@ -2069,5 +2069,5 @@
 				}
 				
-				$event['participants'] = Array($_SESSION['phpgw_info']['expressomail']['user']['account_id'] => $event['participants'][$_SESSION['phpgw_info']['expressomail']['user']['account_id']]);
+                                $event['participants'] = Array($GLOBALS['phpgw_info']['user']['account_id'] => $event['participants'][$GLOBALS['phpgw_info']['user']['account_id']]);
 
 				$overlapping_events = $this->bo->overlap(
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_add.xsl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_add.xsl	(revision 3178)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_add.xsl	(revision 4778)
@@ -1,11 +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:template match="rss/channel">
-	<span><xsl:value-of select = "title" /></span><span> - <xsl:value-of select="count(item)"/> news</span>
-	<img src='../phpgwapi/templates/default/images/foldertree_trash.png'>
-		<xsl:attribute name="onclick">
-			news_edit.unsubscribe('<xsl:value-of select="link"/>',this);
-		</xsl:attribute>
-	</img>
-</xsl:template>
+    
+    <xsl:param name="linkURL" />
+    
+    <xsl:template match="rss/channel">
+        
+        <img src='../phpgwapi/templates/default/images/foldertree_trash.png'>
+            <xsl:attribute name="onclick">
+                    news_edit.unsubscribe('<xsl:value-of select="$linkURL"/>',this);
+            </xsl:attribute>
+            <xsl:attribute name="style">
+                width:16px; height:16px; cursor: pointer;
+            </xsl:attribute>
+        </img>
+        
+        <label titleRss="{title}">
+            <xsl:value-of select = "title" />
+        </label>
+        
+    </xsl:template>
+    
 </xsl:stylesheet>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/makeWindow.xsl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/makeWindow.xsl	(revision 4778)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/makeWindow.xsl	(revision 4778)
@@ -0,0 +1,35 @@
+<?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="lang_label1" />
+    <xsl:param name="lang_label2" />
+    <xsl:param name="lang_subscribe" />
+    
+    <xsl:template match="make_window">
+        
+        <div style="border:1px solid #000; margin: 2px; width: 333px;">
+            
+            <div style="margin: 2px;">
+                <div style="margin-top:5px;">
+                    <label><xsl:value-of select="$lang_label1"/></label>
+                </div>
+                <div style="margin-top:5px;">
+                    <input type="text" id="rssEnter" size="40"/>
+                </div>
+                <div style="margin-top:5px;">
+                    <input value="{$lang_subscribe}" onclick="news_edit.subscribe();" type="button" />
+                </div>
+            </div>
+            
+            <div style="margin:5px 2px 2px 2px;border-bottom: 1px solid #000;">
+                <label><xsl:value-of select="$lang_label2"/></label>
+            </div>
+            
+            <div id="listRSS" style="overflow-y: auto; height: 160px; margin: 2px;"></div>
+            
+        </div>
+
+    </xsl:template>
+    
+</xsl:stylesheet>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_read.xsl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_read.xsl	(revision 3178)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/stylesheet/news_read.xsl	(revision 4778)
@@ -1,26 +1,40 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-	<xsl:template match="rss/channel">
-	<div id="divScrollMain_0" style="overflow-y: scroll; overflow-x: hidden; width: 99.3%;">
-	<table id="table_box" class="table_box" cellspacing="0" cellpadding="0">
-		<tbody id="tbody_box">
-	<xsl:for-each select="item">
-		<xsl:variable name="itens" select='position()' />
-		<tr class="tr_msg_read">
-			<xsl:attribute name="onclick">
-				news_edit.read_item('<xsl:value-of select="$itens"/>');
-			</xsl:attribute>
-			<td width="1%" class="td_msg"><input type="checkbox" class="checkbox"/></td>
-			<td width="1%" class="td_msg"/>
-			<td width="1%" class="td_msg"><img title="Lida" src="templates/default/images/seen.gif"/></td>
-			<td width="16%" class="td_msg"><span style="text-decoration: none;"><xsl:value-of select="owner"/></span></td>
-			<td width="50%" class="td_msg"><xsl:value-of select="title"/></td>
-			<td width="17%" align="center" class="td_msg" title="14/08/2010"><xsl:value-of select="pubDate"/></td>
-			<td width="14%" nowrap="true" align="center" class="td_msg"><xsl:value-of select="string-length(description)"/></td>
-		</tr>
-	</xsl:for-each>
-	</tbody>
-	</table>
-	</div>
-</xsl:template>
+    
+    <xsl:param name="lang_who" />
+    <xsl:param name="lang_subject" />
+    <xsl:param name="lang_date" />
+    <xsl:param name="lang_size" />
+    
+    <xsl:template match="rss/channel">
+        
+        <div id="divScrollMain_0" style="overflow-y: scroll; overflow-x: hidden; width: 99.3%;">
+            <table id="table_box" border="1" class="table_message_header_box" cellspacing="0" cellpadding="0">
+                <tbody id="tbody_box">
+                    <tr class="message_header" style="height:20px">
+                        <td class="td_msg" style="width: 30%" align="left">
+                            <span style="margin-left:10px;"><xsl:value-of select="$lang_who" /></span>
+                        </td>
+                        <td class="td_msg" style="width:40%" align="left"><xsl:value-of select="$lang_subject" /></td>
+                        <td class="td_msg" style="width:20%" align="center"><xsl:value-of select="$lang_date" /></td>
+                        <td class="td_msg" style="width:10%" align="center"><xsl:value-of select="$lang_size" /></td>
+                    </tr>
+                    <xsl:for-each select="item">
+                        <xsl:variable name="itens" select='position()' />
+                        <tr class="tr_msg_read" style="height:20px">
+                            <xsl:attribute name="onclick">
+                                news_edit.read_item('<xsl:value-of select="$itens"/>');
+                            </xsl:attribute>
+                            <td class="td_msg" style="width:30%" align="left"><span style="margin-left:10px;"><xsl:value-of select="../title"/></span></td>
+                            <td class="td_msg" style="width:40%" align="left"><xsl:value-of select="title"/></td>
+                            <td class="td_msg" style="width:20%" align="center" convertDate="{pubDate}"><xsl:value-of select="pubDate"/></td>
+                            <td class="td_msg" style="width:10%" align="center"><xsl:value-of select="string-length(description)"/></td>
+                        </tr>
+                    </xsl:for-each>
+                </tbody>                
+             </table>
+        </div>
+        
+    </xsl:template>
+    
 </xsl:stylesheet>
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/index.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/index.php	(revision 4659)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/index.php	(revision 4778)
@@ -22,6 +22,7 @@
 	echo "<script src='../phpgwapi/js/jscalendar/calendar-setup.js?".$update_version."' type='text/javascript'></script>";
 	echo "<script src='../phpgwapi/js/jscalendar/lang/calendar-br.js?".$update_version."' type='text/javascript'></script>";
-	echo '<script type="text/javascript" src="../phpgwapi/js/wz_dragdrop/wz_dragdrop.js?'.$update_version.'"></script>
-		<script type="text/javascript" src="../phpgwapi/js/dJSWin/dJSWin.js?'.$update_version.'"></script>';
+        echo "<script src='../phpgwapi/js/x_tools/xtools.js?".$update_version."' type='text/javascript'></script>";
+	echo '<script type="text/javascript" src="../phpgwapi/js/wz_dragdrop/wz_dragdrop.js?'.$update_version.'"></script>';
+	echo '<script type="text/javascript" src="../phpgwapi/js/dJSWin/dJSWin.js?'.$update_version.'"></script>';
 
 	
@@ -156,6 +157,15 @@
     // End Search Users characteres shared folders.
     
-
-    // Set Imap Folder names options
+    // Begin Enabled Read RSS    
+	if( isset( $current_config['expressoMail_enabled_read_rss'] ) )        
+	{
+		echo '<script>var enabledReadRSS = "'.$current_config['expressoMail_enabled_read_rss'].'"</script>'; 
+	}
+	else
+	{
+		echo '<script>var enabledReadRSS = "false"; </script>';
+	}
+
+	// Set Imap Folder names options
 
     $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']		: lang("Trash");
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4778)
@@ -146,5 +146,21 @@
           <input type="text" id="minNum" value="{value_expressoMail_min_num_characters}" name="newsettings[expressoMail_min_num_characters]" size=2 maxlength=2 />
        </td>
-   </tr>  
+   </tr> 
+   <tr bgcolor="{th_bg}">
+		<td colspan="2">
+			&nbsp;
+		</td>   	
+   </tr>
+   <tr bgcolor="{row_on}">
+       <td>
+           <label style="font-weight:bold;">Habilitar leitor de RSS</label>
+       </td>
+	   <td>
+	       <select id="enabledReadRSS" name="newsettings[expressoMail_enabled_read_rss]">
+	            <option value="false" {selected_expressoMail_enabled_read_rss_false}>{lang_No}</option>
+				<option value="true" {selected_expressoMail_enabled_read_rss_true}>{lang_Yes}</option>	            
+	       </select>
+       </td>
+   </tr>
 <!-- END body -->
 <!-- BEGIN footer -->
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/phpgw_pt-br.lang
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 4718)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 4778)
@@ -82,4 +82,5 @@
 Command for spam	admin	pt-br	Comando que será executado ao marcar como spam
 Command for unmark spam	admin	pt-br	Comando que será executado ao marcar como não-spam
+Complete news	expressoMail1_2	pt-br	Notícia completa
 Config for expressoMail1_2	expressoMail1_2	pt-br	Configurações do expressoMail1_2
 Config for ExpressoMail	expressoMail1_2	pt-br	Configurações para o ExpressoMail
@@ -91,4 +92,5 @@
 Crypted message	expressoMail1_2	pt-br	Mensagem cifrada digitalmente
 Cyrus IMAP Server	expressoMail1_2	pt-br	Servidor de IMAP Cyrus
+Database Error	expressoMail1_2	pt-br	Erro no Banco de Dados
 Date: 	expressoMail1_2	pt-br	Data:
 Date	expressoMail1_2	pt-br	Data
@@ -97,4 +99,5 @@
 Define some criterion to the fields Sender, To and Subject with more than 3 characters!	expressoMail1_2	pt-br	Defina algum critério para os campos Remetente, Para, Assunto e Tamanho da mensagem com mais de 3 caracteres!
 Enter a numerical value to the message size!	expressoMail1_2	pt-br	Informe um valor numérico para o tamanho da mensagem!
+Enter the URL of RSS service	expressoMail1_2	pt-br	Digite a URL do serviço RSS
 Define some search parameters!	expressoMail1_2	pt-br	Defina alguns parâmetros para a busca!
 Define the boxes to search!	expressoMail1_2	pt-br	Defina as pastas para a busca!
@@ -119,5 +122,5 @@
 Do you really want to empty your trash folder?	expressoMail1_2	pt-br	Você tem certeza que deseja limpar sua lixeira?
 Do you wanna receive an alert for new messages?	expressoMail1_2	pt-br	Você quer receber um alerta para mensagens novas?
-Do you want to automatically display the message header?	expressoMail1_2	pt-br	Você deseja exibir automaticamente o cabecalho da mensagem?
+Do you want to automatically display the message header?	expressoMail1_2	pt-br	Você deseja exibir automaticamente o cabeçalho da mensagem?
 Do you want to block this e-mail?	expressoMail1_2	pt-br	Você gostaria de bloquear este e-mail?
 Do you want to cache php requests in javascript?	admin	pt-br	Utilizar cache de requisições no javascript?
@@ -135,4 +138,5 @@
 Edit filters	expressoMail1_2	pt-br	Editar Filtros
 Edit folders	expressoMail1_2	pt-br	Editar Pastas
+Edit my news	expressoMail1_2	pt-br	Editar Rss
 E-mail rule	expressoMail1_2	pt-br	regra do email
 Emails of the account	expressoMail1_2	pt-br	Emails da conta
@@ -207,4 +211,5 @@
 is to	expressoMail1_2	pt-br	é para
 subject is	expressoMail1_2	pt-br	tem assunto
+Subscribe	expressoMail1_2	pt-br	Assinar
 reject	expressoMail1_2	pt-br	Rejeitar
 discard	expressoMail1_2	pr-br	Descartar
@@ -250,4 +255,5 @@
 in this message	expressoMail1_2	pt-br	na mensagem
 Invalid date on field %1	expressoMail1_2	pt-br	Data inválida no campo '%1'
+Invalid entry	expressoMail1_2	pt-br	Entrada Inválida
 Invalid signature	expressoMail1_2	pt-br	Erro indeterminado: Não foi possível validar a assinatura digital da mensagem.
 italic	expressoMail1_2	pt-br	Italico
@@ -278,4 +284,5 @@
 List Catalog	expressoMail1_2	pt-br	Listar Catálogo
 List	expressoMail1_2	pt-br	Listar
+List of registered RSS	expressoMail1_2	pt-br	Lista dos RSS cadastrados
 list of the filters	expressoMail1_2	pt-br	Lista de filtros
 Loading	expressoMail1_2	pt-br	Carregando
@@ -332,4 +339,5 @@
 New Message	expressoMail1_2	pt-br	Nova Mensagem
 New rule	expressoMail1_2	pt-br	Nova Regra
+News edit	expressoMail1_2	pt-br	Editar notícias
 Next	expressoMail1_2	pt-br	Próximo
 Nickname	expressoMail1_2	pt-br	Apelido
@@ -528,5 +536,5 @@
 The size of this message has exceeded  the limit (%1B).	expressoMail1_2	pt-br	O tamanho desta mensagem excedeu o limite (maior que %1B).
 The Timezone you're in.	expressoMail1_2	pt-br	O fuso-horário em que você está.
-There are folders with invalid format. If you want to fix now, click on button OK.	expressoMail1_2	pt-br	Algumas pastas possuem formato inválido.\n Para corrigi-las agora clique no botão 'OK'.	
+There are folders with invalid format. If you want to fix now, click on button OK.	expressoMail1_2	pt-br	Algumas pastas possuem formato inválido.\n Para corrigi-las agora clique no botão 'OK'.
 This is the number of messages shown in your mailbox per page	expressoMail1_2	pt-br	Este é o número de mensagens mostradas na sua caixa de correio por página
 This list has no participants	expressoMail1_2	pt-br	Esta lista nao possui nenhum participante.
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php	(revision 1035)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/tables_current.inc.php	(revision 4778)
@@ -33,4 +33,15 @@
             'ix' => array(),
             'uc' => array()
+		),
+		'phpgw_userrss' => array(
+			'fd' => array(
+				'uid'		=> array('type' => 'int', 'nullable' => false  ),
+				'rss_url'	=> array('type' => 'varchar', 'precision' => 1000 ),
+				'name'		=> array('type' => 'varchar', 'precision' => 50)
+			),
+			'pk' => array('uid','rss_url'),
+			'fk' => array(),
+            'ix' => array(),
+            'uc' => array()
 		)
 	);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/setup/setup.inc.php	(revision 4778)
@@ -16,4 +16,5 @@
 	$setup_info['expressoMail1_2']['tables'][]		= 'phpgw_expressomail_contacts';
     $setup_info['expressoMail1_2']['tables'][]		= 'phpgw_certificados';
+    $setup_info['expressoMail1_2']['tables'][]		= 'phpgw_userrss';
 	$setup_info['expressoMail1_2']['enable']    	= 1;
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/gotodownload.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/gotodownload.php	(revision 3369)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/gotodownload.php	(revision 4778)
@@ -50,4 +50,6 @@
 	$newfilename = $newfilename ? $newfilename 	: $filename;
 	$strFileType = strrev(substr(strrev(strtolower($filename)),0,4));
+        if(strpos($strFileType ,"." )===false)
+                $strFileType = strrev(substr(strrev(strtolower($newfilename)),0,4));
 
 	downloadFile($strFileType, $filename, $newfilename, $fileContent, $encoding);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php	(revision 3178)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.rss.inc.php	(revision 4778)
@@ -33,12 +33,63 @@
 		exit;
 	}
-	function getChannels(){
+
+	private function createTableRSS()
+	{
+		$query = 'CREATE TABLE phpgw_userrss( uid INT NOT NULL,rss_url VARCHAR(1000),name varchar(50), PRIMARY KEY (uid,rss_url) );';
+		
+		$GLOBALS['phpgw']->db->query($query);
+		
+		if ( $GLOBALS['phpgw']->db->Error )
+			return false;
+		else
+			return true;
+	}
+	
+	function getChannels()
+	{
 		include('../header.inc.php');
-		$GLOBALS['phpgw']->db->query('SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id']);
-		while($GLOBALS['phpgw']->db->next_record())
-			$return[]=$GLOBALS['phpgw']->db->row();
-		return $return;
+		
+		$flag 		= false;
+		$tableQuery = "select relname from pg_stat_user_tables order by relname;";
+		
+		if( $GLOBALS['phpgw']->db->query( $tableQuery ) )
+		{
+			while( $GLOBALS['phpgw']->db->next_record() )
+			{
+				$tables[] = $GLOBALS['phpgw']->db->row();
+			}
+			
+			foreach( $tables as $tableName )
+			{
+				if( strtolower( $tableName['relname'] ) === 'phpgw_userrss' )
+				{
+					$flag = true;
+				}
+			}
+		}
+		
+		if( !$flag )
+		{
+			$flag = $this->createTableRSS();
+		}
+		
+		$query = 'SELECT rss_url,name FROM phpgw_userrss WHERE uid = '.$_SESSION['phpgw_session']['account_id'];		
+		
+		if( $GLOBALS['phpgw']->db->query($query) ) 
+		{
+			while( $GLOBALS['phpgw']->db->next_record() )
+			{
+				$return[] = $GLOBALS['phpgw']->db->row();
+			}
+		}
+
+		if( count($return) > 0 )
+			return $return;
+		else
+			return "";
 	}
-	function addChannel($param){
+	
+	function addChannel($param)
+	{
 		include('../header.inc.php');
 		$name = $GLOBALS['phpgw']->db->db_addslashes(htmlentities($param['name']));
@@ -52,5 +103,6 @@
 	}
 
-	function removeChannel($param){
+	function removeChannel($param)
+	{
 		include('../header.inc.php');
 		$url = $GLOBALS['phpgw']->db->db_addslashes($param['url']);
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 4644)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/inc/class.ldap_functions.inc.php	(revision 4778)
@@ -125,5 +125,5 @@
 			if (($field != 'null') && ($ID != 'null'))
 			{
-				$filter="(& (&(|(phpgwAccountType=u)(phpgwAccountType=g)(phpgwAccountType=l))(mail=*)) (|(cn=*$search_for*)(mail=*$search_for*)) (!(phpgwaccountvisible=-1)) )";
+				$filter="(& (&(|(phpgwAccountType=u)(phpgwAccountType=g)(phpgwAccountType=l)(phpgwAccountType=i)(phpgwAccountType=s))(mail=*)) (|(cn=*$search_for*)(mail=*$search_for*)) (!(phpgwaccountvisible=-1)) )";
 				if($extendedinfo)
 				$justthese = array("cn", "mail", "telephoneNumber", "mobile", "phpgwAccountVisible", "uid", "employeeNumber", "ou");
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/common_functions.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/common_functions.js	(revision 4661)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/common_functions.js	(revision 4778)
@@ -653,15 +653,17 @@
 }
 
-function editrss(){
-	connector.loadScript("news_edit");
-	if (typeof(news_edit) == 'undefined')
-	{
-		setTimeout('editrss()',500);
-		return false;
-	}
-	news_edit.makeWindow();
-}
-
-
+function editrss()
+{
+
+    connector.loadScript("news_edit");
+
+    if (typeof(news_edit) == 'undefined')
+    {
+            setTimeout('editrss()',500);
+            return false;
+    }
+    news_edit.makeWindow();
+        
+}
 
 
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js	(revision 3178)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/news_edit.js	(revision 4778)
@@ -1,241 +1,260 @@
-function loadXMLDoc(fname)
-{
-	var xmlDoc;
-	// code for IE
-	if (window.ActiveXObject)
-	{
-		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
-	}
-	// code for Mozilla, Firefox, Opera, etc.
-	else if (document.implementation 
-			&& document.implementation.createDocument)
-	{
-		xmlDoc=document.implementation.createDocument("","",null);
-	}
-	else
-	{
-		alert('Your browser cannot handle this script');
-	}
-	xmlDoc.async=false;
-	xmlDoc.load(fname);
-	return(xmlDoc);
-}
-
 
 function cnews_edit()
 {
-	this.arrayWin = new Array();
-	this.rssXml;
+    this.arrayWin = new Array();
+    this.rssXml;
+    this.xtools	= new xtools('/expressoMail1_2/');
 }
 
 cnews_edit.prototype.read_rss = function(val)
 {
-	Element("border_id_0").innerHTML = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[<span id="new_m">&nbsp;</span> / <span id="tot_m"></span>]</font>';
-
-	Element("tot_m").innerHTML = 0;
-	Element('content_id_0').innerHTML = '';
-	current_folder = "NEWS/"+val;
-	openTab.imapBox[0] = "NEWS/"+val;
-	this.rssXml = loadXMLDoc('controller.php?action=$this.rss.getContent&url='+escape(val));
-	var xsl = loadXMLDoc('stylesheet/news_read.xsl');
-
-	document.getElementById("content_id_0").innerHTML= '<tr class="message_header">'+
-		'<td width="1%"><input type="checkbox" id="chk_box_select_all_messages" class="checkbox"/></td>'+
-		'<td width="2%"/><td>   </td><td>   </td><td>  </td>'+
-		'<td width="16%" align="left">'+get_lang('Who')+'</td>'+
-		'<td width="50%" align="left">'+get_lang('subject')+'</td>'+
-		'<td width="17%" align="center">'+get_lang('date')+'</td>'+
-		'<td width="14%" align="center">'+get_lang('size')+'</td></tr>';
-	// code for IE
-	if (window.ActiveXObject)
-	{
-		ex=this.rssXml.transformNode(xsl);
-		document.getElementById("content_id_0").innerHTML=ex;
-	}
-	// code for Mozilla, Firefox, Opera, etc.
-	else if (document.implementation && document.implementation.createDocument)
-	{
-		xsltProcessor=new XSLTProcessor();
-		xsltProcessor.importStylesheet(xsl);
-		resultDocument = xsltProcessor.transformToFragment(this.rssXml,document);
-		document.getElementById("content_id_0").appendChild(resultDocument);
-		resizeWindow();
-	}
-
-	update_menu();
-	var box = Element("tbody_box");
-        if(box.childNodes.length > 1)
-		updateBoxBgColor(box.childNodes);
-}
-
-cnews_edit.prototype.read_item = function(item_number){
-	try {
-		var description = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('description')[0].firstChild.nodeValue;
-	}catch(e){
-		return;
-	}
-	var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue;
-	var pubDate = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue;
-	var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue;
-	var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0];
-	if (currentTab.toString().indexOf('news_') != -1)
-		delete_border(currentTab);
-	var border_id = create_border(title, 'news_'+item_number);
-	if(!border_id)
-		return false;
-
-	  openTab.type[border_id] = 2;
-
-	var toolbarCode = "<div style='background-color: #FFF; font-size: larger;'>"+
-	"<table class='table_message' style='width:100%;'><tr><td>"+(owner != undefined?owner.firstChild.nodeValue:get_lang('nobody'))+", "+pubDate+"</td>"+
-	'<td width="30%" align="left">Marcar como: <span class="message_options">'+get_lang('unseen')+'</span></td>'+
-	'<td nowrap="true" width="30%" align="right"><a target="_blank" href="'+link+'" style class="message_options">'+get_lang('Complete news')+'</a>';
-	if (owner != undefined)
-		toolbarCode += '<span>&nbsp;|&nbsp;</span><span class="message_options">'+get_lang('forward')+'</span><span>&nbsp;|&nbsp;</span>'+
-				'<span class="message_options">Responder</span></td>';
-	toolbarCode += '<td nowrap="true" width="40px" align="right">'+
-	( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' :
-	'<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+
-	'<span>&nbsp;</span>'+
-	(this.rssXml.getElementsByTagName('item')[parseInt(item_number)] == undefined ? '<img style="cursor: default;" src="./templates/default/images/down.gray.button.png">' :
-	'<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+
-	"</td></tr></table><h2>"+title+"</h2><br>"+description+"</div>";
-	Element('content_id_'+border_id).innerHTML = toolbarCode;
-	resizeWindow();
-}
-
+    Element("border_id_0").innerHTML    = get_lang('News')+'&nbsp;&nbsp;<font face="Verdana" size="1" color="#505050">[ <span id="tot_m"></span> ]</font>';
+    
+    current_folder = "NEWS/"+val;
+    openTab.imapBox[0] = "NEWS/"+val;
+    
+    this.rssXml = this.xtools.load('controller.php?action=$this.rss.getContent&url='+escape(val));
+
+    var langs = 
+    {
+        'lang_who'      : get_lang('Who'),
+        'lang_subject'  : get_lang('subject'),
+        'lang_date'     : get_lang('date'),
+        'lang_size'     : get_lang('size')
+    };
+    
+    var _div = document.getElementById("content_id_0");
+        _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_read.xsl' , langs );
+    
+    update_menu();
+    var box = Element("tbody_box");
+    
+    if(box.childNodes.length > 1)
+        updateBoxBgColor(box.childNodes);
+    
+    for( var i = 0 ; i < box.childNodes.length ; i++ )
+    {
+        if( box.childNodes[i].childNodes[2].getAttribute("convertDate") )
+        {
+            box.childNodes[i].childNodes[2].innerHTML = this.dateString(box.childNodes[i].childNodes[2].getAttribute("convertDate"));
+        }
+    }
+    
+    Element("tot_m").innerHTML = box.childNodes.length - 1 ;
+}
+
+cnews_edit.prototype.read_item = function(item_number)
+{
+    try 
+    {
+        var description = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('description')[0].firstChild.nodeValue;
+    }
+    catch(e)
+    {
+        return;
+    }
+    
+    var title = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('title')[0].firstChild.nodeValue;
+    var pubDate = this.dateString(this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('pubDate')[0].firstChild.nodeValue);
+    var link = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('link')[0].firstChild.nodeValue;
+    var owner = this.rssXml.getElementsByTagName('item')[item_number-1].getElementsByTagName('owner')[0];
+    if (currentTab.toString().indexOf('news_') != -1)
+        delete_border(currentTab);
+    var border_id = create_border(title, 'news_'+item_number);
+    if(!border_id)
+        return false;
+
+    openTab.type[border_id] = 2;
+
+    var toolbarCode = "<div style='background-color: #FFF; font-size: larger;'>"+
+                      "<table class='table_message' style='width:100%;'><tr><td>"+(owner != undefined?owner.firstChild.nodeValue:get_lang('nobody'))+", "+pubDate+"</td>"+
+                      '<td width="30%" align="left"></td>'+
+                      '<td nowrap="true" width="30%" align="right"><a target="_blank" href="'+link+'" style class="message_options">'+get_lang('Complete news')+'</a>';
+    if ( owner != undefined )
+        toolbarCode += '<span>&nbsp;|&nbsp;</span><span class="message_options">'+get_lang('forward')+'</span><span>&nbsp;|&nbsp;</span>'+
+        '<span class="message_options">Responder</span></td>';
+    toolbarCode += '<td nowrap="true" width="40px" align="right">'+
+    ( item_number == 1 ?  '<img style="cursor: default;" src="./templates/default/images/up.gray.button.png">' :
+        '<img onclick="news_edit.read_item('+(parseInt(item_number)-1)+')" style="cursor: default;" src="./templates/default/images/up.button.png">')+
+    '<span>&nbsp;</span>'+
+    (this.rssXml.getElementsByTagName('item')[parseInt(item_number)] == undefined ? '<img style="cursor: default;" src="./templates/default/images/down.gray.button.png">' :
+        '<img onclick="news_edit.read_item('+(parseInt(item_number)+1)+')" style="cursor: pointer;" src="./templates/default/images/down.button.png">')+
+    "</td></tr></table><h2>"+title+"</h2><br>"+description+"</div>";
+    Element('content_id_'+border_id).innerHTML = toolbarCode;
+    resizeWindow();
+}
+
+cnews_edit.prototype.dateString = function(StringDate)
+{
+    var _date   = new Date(StringDate);
+    
+    var _day    = ( (_date.getDate()).toString().length > 1 ) ? _date.getDate() : "0" + _date.getDate();
+    
+    var _month  = _date.getMonth() + 1;
+        _month  = ( _month.toString().length > 1 ) ? _month : "0" + _month;
+    
+    var _year   = _date.getFullYear();
+    
+    return ( _day + "/" + _month + "/" + _year );
+}
 
 cnews_edit.prototype.makeWindow = function(options)
 {
-	_this = this;
-
-	var el = document.createElement("DIV");
-	el.style.visibility = "hidden";
-	el.style.position = "absolute";
-	el.style.left = "0px";
-	el.style.top = "0px";
-	el.style.width = "0px";
-	el.style.height = "0px";
-	el.id = 'dJSWin_newswin';
-	document.body.appendChild(el);
-	el.innerHTML = "<table border=0><tbody><tr>"+
-		'<td valign="bottom"><input type="text" id="rssEnter" size="40"><input value="'+get_lang('subscribe')+
-		'" onclick="news_edit.subscribe();" type="button">'+
-		'<br>Enter de url of RSS service<br>'+
-		'</td></tr>'+
-		'<tr><td id="serv_table"></td></tr>'+
-		"</tbody></table><br>";
-
-
-	var butt = Element('dJSWin_wfolders_bok')
-		if (!butt){
-			butt = document.createElement('INPUT');
-			butt.id = 'dJSWin_wfolders_bok';
-			butt.type = 'button';
-			butt.value = get_lang('Close');
-			el.appendChild(butt);
-		}
-	butt.onclick = function ()
-	{
-		news_edit.arrayWin[el.id].close();
-	}
-
-
-		_this.showWindow(el);
-	}
-
-	cnews_edit.prototype.showWindow = function (div)
-	{
-		if(! div) {
-			alert(get_lang('This list has no participants'));
-			return;
-		}
-
-		if(! this.arrayWin[div.id])
-		{
-			div.style.height = "280px";
-			div.style.width = "340px";
-			var title = ":: "+get_lang("News edit")+" ::";
-			var wHeight = div.offsetHeight + "px";
-			var wWidth =  div.offsetWidth   + "px";
-			div.style.width = div.offsetWidth - 5;
-
-			win = new dJSWin({
-				id: 'win_'+div.id,
-				content_id: div.id,
-				width: wWidth,
-				height: wHeight,
-				title_color: '#3978d6',
-				bg_color: '#eee',
-				title: title,
-				title_text_color: 'white',
-				button_x_img: '../phpgwapi/images/winclose.gif',
-				border: true });
-			this.arrayWin[div.id] = win;
-			win.draw();
-		}
-		else {
-			win = this.arrayWin[div.id];
-		}
-		win.open();
-		var handlerChannel = function(data){
-			document.getElementById("serv_table").innerHTML = '';
-			for(i=0; i < data.length; i++)
-				document.getElementById("serv_table").innerHTML += "<div><span>"+data[i].name+
-				"</span><span></span><img onclick='news_edit.unsubscribe(\""+data[i].rss_url+"\",this)' src='../phpgwapi/templates/default/images/foldertree_trash.png'/></div>";
-		}
-		cExecute('$this.rss.getChannels',handlerChannel);
-	}
-	cnews_edit.prototype.unsubscribe = function(url,el){
-		var rem_handler = function (data){
-			if (data != "Success")
-				if (data == "Error")
-					alert(get_lang("Database Error"));
-				else
-					alert(get_lang("Invalid entry"));
-			else
-			{
-				var pnode = el.parentNode;
-				pnode.parentNode.removeChild(pnode);
-			}
-		};
-
-		cExecute('$this.rss.removeChannel&url='+escape(url),rem_handler);
-	}
-	cnews_edit.prototype.subscribe = function(){
-		var val = Element('rssEnter').value;
-		var rssXml = loadXMLDoc('controller.php?action=$this.rss.getContent&url='+escape(val));
-		var xsl = loadXMLDoc('stylesheet/news_add.xsl');
-		newTableEl = document.getElementById("serv_table");
-		// code for IE
-		if (window.ActiveXObject)
-		{
-			ex=rssXml.transformNode(xsl);
-			newTableEl.innerHTML='<div id="'+escape(val)+'">'+ex+'</div>';
-		}
-		// code for Mozilla, Firefox, Opera, etc.
-		else if (document.implementation && document.implementation.createDocument)
-		{
-			xsltProcessor=new XSLTProcessor();
-				xsltProcessor.importStylesheet(xsl);
-			resultDocument = xsltProcessor.transformToFragment(rssXml,document);
-			var ndiv = document.createElement('DIV');
-			ndiv.id = escape(val);
-			ndiv.appendChild(resultDocument);
-			newTableEl.appendChild(ndiv);
-		}
-		var add_handler = function (data){
-			if (data != "Success")
-				if (data == "Error")
-					alert(get_lang("Database Error"));
-				else
-					alert(get_lang("Invalid entry"));
-		};
-		if(!ndiv)
-			var ndiv = document.getElementById(escape(val));
-		var name = ndiv.childNodes[1].innerHTML;
-		cExecute('$this.rss.addChannel&url='+escape(val)+'&name='+name,add_handler);
-
-	};
+    _this = this;
+
+    var params = 
+    {
+        'lang_label1'       :   get_lang('Enter the URL of RSS service'),
+        'lang_label2'       :   get_lang('List of registered RSS'),
+        'lang_subscribe'    :   get_lang('Subscribe') 
+    };
+
+    var el = document.createElement("DIV");
+        el.style.visibility = "hidden";
+        el.style.position = "absolute";
+        el.style.left = "0px";
+        el.style.top = "0px";
+        el.style.width = "0px";
+        el.style.height = "0px";
+        el.id = 'dJSWin_newswin';
+        el.innerHTML = this.xtools.parse( this.xtools.xml('make_window'), 'stylesheet/makeWindow.xsl', params );
+
+    document.body.appendChild(el);
+    
+    var butt = Element('dJSWin_wfolders_bok');
+    
+    if ( !butt )
+    {
+        butt = document.createElement('INPUT');
+        butt.style.margin = "3px";
+        butt.id = 'dJSWin_wfolders_bok';
+        butt.type = 'button';
+        butt.value = get_lang('Close');
+        el.appendChild(butt);
+    }
+    
+    butt.onclick = function ()
+    {
+        news_edit.arrayWin[el.id].close();
+    }
+
+    _this.showWindow(el);
+}
+
+cnews_edit.prototype.showWindow = function (div)
+{
+    if(! this.arrayWin[div.id])
+    {
+        div.style.height = "280px";
+        div.style.width = "340px";
+        var title = "<label style='margin-left:5px;'>:: "+get_lang("News edit")+" ::</label> ";
+        var wHeight = div.offsetHeight + "px";
+        var wWidth =  div.offsetWidth   + "px";
+        div.style.width = div.offsetWidth - 5;
+
+        win = new dJSWin({
+            id: 'win_'+div.id,
+            content_id: div.id,
+            width: wWidth,
+            height: wHeight,
+            title_color: '#3978d6',
+            bg_color: '#eee',
+            title: title,
+            title_text_color: 'white',
+            button_x_img: '../phpgwapi/images/winclose.gif',
+            border: true
+        });
+        this.arrayWin[div.id] = win;
+        win.draw();
+    }
+    else
+    {
+        win = this.arrayWin[div.id];
+    }
+    
+    win.open();
+    
+    var handlerChannel = function( data )
+    {
+        var _listRss =  document.getElementById("listRSS");
+        
+        if( data != null )
+        {
+            for( var i = 0 ; i < data.length; i++)
+            {    
+                _listRss.innerHTML += "<div>" +
+                                        "<img onclick='news_edit.unsubscribe(\""+data[i].rss_url+"\",this);' style='width:16px; height:16px; cursor: pointer;' src='../phpgwapi/templates/default/images/foldertree_trash.png' />" +
+                                        "<label style='margin-right: 2px'>"+data[i].name+"</label>" +                
+                                       "</div>";
+            }
+        }
+    }
+    
+    cExecute('$this.rss.getChannels',handlerChannel);
+}
+cnews_edit.prototype.unsubscribe = function(url,el)
+{
+    var rem_handler = function (data)
+    {
+        if ( data != "Success" )
+        {    
+            if (data == "Error")
+                alert(get_lang("Database Error"));
+            else
+                alert(get_lang("Invalid entry"));
+        }
+        else
+        {
+           el.parentNode.parentNode.removeChild( el.parentNode );
+        }
+    };
+
+    cExecute('$this.rss.removeChannel&url='+escape(url),rem_handler);
+}
+cnews_edit.prototype.subscribe = function()
+{
+    var newTableEl  = document.getElementById("listRSS");
+    var val         = trim( Element('rssEnter').value );
+    
+    if( val != "" )
+    {
+        this.rssXml = this.xtools.load('controller.php?action=$this.rss.getContent&url='+escape(val));
+
+        var params =
+        {
+            'linkURL' : val
+        };
+
+        var _div = document.createElement("div");
+            _div.innerHTML = this.xtools.parse( this.rssXml, 'stylesheet/news_add.xsl', params );
+
+        var add_handler = function (data)
+        {
+            if ( data != "Success" )
+            {
+                if ( data == "Error" )
+                    alert( get_lang("Database Error") );
+                else
+                    alert( get_lang("Invalid entry") );
+            }
+            else
+            {
+                newTableEl.appendChild(_div);
+            }
+        };
+
+        try
+        {
+            if( _div.childNodes[2].getAttribute("titleRss") )
+            {    
+                var name = _div.childNodes[2].getAttribute("titleRss");
+
+                cExecute('$this.rss.addChannel&url='+escape(val)+'&name='+name,add_handler);
+            }
+        }
+        catch(e){ }
+    }
+
+};
 
 /* Build the Object */
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js	(revision 4716)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/draw_api.js	(revision 4778)
@@ -168,40 +168,43 @@
 			tree_folders = new dFTree({name: 'tree_folders'});
 
-			var n_root = new dNode({id:'root', caption: get_lang("My Folders")});
-			tree_folders.add(n_root,'anything'); //Places the root; second argument can be anything.
-
-			var unseen_in_mailbox = 0;
-			var unseen_in_shared_folders = 0;
-			for (var i=0; i<folders.length; i++){
-				if (folders[i].folder_unseen > 0)
-				{
-					unseen_in_mailbox = parseInt( unseen_in_mailbox + folders[ i ].folder_unseen );
-					if ( folders[i].folder_id.indexOf( 'INBOX' ) !== 0 )
-						unseen_in_shared_folders = parseInt( unseen_in_shared_folders + folders[ i ].folder_unseen );
-
-					var nn = new dNode({id:folders[i].folder_id, caption:lang_folder(folders[i].folder_name) + '<font style=color:red>&nbsp(</font><span id="dftree_'+folders[i].folder_id+'_unseen" style=color:red>'+folders[i].folder_unseen+'</span><font style=color:red>)</font>', onClick:"change_folder('"+folders[i].folder_id+"','"+folders[i].folder_name+"')", plusSign:folders[i].folder_hasChildren});
-
-					if( folders[i].folder_name.toLowerCase() == 'inbox' )
-						Element('new_m').innerHTML = '<font style="color:red">' + folders[i].folder_unseen + '</font>';
-				}
-				else
-					var nn = new dNode({id:folders[i].folder_id, caption:lang_folder(folders[i].folder_name), onClick:"change_folder('"+folders[i].folder_id+"','"+folders[i].folder_name+"')", plusSign:folders[i].folder_hasChildren});
-
-				if (folders[i].folder_parent == '')
-					folders[i].folder_parent = 'root';
-				else if (folders[i].folder_parent == 'user'){
-
-					if (!tree_folders.getNodeById('user')){
-												tmpFolderId = folders[i].folder_id.split(cyrus_delimiter).pop();
-												if (tmpFolderId != folders[i].folder_name)
-												{
-													translatedFolders.add(tmpFolderId, folders[i].folder_name);
-												}
-						var n_root_shared_folders = new dNode({id:'user', caption:get_lang("Shared folders"), plusSign:true});
-						tree_folders.add(n_root_shared_folders,'root');
-					}
-				}
-				tree_folders.add(nn,folders[i].folder_parent);
-			}
+                    var n_root = new dNode({id:'root', caption: get_lang("My Folders")});
+                    tree_folders.add(n_root,'anything'); //Places the root; second argument can be anything.
+
+                    var unseen_in_mailbox = 0;
+                    var unseen_in_shared_folders = 0;
+                    for (var i=0; i<folders.length; i++)
+                    {
+                        if (folders[i].folder_unseen > 0)
+                        {
+                                unseen_in_mailbox = parseInt( unseen_in_mailbox + folders[ i ].folder_unseen );
+                                if ( folders[i].folder_id.indexOf( 'INBOX' ) !== 0 )
+                                        unseen_in_shared_folders = parseInt( unseen_in_shared_folders + folders[ i ].folder_unseen );
+
+                                var nn = new dNode({id:folders[i].folder_id, caption:lang_folder(folders[i].folder_name) + '<font style=color:red>&nbsp(</font><span id="dftree_'+folders[i].folder_id+'_unseen" style=color:red>'+folders[i].folder_unseen+'</span><font style=color:red>)</font>', onClick:"change_folder('"+folders[i].folder_id+"','"+folders[i].folder_name+"')", plusSign:folders[i].folder_hasChildren});
+
+                                if( folders[i].folder_name.toLowerCase() == 'inbox' )
+                                        Element('new_m').innerHTML = '<font style="color:red">' + folders[i].folder_unseen + '</font>';
+                        }
+                        else
+                            var nn = new dNode({id:folders[i].folder_id, caption:lang_folder(folders[i].folder_name), onClick:"change_folder('"+folders[i].folder_id+"','"+folders[i].folder_name+"')", plusSign:folders[i].folder_hasChildren});
+
+                        if (folders[i].folder_parent == '')
+                                folders[i].folder_parent = 'root';
+                        else if (folders[i].folder_parent == 'user')
+                        {
+
+                            if (!tree_folders.getNodeById('user'))
+                            {
+                                tmpFolderId = folders[i].folder_id.split(cyrus_delimiter).pop();
+                                if (tmpFolderId != folders[i].folder_name)
+                                {
+                                        translatedFolders.add(tmpFolderId, folders[i].folder_name);
+                                }
+                                var n_root_shared_folders = new dNode({id:'user', caption:get_lang("Shared folders"), plusSign:true});
+                                tree_folders.add(n_root_shared_folders,'root');
+                            }
+                        }
+                        tree_folders.add(nn,folders[i].folder_parent);
+                    }
 		}
                 //MAILARCHIVER
@@ -230,33 +233,50 @@
                 }                
 
-
-
-		var handlerChannel = function(data){
-			if (data == null || typeof(data) == 'string')
-				return;
-			/*
-			*  RSS NEWS
-			*/
-			var root_rss = new dNode({
-				id: "news_root",
-				caption: get_lang('News')
-			});
-			tree_folders.add(root_rss, "root");
-			for(i=0; i < data.length; i++)
-			{
-				var nodeNews = new dNode({
-					id: "NEWS/"+data[i].name,
-					caption: data[i].name,
-					onClick: "open_rss('"+data[i].rss_url+"')",
-					plusSign: 0
-				});
-				tree_folders.add(nodeNews,"news_root");
-			}
-			var noden=document.getElementById('lnews_roottree_folders');
-			noden.style.backgroundImage="url(templates/"+template+"/images/menu/rss.png)";
-		}
-//		cExecute('$this.rss.getChannels',handlerChannel);
-
-             
+                var handlerChannel = function(data)
+                {
+
+                	if ( data == null || typeof(data) == 'string')
+                    {    
+                		return false;
+                    }
+
+                    var nodeParent  = document.getElementById('content_folders');
+                    var treeRss     = new dFTree({name: 'treeRss'});
+                    var root_rss    = new dNode({id:'news_root', caption: get_lang("News")});
+                    
+                    treeRss.add(root_rss,'anything');
+
+                    for( i=0; i < data.length; i++ )
+                    {
+                        var nodeNews = new dNode(
+                        {
+                            id: "NEWS/"+data[i].name,
+                            caption: data[i].name,
+                            onClick: "open_rss('"+data[i].rss_url+"')",
+                            plusSign: 0
+                        });
+                        treeRss.add(nodeNews,"news_root");
+                    }
+                    
+                    treeRss.draw( nodeParent );
+                    
+                    with ( document.getElementById('lnews_roottreeRss') )
+                    {
+                        style.backgroundImage   = "url(templates/"+template+"/images/menu/rss.png)";
+                        style.marginLeft        = "2px";
+                    }
+
+                    if( nodeParent.firstChild.id != ("dftree_" + treeRss.name ) )
+                    {
+                        var _folder     = Element(nodeParent.firstChild.id);
+                        var _rssNews    = Element("dftree_" + treeRss.name );
+                        
+                        nodeParent.insertBefore( _rssNews, _folder );
+                    }
+                    
+		}
+                
+       if( eval(enabledReadRSS ) == true ) 
+    	   cExecute('$this.rss.getChannels',handlerChannel);
 
 		tree_folders.draw(Element('content_folders'));
@@ -1087,5 +1107,5 @@
 				var spanSender = document.createElement("SPAN");
 				spanSender.onmouseover = function (event) {this.style.textDecoration = "underline";try {InfoContact.begin(this,headers_msgs.from.email)} catch(e){};};
-				spanSender.onmouseout = function (){ try {this.style.textDecoration = "none"; clearTimeout(InfoContact.timeout);} catch(e){}};
+				spanSender.onmouseout = function (){try {this.style.textDecoration = "none";clearTimeout(InfoContact.timeout);} catch(e){}};
 				spanSender.innerHTML =  headers_msgs.from.name != null ? headers_msgs.from.name : headers_msgs.from.email;
 				if (spanSender.innerHTML.indexOf(" ") == '-1' && spanSender.innerHTML.length > 25){
@@ -1422,6 +1442,6 @@
 	var option_hide_more = document.createElement("SPAN");
 	option_hide_more.className = 'message_options';
-        option_hide_more.onmouseover=function () { this.className='message_options_active'; };
-        option_hide_more.onmouseout=function () { this.className='message_options' };
+        option_hide_more.onmouseover=function () {this.className='message_options_active';};
+        option_hide_more.onmouseout=function () {this.className='message_options'};
 	options.align = 'right';
 	option_hide_more.value = 'more_options';
@@ -1446,10 +1466,10 @@
 	var option_mark_as_unseen = document.createElement("SPAN");
 	option_mark_as_unseen.className = "message_options";
-	option_mark_as_unseen.onclick = function () { changeLinkState(this,'seen');
+	option_mark_as_unseen.onclick = function () {changeLinkState(this,'seen');
 		proxy_mensagens.proxy_set_message_flag(folder_id,'unseen');
 		write_msg(get_lang('Message marked as ')+get_lang("Unseen"));
 	};
-	option_mark_as_unseen.onmouseover=function () { this.className='message_options_active'; };
-	option_mark_as_unseen.onmouseout=function () { this.className='message_options' };
+	option_mark_as_unseen.onmouseover=function () {this.className='message_options_active';};
+	option_mark_as_unseen.onmouseout=function () {this.className='message_options'};
 	option_mark_as_unseen.innerHTML = get_lang("Unseen");
 
@@ -1457,6 +1477,6 @@
 	option_mark_important.className = 'message_options';
 	option_mark_important.style.paddingLeft = "10px";
-	option_mark_important.onmouseover=function () { this.className='message_options_active'; };
-	option_mark_important.onmouseout=function () { this.className='message_options' };
+	option_mark_important.onmouseover=function () {this.className='message_options_active';};
+	option_mark_important.onmouseout=function () {this.className='message_options'};
 
 	if (info_msg.Flagged == "F"){
@@ -1474,5 +1494,5 @@
 	}
 	else{
-		option_mark_important.onclick = function() { changeLinkState(this,'normal');
+		option_mark_important.onclick = function() {changeLinkState(this,'normal');
 			proxy_mensagens.proxy_set_message_flag(folder_id,'flagged');
 			write_msg(get_lang('Message marked as ')+get_lang("Important"));
@@ -1497,6 +1517,6 @@
 	option_forward.className = 'message_options';
 	option_forward.onclick = function(){new_message('forward', ID);};
-	option_forward.onmouseover=function () { this.className='message_options_active'; };
-        option_forward.onmouseout=function () { this.className='message_options' };
+	option_forward.onmouseover=function () {this.className='message_options_active';};
+        option_forward.onmouseout=function () {this.className='message_options'};
 	option_forward.innerHTML = get_lang('Forward');
 	options.appendChild(space1);
@@ -1507,6 +1527,6 @@
 	option_reply.onclick = function(){new_message('reply_with_history', ID);};
 	option_reply.innerHTML = get_lang('Reply');
-	option_reply.onmouseover=function () { this.className='message_options_active'; };
-	option_reply.onmouseout=function () { this.className='message_options' };
+	option_reply.onmouseover=function () {this.className='message_options_active';};
+	option_reply.onmouseout=function () {this.className='message_options'};
 
 	options.appendChild(space2);
@@ -2218,5 +2238,5 @@
 		case 'important':
 			{
-				el.onclick = function(){changeLinkState(el,'normal');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'flagged'); write_msg(get_lang('Message marked as ')+get_lang("Important"))}
+				el.onclick = function(){changeLinkState(el,'normal');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'flagged');write_msg(get_lang('Message marked as ')+get_lang("Important"))}
 				break;
 			}
@@ -2236,5 +2256,5 @@
 		case 'unseen':
 			{
-				el.onclick = function(){  changeLinkState(el,'seen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'unseen');write_msg(get_lang('Message marked as ')+get_lang("unseen"))}
+				el.onclick = function(){changeLinkState(el,'seen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'unseen');write_msg(get_lang('Message marked as ')+get_lang("unseen"))}
 				break;
 
@@ -2242,5 +2262,5 @@
 		case 'seen':
 			{
-				el.onclick = function(){  changeLinkState(el,'unseen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'seen');write_msg(get_lang('Message marked as ')+get_lang("seen"))}
+				el.onclick = function(){changeLinkState(el,'unseen');proxy_mensagens.proxy_set_message_flag(currentTab.substr(0,currentTab.indexOf("_r")),'seen');write_msg(get_lang('Message marked as ')+get_lang("seen"))}
 				break;
 
@@ -2372,5 +2392,5 @@
         input_replyto.style.width = "100%";
 	input_replyto.setAttribute("wrap","soft");
-        input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus', this.id);};
+        input_replyto.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);};
 	input_replyto.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
 
@@ -2455,5 +2475,5 @@
 	input_to.style.width = "100%";
 	input_to.setAttribute("wrap","soft");
-	input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus', this.id);};
+	input_to.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus', this.id);};
 	input_to.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
 	if (!is_ie)
@@ -2551,5 +2571,5 @@
 	input_cc.setAttribute("tabIndex","1");
 	input_cc.style.width = "100%";
-	input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus',this.id);};
+	input_cc.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);};
 	input_cc.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
 	if (!is_ie)
@@ -2633,5 +2653,5 @@
 	input_cco.setAttribute("tabIndex","1");
 	input_cco.style.width = "100%";
-	input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer)); search_contacts('onfocus',this.id);};
+	input_cco.onfocus = function(){clearTimeout(parseInt(setTimeOutLayer));search_contacts('onfocus',this.id);};
 	input_cco.onblur = function(){setTimeOutLayer=setTimeout('search_contacts("lostfocus","'+this.id+'")',100);};
 
@@ -2709,5 +2729,5 @@
 	a_cc_link.setAttribute("href","javascript:void(0)");
 	a_cc_link.setAttribute("tabIndex","-1");
-	a_cc_link.onclick = function () {this.style.display='none';document.getElementById('tr_cc_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cc.focus(); return false;}
+	a_cc_link.onclick = function () {this.style.display='none';document.getElementById('tr_cc_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cc.focus();return false;}
 	td2_link.appendChild(a_cc_link);
 	var space = document.createElement("span");
@@ -2720,5 +2740,5 @@
 	a_cco_link.setAttribute("href","javascript:void(0)");
 	a_cco_link.setAttribute("tabIndex","-1");
-	a_cco_link.onclick = function () {this.style.display='none';document.getElementById('tr_cco_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cco.focus(); return false;}
+	a_cco_link.onclick = function () {this.style.display='none';document.getElementById('tr_cco_'+ID).style.display='';document.getElementById('space_link_'+ID).style.display='none';input_cco.focus();return false;}
 	td2_link.appendChild(a_cco_link);
 	var space = document.createElement("span");
@@ -2731,5 +2751,5 @@
 	a_replyto_link.setAttribute("href","javascript:void(0)");
 	a_replyto_link.setAttribute("tabIndex","-1");
-	a_replyto_link.onclick = function () {this.style.display='none';document.getElementById('tr_replyto_'+ID).style.display='';document.getElementById('space_link_2_'+ID).style.display='none';input_replyto.focus(); return false;}
+	a_replyto_link.onclick = function () {this.style.display='none';document.getElementById('tr_replyto_'+ID).style.display='';document.getElementById('space_link_2_'+ID).style.display='none';input_replyto.focus();return false;}
 	td2_link.appendChild(a_replyto_link);
 	tr_link.appendChild(td1_link);
@@ -2892,5 +2912,5 @@
 	var add_files = document.createElement("A");
 	add_files.setAttribute("href", "javascript:void(0)");
-	add_files.onclick = function () { addFile(ID); return false;};
+	add_files.onclick = function () {addFile(ID);return false;};
 	add_files.innerHTML =  get_lang("Attachments: add+");
 	add_files.setAttribute("tabIndex","-1");
Index: sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js
===================================================================
--- sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js	(revision 4663)
+++ sandbox/expressoMail1_2/MailArchiver/2.2/expressoMail1_2/js/doiMenuData.js	(revision 4778)
@@ -8,13 +8,29 @@
 	var _option1 = preferences.hide_folders == "1" ? false : true;
 								
-	if (!expresso_offline) {
-		var itens = new Array("preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
-				"search_emails(\"\")|" + get_lang("Search") + "|search.png",
-				"filterbox()|" + get_lang("Edit filters") + "|filters.png",
-				"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
-				"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
-//				"editrss()|" + get_lang("Edit my news") + "|rss.png",
-				"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
-		if(window.google && google.gears && preferences.use_local_messages==1) {
+	if (!expresso_offline)
+	{
+		if( eval(enabledReadRSS ) == true ) 
+		{
+			var itens = new Array(	"preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
+									"search_emails(\"\")|" + get_lang("Search") + "|search.png",
+									"filterbox()|" + get_lang("Edit filters") + "|filters.png",
+									"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
+									"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
+									"editrss()|" + get_lang("Edit my news") + "|rss.png",
+									"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
+		}
+		else
+		{
+			var itens = new Array(	"preferences_mail()|" + get_lang("Preferences") + "|preferences.png",
+					"search_emails(\"\")|" + get_lang("Search") + "|search.png",
+					"filterbox()|" + get_lang("Edit filters") + "|filters.png",
+					"folderbox()|" + get_lang("Edit folders") + "|editfolders.png",
+					"sharebox()|" + get_lang("Share mailbox") + "|usersfolders.png",
+					"empty_trash_imap()|" + get_lang("Empty trash") + "|trash.png");
+			
+		}
+		
+		if(window.google && google.gears && preferences.use_local_messages==1)
+		{
 			if(expresso_local_messages.is_offline_installed()) {
 				itens.push("force_check_queue()|" + get_lang("Send from queue") + "|queue.jpg");
