Index: branches/2.2/expressoMail1_2/stylesheet/news_add.xsl
===================================================================
--- branches/2.2/expressoMail1_2/stylesheet/news_add.xsl	(revision 3178)
+++ branches/2.2/expressoMail1_2/stylesheet/news_add.xsl	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/stylesheet/makeWindow.xsl
===================================================================
--- branches/2.2/expressoMail1_2/stylesheet/makeWindow.xsl	(revision 4684)
+++ branches/2.2/expressoMail1_2/stylesheet/makeWindow.xsl	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/stylesheet/news_read.xsl
===================================================================
--- branches/2.2/expressoMail1_2/stylesheet/news_read.xsl	(revision 3178)
+++ branches/2.2/expressoMail1_2/stylesheet/news_read.xsl	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/index.php
===================================================================
--- branches/2.2/expressoMail1_2/index.php	(revision 4615)
+++ branches/2.2/expressoMail1_2/index.php	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/templates/default/config.tpl
===================================================================
--- branches/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4616)
+++ branches/2.2/expressoMail1_2/templates/default/config.tpl	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang
===================================================================
--- branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 4610)
+++ branches/2.2/expressoMail1_2/setup/phpgw_pt-br.lang	(revision 4684)
@@ -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!
@@ -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: branches/2.2/expressoMail1_2/js/common_functions.js
===================================================================
--- branches/2.2/expressoMail1_2/js/common_functions.js	(revision 4610)
+++ branches/2.2/expressoMail1_2/js/common_functions.js	(revision 4684)
@@ -644,15 +644,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: branches/2.2/expressoMail1_2/js/news_edit.js
===================================================================
--- branches/2.2/expressoMail1_2/js/news_edit.js	(revision 3178)
+++ branches/2.2/expressoMail1_2/js/news_edit.js	(revision 4684)
@@ -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: branches/2.2/expressoMail1_2/js/draw_api.js
===================================================================
--- branches/2.2/expressoMail1_2/js/draw_api.js	(revision 4607)
+++ branches/2.2/expressoMail1_2/js/draw_api.js	(revision 4684)
@@ -114,73 +114,95 @@
 	}
 	else{
-		if (!expresso_offline) {
-			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 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);
-
+		if (!expresso_offline)
+                {
+                    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 handlerChannel = function(data)
+                {
+
+                    if (data == null || typeof(data) == 'string')
+                    {    
+                            return;
+                    }
+
+                    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);
 
 		/**
@@ -1042,5 +1064,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){
@@ -1377,6 +1399,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';
@@ -1401,10 +1423,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");
 
@@ -1412,6 +1434,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"){
@@ -1429,5 +1451,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"));
@@ -1452,6 +1474,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);
@@ -1462,6 +1484,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);
@@ -2154,5 +2176,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;
 			}
@@ -2172,5 +2194,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;
 
@@ -2178,5 +2200,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;
 
@@ -2308,5 +2330,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);};
 
@@ -2391,5 +2413,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)
@@ -2487,5 +2509,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)
@@ -2569,5 +2591,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);};
 
@@ -2645,5 +2667,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");
@@ -2656,5 +2678,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");
@@ -2667,5 +2689,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);
@@ -2828,5 +2850,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: branches/2.2/expressoMail1_2/js/doiMenuData.js
===================================================================
--- branches/2.2/expressoMail1_2/js/doiMenuData.js	(revision 3388)
+++ branches/2.2/expressoMail1_2/js/doiMenuData.js	(revision 4684)
@@ -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(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(preferences.use_local_messages==1)
+		{
 			if(expresso_local_messages.is_offline_installed()) {
 				itens.push("force_check_queue()|" + get_lang("Send from queue") + "|queue.jpg");
