Index: sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Attachments.php
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Attachments.php	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Attachments.php	(revision 7210)
@@ -0,0 +1,87 @@
+<?php
+/**
+*
+* Copyright (C) 2012 ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+*
+* This program is free software; you can redistribute it and/or modify it under
+* the terms of the GNU Affero General Public License version 3 as published by
+* the Free Software Foundation with the addition of the following permission
+* added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
+* WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE
+* WARRANTY OF NON INFRINGEMENT  OF THIRD PARTY RIGHTS.
+*
+* This program is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+* FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+* details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program; if not, see www.gnu.org/licenses or write to
+* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301 USA.
+*
+* This code is based on the OpenXchange Connector and on the Prognus pSync
+* Connector both developed by the community and licensed under the GPL
+* version 2 or above as published by the Free Software Foundation.
+*
+* You can contact Prognus Software Livre headquarters at Av. Tancredo Neves,
+* 6731, PTI, EdifÃ­cio do Saber, 3Âº floor, room 306, Foz do IguaÃ§u - PR - Brasil
+* or at e-mail address prognus@prognus.com.br.
+*
+*
+* @package    Prototype (Mail)
+* @license    http://www.gnu.org/copyleft/gpl.html GPL
+* @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+* @version    2.4
+* @sponsor    Caixa EconÃŽmica Federal
+* @since      Arquivo disponibilizado na versÃ£o 2.4
+*/
+
+/**
+*
+* @package    Prototype (Mail)
+* @license    http://www.gnu.org/copyleft/gpl.html GPL
+* @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+* @sponsor    Caixa EconÃŽmica Federal
+* @version    2.4
+* @since      Classe disponibilizada na versÃ£o 2.4
+*/
+
+use prototype\api\Config as Config;
+
+class Attachments {	
+	
+	public function encodeCreateAttachment( &$uri , &$params , &$criteria , $original ){            
+            if(!isset($params['source'])) return false;
+			
+
+            if(isset($_FILES[$params['source']]))
+                $params =  $_FILES[$params['source']];
+				
+				if($params['error'] !== 0){
+					switch ($params['error']){
+						case 1:
+							throw  new Exception('Tamanho de arquivo nao permitido!!! (php.ini)'); 
+						case 2:
+							throw  new Exception('Tamanho de arquivo nao permitido!!!'); 
+						case 3:
+							throw  new Exception('Ocorreu um erro durante o upload'); 
+						case 4:
+							throw  new Exception('Nao e um arquivo valido'); 
+					}
+				}
+				
+                $params['owner'] = Config::me('uidNumber'); 
+
+                $params['disposition'] = $original['properties']['disposition'];
+                $params['dtstamp'] = time();
+	}
+        
+        public function securityOwner(  &$uri , &$params , &$criteria , $original )
+        {
+            $criteria['filter'] = isset( $criteria['filter'] ) ? array('AND', $criteria['filter'] , array('=' , 'owner', Config::me('uidNumber')) ) :  array('=' , 'owner', Config::me('uidNumber'));   
+        }
+
+}
+
+?>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Helpers.php
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Helpers.php	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/Helpers.php	(revision 7210)
@@ -0,0 +1,401 @@
+<?php
+include_once ROOTPATH."/../expressoMail1_2/inc/class.imap_functions.inc.php";
+
+use prototype\api\Config as Config;
+
+class Helpers {    
+
+/**
+ * LABEL
+ */ 
+	//labeled:after.find
+	public function deepnessLabeleds( &$uri , &$result , &$criteria , $original ){                
+
+		if(isset($original['criteria']['deepness']))
+		{
+			foreach ($result as $i => $v)
+			{
+				if(isset($v['labelId']))
+				{
+					$labels = Controller::find( array( 'concept' => 'label' ) , false, array( 'filter' => array('=', 'id'  ,  $v['labelId']) ));     
+					$result[$i]['label'] = $labels[0];
+				}              
+
+			}
+		}
+
+		return $result;
+	}
+	
+	/**
+	 * MÃ©todo a ser chamado na exclusÃ£o de um label, procedendo com a
+	 * desvinculaÃ§Ã£o deste label com todas as mensagens a que estava vinculado
+	 */
+	//label:before.delete
+	public function clearAllLabeledsOfLabel( &$uri , &$result , &$criteria , $original ){
+		
+		$labeleds = Controller::find( array( 'concept' => 'labeled' ) , false, array( 'filter' => array('=', 'labelId'  ,  $uri['id']) ));
+		if (empty($labeleds))
+			return;
+		
+		$labeledsIds = array();
+		foreach ($labeleds as $e) {
+				$labeledsIds[] = $e['id'];
+		}
+		Controller::delete( array( 'concept' => 'labeled', 'service' => 'Imap' ), false, array( 'filter' => array( 'IN', 'id', $labeledsIds )) );
+
+		//return $result;
+	}
+	/**
+	 * MÃ©todo a ser chamado ao listar os labeleds, uma vez que as funÃ§Ãµes de IMAP do PHP nÃ£o sÃ£o capazes de 
+	 * obter a lista de todos os labels e nem sÃ£o capazes de obter os labels de uma dada mensagem
+	 */
+	//labeled:before.find
+	public function makeLabelListFilter( &$uri , &$result , &$criteria , $original ){
+
+		if (!isset($criteria['filter']) || !self::in_arrayr('labelId', $criteria['filter'])) {
+			$labels = Controller::find( array( 'concept' => 'label' ) );
+
+			$list = array();
+			if(is_array($labels))
+			foreach ($labels as $label)
+				$list[] = $label['id'];
+				
+			$filter = array( 'IN' , 'labelId' , $list );
+			
+			if (isset($criteria['filter']) && $criteria['filter']!=NULL && count($criteria['filter']) != 0)
+				$criteria['filter'] = array( 'AND', $criteria['filter'], $filter );
+			else
+				$criteria['filter'] =  $filter;
+		}
+	}
+	
+	public static function in_arrayr($needle, $haystack) {
+		//if(!is_array($haystack)) return false;
+		
+		foreach ($haystack as $v) {
+				if ($needle == $v) return true;
+				elseif (is_array($v)) return self::in_arrayr($needle, $v);
+		}
+		return false;
+	} 
+	
+/**
+ * FOLLOWUPFLAG
+ */ 
+	//followupflagged:after.find
+	public function deepnessFollowupflaggeds( &$uri , &$result , &$criteria , $original ){                
+
+		if(isset($original['criteria']['deepness']))
+		{
+			foreach ($result as $i => $v)
+			{
+				if(isset($v['followupflagId']))
+				{
+					$followupflags = Controller::find(array('concept' => 'followupflag'), false, array('filter' => array('=', 'id', $v['followupflagId']) ));
+					
+					/**
+					 * Devido hÃ¡ inconsistencias na chamada do interceptor addDefaultElementsFilter (followupflag:before.find)
+					 * os followupflag defaults sÃ£o inseridos no retorno, por isso Ã© necessÃ¡rio procurar o objeto correto
+					 * atravÃ©s do id
+					 */
+					foreach ($followupflags as $followupflag) {
+						if ($v['followupflagId'] == $followupflag['id']) {
+							$result[$i]['followupflag'] = $followupflag;
+							break;
+						}
+					}
+				}
+				
+				if(isset($v['messageNumber']) && isset($v['folderName']))
+				{
+					$details = $original['criteria']['deepness'] == '1' ? 'headers' : 'all';
+					
+					$imapService = new imap_functions();
+					$message = $imapService->getMessages(array('messages' => array($v['folderName'] => array($v['messageNumber'])), 'details' => $details));
+					$result[$i]['message'] = $message[$v['folderName']][0];				
+				}     
+			}
+		}
+
+		return $result;
+	}	
+	
+	//followupflagged:PostgreSQL.before.create
+	public function letFollowupflaggedKeepUnique (&$uri , &$params , &$criteria , $original ){
+
+		if (isset($params['folderName']) && isset($params['messageNumber'])) {
+			$filter = array ('AND', array('=', 'folderName', $params['folderName']), array('=', 'messageNumber', $params['messageNumber']));
+
+			$imap_result = Controller::find( 
+				array('concept' => 'message'), 
+				array('messageId'), 
+				array('filter' => $filter)
+			);
+
+			if($imap_result) {
+				$params['messageId'] = $imap_result[0]['messageId'];
+			}
+		}
+
+		$filter = array('=', 'messageId', $params['messageId']);
+		Controller::delete(array('concept' => 'followupflagged', 'service' => 'PostgreSQL'), null, array('filter' => $filter));
+
+	}
+	
+	//followupflag:before.find 
+	public function addDefaultElementsFilter (&$uri , &$params , &$criteria , $original ){ 
+		//if (!self::in_arrayr('id', $criteria['filter'])) { 
+			$defaultsFilter = array( 'IN' , 'id' , array('1','2','3','4','5','6') ); 
+
+			if (isset($criteria['filter']) && $criteria['filter']!=NULL && count($criteria['filter']) != 0) 
+				$criteria['filter'] = array( 'OR', $criteria['filter'], $defaultsFilter ); 
+			else 
+				$criteria['filter'] =  $defaultsFilter; 
+		//} 
+	}
+
+	//Remove as dependencias de uma followupflag 
+	public function clearAllFlaggedOfFollowupflag( &$uri , &$params , &$criteria , $original ){
+		//remove apenas se vier o id da Followupflag
+		if(isset($uri['id'])) {
+			$result = Controller::find(array('concept' => 'followupflagged'), null , array('filter' => array('=' , 'followupflagId' , $uri['id'])));
+			foreach ($result as $flagged) {
+				Controller::delete(array('concept' => 'followupflagged', 'id' => $flagged['id']), false, false);
+			}
+
+			Controller::deleteALL(array('concept' => 'followupflagged'), null , array('filter' => array('=' , 'followupflagId' , $uri['id'])));
+		}
+	}
+
+	//followupflagged:PostgreSQL.after.delete
+	public function doImapDelete( &$uri , &$params , &$criteria , $original ) {
+
+		$imap_uri = $uri;
+		$imap_uri['service'] = 'Imap';
+		
+		$result = Controller::delete($imap_uri, $params, $criteria);
+		
+		return $result;
+
+	}
+	
+	//followupflagged:Imap.before.delete
+	public function getReferenceToImapDelete( &$uri , &$params , &$criteria , $original ) {
+
+		if (isset($uri['service']) && $uri['service'] == 'Imap' && $uri['id'] /*&& !$criteria*/) {
+			$db_uri = $uri;
+			$db_uri['service'] = 'PostgreSQL';
+			$flagged = Controller::read($db_uri, array('messageId'), false);
+			if ($flagged) {
+				if (!$criteria) 
+					$criteria = array();
+				$criteria['filter'] = array('=', 'messageId', $flagged['messageId']);
+			} else {
+				return false;
+			}
+		}
+
+	}
+		
+	//followupflagged:PostgreSQL.before.create
+	public function doImapCreate( &$uri , &$params , &$criteria , $original ) {	
+	
+		$imap_uri = $uri;
+		$imap_uri['service'] = 'Imap';
+		
+		if(empty($params['messageId'])) 
+		    throw new Exception('#FollowupflagMessageIdError');
+		else 
+		    $params = Controller::create($imap_uri, $params);
+
+		if (!$params)
+		    throw new Exception('#FollowupflagLimitError');
+	}
+	
+	//followupflagged:PostgreSQL.after.read
+	public function doImapRead( &$uri , &$result , &$criteria , $original ) {
+		/**
+		 * Se a busca for apenas no banco de dados, pula-se todas as verificaÃ§Ãµes 
+		 * deste interceptor.
+		 */
+		
+	   
+	    
+	    
+		if ($original['URI']['service'] == 'PostgreSQL') return $result;
+		
+		if ($result) {
+			$imap_uri = $uri;
+			$imap_uri['service'] = 'Imap';
+			$imap_result = Controller::find( 
+				$imap_uri, 
+				false, 
+				array('filter' => array('=', 'messageId', $result['messageId']))
+			);
+		}
+
+		/**
+		 * Faz a consistÃªncia do banco com o imap
+		 */
+		if (count($imap_result) < 1) {
+			$r = Controller::delete($uri, null, $criteria);
+			return false;
+		} else {
+			$imap_result = $imap_result[0];
+		}
+		
+		/**
+		 * Faz a consistÃªncia do banco com o imap
+		 */
+		if ($imap_result['messageId'] !== $result['messageId']) {
+			$n = $imap_result;
+			$n['followupflagId']  = 1;
+			$n['backgroundColor'] = '#FF2016';
+			$n['id'] = Controller::create(array('concept' => 'followupflagged'), $n);
+			$result = $imap_result + $n;
+		}
+		
+		$result = $result + $imap_result;
+		
+		return $result;
+	}
+	
+	
+	/**
+	 * MÃ©todo a ser chamado ao listar os sinalizadores, uma vez que as funÃ§Ãµes de IMAP do PHP nÃ£o sÃ£o capazes de 
+	 * obter a lista de todos os sinalizadores e nem sÃ£o capazes de obter os sinalizadores de uma dada mensagem
+	 */
+	//followupflagged:PostgreSQL.after.find
+	public function doImapFind( &$uri , &$result , &$criteria , $original ){
+	    
+	  	$imap_uri = $uri;
+		$imap_uri['service'] = 'Imap';
+		$imap_criteria = $original['criteria'];
+		
+		if (self::in_arrayr('alarmDeadline', $original['criteria']) || 
+			self::in_arrayr('doneDeadline', $original['criteria']) || 
+			self::in_arrayr('followupflagId', $original['criteria'])) 
+		{
+			if (empty($result)) return $result;
+			
+			$idList = array();
+			foreach($result as $r) {
+				$idList[] = $r['messageId'];
+			}
+			
+			$imap_criteria['filter'] = array('IN', 'messageId', $idList);
+		}
+		$imap_result = Controller::find($imap_uri, false, $imap_criteria);
+
+		/**
+		 * Mescla os dados vindos do PostgreSQL com os dados vindos do Imap
+		 */
+		$merge_result = array ();
+		if(is_array($imap_result))
+		foreach ($imap_result as $j => $ir) {
+		
+			foreach($result as $k => $r) {
+			
+				if ($r['messageId'] == $ir['messageId']) {
+					if (!empty($r['messageId']))
+						$merge_result[] = $r + $ir;
+					
+					unset($result[$k]);
+					unset($imap_result[$j]);
+					
+					break;
+				}
+			}
+		}
+		
+		/**
+		 * Faz a consistÃªncia do banco com o imap
+		 */
+		/*
+		if ($result) {
+			$idList = array();
+			foreach ($result as $ir) {
+				$idList[] = $ir['messageId'];
+			}
+			$filter = array('IN', 'messageId', $idList);
+			Controller::delete(array('concept' => 'followupflagged'), null , array('filter' => $filter));
+		}
+		*/
+		
+		/**
+		 * Faz a consistÃªncia do banco com o imap
+		 */
+		if ($imap_result) {
+			foreach ($imap_result as $ir ) {
+				$n = $ir;
+				$n['followupflagId']  = 1;
+				$n['backgroundColor'] = '#FF2016';
+				$n['id'] = Controller::create(array('concept' => 'followupflagged'), $n);
+				$merge_result[] = $n;
+			}
+		}
+
+		return $merge_result;
+	}
+
+	//followupflagged:PostgreSQL.before.find
+	public function reFilterFind (&$uri , &$params , &$criteria , $original ){
+		/**
+		 * Se o filtro incluir atributos da mensagem que o banco de dados nÃ£o conhece,  
+		 * deve-se obter os messageId dos itens do resultado e passÃ¡-los num novo filtro
+		 * que o banco conheÃ§a
+		 */
+		
+		$folder = isset($uri['folder']) ? $uri['folder'] : 'INBOX';
+
+		if (self::in_arrayr('messageNumber', $criteria) || self::in_arrayr('folderName', $criteria)) {
+			$result = Controller::find(array('concept' => 'message' , 'folder' =>  $folder), array('messageId'), array('filter' => $criteria['filter']));
+			$idList = array();
+			if(is_array($result))
+				foreach ($result as $message)
+					$idList[] = $message['messageId'];
+				
+			$filter = array( 'IN' , 'messageId' , $idList );
+
+			$criteria['filter'] =  $filter;
+		}	
+	}	
+
+	//label:before.create 
+	//label:before.update
+	public function verifyNameLabel(&$uri , &$params , &$criteria , $original){ 
+			$labels = Controller::find( array('concept' => 'label'), false, array('filter' => array('i=', 'name', $params['name'])));
+
+			if (!empty($labels)){
+				foreach ($labels as $i => $v){
+					if(!isset($params['id']) || $v['id'] != $params['id']){
+						throw new Exception('#LabelNameError'); 
+					}
+				}
+			} 
+	}
+
+	//label:before.create
+	public function validateNumberSlots(&$uri , &$params , &$criteria , $original){
+	
+			$used = Controller::read( array( 'concept' => 'label', 'id' => '1' ), array( 'id' ), array( 'uid' => Config::me('uidNumber') ) );
+
+			if( !isset( $used['id'] ) ) 
+			{ 
+				$params['id'] = '1'; 
+				return; 
+			} 
+
+			$slot = Controller::service('PostgreSQL')->execSql( 'SELECT label.slot + 1 as id FROM expressomail_label as label, phpgw_config as config WHERE label.user_id = '.Config::me('uidNumber').' AND config.config_name = \'expressoMail_limit_labels\' AND label.slot <= config.config_value::integer AND ( SELECT count(slot) FROM expressomail_label WHERE slot = label.slot + 1 AND user_id = '.Config::me('uidNumber').' ) = 0 limit 1', true ); 
+
+			if( empty( $slot ) ) 
+			{ 
+				throw new Exception('#LabelSlotError'); 
+			} 
+
+			$params['id'] = $slot['id']; 
+	}
+}
+
+?>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/LabelSecure.php
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/LabelSecure.php	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/LabelSecure.php	(revision 7210)
@@ -0,0 +1,21 @@
+<?php
+
+use prototype\api\Config as Config;
+
+class LabelSecure {	
+
+	//label:before.find
+	public function addVerifyOwnerFilter (&$uri , &$params , &$criteria , $original ){
+		
+		$ownerFilter = array( '=' , 'uid' , Config::me('uidNumber') );
+		
+		if (isset($criteria['filter']) && $criteria['filter']!=NULL && count($criteria['filter']) != 0)
+			$criteria['filter'] = array( 'AND', $criteria['filter'], $ownerFilter );
+		else
+			$criteria['filter'] =  $ownerFilter;
+			
+	}  
+
+}
+
+?>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/FollowupflagSecure.php
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/FollowupflagSecure.php	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/interceptors/FollowupflagSecure.php	(revision 7210)
@@ -0,0 +1,21 @@
+<?php
+
+use prototype\api\Config as Config;
+
+class FollowupflagSecure {	
+	
+	//followupflag:before.find
+	public function addVerifyOwnerFilter (&$uri , &$params , &$criteria , $original ){
+		
+		$ownerFilter = array( '=' , 'uid' , Config::me('uidNumber') );
+		
+		if (isset($criteria['filter']) && $criteria['filter']!=NULL && count($criteria['filter']) != 0)
+			$criteria['filter'] = array( 'AND', $criteria['filter'], $ownerFilter );
+		else
+			$criteria['filter'] =  $ownerFilter;
+			
+	}  
+
+}
+
+?>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/cleanMailAttachments.php
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/cleanMailAttachments.php	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/cleanMailAttachments.php	(revision 7210)
@@ -0,0 +1,46 @@
+<?php
+/**
+*
+* Copyright (C) 2012 ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+*
+* This program is free software; you can redistribute it and/or modify it under
+* the terms of the GNU Affero General Public License version 3 as published by
+* the Free Software Foundation with the addition of the following permission
+* added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED
+* WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE
+* WARRANTY OF NON INFRINGEMENT  OF THIRD PARTY RIGHTS.
+*
+* This program is distributed in the hope that it will be useful, but WITHOUT
+* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+* FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
+* details.
+*
+* You should have received a copy of the GNU Affero General Public License
+* along with this program; if not, see www.gnu.org/licenses or write to
+* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+* MA 02110-1301 USA.
+*
+* This code is based on the OpenXchange Connector and on the Prognus pSync
+* Connector both developed by the community and licensed under the GPL
+* version 2 or above as published by the Free Software Foundation.
+*
+* You can contact Prognus Software Livre headquarters at Av. Tancredo Neves,
+* 6731, PTI, EdifÃ­cio do Saber, 3Âº floor, room 306, Foz do IguaÃ§u - PR - Brasil
+* or at e-mail address prognus@prognus.com.br.
+*
+* DescriÃ§Ã£o rÃ¡pida do arquivo
+*
+* DescriÃ§Ã£o detalhada do arquivo... (se necessÃ¡rio)
+*
+* @package    Prototype (Mail)
+* @license    http://www.gnu.org/copyleft/gpl.html GPL
+* @author     ConsÃ³rcio Expresso Livre - 4Linux (www.4linux.com.br) e Prognus Software Livre (www.prognus.com.br)
+* @version    2.4
+* @sponsor    Caixa EconÃŽmica Federal
+* @since      Arquivo disponibilizado na versÃ£o 2.4
+*/
+
+define('ROOTPATH', dirname(__FILE__).'/../..');
+require_once ROOTPATH.'/api/controller.php';
+Controller::deleteALL( array('concept' => 'mailAttachment'), false ,array( 'filter' => array( '<'  , 'dtstamp' , (gmmktime() - 86400 ))));
+?>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/foldertree.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/foldertree.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/foldertree.css	(revision 7210)
@@ -0,0 +1,93 @@
+#content_folders .foldertree-skin-prognus span.selected {font-weight:bold !important; } 
+#content_folders .foldertree-skin-prognus span.inbox {}
+#content_folders .foldertree-skin-prognus span.trash {background-image: url(../img/bin.png);}
+#content_folders .foldertree-skin-prognus span.drafts {background-image: url(../img/folder_page_white.png);}
+#content_folders .foldertree-skin-prognus span.spam {background-image: url(../img/folder_delete.png);}
+#content_folders .foldertree-skin-prognus span.sent {background-image: url(../img/folder_go.png);}
+#content_folders .foldertree-skin-prognus span.folder {display: block;padding-bottom: 1px;padding-left: 18px;padding-right: 0;padding-top: 1px; font-family : Lucida Grande, Lucida Sans, Arial, sans-serif;}
+#content_folders .treeview .closed {display:block;}
+
+.folders-loading {
+	background: url(../img/loader.gif) !important;
+	background-position: 0 0 !important;
+	background-repeat : no-repeat !important;
+}
+
+.draggin-box{
+	cursor : pointer;
+	background-color: #CDC5BF;
+	float: left;
+	width : auto; 
+	height: 16px; 
+	border:1px solid #333;
+	text-align: right;
+	z-index: 2000;
+}
+
+.ui-draggin-default-image{
+    float: left; 
+    text-align: right;
+}
+
+.draggin-mail{
+	float: left;
+	background-image: url(../img/move.png);
+	background-position: 0px 0px;
+	background-repeat:no-repeat;
+	color : red;
+	text-align: right;
+	font-weight : bold;
+	padding-right : 5px;
+	padding-left : 25px;	
+	font-family : Lucida Grande, Lucida Sans, Arial, sans-serif;
+	font-size : 11px;
+}
+
+.draggin-folder{
+	float: left;
+	background-image: url(../img/folder.png);
+	background-position: 0px 0px;
+	background-repeat:no-repeat;
+	padding-left : 20px;
+	color : red;
+	text-align: right;
+	font-weight : bold;
+	padding-right : 5px;
+}
+
+.collapse_folders_td{
+	cursor : pointer;
+	width: 12px;
+	height:100%;
+	border-radius : 5px;
+	border-left : 1px solid #CCCCCC;
+}
+.collapse_folders_td.collapse_folders_td_over{
+	border-left: 1px solid #1B75BB;
+} 
+
+.folder-over{
+	border: 1px solid black;
+}
+
+.floating-default{
+    float: left; 
+    text-align: left;
+}
+
+.collapse_folders_td .ui-icon.ui-icon-triangle-1-e{
+	background-position: -37px -20px;
+	width: 8px; 
+	height: 8px;
+}
+
+.collapse_folders_td .ui-icon.ui-icon-triangle-1-w{
+	width: 8px; 
+	height: 8px;
+	background-position: -100px -20px;
+}
+
+.float-menu{
+	position:absolute;
+	text-align: left;
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/layout.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/layout.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/layout.css	(revision 7210)
@@ -0,0 +1,1290 @@
+/* 
+	Document   : layout.css
+	Created on : 10/09/2011, 10:12:49
+	Author     : prognus
+	Description: contains all styles related to element positioning and elements dimension
+*/
+
+
+
+/* -- main page styles -- */
+
+/*	body {
+		margin:0;
+		font-size: 14px;
+		font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
+		font-family: Arial,Helvetica,sans-serif;
+	}*/
+
+#wrap {
+/*	background-image: url(images/calendar-top-bg-mini.png);
+	background-repeat: no-repeat;*/
+	width: 100%;
+	/*max-width: 1100px;*/
+	min-width: 985px;
+	margin: 0 auto;
+}
+
+#wrap .search-field {
+	max-width: 180px;
+	width: 180px;
+/*	margin: 5px 0 5px 290px;*/
+	float: right;
+	white-space: nowrap;
+}
+
+#wrap .search-field input { 
+	width: 160px; 
+	padding: 0 0 0 3px;
+}
+
+.block-horizontal-toolbox {
+	width: 100%;
+	height: 30px;
+/*	margin: 5px 0;*/
+}
+
+.block-vertical-toolbox { 
+	width: auto; 
+	float: left; 
+	padding: 0; 
+}
+
+.block-vertical-toolbox .mini-calendar { 
+	padding: 5px 0; 
+	margin:10px 0; 
+}
+
+.block-top {
+/*	background-image: url(images/calendar-body-bg.png);
+	background-repeat: repeat-x;*/
+	width: 100%;
+	height: 100px;
+}
+
+#tabs {
+	width: 100%;
+	float: right;
+	padding-top: 0;
+}
+
+#tabs,
+#tabs .ui-tabs-nav {
+	padding-top: 0;
+}
+
+#tabs > li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
+
+
+.button.config-menu {
+	float: right;
+	padding: 11px 5px;
+	width: 40px;
+	height: 5px;
+}
+
+.fg-menu-container {
+	z-index: 999;
+	min-width: 134px !important;
+}
+
+.fg-menu-container.evt-option{
+	min-width: 85px !important;
+	padding: 0;
+}
+
+.fg-menu-container.evt-option a{
+	padding: 0.1em 3%;
+}
+
+.ui-icon.ui-icon-gear {
+	background-image: url(../img/cog.png);
+    background-position: 0 0;
+}
+
+.expresso-calendar-container dl 
+.expresso-calendar-container dt, 
+.expresso-calendar-container dl dd { 
+	margin: 0; padding: 0; 
+}
+
+.expresso-calendar-container #trash {
+	width: 150px;
+	height: 150px;
+	bottom: 0px;
+	position: fixed;
+}
+
+/* -- generic HTML elements styles -- */
+
+input { 
+	margin-top: 2px; 
+	margin-bottom: 2px; 
+}
+
+/* -- generic class styles -- */
+
+.clear { clear: both; }
+
+.editable{
+	background-color: white;
+	outline: 0px solid transparent;
+	border: 1px #CCC solid;
+}
+
+p.input-group span {display: inline-block; vertical-align: text-top;}
+p.input-group label {display: inline-block; vertical-align: text-top;}
+p.input-group ul li * {vertical-align: bottom; margin-bottom: 5px;}
+p.input-group label.for-textarea {display: inline-block; vertical-align: top;}
+p.input-group {
+  margin: 5px 0 !important;
+}
+
+.messages .message { text-align: left; }
+
+.button.tiny{
+	height: 15px;
+}
+.button.tiny.ui-button-icon-only {
+    width: 15px;
+}
+
+.button.small {
+	height: 24px;
+}
+.button.small.ui-button-icon-only {
+    width: 24px;
+}
+
+.fields-left {display: inline-block; width: 200px;}
+.fields-right {display: inline-block; width: 300px;}
+
+.ui-icon-float-right { float:right; }
+.ui-icon-float-left { float:left; }
+
+fieldset.input-field-rounded {
+	border:1px solid #CFCFCF;
+	padding: 5px;
+}
+
+fieldset.input-field-rounded input{
+	margin: 0px;
+	display: inline-block;
+	border: none;
+}
+
+fieldset.input-field-rounded span {
+	display: inline-block;
+	margin:0 0 -3px 5px;
+}
+
+/* search area definition */
+fieldset.search-field {
+	border:1px solid #CFCFCF;
+	padding: 3px;
+}
+
+fieldset.search-field input{
+	margin: 0px;
+	display: inline-block;
+	border: none;
+	width: 215px;
+}
+
+fieldset.search-field span {
+	display: inline-block;
+	margin:0 0 -3px 0px;
+	cursor: pointer;
+}
+/* #search area definition */
+
+
+/* -- fullcalendar styles -- */
+
+.fc-view{
+	overflow: visible;
+}
+
+.fc-grid.fc-view-year .fc-day-number {
+	text-align: center;
+	float: none;
+}
+
+/* -- event details styles -- */
+
+.new-event-win.active {
+	 width:700px;height:510px;text-align:left;
+}
+
+.new-event-win > .content.ui-tabs.ui-widget-content {
+	border: none;
+}
+
+.new-event-win ul.attendee-permissions-list, li.attendee-permissions-list{text-align: left;}
+
+li.attendee-permissions-list input{width: 20px !important; margin: 3px 0 0 0 !important;}
+
+p.request-update{display: inline; position: relative; top: 2px;}
+
+
+p.request-update label{width: 150px !important;}
+
+.new-event-win .menu-addevent {
+	text-align: right;
+}
+
+fieldset.block-add-attendee .add-attendee-search { max-width: 250px; margin: 5px;}
+fieldset.block-add-attendee .add-attendee-search input { max-width: 220px; width: 220px; padding: 0 0 0 7px;}
+fieldset.block-add-attendee .search-result-list { width: 255px; max-height: 215px; overflow: auto;}
+fieldset.block-add-attendee .search-result-list .ui-widget-content { border: none;}
+fieldset.block-add-attendee .search-result-list .empty { margin-left: 5px; }
+fieldset.block-add-user .add-user-search {max-width: 235px;}
+fieldset.block-add-user .search-result-list {max-width: 245px;} 
+fieldset.block-add-user .search-result-list .ui-widget-content {/*max-width: 245px;*/}
+
+.block-attendee-list, .block-add-attendee { float:left;}
+.block-attendee-list { width:400px; margin-right: 5px; }
+.block-add-attendee { width:260px; margin-right: 5px; }
+.block-attendee-list dd, .block-add-attendee dd { border: 1px solid #BFBFBF; }
+.block-attendee-list dt, .block-add-attendee dt { background-color:#FFF; margin: 5px 0 -6px 5px; font-weight: bold; display: table;  position: relative;}
+.block-attendee-list dd.attendee-list { height: 196px; }
+.block-attendee-list dd.attendee-list ul { max-height: 186px; overflow: auto; margin-top: 10px;}
+.block-attendee-list dd.attendee-list-add {border-top:none !important; border:1px solid #BFBFBF;}
+.block-attendee-list dd.attendee-list-add fieldset.add-attendee-input { border:none !important; margin: 0; padding: 0 }
+.block-attendee-list dd.attendee-list-brief { border:none !important; margin: 5px 0; color:#777; }
+
+dl.block-add-attendee {
+	float: right;
+	display: block;
+}
+
+dl.block-add-attendee dd.add-attendee {
+	width: 260px;
+	min-height: 260px;
+	display: block;
+}
+
+ul.attendees-count {clear:left; float:left;}
+.attendees-count li {display: inline;}
+.attendees-count li:after {content:", "}
+.attendees-count li label {font-weight: bold;}
+
+.attendees-list .me select.status { margin:10px 5px 5px 5px; }
+.attendees-list .me .add-attendee-search { max-width: 155px; width:155px; display: inline; padding: 0; margin: 10px 0 5px 0;}
+
+.attendees-list .me .add-attendee-options { max-height: 16px; height:16px;  max-width: 50px; width:50px; display: inline; padding: 0; margin: 0 0 5px 0;}
+.attendees-list .me .add-attendee-options-read { max-height: 16px; height:16px;  max-width: 16px; width:16px; display: inline; padding: 0; margin: 0 0 5px 0;}
+
+.attendees-list .me .add-attendee-options-button {position: absolute; top: 171px;}
+.attendees-list .hover-attendee { background-color: #DFEFFC;}
+/*
+.attendees-list .attendee-options-button-edit { position: absolute; top:0; right:25px;}
+.attendees-list .attendee-options-button-key { position: absolute; top:0; right:45px;}
+.attendees-list .attendee-options-button-delegate { position: absolute; top:0; right:65px;}
+*/
+
+.attendee-options{ position: absolute; top: 0; left: 287px; background-color: white; z-index: 100; width: 90px; background-color: #FFF;	padding: 0 20px 0 3px; text-align: right;}
+.attendees-list .not-attendee { height:16px; }
+
+.list-delegates{margin: 0 0 0 25px;}
+
+.status-delegate{position: absolute; left:3px;}
+
+.attendees-list .me .add-attendee-search input { max-width: 125px; }
+.attendees-list li.organizer, .attendees-list li.me-delegated  {margin-bottom: 3px;}
+.attendees-list .organizer .button.swap {
+	float: right;
+	margin-top: -1.5em;
+}
+
+.name-status-delegated{text-decoration: line-through; padding: 0 0 0 18px;}
+.name-status-delegated-delegated{text-decoration: line-through; padding: 0 0 0 12px;}
+.name-status-delegated-none{ padding: 0 0 0 12;}
+
+.name-status{padding: 0 0 0 18px;}
+
+.name-special{padding: 0 0 0 33px;}
+.name-special-delegated{text-decoration: line-through; padding: 0 0 0 33px;}
+
+.open-delegate{position: absolute; left: 20px; display: block; cursor: hand;}
+.space-status{position: absolute; left: 20px; display: block;}
+.space-special{position: absolute; left: 35px; display: block;}
+.space-special-delegated{position: absolute; left: 20px; display: block;}
+
+.attendee-permissions-change{background-image: url(../../../plugins/jquery/images/ui-icons_f9bd01_256x240.png) !important;}
+.attendee-permissions-change-button{border: 1px solid #79B7E7 !important; background: #F5F8F9 !important; font-weight: bold !important; color: #E17009 !important;}
+
+.attendee-permissions-conflict{opacity: 0.5}
+
+dd.attendee-list ul.attendee-list li {
+/*	display: table;*/
+    overflow: hidden;
+	position: relative;
+}
+dd.attendee-list ul.attendee-list li input, 
+dd.attendee-list ul.attendee-list li span, 
+dd.attendee-list ul.attendee-list li label {
+	display: table-cell;
+}
+dd.attendee-list ul.attendee-list li label.name,
+dd.attendee-list ul.attendee-list li label.mail {
+	width: 99999px;
+	min-width: 99999px;
+	vertical-align: middle;
+}
+dd.attendee-list ul.attendee-list li label[title=''] { display:none }
+/*
+dd.attendee-list ul.attendee-list li .button.close {
+	position: absolute;
+    right: 5px;
+    top: 0;
+}
+*/
+/*
+.attendees-list li .ui-icon-float-right {
+	opacity:0.1;
+	filter:alpha(opacity=10); 
+}
+.attendees-list li.hover .ui-icon-float-right {
+	opacity:1;
+	filter:alpha(opacity=100); 
+}*/
+
+/* -- configurations styles -- */
+
+.configurations-basic label {
+	width: 200px;
+}
+
+.configurations-notifications label {
+	width: 350px;
+}
+
+.accordion-user-calendars .ui-accordion-header {
+	margin-bottom: 2px;
+}
+
+.accordion-user-calendars .ui-accordion-header legend{
+	font-size: 60%;
+    margin-left: 30px;
+    padding: 0.4em;;
+}
+.user-calendar.ui-accordion-content {
+	margin-top: -11px;
+}
+
+/* -- preferences styles -- */
+p.default-alarm-event {margin-bottom: 10px; margin-top: -8px;}
+.preferences-win.active p.input-group label { display: inline-block; width: 300px;}
+.preferences-win.active p.input-group ul li label { width: auto; }
+/*.preferences-win.active input[type="text"] { vertical-align:top; }*/
+
+/* -- import/export dialog styles -- */
+
+.import-export-win p.input-group label { display: inline-block; width: 100px;}
+.import-export-win span.tip {
+    display: block;
+    margin: 3px 0 10px 100px;
+    clear: both;
+    font-size: 0.9em;
+}
+
+.import-export-win .button.remove-attachment {margin: -2px 0 0px 10px;}
+
+.import-export-win form { padding: 10px; }
+.import-export-win p.input-group * { float:left; }
+
+
+label.messagesHelpers{display: block; position: absolute; left: 60px; top: 21px;}
+
+/* -- calendar list styles -- */
+
+.my-calendars .button.new {
+  float:right;
+  width: 15px;
+  height: 15px;
+}
+
+.my-calendars .status-list {
+	display: inline-block;
+	margin: 0px 0pc -4px -5px;
+	cursor: pointer;
+}
+
+.my-calendars .list-calendars-item, .signed-calendars .list-calendars-item{
+	position: relative; 
+	overflow: hidden;
+}
+.my-calendars .list-calendars-item div, .signed-calendars .list-calendars-item div{
+	overflow:hidden; 
+	width:6000px; 
+	display:table;
+}
+
+.my-calendars .cal-list-options-btn, .signed-calendars .cal-list-options-btn {
+	position: absolute;
+	top: 2px;
+	right: 2px;
+}
+
+.evt-list-options.my-evt-list-options{
+	position: absolute;
+	width: 130px;
+	display: block;
+	
+}
+
+
+.colors-options { padding-left: 5px; }
+.colors-options .color-selected { text-indent: -10px; /*padding: 1px 0px 0px 8px;*/ }
+.colors-options .color-selected .ui-button-text { padding: 0px 0px 0px 8px; font-size: 30px; line-height: 0.4em; }
+.colors-options .cal-colors-options-btn {
+	float:left;
+	width: 17px;
+	height: 17px;
+	margin-bottom: 2px;
+	margin-top:2px;
+	background-position: -500px -10px;
+}
+.my-calendars {
+  font-size: 12px;
+  padding-top: 3px;
+  padding-bottom: 3px;
+  cursor: pointer;
+}
+
+.shared-calendar .user-list li.user-list{
+	height: 17px;
+	overflow: hidden;
+	position: relative;
+}
+
+.shared-calendar dd.user-list{ overflow: auto;}
+
+.user-list .hover-user { background-color: #DFEFFC;}
+
+.shared-calendar ul.search-result-list{
+    overflow-x: hidden !important;
+    overflow-y: auto !important; 
+    height: 210px;
+}
+
+.user-acls-shared-calendar{
+    width: 130px;
+    float: right;
+    position: absolute;
+    left: 200px;
+    top:2px;
+    background: white;
+}
+
+.user-acls-shared-calendar.calendar{
+	text-align: right;
+}
+
+
+.calendars-list .search-field.calendar-shared-search {
+	max-width: 193px !important;
+	width: 193px !important;
+	float: right;
+}
+
+.calendars-list .search-field input.search{
+	width:165px !important;
+}
+
+.calendars-list .status-list-shared{
+	display: inline-block;
+	margin: 0 0 -4px -5px;
+	cursor: pointer;
+}
+
+.calendars-list .title-signed-calendars{
+	cursor: pointer;
+}
+
+.my-calendars a.new-calendar .ui-button-text {
+    padding: 0;
+}
+
+.new-calendar-shared{
+	float: right;
+}
+
+.signed-calendars {
+	font-size: 12px;
+	padding-top: 3px;
+	padding-bottom: 3px;
+}
+
+dl.block-add-user {
+	max-width: 290px;
+	min-height: 260px;
+	display: block;
+	float:right;
+	margin: 0 10px 10px 0;
+}
+
+dl.block-add-calendar {
+	max-width: 290px;
+	min-height: 185px;
+	display: block;
+	float:right;
+	margin: 0 10px 10px 0;
+}
+
+dl.block-public-calendar {
+	max-width: 290px;
+	min-height: 30px;
+	display: block;
+	float:right;
+	margin: 0 10px 1px 0;
+}
+
+fieldset.block-add-user, .block-add-user li{
+	border: none;
+}
+
+fieldset.add-user-search{
+	margin: 0 0 5px 0;
+}
+
+dl.block-user-list{
+	float:left;
+	margin: 0 0 10px 10px;
+}
+
+dt.user-list{
+	width: 117px;
+	margin-right: 5px;
+}
+
+dt.calendar-list{
+	width: 144px;
+	margin-right: 5px;
+}
+
+dt.calendar-shared, dt.user-list, dt.add-user, dt.calendar-list, dt.calendar-public{
+	background-color: white;
+	margin: 5px 0 -6px 5px;
+	font-weight: bold;
+	display: table;
+	position: relative;
+}
+
+dd.add-user{height: 240px;}
+dd.add-user-calendar{height: 192px;}
+
+dd.calendar-public{height: 23px;}
+
+dd.add-user-calendar, dd.calendar, dd.user-list, dd.add-user, dd.calendar-list, dd.calendar-public{
+	border: 1px solid #BFBFBF;
+	border-image: initial;
+	width: 330px;
+	padding: 7px 0px 4px 4px;
+}
+
+dd.add-user-calendar ul{
+	width: 250px;
+	max-height: 166px;
+}
+
+dd.add-user-calendar, dd.add-user,  dd.calendar-public{
+	width: 250px;
+}
+
+div.shared-calendar fieldset.shared-calendar-configure{
+	margin-top: 10px;
+}
+
+.add-user fieldset.block-add-user{
+	width: 245px;
+}
+
+dd.user-list{
+	height: 193px;
+}
+
+dd.calendar-list{
+	height: 240px;
+}
+
+/*dd.calendar-list ul.user-list li.user-list div {
+	position:relative;
+}*/
+
+.list-calendars { vertical-align: middle; }
+.list-calendars .cal-list-img { float: right; }
+.list-calendars .cal-list-options-btn {
+	width: 10px;
+	height: 10px;
+	display: inline;
+	float: right;
+	padding: 3px;
+	-webkit-border-radius: 4px;
+	-moz-border-radius: 4px;
+	border-radius: 4px;
+}
+
+ul.list-calendars li.list-calendars-item {
+	background-color: #F7FCFF;
+	border: 1px solid #ccc;
+	height: 15px;
+	line-height: 15px;
+	margin: 2px 0;
+	padding: 3px;
+	-webkit-border-radius: 4px;
+	-moz-border-radius: 4px;
+	border-radius: 4px;
+}
+
+ul.list-calendars li li { background-color: #fff; }
+ul.list-calendars li label { vertical-align: middle; }
+ul.list-calendars li input { vertical-align: middle; }
+ul.list-calendars li a { vertical-align: middle; }
+ul.list-calendars li.list-calendars-item .cal-list-options ul.fg-menu li { background-color: #CC0000 !important; color: red !important; }
+
+
+/* -- event list styles -- */
+
+.events-list-win.empty {
+    width: 100%;
+}
+
+.events-list-win.empty table.header-paginator{
+    margin-bottom: 80px;
+}
+
+.events-list-win.empty label.empty-result{
+    margin: 0 0 0 290px;
+}
+
+.events-list-win a {
+	font-size:12px;
+}
+.details-event-list p.input-group { margin: 7px 0 0 0; text-align: justify; }
+.details-event-list p.input-group label { font-weight: bold; width: 14% }
+.details-event-list p.input-group .large { width: 85%; }
+.fields-details-event-list {
+	padding: 5px;	
+}
+
+.list-events-paginator .fc-header-title{margin-left: 150px; font-size: 1em;}
+.header-paginator{margin-top: -15px;}
+.header-paginator .fc-button-content{font-size: 11px;}
+.header-paginator-right{font-size: 11px;}
+.header-paginator .fc-header-left .fc-button-inner{height: 20px; width: 29px;}
+.header-paginator .fc-header-left .fc-button-inner.fc-state-hover{border-color: #999;}
+.header-paginator .fc-header-left .fc-button-inner.fc-state-down{border-color: #555; background: #777;}
+.header-paginator .fc-header-left .fc-button-inner .fc-button-content{line-height: 1.6em; padding: .2em .6em; font-size: 11px;}
+
+/* -- all tips general and specific styles -- */
+
+.qtip-content fieldset { text-align: right;}
+.qtip-content fieldset input { text-align: left; width: 190px;}
+.qtip-content .menu-container.footer-container { background-color: inherit; text-align: right; padding: 0; margin:5px 0 0 0;}
+.qtip-content .menu-container.footer-container .ui-button-text-only .ui-button-text {
+    font-size: 0.8em;
+    padding: 0.1em 0.6em;
+}
+.qtip-title .ui-button-icon-only {
+    height: 1.5em !important;
+    width: 1.5em !important;
+}
+.qtip-title .qtip-button { margin: -5px -10px 0 -15px }
+.attendee-list-add .add-attendee-input input { width: 370px; }
+
+
+.attendee-list-add .add-attendee-input span{cursor: hand;}
+
+.qtip-content .add-attendee-search { max-width: 155px; width:155px; display: inline; padding: 0; margin: 10px 0 5px 0;}
+.qtip-content .add-attendee-search input { max-width: 125px; }
+
+/* -- other general styles -- */
+
+.event-alarms-list .button.remove,
+.configurations-alarms .button.remove {
+    left: 6px;
+    top: 6px;
+}
+
+.button.add.button-add-attachment{margin: -9px 0 0 8px;}
+.button.btn-danger.delete{margin: 0 0 0 0;}
+
+.button.upload{top: 4px;}
+.button.upload.edit{top: -2px;}
+
+div.fileupload-buttonbar{padding: 0.2em 0.5em }
+.archive-error{color: #F00;}
+
+.progress.in-progress{width: 100px; height: 12px;}
+
+span.status-upload{margin: -4px 0px 0px 0px;}
+
+.lbl-archive-nome, .lbl-archive-size{font-weight: bold !important;}
+.lbl-archive-nome{width:40px !important;}
+.row.fileupload-buttonbar{margin-top: -14px; padding: 0.2em 0.7em;}
+
+.archive-nome{width: 73px;}
+.archive-nome label{display: block; position: absolute; left: 136px; top: 194px;}
+.archive-size{min-width:70px; max-width:75px;}
+
+
+.input-group.date-info input {
+	width: 100px;
+}
+
+.input-group.event-info input {
+	width: 600px;
+}
+
+/* -- alarm dysplay -- */
+
+.new-event-alarm{
+	margin: 5px;	
+	font: bold;
+}
+
+.title-event-alarm{
+	margin: 5px;
+}
+
+.description-event-alarm{
+	margin: 5px;
+}
+
+.inicialize-event-alarm{
+	margin: 5px;
+}
+
+.ZebraDialog{
+	z-index: 9999 !important;
+}
+
+.ZebraDialogOverlay{
+	z-index: 9990 !important;
+}
+
+/* CANDIDATOS A EXCLUSÃO */
+/*
+#external-events {
+	float: left;
+	width: 150px;
+	padding: 0 10px;
+	border: 1px solid #ccc;
+	background: #eee;
+	text-align: left;
+}
+
+#external-events h4 {
+	font-size: 16px;
+	margin-top: 0;
+	padding-top: 1em;
+}
+
+.external-event {
+	margin: 10px 0;
+	padding: 2px 4px;
+	background: #3366CC;
+	color: #fff;
+	font-size: .85em;
+	cursor: pointer;
+}
+
+#external-events p {
+	margin: 1.5em 0;
+	font-size: 11px;
+	color: #666;
+}
+
+#external-events p input { 
+	margin: 0;
+	vertical-align: middle;
+}
+
+#dialog label, #dialog input { display:block; }
+#dialog label { margin-top: 0.5em; }
+#dialog input, #dialog textarea { width: 95%; }
+	*/
+
+/*Antigo style.css*/
+
+/* 
+	Document   : style.css
+	Created on : 10/09/2011, 10:13:12
+	Author     : prognus
+	Description: contains all styles related to elements look-and-feel
+*/
+
+
+#tabs {
+	background-color: transparent;
+}
+
+.tip { line-height: 1.3em; }
+
+.expresso-calendar-container a {
+	text-decoration: none; 
+}
+.expresso-calendar-container ul, 
+.expresso-calendar-container dl, 
+.expresso-calendar-container ol { 
+	margin: 5px 0; padding: 0; 
+	list-style: none;
+}
+.expresso-calendar-container #trash {
+	color: #ADADAD;
+}
+.expresso-calendar-container #trash.empty {
+	background-image: url(../img/trash-empty.png);
+	background-repeat: no-repeat;
+	background-position: bottom center;
+}
+
+.expresso-calendar-container #trash.full {
+	background-image: url(../img/trash-full.png);
+	background-repeat: no-repeat;
+	background-position: bottom center;
+}
+
+.expresso-calendar-container #trash label {
+	display: none;
+}
+
+.ui-dialog { padding: 0; }
+.ui-dialog .ui-dialog-content { background-color: #fff; }
+.ui-dialog .ui-dialog-title { margin:0; }
+.ui-dialog .ui-button-text-only .ui-button-text { padding: 0.4em 1em; }
+
+.new-event-win fieldset { border: none;	margin: 0; padding: 0; }
+.new-event-win fieldset.tab-level2 { padding: 0px 5px; }
+.new-event-win fieldset fieldset, .new-event-win fieldset.tab-level2 fieldset { padding: 5px 0; }
+
+.hidden {
+	display: none;
+	visibility: hidden;
+}
+
+.header-menu-container, .footer-menu-container,
+.menu-container.header-container, .menu-container.footer-container {
+	display:block;
+	width: 100%;
+	margin: 0;
+	padding: 10px 0;
+	background-color: #E0EEEE;
+	text-align: right;
+}
+
+.preferences-win .header-menu-container,
+.configure-calendars-win .header-menu-container {
+	margin: -10px 0 10px;
+}
+
+.preferences-win .header-menu-container,
+.configure-calendars-win .header-menu-container {
+	-moz-box-shadow: 0 3px 4px #AAAAAA;
+	-webkit-box-shadow: 0 3px 4px #AAAAAA;
+	box-shadow: 0 3px 4px #AAAAAA;
+}
+
+.preferences-win .footer-menu-container,
+.configure-calendars-win .footer-menu-container {
+	margin: 10px 0 10px;
+}
+
+.preferences-win .footer-menu-container,
+.configure-calendars-win .footer-menu-container {
+	-moz-box-shadow: 0 3px 4px #AAAAAA;
+	-webkit-box-shadow: 0 3px 4px #AAAAAA;
+	box-shadow: 0 3px 4px #AAAAAA;
+}
+
+.ui-dialog .ui-dialog-content { padding: 0; }
+.new-event-win div.div-addevent { padding: 0; width: 700px; border: 0;}
+.new-event-win form.form-addevent { padding: 9px; }
+
+.expresso-calendar-container input[type="text"] { height: 18px; }
+.expresso-calendar-container input[type="text"], 
+.expresso-calendar-container textarea, 
+.expresso-calendar-container select {
+	border: 1px solid #CFCFCF;
+	font-size: 12px;
+	height: 20px;
+}
+
+.expresso-calendar-container textarea, 
+.expresso-calendar-container select { 
+/*	vertical-align: super; */
+	vertical-align: middle; 
+}
+
+.expresso-calendar-container input.date, 
+.expresso-calendar-container input.time { 
+	width:80px; 
+}
+
+.expresso-calendar-container input.h1,
+.new-event-win input.h1 {
+	font-size: 150%;
+	font-weight: bold;
+	width: 64%;
+	height: 150%;
+}
+
+.new-event-win textarea {
+	width:600px;
+	height: 210px;
+	border: 1px solid #CFCFCF;
+	padding: 0px;
+}
+
+span.input-group { display: block; }
+/*p.input-group label { vertical-align: top; }*/
+.new-event-win p.input-group label { display: inline-block; width: 65px;}
+.new-event-win p.input-group label.input-group { display: inline-block; width: 110px; font-weight: bold;}
+
+input.number {text-align: right}
+input.input-tiny, input.tiny {width: 40px;}
+input.input-small, input.small {width: 80px;}
+input.input-medium, input.medium {width: 160px;}
+input.input-large, input.large {width: 260px;}
+
+label.label-tiny, label.tiny {width: 40px;}
+label.label-small, label.small {width: 80px;}
+label.label-medium, label.medium {width: 160px;}
+label.label-large, label.large {width: 260px;}
+
+select.select-tiny, select.tiny {width: 40px;}
+select.select-small, select.small {width: 80px;}
+select.select-medium, select.medium {width: 160px;}
+select.select-large, select.large {width: 260px;}
+
+.new-event-win fieldset.event-repeat-container label, 
+.new-event-win p.input-group.event-repeat-weekly label, 
+.new-event-win p.input-group.event-repeat-monthly label {
+	width: auto; 
+}
+
+.new-event-win fieldset.input-field-rounded,
+.new-event-win fieldset.search-field,
+.new-event-win fieldset.block-add-attendee-permissions,
+.new-event-win fieldset.block-attendee-list {
+	border:1px solid #CFCFCF;
+}
+
+.new-event-win fieldset.block-attendee-list { width: 300px; max-height:180px; padding: 5px; float: left;}
+.new-event-win fieldset.block-attendee-list ul {  height:160px; overflow: auto;}
+
+
+/* # add attendee */
+
+#tabs.ui-widget-content {
+	border:none;
+}
+#tabs .ui-widget-header {
+	background: none;
+	background-image: none;
+	border: none;
+	border-bottom: 1px solid #4297D7;
+	margin-bottom: 5px;
+}
+
+#calendar.ui-tabs-panel {
+	padding: 0;
+}
+
+.mini-calendar .ui-datepicker { width: auto; background: none repeat scroll 0 0 transparent; }
+.mini-calendar .ui-datepicker  table{width:190px;}
+.mini-calendar .ui-widget-content {	border: none; background-color: transparent; }
+.mini-calendar .ui-widget-header { background: transparent; color: #000; border: 0 none;}
+
+/* fc custumize */
+
+.blocked-event div, .blocked-event-permision div{
+background: -moz-linear-gradient(-45deg,  rgba(0,0,0,0) 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0.1) 5%, rgba(0,0,0,0) 9%, rgba(0,0,0,0) 13%, rgba(0,0,0,0.1) 17%, rgba(0,0,0,0) 21%, rgba(0,0,0,0) 25%, rgba(0,0,0,0.1) 29%, rgba(0,0,0,0) 33%, rgba(0,0,0,0) 37%, rgba(0,0,0,0.1) 41%, rgba(0,0,0,0) 45%, rgba(0,0,0,0) 49%, rgba(0,0,0,0.1) 53%, rgba(0,0,0,0) 57%, rgba(0,0,0,0) 61%, rgba(0,0,0,0.1) 65%, rgba(0,0,0,0) 69%, rgba(0,0,0,0) 73%, rgba(0,0,0,0.1) 77%, rgba(0,0,0,0.01) 81%, rgba(0,0,0,0) 85%, rgba(0,0,0,0.1) 89%, rgba(0,0,0,0) 93%, rgba(0,0,0,0) 97%, rgba(0,0,0,0) 100%); /* FF3.6+ */
+background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(1%,rgba(0,0,0,0)), color-stop(5%,rgba(0,0,0,0.1)), color-stop(9%,rgba(0,0,0,0)), color-stop(13%,rgba(0,0,0,0)), color-stop(17%,rgba(0,0,0,0.1)), color-stop(21%,rgba(0,0,0,0)), color-stop(25%,rgba(0,0,0,0)), color-stop(29%,rgba(0,0,0,0.1)), color-stop(33%,rgba(0,0,0,0)), color-stop(37%,rgba(0,0,0,0)), color-stop(41%,rgba(0,0,0,0.1)), color-stop(45%,rgba(0,0,0,0)), color-stop(49%,rgba(0,0,0,0)), color-stop(53%,rgba(0,0,0,0.1)), color-stop(57%,rgba(0,0,0,0)), color-stop(61%,rgba(0,0,0,0)), color-stop(65%,rgba(0,0,0,0.1)), color-stop(69%,rgba(0,0,0,0)), color-stop(73%,rgba(0,0,0,0)), color-stop(77%,rgba(0,0,0,0.1)), color-stop(81%,rgba(0,0,0,0.01)), color-stop(85%,rgba(0,0,0,0)), color-stop(89%,rgba(0,0,0,0.1)), color-stop(93%,rgba(0,0,0,0)), color-stop(97%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
+background: -webkit-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
+background: -o-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
+background: -ms-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* IE10+ */
+background: linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* W3C */
+filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
+}
+
+.blocked-event-permision {cursor: hand}
+
+.fc-state-default .fc-button-effect span {
+    background: none;
+    border:none;
+}
+
+.fc-header-title h2 {
+    color:#555;
+}
+.fc-state-default, .fc-state-default .fc-button-inner {
+    color: #555555;
+    text-transform: capitalize;
+}
+
+.fc-state-active, .fc-state-active .fc-button-inner {
+    color: #FFFFFF;
+}
+
+.block-vertical-toolbox .button.add {
+    width:190px;
+}
+
+.fc-header .fc-state-active, .fc-header .ui-state-active {
+    z-index: auto;
+}
+
+.fc-year-monthly-header {
+    font-weight: bold;    
+}
+
+.fc-year-have-event {
+    background: none repeat scroll 0 0 transparent !important;
+    
+}
+.fc-year-have-event .fc-day-number {
+    background: #F3F3F3;
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
+    border-color: #CCC #BBB #AAA;
+    border-style: solid;
+    border-width: 1px;
+    border-radius: 4px;
+    -moz-border-radius:4px;
+    -webkit-border-radius:4px;
+}
+
+.fc-year-main-table div:hover .fc-day-number  {
+	cursor: pointer;
+	font-weight: bold;
+}
+
+/* preferences */
+
+.expresso-calendar-container h3 {
+    border-bottom: 2px solid #E17009;
+    font-size: 170%;
+    margin-bottom: 10px;
+    padding-bottom: 2px;
+}
+
+.expresso-calendar-container fieldset legend {/*font-size:1.3em;*/ font-weight:bold;}
+
+.preferences-win a {
+  text-decoration: underline;
+  font-weight:bold;
+  font-size:1.05em;
+  cursor:pointer;
+}
+
+.preferences-win ul li {list-style: none;}
+
+
+.preferences-win fieldset {
+  border:1px solid #CFCFCF;
+}
+
+.preferences-win fieldset.no-legend {
+    margin: 0;
+    padding: 5px 0;
+    border: none;
+}
+
+.preferences-win hr {
+  margin: 10px 0;
+  padding: 0 10px;
+  /*background:#FFFF85;
+  border: 1px solid #FFE74D;*/
+}
+
+.preferences-win #preferences_especific_calendar_details fieldset {
+  border: 0 none;
+}
+
+
+/* Geral */
+fieldset.background-fields {
+  background:#FFFF85;
+  border: 2px solid #FFE74D;
+  -moz-border-radius: 15px;
+  -webkit-border-radius: 15px;
+}
+
+.button.small.ui-button-text-only .ui-button-text {
+    font-size: 0.9em;
+    padding: 0.1em 0.6em;
+}
+
+.attendees-list dd.attedee-organizer {
+	border-bottom: 1px solid #BFBFBF;
+	margin-bottom: 5px;
+}
+
+/* Events List */
+.events-list-win th, .events-list-win td {
+  padding: 15px 0px 15px 0;
+  vertical-align: middle;
+  border-bottom: 1px solid #ccc;
+}
+
+.events-list-win .last-row th, .events-list-win .last-row td {
+  border-bottom: 1px solid #ccc;
+}
+
+.events-list-win table {
+  width: 100%;
+  float: left;
+}
+
+.events-list-win table a {
+  color: rgb(48, 72, 126) !important;
+  cursor: pointer;
+}
+
+.events-list-win table img {
+  width: 12px;
+  height: 12px;
+  padding: 0 2px;
+}
+
+.events-list-win table span { font-size:12px; }
+.events-list-win table .same-start-date * { border: 0; }
+.events-list-win table tr.last-event-same-start-date,
+.events-list-win table tr.last-event-same-start-date th,
+.events-list-win table tr.last-event-same-start-date td { border-bottom: 1px solid #ccc;}
+.events-list-win table th.start-date-multiple-events { border-bottom: 1px solid #ccc; }
+
+.events-list-win table .title {
+    font-size: 150%;
+    font-weight: bold;
+}
+
+.events-list-win .pagination-events {
+  margin: 10px 0;
+  text-align: center;
+} 
+
+.expresso-calendar-container .search-field { background-color: #FFF;}
+.expresso-calendar-container .search-field input { border:none;}
+
+.ui-tabs .ui-tabs-panel { padding: 0; margin-top: 10px;}
+
+.ui-tabs #calendar_addevent_details5.ui-tabs-panel{margin-top: -3px; min-height: 323px;}
+
+.ui-tabs .ui-tabs-nav li .ui-icon-close {
+    float: right;
+    margin: 5px 5px 0 -5px;
+}
+
+.cal_day {
+    display: inline;
+    background: url("assets/day.png") no-repeat scroll center top transparent;
+    float: left;
+    height: 95px;
+    margin: 0 4px 4px 0 !important;
+    position: relative;
+    width: 128px;
+}
+.cal_day .day_heading {
+    color: #FFFFFF;
+    float: left;
+    font: 14px Arial;
+    height: 16px;
+    padding: 6px;
+    position: relative;
+    text-transform: uppercase;
+    width: 40px;
+}
+.cal_day .day_number {
+    clear: left;
+    color: #2B2B2B;
+    font: bold 52px Arial;
+    height: 95px;
+    text-align: center;
+    width: 100%;
+    z-index: 999;
+}
+
+
+/* Events List */
+.details-event-list {
+  background-color: #FFF;
+}
+
+/* Import and Export*/
+
+.import-export-win .ui-widget-header {
+    background: none;
+}
+
+.import-export-win .ui-tabs-nav {
+    border: none;
+    border-bottom: 1px solid #4297D7 !important;
+}
+
+.configure-calendars-win fieldset.user-calendar fieldset {
+    border:1px solid #CCC;
+    margin: 0 0 10px 0;
+    padding: 5px;
+    -moz-border-radius:5px;
+    -webkit-border-radius:5px;
+    border-radius:5px;
+}
+
+.ui-datepicker-buttonpane button.ui-datepicker-current {
+	display : none;
+}
+
+.ui_tpicker_time{
+	display : none;
+}
+.ui_tpicker_time_label{
+	display : none;
+}
+.block-vertical-toolbox .ui-datepicker-month, 
+.block-vertical-toolbox .ui-datepicker-year {
+	cursor: pointer;
+}
+/*Normaliza de todos os inputs disabled para fonte-color #333*/
+textarea:disabled, input:disabled{color: #333 !important;}
+
+
+.map-event{
+	border-style: dashed;
+	border-width: 2px;
+	border-color: #36C;
+	background-color: transparent;
+	color: black;
+}
+
+
+#new_event_map .map-event .fc-event-head.fc-event-skin,.fc-event-inner.fc-event-skin{
+	border-color: transparent;
+}
+
+#new_event_map .map-event .fc-event-head,#new_event_map .map-event .fc-event-content{
+	color: transparent;
+}
+
+.folder-tab-new-msgs-number{
+	font-weight: bold;
+	color: red;
+}
+
+a.menus-command span{
+	display: inline !important;
+	font-size: 20px;
+	position: relative !important;
+	top: -5;
+	left: 10;
+}
+
+ul li span.folder span.float-menu{
+	float : auto;
+	position : fixed;
+	border-radius: 5px;
+	background-color : white;	
+	border : 1px solid gray;
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/label.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/label.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/label.css	(revision 7210)
@@ -0,0 +1,131 @@
+.label-configure-win fieldset { border: 1px solid #CCC; border-radius:5px; margin:5px;}
+.label-configure-win legend { color: #707070; }
+.label-configure-win ul{text-align:left; margin: 0; padding: 0;}
+
+#windowLabels.label-configure-win { margin: 5px; padding:0;}
+.label-configure-win .input-nome { width: 135px; outline:0; background:#FFF;}
+.label-configure-win .lebals-colorpicker { border: 1px solid #CCC; height: 210px; } 
+.label-configure-win .label-conf { float: left;}
+.label-configure-win .buttons { float:right; margin:5px 5px 0 0; }
+.label-configure-win .button-close-window { float:right; margin:6px 5px 0 0; }
+.label-configure-win .colorpicker { float: right; margin: 0 30px 0 0; } 
+.label-configure-win .preview-label-inner { margin: 2px 0 0 10px; float: left; }
+
+.label-configure-win .preview-label-outer { 
+	margin: 5px; 
+	float:left; 
+	width: 151px; 
+	height: 20px;  
+	margin: 20px 0 0 130px; 
+	-moz-border-radius: 4px; 
+	-webkit-border-radius: 4px; 
+	border: 1px solid #333;
+}
+.label-configure-win .colorwell { margin: 0; outline: 0; width: 151px; }
+.label-configure-win .label-cor { float:left; width: 130px;} 
+.label-configure-win .imgTriangle { width: 5px; height: 5px; background: #333;}
+
+.acc-list {
+	font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; 
+	font-size:11px;
+	color:#555; 
+}
+
+.acc-list h3{
+	font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; 
+	font-size:11px; 
+	color:#555; 
+	margin:0; 
+	padding:5px 3px; 
+	background-color:#fff;
+}
+
+.acc-list ul{ margin:5px 0;}
+.acc-list ul li{ border-radius:3px; padding:3px;}
+.label-configure-win .acc-list ul li:hover {background-color:#DDD;}
+.label-configure-win .acc-list ul li.active {background-color:#EB8F00;}
+.label-configure-win .acc-list ul li strong {display:block;}
+.label-configure-win .acc-list ul li em {display:block;}
+
+.label-configure-win .configure-label-content {
+	width:590px;
+	height:335px;
+	float:left;
+	border: 1px solid #A6C9E2; 
+	margin:2px 0 0 0;
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px;
+}
+.label-configure-win .acc-list.list-label-content{
+	width:190px;
+	height:368px;
+	float:left;
+	margin:2px 10px 0 5px;
+	border: 1px solid #A6C9E2;
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px;
+}
+.label-configure-win .acc-list.list-label{
+	width:150px; 
+	height:70%; 
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px; 
+	margin:10px 0 0 0;
+}
+
+.label-configure-win .label-list-container .label-list { overflow: auto; height: 293px; margin:0px;}
+.label-configure-win .label-list-container .label-list li{ background: #FFF; margin:3px 2px 0 2px; border:1px solid #CCC; width: 162px; height:18px;}
+.label-configure-win .label-list-container .label-list .acc-list ul li{ border-radius:3px; padding:2px;}
+.label-configure-win .label-list-container .label-list li:hover { cursor:pointer; background:#ECEDFF}
+.label-configure-win .label-list-container .label-list li.empty-item { border:0px;}
+.label-configure-win .label-list-container .label-list li.empty-item:hover { cursor : auto; background:white;}
+.label-configure-win .label-list li .button { display:none;}
+.label-configure-win .label-list li:hover .button { display:block; }
+
+#MyMarckersList.list-label .my-labels {	
+	margin: 10px 0 0 20px; 
+	text-align:left; 
+	position: relative; 
+}
+#MyMarckersList.list-label .title-my-labels {
+	margin:0 0 0 5px; 	
+	font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; 
+	font-size:11px;
+	color:#000000; 
+	cursor:pointer;
+}
+#MyMarckersList.list-label .title-my-labels:hover {	
+	color:red !important;	
+	text-decoration: none !important;
+}
+#MyMarckersList.list-label .status-list-labels{display:inline-block; position: absolute;}
+#MyMarckersList.list-label ul {height: auto; margin: 5px 0 0 6px; padding:0; list-style:none; }
+#MyMarckersList.list-label.acc-list ul li{ border-radius:3px;  padding:2px 2px 3px 2px;}
+
+#MyMarckersList.list-label li.label-item{ 
+	cursor:pointer; 
+	background: #FFF; 
+	margin:2px 2px 0 12px; 
+	border:1px solid #CCC; 
+	width: 150px; 
+	height:13px; 
+}
+
+.label-configure-win .insert-label{width: 200px; outline:0; background:#FFF;}
+.label-configure-win .attendee-list-add fieldset { height:15px; width: 178px; background:#FFF; margin:5px 2px 20px 2px;}
+.label-configure-win .attendee-list-add fieldset .insert-label{ width:130px; border:#FFF; outline: 0 none; margin:0; }
+.label-configure-win .color-suggestions { margin: 10px 0 30px 0; }
+.label-configure-win .form-item { margin: 5px 0;}
+.label-configure-win .selectedDefault { background: #fed4b4; border: 1px solid #fb8c37; -moz-border-radius: 5px; -webkit-border-radius:5px; }
+.label-configure-win .edit-value-list { opacity:0.65; margin-top:0; width:115px;}
+
+#listMarkers{width: 800px !important;}
+.label-configure-win .add-label-button { float:right; cursor: pointer; }
+
+.configure-zebra-dialog {z-index:1007 !important;}
+
+span.removeLabeled {margin:0 5px 0 5px;font-weight: bold; float:right;}
+span.removeLabeled:hover {color: #CCC;}
+
+span.removeLabeledMsg {margin:0 5px 0 5px;font-weight: bold;}
+span.removeLabeledMsg:hover {cursor: pointer;}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/style.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/style.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/style.css	(revision 7210)
@@ -0,0 +1,474 @@
+/* 
+	Document   : style.css
+	Created on : 10/09/2011, 10:13:12
+	Author     : prognus
+	Description: contains all styles related to elements look-and-feel
+*/
+body{
+  font-family: Lucida Grande, Lucida Sans, Arial, sans-serif !important;
+  font-size:  0.8em !important;
+}
+
+#tabs {
+	background-color: transparent;
+}
+
+#tabs ul.ui-tabs-nav li .tab-close{
+  margin: 5px 5px 0 -5px;
+}
+
+#tabs ul.ui-tabs-nav li a{
+  cursor: pointer;
+}
+
+.tip { line-height: 1.3em; }
+
+
+.expresso-calendar-container a {
+	text-decoration: none; 
+}
+.expresso-calendar-container ul, 
+.expresso-calendar-container dl, 
+.expresso-calendar-container ol { 
+	margin: 5px 0; padding: 0; 
+	list-style: none;
+}
+.expresso-calendar-container #trash {
+	color: #ADADAD;
+}
+.expresso-calendar-container #trash.empty {
+	background-image: url(../img/trash-empty.png);
+	background-repeat: no-repeat;
+	background-position: bottom center;
+}
+
+.expresso-calendar-container #trash.full {
+	background-image: url(../img/trash-full.png);
+	background-repeat: no-repeat;
+	background-position: bottom center;
+}
+
+.expresso-calendar-container #trash label {
+	display: none;
+}
+
+.ui-dialog { padding: 0; }
+.ui-dialog .ui-dialog-content { background-color: #fff; }
+.ui-dialog .ui-dialog-title { margin:0; }
+.ui-dialog .ui-button-text-only .ui-button-text { padding: 0.4em 1em; }
+
+.new-event-win fieldset { border: none;	margin: 0; padding: 0; }
+.new-event-win fieldset.tab-level2 { padding: 0px 5px; min-height: 310px; max-height: 310px; overflow: auto;}
+.new-event-win .overflow_add_calender { overflow: auto; max-height: 320px; }
+.new-event-win fieldset#calendar_addevent_details7 { overflow: hidden}
+.new-event-win fieldset#calendar_addevent_details5 .button-files-upload{margin: 15px 0 0 0}
+.new-event-win fieldset fieldset, .new-event-win fieldset.tab-level2 fieldset { padding: 5px 0; }
+
+.hidden {
+	display: none;
+	visibility: hidden;
+}
+
+.header-menu-container, .footer-menu-container,
+.menu-container.header-container, .menu-container.footer-container {
+	display:block;
+	width: 100%;
+	margin: 0;
+	padding: 10px 0;
+	background-color: #E0EEEE;
+	text-align: right;
+}
+
+.preferences-win .header-menu-container,
+.configure-calendars-win .header-menu-container {
+	margin: -10px 0 10px;
+}
+
+.preferences-win .header-menu-container,
+.configure-calendars-win .header-menu-container {
+	-moz-box-shadow: 0 3px 4px #AAAAAA;
+	-webkit-box-shadow: 0 3px 4px #AAAAAA;
+	box-shadow: 0 3px 4px #AAAAAA;
+}
+
+.preferences-win .footer-menu-container,
+.configure-calendars-win .footer-menu-container {
+	margin: 10px 0 10px;
+}
+
+.preferences-win .footer-menu-container,
+.configure-calendars-win .footer-menu-container {
+	-moz-box-shadow: 0 3px 4px #AAAAAA;
+	-webkit-box-shadow: 0 3px 4px #AAAAAA;
+	box-shadow: 0 3px 4px #AAAAAA;
+}
+
+.ui-dialog .ui-dialog-content { padding: 0; }
+.new-event-win div.div-addevent { padding: 0; width: 700px; border: 0;}
+.new-event-win form.form-addevent { padding: 9px; }
+
+.expresso-calendar-container input[type="text"] { height: 18px; }
+.expresso-calendar-container input[type="text"], 
+.expresso-calendar-container textarea, 
+.expresso-calendar-container select {
+	border: 1px solid #CFCFCF;
+	font-size: 12px;
+	height: 20px;
+}
+
+.expresso-calendar-container textarea, 
+.expresso-calendar-container select { 
+/*	vertical-align: super; */
+	vertical-align: middle; 
+}
+
+.expresso-calendar-container input.date, 
+.expresso-calendar-container input.time { 
+	width:80px; 
+}
+
+.expresso-calendar-container input.h1,
+.new-event-win input.h1 {
+	font-size: 150%;
+	font-weight: bold;
+	width: 64%;
+	height: 150%;
+}
+
+.new-event-win textarea {
+	width:600px;
+	height: 210px;
+	border: 1px solid #CFCFCF;
+	padding: 0px;
+}
+
+span.input-group { display: block; }
+/*p.input-group label { vertical-align: top; }*/
+.new-event-win p.input-group label { display: inline-block; width: 65px;}
+.new-event-win p.input-group label.input-group { display: inline-block; width: 110px; font-weight: bold;}
+
+input.number {text-align: right}
+input.input-tiny, input.tiny {width: 40px;}
+input.input-small, input.small {width: 80px;}
+input.input-medium, input.medium {width: 160px;}
+input.input-large, input.large {width: 260px;}
+
+label.label-tiny, label.tiny {width: 40px;}
+label.label-small, label.small {width: 80px;}
+label.label-medium, label.medium {width: 160px;}
+label.label-large, label.large {width: 260px;}
+
+select.select-tiny, select.tiny {width: 40px;}
+select.select-small, select.small {width: 80px;}
+select.select-medium, select.medium {width: 160px;}
+select.select-large, select.large {width: 260px;}
+
+.new-event-win fieldset.event-repeat-container label, 
+.new-event-win p.input-group.event-repeat-weekly label, 
+.new-event-win p.input-group.event-repeat-monthly label {
+	width: auto; 
+}
+
+.new-event-win fieldset.input-field-rounded,
+.new-event-win fieldset.search-field,
+.new-event-win fieldset.block-add-attendee-permissions,
+.new-event-win fieldset.block-attendee-list {
+	border:1px solid #CFCFCF;
+}
+
+.new-event-win fieldset.block-attendee-list { width: 300px; max-height:180px; padding: 5px; float: left;}
+.new-event-win fieldset.block-attendee-list ul {  height:160px; overflow: auto;}
+
+
+/* # add attendee */
+
+#tabs.ui-widget-content {
+	border:none;
+}
+#tabs .ui-widget-header {
+	background: none;
+	background-image: none;
+	border: none;
+	border-bottom: 1px solid #4297D7;
+	margin-bottom: 5px;
+}
+
+#calendar.ui-tabs-panel {
+	padding: 0;
+}
+
+.mini-calendar .ui-datepicker { width: auto; background: none repeat scroll 0 0 transparent; }
+.mini-calendar .ui-datepicker  table{width:190px;}
+.mini-calendar .ui-widget-content {	border: none; background-color: transparent; }
+.mini-calendar .ui-widget-header { background: transparent; color: #000; border: 0 none;}
+
+/* fc custumize */
+
+.blocked-event div, .blocked-event-permision div{
+background: -moz-linear-gradient(-45deg,  rgba(0,0,0,0) 0%, rgba(0,0,0,0) 1%, rgba(0,0,0,0.1) 5%, rgba(0,0,0,0) 9%, rgba(0,0,0,0) 13%, rgba(0,0,0,0.1) 17%, rgba(0,0,0,0) 21%, rgba(0,0,0,0) 25%, rgba(0,0,0,0.1) 29%, rgba(0,0,0,0) 33%, rgba(0,0,0,0) 37%, rgba(0,0,0,0.1) 41%, rgba(0,0,0,0) 45%, rgba(0,0,0,0) 49%, rgba(0,0,0,0.1) 53%, rgba(0,0,0,0) 57%, rgba(0,0,0,0) 61%, rgba(0,0,0,0.1) 65%, rgba(0,0,0,0) 69%, rgba(0,0,0,0) 73%, rgba(0,0,0,0.1) 77%, rgba(0,0,0,0.01) 81%, rgba(0,0,0,0) 85%, rgba(0,0,0,0.1) 89%, rgba(0,0,0,0) 93%, rgba(0,0,0,0) 97%, rgba(0,0,0,0) 100%); /* FF3.6+ */
+background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(1%,rgba(0,0,0,0)), color-stop(5%,rgba(0,0,0,0.1)), color-stop(9%,rgba(0,0,0,0)), color-stop(13%,rgba(0,0,0,0)), color-stop(17%,rgba(0,0,0,0.1)), color-stop(21%,rgba(0,0,0,0)), color-stop(25%,rgba(0,0,0,0)), color-stop(29%,rgba(0,0,0,0.1)), color-stop(33%,rgba(0,0,0,0)), color-stop(37%,rgba(0,0,0,0)), color-stop(41%,rgba(0,0,0,0.1)), color-stop(45%,rgba(0,0,0,0)), color-stop(49%,rgba(0,0,0,0)), color-stop(53%,rgba(0,0,0,0.1)), color-stop(57%,rgba(0,0,0,0)), color-stop(61%,rgba(0,0,0,0)), color-stop(65%,rgba(0,0,0,0.1)), color-stop(69%,rgba(0,0,0,0)), color-stop(73%,rgba(0,0,0,0)), color-stop(77%,rgba(0,0,0,0.1)), color-stop(81%,rgba(0,0,0,0.01)), color-stop(85%,rgba(0,0,0,0)), color-stop(89%,rgba(0,0,0,0.1)), color-stop(93%,rgba(0,0,0,0)), color-stop(97%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0))); /* Chrome,Safari4+ */
+background: -webkit-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* Chrome10+,Safari5.1+ */
+background: -o-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* Opera 11.10+ */
+background: -ms-linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* IE10+ */
+background: linear-gradient(-45deg,  rgba(0,0,0,0) 0%,rgba(0,0,0,0) 1%,rgba(0,0,0,0.1) 5%,rgba(0,0,0,0) 9%,rgba(0,0,0,0) 13%,rgba(0,0,0,0.1) 17%,rgba(0,0,0,0) 21%,rgba(0,0,0,0) 25%,rgba(0,0,0,0.1) 29%,rgba(0,0,0,0) 33%,rgba(0,0,0,0) 37%,rgba(0,0,0,0.1) 41%,rgba(0,0,0,0) 45%,rgba(0,0,0,0) 49%,rgba(0,0,0,0.1) 53%,rgba(0,0,0,0) 57%,rgba(0,0,0,0) 61%,rgba(0,0,0,0.1) 65%,rgba(0,0,0,0) 69%,rgba(0,0,0,0) 73%,rgba(0,0,0,0.1) 77%,rgba(0,0,0,0.01) 81%,rgba(0,0,0,0) 85%,rgba(0,0,0,0.1) 89%,rgba(0,0,0,0) 93%,rgba(0,0,0,0) 97%,rgba(0,0,0,0) 100%); /* W3C */
+filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
+}
+
+.blocked-event-permision {cursor: hand}
+
+.fc-state-default .fc-button-effect span {
+    background: none;
+    border:none;
+}
+
+.fc-header-title h2 {
+    color:#555;
+}
+.fc-state-default, .fc-state-default .fc-button-inner {
+    color: #555555;
+    text-transform: capitalize;
+}
+
+.fc-state-active, .fc-state-active .fc-button-inner {
+    color: #FFFFFF;
+}
+
+.block-vertical-toolbox .button.add {
+    width:190px;
+}
+
+.fc-header .fc-state-active, .fc-header .ui-state-active {
+    z-index: auto;
+}
+
+.fc-year-monthly-header {
+    font-weight: bold;    
+}
+
+.fc-year-have-event {
+    background: none repeat scroll 0 0 transparent !important;
+    
+}
+.fc-year-have-event .fc-day-number {
+    background: #F3F3F3;
+    box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
+    border-color: #CCC #BBB #AAA;
+    border-style: solid;
+    border-width: 1px;
+    border-radius: 4px;
+    -moz-border-radius:4px;
+    -webkit-border-radius:4px;
+}
+
+.fc-year-main-table div:hover .fc-day-number  {
+	cursor: pointer;
+	font-weight: bold;
+}
+
+/* preferences */
+
+.expresso-calendar-container h3 {
+    border-bottom: 2px solid #E17009;
+    font-size: 170%;
+    margin-bottom: 10px;
+    padding-bottom: 2px;
+}
+
+.expresso-calendar-container fieldset legend {/*font-size:1.3em;*/ font-weight:bold;}
+
+.preferences-win a {
+  text-decoration: underline;
+  font-weight:bold;
+  font-size:1.05em;
+  cursor:pointer;
+}
+
+.preferences-win ul li {list-style: none;}
+
+
+.preferences-win fieldset {
+  border:1px solid #CFCFCF;
+}
+
+.preferences-win fieldset.no-legend {
+    margin: 0;
+    padding: 5px 0;
+    border: none;
+}
+
+.preferences-win hr {
+  margin: 10px 0;
+  padding: 0 10px;
+  /*background:#FFFF85;
+  border: 1px solid #FFE74D;*/
+}
+
+.preferences-win #preferences_especific_calendar_details fieldset {
+  border: 0 none;
+}
+
+
+/* Geral */
+fieldset.background-fields {
+  background:#FFFF85;
+  border: 2px solid #FFE74D;
+  -moz-border-radius: 15px;
+  -webkit-border-radius: 15px;
+}
+
+.button.small.ui-button-text-only .ui-button-text {
+    font-size: 0.9em;
+    padding: 0.1em 0.6em;
+}
+
+.attendees-list dd.attedee-organizer {
+	border-bottom: 1px solid #BFBFBF;
+	margin-bottom: 5px;
+}
+
+/* Events List */
+.events-list-win th, .events-list-win td {
+  padding: 15px 0px 15px 0;
+  vertical-align: middle;
+  border-bottom: 1px solid #ccc;
+}
+
+.events-list-win .last-row th, .events-list-win .last-row td {
+  border-bottom: 1px solid #ccc;
+}
+
+.events-list-win table {
+  width: 100%;
+  float: left;
+}
+
+.events-list-win table a {
+  color: rgb(48, 72, 126) !important;
+  cursor: pointer;
+}
+
+.events-list-win table img {
+  width: 12px;
+  height: 12px;
+  padding: 0 2px;
+}
+
+.events-list-win table span { font-size:12px; }
+.events-list-win table .same-start-date * { border: 0; }
+.events-list-win table tr.last-event-same-start-date,
+.events-list-win table tr.last-event-same-start-date th,
+.events-list-win table tr.last-event-same-start-date td { border-bottom: 1px solid #ccc;}
+.events-list-win table th.start-date-multiple-events { border-bottom: 1px solid #ccc; }
+
+.events-list-win table .title {
+    font-size: 150%;
+    font-weight: bold;
+}
+
+.events-list-win .pagination-events {
+  margin: 10px 0;
+  text-align: center;
+} 
+
+.expresso-calendar-container .search-field { background-color: #FFF;}
+.expresso-calendar-container .search-field input { border:none;}
+
+.ui-tabs .ui-tabs-panel { padding: 0; margin-top: 10px;}
+
+.ui-tabs .ui-tabs-nav li .ui-icon-close {
+    float: right;
+    margin: 5px 5px 0 -5px;
+}
+
+.cal_day {
+    display: inline;
+    background: url("assets/day.png") no-repeat scroll center top transparent;
+    float: left;
+    height: 95px;
+    margin: 0 4px 4px 0 !important;
+    position: relative;
+    width: 128px;
+}
+.cal_day .day_heading {
+    color: #FFFFFF;
+    float: left;
+    font: 14px Arial;
+    height: 16px;
+    padding: 6px;
+    position: relative;
+    text-transform: uppercase;
+    width: 40px;
+}
+.cal_day .day_number {
+    clear: left;
+    color: #2B2B2B;
+    font: bold 52px Arial;
+    height: 95px;
+    text-align: center;
+    width: 100%;
+    z-index: 999;
+}
+
+
+/* Events List */
+.details-event-list {
+  background-color: #FFF;
+}
+
+/* Import and Export*/
+
+.import-export-win .ui-widget-header {
+    background: none;
+}
+
+.import-export-win .ui-tabs-nav {
+    border: none;
+    border-bottom: 1px solid #4297D7 !important;
+}
+
+.configure-calendars-win fieldset.user-calendar fieldset {
+    border:1px solid #CCC;
+    margin: 0 0 10px 0;
+    padding: 5px;
+    -moz-border-radius:5px;
+    -webkit-border-radius:5px;
+    border-radius:5px;
+}
+
+.ui-datepicker-buttonpane button.ui-datepicker-current {
+	display : none;
+}
+
+.ui_tpicker_time{
+	display : none;
+}
+.ui_tpicker_time_label{
+	display : none;
+}
+.block-vertical-toolbox .ui-datepicker-month, 
+.block-vertical-toolbox .ui-datepicker-year {
+	cursor: pointer;
+}
+/*Normaliza de todos os inputs disabled para fonte-color #333*/
+textarea:disabled, input:disabled{color: #333 !important;}
+
+
+.map-event{
+	border-style: dashed;
+	border-width: 2px;
+	border-color: #36C;
+	background-color: transparent;
+	color: black;
+}
+
+
+#new_event_map .map-event .fc-event-head.fc-event-skin,.fc-event-inner.fc-event-skin{
+	border-color: transparent;
+}
+
+#new_event_map .map-event .fc-event-head,#new_event_map .map-event .fc-event-content{
+	color: transparent;
+}
+
+input.inputNumber {width:80px; text-align: left;}
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/followupflag.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/followupflag.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/followupflag.css	(revision 7210)
@@ -0,0 +1,297 @@
+.followupflag-configure-win { width:533px; height:411px !important;  padding:0 !important;} 
+.followupflag-container { 
+	width:520px; 
+	height:398px; 
+	border: 1px solid #A6C9E2; 
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px; 
+	margin:5px;
+}
+
+.followupflag-configure-win .followupflag-container  fieldset{border: 1px solid #CCC; border-radius:5px; margin:5px;}
+.followupflag-configure-win .followupflag-container  legend {color: #707070; font-weight:bold;}
+
+.followupflag-configure-win .followupflag-configure button { height:20px; margin: 0; top:4px; }
+.followupflag-container .followupflag-configure { float: left; width: 270px }
+.followupflag-container .followupflag-configure .label-name{display: block;}
+
+.followupflag-container .alarm-fields{ display: block; margin-top:15px; width:265px;}
+.followupflag-container .date,
+.followupflag-container .time{ -moz-border-radius: 5px; -webkit-border-radius: 5px; outline: 0; }
+.followupflag-container .alarm-datetime-fields {float:right;}
+.followupflag-container .completed-followup{margin-top:6px;}
+
+.followupflag-container .right-data {margin: 5px 0; width: 195px; float: right;}
+.followupflag-container .right-data label {display: block;}
+
+.followupflag-container .date-begin { 
+	margin: 0 0 5px 44px; 
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px; 
+	outline: 0; 
+}
+
+.followupflag-container .date-conclusion { 
+	margin: 0 0 0 16px; 
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px; 
+	 outline: 0; 
+ }
+.followupflag-container .followupflag-color.sample-list .sample-item { padding: 5px; margin:0 5px; }
+
+.followupflag-container .followupflag-color.sample-list .sample-item.selected { 
+	background: #fed4b4; 
+	border: 1px solid #fb8c37; 
+	-moz-border-radius: 5px; 
+	-webkit-border-radius:5px; 
+}
+
+.left-seletor-flag { float: left; margin: 3px 20px 3px 0; }
+.color-followup-flag { float: left; width: 400px; }
+.form-item { margin: 5px 0;}
+.flag-label { float: left; margin: 0 5px 0 0; } 
+.followupflag-container .background-color  {margin:0; outline: 0; width: 100px; -moz-border-radius: 5px; -webkit-border-radius:5px; float: left; }
+.flag-edit { background: #00820F; width: 8px; height: 6px; float:left; margin: 4px 0 -3px 5px; }
+.flag-edited{ width: 8px; height: 6px; }
+.colorpicker { float: right; margin: -15px 0 0 0; }
+
+.delete_followupflag{float:right; position:absolute; right:5px; top:2px;}
+.delete_followupflag:hover{border:1px solid #2E6E9E; background-color:#FFFFFF; -moz-border-radius: 5px; -webkit-border-radius:5px; width: 16px; height: 16px;}
+
+.followupflag-configure-win .followupflag-container .menu-configure-followupflag{ 
+	position:absolute; 
+	bottom:14px; 
+	right:10px; 
+	background:transparent; 
+	width:auto; 
+	margin:0;
+	padding:0;
+}
+
+.ZebraDialog.followupflag-alarm {}
+.ZebraDialog.followupflag-alarm  fieldset{border:none; margin:0; padding:3px 0;}
+.ZebraDialog.followupflag-alarm  fieldset input{margin-left:0; padding-left:3px 0;}
+.ZebraDialog.followupflag-alarm .message-list{overflow-x: hidden; overflow-y: auto; height: 70px; list-style:none; padding-left:10px;}
+.ZebraDialog.followupflag-alarm .message-list li{width: 270px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis; cursor: pointer;}
+.ZebraDialog.followupflag-alarm .message-list li:hover{ text-decoration: underline;}
+.ZebraDialog.followupflag-alarm  .display-option { color:#2363a4; cursor: pointer;}
+
+/*Antigo label.css*/
+.label-configure-win fieldset { border: 1px solid #CCC; border-radius:5px; margin:5px;}
+.label-configure-win legend { color: #707070; }
+.label-configure-win ul{text-align:left; margin: 0; padding: 0;}
+
+#windowLabels.label-configure-win { margin: 5px; padding:0;}
+.label-configure-win .input-nome { width: 135px; outline:0; background:#FFF;}
+.label-configure-win .lebals-colorpicker { border: 1px solid #CCC; height: 210px; } 
+.label-configure-win .label-conf { float: left;}
+.label-configure-win .buttons { float:right; margin:5px 5px 0 0; }
+.label-configure-win .button-close-window { float:right; margin:6px 5px 0 0; }
+.label-configure-win .colorpicker { float: right; margin: 0 30px 0 0; } 
+.label-configure-win .preview-label-inner { margin: 2px 0 0 10px; float: left; }
+
+.label-configure-win .preview-label-outer { 
+	margin: 5px; 
+	float:left; 
+	width: 151px; 
+	height: 20px;  
+	margin: 20px 0 0 130px; 
+	-moz-border-radius: 4px; 
+	-webkit-border-radius: 4px; 
+	border: 1px solid #333;
+}
+.label-configure-win .colorwell { margin: 0; outline: 0; width: 151px; }
+.label-configure-win .label-cor { float:left; width: 130px;} 
+.label-configure-win .imgTriangle { width: 5px; height: 5px; background: #333;}
+
+.acc-list {
+	font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; 
+	font-size:11px;
+	color:#555; 
+}
+
+.acc-list h3{
+	font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; 
+	font-size:11px; 
+	color:#555; 
+	margin:0; 
+	padding:5px 3px; 
+	background-color:#fff;
+}
+
+.acc-list ul{ margin:5px 0;}
+.acc-list ul li{ border-radius:3px; padding:3px;}
+.label-configure-win .acc-list ul li:hover {background-color:#DDD;}
+.label-configure-win .acc-list ul li.active {background-color:#EB8F00;}
+.label-configure-win .acc-list ul li strong {display:block;}
+.label-configure-win .acc-list ul li em {display:block;}
+
+.label-configure-win .configure-label-content {
+	width:590px;
+	height:335px;
+	float:left;
+	border: 1px solid #A6C9E2; 
+	margin:2px 0 0 0;
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px;
+}
+.label-configure-win .acc-list.list-label-content{
+	width:190px;
+	height:368px;
+	float:left;
+	margin:2px 10px 0 5px;
+	border: 1px solid #A6C9E2;
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px;
+}
+.label-configure-win .acc-list.list-label{
+	width:150px; 
+	height:70%; 
+	-moz-border-radius: 5px; 
+	-webkit-border-radius: 5px; 
+	margin:10px 0 0 0;
+}
+
+.label-configure-win .label-list-container .label-list { overflow: auto; height: 293px; margin:0px;}
+.label-configure-win .label-list-container .label-list li{ background: #FFF; margin:3px 2px 0 2px; border:1px solid #CCC; width: 162px; height:18px;}
+.label-configure-win .label-list-container .label-list .acc-list ul li{ border-radius:3px; padding:2px;}
+.label-configure-win .label-list-container .label-list li:hover { cursor:pointer; background:#ECEDFF}
+.label-configure-win .label-list-container .label-list li.empty-item { border:0px;}
+.label-configure-win .label-list-container .label-list li.empty-item:hover { cursor : auto; background:white;}
+.label-configure-win .label-list li .button { display:none;}
+.label-configure-win .label-list li:hover .button { display:block; }
+
+#MyMarckersList.list-label .my-labels {	
+	margin: 10px 0 0 20px; 
+	text-align:left; 
+	position: relative; 
+}
+#MyMarckersList.list-label .title-my-labels {
+	margin:0 0 0 5px; 	
+	font-family: Lucida Grande,Lucida Sans,Arial,sans-serif; 
+	font-size:11px;
+	color:#000000; 
+	cursor:pointer;
+}
+#MyMarckersList.list-label .title-my-labels:hover {	
+	color:red !important;	
+	text-decoration: none !important;
+}
+#MyMarckersList.list-label .status-list-labels{display:inline-block; position: absolute;}
+#MyMarckersList.list-label ul {height: auto; margin: 5px 0 0 6px; padding:0; list-style:none; }
+#MyMarckersList.list-label.acc-list ul li{ border-radius:3px;  padding:2px 2px 3px 2px;}
+
+#MyMarckersList.list-label li.label-item{ 
+	cursor:pointer; 
+	background: #FFF; 
+	margin:2px 2px 0 12px; 
+	border:1px solid #CCC; 
+	width: 150px; 
+	height:13px; 
+}
+
+.label-configure-win .insert-label{width: 200px; outline:0; background:#FFF;}
+.label-configure-win .attendee-list-add fieldset { height:15px; width: 178px; background:#FFF; margin:5px 2px 20px 2px;}
+.label-configure-win .attendee-list-add fieldset .insert-label{ width:130px; border:#FFF; outline: 0 none; margin:0; }
+.label-configure-win .color-suggestions { margin: 10px 0 30px 0; }
+.label-configure-win .form-item { margin: 5px 0;}
+.label-configure-win .selectedDefault { background: #fed4b4; border: 1px solid #fb8c37; -moz-border-radius: 5px; -webkit-border-radius:5px; }
+.label-configure-win .edit-value-list { opacity:0.65; margin-top:0; width:115px;}
+
+#listMarkers{width: 800px !important;}
+.label-configure-win .add-label-button { float:right; cursor: pointer; }
+
+.configure-zebra-dialog {z-index:1007 !important;}
+
+span.removeLabeled {margin:0 5px 0 5px;font-weight: bold; float:right;}
+span.removeLabeled:hover {color: #CCC;}
+
+span.removeLabeledMsg {margin:0 5px 0 5px;font-weight: bold;}
+span.removeLabeledMsg:hover {cursor: pointer;}
+
+.freeow .gray:hover .background {
+    border-color: #BBB;
+}
+.minimize-alarm {
+	background: url("../img/minimizar.png") no-repeat scroll 0 0 transparent;
+	height: 16px;
+    position: relative;
+    width: 16px;
+	float:right; 
+	margin-right:5px;
+}
+.maximize-alarm {
+	background: url("../img/maximizar.png") no-repeat scroll 0 0 transparent;
+	height: 16px;
+    position: relative;
+    width: 16px;
+	float:right; 
+	margin-right:5px;
+}
+.content-alarm ul {
+	max-height: 100px;
+	overflow: auto;
+}
+.content-alarm {
+	margin-top: 5px;
+}
+.title-alarm {
+    margin-left: 90px;
+	font-size: 16px;
+}
+.alert-options {
+	border: none;
+}
+.confirm-alarm {
+	float:right;
+}
+.freeow .gray h2 {
+	font-size: 12px;
+}
+.freeow {
+	width: 325px;
+}
+.freeow .gray .content {
+	margin: 5px;
+}
+.freeow .gray .background {
+	background-color: #fafafa;
+	border: 2px solid #BBB;
+}
+.freeow .content {
+	margin: 5px;
+}
+
+.filtersDeadline .img_title {
+	background: url("../img/email.png") no-repeat scroll 0 0 transparent;
+	height: 20px;
+    position: absolute;
+    width: 20px;
+	float:left; 
+	margin-left:40px;
+	top: 7px;
+}
+.alarmDeadline .img_title {
+	background: url("../img/flagDefault4.png") no-repeat scroll 0 0 transparent;
+	height: 10px;
+    position: absolute;
+    width: 10px;
+	float:left; 
+	margin-left:42px;
+	top: 11px;
+}
+.doneDeadline .img_title {
+	background: url("../img/flagDone.png") no-repeat scroll 0 0 transparent;
+	height: 10px;
+    position: absolute;
+    width: 10px;
+	float:left; 
+	margin-left:43px;
+	top: 11px;
+}
+.search-result-item { 
+	border: none;
+}
+.td-label-search {
+	border: none;
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/reset.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/reset.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/reset.css	(revision 7210)
@@ -0,0 +1,240 @@
+/*
+ * Este arquivo limpa o estilo para a nova agenda, sobrescrevendo o código CSS
+ * do Expresso.
+ * Deve ser removido quando o módulo Calendar não integrar mais a versão 2.x
+ */
+
+/* Eric Meyer's Reset Reloaded based
+ * http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
+ */
+
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	font-weight: inherit;
+	font-style: inherit;
+	/*font-size: 100%;*/
+	/*font-family: inherit;*/
+	/*vertical-align: baseline;*/
+/*	font-family: Arial,Helvetica,sans-serif;*/
+}
+
+:focus {
+	outline: 0;
+}
+body {
+	line-height: 1;
+	color: black;
+	background: white;
+}
+ol, ul {
+	list-style: none;
+}
+
+table {
+	border-collapse: separate;
+	border-spacing: 0;
+}
+caption, th, td {
+	/*text-align: left;*/
+	font-weight: normal;
+}
+blockquote:before, blockquote:after,
+q:before, q:after {
+	content: "";
+}
+blockquote, q {
+	quotes: "" "";
+}
+
+
+select {
+    border: 1px solid #CFCFCF;
+    border-color: #CFCFCF;
+    color: #555;
+    background-color: #FFF;
+}
+a:link, a:visited {
+    color: #2E6E9E;
+}
+
+
+
+/* azul.css */
+/*body { background-color: #e9e9e9; }*/
+
+/*a:link,
+a:visited
+{ color: #000066; }*/
+
+/*a:hover,
+a:active
+{ color: #ff9933; }*/
+
+#divAppbox{
+	overflow-x: auto;
+	overflow-y: scroll;
+}
+
+.expresso-calendar-container input,
+.expresso-calendar-container button
+{ border-color: #CFCFCF; color: #555; }
+
+.expresso-calendar-container input[type=image]
+{ border-color: none; }
+
+.expresso-calendar-container select
+{ border-color: #CFCFCF; color: #555; }
+
+/*#divAppbox
+{ background: #fff url( ../images/bgBlockContent.jpg ) repeat-x; border-color: #9c9c9c; }
+
+#divAppboxHeader
+{ background: url( ../images/bgAppTitle.png ); border-color: #9c9c9c; color: #006; text-shadow: 0.2em 0.2em 3px #999; }
+
+#divAppIconBar
+{ background: #fff url( ../images/background-icon-bar.png ) repeat-x; border-top-color: #9c9c9c; }
+
+#divAppTextBar
+{ background-color: #fff; }
+
+#divGenTime
+{ color: #f00; }
+
+#divMain
+{ background: #fff; border-color: #7e7e7e; }
+
+#divPoweredBy
+{ background: #fff; color: #999; }
+
+#divSideboxContainer
+{ background: #fff; }
+
+#extraIcons
+{ background: #eee; border-color: #7e7e7e; }
+
+#links_bar,
+#user_info
+{ color: #fff; }
+
+#tdAppbox
+{ background-color: #fff; }
+
+#tdSidebox
+{ background: #fff; }*/
+
+/*.conteudo
+{ border-color: #4A79B1; color: #003; }
+
+.divSideboxHeader
+{ background: #416faa; color: #fff; }
+
+.extraIconsRow
+{ border-top-color: #ddd; }
+
+.greyLine
+{ border-top-color: #7e7e7e; }
+
+.grid_email_class
+{ border-bottom-color: #cfcfcf; }
+
+.image-menu
+{ background: url( ../../../../phpgwapi/templates/default/images/folder_bg.png ); }
+
+.last_menu
+{ border-bottom-color: #4a79b1; }
+
+.logo_expresso
+{ background: url( ../../../../phpgwapi/templates/default/images/logo_expresso.jpg ) no-repeat 0 3px; }
+
+.menu
+{ background: #c8d7ea; border-color: #f4f7fc; border-bottom-color: #4a79b1; }
+
+.menu-sel
+{ background-color: #f7f7f7; border-color: #4a79b1; color: #00f; }
+
+.menu-degrade
+{ background-image: url( ../../../../phpgwapi/templates/default/images/degrade.png ); }
+
+.navbar_but
+{ background-image: url(../../../../phpgwapi/templates/default/images/back_app.png); }
+
+.navbar_butOver
+{ background-image: url( ../../../../phpgwapi/templates/default/images/back_app_over.png ); }
+
+.navbar_butOut
+{ background-image: url( ../../../../phpgwapi/templates/default/images/back_app_out.png ); }
+
+.tblHeadApp
+{ border-color: #9c9c9c; }
+
+.textSidebox
+{ border-top-color: #aaa; }
+
+.toolbar
+{ background-image: url( ../../../../phpgwapi/templates/default/images/fundo_topo.png ); }
+
+.linha0,
+.tr_msg_read
+{ color: #3f3f3f; background: #fff; }
+
+.linha1,
+.tr_msg_read2
+{ color: #3f3f3f; background: #f4f8fb; }
+
+table.inboxElements th,
+.table_elements_tr_header,
+.info_tr_header,
+.message_header
+{
+	background: #abc6e1;
+}
+
+.prefTable
+{
+	background-color: #f4f8fb;
+	margin: 0px 0px 10px 0px ;
+	border: 1px solid #D3DCE3;
+	border-top: 0px;
+}*/
+
+
+/* base.css */
+.expresso-calendar-container select
+{ border: 1px solid; font-family:inherit; font-size: 11px; z-index: -1; }
+
+.expresso-calendar-container input,
+.expresso-calendar-container button
+{ border: 1px solid; font-family: inherit; font-size: 11px; }
+
+.expresso-calendar-container button,
+.expresso-calendar-container input[type=button],
+.expresso-calendar-container input[type=image],
+.expresso-calendar-container input[type=submit]
+{ cursor: pointer; cursor: hand; }
+
+.expresso-calendar-container input[type=image]
+{ border: 0px none; }
+
+.expresso-calendar-container select
+{ border: 1px solid; font-family: inherit; font-size: 11px; z-index: -1; }
+
+.expresso-calendar-container td
+{ font-size: 11px; }
+
+.expresso-calendar-container {
+	font-family: "Lucida Grande", "Lucida Sans", Arial, sans-serif;
+}
+
+/* azul.css */
+input, button 
+{ border-color: #CFCFCF; color: #333; }
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/main.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/main.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/main.css	(revision 7210)
@@ -0,0 +1,1474 @@
+body{overflow: hidden;}
+/* attachments list on message screen */
+.expressomail-attachments { background:#EEE; font-size:11px; width:100%; margin:0; padding:0;}
+.expressomail-attachments-label {display:block; float:left;}
+ul.expressomail-attachments-list { list-style:none; display:block; margin-left:40px;}
+ul.expressomail-attachments-list li {}
+.expressomail-attachments-link { font-size:11px;}
+
+textarea{
+    overflow:hidden;
+    height:auto;
+/*    width:18px;
+	resize: none;*/
+}
+a.rich{
+	padding : 5px;
+	cursor : pointer;
+	text-align: center;
+}
+button.adress_button {width: 47px; text-align: center;}
+span.ui-icon.expressomail-icon-read-confirmation { background-image: url(images/notification.gif) !important; background-position: 0px 0px; width: 24px; height: 24px;}
+span.ui-icon.expressomail-icon-save { background-image: url(images/disk.png) !important; background-position: 0px 2px; width: 16px; height: 16px; background-size: 13px;}
+span.ui-icon.expressomail-icon-signature { background-image: url(images/signature.gif) !important; background-position: 8px 2px; width: 24px; height: 24px; background-size: 13px;}
+span.ui-icon.expressomail-icon-encryption{ background-image: url(images/lock.png) !important; background-position: 7px 1px; width: 24px; height: 24px; background-size: 13px;}
+span.ui-icon.expressomail-icon-send { background-image: url(images/send.png) !important; background-position: -2px 2px; width: 25px; height: 16px; background-size: 19px;}
+span.ui-icon.expressomail-icon-save_and_send { background-image: url(images/save_and_send.png) !important; width: 25px; height: 16px; background-size: 17px;}
+span.ui-icon.expressomail-icon-important { background-image: url(images/important.png) !important; background-position: 7px 1px; width: 24px; height: 24px; background-size: 13px;}
+
+/* thumbs list on message screen */
+.expressomail-thumbs { font-size:11px; width:100%; max-width:100%; margin:20px 0 0 0; border-top:1px solid #AAA; float: left}
+.expressomail-thumbs-label {}
+.message_options {}
+.expressomail-thumbs span.message_tips { display:block; padding-left:18px; line-height:18px;height:18px; background-image: url(images/menu/ktip.png); background-repeat:no-repeat;}
+ul.expressomail-thumbs-list { list-style:none; margin:0; padding:0;}
+ul.expressomail-thumbs-list li {height:80px;  max-width:120px; max-height:80px; display:block; float:left; margin: 5px; padding:0;}
+ul.expressomail-thumbs-list li img {width:auto; height:100%; border: 2px solid #FDE7BC;}
+.expressomail-thumbs-link { font-size:11px;}
+.jcarousel-container { width: auto;}
+ 
+
+
+/* todo o resto */
+table.expressomail-message-body {width:100%; height:100%;}
+table.table_message, div.table_message {
+	border-top-left-radius: 0px; 
+	border-top-right-radius: 0px;
+}
+table.expressomail-message-body tr{vertical-align:top;}
+
+
+
+
+.table_message_options{
+	background-color: #000;
+	
+	/* Apenas para ie qualquer versao */
+	-moz-border-collapse: separate;
+	border-color: gray;
+
+    border-spacing: 0;
+    border-style: outset;
+    border-width: 0.01;
+    cursor: default;
+    padding: 1px;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+	
+	
+}
+
+.table_message_options_ie{
+
+	border-collapse: collapse;
+	background-color: #000;
+	border-color: gray;
+    border-spacing: 0;
+    border-style: outset;
+    border-width: 1;
+    cursor: default;
+    padding: 1px;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+	
+	
+}
+
+.table_message{
+	background-color: #000;
+	
+	/* Apenas para ie qualquer versao */
+	-moz-border-collapse: separate;
+	border-color: gray;
+	border-radius: 3px 3px 3px 3px;
+    border-spacing: 0;
+    border-style: outset;
+    border-width: 1px;
+    cursor: default;
+    padding: 1px;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+	
+	
+}
+
+.div_message_scroll { background: none repeat scroll 0% 0% WHITE; overflow: auto; padding-right: 5px;}
+a.message-attach-link { margin-left: 20px;}
+
+.messagescol td label {padding-right:20px;}
+.messagescol td.message-general-options .checkbox {margin: 5px 5px 0 0;}
+
+.ui-dialog-dragging {
+	opacity:0.4;
+	filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.context-menu-item.icon-important { background-image: url(images/important.png); background-position: 6px 5px !important}
+.context-menu-item.icon-export { background-image: url(images/export.png); }
+.context-menu-item.icon-move { background-image: url(images/move.png); }
+.context-menu-item.icon-seen { background-image: url(images/seen.gif); }
+.context-menu-item.icon-unseen { background-image: url(images/unseen.gif); }
+.context-menu-item.icon-normal { background-image: url(images/door.png); }
+.context-menu-item.icon-followupflag { background-image: url(images/door.png); }
+.context-menu-item.icon-quick-add { background-image: url(images/vcard_add.png); }
+.context-menu-item.icon-delete-box{ background-image: url(images/user_delete.png); }
+.context-menu-item.icon-quick-search-contact{ background-image: url(images/zoom.png); }
+
+
+.context-menu-item.icon-search-mail { background-image: url(images/menu/search.png); }
+.context-menu-item.icon-filter { background-image: url(images/menu/filters.png); }
+.context-menu-item.icon-edit-folder { background-image: url(images/menu/editfolders.png); }
+.context-menu-item.icon-share-mailbox { background-image: url(images/menu/usersfolders.png); }
+.context-menu-item.icon-label { background-image: url(images/menu/usersfolders.png); }
+.context-menu-item.icon-tag { background-image: url(images/menu/tag.png); background-size: 12px; background-position: 6px 2px !important;}
+.context-menu-item.icon-empty-trash { background-image: url(images/menu/trash.png); }
+.context-menu-item.icon-queue { background-image: url(images/menu/queue.png); }
+
+form.fileupload { margin: 14px 0 0 -13px; float: left; margin-bottom: -20px; }
+form.fileupload .files-list { margin-left: 5px; margin-top: -14px; padding: 0.2em 0.7em; }
+form.fileupload .files-list .delete-upload { top: 7px}
+
+div.attachments-list {
+	max-height: 130px;
+	overflow-y: auto;
+	padding-top: 5px;
+}
+
+.button-files-upload { float:left; }
+
+form.fileupload .ui-button .ui-button-text { line-height: 2; }
+form.fileupload .ui-button { margin-left: 5px; }
+form.fileupload .message-add-original-att { margin-left: 0px; }
+.button.add.button-add-attachment{margin: -9px 0 0 8px;}
+.button.upload{margin-bottom: 4px;}
+div.fileupload-buttonbar{padding: 0.2em 0.5em }
+.archive-error{color: #F00;}
+
+.progress.in-progress{width: 100px; height: 12px;}
+
+.row.fileupload-buttonbar{margin-top: -14px; padding: 0.2em 0.7em;}
+
+.archive-attach.name{width: 310px;}
+.archive-attach.name label{display: block; position: absolute; left: 136px; top: 194px;}
+.size{min-width: 65px;}
+
+.message-attach.name{width: 200px;}
+.message-attach.size{margin:0 4px 0 4px;}
+.message-attach-error{color:red;}
+
+
+/* Estilos da tela de busca rápida de contatos */
+
+.expressomail-qs-container { font-size:11px;} 
+.expressomail-qs-container legend { font-size:1.1em; font-weight: bold; } 
+.expressomail-qs-container #accordion { margin: 5px;} 
+.expressomail-qs-container fieldset, .expressomail-qs-container div {margin:0;}
+.expressomail-qs-container .ui-autocomplete-input { height:22px; width:200px; margin-right:-1px; }
+.expressomail-qs-container #wrap-progressbar { height:22px; width:122px;  float:left; }
+.expressomail-qs-container #wrap-progressbar #inner-progressbar { text-align:center; width:100px; }
+.expressomail-qs-container #wrap-progressbar #inner-progressbar span { font-size:10px; line-height:12px; }
+.expressomail-qs-container #wrap-progressbar #inner-progressbar #progressbar { width:100px; height:10px; }
+.expressomail-qs-container .clear {clear:both;}
+/*.expressomail-qs-container #fieldset1 label {width:495px;display:inline-block; border:4px solid #72A9D3;}*/
+.expressomail-qs-container fieldset { border:1px solid #AAA; border-radius:5px; margin:5px; }
+.expressomail-qs-container #ul {list-style:none; margin:0; padding:0;}
+.expressomail-qs-container #fieldset1 {color:#444;}
+.expressomail-qs-container #fieldset1 label {font-weight:bold; display:block;}
+
+.expressomail-qs-container #list-acc-users li, .expressomail-qs-container #search-result-users li {margin-right:5px;border-radius:3px;}
+.expressomail-qs-container #list-acc-mails li {margin-right:5px;padding-bottom:4px;border-radius:3px;}
+.expressomail-qs-container #list-acc-users li:hover, .expressomail-qs-container #list-acc-mails li:hover, .expressomail-qs-container #search-result-users li:hover {background-color:#DDD;}
+.expressomail-qs-container #list-acc-users li span.ui-icon, .expressomail-qs-container #list-acc-mails li span.ui-icon, .expressomail-qs-container #search-result-users li span.ui-icon {display:none; margin:2px;}
+.expressomail-qs-container #list-acc-users li input, .expressomail-qs-container #list-acc-mails li input, .expressomail-qs-container #search-result-users li input {margin-top:5px;}
+.expressomail-qs-container #list-acc-users li label, .expressomail-qs-container #list-acc-mails li label, .expressomail-qs-container #search-result-users li label {margin-top:-5px;}
+.expressomail-qs-container #list-acc-users li:hover span, .expressomail-qs-container #list-acc-mails li:hover span, .expressomail-qs-container #search-result-users li:hover span {display:inline;}
+.expressomail-qs-container #search-result-users li span.ui-icon {display:none;}
+.expressomail-qs-container .ui-icon {float:right;}
+.expressomail-qs-container #icon-bar1 .ui-icon {float:left; margin:0 3px;}
+.expressomail-qs-container #icon-bar1 span {float:left; margin:2px 3px 0 0;}
+.expressomail-qs-container .ui-icon-trash, .expressomail-qs-container .ui-icon-edit, .expressomail-qs-container .ui-icon-close, .expressomail-qs-container .ui-icon-plus, .expressomail-qs-container .ui-icon-pencil {background-color:#EEE;}
+.expressomail-qs-container .ui-icon-trash:hover, .expressomail-qs-container .ui-icon-edit:hover, .expressomail-qs-container .ui-icon-close:hover, .expressomail-qs-container .ui-icon-plus:hover, .expressomail-qs-container .ui-icon-pencil:hover {background-color:#BBB;}
+.expressomail-qs-container .ui-autocomplete-input {width:170px;}
+.expressomail-qs-container .ui-accordion .ui-accordion-content{padding:5px;}
+
+.expressomail-qs-container .foot-note {width:905px; padding:5px;margin-top:20px;border-top:1px solid #ddd;}
+.expressomail-qs-container .acc-list {font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; font-size:11px; color:#555; }
+.expressomail-qs-container .acc-list h3{font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; font-size:11px; color:#555; margin:0; padding:5px 3px; background-color:#fff;}
+.expressomail-qs-container .acc-list ul{ margin:5px 0;}
+.expressomail-qs-container .acc-list ul li{ border-radius:3px; padding:5px;}
+.expressomail-qs-container .acc-list ul li:hover {background-color:#DDD;}
+.expressomail-qs-container .acc-list ul li.active {background-color:#EB8F00;}
+.expressomail-qs-container .acc-list ul li strong {display:block;}
+.expressomail-qs-container .acc-list ul li em {display:block;}
+
+/*Específico do selectable*/
+.expressomail-qs-container #feedback { font-size: 1.4em; }
+.expressomail-qs-container #selectable .ui-selecting { background: #DDECF7; }
+/* #selectable .ui-selected { background: #F39814; color: white; }   Aqui eu troquei a cor de quando era selecionada a linha */
+.expressomail-qs-container #selectable .ui-selected { background: #72A9D3; color: white; }
+
+.expressomail-qs-container #selectable { list-style-type: none; margin: 0; padding: 0; width: 100%; }
+.expressomail-qs-container ul#selectable { overflow: hidden; width: 444px; height: 250px;}
+.expressomail-qs-container ul#selectable li { width: 435px; overflow:hidden; }
+.expressomail-qs-container ul#selectable li.ui-selected { width: 100%;  }
+.expressomail-qs-container ul#selectable li div { width: 6000px; }
+.expressomail-qs-container .ui-button-icon-only { width: 1.2em; }
+.expressomail-qs-container .ui-icon { margin-left: -8px; }
+.expressomail-qs-container .ui-widget button { border: 0 solid; } 
+
+.expressomail-qs-container .menu-control { float:right; margin-left:400px; position: absolute; z-index: 100; padding-top:5px;}
+.expressomail-qs-container .acc-list { width:444px;height:250px;float:left;border:1px solid #DDD;background-color:#EEE;border-radius:3px;margin-left:1px; margin: 10px 5px 5px 1px;}
+.expressomail-qs-container .details-container { width:300px;height:246px; float:right; margin: 5px 0;}
+
+.expressomail-qs-container .acc-list .demo {width:100%;margin-top:20px;}
+
+.dialog-modal.expressomail-qs-container  { height: 416px; padding:5px; }
+
+.ui-dialog .ui-dialog-buttonpane { padding: 0; border:none; margin: 0;}
+.expressomail-qs-container .menu-control .ui-button-text-only .ui-button-text { padding: 0.1em 0.6em; }
+
+/* search area definition */
+fieldset.search-field, fieldset.search-catalog-options {
+	border:1px solid #CFCFCF;
+	padding: 5px;
+}
+
+fieldset.search-field input, fieldset.search-catalog-options select{
+	display: inline-block;
+	border: none;
+	background-color: #FFF;
+}
+
+fieldset.search-field span {
+	display: inline-block;
+	margin:0 0 -3px 5px;
+}
+
+/* #search area definition */
+fieldset.search-field { max-width: 190px; width: 190px; margin: 0px; text-align: left; display: inline;}
+fieldset.search-field input { max-width: 165px; width: 165px; }
+
+fieldset.search-catalog-options { max-width: 124px; width: 120px; margin: 0px; text-align: left; display: inline;}
+fieldset.search-catalog-options select { max-width: 120px; width: 120px; }
+
+
+.ui-dialog .ui-dialog-titlebar-minimize {
+    height: 18px;
+    margin: -10px 0 0;
+    padding: 1px;
+    position: absolute;
+    right: 1.8em;
+    top: 50%;
+    width: 19px;
+}
+
+.ui-dialog-buttonpane .ui-button {
+	margin-top: 0;
+	padding-top: 0;
+}
+
+ 
+.button-mod { margin-top: -2.5em; }
+
+/*print.css */
+
+.print-all-messages h1 { font-size: 1.35em; }
+.print-all-messages h2 { font-size: 1.05em; }
+.print-all-messages tbody { font-size: 0.95em; }
+.print-all-messages thead td { font-weight: bold; padding: 3px; border-bottom: solid 2px #999; }
+.print-all-messages tbody td { border-bottom: solid 1px #ccc; }
+.print-all-messages img { display: none; }
+.print-all-messages input { display: none; }
+
+/*main.css */
+pre{
+	white-space: pre-wrap !important; /* css-3 */
+	white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
+	white-space: -pre-wrap !important; /* Opera 4-6 */
+	white-space: -o-pre-wrap !important; /* Opera 7 */
+	word-wrap: break-word !important; /* Internet Explorer 5.5+ */
+	font-family: monospace !important;	
+	/*font-size: 10pt !important;*/
+	font-size: 11px !important;
+}
+/** {
+	font-family: Verdana, Arial, Helvetica, sans-serif;	
+}*/
+
+.checkbox{
+	border:none !important;
+}
+
+textarea{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+
+.whiteSpace{
+	width: 2px;
+}
+
+.table_box{
+	width: 100%;
+	color: black;
+	background: #ffffff;
+	border-bottom: 1px solid #f4f8fb;
+	font-family: Verdana, Arial, Helvetica, sans-serif;;
+	font-size: 13px;
+	cursor: pointer;
+	table-layout: fixed;
+}
+
+
+
+
+.em_div_write_msg{ 
+ 	        height: 24px; 
+ 	        background: transparent; 
+ 	} 
+
+/* begin class msgs */
+.td_msg{
+	border-width: 0px;	
+}
+
+.span-sender:hover{
+	text-decoration: underline;
+}
+
+
+.th_resizable {
+	padding-left: 3px !important;
+	border-left: solid 1px #999;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+}
+
+.td_resizable {
+	padding-left: 1px;
+	border: 0px;
+	border-left: solid 1px #dde1dd;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+	border-right-width: 0px !important;
+}
+
+.tr_msg_unread {	
+	font-weight:bold !important;
+}
+
+.table_box tr{ 
+	border:0;  
+	height: 20px;
+}
+
+.table-info-quota{
+	table-layout: fixed;
+}
+
+.td-info-quota{
+	white-space: nowrap;
+	overflow:	hidden;
+	text-overflow: ellipsis;	
+}
+
+.tr_msg_read {
+	color: #3f3f3f;
+	background-color: #ffffff;
+	-moz-user-select: none;
+}
+
+.tr_msg_read2 {
+	color: #3f3f3f;
+	background-color: #DEE8F0;
+	-moz-user-select: none;
+}
+
+.selected_msg{
+	background-color: #ffffcb;
+}
+.flagged_msg{
+	color: red;
+}
+
+.show_img_link{
+	width : 100%;
+	color: black;
+        font-weight: bold;
+	background-color: #ffc;
+	border-bottom:1px solid #cfcfcf;
+	cursor: pointer;		 
+	-moz-user-select: none;
+}
+/* end class msgs */
+
+.show_img_link:hover {
+	color: #000 !important;
+}
+
+.action_info_table {
+	border-spacing: 0px 0px;
+}
+.action_info_th {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+	border-width: 0px 0px 0px 0px;
+	padding: 1px 10px 0px 10px;	
+	border-style: inset inset inset inset;
+	border-color: gray gray gray gray;
+	background-color: rgb(250, 209, 99);
+	-moz-border-radius: 6px 6px 6px 6px;
+}
+
+.message_header{
+	background-color: #ABC6E1;
+}
+
+.message_header td {
+	padding: 0px;
+}
+
+.table_message_ruler {
+	width: 10px;
+	border: none;
+	border-left: 1px dotted #88a;
+	display: none;
+	position: absolute;
+	z-index: 10;
+	height: 300px;
+}
+
+.table_message_header_box{
+	width: 100%;
+	color: black;
+	border-style: solid;
+	border-width: 0px;
+	border-collapse: collapse;
+	border-color: #bbbbbb;
+	font-family: Verdana,Arial,Helvetica,sans-serif;
+	font-size: 13px;	
+	cursor: pointer;
+	table-layout: fixed;
+}
+.font-menu {
+    color: #000;
+}
+
+.font-menu-sel {
+       	color:#0000FF;
+}
+
+.font-menu, .font-menu-sel {
+    float: left;
+    clear: left;
+    overflow: hidden;
+    white-space: nowrap;
+    padding-left: 5px;
+    margin-right: 5px;
+    text-decoration: none;
+    text-align: center;
+}
+
+.menu-sel{   
+    text-decoration: none;
+    text-align: center;
+    color:#0000FF;
+    height: 20px;
+    width:220px;
+    background-color:#F7F7F7;
+    margin-bottom: 0px;
+    border: 1px solid #4a79b1;
+    border-bottom: 0px;
+    padding:0px 5px 0px 0px;
+    -moz-border-radius: 9px 9px 0px 0px;
+    -moz-user-select: none;
+    -webkit-border-radius: 9px 9px 0px 0px;
+    border-radius: 9px 9px 0px 0px;
+    cursor: pointer;
+ }
+ 
+.menu{
+    text-decoration: none;
+    text-align: center;
+    height: 20px;        
+    width:220px;
+    background-color:#c8d7ea;
+    margin-bottom: 0px;
+    border: 1px solid #f4f7fc;
+    border-bottom: 1px solid #4a79b1;
+    padding:0px 5px 0px 0px;
+    -moz-border-radius: 9px 9px 0px 0px;
+    -moz-user-select: none;
+    -webkit-border-radius: 9px 9px 0px 0px;
+    border-radius: 9px 9px 0px 0px;
+    cursor: pointer;
+}
+
+.last_menu{
+	border-bottom: 1px solid #4a79b1;
+	-moz-border-radius: 0px 0px 0px 0px;
+}
+
+.table_top{
+	background-color: #FFFFFF;
+	padding:1px 1px 1px 1px;
+	height:16px;
+	cursor: default;
+	margin: 0px 0px 0px 0px;
+	border-width: 0px 1px 1px 1px;
+	border-style: outset outset outset outset;
+	border-color: black black black black;	
+}
+
+.tr_message_header{
+	background-color: #EEEEEE;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	cursor: default;
+	border-style: none none none none;
+	-moz-border-radius: 0px 0px 0px 0px;
+}
+
+.tr_message_body{
+	background-color: #FFFFFF;
+	cursor: default;
+	-moz-border-radius: 9px 9px 9px 9px;
+}
+
+.message_body{
+	background-color: #FFFFFF;
+	cursor: default;
+	-moz-border-radius: 9px 9px 9px 9px;
+}
+
+.header_message_field{
+	font-weight: bold;
+}
+
+.suggestion_list{
+background: white;
+border: 1px solid;
+padding: 4px;
+}
+        
+.suggestion_list ul{
+padding: 0;
+margin: 0;
+list-style-type: none;
+}
+
+.suggestion_list a{
+text-decoration: none;
+color: navy;
+}
+
+.suggestion_list .selected{
+background: navy;
+color: white;
+}
+        
+        
+.suggestion_list .selected a{
+color: white;
+}
+
+#autosuggest{
+display: none;
+} 
+
+div#tipDiv {
+  position:absolute; visibility:hidden; left:0; top:0; z-index:10000;
+  background-color:#EFEFEF; border:1px solid #337;
+  width:220px; padding:0px;
+  color:#000; font-size:11px; line-height:1.2;
+  cursor: pointer;
+}
+
+.richtext_toolbar {background-color: #C0C0C0;}
+.imagebutton {border: solid 2px #C0C0C0; background-color: #C0C0C0; float:left;}
+.select_richtext {float:left;}
+/*.image {position: relative; left: 1; top: 1; height:20; width:21; border:none;}*/
+/*.imagebutton_out: {border-style: solid 2px #C0C0C0;}*/
+/*.imagebutton_over: {border-style: outset 20px;}*/
+.sel_color{	border-width:1px;border-color:#FFFFFF;border-style:solid;cursor:pointer;}
+.unsel_color{border-width:1px;border-color:#BBBBBB;border-style:solid;}
+
+/* Conf tree	*/
+.dtree {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 8px;
+	color: #000000;
+	/*white-space: nowrap;*/
+	background-color: #FFFFFF;
+
+}
+.dtree img {
+	border: 0px;
+	vertical-align: middle;
+
+}
+.dtree a {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	color: #000000;
+	white-space: nowrap;	
+}
+.dtree table{
+	margin-top: 0%;
+	padding: 0px 0px 0px 0px;
+}
+.dtree td{
+	padding: 0px 0px 0px 0px;
+}
+
+.folderscol{
+	/*width: 18%;*/
+	width: 100%;
+	/*float: left;*/
+	/*padding: 0px 0px 0px 0px;*/
+}
+
+.messagescol{
+	/*padding-left: 18.5%;*/
+	/*width: 85%;*/
+	width: 100%;
+	/*float: left*/
+	/*margin-rigth: 0px;*/
+	padding: 0px 0px 0px 0px;
+}
+
+.menu-folders{
+	text-align: center;
+	text-decoration: none;
+	font: bold 12px Arial, Helvetica, sans-serif;
+	color: rgb(0, 102, 51);
+	width: 100%;
+	height: 20px;
+
+	border-right: 1px solid #000000;
+	border-left: 1px solid #000000;
+	border-top: 1px solid #000000;	
+	cursor: default;
+	-moz-border-radius: 9px 9px 0px 0px;
+}
+
+.content-menu{
+	padding: 0px 0px 0px 0px;
+	background-image: url(../../../phpgwapi/templates/default/images/bgBlockContent.jpg);
+}
+.content-menu-td {
+/*	border: 1px solid #f7f7f7;*/
+	margin-left: 5px;
+}
+
+.content-menu-td:hover{background-color: #ffffff; border: 1px solid #CCCCCC;}
+
+.content-folders {
+	width:162px;
+	padding: 0px 0px 0px 0px;
+	position: relative;
+	overflow: auto;
+	
+}
+
+
+/* Conf Filter	*/
+.filter {
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 8px;
+	background-color : #FFFFFF;
+}
+.filter img {
+	border: 0px;
+	vertical-align: middle;
+}
+.filter a {
+	font-family: Arial, Helvetica, sans-serif;
+	color: #000000;
+	white-space: nowrap;
+}
+.message_options_trash {
+	background-image: url(images/page_white_delete.png);
+	background-repeat: no-repeat;
+	background-position:left center;
+	padding:0pt 6pt 1pt 14pt;
+}
+.message_options_move {
+	background-image: url(images/move.png);
+	background-repeat: no-repeat;
+	background-position:left center;
+	padding:0pt 6pt 1pt 14pt;
+}
+.message_options_print {
+	background-image: url(images/print.png);
+	background-repeat: no-repeat;
+	background-position:left center;
+	padding:0pt 6pt 1pt 14pt;
+}
+
+.message_options_export {
+	background-image: url(images/export.png);
+	background-repeat: no-repeat;
+	background-position:left center;
+	padding:0pt 6pt 1pt 14pt;
+}
+
+.message_options_import {
+	background-image: url(images/import.png);
+	background-repeat: no-repeat;
+	background-position:left center;
+	padding:0pt 6pt 1pt 14pt;
+}
+
+.message_options_inactive {
+         white-space: nowrap;
+	 color: #999;
+	padding-right: 0 !important;
+}
+
+.message_options_active {
+	white-space: nowrap;
+	color: #990000;
+    font-weight: bold !important;
+	cursor: pointer;
+	padding-right: 0 !important;
+ }
+
+.message_options {
+	cursor: pointer;
+        color: #114fa4;
+/*	color: #2A64B0;*/
+	white-space: nowrap;
+	font-weight: bold;
+	padding-right: 0 !important;
+}
+
+.message_options_over {
+	 cursor: pointer;
+         white-space: nowrap;
+	 color: #FC6103;
+	/*text-decoration: underline;*/
+         font-weight: bold !important;
+	padding-right: 0 !important;
+}
+
+.reply_options {
+	cursor: pointer;
+        color: white;
+	white-space: nowrap;
+	font-weight: bold;
+}
+
+.reply_options_active {
+	 cursor: pointer;
+         white-space: nowrap;
+	 color: yellow;
+	 text-decoration: underline;
+         font-weight: bold !important;
+}
+
+.class_search_div{
+	position: relative;
+	left: 12px;
+}
+
+.em_sidebox_menu {
+	position: relative;
+	left: 2px;
+	padding: 0px 13px 0px 0px;
+	font-weight: bold;
+	font-size: 10px;
+	color: #666666;
+	text-decoration: none;
+	white-space: nowrap;
+	font-family: sans-serif;
+}
+
+.em_div_sidebox_menu {
+	position: relative;
+	padding-left: 17px;
+	cursor: pointer;
+}
+.catalog{
+	font-family: Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	font-weight: bold;
+}
+
+div.quicksearchcontacts {
+	border-width: 1px;
+	border-style: solid;
+	broder-color: grey;
+	overflow: auto;
+	position: relative;
+	left: 10px;
+	height: 302px;
+	width: 577px;
+}
+
+table.quicksearchcontacts {
+	border-width: 0px 0px 0px 0px;
+	border-spacing: 0px;
+	background-color: white;
+	cursor: default;
+}
+
+tr.quicksearchcontacts_unselected {
+	background-color: white;
+}
+
+tr.quicksearchcontacts_selected {
+	background-color: #5598d7;
+	color: white;
+}
+
+td.quicksearchcontacts_cc {
+	border-style: none;
+}
+
+input.em_button_like_span {
+	border:0px none !important;
+	margin: 0px !important;
+	padding:0px !important;
+	color:#114fa4 !important;
+	background:transparent none repeat scroll 0% !important;
+	font-family:Arial,Helvetica,sans-serif !important;
+	font-size:11px !important;
+	height:15px !important;
+	font-weight: bold;
+}
+
+.l {
+	background-image: url(../../../phpgwapi/templates/default/images/foldertree_folder.png);
+}
+
+.sl {
+	background-image: url(../../../phpgwapi/templates/default/images/foldertree_folderopen.png);
+}
+.dsused {
+        background-image: url(../../../expressoMail1_2/templates/default/images/dsused.gif);
+}
+
+.divAppboxHeader{
+	font-style:italic;	
+	font-weight:normal;
+	font-variant: small-caps;	
+	color: #000066 !important;
+	font-size: 16px !important;
+	text-align: center;	
+	padding: 0px;
+}
+
+/* hack para o chrome */
+@media screen and (-webkit-min-device-pixel-ratio:0){
+	input[type="file"]{
+	background-color: #FFF;
+	border: 1px solid #e4e4e4;
+	height: 20px;
+	width: 350px;
+	vertical-align: middle;
+	}
+}
+
+.local-messages-search-warning {
+	cursor: pointer;
+	cursor: hand;
+	background: none repeat scroll 0% 0% rgb(255, 238, 187);
+	color: red;
+	line-height: 2em;
+	font-size: 1.2em;
+	text-align: center;
+}
+
+
+
+/*
+ * Este arquivo limpa o estilo para a nova agenda, .new-event-win.active sobrescrevendo o código CSS
+ * do Expresso.
+ * Deve ser removido quando o módulo Calendar não integrar mais a versão 2.x
+ */
+
+/* Eric Meyer's Reset Reloaded based
+ * http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
+ */
+/*
+.new-event-win.active applet, .new-event-win.active object, .new-event-win.active iframe, .new-event-win.active fieldset, .new-event-win.active div
+.new-event-win.active h1, .new-event-win.active h2, .new-event-win.active h3, .new-event-win.active h4, .new-event-win.active h5, .new-event-win.active h6, .new-event-win.active p, .new-event-win.active blockquote, .new-event-win.active pre,
+.new-event-win.active abbr, .new-event-win.active acronym, .new-event-win.active address, .new-event-win.active big, .new-event-win.active cite, .new-event-win.active code,
+.new-event-win.active del, .new-event-win.active dfn, .new-event-win.active em, .new-event-win.active font, .new-event-win.active img, .new-event-win.active ins, .new-event-win.active kbd, .new-event-win.active q, .new-event-win.active s, .new-event-win.active samp,
+.new-event-win.active small, .new-event-win.active strike, .new-event-win.active strong, .new-event-win.active sub, .new-event-win.active sup, .new-event-win.active tt, .new-event-win.active var,
+.new-event-win.active ol, .new-event-win.active ul,
+.new-event-win.active form, .new-event-win.active label, .new-event-win.active select,
+.new-event-win.active table, .new-event-win.active caption, .new-event-win.active tbody, .new-event-win.active tfoot, .new-event-win.active thead, .new-event-win.active tr, .new-event-win.active th, .new-event-win.active td {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	font-weight: inherit;
+	font-style: inherit;
+	/*font-size: 100%;*/
+	/*font-family: inherit;*/
+	/*vertical-align: baseline;*/
+/*	font-family: Arial,Helvetica,sans-serif;*/
+/*}*/
+.new-event-win.active:focus {
+	outline: 0;
+}
+.new-event-win.active body {
+	line-height: 1;
+	color: black;
+	background: white;
+}
+.new-event-win.active ol, .new-event-win.active ul {
+	list-style: none;
+	list-style-image : none;
+	padding-left : 5px;
+}
+
+.new-event-win.active table {
+	border-collapse: separate;
+	border-spacing: 0;
+}
+.new-event-win.active caption, .new-event-win.active th, .new-event-win.active td {
+	/*text-align: left;*/
+	font-weight: normal;
+}
+.new-event-win.active blockquote:before, .new-event-win.active blockquote:after,
+.new-event-win.active q:before, .new-event-win.active q:after {
+	content: "";
+}
+.new-event-win.active blockquote, .new-event-win.active q {
+	quotes: "" "";
+}
+.new-event-win.active .mail.name-special, .new-event-win.active .name.name-special{
+  padding: 0 0 0 35px;
+}
+
+.new-event-win.active .add-attendee-search.search-field {
+  width: 249px;
+ }
+ 
+ .new-event-win.active #calendar_addevent_details4 {
+  margin: 10px 0 0 0;
+ } 
+ 
+ .new-event-win.active input{
+  color: #000;
+ } 
+ 
+ .new-event-win.active #calendar_addevent_details5 {
+  margin: 10px 0 11px 0;
+ }
+
+.new-event-win.active select {
+    border: 1px solid #CFCFCF;
+    border-color: #CFCFCF;
+    color: #555;
+    background-color: #FFF;
+}
+.new-event-win.active a:link, .new-event-win.active a:visited {
+    color: #2E6E9E;
+}
+
+.new-event-win.active  dd, .new-event-win.active  dl, .new-event-win.active  dt{
+	margin: 0;
+}
+/* azul.css */
+/*body { background-color: #e9e9e9; }*/
+
+/*a:link,
+a:visited
+{ color: #000066; }*/
+
+/*a:hover,
+a:active
+{ color: #ff9933; }*/
+
+.new-event-win.active #divAppbox{
+	overflow-x: auto;
+	overflow-y: scroll;
+}
+
+.new-event-win.active select
+{ border-color: #CFCFCF; color: #555; padding-left:0px;}
+
+.qtip-wrapper fieldset{
+	padding: 0;
+	border: 0;
+}
+
+.new-event-win.active .fc-event-skin {
+	border-color: #36C !important;
+	background-color: #36C !important; 
+	color: white !important;
+}
+
+.fc-event-vert .fc-event-bg {
+	display: block !important;
+}
+
+.map-event{
+
+}
+
+#new_event_map .map-event .fc-event-inner.fc-event-skin{
+	border-style: dashed !important;
+	border-width: 2px !important;
+	border-color: #36C !important;
+	background-color: transparent !important;
+}
+
+#new_event_map .map-event .fc-event-inner.fc-event-skin .fc-event-head, #new_event_map .map-event .fc-event-inner.fc-event-skin .fc-event-content{
+	background-color: transparent !important;
+	color: transparent !important;
+}
+
+#new_event_map .map-event .ui-resizable-handle{
+	display : block !important;
+	color: black !important;
+}
+
+fieldset.alarm{  
+    border: none !important;
+    padding: 0px !important;
+    margin: 0px !important;
+}
+
+div.new-event-win.active div.button-files-upload{
+    margin: 15px 0 0 0;
+}
+
+div.new-event-win.active div.files-list{
+    margin: 45px 0 0 0;
+}
+
+/*#divAppbox
+{ background: #fff url( ../images/bgBlockContent.jpg ) repeat-x; border-color: #9c9c9c; }
+
+#divAppboxHeader
+{ background: url( ../images/bgAppTitle.png ); border-color: #9c9c9c; color: #006; text-shadow: 0.2em 0.2em 3px #999; }
+
+#divAppIconBar
+{ background: #fff url( ../images/background-icon-bar.png ) repeat-x; border-top-color: #9c9c9c; }
+
+#divAppTextBar
+{ background-color: #fff; }
+
+#divGenTime
+{ color: #f00; }
+
+#divMain
+{ background: #fff; border-color: #7e7e7e; }
+
+#divPoweredBy
+{ background: #fff; color: #999; }
+
+#divSideboxContainer
+{ background: #fff; }
+
+#extraIcons
+{ background: #eee; border-color: #7e7e7e; }
+
+#links_bar,
+#user_info
+{ color: #fff; }
+
+#tdAppbox
+{ background-color: #fff; }
+
+#tdSidebox
+{ background: #fff; }*/
+
+/*.conteudo
+{ border-color: #4A79B1; color: #003; }
+
+.divSideboxHeader
+{ background: #416faa; color: #fff; }
+
+.extraIconsRow
+{ border-top-color: #ddd; }
+
+.greyLine
+{ border-top-color: #7e7e7e; }
+
+.grid_email_class
+{ border-bottom-color: #cfcfcf; }
+
+.image-menu
+{ background: url( ../../../../phpgwapi/templates/default/images/folder_bg.png ); }
+
+.last_menu
+{ border-bottom-color: #4a79b1; }
+
+.logo_expresso
+{ background: url( ../../../../phpgwapi/templates/default/images/logo_expresso.jpg ) no-repeat 0 3px; }
+
+.menu
+{ background: #c8d7ea; border-color: #f4f7fc; border-bottom-color: #4a79b1; }
+
+.menu-sel
+{ background-color: #f7f7f7; border-color: #4a79b1; color: #00f; }
+
+.menu-degrade
+{ background-image: url( ../../../../phpgwapi/templates/default/images/degrade.png ); }
+
+.navbar_but
+{ background-image: url(../../../../phpgwapi/templates/default/images/back_app.png); }
+
+.navbar_butOver
+{ background-image: url( ../../../../phpgwapi/templates/default/images/back_app_over.png ); }
+
+.navbar_butOut
+{ background-image: url( ../../../../phpgwapi/templates/default/images/back_app_out.png ); }
+
+.tblHeadApp
+{ border-color: #9c9c9c; }
+
+.textSidebox
+{ border-top-color: #aaa; }
+
+.toolbar
+{ background-image: url( ../../../../phpgwapi/templates/default/images/fundo_topo.png ); }
+
+.linha0,
+.tr_msg_read
+{ color: #3f3f3f; background: #fff; }
+
+.linha1,
+.tr_msg_read2
+{ color: #3f3f3f; background: #f4f8fb; }
+
+table.inboxElements th,
+.table_elements_tr_header,
+.info_tr_header,
+.message_header
+{
+	background: #abc6e1;
+}
+
+.prefTable
+{
+	background-color: #f4f8fb;
+	margin: 0px 0px 10px 0px ;
+	border: 1px solid #D3DCE3;
+	border-top: 0px;
+}*/
+
+
+
+/*fixed bug on IE8*/
+#content_folders .foldertree-skin-prognus span.selected {font-weight:bold !important; } 
+#content_folders .foldertree-skin-prognus span.inbox {}
+#content_folders .foldertree-skin-prognus span.trash {;background-image: url(../../../prototype/modules/mail/img/bin.png);}
+#content_folders .foldertree-skin-prognus span.drafts {background-image: url(../../../prototype/modules/mail/img/folder_page_white.png);}
+#content_folders .foldertree-skin-prognus span.spam {background-image: url(../../../prototype/modules/mail/img/folder_delete.png);}
+#content_folders .foldertree-skin-prognus span.sent {background-image: url(../../../prototype/modules/mail/img/folder_go.png);}
+#content_folders .foldertree-skin-prognus span.folder {display: block;padding-bottom: 1px;padding-left: 18px;padding-right: 0;padding-top: 1px; font-family : Lucida Grande, Lucida Sans, Arial, sans-serif;}
+#content_folders .treeview .closed {display:block;}
+
+.folders-loading {
+	background: url(../../../prototype/modules/mail/img/loader.gif) !important;
+	background-position: 0 0 !important;
+	background-repeat : no-repeat !important;
+}
+
+.draggin-box{
+	cursor : pointer;
+	background-color: #CDC5BF;
+	float: left;
+	width : auto; 
+	height: 16px; 
+	border:1px solid #333;
+	text-align: right;
+	z-index: 2000;
+}
+
+.ui-draggin-default-image{
+    float: left; 
+    text-align: right;
+}
+
+.draggin-mail{
+	float: left;
+	background-image: url(../../../prototype/modules/mail/img/move.png);
+	background-position: 0px 0px;
+	background-repeat:no-repeat;
+	color : red;
+	text-align: right;
+	font-weight : bold;
+	padding-right : 5px;
+	padding-left : 25px;	
+	font-family : Lucida Grande, Lucida Sans, Arial, sans-serif;
+	font-size : 11px;
+}
+
+.draggin-folder{
+	float: left;
+	background-image: url(../../../prototype/modules/mail/img/folder.png);
+	background-position: 0px 0px;
+	background-repeat:no-repeat;
+	padding-left : 20px;
+	color : red;
+	text-align: right;
+	font-weight : bold;
+	padding-right : 5px;
+}
+
+.collapse_folders_td{
+	cursor : pointer;
+	width: 12px;
+	height:100%;
+	border-radius : 5px;
+	border-left : 1px solid #CCCCCC;
+}
+.collapse_folders_td.collapse_folders_td_over{
+	border-left: 1px solid #1B75BB;
+} 
+
+.folder-over{
+	border: 1px solid black;
+}
+
+.floating-default{
+    float: left; 
+    text-align: left;
+}
+
+.collapse_folders_td .ui-icon.ui-icon-triangle-1-e{
+	background-position: -37px -20px;
+	width: 8px; 
+	height: 8px;
+}
+
+.collapse_folders_td .ui-icon.ui-icon-triangle-1-w{
+	width: 8px; 
+	height: 8px;
+	background-position: -100px -20px;
+}
+
+.float-menu{
+	position:absolute;
+	text-align: left;
+}
+
+ button.expressomail-button-icon-ative{color:#E17009 !important; border: 1px solid #E17009 !important;background: none repeat scroll 0 0 #FFE1CC !important;}
+ 
+.outoffice 
+{ 
+    width: 295px;  
+    height: 50px;  
+    overflow: hidden; 
+} 
+        
+.title-outoffice 
+{ 
+        margin-left: 10px; 
+        font-family: verdana; 
+        font-size: 1.2em; 
+} 
+.outoffice span{ 
+        margin: 5px; 
+} 
+
+#detalhes_contato img{ margin-bottom: -4px;}
+
+ button.expressomail-button-icon-ative{color:#E17009 !important; border: 1px solid #E17009 !important;background: none repeat scroll 0 0 #FFE1CC !important;}
+ 
+.box{
+	background-color: #DFEFFC;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	border: 1px solid #ADD9ED; 
+	display: inline-block;
+	cursor : pointer;
+	margin-top : 1px;
+	margin-right: 1px;
+	outline : none;
+	padding : 1px;
+}
+
+
+.box span{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+	color : #201b41;
+	outline : none;
+}
+
+.out-office-box{
+	background-color: #dac407;
+	border : 1px solid #837c3f !important;
+}
+
+.out-office-box span{
+	color: #837c3f;
+}
+
+.email-area{
+	border-radius: 5px; 
+	width: 98.5%;
+	padding: 5px;
+	border : 1px solid #BBBBBB; 
+	heigth : auto;
+	max-height : 115px;
+	overflow-y: auto;
+	cursor: text;
+}
+.email-text{
+	outline:none;
+	width:15px;
+	border : none;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+}
+
+.box-input{
+	outline:none;
+	border : none;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 13px;
+	display : none;
+	width: 40px;
+}
+
+.hidden {
+	display : none;
+}
+
+.loading {
+	background: url(../../../prototype/modules/mail/img/loader.gif) !important;
+	background-position: 0 0 !important;
+	background-repeat : no-repeat !important;
+}
+
+.line-separator{
+	background: url("images/linha.png") repeat-x scroll 0 8px transparent;
+	clear : both;
+}
+
+.box-draggable-hover{
+	border : 1px solid #474747;
+}
+
+.box-loading{
+	background : url("../../../prototype/modules/mail/img/loading.gif") no-repeat !important;
+	background-size: 17px auto !important;
+}
+
+.box-info{
+	background : url("images/information.png") no-repeat !important;
+}
+
+input.required-fail{
+	border-color : red;
+}
+
+div.conteudo div.new-msg-head-data div.att-box{
+	background-color: #DFEFFC;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	border: 1px solid #ADD9ED; 
+	display: inline-block;
+	cursor : pointer;
+	margin-top : 3px;
+	margin-right: 3px;
+	outline : none;
+	padding : 1px;
+}
+
+
+div.conteudo div.new-msg-head-data  div.att-box span.att-box-value{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 11px;
+	color : #201b41;
+	outline : none;
+}
+
+div.conteudo div.new-msg-head-data div.att-box span.att-box-loading{
+	background : url("../../../prototype/modules/mail/img/loading.gif") no-repeat !important;
+	display: inline-block;
+	background-size: 15px auto !important;
+}
+
+div.conteudo div.new-msg-head-data div.att-box.invalid-email-box{
+	background-color: #ea9aa0;
+	border : 1px solid #540303 !important;
+}
+
+div.new-msg-head-data div.email-area .invalid-email-box{
+	color: #540303;
+	background-color: #ea9aa0;
+	border : 1px solid #540303 !important;
+}
+
+div.new-msg-head-data div.email-area .box-selected{
+	background-color : #BBBBBB;
+}
+
+.fileupload_msg_tooltip{
+	width: 99.7%;
+	text-align: center;
+	background: #DFEFFC;
+	font-weight: bold;
+	border-radius: 5px;
+    height: 115px;
+    line-height: 115px;
+    font-size: larger;
+}
+
+.fileupload_msg_tooltip.hover {
+    background: #ADD9ED;
+}
+
+.select-all-messages{
+	min-height: 20px;
+	font-size: 13px;
+	font-family: Arial;
+	white-space: nowrap;
+	text-align: center;
+}
+.select-all-messages .select-link{
+	text-decoration: underline !important;
+}
+
+.selected_shortcut_msg{
+    color: white;
+    background-color: #95A7FC;
+}
+
+.current_selected_shortcut_msg{
+    color: white;
+    background-color: #5194d2;
+}
+
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{ 
+ 	font-size: 10px;         
+} 
+ 
+.ui-tabs .ui-tabs-nav li a:hover, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a:hover{ 
+	text-decoration: none !important; 
+} 
+
+.ui-tabs .ui-tabs-panel{ 
+    width: 99.7%; 
+	margin-top: 0px !important;
+} 
+
+.ui-state-highlight-prognus { width: 90px; height: 19px; border-radius: 5px; border : 3px dashed #F93 !important; border-bottom: 3px dashed #F93 !important;}
+
+.message-detail-hover { border-bottom : 1px solid #1B75BB !important;}
+
+.ui-tabs .ui-tabs-nav li .ui-icon-circle-close  {
+	float: right;
+	margin: 5px 5px 0 -5px;
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/css/grid.css
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/css/grid.css	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/css/grid.css	(revision 7210)
@@ -0,0 +1,9 @@
+.ui-jqgrid .ui-jqgrid-bdiv {
+    position: relative;
+    margin: 0em;
+    padding:0;
+    /*overflow: auto;*/
+    overflow-x:hidden;
+    overflow-y:auto;
+    text-align:left;
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/message.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/message.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/message.js	(revision 7210)
@@ -0,0 +1,199 @@
+function buildMessageButtons(content){
+	var data = getTabData();
+	//FLAGS BUTTON SET 
+    content.find(".message-flags").find(".message-important-flag").button({
+    	icons: {
+    		primary: "ui-icon-notice"
+    	},
+        text: false
+    }).click(function(){
+    	var checked = $(this).attr("checked") == "checked" ? true : false;
+    	set_message_flag(data.id, checked ? "flagged" : "unflagged", undefined, data.folder);
+    	write_msg(get_lang('Message marked as ') + get_lang( checked ? "Important" : "Normal"));
+    	refresh();
+    }).end().find(".message-unread-flag").button({
+    	icons: {
+    		primary: "ui-icon-mail-closed"
+    	},
+        text: false
+    }).click(function(){
+    	var checked = $(this).attr("checked") == "checked" ? true : false;
+    	set_message_flag(data.id, checked ? "unseen" : "seen", undefined, data.folder);
+    	write_msg(get_lang('Message marked as ') + get_lang( checked ? "Unseen" : "Seen"));
+    	refresh();
+    }).end().find(".message-spam-flag").button({
+    	icons: {
+    		primary: "ui-icon-alert"
+    	},
+        text: false	
+    }).click(function(){
+    	var checked = $(this).attr("checked") == "checked" ? true : false;
+    	checked ? spam(data.folder, data.id,'null') : nospam(data.id,'null', data.folder);
+    	removeTab();
+    	refresh();
+    }).end().find(".message-followup-flag").button({
+    	icons: {
+    		primary: "ui-icon-flag"
+    	},
+        text: false
+    });
+    content.find(".message-flags").buttonset();
+
+    //MESSAGES ACTION NEXT PREV BUTTON SET
+    content.find(".messages-controll").find(".message-prev").button({
+    	icons: {
+    		primary: "ui-icon-carat-1-w"
+    	},
+        text: false
+    }).click(function(){
+
+    }).next().button({
+    	icons: {
+    		primary: "ui-icon-carat-1-e"
+    	},
+        text: false
+    });
+    content.find(".messages-controll").buttonset();
+
+    //
+    content.find(".message-forward").button({
+    	icons:{
+    		primary: "ui-icon-arrowreturnthick-1-e"
+    	},
+    	text : false
+    });
+
+	var teste = content.find(".message-reply-menu-content").clone();
+	content.find(".message-reply-menu-content").remove();
+
+    content.find(".button.message-reply").button({
+    	icons:{
+    		primary: "ui-icon-arrowreturnthick-1-w"
+    	},
+    	text : false
+    }).next().button({
+    	icons:{
+    		primary: "ui-icon-triangle-1-s"
+    	},
+    	text : false
+    }).parent().buttonset();
+
+	content.find("span.message-reply").append(teste);
+
+	content.find(".message-reply").next().menuPlugin({
+		content : content.find(".message-reply-menu-content").html(),
+		positionOpts: {
+			posX: 'left', 
+			posY: 'bottom',
+			offsetX: -140,
+			offsetY: 0,
+			directionH: 'right',
+			directionV: 'down', 
+			detectH: true, // do horizontal collision detection  
+			detectV: true, // do vertical collision detection
+			linkToFront: false
+		},
+		flyOut: true,
+		showSpeed: 100,
+		crumbDefaultText: '>'
+	});
+
+
+    content.find(".button.message-edit").button({
+    	icons:{
+    		primary: "ui-icon-pencil"
+    	},
+    	text : false
+    });
+    //BUTTON MORE AND TAGS
+    content.find(".message-tags").button({
+        icons: {
+            primary: "ui-icon-tag",
+            secondary: "ui-icon-triangle-1-s"
+        },
+        text: false
+    }).next().next().button({
+        icons: {
+            secondary: "ui-icon-triangle-1-s"
+        },
+        text: true
+ 	});
+
+	content.find(".message-more").menuPlugin({
+		content : content.find(".message-more-menu-content").html(),
+		flyOut: true,
+		positionOpts: {
+			posX: 'left', 
+			posY: 'bottom',
+			offsetX: -140,
+			offsetY: 0,
+			directionH: 'right',
+			directionV: 'down', 
+			detectH: true, // do horizontal collision detection  
+			detectV: true, // do vertical collision detection
+			linkToFront: false
+		},
+		showSpeed: 100,
+		crumbDefaultText: '>'
+	});
+ 		
+	content.find(".message-tags-menu-content ul li").remove();
+	$.each(getLabels(), function(key,value){
+		content.find(".message-tags-menu-content ul")
+		.append("<li id='"+key+"'><a onclick='labeledMessages("+
+			(key.match(/label(.*)/) ? key.match(/label(.*)/)[1] : 'configureLabels({applyToSelectedMessages:true})')
+		+");' href='#'>"+value.name+"</a></li>").find("li:last");
+	});
+
+	content.find(".message-tags").menuPlugin({
+		content : content.find(".message-tags-menu-content").html(),
+		flyOut: true,
+		positionOpts: {
+			posX: 'left', 
+			posY: 'bottom',
+			offsetX: -140,
+			offsetY: 0,
+			directionH: 'right',
+			directionV: 'down', 
+			detectH: true, // do horizontal collision detection  
+			detectV: true, // do vertical collision detection
+			linkToFront: false
+		},
+		showSpeed: 100,
+		crumbDefaultText: '>'
+	});
+    //REMOVE MESSAGE BUTTON
+    content.find(".message-remove").button({
+        icons: {
+            primary: "ui-icon-trash"
+        },
+        text: false
+    }).click(function(){
+    	proxy_mensagens.delete_msgs(data.folder,data.id,'null');
+    	removeTab();
+    	refresh();
+    });
+
+    //PREFERENCES BUTTON
+    content.find(".messages-preferences").button({
+        icons: {
+            primary: "ui-icon-gear",
+            secondary: "ui-icon-triangle-1-s"
+        },
+        text: false
+    }).css("width", "45px");
+
+    //MESSAGE DETAILS 
+    content.find(".message-hide-show-details").click(function(){
+    	$(this).find("span").toggle();
+    	content.find(".message-details").toggle("blind");
+    }).hover(
+		function(){
+			$(this).addClass("message-detail-hover");
+		},
+		function(){
+			$(this).removeClass("message-detail-hover");
+		}
+	);
+
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/newfoldertree.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/newfoldertree.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/newfoldertree.js	(revision 7210)
@@ -0,0 +1,511 @@
+var init_tree = 0;
+var selected;
+var over;
+var cp_tree1;
+var cp_tree2;
+function unorphanize(root, element) {
+	var ok = false;
+	var f = 0;
+	for (var i=0; i<root.length; i++) {
+		if (root[i].id == element.parentFolder) {
+			element.children = new Array(); 
+			root[i].children.push(element);
+			return true;
+		} else if (ok = unorphanize(root[i].children, element)) {
+			break;
+		}
+	}
+	return ok;
+}
+
+function count_unseen_children(folder){
+	if(folder.children.length){
+		for(var i=0; i< folder.children.length; i++){
+			if(folder.children[i].children.length)
+				folder.children[i]['children_unseen'] = (folder.children[i]['children_unseen'] ? folder.children[i]['children_unseen'] : 0) + count_unseen_children(folder.children[i]);
+			
+			folder['children_unseen'] = (folder['children_unseen'] ? folder['children_unseen'] : 0)+ (folder.children[i]['children_unseen'] ? folder.children[i]['children_unseen'] : 0) + parseInt(folder.children[i].messageCount.unseen);			
+		}
+		return folder['children_unseen'];
+	}else{
+		return parseInt(folder.messageCount.unseen);
+	}
+}
+
+function valid_tabs(children_of_this_folder, folder_to_move){
+	var borders_open = $("#border_tr").children();
+
+	var error = false;
+	for(var i = 1; i <= borders_open.length -2; i ++){
+		//VERIFICA A CADA FILHO DA PASTA SE ESTA eventNSAGEM E DESTA PASTA
+		$.each(children_of_this_folder, function(index, value){
+			if($(children_of_this_folder[index]).attr('id') == openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")]){
+				error = true;
+				write_msg(get_lang("One or more messages from any sub-folder are open"));
+				return error;
+				
+			}
+		});
+		if(error){
+			return error;
+		}
+		//VERIFICA SE EXISTE NA PASTA A SER MOVIDA
+		if(openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")] == folder_to_move){
+			error = true;
+			write_msg(get_lang("One or more messages from this folder are open"));
+			return error;
+		}
+	}
+}
+
+function draw_new_tree_folder(callback){
+	
+	var folders = DataLayer.get("folder", true);
+	
+	if(!selected){
+		selected = "INBOX";
+	}
+	/*
+	if( folders )
+	{
+	    folders = $.map( folders, function( folder ){
+		  return {
+		    id: folder.folder_id,
+		    commonName: folder.folder_name,
+		    parentFolder: folder.folder_parent === "root" ? "" : folder.folder_parent,
+		    messageCount: { total : '', unseen : '0' }
+		  };
+	    });
+	}
+	else
+	    folders = DataLayer.get("folder", true);
+	*/
+	var tree1 = new Array();
+	var tree2 = new Array();
+	var tree3 = new Array();
+	for (var i=0; i<folders.length; i++) {
+		if (/^INBOX/.test(folders[i].id)) {
+			if (!unorphanize(tree1, folders[i])) {
+				folders[i].children = new Array();
+				tree1.push(folders[i]);
+			}
+		}
+		else if (/^user/.test(folders[i].id)) {
+			if (!unorphanize(tree2, folders[i])) {
+				folders[i].children = new Array();
+				tree2.push(folders[i]);
+			}
+		}
+		else if (/^local_messages/.test(folders[i].id)) {
+			if (!unorphanize(tree3, folders[i])) {
+				folders[i].children = new Array();
+				tree3.push(folders[i]);
+			}
+		}
+	}
+	
+	for(var i =0; i<tree1.length; i++){
+		count_unseen_children(tree1[i]);
+	}
+	for(var i =0; i<tree2.length; i++){
+		count_unseen_children(tree2[i]);
+	}
+	for(var i =0; i<tree3.length; i++){
+		count_unseen_children(tree3[i]);
+	}
+	cp_tree1 = tree1;
+	cp_tree2 = tree2;
+	var shared_acls = {};
+
+	$.each(cp_tree2, function(index, value){
+		shared_acls[value.id] = value.acl_share;
+	});
+
+	var html = DataLayer.render('templates/detailedfoldertree.ejs', {folders: [tree1, tree2, tree3]});
+	var folders_html = $(".imap-folders").html(html).find(".mainfoldertree").treeview({
+			persist: "cookie",
+			animated: "fast"
+	}).find(".folder").unbind("click").click(function(event){
+		
+		// MUDANÃA DE PASTAS!
+		var target = $(this);	
+		
+		if($(".folders-loading").length)
+			return;
+		
+		if($(event.target).parent().is(".float-menu"))
+			return;
+			
+		if( target.is('.collapsable-hitarea, .expandable-hitarea, .lastCollapsable-hitarea, .lastExpandable-hitarea, .treeview ,.folder_unseen,.ui-icon, .float-menu, .new_folder, .folders-loading, .head_folder, .shared-folders') )
+			return;
+		
+		if( target.parent().find(".new_folder").length)
+			return;
+			
+		if( !target.attr('id') )
+			target = target.parent();
+		if (target[0] == $(".mainfoldertree")[0]) return;
+		var uiId = target.attr('id');
+		var child = target.find('.folder');
+		  
+		if(!target.is('.mainfoldertree > .expandable-hitarea, .mainfoldertree > .collapsable-hitarea')){
+			$('.filetree span.folder.selected').removeClass('selected');
+			$(target).children('.folder').addClass('selected');
+		}
+		$(this).addClass("folders-loading");
+		selected = target.attr('id');
+
+		changeFolder(target.attr('id'), child.attr('title'));	
+
+		/*$.ajax({
+			  url : "controller.php?"+ $.param( { action: "$this.imap_functions.get_folders_list", folder: target.attr('id') } ),
+			  success : function(data){
+				  data = connector.unserialize(data);
+
+				  if(data)
+				    build_quota(data);
+			  }
+		});*/
+		$(".folders-loading").removeClass("folders-loading");
+
+	}).filter('.followup-messages').click(function(event, ui){
+		search_emails("UNDELETED KEYWORD \"$Followupflagged\"");
+	}).end().end();
+	
+	folders_html.find('[id="'+selected+'"]').children().addClass("selected");
+	$(".folder").not(".head_folder").not(".shared-folders").parent().find(".folder").not(".head_folder,.inbox,.drafts,.sent,.spam,.trash").draggable({
+		// DRAG DE PASTAS
+		start : function(){
+			$(this).css("color", "gray");
+		},
+		stop : function(){
+			$(this).css("color", "");
+		},
+		revert: "invalid",
+		helper: function(event){
+			if($.trim(($(this).text().split("["))[0]).length > 18)
+				return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : (($(this).text().split("["))[0]).substring(0,18) + "...", type: "folder"}));
+			return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : (($(this).text().split("["))[0]), type: "folder"}));
+		},
+		delay: 150,
+		refreshPositions: true,
+		zIndex : 2700,
+		//scroll: true, 
+		//scrollSensitivity: 100,
+		//scrollSpeed: 100,
+		containment: "#divAppbox" 
+	}).end().droppable({
+		//DROP DE PASTAS
+		over : function(a, b){
+			//INICIO : SE A PASTA CONTER FILHAS EXPANDE 
+			over = $(this);
+			$(this).addClass("folder-over");
+			if(($(this)[0] != $(this).parent().find(".head_folder")[0]))
+				if($(this).prev()[0])
+					if($(this).parent().find(".expandable-hitarea")[0] == $(this).prev()[0]){
+						setTimeout(function(){
+							if(over.hasClass("folder-over"))
+								over.prev().trigger("click");
+						}, 500);
+						
+					}
+			//FIM : SE A PASTA CONTER FILHAS EXPANDE
+			
+			//SETA BORDA EM VOLTA DA PASTA
+		},
+		out : function(){
+			//RETIRA BORDA EM VOLTA DA PASTA
+			$(this).removeClass("folder-over");
+		},
+		drop : function(event, ui){
+			$(this).removeClass("folder-over");
+			if($(this).parent().attr('id') == undefined){
+				var folder_to = 'INBOX';
+				var to_folder_title = get_lang("Inbox");
+			}else{
+				var folder_to = $(this).parent().attr('id');
+				var to_folder_title = $(this).attr('title');
+			}		
+			var folder_to_move = ui.draggable.parent().attr('id');
+			var border_id = ui.draggable.find("input[type=hidden]").attr("name");
+			// eventnsagens : SE O DROP VIER DA LISTA DE eventNSAGENS :
+			if(folder_to_move == "tbody_box"){
+				move_msgs2(get_current_folder(), 'selected', 0, folder_to, to_folder_title,true);
+				return refresh();
+			}
+			//SE FOR DE UMA PESQUISA RAPIDA
+			else if(ui.draggable.parents('[id^="content_id_"]')[0]){
+				move_search_msgs("content_id_"+border_id, folder_to, to_folder_title);
+				return refresh();
+			}
+			// eventnsagens : SE O DROP VIER DE UMA ABA ABERTA
+			else if(folder_to_move == "border_tr"){
+				var id_msg = border_id.split("_")[0];
+				folder = $("#input_folder_"+border_id+"_r")[0] ? $("#input_folder_"+border_id+"_r").val() : (openTab.imapBox[border_id] ? openTab.imapBox[border_id]:get_current_folder());
+				alternate_border(border_id);
+				move_msgs2(folder, id_msg, border_id, folder_to, to_folder_title,true);
+				return refresh();
+			}
+			// SE O DROP VIER DA LISTA DE PASTAS
+			else{
+				var folder_to_exist = folder_to_move.split(imap_configs.imapDelimiter);	
+				folder_to_exist = folder_to+imap_configs.imapDelimiter+folder_to_exist[folder_to_exist.length-1];
+				
+				//VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS
+
+				if(valid_tabs(ui.draggable.parent().find("li"), folder_to_move)){
+					return;
+				}
+				//FIM : VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS;
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA PARA O eventSMO LOCAL
+				if(folder_to_exist == folder_to_move){
+					return write_msg(get_lang("Thie folder is already in this place"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA ABERTA NO momentO
+				if(folder_to_move == get_current_folder()){
+					return write_msg(get_lang("It's not possible move this folder, because it is being used in the moment!"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA FILHA DA PASTA ABERTA NO momentO
+				if(ui.draggable.parent().find(".selected")[0]){
+					return write_msg(get_lang("It's not possible move this folder, because its subfolder is being used in the moment!"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA PAI PARA DENTRO DE UMA FILHA
+				if(ui.draggable.parent().find('[id="'+folder_to+'"]')[0]){
+					return write_msg(get_lang("It's not possible to move this folder to its subfolders!"));
+				}					
+				
+				if($('[id="'+folder_to_exist+'"]').length){
+					return write_msg(get_lang("Can not move this folder to this location, because the target has already a folder with this name"));
+				}
+				
+				$(this).addClass("folders-loading");
+				
+				$.ajax({
+					url : "controller.php?"+ $.param( { action: "$this.imap_functions.move_folder", folder_to_move: folder_to_move, folder_to: folder_to } ),
+					success : function(data){
+						cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+						data = connector.unserialize(data);
+						if(data == "Permission denied"){
+							write_msg(get_lang("Permission denied"));
+						}else if(data){
+							write_msg(get_lang("The folder was successfully moved"));
+						}
+						else{
+							write_msg(get_lang("ERROR moving your folder."));
+						}
+					}
+				});
+			}
+		}
+	});
+	$(".folder").not(".shared-folders").parent().find(".folder").hover(
+		function(){
+			//CASO A LI NÃO TENHA UM eventNU FLUTUANTE AINDA, O eventNU Ã ADICIONADO!
+			if(!$(this).children(":last").hasClass("float-menu") && !$(this).children(":last").hasClass("new_folder")){
+				var folder_ = $(this);
+				var folder_name;
+				var shared = {
+					head : false,
+					valid : false
+				};
+				if(folder_.parent().attr('id')){
+					folder_name = folder_.parent().attr('id').split(imap_configs.imapDelimiter);
+					folder_name = folder_name[folder_name.length -1];
+					shared.valid = folder_.parent().attr('id').search("user/") == 0 ? true : false;
+				}else
+					folder_name = "Root";
+				
+				if(shared.valid){
+					shared.head = folder_.parent().attr('id').split(imap_configs.imapDelimiter).length == 2 ?  true : false;
+					var folder_name_parts = folder_.parent().attr('id').split(imap_configs.imapDelimiter);
+					var acls = shared_acls[folder_name_parts[0]+imap_configs.imapDelimiter+folder_name_parts[1]];
+
+				}
+
+				html = DataLayer.render("/templates/float_folder_menu.ejs", {name_folder : folder_name, flag : shared, acl : acls});					
+					//FUNÃÃO DO eventNU FLUTUANTE EDITAR < BEGIN
+				var esc = false;
+				$(folder_).append(html).find(".float-menu-edit").click(function(){
+					var folder_id = $(this).parents(".closed:first").attr('id');
+					var name = $.trim($(this).parents(".closed:first").find("span:first").text().split("[")[0]);
+					if($(this).parents(".closed:first").find("span:first").hasClass("selected"))
+						return write_msg(get_lang("It's not possible rename this folder, because it is being used in the moment!"));
+					if($(this).parents(".closed:first").find(".selected").length)
+						return write_msg(get_lang("It's not possible rename this folder, because its subfolder is being used in the moment!")); 
+					if(valid_tabs($(this).parents("li:first").find("li"), folder_id))
+						return;
+					$(this).parents(".closed:first").find("span:first").empty().append("<input class='new_folder folder' type='text' maxlength='100'></input>");
+					$(".new_folder").focus().keydown(function(event){
+						event.stopPropagation();
+						if(event.keyCode == 13){
+							if($(this).val() != ""){
+								if($(this).val().match(/[\/\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi)){
+									return write_msg(get_lang("cannot create folder. try other folder name"));
+								}
+								var new_name = folder_id.replace(/[a-zA-Z0-9Ã¡-ÃºÃ-Ã^\s_-]+$/, $(this).val());
+								if($('[id="'+new_name+'"]').length){
+									$(".folders-loading").removeClass("folders-loading");
+									write_msg(get_lang("Mailbox already exists"));
+									return draw_new_tree_folder();
+								}
+								$(".new_folder").parent().addClass("folders-loading");
+								$.ajax({
+									url : "controller.php?action=$this.imap_functions.ren_mailbox",
+									type : "POST",
+									data : "current="+folder_id+"&rename="+new_name,
+									success : function(data){
+										data = connector.unserialize(data);
+										if(data == "Permission denied"){
+											$(".folders-loading").removeClass("folders-loading");
+											cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+											return write_msg(get_lang("Permission denied"));
+										}
+										write_msg(get_lang("The folder was successfully rename"));
+										cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+									}
+								});
+							}
+						}else if( event.keyCode == 27){
+							draw_new_tree_folder();
+						}
+					}).focusout(function(){
+						draw_new_tree_folder();
+					}).val(name);
+				})
+				//FUNÃÃO DO eventNU FLUTUANTE EDITAR < END
+				//FUNÃÃO DO eventNU FLUTUANTE EXCLUIR < BEGIN
+				.end().find(".float-menu-remove").click(function(){
+					
+					var folder_id = $(this).parents(".closed:first").attr('id');
+					var folder_name = "<strong>"+$.trim($(this).parents(".closed:first").find(".folder").text().split("[")[0])+"</strong>";
+					
+					if(valid_tabs($(this).parents("li:first").find("li"), folder_id))
+						return;
+					$(this).parents(".closed:first").find(".folder").addClass("folders-loading"); 
+					
+					if($(this).parents(".closed:first").find("ul").length){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return write_msg(get_lang("Delete/move subfolders first"));
+					}
+					if($(this).parents(".closed:first").find(".selected").length){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return write_msg(get_lang("It's not possible delete this folder, because it is being used in the moment!")); 
+					}
+					var folder_span = $(this);
+					var confirm_text = get_lang("Do you wish to exclude the folder ");
+					$.Zebra_Dialog(confirm_text+folder_name, {
+						'type':     'question',
+						'overlay_opacity': '0.5',
+						'buttons':  [get_lang('Yes'), get_lang('No')],
+						'onClose':  function(caption) {
+							if(caption == get_lang('Yes')){
+								$.ajax({
+									url : "controller.php?action=$this.imap_functions.delete_mailbox",
+									type: "POST",
+									data : "del_past="+folder_id,
+									success : function(data){
+										data = connector.unserialize(data);
+										if(data == "Mailbox does not exist"){
+											$(".folders-loading").removeClass("folders-loading");
+											return write_msg(get_lang("Mailbox does not exist"));
+										}else if(data == "Permission denied"){
+											$(".folders-loading").removeClass("folders-loading");
+											cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+											return write_msg(get_lang("Permission denied"));
+										}
+										write_msg(get_lang("The folder %1 was successfully removed", folder_name));
+										cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+									}
+								});
+							}else{
+								folder_span.parents(".closed:first").find(".folder").removeClass("folders-loading");
+								return;
+							}
+						}
+					});
+					/* if(!confirm(confirm_text + folder_name)){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return;
+					} */
+				})
+				//FUNÃÃO DO eventNU FLUTUANTE EXCLUIR < END
+				//FUNÃÃO DO eventNU FLUTUANTE NOVA PASTA < BEGIN
+				.end().find(".float-menu-new").click(function(){
+					$(this).parents(".float-menu").hide();
+					var selected_li = $(this).parents(".closed:first");
+					if(selected_li.find("ul:first").length){
+						var new_folder = $("<li><input class='new_folder folder' type='text' maxlength='100'></input></li>").appendTo(selected_li.find("ul:first"));								
+						if(selected_li.find(".expandable-hitarea").length){
+							selected_li.find(".expandable-hitarea").trigger('click');
+						}
+						selected_li.find("ul:first").treeview({
+							add: new_folder
+						});
+					}else if(selected_li.length){
+						var new_folder = $("<ul><li><input class='new_folder folder' type='text' maxlength='100'></input></li></ul>").appendTo(selected_li);								
+						selected_li.treeview({
+							add: new_folder
+						});
+					}else{
+						selected_li = $(this).parents(".head_folder").parent();
+						if($(this).parents(".head_folder").parent().find(".expandable-hitarea").length){
+							$(this).parents(".head_folder").parent().find(".expandable-hitarea").trigger('click');
+						}
+						var new_folder = $("<ul><li><input class='new_folder folder' type='text' maxlength='100'></input></li></ul>").appendTo(selected_li);								
+						selected_li.treeview({
+							add: new_folder
+						});
+					}
+					
+					selected_li.find(".new_folder").Watermark("Nova Pasta").focus().keydown(function(event){
+						event.stopPropagation();
+						if(event.keyCode == 13){
+							if($(this).val().match(/[\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi)){
+								return write_msg(get_lang("cannot create folder. try other folder name"));
+							}
+							if($('[id="'+ (selected_li.attr('id')? selected_li.attr('id') : "INBOX") + imap_configs.imapDelimiter + $(this).val()+'"]').length){
+								$(".folders-loading").removeClass("folders-loading");
+								write_msg(get_lang("Mailbox already exists"));
+								return draw_new_tree_folder();
+							}
+							$(".new_folder").parent().addClass("folders-loading");
+							create_new_folder(($(this).val() != "" ? $(this).val() : get_lang("New Folder")), (selected_li.attr('id')? selected_li.attr('id') : "INBOX"));
+						}else if( event.keyCode == 27){
+							draw_new_tree_folder();
+						}
+					}).focusout(function(){
+						draw_new_tree_folder();
+					});
+				}).end().find(".float-menu-export").click(function(){
+					//proxy_mensagens.export_all_messages($(this).parents("li:first").attr("id"))
+
+					var name_box = $(this).parents("li:first").attr("id");
+					var name_folder = name_box.split(imap_configs.imapDelimiter)[name_box.split(imap_configs.imapDelimiter).length-1];
+
+					var hand_export = function(data){
+						if(!data){
+							write_msg(get_lang('Error compressing messages (ZIP). Contact the administrator.'))
+						}else if(data["empty_folder"]){
+							write_msg(get_lang("The selected folder is empty."));
+						}else
+						  download_attachments(null, null, data, null,null, name_folder +'.zip');
+					}
+					cExecute("$this.exporteml.export_all",hand_export,"folder="+name_box);	
+					write_msg(get_lang('You must wait while the messages will be exported...'));		
+				});
+				//FUNÃÃO DO eventNU FLUTUANTE NOVA PASTA < END
+			}
+			if(!$(".new_folder").length){
+				$(this).find(".float-menu:first").css("display", "");
+			}
+		},
+		function(){
+			$(this).find(".float-menu:first").hide();
+		}
+	);
+}
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/formatters.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/formatters.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/formatters.js	(revision 7210)
@@ -0,0 +1,49 @@
+bytes2Size = function(bytes) {
+	var sizes = ['B', 'KB', 'MB', 'GB', 'TB'];
+	if (bytes == 0) return 'n/a';
+	var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
+	var size = (i<2) ? Math.round((bytes / Math.pow(1024, i))) : Math.round((bytes / Math.pow(1024, i)) * 100)/100;
+	return  size + ' ' + sizes[i];
+}
+
+numberMonths = function(months){
+	switch(months){
+		case 'Jan':
+			return 1;
+		case 'Feb':
+			return 2;
+		case 'Mar':
+			return 3;
+		case 'Apr':
+			return 4;
+		case 'May':
+			return 5;
+		case 'June':
+			return 6;
+		case 'July':
+			return 7;
+		case 'Aug':
+			return 8;
+		case 'Sept':
+			return 9;
+		case 'Oct':
+			return 10;
+		case 'Nov':
+			return 11;
+		case 'Dec':
+			return 12;
+	}	
+}
+
+date2Time = function (timestamp) {
+	date = new Date();
+	dat = new Date(timestamp);
+	if ((date.getTime() - timestamp) < (24*60*60*1000)) {
+		return '<span class="timable" title="'+dat.getTime()+'"></span>';
+	} else {
+		date = new Date(timestamp);
+		var b = date.toString().split("T")[0].split("-");
+		var c = b[2] + "/" + b[1] + "/" + b[0];
+		return '<span class="datable">' + c + '</span>';
+	}
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/tabs.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/tabs.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/tabs.js	(revision 7210)
@@ -0,0 +1,129 @@
+var countID = 2;
+var tab_content = "";
+var tab_role = "";
+var lastIndexSelected = 0;
+/* 
+	method : createTab
+	descrition : create a new tab
+	params : {
+		label : Label of the tab
+		* role : Tab type
+		* content : Content of the tab
+		* href : Tab id 
+		* callback : a function
+	}
+	comments : {
+		#1 : if the user just set the label, a tab with blank content and a dynamic id is created
+		#2 : if a tab with a set href already exists, don't duplicate, this function only select the tab 
+		#3 : if the role is 
+	* = Optional
+*/
+
+function createTab(label, role, content,href, callback){
+	if( !$("#tabs-"+href).length){
+		tab_content = content ? content : "";
+		tab_role = role ? role : "new";
+		countID++;
+		$tabs.wijtabs("add", "#tabs-"+(href ? href : countID), (label.length > 21 ? label.substring(0, 18)+"..." : label));
+		if(typeof(callback) == 'function') 
+			callback($("#ptabs_"+(href ? href : countID)));
+		else
+			return $("#tabs-"+(href ? href : countID));
+	}else{
+		$tabs.wijtabs( "select", indexTab("#tabs-"+href) );
+	}
+}
+
+/* 
+	method : removeTab
+	descrition : remove a tab
+	params : {
+		* href : Tab id 
+		* callback : a function
+	}
+	comments : {
+		#1 : if the user doesn't set no parameter, this function just remove the open tab
+
+	* = Optional
+*/
+
+function removeTab(href, callback){
+	$tabs.wijtabs("remove", 
+		(
+			href ? 
+			indexTab(href) : lastIndexSelected
+		)
+	);
+	if(typeof(callback) == 'function') 
+		callback();
+}
+
+/* 
+	method : indexTab
+	descrition : return a tab index
+	params : {
+		* href : Tab id 
+	}
+	comments : {
+		#1 : if the user doesn't set no parameter, this function just return the index of the open tab
+
+	* = Optional
+*/
+
+function indexTab(href){
+	return href ? 
+		$( "li", $tabs ).index( $('[href="'+href+'"]').parent() ) : lastIndexSelected;
+}
+
+/*
+ method : idTab
+ descrition : remove a tab id
+ params : {
+ * index : Tab index
+ }
+ comments : {
+ #1 : if the user doesn't set no parameter, this function just return the id of the open tab
+
+ * = Optional
+ */
+
+function idTab(index){
+    return $( ".ui-tabs-panel", $tabs ).eq((index ? index : indexTab())).attr("id");
+}
+
+function getTabData(index){
+	return {
+		id : parseInt(idTab(index).substring(6).split("_r_")[0]),
+		folder : Base64.decode(idTab(index).substring(6).split("_r_")[1]),
+		role : getTabRole(index),
+		header : getTabHeader(index),
+		content : getTabContent(index)
+	};
+}
+
+function getTabHeader(index){
+    return $( $tabs ).find('[href="#'+$( ".ui-tabs-panel", $tabs ).eq((index ? index : indexTab())).attr("id")+'"]').parent();
+}
+
+function getTabRole(index){
+	return getTabContent(index).attr("role");
+}
+
+function getTabContent(index){
+	return $( ".ui-tabs-panel", $tabs ).eq((index ? index : indexTab()));
+}
+
+function setFolderTabTotal(value){
+	getTabHeader(0).find(".folder-tab-total-msgs-number").html(parseInt(value) ? value : 0);
+}
+
+function setFolderTabTotalUnread(value){
+	getTabHeader(0).find(".folder-tab-new-msgs-number").html(parseInt(value) ? value : 0);	
+	if(parseInt(value))
+		$("title").html($("title").html() +" ("+value+")");
+}
+
+function setFolderTabName(value){
+	getTabHeader(0).find(".folder-tab-name").html(value);	
+	$("title").html(value);
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/folder.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/folder.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/folder.js	(revision 7210)
@@ -0,0 +1,8 @@
+function changeFolder(folder, name){
+	var messages = DataLayer.get("message", {criteria: {folder: folder, rows: 999999}}, true);
+	Grid.jqGrid('clearGridData').jqGrid('setGridParam',{data:messages.rows}).trigger("reloadGrid");
+	setFolderTabName(name);
+	setFolderTabTotal(messages.records);
+	//TO-DO:: TROCAR ESSE METODO POR ALGUM LUGAR MAIS SEGURO
+	setFolderTabTotalUnread($("[id='"+folder+"']").find(".folder_unseen").html());
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/foldertree.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/foldertree.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/foldertree.js	(revision 7210)
@@ -0,0 +1,511 @@
+var init_tree = 0;
+var selected;
+var over;
+var cp_tree1;
+var cp_tree2;
+function unorphanize(root, element) {
+	var ok = false;
+	var f = 0;
+	for (var i=0; i<root.length; i++) {
+		if (root[i].id == element.parentFolder) {
+			element.children = new Array(); 
+			root[i].children.push(element);
+			return true;
+		} else if (ok = unorphanize(root[i].children, element)) {
+			break;
+		}
+	}
+	return ok;
+}
+
+function count_unseen_children(folder){
+	if(folder.children.length){
+		for(var i=0; i< folder.children.length; i++){
+			if(folder.children[i].children.length)
+				folder.children[i]['children_unseen'] = (folder.children[i]['children_unseen'] ? folder.children[i]['children_unseen'] : 0) + count_unseen_children(folder.children[i]);
+			
+			folder['children_unseen'] = (folder['children_unseen'] ? folder['children_unseen'] : 0)+ (folder.children[i]['children_unseen'] ? folder.children[i]['children_unseen'] : 0) + parseInt(folder.children[i].messageCount.unseen);			
+		}
+		return folder['children_unseen'];
+	}else{
+		return parseInt(folder.messageCount.unseen);
+	}
+}
+
+function valid_tabs(children_of_this_folder, folder_to_move){
+	var borders_open = $("#border_tr").children();
+
+	var error = false;
+	for(var i = 1; i <= borders_open.length -2; i ++){
+		//VERIFICA A CADA FILHO DA PASTA SE ESTA eventNSAGEM E DESTA PASTA
+		$.each(children_of_this_folder, function(index, value){
+			if($(children_of_this_folder[index]).attr('id') == openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")]){
+				error = true;
+				write_msg(get_lang("One or more messages from any sub-folder are open"));
+				return error;
+				
+			}
+		});
+		if(error){
+			return error;
+		}
+		//VERIFICA SE EXISTE NA PASTA A SER MOVIDA
+		if(openTab.imapBox[$(borders_open[i]).find("input[type=hidden]").attr("name")] == folder_to_move){
+			error = true;
+			write_msg(get_lang("One or more messages from this folder are open"));
+			return error;
+		}
+	}
+}
+
+function draw_new_tree_folder(callback){
+	
+	var folders = DataLayer.get("folder", true);
+	
+	if(!selected){
+		selected = "INBOX";
+	}
+	/*
+	if( folders )
+	{
+	    folders = $.map( folders, function( folder ){
+		  return {
+		    id: folder.folder_id,
+		    commonName: folder.folder_name,
+		    parentFolder: folder.folder_parent === "root" ? "" : folder.folder_parent,
+		    messageCount: { total : '', unseen : '0' }
+		  };
+	    });
+	}
+	else
+	    folders = DataLayer.get("folder", true);
+	*/
+	var tree1 = new Array();
+	var tree2 = new Array();
+	var tree3 = new Array();
+	for (var i=0; i<folders.length; i++) {
+		if (/^INBOX/.test(folders[i].id)) {
+			if (!unorphanize(tree1, folders[i])) {
+				folders[i].children = new Array();
+				tree1.push(folders[i]);
+			}
+		}
+		else if (/^user/.test(folders[i].id)) {
+			if (!unorphanize(tree2, folders[i])) {
+				folders[i].children = new Array();
+				tree2.push(folders[i]);
+			}
+		}
+		else if (/^local_messages/.test(folders[i].id)) {
+			if (!unorphanize(tree3, folders[i])) {
+				folders[i].children = new Array();
+				tree3.push(folders[i]);
+			}
+		}
+	}
+	
+	for(var i =0; i<tree1.length; i++){
+		count_unseen_children(tree1[i]);
+	}
+	for(var i =0; i<tree2.length; i++){
+		count_unseen_children(tree2[i]);
+	}
+	for(var i =0; i<tree3.length; i++){
+		count_unseen_children(tree3[i]);
+	}
+	cp_tree1 = tree1;
+	cp_tree2 = tree2;
+	var shared_acls = {};
+
+	$.each(cp_tree2, function(index, value){
+		shared_acls[value.id] = value.acl_share;
+	});
+
+	$("#content_folders").removeClass("menu-degrade").parent().removeClass("image-menu");
+	var html = DataLayer.render('../prototype/modules/mail/templates/detailedfoldertree.ejs', {folders: [tree1, tree2, tree3]});
+	var folders_html = $("#content_folders").html(html).find(".mainfoldertree").treeview({
+			persist: "cookie",
+			animated: "fast"
+	}).find(".folder").unbind("click").click(function(event){
+		
+		// MUDANÇA DE PASTAS!
+		var target = $(this);	
+		
+		if($(".folders-loading").length)
+			return;
+		
+		if($(event.target).parent().is(".float-menu"))
+			return;
+			
+		if( target.is('.collapsable-hitarea, .expandable-hitarea, .lastCollapsable-hitarea, .lastExpandable-hitarea, .treeview ,.folder_unseen,.ui-icon, .float-menu, .new_folder, .folders-loading, .head_folder, .shared-folders') )
+			return;
+		
+		if( target.parent().find(".new_folder").length)
+			return;
+			
+		if( !target.attr('id') )
+			target = target.parent();
+		if (target[0] == $(".mainfoldertree")[0]) return;
+		var uiId = target.attr('id');
+		var child = target.find('.folder');
+		  
+		if(!target.is('.mainfoldertree > .expandable-hitarea, .mainfoldertree > .collapsable-hitarea')){
+			$('.filetree span.folder.selected').removeClass('selected');
+			$(target).children('.folder').addClass('selected');
+		}
+		$(this).addClass("folders-loading");
+		selected = target.attr('id');
+		change_folder(target.attr('id'), child.attr('title'));	
+
+		$.ajax({
+			  url : "controller.php?"+ $.param( { action: "$this.imap_functions.get_folders_list", folder: target.attr('id') } ),
+			  success : function(data){
+				  data = connector.unserialize(data);
+
+				  if(data)
+				    build_quota(data);
+			  }
+		});
+
+	}).filter('.followup-messages').click(function(event, ui){
+		search_emails("UNDELETED KEYWORD \"$Followupflagged\"");
+	}).end().end();
+	
+	folders_html.find('[id="'+selected+'"]').children().addClass("selected");
+	$(".folder").not(".head_folder").not(".shared-folders").parent().find(".folder").not(".head_folder,.inbox,.drafts,.sent,.spam,.trash").draggable({
+		// DRAG DE PASTAS
+		start : function(){
+			$(this).css("color", "gray");
+		},
+		stop : function(){
+			$(this).css("color", "");
+		},
+		revert: "invalid",
+		helper: function(event){
+			if($.trim(($(this).text().split("["))[0]).length > 18)
+				return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : (($(this).text().split("["))[0]).substring(0,18) + "...", type: "folder"}));
+			return $(DataLayer.render('../prototype/modules/mail/templates/draggin_box.ejs', {texto : (($(this).text().split("["))[0]), type: "folder"}));
+		},
+		delay: 150,
+		refreshPositions: true,
+		zIndex : 2700,
+		//scroll: true, 
+		//scrollSensitivity: 100,
+		//scrollSpeed: 100,
+		containment: "#divAppbox" 
+	}).end().droppable({
+		//DROP DE PASTAS
+		over : function(a, b){
+			//INICIO : SE A PASTA CONTER FILHAS EXPANDE 
+			over = $(this);
+			$(this).addClass("folder-over");
+			if(($(this)[0] != $(this).parent().find(".head_folder")[0]))
+				if($(this).prev()[0])
+					if($(this).parent().find(".expandable-hitarea")[0] == $(this).prev()[0]){
+						setTimeout(function(){
+							if(over.hasClass("folder-over"))
+								over.prev().trigger("click");
+						}, 500);
+						
+					}
+			//FIM : SE A PASTA CONTER FILHAS EXPANDE
+			
+			//SETA BORDA EM VOLTA DA PASTA
+		},
+		out : function(){
+			//RETIRA BORDA EM VOLTA DA PASTA
+			$(this).removeClass("folder-over");
+		},
+		drop : function(event, ui){
+			$(this).removeClass("folder-over");
+			if($(this).parent().attr('id') == undefined){
+				var folder_to = 'INBOX';
+				var to_folder_title = get_lang("Inbox");
+			}else{
+				var folder_to = $(this).parent().attr('id');
+				var to_folder_title = $(this).attr('title');
+			}		
+			var folder_to_move = ui.draggable.parent().attr('id');
+			var border_id = ui.draggable.find("input[type=hidden]").attr("name");
+			// eventnsagens : SE O DROP VIER DA LISTA DE eventNSAGENS :
+			if(folder_to_move == "tbody_box"){
+				move_msgs2(get_current_folder(), 'selected', 0, folder_to, to_folder_title,true);
+				return refresh();
+			}
+			//SE FOR DE UMA PESQUISA RAPIDA
+			else if(ui.draggable.parents('[id^="content_id_"]')[0]){
+				move_search_msgs("content_id_"+border_id, folder_to, to_folder_title);
+				return refresh();
+			}
+			// eventnsagens : SE O DROP VIER DE UMA ABA ABERTA
+			else if(folder_to_move == "border_tr"){
+				var id_msg = border_id.split("_")[0];
+				folder = $("#input_folder_"+border_id+"_r")[0] ? $("#input_folder_"+border_id+"_r").val() : (openTab.imapBox[border_id] ? openTab.imapBox[border_id]:get_current_folder());
+				alternate_border(border_id);
+				move_msgs2(folder, id_msg, border_id, folder_to, to_folder_title,true);
+				return refresh();
+			}
+			// SE O DROP VIER DA LISTA DE PASTAS
+			else{
+				var folder_to_exist = folder_to_move.split(cyrus_delimiter);	
+				folder_to_exist = folder_to+cyrus_delimiter+folder_to_exist[folder_to_exist.length-1];
+				
+				//VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS
+
+				if(valid_tabs(ui.draggable.parent().find("li"), folder_to_move)){
+					return;
+				}
+				//FIM : VERIFICA SE EXISTE UMA eventNSAGENS ABERTA NESTA PASTA E NAS SUAS FILHAS;
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA PARA O eventSMO LOCAL
+				if(folder_to_exist == folder_to_move){
+					return write_msg(get_lang("Thie folder is already in this place"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER A PASTA ABERTA NO momentO
+				if(folder_to_move == get_current_folder()){
+					return write_msg(get_lang("It's not possible move this folder, because it is being used in the moment!"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA FILHA DA PASTA ABERTA NO momentO
+				if(ui.draggable.parent().find(".selected")[0]){
+					return write_msg(get_lang("It's not possible move this folder, because its subfolder is being used in the moment!"));
+				}
+				
+				// VALIDA SE O USUARIO ESTA TENTANDO MOVER UMA PASTA PAI PARA DENTRO DE UMA FILHA
+				if(ui.draggable.parent().find('[id="'+folder_to+'"]')[0]){
+					return write_msg(get_lang("It's not possible to move this folder to its subfolders!"));
+				}					
+				
+				if($('[id="'+folder_to_exist+'"]').length){
+					return write_msg(get_lang("Can not move this folder to this location, because the target has already a folder with this name"));
+				}
+				
+				$(this).addClass("folders-loading");
+				
+				$.ajax({
+					url : "controller.php?"+ $.param( { action: "$this.imap_functions.move_folder", folder_to_move: folder_to_move, folder_to: folder_to } ),
+					success : function(data){
+						cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+						data = connector.unserialize(data);
+						if(data == "Permission denied"){
+							write_msg(get_lang("Permission denied"));
+						}else if(data){
+							write_msg(get_lang("The folder was successfully moved"));
+						}
+						else{
+							write_msg(get_lang("ERROR moving your folder."));
+						}
+					}
+				});
+			}
+		}
+	});
+	$(".folder").not(".head_folder").not(".shared-folders").parent().find(".folder").hover(
+		function(){
+			//CASO A LI NÃO TENHA UM eventNU FLUTUANTE AINDA, O eventNU É ADICIONADO!
+			if(!$(this).children(":last").hasClass("float-menu") && !$(this).children(":last").hasClass("new_folder")){
+				var folder_ = $(this);
+				var folder_name;
+				var shared = {
+					head : false,
+					valid : false
+				};
+				if(folder_.parent().attr('id')){
+					folder_name = folder_.parent().attr('id').split(cyrus_delimiter);
+					folder_name = folder_name[folder_name.length -1];
+					shared.valid = folder_.parent().attr('id').search("user/") == 0 ? true : false;
+				}else
+					folder_name = "Root";
+				
+				if(shared.valid){
+					shared.head = folder_.parent().attr('id').split(cyrus_delimiter).length == 2 ?  true : false;
+					var folder_name_parts = folder_.parent().attr('id').split(cyrus_delimiter);
+					var acls = shared_acls[folder_name_parts[0]+cyrus_delimiter+folder_name_parts[1]];
+
+				}
+
+				html = DataLayer.render("../prototype/modules/mail/templates/float_folder_menu.ejs", {name_folder : folder_name, flag : shared, acl : acls});					
+					//FUNÇÃO DO eventNU FLUTUANTE EDITAR < BEGIN
+				var esc = false;
+				$(folder_).append(html).find(".float-menu-edit").click(function(){
+					var folder_id = $(this).parents(".closed:first").attr('id');
+					var name = $.trim($(this).parents(".closed:first").find("span:first").text().split("[")[0]);
+					if($(this).parents(".closed:first").find("span:first").hasClass("selected"))
+						return write_msg(get_lang("It's not possible rename this folder, because it is being used in the moment!"));
+					if($(this).parents(".closed:first").find(".selected").length)
+						return write_msg(get_lang("It's not possible rename this folder, because its subfolder is being used in the moment!")); 
+					if(valid_tabs($(this).parents("li:first").find("li"), folder_id))
+						return;
+					$(this).parents(".closed:first").find("span:first").empty().append("<input class='new_folder folder' type='text' maxlength='100'></input>");
+					$(".new_folder").focus().keydown(function(event){
+						event.stopPropagation();
+						if(event.keyCode == 13){
+							if($(this).val() != ""){
+								if($(this).val().match(/[\/\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi)){
+									return write_msg(get_lang("cannot create folder. try other folder name"));
+								}
+								var new_name = folder_id.replace(/[a-zA-Z0-9á-úÁ-Ú^\s_-]+$/, $(this).val());
+								if($('[id="'+new_name+'"]').length){
+									$(".folders-loading").removeClass("folders-loading");
+									write_msg(get_lang("Mailbox already exists"));
+									return draw_new_tree_folder();
+								}
+								$(".new_folder").parent().addClass("folders-loading");
+								$.ajax({
+									url : "controller.php?action=$this.imap_functions.ren_mailbox",
+									type : "POST",
+									data : "current="+folder_id+"&rename="+new_name,
+									success : function(data){
+										data = connector.unserialize(data);
+										if(data == "Permission denied"){
+											$(".folders-loading").removeClass("folders-loading");
+											cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+											return write_msg(get_lang("Permission denied"));
+										}
+										write_msg(get_lang("The folder was successfully rename"));
+										cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+									}
+								});
+							}
+						}else if( event.keyCode == 27){
+							draw_new_tree_folder();
+						}
+					}).focusout(function(){
+						draw_new_tree_folder();
+					}).val(name);
+				})
+				//FUNÇÃO DO eventNU FLUTUANTE EDITAR < END
+				//FUNÇÃO DO eventNU FLUTUANTE EXCLUIR < BEGIN
+				.end().find(".float-menu-remove").click(function(){
+					
+					var folder_id = $(this).parents(".closed:first").attr('id');
+					var folder_name = "<strong>"+$.trim($(this).parents(".closed:first").find(".folder").text().split("[")[0])+"</strong>";
+					
+					if(valid_tabs($(this).parents("li:first").find("li"), folder_id))
+						return;
+					$(this).parents(".closed:first").find(".folder").addClass("folders-loading"); 
+					
+					if($(this).parents(".closed:first").find("ul").length){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return write_msg(get_lang("Delete/move subfolders first"));
+					}
+					if($(this).parents(".closed:first").find(".selected").length){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return write_msg(get_lang("It's not possible delete this folder, because it is being used in the moment!")); 
+					}
+					var folder_span = $(this);
+					var confirm_text = get_lang("Do you wish to exclude the folder ");
+					$.Zebra_Dialog(confirm_text+folder_name, {
+						'type':     'question',
+						'overlay_opacity': '0.5',
+						'buttons':  [get_lang('Yes'), get_lang('No')],
+						'onClose':  function(caption) {
+							if(caption == get_lang('Yes')){
+								$.ajax({
+									url : "controller.php?action=$this.imap_functions.delete_mailbox",
+									type: "POST",
+									data : "del_past="+folder_id,
+									success : function(data){
+										data = connector.unserialize(data);
+										if(data == "Mailbox does not exist"){
+											$(".folders-loading").removeClass("folders-loading");
+											return write_msg(get_lang("Mailbox does not exist"));
+										}else if(data == "Permission denied"){
+											$(".folders-loading").removeClass("folders-loading");
+											cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+											return write_msg(get_lang("Permission denied"));
+										}
+										write_msg(get_lang("The folder %1 was successfully removed", folder_name));
+										cExecute("$this.imap_functions.get_folders_list&onload=true", update_menu);
+									}
+								});
+							}else{
+								folder_span.parents(".closed:first").find(".folder").removeClass("folders-loading");
+								return;
+							}
+						}
+					});
+					/* if(!confirm(confirm_text + folder_name)){
+						$(this).parents(".closed:first").find(".folder").removeClass("folders-loading");
+						return;
+					} */
+				})
+				//FUNÇÃO DO eventNU FLUTUANTE EXCLUIR < END
+				//FUNÇÃO DO eventNU FLUTUANTE NOVA PASTA < BEGIN
+				.end().find(".float-menu-new").click(function(){
+					$(this).parents(".float-menu").hide();
+					var selected_li = $(this).parents(".closed:first");
+					if(selected_li.find("ul:first").length){
+						var new_folder = $("<li><input class='new_folder folder' type='text' maxlength='100'></input></li>").appendTo(selected_li.find("ul:first"));								
+						if(selected_li.find(".expandable-hitarea").length){
+							selected_li.find(".expandable-hitarea").trigger('click');
+						}
+						selected_li.find("ul:first").treeview({
+							add: new_folder
+						});
+					}else if(selected_li.length){
+						var new_folder = $("<ul><li><input class='new_folder folder' type='text' maxlength='100'></input></li></ul>").appendTo(selected_li);								
+						selected_li.treeview({
+							add: new_folder
+						});
+					}else{
+						selected_li = $(this).parents(".head_folder").parent();
+						if($(this).parents(".head_folder").parent().find(".expandable-hitarea").length){
+							$(this).parents(".head_folder").parent().find(".expandable-hitarea").trigger('click');
+						}
+						var new_folder = $("<ul><li><input class='new_folder folder' type='text' maxlength='100'></input></li></ul>").appendTo(selected_li);								
+						selected_li.treeview({
+							add: new_folder
+						});
+					}
+					
+					selected_li.find(".new_folder").Watermark("Nova Pasta").focus().keydown(function(event){
+						event.stopPropagation();
+						if(event.keyCode == 13){
+							if($(this).val().match(/[\`\~\^\<\>\|\\\"\!\@\#\$\%\&\*\+\(\)\[\]\{\}\?;:]/gi)){
+								return write_msg(get_lang("cannot create folder. try other folder name"));
+							}
+							if($('[id="'+ (selected_li.attr('id')? selected_li.attr('id') : "INBOX") + cyrus_delimiter + $(this).val()+'"]').length){
+								$(".folders-loading").removeClass("folders-loading");
+								write_msg(get_lang("Mailbox already exists"));
+								return draw_new_tree_folder();
+							}
+							$(".new_folder").parent().addClass("folders-loading");
+							create_new_folder(($(this).val() != "" ? $(this).val() : get_lang("New Folder")), (selected_li.attr('id')? selected_li.attr('id') : "INBOX"));
+						}else if( event.keyCode == 27){
+							draw_new_tree_folder();
+						}
+					}).focusout(function(){
+						draw_new_tree_folder();
+					});
+				}).end().find(".float-menu-export").click(function(){
+					//proxy_mensagens.export_all_messages($(this).parents("li:first").attr("id"))
+
+					var name_box = $(this).parents("li:first").attr("id");
+					var name_folder = name_box.split(cyrus_delimiter)[name_box.split(cyrus_delimiter).length-1];
+
+					var hand_export = function(data){
+						if(!data){
+							write_msg(get_lang('Error compressing messages (ZIP). Contact the administrator.'))
+						}else if(data["empty_folder"]){
+							write_msg(get_lang("The selected folder is empty."));
+						}else
+						  download_attachments(null, null, data, null,null, name_folder +'.zip');
+					}
+					cExecute("$this.exporteml.export_all",hand_export,"folder="+name_box);	
+					write_msg(get_lang('You must wait while the messages will be exported...'));		
+				});
+				//FUNÇÃO DO eventNU FLUTUANTE NOVA PASTA < END
+			}
+			if(!$(".new_folder").length){
+				$(this).find(".float-menu:first").css("display", "");
+			}
+		},
+		function(){
+			$(this).find(".float-menu:first").hide();
+		}
+	);
+	$("#new_m").html($('.selected').find(".folder_unseen").html() ? $('.selected').find(".folder_unseen").html() : "0").css("color", "red");
+}
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/label.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/label.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/label.js	(revision 7210)
@@ -0,0 +1,505 @@
+function msgCallback(msg){
+	switch(msg){
+		case '#LabelNameError': 
+			alert('Já existe um marcador com esse nome.');
+			break;
+		case '#LabelSlotError':
+			alert('Atingido limite de marcadores criados.');
+			break;	
+		default:
+			alert('Ocorreu um erro ao salvar o Marcador');
+	}
+}
+function configureLabel(event, ui){
+	var idmarkernow = $(this).find('[name="labelItemId"]').val();
+	winElement.find('.edit-label').val(idmarkernow);
+	winElement.find('.input-nome').val($(this).find("span").text());
+	
+	var colorpicker = winElement.find('.lebals-colorpicker');
+	colorpicker.find('input[name="backgroundColor"]').val(rgb2hex($(this).css("backgroundColor")))
+	.css("background-color", $(this).css("backgroundColor")).focus().end()
+	.find('input[name="fontColor"]').val(rgb2hex($(this).css("color"))).css("background-color", $(this).css("color")).focus().end()
+	.find('input[name="borderColor"]').val(rgb2hex($(this).css("border-left-color"))).css("background-color", $(this).css("border-left-color")).focus().end()
+	.find('.preview-label-outer').css({
+		'background-color':$(this).css("backgroundColor"),
+		'color':$(this).css("color"),
+		'border-color':$(this).css("border-left-color")
+	})		
+	winElement.find(".preview-label-inner").text($(this).text());
+}
+
+function editLabel(data){	
+	var conteudoSpan = $(this).parent().find(".text-list").text();
+	var span = $(this).parent().find(".text-list");
+	$(this).parent().trigger('click').unbind('click', configureLabel).find("span.text-list")
+	.html('<input name="edit-value-list" class="edit-value-list" type="text" maxlength="18" value="'+conteudoSpan+'">').find("input[name='edit-value-list']").keydown(function(event){
+		event.stopPropagation();
+		$("input.edit-value-list").keyup(function () {
+			var value = $(this).val();
+			winElement.find('.input-nome').val(value);
+		}).keyup();
+		if(event.keyCode == 13){
+			event.preventDefault();
+			var nameLabel = $(".label-list").find(".edit-value-list").val();
+			$(span).html(conteudoSpan)
+			.parent().find('.edit').css("display","").parents("li").click(configureLabel);
+			save_editLabel(nameLabel, data.applyToSelectedMessages);
+		}else if( event.keyCode == 27){
+			$(this).trigger("focusout");
+		}
+	}).focusout(function(){
+		$(span).html(conteudoSpan)
+		.parent().find('.edit').css("display","").parents("li").click(configureLabel);
+	}).focus();
+	$(this).hide();
+}
+
+function deleteLabel(event){
+	var id = $(this).parents(".label-item").attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/)[1];
+	var nameLabel = winElement.find(".input-nome").val();
+	confirmDelete(id, nameLabel);
+	event.stopImmediatePropagation();
+}
+
+function colors_suggestions(){
+	return [
+				{name:'Padrão', border:'#3366cc', font:'#ffffff', background:'#3366cc'},
+				{name:'Coala', border:'#123456', font:'#ffffff', background:'#385c80'},
+				{name:'Tomate', border:'#d5130b', font:'#111111', background:'#e36d76'},
+				{name:'Limão', border:'#32ed21', font:'#1f3f1c', background:'#b2f1ac'},
+				{name:'Alto contraste', border:'#000000', font:'#ffffff', background:'#222222'}
+			]		
+}
+
+function rgb2hex(rgb){	
+	if(!!(rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/))){
+		return "#" +
+		("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
+		("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
+		("0" + parseInt(rgb[3],10).toString(16)).slice(-2);
+	}else{
+		return rgb;
+	}
+}
+
+function updateMessageLabels(msgsReference){
+	for(var i = 0; i < msgsReference.length; i++){
+		updateLabelsColumn({msg_number: msgsReference[i].messageNumber, boxname: msgsReference[i].folderName});
+	}	
+}
+
+function confirmDelete(id,nameLabel){
+	$.Zebra_Dialog('Deseja excluir esse marcador <strong>'+nameLabel+'</strong> das conversas que está relacionado e excluí-lo sem remover as conversas?', {
+		'type':     'question',
+		'custom_class': (is_ie ? 'configure-zebra-dialog' : ''),
+		'title':    'Atenção',
+		'buttons': ['Sim','Não'],		
+		'overlay_opacity': '0.5',
+		'onClose':  function(caption) {
+			if(caption == 'Sim'){
+				delete_label(id);
+			}
+		}
+	});	
+	if(is_ie)
+		$(".ZebraDialogOverlay").css("z-index","1006");
+}		
+	
+function save_editLabel(nameLabel, apply){	
+
+	var lengthSpace = $.trim(nameLabel);
+	
+	if( lengthSpace.length >= 2){	
+		var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length;	
+		// salvar marcador
+		if(qtdLi > 0 ){
+			$(".save-label").button("disable");
+			var labelEdited = {
+				id : winElement.find(".edit-label").val(),
+				uid: User.me.id,
+				name : winElement.find('.input-nome').val().trim(),
+				backgroundColor : winElement.find("input[name='backgroundColor']").val(),
+				fontColor : winElement.find("input[name='fontColor']").val(),
+				borderColor : winElement.find("input[name='borderColor']").val()
+			}
+			DataLayer.put('label', labelEdited.id, labelEdited);
+			DataLayer.commit(false, false, function(data){
+				var hasLabel = true;
+				$.each(data, function(index, value) {
+					
+					hasLabel = typeof value == 'object' ? false : value;
+					
+				});
+					
+					if(!hasLabel){
+						$(".label-list-container .label-list li").each(function(){
+							var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+							
+							 if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
+							   $(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span class='text-list'>"+labelEdited.name+"</span><div class='button close tiny' style='float: right'></div><div class='button edit tiny' style='float: right'></div>").css({
+								"background" : labelEdited.backgroundColor,
+								"color" : labelEdited.fontColor, 
+								"border-color" : labelEdited.borderColor	
+							   });
+							   $(this).trigger('click');
+							 }	
+						});
+						
+						$("#MyMarckersList .label-list li").each(function(){
+							var regex_match_2 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+							
+							if(regex_match_2 && regex_match_2[1] && regex_match_2[1] == labelEdited.id){
+								$(this).html("<input type='hidden' name='labelItemId' class='id-item-list' value='"+labelEdited.id+"'>"+"<span>"+labelEdited.name+"</span>");
+								$(this).find(".square-color").css('background', labelEdited.backgroundColor);
+							}	
+						});
+					
+						winElement.find(".insert-label").val("");
+						$.Watermark.ShowAll();
+						
+						$(".label-list-container .label-list li").find('.button').button()
+							.filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end()
+							.filter('.close').button({icons:{primary:'ui-icon-close'}, text:false});
+							
+						winElement.find('.edit').unbind("click").click(editLabel);				
+						winElement.find('.close').click(deleteLabel);
+						
+						draw_tree_labels();
+						var msgsReference = DataLayer.get('labeled', {filter: ['=', 'labelId', ''+labelEdited.id]}, true);
+						updateMessageLabels(msgsReference);
+				
+						/**
+						* Atualiza menu remove o menu presente em cada mensagem listada em uma pasta 
+						* e carrega novamente para que os dados sejam atualizados
+						*/
+						$.contextMenu( 'destroy', ".table_box tbody tr");
+						loadMenu();
+					}else{
+						msgCallback(hasLabel);
+					}
+					
+					$(".add-label-button").empty()
+					.addClass("ui-icon ui-icon-plus");
+					//winElement.find('.input-nome').val("").focus;
+			});
+		// criar marcador
+		} else {
+			var nameLabel = winElement.find(".input-nome").val();
+			new_label(nameLabel, false, apply);				
+			$.Watermark.ShowAll();		
+			$(".save-label").button("disable");	
+		}
+		//$(".label-list-container .label-list").find(".label-item-"+labelEdited.id).trigger("click");
+	} else {
+		alert("Mínimo 2 caracteres");
+	}	
+}
+
+function delete_label(id){
+	$(".label-list li").each(function () {
+		var regex_match = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+		if (regex_match && regex_match[1] && regex_match[1] == id) {	
+			$(this).remove();
+		}
+	});
+	
+	var msgsReference = DataLayer.get('labeled', {filter: ['=', 'labelId', ''+id]}, true);
+		
+	DataLayer.remove('label', id);
+
+	DataLayer.commit(false, false, function(data){
+		$.contextMenu( 'destroy', ".table_box tbody tr");
+		loadMenu();
+		updateMessageLabels(msgsReference);	
+	});
+	winElement.find(".label-list li:first").trigger("click");
+	
+	if($(".label-list li").length == 0){
+		winElement.find(".label-list-container").html('<ul class="label-list"><li class="empty-item">'+get_lang("No labels found.")+'.</li></ul>');
+		$(".save-label").button("disable");	
+	}
+	var qtdLi = $(".label-list-container ul").find("li").not(".empty-item").length;
+	if (qtdLi == 0){
+		$(".my-labels").hide();
+		$(".label-list-container ul").find(".empty-item").css("display","");
+		winElement.find(".buttons .save-label .ui-button-text").text('Criar');
+		$(".delete-label").button("disable");	
+		$(".save-label").button("disable");	
+				
+		winElement.find('.input-nome').val("");
+		winElement.find(".preview-label-inner").text("");
+	
+		var colorpicker = winElement.find('.lebals-colorpicker');
+		colorpicker.find('input[name="backgroundColor"]').val("#ebebeb")
+		.css("background-color", "#ebebeb").focus().end()
+		.find('input[name="fontColor"]').val("#000000").css("background-color", "#000000").focus().end()
+		.find('input[name="borderColor"]').val("#000000").css("background-color", "#000000").focus().end()
+		.find('.preview-label-outer').css({
+			'background-color':"#ebebeb",
+			'color':"#000000",
+			'border-color':"#000000"
+		});
+		$(".input-nome").keyup(function () {
+			var value = $(this).val();
+			winElement.find('.preview-label-inner').text(value);
+		}).keyup();				
+	}	
+}
+
+function new_label(nameLabel, isNew, apply){
+	var labelCreated = {
+		uid: User.me.id,
+		name : nameLabel.trim(),
+		backgroundColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(),
+		fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(),
+		borderColor :!!isNew ? '#000000' : winElement.find("input[name='borderColor']").val()
+	}
+	DataLayer.put('label', labelCreated);
+	
+	$(".add-label-button").removeClass("ui-icon ui-icon-plus")
+	.html('<img alt="Carregando" title="Carregando" style="margin-left:10px;" src="../prototype/modules/mail/img/loader.gif" />');
+	var hasLabel = true;
+	var labelId;
+	DataLayer.commit(false, false, function(data){
+		$.each(data, function(index, value) {
+			if(typeof value == 'object'){
+				hasLabel = false;
+				labelId = value.id;
+			}else{
+				hasLabel = value;
+			}
+		});
+	
+		if(!hasLabel){
+			newLabel = {
+				id: labelId, 
+				name : nameLabel.trim(),
+				uid: User.me.id,
+				bgColor : !!isNew ? '#ebebeb' : winElement.find("input[name='backgroundColor']").val(),
+				fontColor : !!isNew ? '#000000' : winElement.find("input[name='fontColor']").val(),
+				borderColor : !!isNew ? '#000000' : winElement.find("input[name='borderColor']").val()
+			};
+		
+			/** Marca as mensagens selecionadas com o marcador criado*/
+			if(apply){
+				labeledMessages(newLabel.id)
+			}
+			
+			$(".label-list-container ul").find(".empty-item").css("display","none");
+			$(".label-list-container ul")
+			.prepend(DataLayer.render("../prototype/modules/mail/templates/label_listitem.ejs", newLabel))
+			.find("li:first")
+			.fadeIn("slow").click(configureLabel);
+			
+			draw_tree_labels();
+
+			$(".label-list-container .label-list li").not(".empty-item").click(function(){
+				$(".label-list-container .label-list li").find("img").remove();
+				$(".label-list-container .label-list li.label-item").removeClass("selected");
+				$(this).prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>");
+				$(this).addClass("selected");
+			});
+			
+			$(".label-list-container .label-list li").find('.button').button()
+			.filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end()
+			.filter('.close').button({icons:{primary:'ui-icon-close'}, text:false});
+			
+			//posiciona para edição o label inserido			
+			winElement.find("ul.label-list li:first").trigger("click");			
+			winElement.find(".buttons .save-label .ui-button-text").text('Salvar');
+			$(".delete-label").button("enable");
+			
+			winElement.find('.edit').unbind("click").click(editLabel);				
+			winElement.find('.close').click(deleteLabel);
+			
+			$(".my-labels").show();
+			
+			$.contextMenu( 'destroy', ".table_box tbody tr");
+			loadMenu();
+			
+			$(".add-label-button").empty()
+			.addClass("ui-icon ui-icon-plus");
+		}else{
+			$(".add-label-button").empty()
+			.addClass("ui-icon ui-icon-plus");
+			msgCallback(hasLabel);
+		}
+	});
+}
+
+function init_label(data){
+
+	winElement = data.window;
+	
+	//TODO Mudar quando API abstrair atualizações no cache
+	DataLayer.remove('label',false);
+	labels = DataLayer.get('label',{criteria:{order: 'name'}});
+	
+	if(labels){
+		Label_List = winElement
+		.find(".label-list-container").html(DataLayer.render("../prototype/modules/mail/templates/label_list.ejs", {labels: labels}));
+		
+	}else{
+		//Exibe a mensagem informando o usuário de que não há nenhum marcador cadastrado.
+		Label_List = winElement
+		.find(".label-list-container").html('<ul class="label-list"><li class="empty-item">'+get_lang("No labels found.")+'.</li></ul>');
+		
+	}
+	Label_List.end()
+	.find('.button').button()
+	.filter('.edit').button({icons:{primary:'ui-icon-pencil'}, text:false}).end()
+	.filter('.close').button({icons:{primary:'ui-icon-close'}, text:false}); 	
+	
+	winElement.find('.edit').click(editLabel);
+	winElement.find('.close').click(deleteLabel);
+	
+	//marca 'd agua
+	winElement.find(".insert-label").Watermark(winElement.find(".insert-label").val());
+	
+	/*
+	$("input.insert-label").keyup(function () {
+		$.Watermark.HideAll();
+		var value = $(this).val();
+		winElement.find('.input-nome').val(value);
+	}).keyup();
+	*/
+	if (!(labels)){
+		winElement.find(".buttons .save-label .ui-button-text").text('Criar');
+		$(".delete-label").button("disable");
+	}else{
+		winElement.find(".label-list li:first").addClass("selected").prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>");
+	}
+	$(".save-label").button("disable");
+	/**
+	* seta a ação de click para os marcadores listados na tela
+	*/
+	winElement.find(".label-list li").not(".empty-item").click(configureLabel);
+	
+	if (data.selectedItem)
+		winElement.find(".label-list li.label-item-"+data.selectedItem).trigger("click");
+	else
+		winElement.find(".label-list li:first").trigger("click");
+		
+	var dataColorPicker = {
+		colorsSuggestions: colors_suggestions()
+	};
+	
+	winElement.find('select.color-suggestions').change(function() {
+		$(".save-label").button("enable");
+		var colorpicker = winElement.find('.lebals-colorpicker');
+		var colors;
+		if(colors = dataColorPicker.colorsSuggestions[$(this).val()]) {	
+			colorpicker
+			.find('input[name="fontColor"]').val(colors.font).focus().end()	
+			.find('input[name="backgroundColor"]').val(colors.background).focus().end()
+			.find('input[name="borderColor"]').val(colors.border).focus().end()
+
+			.find('.preview-label-outer').css({
+				'background-color':dataColorPicker.colorsSuggestions[$(this).val()].background,
+				'border-color':dataColorPicker.colorsSuggestions[$(this).val()].border,
+				'color':dataColorPicker.colorsSuggestions[$(this).val()].font 
+			});
+		}					
+	});
+	var colorpickerPreviewChange = function(color) {
+			
+		var pickedup = winElement.find('.colorwell-selected').val(color).css('background-color', color);
+
+		$(".save-label").button("enable");
+		
+		var colorpicker = winElement.find('.lebals-colorpicker');			
+
+		if (pickedup.is('input[name="backgroundColor"]')) {
+			colorpicker.find('.preview-label-outer').css('background-color',color);
+		} else if (pickedup.is('input[name="fontColor"]')) {
+			colorpicker.find('.preview-label-outer').css('color',color);
+		} else if (pickedup.is('input[name="borderColor"]')) {
+			colorpicker.find('.preview-label-outer').css('border-color',color);
+		}		
+	} 
+		
+	var f = $.farbtastic(winElement.find('.colorpicker'), colorpickerPreviewChange);
+	var selected;
+				
+	winElement.find('.colorwell').each(function () {
+		f.linkTo(this);
+	})
+	.focus(function() {
+		if (selected) {
+			$(selected).removeClass('colorwell-selected');
+		}
+		$(selected = this).addClass('colorwell-selected');
+		f.linkTo(this, colorpickerPreviewChange);
+		f.linkTo(colorpickerPreviewChange);
+	});
+	
+	winElement.find(".add-label-button").click(function (event) {
+		$.Watermark.HideAll();
+		var nameLabel = winElement.find(".insert-label").val();
+		
+		var lengthSpace = $.trim(nameLabel);
+		
+		if(lengthSpace.length >= 2){
+			new_label(nameLabel, true, data.applyToSelectedMessages);
+			$.Watermark.ShowAll();
+			winElement.find(".insert-label").val("");
+			} else {
+				alert("Mínimo 2 caracteres");
+			}
+		event.stopImmediatePropagation();
+	});
+	
+	winElement.find('.insert-label').keydown(function(event, ui) {
+		if (event.keyCode == 13)
+			winElement.find(".add-label-button").trigger('click');
+	});
+	
+	//excluir marcador {deve ser para o botão grande na janela de edição e nao o pequeno da lista}
+	winElement.find(".buttons .delete-label").click(function(event){
+		var id = winElement.find(".edit-label").val();		
+		var nameLabel = winElement.find(".input-nome").val();	
+		confirmDelete(id, nameLabel);
+		event.stopImmediatePropagation();
+	});
+	
+	$(".label-list-container .label-list li").not(".empty-item").click(function(){
+		$(".label-list-container .label-list li").find("img").remove();
+		$(".label-list-container .label-list li.label-item").removeClass("selected");
+		$(this).prepend("<img src='../prototype/modules/mail/img/triangle.png' style='margin: 0 5px 0 -5px;'>");
+		$(this).addClass("selected");
+	});
+		
+	//salvar/criar marcador
+	winElement.find(".buttons .save-label").click(function(){
+		var nameLabel = winElement.find(".input-nome").val();
+		save_editLabel(nameLabel, data.applyToSelectedMessages);
+	});	
+	//desfazer marcador
+	winElement.find(".buttons .undo-label").click(function(event){
+		var edit = winElement.find(".edit-label").val();		
+		$(".label-list-container .label-list li").each(function(){
+			var regex_match_3 = $(this).attr("class").match(/label-item-([\d]+[()a-zA-Z]*)/);
+			if(regex_match_3 && regex_match_3[1] && regex_match_3[1] == edit){
+				$(this).trigger("click");
+			}
+		});
+	});
+	
+	//fechar
+	$(".button-close-window .close-window").click(function(){
+		$(".label-configure-win").dialog("close");
+	});
+	
+	winElement.find(':input').change(function(event){
+		if (event.keyCode != '27' && event.keyCode != '13' && !$(event.target).is(".edit-value-list") && !$(event.target).is(".insert-label") )
+		winElement.find(".save-label").button("enable");
+	}).keydown(function(event){
+		if (event.keyCode != '27' && event.keyCode != '13' && !$(event.target).is(".edit-value-list") && !$(event.target).is(".insert-label"))
+		winElement.find(".save-label").button("enable");
+	});	
+
+	$(".input-nome").keyup(function () {
+				var value = $(this).val();
+				winElement.find('.preview-label-inner').text(value);
+	}).keyup();	
+}
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/followupflag.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/followupflag.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/followupflag.js	(revision 7210)
@@ -0,0 +1,724 @@
+MsgsCallbackFollowupflag = {
+
+    '#FollowupflagMessageIdError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém o atributo message-id.');
+    },
+    '#FollowupflagLimitError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: limite de flags atingido para esta pasta.');
+    },
+    '#FollowupflagParamsError': function(){
+	alert('Não foi possível sinalizar esta mensagem. \nDetalhes do erro: mensagem não contém todos os atributos necessários.');
+    }
+    
+}
+
+function updateCacheFollowupflag(msgNumber, msgFolder, op){
+	if(op){
+		if(typeof msgNumber == 'object'){
+			var extend = DataLayer.get('followupflagged', {
+				filter: ['AND', ['IN', 'messageNumber', msgNumber], ['IN', 'folderName', msgFolder]],
+				criteria: {deepness: 1}
+			}, true);
+		} else{
+			var extend = DataLayer.get('followupflagged', {
+				filter: ['AND', ['=', 'messageNumber', msgNumber], ['=', 'folderName', msgFolder]],
+				criteria: {deepness: 1}
+			}, true);
+		}
+
+		
+		if(extend != "" || extend != 'undefined' || extend != []){
+			for(var i = 0; i < extend.length; i++){
+				if(!(onceOpenedHeadersMessages[extend[i].folderName])){
+					onceOpenedHeadersMessages[extend[i].folderName] = {};
+				}
+				if(!(onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber])){
+					onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber] = [];	
+				}
+				onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber]['followupflagged'] = {};
+				DataLayer.merge(onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber]['followupflagged'], extend[i]);
+				
+				/*
+				if(onceOpenedHeadersMessages[extend[i].folderName]){
+					if(onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber]){
+						onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber]['followupflagged'] = {};
+						DataLayer.merge(onceOpenedHeadersMessages[extend[i].folderName][extend[i].messageNumber]['followupflagged'], extend[i]);
+					}
+				}*/
+
+			}
+		}
+	}else{
+		onceOpenedHeadersMessages[msgFolder][msgNumber]['followupflagged'] = undefined;	
+	}
+}
+
+function init_followup(data){
+
+	winElement = data.window;
+	selectedMessageIds = data.selectedMessages;
+	folder = current_folder;
+
+	/**
+	 * Implementação do widget de input-combobox
+	 */
+ 
+	(function( $ ) {
+		$.widget( "ui.combobox", {
+			_create: function() {
+				var self = this,
+					select = this.element.hide(),
+					selected = select.children( ":selected" ),
+					value = selected.val() ? selected.text() : "";
+				var input = this.input = $( "<input>" )
+					.insertAfter( select )
+					.val( value )
+					.autocomplete({
+						delay: 0,
+						minLength: 0,
+						source: function( request, response ) {
+							var matcher = new RegExp( $.ui.autocomplete.escapeRegex(request.term), "i" );
+							response( select.children( "option" ).map(function() {
+								var text = $( this ).text();
+								if ( this.value && ( !request.term || matcher.test(text) ) )
+									return {
+										label: text.replace(
+											new RegExp(
+												"(?![^&;]+;)(?!<[^<>]*)(" +
+												$.ui.autocomplete.escapeRegex(request.term) +
+												")(?![^<>]*>)(?![^&;]+;)", "gi"
+											), "<strong>$1</strong>" ),
+										value: text,
+										option: this
+									};
+							}) );
+						},
+						select: function( event, ui ) {
+							ui.item.option.selected = true;
+							self._trigger( "selected", event, {
+								item: ui.item.option
+							});
+						},
+						change: function( event, ui ) {
+							if ( !ui.item ) {
+								var matcher = new RegExp( "^" + $.ui.autocomplete.escapeRegex( $(this).val() ) + "$", "i" ),
+									valid = false;
+								select.children( "option" ).each(function() {
+									if ( $( this ).text().match( matcher ) ) {
+										this.selected = valid = true;
+										return false;
+									}
+								});
+								/*
+								if ( !valid ) {
+									// remove invalid value, as it didn't match anything
+									$( this ).val( "" );
+									select.val( "" );
+									input.data( "autocomplete" ).term = "";
+									return false;
+								}
+								*/
+								if ( !valid ) {
+									if(select.has('option[value="custom"]').length > 0) {
+										select.find('option:last').val('custom').html($(this).val()).attr('selected', 'selected');
+									} else {
+										select.append(select.find('option:last').clone().val('custom').html($(this).val()));
+										select.find('option[value="custom"]').attr('selected', 'selected');
+									}
+								}
+							}
+						}
+					})
+					.addClass( "ui-widget ui-widget-content ui-corner-left" );
+
+				input.data( "autocomplete" )._renderItem = function( ul, item ) {
+					return $( "<li></li>" )
+						.data( "item.autocomplete", item )
+						.append( "<a>" + item.label + "</a>" )
+						.appendTo( ul );
+				};
+
+				this.button = $( "<button type='button'>&nbsp;</button>" )
+					.attr( "tabIndex", -1 )
+					.attr( "title", "Show All Items" )
+					.insertAfter( input )
+					.button({
+						icons: {
+							primary: "ui-icon-triangle-1-s"
+						},
+						text: false
+					})
+					.removeClass( "ui-corner-all" )
+					.addClass( "ui-corner-right ui-button-icon" )
+					.click(function() {
+						// close if already visible
+						if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
+							input.autocomplete( "close" );
+							return;
+						}
+
+						// work around a bug (likely same cause as #5265)
+						$( this ).blur();
+
+						// pass empty string as value to search for, displaying all results
+						input.autocomplete( "search", "" );
+						input.focus();
+					});
+			},
+
+			destroy: function() {
+				this.input.remove();
+				this.button.remove();
+				this.element.show();
+				$.Widget.prototype.destroy.call( this );
+			}
+		});
+	})( jQuery );
+	/**
+	 * #END: Implementação do widget de input-combobox
+	 */
+
+	winElement.find('.button').button()
+	.filter('.menu-configure-followupflag .cancel').click(function(){
+		winElement.dialog("close");
+	}).end()
+	
+	.filter('.menu-configure-followupflag .save').click(function(){	
+	var saveFollowupflagged = function(){
+		var idFollowupflagged = winElement.find('[name="followupflagId"]').val();
+			idFollowupflagged = idFollowupflagged.split(',');
+			for(x=0; x<idFollowupflagged.length; x++){
+				(idFollowupflagged[x] == "false") ? idFollowupflagged[x] = false : idFollowupflagged;
+			}
+		for(i=0; i<selectedMessageIds.length; i++){
+				var isDone = winElement.find('[name="done"]').is(':checked') ? 1 : 0;
+				var alarmDate = false;
+				var doneDate  = false;
+				var folder_name;
+				var folders = [];
+				var messages = [];
+				var roles = get_selected_messages_search_role().split(',');
+				for (var i=0; i < selectedMessageIds.length; i++ ){
+					if (currentTab == 0) {
+						folder_name = current_folder;
+						var messageNumber = selectedMessageIds[i];
+					}else{
+						var tr = $('[role="'+roles[i]+'"]');
+						folder_name = $(tr).attr('name'); 
+						var id = $(tr).attr('id'); 
+						var messageNumber = id.replace(/_[a-zA-Z0-9]+/,"");
+					}
+					folders.push(folder_name);
+					
+						var followupflagged = DataLayer.merge({
+							uid : User.me.id,
+							followupflagId : followupflagId, 
+							folderName : folder_name, 
+							messageNumber : messageNumber,
+							isDone: isDone,
+							backgroundColor : backgroundColor
+						}, !!idFollowupflagged[i] ? {id: idFollowupflagged[i]} : {});
+					
+					if (alarmDate = winElement.find('[name="alarmDate"]').datepicker("getDate")) {
+						if (alarmTime = winElement.find('[name="alarmTime"]').datepicker("getDate")) {
+							alarmDate.set({hour:alarmTime.getHours(), minute:alarmTime.getMinutes()});
+						}
+						followupflagged.alarmDeadline = alarmDate.toString('yyyy-MM-dd HH:mm:ss');
+					}
+
+					if (doneDate = winElement.find('[name="doneDate"]').datepicker("getDate")) {
+						if (doneTime = winElement.find('[name="doneTime"]').datepicker("getDate")) {
+							doneDate.set({hour:doneTime.getHours(), minute:doneTime.getMinutes()});
+						}
+						followupflagged.doneDeadline = doneDate.toString('yyyy-MM-dd HH:mm:ss');
+					}
+					
+					/**
+					 * Aplica o ícone correspondente na lista de mensagens do expressoMail
+					 */
+					if(current_folder == folder_name){
+						var flagged = $('#td_message_followup_' + messageNumber + ', tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).find(".flag-edited");
+					} else{
+						var flagged = $('tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).find(".flag-edited");
+					}
+					if(isDone){
+						flagged.find("img").attr("src", "../prototype/modules/mail/img/flagChecked.png").css("margin-left","-3px");
+					}else{
+						flagged.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");			
+					}
+					
+					var followupflagName = winElement.find('[name="name"] option:selected').text();
+					if(current_folder == folder_name){
+						$('#td_message_followup_' + messageNumber + ', ' + 
+						'tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).attr('title', followupflagName).find(".flag-edited").css("background", backgroundColor); 
+					}else{
+						$('tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).attr('title', followupflagName).find(".flag-edited").css("background", backgroundColor); 
+					}  
+					/**
+					 * Salva ou, caso já exista, atualiza
+					 */
+					DataLayer.put('followupflagged', followupflagged);
+				}
+				
+				DataLayer.commit(false, false, function(data){
+					winElement.find('.menu-configure-followupflag .delete').button("option", "disabled", false);
+					updateCacheFollowupflag(selectedMessageIds, folders, true);
+					winElement.dialog("close");
+					alarmFollowupflagged('followupflagAlarms');
+				});
+				winElement.find('.menu-configure-followupflag .save').button("option", "disabled", true);
+				
+		
+		}
+    }
+		var backgroundColor = winElement.find('[name="backgroundColor"]').val();
+		var followupflagId  = winElement.find('[name="name"] option:selected').val();
+		if (followupflagId == 'custom') {
+			DataLayer.put('followupflag', {name:winElement.find('[name="name"] option:selected').text(), uid:User.me.id});
+			DataLayer.commit(false, false, function(data){
+				$.each(data, function(index, value) {
+					if(typeof value == 'object'){
+						followupflagId = value.id;
+					}
+				});
+				winElement.find('[name="name"] option[value="custom"]').val(followupflagId);
+				saveFollowupflagged();
+			});
+		}else{
+			saveFollowupflagged();
+		}	
+
+	}).end()
+	
+	.filter('.menu-configure-followupflag .delete').click(function(){
+		if (selectedMessageIds.length == 0) $(this).button("option", "disabled", true);
+		/** TODO Mudar quando melhorias forem implementadas na API de atualização do cache */
+		DataLayer.remove('followupflagged', false);
+		DataLayer.get('followupflagged');
+		var roles = get_selected_messages_search_role().split(',');
+		for (var i=0; i < selectedMessageIds.length; i++ ){
+				if (currentTab == 0) {
+					folder_name = current_folder;
+					var messageNumber = selectedMessageIds[i];
+				}else{
+					var tr = $('[role="'+roles[i]+'"]');
+					folder_name = $(tr).attr('name'); 
+					var id = $(tr).attr('id'); 
+					var messageNumber = id.replace(/_[a-zA-Z0-9]+/,"");
+				}				
+				
+			if(onceOpenedHeadersMessages[folder_name][messageNumber]['followupflagged']){
+				if(onceOpenedHeadersMessages[folder_name][messageNumber]['followupflagged'].id){
+					var flag_id = onceOpenedHeadersMessages[folder_name][messageNumber]['followupflagged'].id;
+					DataLayer.remove('followupflagged', flag_id );
+					/**
+					 * TODO - corrigir o formato do ID no DataLayer, para que seja utilizado o ID composto
+					 * ao invés do ID do PostgreSQL atualmente em uso.
+					 */
+					 
+					/**
+					 * # hack necessário enquanto o DataLayer não reconhece o ID composto. Trocar o 
+					 * código abaixo pela chamada trivial de DataLayer.remove('followupflagged', idCompost)
+					 */
+					// var data = {};
+					// data[ 'followupflagged://' + folder_name + '/' + messageNumber + '#' + flag_id ] = false;
+					// DataLayer.dispatch('Sync', data, false, true);
+					
+					if(current_folder == folder_name){
+						$('#td_message_followup_' + messageNumber + ', ' + 
+						  'tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).attr('title', '').find(".flag-edited").css("background", '#CCC');
+						$('#td_message_followup_' + messageNumber + ', ' + 
+							'tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).find(".flag-edited")
+							.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");
+					}else{
+						$('tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).attr('title', '').find(".flag-edited").css("background", '#CCC');
+						$('tr[role="'+messageNumber+'_'+folder_name+'"] #td_message_followup_search_' + messageNumber).find(".flag-edited")
+							.find("img").attr("src", "../prototype/modules/mail/img/flagEditor.png").css("margin-left","0");
+					}
+					updateCacheFollowupflag(messageNumber, folder_name, false);
+				}
+			}
+		}
+		DataLayer.commit(false, false, function(){
+			winElement.dialog("close");
+			alarmFollowupflagged('followupflagAlarms');
+		});
+		
+	});
+	
+	/**
+	 * Se houver mudança, habilita o botão "Save"
+	 */
+	winElement.find(':input').change(function(event){
+		if (event.keyCode != '27' && event.keyCode != '13')
+			winElement.find('.menu-configure-followupflag .save').button("option", "disabled", false);
+	}).keydown(function(event){
+		if (event.keyCode != '27' && event.keyCode != '13')
+			winElement.find('.menu-configure-followupflag .save').button("option", "disabled", false);
+	});
+	
+	winElement.find('.date').datepicker();
+	winElement.find('.time').timepicker({});
+	winElement.find('[name="name"]').combobox()
+	//pega o botão criado
+	.next().next().click(function (event, ui){ 	
+		$(".ui-autocomplete.ui-menu li").css("position","relative");
+		$(".ui-autocomplete.ui-menu li a:gt(5)").append("<span class='ui-icon ui-icon-only ui-icon-close delete_followupflag'></span>").find("span").click(function(event){
+			var id = $('.followupflag-configure').find('option')[$(this).parents('li').index()].value;
+			var nameFollowupflag = $('.followupflag-configure').find('option')[$(this).parents('li').index()].text;
+			var removeLi = $(this).parents("li");		
+			
+			$.Zebra_Dialog(get_lang('All messages flagged with the flag type ') + '<strong>'+ nameFollowupflag + '</strong>' + get_lang(' will be removed. This action cannot be undone. Want to continue?'), {
+				'type':     'question',
+				'custom_class': (is_ie ? 'configure-zebra-dialog' : ''),
+				'title':    'Atenção',
+				'buttons': ['Sim','Não'],		
+				'overlay_opacity': '0.5',
+				'onClose':  function(caption) {
+					if(caption == 'Sim'){
+						var listFollowupflag = DataLayer.get('followupflagged', ['=', 'followupflagId', id]);
+						for (var i=0; i < listFollowupflag.length; i++)
+							DataLayer.remove('followupflagged', listFollowupflag[i].id);
+
+						DataLayer.remove('followupflag',false);					
+						DataLayer.get('followupflag');
+
+						DataLayer.remove('followupflag', ''+id);						
+						DataLayer.commit(false, false, function(data){
+							$('[title="'+nameFollowupflag+'"]').attr('title', '').find('div').css({backgroundColor:'#CCC'});
+							$(removeLi).remove();
+							$('option[value="'+ id +'"]').remove();
+							$('.ui-autocomplete.ui-menu li:first');	
+							$('.followupflag-configure').find('option:first').attr("selected","selected");							
+							$('.ui-autocomplete-input').val($('.followupflag-configure').find('option:selected').text());
+							
+							for(var i=0; i<listFollowupflag.length; i++){
+								if(listFollowupflag[i].id == winElement.find('[name="followupflagId"]').val()){
+									winElement.find('[name="followupflagId"]').val("");
+								}
+							}						
+						});			
+						event.stopImmediatePropagation();
+					}
+				}
+			});	
+			if(is_ie)
+				$(".ZebraDialogOverlay").css("z-index","1006");	
+		});
+
+	});
+	winElement.find('.ui-corner-right.ui-button-icon').attr('title', get_lang('Show All Items'));
+
+	winElement.find('[name="alarmDate"],[name="alarmTime"]').attr("disabled","disabled");
+	
+	winElement.find('[name="alarm"]').click(function(){
+		if($(this).is(":checked")){
+			winElement.find('[name="alarmDate"],[name="alarmTime"]').removeAttr("disabled");			
+		}else{
+			winElement.find('[name="alarmDate"],[name="alarmTime"]').attr("disabled","disabled");
+		}
+	});
+	if(winElement.find('[name="alarm"]').is(":checked")){
+		winElement.find('[name="alarmDate"],[name="alarmTime"]').removeAttr("disabled");
+	}
+	winElement.find('[name="done"]').click(function(){
+		if($(this).is(":checked")){
+			winElement.find(".input-done input").attr("disabled","disabled");
+		}else{
+			winElement.find(".input-done input").removeAttr("disabled");
+		}
+	});
+
+
+	winElement.find(".followupflag-color-fields").hide();
+	winElement.find(".followupflag-color.sample-list .sample-item").click(function(){
+		winElement.find('.menu-configure-followupflag .save').button("enable");
+		winElement.find(".followupflag-color.sample-list .sample-item").removeClass("selected");
+		$(this).addClass("selected");
+		var color = $(this).attr('alt');
+		winElement.find('[name="backgroundColor"]').css('background-color', color).val(color)
+	});
+	
+	winElement.find(".followupflag-color.sample-list .sample-item.selected").trigger('click');
+				
+	winElement.find('[name="setColor"]').change(function(){	
+		if(winElement.find('[name="setColor"]').val() == "default"){
+			winElement.find(".followupflag-color.sample-list").show("fast");
+			winElement.find(".followupflag-color-fields").hide();
+			winElement.find(".followupflag-color.sample-list .sample-item.selected").trigger('click');
+		} else if(winElement.find('[name="setColor"]').val() == "custom"){	
+			winElement.find(".followupflag-color-fields").show("fast");
+			winElement.find(".followupflag-color.sample-list").hide();
+			winElement.find(".colorwell").focus();
+		}		
+	});
+	
+	if(winElement.find('[name="setColor"] option:selected').val() == "custom"){
+		winElement.find('[name="setColor"]').trigger("change");
+	}
+
+	var colorpickerPreviewChange = function(color) {
+		winElement.find('.menu-configure-followupflag .save').button("enable");
+		winElement.find('.colorwell-selected').val(color).css('background-color', color);
+		winElement.find('.flag-color-preview').css('background',color);
+	} 
+
+	var f = $.farbtastic(winElement.find('.colorpicker'), colorpickerPreviewChange);
+	var selected;					
+	winElement.find('.colorwell').each(function () {
+		f.linkTo(this);
+	}).focus(function() {
+		if (selected) {
+			$(selected).removeClass('colorwell-selected');
+		}
+		$(selected = this).addClass('colorwell-selected');
+		f.linkTo(this, colorpickerPreviewChange);
+		f.linkTo(colorpickerPreviewChange);
+		
+	});
+	if(winElement.find('[name="setColor"] option:selected').val() == "custom"){
+		winElement.find(".colorwell").focus();
+	}
+
+}
+
+
+/**
+ * constrói as três possíveis janelas de alerta, utilizando o mesmo template
+ * para o parametro alert_type, espera-se vazio, followupflagAlarms ou filtersAlarms
+ * vazio: quando serão carregadas todas as modais de alarmes
+ * followupflagAlarms: quando serão carregadas as modais referentes à sinalizações
+ * filtersAlarms: quando será carregada a modal de filtros (nesse caso o parametro filter_list deve conter a lista de mensagens a ser exibida na modal)
+ */
+function alarmFollowupflagged(alert_type, filter_list){
+	switch(alert_type){
+		// carregar modais de sinalizadores
+		case 'followupflagAlarms':
+			$('.doneDeadline').remove();
+			$('.alarmDeadline').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'doneDeadline', 
+					caption: {singular:'You have one undone message today:', 
+					plural:"You have %1 undone messages today:"
+					},
+					title: get_lang('Done'),
+					enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy"))
+				},
+				{
+					attrDeadline: 'alarmDeadline',
+					caption: {
+						singular:'You have a follow up due for today:', 
+						plural:'You have %1 follow ups due for today:'
+					},
+					title: get_lang('Follow ups'),
+					enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+		// carregar modal de filtros
+		case 'filtersAlarms':
+			$('.filtersDeadline').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'filtersDeadline',
+					caption: {
+						singular:'You have an archived message:', 
+						plural:'You have %1 messages archived:'
+					},
+					title: get_lang('Filter by sender'),
+					enable: ($.cookie("fadeFilterAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+		// carregar todas as modais
+		default:
+			$('.gray').remove();
+			var toIterate = [
+				{
+					attrDeadline: 'filtersDeadline',
+					caption: {
+						singular:'You have an archived message:', 
+						plural:'You have %1 messages archived:'
+					},
+					title: get_lang('Filter by sender'),
+					enable: ($.cookie("fadeFilterAlarm") != (new Date).toString("dd/MM/yyyy"))
+				},
+				{
+					attrDeadline: 'doneDeadline', 
+					caption: {singular:'You have one undone message today:', 
+					plural:"You have %1 undone messages today:"
+					},
+					title: get_lang('Done'),
+					enable: ($.cookie("fadeCompleted") != (new Date).toString("dd/MM/yyyy"))
+				},				
+				{
+					attrDeadline: 'alarmDeadline',
+					caption: {
+						singular:'You have a follow up due for today:', 
+						plural:'You have %1 follow ups due for today:'
+					},
+					title: get_lang('Follow ups'),
+					enable: ($.cookie("fadeAlarm") != (new Date).toString("dd/MM/yyyy"))
+				}
+			];
+			break;
+	}
+	var i = 0;
+	// recupera e monta os dados para serem exibidos nas modais de alarmes
+	while (it = toIterate.pop()){
+		if (!it.enable) continue;
+		
+		var alarmInRange = {};
+		// caso for alarme de sinalizadores
+		if(it.attrDeadline == 'doneDeadline' || it.attrDeadline == 'alarmDeadline'){
+			alarmInRange = DataLayer.get('followupflagged', {filter: ['AND', ['>', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).toString('yyyy-MM-dd 00:00:00')], ['<', it.attrDeadline, (new Date()).set({hour:0, minute:0, second:0}).addHours(24).toString('yyyy-MM-dd 00:00:00')]], criteria: {deepness: 1}});
+			if(alarmInRange.length > 0){
+				for(var i=0; i<alarmInRange.length; i++){
+					if(alarmInRange[i].isDone == 1){
+						 alarmInRange.splice(i,1);
+						 i--;
+					}
+				}
+			}
+			
+			if(alarmInRange.length > 0){
+				var messages_alarm = [];
+				for(var i=0; i<alarmInRange.length; i++){
+					var date = Date.parseExact(alarmInRange[i][it.attrDeadline], 'yyyy-MM-dd HH:mm:ss');
+					if(date)
+						alarmInRange[i][it.attrDeadline] = date.toString('HH:mm');
+					
+					if(alarmInRange[i]['followupflag']['id'] < 7){
+						var nameFollowupflag = get_lang(alarmInRange[i]['followupflag']['name']);
+					}else{
+						var nameFollowupflag = alarmInRange[i]['followupflag']['name'];
+					}
+					var li_alarm = alarmInRange[i][it.attrDeadline] + ' - ' + nameFollowupflag + ' - ' + truncate(alarmInRange[i]['message']['headers']['subject'], 15);
+					messages_alarm.push({
+						"msg_number" : alarmInRange[i]['messageNumber'],
+						"msg_folder" : alarmInRange[i]['folderName'],
+						"a"			 : li_alarm
+					}); 				
+				}
+			}
+		} 
+		// caso for alarme de filtros
+		else if(filter_list){
+			alarmInRange = filter_list;
+			if(alarmInRange.length > 0){
+				var messages_alarm = [];
+				for(var i=0; i<alarmInRange.length; i++){
+					
+					alarmInRange[i]['udate'] =  new Date(alarmInRange[i]['udate']*1000).toString('dd/MM/yyyy HH:mm');
+						
+					var li_alarm = alarmInRange[i]['udate'] + ' - ' + alarmInRange[i]['from'] + ' - ' + truncate(alarmInRange[i]['subject'], 15);
+					messages_alarm.push({
+						"msg_number" : alarmInRange[i]['msg_number'],
+						"msg_folder" : alarmInRange[i]['msg_folder'],
+						"a"			 : li_alarm
+					}); 				
+				}
+			}
+		}
+				
+		if(alarmInRange.length > 0){
+			// monta o subtitulo da modal
+			var caption = (alarmInRange.length == 1) ?
+				get_lang(it.caption.singular):
+				get_lang(it.caption.plural, alarmInRange.length);
+			// monta o array de dados a ser passado para o template	
+			var data = {
+				alarmInRange : messages_alarm, 
+				caption: caption, 
+				type: it.attrDeadline,
+				captions: it.caption
+			};
+			// tipo de modal a ser exibida
+			var type_alarm = it.attrDeadline;
+			//função chamada ao clicar no botão Ok da modal
+			var ok_function = function(event, type, type_cookie){
+				if($(event.target).parents('.'+type).find('[name="stopAlert"]').is(':checked')){
+					$.cookie(type_cookie, (new Date).toString("dd/MM/yyyy"), { 
+						expires: 1 
+					});
+				}
+			}
+			// carrega o template dos alarmes e cria a modal utilizando o plugin freeow
+			var dialogText = DataLayer.render("../prototype/modules/mail/templates/followupflag_alarm_list.ejs", data);
+			var titulo = '<div class="header-alarm"><span class="img_title"></span><span class="title-alarm"><strong>'+it.title+'</strong></span><span name="header-icon" class="maximize-alarm"></span></div>';
+			$("#freeow").freeow(titulo, dialogText, {
+				classes: ["gray", type_alarm],
+				autoHide: false, 
+				startStyle: null,
+				onClick: function(event){
+					var type = '';
+					var type_cookie = '';
+					if($(this).hasClass('alarmDeadline')){
+						type = 'alarmDeadline';
+						type_cookie = 'fadeAlarm';
+					}else if($(this).hasClass('doneDeadline')){
+						type = 'doneDeadline';
+						type_cookie = 'fadeCompleted';
+					}else if($(this).hasClass('filtersDeadline')){
+						type = 'filtersDeadline';
+						type_cookie = 'fadeFilterAlarm';
+					}
+					if($(event.target).hasClass('stop-alert-alarm')){
+						return;
+					}
+					if($(event.target).hasClass('minimize-alarm')){
+						$('.'+type).find('.content-alarm').hide();
+						$(event.target).removeClass('minimize-alarm').addClass('maximize-alarm');
+						return;
+					}
+					if($(event.target).hasClass('maximize-alarm')){
+						$('.'+type).find('.content-alarm').show();
+						$(event.target).removeClass('maximize-alarm').addClass('minimize-alarm');
+						return;
+					}
+					if($(event.target).hasClass('confirm-alarm')){
+						ok_function(event, type, type_cookie);
+						$('.'+type).remove();
+						return;
+					}
+					return false;
+				}
+			});
+			// elementos do freeow desnecessários
+			$('.gray .background .content p').remove();
+			$('.gray .icon').remove();
+			$('.gray .close').remove();
+			
+			// botão ok da modal com jquery button
+			$('.content-alarm button').button();
+		}		
+	}
+	
+	// controle de qual janela de alarme estará maximizada
+	$('.gray').find('.content-alarm').hide();
+	$('.gray').find('.header-alarm [name="header-icon"]').removeClass('minimize-alarm').addClass('maximize-alarm');
+	
+	if($('.gray').length > 0){
+		if($('.gray').hasClass('filtersDeadline')){
+			$('.filtersDeadline').find('.content-alarm').show();
+			$('.filtersDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');
+		}else if($('.gray').hasClass('alarmDeadline')){
+			$('.alarmDeadline').find('.content-alarm').show();
+			$('.alarmDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');	
+		}else if($('.gray').hasClass('doneDeadline')){
+			$('.doneDeadline').find('.content-alarm').show();
+			$('.doneDeadline .header-alarm [name="header-icon"]').removeClass('maximize-alarm').addClass('minimize-alarm');	
+		}
+	}
+	
+}
+		
+$('#main_table').ready(function(){
+	handlerMessageFilter = function (data) {
+		alarmFollowupflagged(null, data);
+	}
+	/* Busca  nas pastas indexadas para ver se há novas mensagens com a flag $FilteredMessage */
+	cExecute ("$this.imap_functions.getFlaggedAlertMessages&folders="+fromRules, handlerMessageFilter);
+});
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/js/init.js
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/js/init.js	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/js/init.js	(revision 7210)
@@ -0,0 +1,143 @@
+$(document).ready(function() {
+
+	Layout = $('#wrap').layout({ 
+		applyDefaultStyles: true,
+		north__size:		'auto',
+		north__closable:	false, 
+		north__resizable:	false,
+		north__slidable:	false, 
+		west__resizable:	false,
+		west__slidable:	false,
+		center__maxSize : 0
+	});
+
+	$tabs = $("#tabs").wijtabs({ 
+		tabTemplate: "<li role='tab' style='cursor: pointer;'><a href='#{href}'>#{label}</a><span class='ui-icon tab-close ui-icon-close close' title='Fechar Aba'>Fechar Aba</span></li>", 
+		panelTemplate: "<div id='{href}'></div>",
+		add: function( event, ui ) { 
+		        $tabs.wijtabs('select', '#' + $tabs.find("div:last").attr("id")); 
+	         	$tabs.find("span.tab-close:last").hover(function(){$(this).toggleClass("ui-icon-circle-close ui-icon-close");}, function(){$(this).toggleClass("ui-icon-circle-close ui-icon-close");})
+		        $tabs.find("div:last").addClass("conteudo").attr("role", tab_role).append(tab_content); 
+		},
+		show: function(event, ui){
+			switch($( ui.panel ).attr("role")){
+				case "new":
+				case "search":
+					$("#footer_menu").hide();
+					break;
+				case "message":
+				case "draft":
+				case "folder":
+					$("#footer_menu").show();
+					break;
+			}
+		},
+		select: function(event, ui) { 
+			lastIndexSelected = ui.index;
+		},
+		scrollable: true,
+		sortable: true,
+        hideOption: { 
+        	blind: true, 
+        	fade: false, 
+        	duration: 200
+       	},
+       	showOption: {
+       		blind: true, 
+       		fade: false, 
+       		duration: 200
+       	}
+	});	
+
+	draw_new_tree_folder();
+
+	$(".new-message-button").button({
+		icons: {
+			secondary : "ui-icon-plusthick"
+		}
+	});
+
+	var messages = DataLayer.get("message", {criteria : {folder: 'INBOX', rows: 999999}}, true);
+
+	$('.button.config-menu').button({
+	    icons: {
+			primary: "ui-icon-gear",
+			secondary: "ui-icon-triangle-1-s"
+	    },
+	    text: false
+	});
+
+	var menus = $(".main-menus-content").clone();
+	$(".main-menus-content").remove();
+
+	$(".this-module").button().next().button({
+		icons :{
+			primary: "ui-icon-triangle-1-s"
+		},
+		text: false
+	}).parent().buttonset();
+
+	$(".this-module").parent().append(menus);
+
+	$('.this-module').next().menu({
+		content: $('.main-menus-content').html(),
+		positionOpts: {
+			posX: 'left', 
+			posY: 'bottom',
+			offsetX: -140,
+			offsetY: 0,
+			directionH: 'right',
+			directionV: 'down', 
+			detectH: true, // do horizontal collision detection  
+			detectV: true, // do vertical collision detection
+			linkToFront: false
+		},
+		flyOut: true,
+		showSpeed: 100,
+		crumbDefaultText: '>'
+	});
+
+	$('.block-horizontal-toolbox .main-config-menu').menu({
+		content: $('.main-config-menu-content').html(),
+		positionOpts: {
+			posX: 'left', 
+			posY: 'bottom',
+			offsetX: -140,
+			offsetY: 0,
+			directionH: 'right',
+			directionV: 'down', 
+			detectH: true, // do horizontal collision detection  
+			detectV: true, // do vertical collision detection
+			linkToFront: false
+		},
+		flyOut: true,
+		showSpeed: 100,
+		crumbDefaultText: '>'
+	});
+	setFolderTabName("Caixa de Entrada");
+	$(".folder-tab-total-msgs-number").html(messages.records);
+	setFolderTabTotalUnread($("#INBOX").find(".folder_unseen").html());
+	Grid = $("#imap-folder-table-messages").jqGrid({
+		datatype: "local",
+		data: messages.rows,
+		colNames:['#',' ', 'De', 'Assunto', 'Data', 'Tamanho'],
+		colModel:[
+			{name:'msg_number',index:'msg_number', width:45, hidden:true, sortable:false},
+			{name:'flags',index:'msg_number',edittype: 'image', width:60, sortable:false, title :false},
+			{name:'from.name',index:'msg_number', width:100, sortable:true},
+			{name:'subject',index:'subject', width:245, sortable:true},
+			{name:'timestamp',index:'timestamp', width:65, align:"center", sortable:true},
+			{name:'size',index:'size', width:55, align:"center", sortable:true, formatter: bytes2Size}
+		],
+		rowNum:50,
+		rowList:[10,25,50],
+		pager: "#imap-folder-table-pager",
+		sortorder: "desc",
+		multiselect: true,
+		autowidth: true,
+		height : '85.5%',
+		emptyrecords: 'A pasta nao contem nenhuma mensagem.',
+		viewrecords: true
+	});
+	Grid.jqGrid('bindKeys', {"onEnter":function( rowid ) { alert("You enter a row with id:"+rowid)} });
+});
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/emailBox.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/emailBox.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/emailBox.ejs	(revision 7210)
@@ -0,0 +1,13 @@
+<div class="box <%= (!data.valid ? "invalid-email-box" : "") %> ui-corner-all" tabindex="0">
+	<span class="email-box-value" style="padding: 5px;">
+		<% 
+			var presentation = (data.name != "" ? data.name : data.email);
+			var input_value = "&quot;"+data.name+"&quot; <"+data.email+">";
+		%> 
+		<%= 
+			(presentation.length > 18 ? presentation.substring(0, 15)+"..." : presentation)
+		%> 
+	</span>
+	<input class="box-input" value="<%= input_value %>"></input>
+	<span class="box-loading">&nbsp;&nbsp;&nbsp;</span>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/quickAddContact.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/quickAddContact.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/quickAddContact.ejs	(revision 7210)
@@ -0,0 +1,39 @@
+<div style="width:auto;">	
+	<table>
+		<tr>
+			<td>
+				<span><%=get_lang('Nickname')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.nick%>" maxlength="50" id="quickAddOne_nickName" style="width:205px;"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('First Name')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.fname%>" maxlength="50" id="quickAddOne_firstName" style="width:205px;" class="required-field"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('Last Name')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.lname%>" maxlength="50" id="quickAddOne_lastName" style="width:205px;"/>
+			</td>
+		</tr>
+		
+		<tr>
+			<td>
+				<span><%=get_lang('Email')%>:</span>
+			</td>
+			<td>
+				<input type="text" value="<%=data.email%>" maxlength="50" id="quickAddOne_email" style="width:205px;" class="required-field"/>
+			</td>
+		</tr>
+	</table>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_configure.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_configure.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_configure.ejs	(revision 7210)
@@ -0,0 +1,128 @@
+
+<%
+	if (data.messages.length == 1) {
+		var followupflagged = data.messages[0].followupflagged ? data.messages[0].followupflagged : { followupflag: {id: 1} };
+		if (followupflagged.doneDeadline)
+			followupflagged.doneDeadline = Date.parseExact(followupflagged.doneDeadline, 'yyyy-MM-dd HH:mm:ss');
+		if (followupflagged.alarmDeadline)
+			followupflagged.alarmDeadline = Date.parseExact(followupflagged.alarmDeadline, 'yyyy-MM-dd HH:mm:ss');
+
+	} else if (data.messages.length > 1) {
+		var followupflagged = {
+			followupflag: {name: true, id: 1},
+			isDone: true,
+			doneDeadline: true,
+			alarmDeadline: true,
+			backgroundColor: true
+		}
+		/**
+		 * O campo só fica preenchido se o valor for igual para todas as mensagens
+		 */
+		for(var i=0; i<data.messages.length; i++){
+			if (!data.messages[i].followupflagged) {
+				followupflagged = { followupflag: {name: false, id: false} };
+				break;
+			}
+		}
+		for (var i=1; i<data.messages.length; i++) {
+			followupflagged.followupflag.name = (followupflagged.followupflag.name && data.messages[i].followupflagged.followupflag.name == data.messages[i-1].followupflagged.followupflag.name) ?
+				data.messages[i].followupflagged.followupflag.name : false;
+				
+			followupflagged.followupflag.id = (followupflagged.followupflag.id && data.messages[i].followupflagged.followupflag.id == data.messages[i-1].followupflagged.followupflag.id) ?
+				data.messages[i].followupflagged.followupflag.id : false;
+				
+			followupflagged.isDone = (followupflagged.isDone && data.messages[i].followupflagged.isDone == data.messages[i-1].followupflagged.isDone) ?
+				data.messages[i].followupflagged.isDone : false;
+				
+			followupflagged.doneDeadline = (followupflagged.doneDeadline && data.messages[i].followupflagged.doneDeadline == data.messages[i-1].followupflagged.doneDeadline) ?
+				Date.parseExact(data.messages[i].followupflagged.doneDeadline, 'yyyy-MM-dd hh:mm:ss') : false;
+				
+			followupflagged.alarmDeadline = (followupflagged.alarmDeadline && data.messages[i].followupflagged.alarmDeadline == data.messages[i-1].followupflagged.alarmDeadline) ?
+				Date.parseExact(data.messages[i].followupflagged.alarmDeadline, 'yyyy-MM-dd hh:mm:ss') : false;
+				
+			followupflagged.backgroundColor = (followupflagged.backgroundColor && data.messages[i].followupflagged.backgroundColor == data.messages[i-1].followupflagged.backgroundColor) ?
+				data.messages[i].followupflagged.backgroundColor : false;
+		}
+	}
+	var flagsId = new Array();
+	for(x=0; x<data.messages.length; x++){
+		if(data.messages[x].followupflagged)
+			flagsId[x] = data.messages[x].followupflagged.id;
+		else 
+			flagsId[x] = false;	
+	}
+%>
+<div class="followupflag-container">
+	<fieldset class="basic-fields">
+		<legend><%= get_lang("Basic")%></legend>
+		<div class="followupflag-configure">
+			<input type="hidden" class="id-followup" value="<%=(flagsId)?flagsId:''%>" name="followupflagId">
+			<label class="label-name"><%= get_lang("Flag as")%>:</label> 
+			<select name="name">
+				<% for(var i=0; i<data.followupflags.length; i++) {  %>
+					<% var selected = (data.followupflags[i].id == followupflagged.followupflag.id ) ? 'selected="selected"' : '' %>
+					<% if(data.followupflags[i].id >= 1 && data.followupflags[i].id <= 6){ var innerOption = get_lang(data.followupflags[i].name)
+					}else{var innerOption = data.followupflags[i].name}%>
+					<option value="<%= data.followupflags[i].id %>" <%= selected %>><%= innerOption %></option>
+				<% } %>
+			</select>
+			<div class="alarm-fields">
+				<input type="checkbox" name="alarm" <%=(followupflagged.alarmDeadline) ? 'checked="checked"' : '' %> /><label><%= get_lang("Alarm")%>: </label>
+				<input type="text" name="alarmDate" class="date" size="12" value="<%=(followupflagged.alarmDeadline) ? followupflagged.alarmDeadline.toString('dd/MM/yyyy') : '' %>" /> 
+				<input type="hidden" name="alarmTime" class="time" size="8" value="00:01" />
+			</div>		
+		   <div class="completed-followup">
+				<input type="checkbox" name="done" <%=(followupflagged.isDone && followupflagged.isDone != '0') ? 'checked="checked"' : '' %> /><label><%= get_lang("Done")%></label>
+		   </div>		
+		</div>
+		<div class="right-data input-done">
+			<label><%= get_lang("Conclusion")%>:</label>
+			<input <%=(followupflagged.isDone && followupflagged.isDone != '0') ? 'disabled="disabled"' : '' %> type="text" name="doneDate" class="date" size="12" value="<%=(followupflagged.doneDeadline) ? followupflagged.doneDeadline.toString('dd/MM/yyyy') : '' %>" /> <%= get_lang('at') %> 
+			<input <%=(followupflagged.isDone && followupflagged.isDone != '0') ? 'disabled="disabled"' : '' %> type="text" name="doneTime" class="time" size="8" value="<%=(followupflagged.doneDeadline) ? followupflagged.doneDeadline.toString('HH:mm') : '' %>" />
+		</div> 
+	</fieldset>
+
+	<fieldset class="followups-colorpicker color-fields">
+		<legend><%= get_lang("Flag color")%></legend>
+		<div class="left-seletor-flag">
+			<% 
+				var defaultColor = false;
+				var a = ["#00820F", "#E4D000", "#004DD6", "#FF2016", "#F96300"];
+				if (followupflagged.backgroundColor) {
+					for(var i = 0; i < a.length; i++) {
+						if(a[i] == followupflagged.backgroundColor) {
+							defaultColor = a[i];
+							break;
+						}
+					}
+				}
+			%>
+			<select name="setColor">
+				<option value="default" <%= (defaultColor && !followupflagged.backgroundColor) ? 'selected="selected"' : ''%> ><%= get_lang("Default")%></option>
+				<option value="custom" <%= (!defaultColor && followupflagged.backgroundColor) ? 'selected="selected"' : ''%> ><%= get_lang("Custom")%></option>
+			</select>
+		</div>
+		<div class="followupflag-color sample-list">
+			<img src="../prototype/modules/mail/img/flagDefault1.png" alt="#00820F" class="sample-item <%= (!followupflagged.backgroundColor || followupflagged.backgroundColor == '#00820F') ? 'selected' : '' %>"">
+			<img src="../prototype/modules/mail/img/flagDefault2.png" alt="#E4D000" class="sample-item <%= (followupflagged.backgroundColor == '#E4D000') ? 'selected' : '' %>"">
+			<img src="../prototype/modules/mail/img/flagDefault3.png" alt="#004DD6" class="sample-item <%= (followupflagged.backgroundColor == '#004DD6') ? 'selected' : '' %>"">
+			<img src="../prototype/modules/mail/img/flagDefault4.png" alt="#FF2016" class="sample-item <%= (followupflagged.backgroundColor == '#FF2016') ? 'selected' : '' %>"">
+			<img src="../prototype/modules/mail/img/flagDefault5.png" alt="#F96300" class="sample-item <%= (followupflagged.backgroundColor == '#F96300') ? 'selected' : '' %>"">
+		</div>
+		<div class="followupflag-color-fields">
+			<div class="form-item">
+				<label class="flag-label"><%= get_lang("Color")%>: </label>
+				<input type="text" name="backgroundColor" class="colorwell background-color" value="<%=(followupflagged.backgroundColor) ? followupflagged.backgroundColor : '#00820F' %>" readonly="readonly" />
+				<div class="flag-edit flag-color-preview" style="background: <%=(followupflagged.backgroundColor) ? followupflagged.backgroundColor : '#00820F' %>">
+					<img src="../prototype/modules/mail/img/flagEditor.png">
+				</div>
+			</div>
+			<div class="colorpicker"></div>
+		</div>
+	</fieldset>
+	<div class="menu-container footer-container menu-configure-followupflag">
+		<span class="button delete"><%= get_lang("Remove")%></span>
+		<span class="button save"><%= get_lang("Apply")%></span>
+		<span class="button cancel"><%= get_lang("Cancel")%></span>
+	</div>
+</div> 
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/importEmails.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/importEmails.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/importEmails.ejs	(revision 7210)
@@ -0,0 +1,36 @@
+<div id="importMessageAccordion"  style="overflow:hidden;">
+	<h3>
+		<a href="#">
+			<%= get_lang('Choose the file')%>
+		</a>
+	</h3>			 
+	<div>
+		<div class="row fileupload-buttonbar">
+			<div class="button-files-upload">
+		    	<span class="button small btn-success fileinput-button ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
+					<span class="ui-button-text">
+					    <span><%= get_lang("Select a zip file or eml")%></span>
+					    <form id="importFileMessages" method="POST" name="form_import" enctype="multipart/form-data">
+					    	<input type="file" name="file_1" />
+					    	<input type="hidden" name="countFiles" value="1" />
+					    	<input type="hidden" name="folder" />
+					    </form>
+ 				  	</span>
+				</span> 
+	    	</div>
+		</div>
+		
+		<div style="margin-top: 35px;">
+			<label><%= get_lang('File name')%>:</label>
+			<label id="lblFileName"></label>
+		</div>
+	</div>
+	<h3>
+		<a href="#"><%= get_lang('Select a folder')%></a>
+	</h3>
+	<div style="overflow : auto;">
+		<div id="foldertree-container-importMessage" class="empty-container">
+			<span class="message"><%=get_lang('no folder found')%></span>
+		</div>
+	</div>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/index.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/index.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/index.ejs	(revision 7210)
@@ -0,0 +1,198 @@
+<html>
+<head>
+<title>Novo Expresso Mail</title>
+<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+
+<!--<link rel='stylesheet' type='text/css' href="<?= ROOTPATH ?>../templates/jquery-ui/redmond/jquery-ui.css"/>-->
+
+<!--<link rel='stylesheet' type='text/css' href='../fullcalendar/fullcalendar.css' />-->
+
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/css/reset.css" />
+<link rel='stylesheet' type='text/css' href='<?= PLUGINSURL ?>/fullcalendar/fullcalendar.css' />
+<link rel='stylesheet' type='text/css' href='<?= PLUGINSURL ?>/fullcalendar/fullcalendar.print.css' media='print' />
+
+<link rel='stylesheet' type='text/css' href='<?= PLUGINSURL ?>/jquery/jquery-ui.css'/>
+<link rel="stylesheet" type="text/css" href="<?= PLUGINSURL ?>/wijmo/jquery-ui.wijmo.css" />
+<link rel="stylesheet" type="text/css" href="<?= PLUGINSURL ?>/wijmo/jquery.wijmo-open.2.2.0.css" />
+<link rel='stylesheet' type='text/css' href='<?= PLUGINSURL ?>/icalendar/jquery.icalendar.css'/>
+<link rel="stylesheet" type="text/css" href="<?= PLUGINSURL ?>/fgmenu/fg.menu.css" media="screen"/>
+<!--<link type="text/css" href="<?= $ROOTPATH ?>fgmenu/theme/ui.all.css" media="screen" rel="stylesheet" />-->
+
+<link rel='stylesheet' type='text/css' href='<?= PLUGINSURL ?>/fileupload/jquery.fileupload-ui.css'/>
+<link rel="stylesheet" type='text/css' href="<?= PLUGINSURL ?>/jquery.pagination/pagination.css" />
+
+<!-- JPicker -->
+<link rel="Stylesheet" type="text/css" href="<?= PLUGINSURL ?>/jpicker/css/jPicker-1.1.6.min.css" />
+<link rel="Stylesheet" type="text/css" href="<?= PLUGINSURL ?>/jpicker/jPicker.css" />
+
+<link rel="Stylesheet" type="text/css" href="<?= PLUGINSURL ?>/farbtastic/farbtastic.css" />
+<link rel="Stylesheet" type="text/css" href="<?= PLUGINSURL ?>/timepicker/jquery-ui-timepicker-addon.css" />
+<link rel="stylesheet" type="text/css" href='<?= PLUGINSURL ?>/zebradialog/css/zebra_dialog.css'></link>
+<link rel="stylesheet" type="text/css" href='<?= PLUGINSURL ?>/treeview/jquery.treeview.css'></link>
+<link rel="stylesheet" type="text/css" href="<?= PLUGINSURL ?>/jqgrid/css/ui.jqgrid.css" />
+
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/../attach_message/attach_message.css" />
+
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/css/layout.css" />
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/css/style.css" />
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/css/grid.css" />
+<link rel="stylesheet" type="text/css" href="<?= MODULESURL ?>/css/main.css" />
+
+
+<script type='text/javascript' src='<?= PLUGINSURL ?>/datejs/date-pt-BR.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/jquery/jquery.min.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/icalendar/jquery.icalendar.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/jquery/jquery-ui.custom.min.js'></script>
+<script type='text/javascript' src="<?= PLUGINSURL ?>/jquery/i18n/jquery.ui.datepicker-pt-BR.js"></script>
+<script type='text/javascript' src="<?= PLUGINSURL ?>/timepicker/jquery-ui-timepicker-addon.js"></script>
+<script type='text/javascript' src="<?= PLUGINSURL ?>/timepicker/localization/jquery-ui-timepicker-pt-BR.js"></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/json2/json2.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/store/jquery.store.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/fileupload/jquery.fileupload.js'></script>
+<!--<script type='text/javascript' src='<?= PLUGINSURL ?>/fileupload/jquery.fileupload-ui.js'></script>-->
+<script type='text/javascript' src='<?= PLUGINSURL ?>/fileupload/jquery.iframe-transport.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/store/jquery.store.js'></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/jquery.pagination/jquery.pagination.js"></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/mask/jquery.maskedinput.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/alphanumeric/jquery.alphanumeric.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/watermark/jquery.watermarkinput.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/encoder/encoder.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/../api/datalayer.js'></script>
+<script type="text/javascript" src='<?= PLUGINSURL ?>/dateFormat/dateFormat.js'></script>
+
+<!-- Datejs -->    
+<!-- <script type='text/javascript' src='<?= ROOTPATH ?>datejs/core.js'></script>
+<!-- <script type='text/javascript' src='<?= PLUGINSURL ?>/datejs/date-pt-BR.js'></script>-->
+<!-- <script type='text/javascript' src='<?= PLUGINSURL ?>/datejs/globalization/pt-BR.js'></script> -->
+<script type='text/javascript' src='<?= PLUGINSURL ?>/datejs/sugarpak.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/datejs/parser.js'></script>
+
+<!--  <script type='text/javascript' src='<?= ROOTPATH ?>datejs/time.js'></script>  -->
+<script type='text/javascript' src='<?= PLUGINSURL ?>/dateFormat/dateFormat.js'></script>
+<!--<script type='text/javascript' src='../fullcalendar/fullcalendar.min.js'></script>-->
+<script type='text/javascript' src='<?= PLUGINSURL ?>/fullcalendar/fullcalendar.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/fullcalendar/gcal.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/jquery.dateFormat/jquery.dateFormat.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/zebradialog/javascript/zebra_dialog.js'></script>
+<script type='text/javascript' src='<?= PLUGINSURL ?>/scrollto/jquery.scrollTo.js'></script>
+<!-- <script type='text/javascript' src='<?= PLUGINSURL ?>/view/jquerymx-1.0.custom.min.js'></script> -->
+<script type='text/javascript' src='<?= PLUGINSURL ?>/ejs/ejs.js'></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/fgmenu/fg.menu.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/qtip/jquery.qtip-1.0.0-rc3.min.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/contextmenu/jquery.contextMenu.js"></script>
+
+<!-- JPicker -->
+<script type="text/javascript" src="<?= PLUGINSURL ?>/jpicker/jpicker-1.1.6.min.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/farbtastic/farbtastic.js"></script>
+
+<!-- TREEVIEW -->
+<script type="text/javascript" src="<?= PLUGINSURL ?>/treeview/jquery.treeview.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/treeview/lib/jquery.cookie.js"></script>
+
+<script type="text/javascript" src="<?= PLUGINSURL ?>/wijmo/jquery.wijmo-open.all.2.2.0.min.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/layout/jquery.layout.min.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/jqgrid/js/i18n/grid.locale-pt-br.js"></script>
+<script type="text/javascript" src="<?= PLUGINSURL ?>/jqgrid/js/jquery.jqGrid.min.js"></script>
+
+<script type="text/javascript">
+var configurations = <?= json_encode($current_config) ?>;
+var preferences = <?= json_encode($GLOBALS['phpgw_info']['user']) ?>;
+var mailPreferences = <?= json_encode($GLOBALS['phpgw_info']['user']['preferences']['expressoMail']) ?>;
+var imap_configs = <?= json_encode($imap_configs) ?>;
+var Layout = ""; 
+var Grid = "";
+DataLayer.dispatchPath = '<?= PLUGINSURL ?>/../';
+DataLayer.templatePath = '<?= MODULESURL ?>/';
+
+</script>
+
+<script type="text/javascript" src="<?= MODULESURL ?>/js/formatters.js"></script>
+<script type="text/javascript" src="<?= MODULESURL ?>/js/init.js"></script>
+<script type="text/javascript" src="<?= MODULESURL ?>/js/newfoldertree.js"></script>
+<script type="text/javascript" src="<?= MODULESURL ?>/js/tabs.js"></script>
+<script type="text/javascript" src="<?= MODULESURL ?>/js/folder.js"></script>
+
+</head>
+
+<body>
+	<div id="wrap" class="expresso-calendar-container" style="text-align:left; width: 100%; height: 100%;">
+		<div class="ui-layout-north">
+			<div style="float:left;">
+				<span>
+					<a href="<? HOMEURL ?>" class="this-module">Novo Expresso Mail</a>
+					<a href="#" class="others-module">Modulos</a>
+					<div class="main-menus-content hidden"> 
+						<ul>
+							<li>
+								<a href="<? HOMEURL ?>../expressoMail1_2" class="menus-command">
+									<img border="0" src="<? HOMEURL ?>../expressoMail1_2/templates/default/images/navbar.png" alt="ExpressoMail" width="32" height="32" />
+									<span>
+										Email
+									</span>
+								</a>
+							</li>
+							<li>
+								<a href="<? HOMEURL ?>../contactcenter" class="menus-command">
+									<img border="0" src="<? HOMEURL ?>../contactcenter/templates/default/images/navbar.png" alt="ContactCenter" width="32" height="32" />
+									<span>
+										Contatos
+									</span>
+								</a>
+							</li>
+							<li>
+								<a href="<? HOMEURL ?>../expressoCalendar" class="menus-command">
+									<img border="0" src="<? HOMEURL ?>../expressoCalendar/templates/default/images/navbar.png" alt="Expresso Calendar" width="32" height="32" />
+									<span>
+										Calendario
+									</span>
+								</a>
+							</li>
+						</ul>
+					</div>	
+				</span>
+				<button type="button" class="new-message-button">Novo</button>
+			</div>
+			<div title="Configura&ccedil;&otilde;es" class="block-horizontal-toolbox"  style="float:rigth;">
+				<a class="button config-menu main-config-menu" href="#"></a>
+				<div class="main-config-menu-content hidden"> 
+					<ul>
+						<li><a href="#" onclick="" class="menu-command configurations">Prefer&ecirc;ncias</a></li>
+						<li><a href="#" onclick="" class="menu-command configurations">Compartilhar</a></li>
+						<li><a href="#" onclick="" class="menu-command configurations">Marcadores</a></li>
+					</ul>
+				</div>		
+				<fieldset title="Buscar" class="search-field main-search ui-corner-all">
+					<input class="search" type="text" />
+					<span class="ui-icon ui-icon-search"></span>
+				</fieldset>
+			</div>
+		</div>
+		<div class="ui-layout-center">			
+			<div id="tabs"> 
+	            <ul>
+	                <li class="ui-tab-disabled" style="opacity: 100;">
+	                    <a href="#tabs-0"><span class="folder-tab-name"></span><font face="Verdana" size="1" color="#505050">
+	                        [<span class="folder-tab-new-msgs-number">0</span> / <span class="folder-tab-total-msgs-number">0</span>]</font>
+	                    </a>
+	                </li>
+	            </ul>
+	            <div id="tabs-0" role="folder">
+	                <table id="imap-folder-table-messages" class="imap-folder-table-messages">
+	                    <tr>
+	                        <td/>
+	                    </tr>	
+	                </table>
+	                <div id="imap-folder-table-pager"></div>
+	            </div>
+			</div>
+		</div>
+		<div class="ui-layout-west">
+			<div class="block-vertical-toolbox">
+				<div class="imap-folders"></div>
+			</div>
+		</div>
+	</div>
+</body>
+
+</html>
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_alarm_list.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_alarm_list.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/followupflag_alarm_list.ejs	(revision 7210)
@@ -0,0 +1,26 @@
+<div class="content-alarm">
+	<span class="subtitle-alarm">
+		<strong><%=data.caption %></strong>
+	</span>
+	<ul class="message-list">
+	<%
+	for(var i=0; i<data.alarmInRange.length; i++){
+		if(data.type == 'filtersDeadline')
+			var openMessageScript = "$(this).parent().remove(); var msgs_count = $('.filtersDeadline').find('.message-item').length; if(msgs_count == 0){ $('.filtersDeadline').remove(); } $('.subtitle-alarm').find('strong').html((msgs_count == 1)?get_lang('"+data.captions.singular+"'):get_lang('"+data.captions.plural+"', msgs_count)); cExecute('$this.imap_functions.open_flagged_msg&msg_number="+data.alarmInRange[i].msg_number+"&msg_folder="+data.alarmInRange[i].msg_folder+"&alarm=true', show_msg);";
+		else	
+			var openMessageScript = "cExecute('$this.imap_functions.get_info_msg&msg_number="+data.alarmInRange[i].msg_number+"&msg_folder="+data.alarmInRange[i].msg_folder+"&alarm=true', show_msg);";
+	%>
+		<li class="message-item">
+			<a onclick="<%=openMessageScript%>">
+				<%= data.alarmInRange[i].a %>
+			</a>
+		</li>
+	<%
+	}
+	%>
+	</ul> 
+	<fieldset class="alert-options">
+		<input type="checkbox" class="stop-alert-alarm" name="stopAlert"> <label><%= get_lang("Don't show this window anymore today.")%></label>
+		<button class="confirm-alarm">Ok</button>
+	</fieldset>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist.ejs	(revision 7210)
@@ -0,0 +1,11 @@
+<div class="att-box ui-corner-all <%= (typeof(data.file.error) != 'boolean' ? 'invalid-email-box' : '') %>">
+    <!--<div style="position:absolute; text-align: center; line-height: 1.9em;">-->
+    	<span class="att-box-value"><%=data.file.fileName%>&nbsp;<b>(<%=data.file.fileSize%>)</b></span>
+        <span class="att-box-fullfilename" style="display:none;"><%=data.file.fullFileName%></span>
+        <span class="att-box-filesize" style="display:none;"><%=data.file.fileSize%></span>
+    	<% if(typeof(data.file.error) == 'boolean'){ %>
+    	<span class="att-box-loading">&nbsp;&nbsp;&nbsp;&nbsp;</span>
+    	<% } %>
+    	<span class="att-box-delete ui-icon-close ui-icon" style="display: inline-block;">&nbsp;</span>
+    <!--</div>-->
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_list.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_list.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_list.ejs	(revision 7210)
@@ -0,0 +1,21 @@
+	<ul class="label-list">
+		<%for (var i=0; i<data.labels.length; i++){ %>
+			
+			<li class="label-item label-item-<%= (data.labels[i].id) ? data.labels[i].id : ''%>" style="
+				background: <%= (data.labels[i].backgroundColor) ? data.labels[i].backgroundColor : '#ebebeb' %>;
+				color: <%= (data.labels[i].fontColor) ? data.labels[i].fontColor : '#000000' %>;
+				border-color: <%= (data.labels[i].borderColor) ? data.labels[i].borderColor : '#000000' %>;">
+			   
+				<span class="text-list"><%= (data.labels[i].name) ? data.labels[i].name : '' %></span>
+				<!--<input type="hidden" value="<%= (data.labels[i].id) ? data.labels[i].id : ''%>" name="labelItemId" class="id-item-list" />-->
+				<input type="hidden" value="<%= data.labels[i].id%>" name="labelItemId" class="id-item-list" />
+				
+				<div class="square-color" style="display: none; width:17px;height:12px;margin-top:1px;-moz-border-radius:3px;-webkit-border-radius:3px;
+						background: <%= (data.labels[i].backgroundColor) ? data.labels[i].backgroundColor : '#ffffff' %>; float:right;"></div>
+
+				<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div>
+				<div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div>
+			</li>
+		<%}%>
+	</ul>
+
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/listContacts.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/listContacts.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/listContacts.ejs	(revision 7210)
@@ -0,0 +1,46 @@
+<% 
+	var decodeType = {
+		'/dynamiccontacts': {
+			css: 'recent', 
+			img: 'recent', 
+			text: 'Contato dinâmico'
+		},
+		'/contacts':{
+			css: 'personal',
+			img: 'personal',
+			text: 'Contato pessoal',
+		},
+		'/sharedcontact':{
+			css: 'personal',
+			img: 'sharedcontact',
+			text: 'Contato compartilhado',
+		},
+		'/groups':{
+			css: 'group',
+			img: 'group',
+			text: 'Grupo pessoal',
+		},
+		'/sharedgroup':{
+			css: 'group',
+			img: 'sharedgroup',
+			text: 'Grupo compartilhado',
+		}
+	} 
+%>
+<%if (data.type == 'linha'){%>
+<li class="dynamic-separator">
+	<div class="line-separator">
+		&nbsp;
+	</div>
+<%}else{%>
+<li class="dynamic-<%=decodeType[data.type].css%>">
+	<a style="width:<%= (data.type == '/dynamiccontacts' ? '91%' : '97.5%')%>; display: inline-block;">
+		<img style="position:relative; top:2px; "src="../prototype/modules/mail/img/<%=decodeType[data.type].img%>.png" title="<%=decodeType[data.type].text%>"/>
+		<%= ($.trim(data.name) != "" ? (data.name.length > 20? data.name.substring(0,17)+"..." : data.name)+ " - " : "") %><%= data.mail %>
+		<% if(data.type == '/dynamiccontacts'){ %>
+			<div class="dynamic-stars" style="display: inline-block;float: right;"/>
+		<% } %>
+	</a>
+	<span style="width:16px; height:16px; top:5px; <%=data.type == '/dynamiccontacts' ?  '': 'display:none'%>">Excluir contato recente</span>	
+<%}%>
+</li>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_configure.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_configure.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_configure.ejs	(revision 7210)
@@ -0,0 +1,55 @@
+<link rel="stylesheet" href="../prototype/modules/mail/css/label.css" type="text/css" />	
+<link rel="stylesheet" href='../prototype/plugins/farbtastic/farbtastic.css' type="text/css" >
+
+<div class="acc-list list-label-content">
+	<h3><%= get_lang("My Labels")%></h3>
+		<div class="attendee-list-add">
+			<fieldset class="add-attendee-search search-field ui-corner-all">
+					<span class="ui-icon ui-icon-plus add-label-button"></span>
+					<input class="insert-label" type="text" value="<%=get_lang("Add Label")%>" maxlength="18" >
+			</fieldset>
+		</div>
+		<div class="label-list-container"></div>
+</div>
+<div class="configure-label-content">
+	<fieldset>
+	<legend><%= get_lang("Basic")%></legend>
+		<%= get_lang("Label name")%>: <input type="text" class="input-nome" value="" name="marcador" maxlength="18">
+		<input type="hidden" class="edit-label" value="" name="marcador">
+	</fieldset>
+	  <fieldset class="lebals-colorpicker">
+	  <legend><%= get_lang("Label Color")%></legend>
+		<div class="label-conf">
+			<select class="color-suggestions">		
+				  <option value="0"><%= get_lang("Default")%></option>		
+				  <option value="1"><%= get_lang("Coala")%></option>		
+				  <option value="2"><%= get_lang("Tomato")%></option>		
+				  <option value="3"><%= get_lang("Lemon")%></option>		
+				  <option value="4"><%= get_lang("high Contrast")%></option>		
+				  <option value="custom" selected="selected"><%= get_lang("Custom")%></option>
+			</select>
+			<div class="form-item">
+			  <label for="backgroundColor" class="label-cor"><%= get_lang("Label Color")%>:</label>
+			  <input type="text" name="backgroundColor" id="background" class="colorwell" value="#ebebeb" readonly="readonly" />
+			</div>
+			<div class="form-item">
+			  <label for="fontColor" class="label-cor"><%= get_lang("Text color")%>:</label>
+			  <input type="text" name="fontColor" class="colorwell" value="#000000" readonly="readonly" />
+			</div>
+			<div class="form-item">
+			  <label for="borderColor" class="label-cor"><%= get_lang("Border color")%>:</label>
+			  <input type="text" name="borderColor" class="colorwell" value="#000000" readonly="readonly" />
+			</div>			  
+			<div class="preview-label-outer">
+			  <span class="preview-label-inner"></span>
+			</div>
+		</div>				
+		<div class="colorpicker"></div>				  
+	  </fieldset>
+	<div class="buttons">
+		<span class="button delete-label"><%= get_lang("Delete")%></span><span class="button undo-label"><%= get_lang("Undo")%></span><span class="button save-label"><%= get_lang("Save")%></span>
+	</div>
+</div>
+<div class="button-close-window">
+	<span class="button close-window"><%= get_lang("Close")%></span>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/sendFileMessages.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/sendFileMessages.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/sendFileMessages.ejs	(revision 7210)
@@ -0,0 +1,5 @@
+<div style="overflow:auto; margin: 5px;">
+	<div id="foldertree-container-sendFileMessage" class="empty-container">
+		<span class="message"><%=get_lang('no folder found')%></span>
+	</div>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/draggin_box.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/draggin_box.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/draggin_box.ejs	(revision 7210)
@@ -0,0 +1,11 @@
+<div class="draggin-box">
+	<span class="ui-icon ui-icon-grip-dotted-vertical ui-draggin-default-image"></span>  
+	<span class="
+		 <% if(data.type == 'folder') {%>
+			draggin-folder
+		 <%}else{%>
+			draggin-mail
+		 <%}%>
+		 "><%= data.texto %>
+	</span>  
+ </div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist_tooltip.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist_tooltip.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment_add_itemlist_tooltip.ejs	(revision 7210)
@@ -0,0 +1,18 @@
+<div>
+	<div style="word-wrap: break-word;">
+		<b><%=get_lang("File name") %>: </b>
+		<%=data.attach.fullFileName%>
+	</div>
+	<div>
+		<b><%=get_lang("Size") %>: </b>
+		<%=data.attach.fileSize%>
+	</div>
+	<div>
+		<b>Status: </b>
+		<%if(typeof(data.attach.error) == "boolean"){%>
+	        <%=(data.attach.error ? get_lang("Loading") : get_lang("Success"))%>
+	    <%}else{%>
+	        <%=data.attach.error%>
+	    <%}%>
+	</div>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/float_folder_menu.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/float_folder_menu.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/float_folder_menu.ejs	(revision 7210)
@@ -0,0 +1,45 @@
+<%
+	var specialFolders = {
+			INBOX: {name:'Caixa de Entrada', classe:'inbox'}, 
+			Inbox: {name:'Caixa de Entrada', classe:'inbox'}, 
+		};
+	specialFolders[imap_configs.imapDefaultTrashFolder] = {name:'Lixeira', classe:'trash'};
+	specialFolders[imap_configs.imapDefaultDraftsFolder] = {name:'Rascunhos', classe:'drafts'};
+	specialFolders[imap_configs.imapDefaultSpamFolder] = {name:'Spam', classe:'spam'};
+	specialFolders[imap_configs.imapDefaultSentFolder] = {name:'Enviados', classe:'sent'};
+%>
+
+<span class="float-menu">
+	<%if(!data.flag.valid){ %>
+		<span class="ui-icon ui-icon-document float-menu-new floating-default" title="<%=("New Folder")%>"></span>  
+		<%if(!specialFolders[data.name_folder]){ %>
+			<span class="ui-icon ui-icon-pencil float-menu-edit floating-default" title="<%=("Edit folder")%>"></span>  
+			<span class="ui-icon ui-icon-close float-menu-remove floating-default" title="<%=("Delete folder")%>"></span>  
+		<%} 
+		else if(data.name_folder == imap_configs.imapDefaultTrashFolder){%>
+			<span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_trash_imap();" title="<%=("Empty Trash")%>"></span>  
+		<%}
+		else if(data.name_folder == imap_configs.imapDefaultSpamFolder){%>
+			<span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_spam_imap();" title="<%=("Empty Spam")%>"></span>  
+			
+		<%}%>
+
+	<%}else{ %>
+	<%	if(parseInt(data.acl.create)){%>
+			<span class="ui-icon ui-icon-document float-menu-new floating-default" title="<%=("New Folder")%>"></span> 
+	<%		if(parseInt(data.acl.delete) && parseInt(data.acl.rename) && !specialFolders[data.name_folder] && !data.flag.head){ %>
+				<span class="ui-icon ui-icon-pencil float-menu-edit floating-default" title="<%=("Edit folder")%>"></span>  
+	<%		} %>
+
+	<%	} %>
+	<%	if(parseInt(data.acl.delete) && !specialFolders[data.name_folder] && !data.flag.head){ %>
+			<span class="ui-icon ui-icon-close float-menu-remove floating-default" title="<%=("Delete folder")%>"></span>
+		<%}%>
+		<%if(data.name_folder == imap_configs.imapDefaultTrashFolder && parseInt(data.acl.delete)){%>
+			<span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_trash_imap(true, $(this));" title="<%=("Empty Trash")%>"></span>  
+		<%}else if(data.name_folder == imap_configs.imapDefaultSpamFolder && parseInt(data.acl.delete)){%>
+			<span class="ui-icon ui-icon-trash float-menu-clean floating-default" onclick="empty_spam_imap(true, $(this));" title="<%=("Empty Spam")%>"></span>  
+		<%}%>
+	<%}%>
+	<span class="ui-icon ui-icon-arrowthickstop-1-n float-menu-export floating-default" title="<%=("Export folder messages")%>"></span>  
+ </span>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/detailedfoldertree.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/detailedfoldertree.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/detailedfoldertree.ejs	(revision 7210)
@@ -0,0 +1,54 @@
+<%
+
+	var specialFolders = {
+			INBOX: {name:'Caixa de Entrada', classe:'inbox'}, 
+			Inbox: {name:'Caixa de Entrada', classe:'inbox'}, 
+		};
+	specialFolders[imap_configs.imapDefaultTrashFolder] = {name:'Lixeira', classe:'trash'};
+	specialFolders[imap_configs.imapDefaultDraftsFolder] = {name:'Rascunhos', classe:'drafts'};
+	specialFolders[imap_configs.imapDefaultSpamFolder] = {name:'Spam', classe:'spam'};
+	specialFolders[imap_configs.imapDefaultSentFolder] = {name:'Enviados', classe:'sent'};
+	function recursive_forest(array_trees)
+	{
+	  %><ul><%
+	
+	      for(var i=0; i<array_trees.length; i++)
+	      {
+		  folder_class = '';
+		  folder_name = array_trees[i].commonName;
+
+		  if( specialFolders[folder_name] ){
+		      folder_class = specialFolders[folder_name].classe;
+		      folder_name = specialFolders[folder_name].name;
+		  }
+
+		  %><li id="<%= array_trees[i].id %>" class="closed" role="folder"><span class="folder <%= folder_class %>" title="<%= folder_name %>" style="text-align : left; position : static;"><%= folder_name %>
+		  <% if(array_trees[i].messageCount.unseen > 0){	%>
+			<span style="text-align : left;">[<label id="dftree_<%= array_trees[i].id%>_unseen" class="folder_unseen" style="color : red; text-align : left;"><%= array_trees[i].messageCount.unseen %></label>]</span>
+		  <% }	%>
+		  <% if(array_trees[i].children_unseen > 0){	%>
+			<span style="text-align : left;">[<label id="dftree_<%= array_trees[i].id%>_children_unseen" class="folder_unseen" style="color : blue; text-align : left;"><%= array_trees[i].children_unseen %></label>]</span>
+		  <% }	%>
+		  </span>
+		  <%
+		  if (array_trees[i].children.length>0)
+			  recursive_forest(array_trees[i].children);
+
+		  %></li><%
+	      }
+ 
+	  %></ul><%
+	}
+%>
+<ul class="filetree foldertree-skin-prognus mainfoldertree">
+  <li><span class="folder head_folder">Minhas Pastas</span>
+      <% recursive_forest(data.folders[0]); %>
+  </li>
+  <% if(data.folders[1].length > 0) { %>
+  <li><span class="folder shared-folders">Pastas compartilhadas</span>
+      <% recursive_forest(data.folders[1]); %>
+  </li> 
+  <%}%>
+  <li><span class="folder head_folder all_accomp followup-messages">Para acompanhamento</span>
+  </li>
+</ul>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/email.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/email.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/email.ejs	(revision 7210)
@@ -0,0 +1,146 @@
+<div class="message">
+	<div class="message-options ui-widget-header ui-corner-all" style="width:100%; clear: both; display: inline-block; height: 30px; border-top-left-radius: 0px; border-top-right-radius: 0px;">
+		<div class="info" style="float: left; margin: 3px; padding-top: 5px;">
+			<span><%= data.info.from.full %></span>,<%= data.info.fulldate %> 
+		</div>
+		<!--<div style="float: right; margin: 3px; width: auto; display: inline;">
+			<span class="messages-controll" style="display: inline; margin-right: 1px;">
+				<button class="button messages-preferences" title="Preferências">&nbsp;</button>
+			</span>
+		</div> -->
+		<div style="float: right; margin: 3px; width: auto; display: inline;">
+			<span class="messages-controll" style="display: inline; margin-right: 1px;">
+				<button class="button message-prev" title="Mensagem Anterior">&nbsp;</button>
+				<button class="button message-next" title="Proxima Mensagem">Mais</button>
+			</span>
+		</div>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="messages-remove" style="display: inline; margin-right: 1px;">
+				<button class="button message-remove" title="Excluir">&nbsp;</button>
+			</span>
+		</div>
+		<% if($.trim(data.info.Draft) == ""){ %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="messages-forward" style="display: inline; margin-right: 1px;">
+				<button class="button message-forward" title="Encaminhar Mensagem">&nbsp;</button>
+			</span>
+		</div>
+		<div style="float: right; margin: 3px; width: auto; display: inline;">
+			<span class="message-reply" style="display: inline; margin-right: 1px;">
+				<button class="button message-reply" title="Responder Mensagem">&nbsp;</button>
+				<a href="#" class="button message-reply-options" title="Mais opções para responder">&nbsp;</a>
+				<div class="message-reply-menu-content" style="display:none;"> 
+					<ul>
+						<li><a href="#" class="menu-pass-through">Sem Histórico</a></li>
+						<li><a href="#" class="menu-command configurations">Todos com Histórico</a></li>
+						<li><a href="#" class="menu-command configurations">Todos sem Histórico</a></li>
+					</ul>
+				</div>
+			</span>
+		</div>
+		<% }else{ %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span class="message-edit" style="display: inline; margin-right: 1px;">
+				<button class="button message-edit" title="Editar Rascunho">&nbsp;</button>
+			</span>
+		</div>
+		<% } %>
+		<div style="float: right; margin: 3px; width: auto; display: inline; margin-right: 0px;">
+			<span style="display: inline;">
+				<button class="button message-tags" title="Marcadores">&nbsp;</button>
+				<div class="message-tags-menu-content" style="display:none;"> 
+					<ul>
+					</ul>
+				</div>
+
+				<a class="button message-more" href="#" title="Mais Ações">Mais</a>
+				<div class="message-more-menu-content" style="display:none;"> 
+					<ul>
+						<li><a href="#" class="menu-command configurations" onclick="wfolders.makeWindow('','move_to')">Mover</a></li>
+						<li><a href="#" class="menu-command configurations">Exportar</a></li>
+						<li><a href="#" class="menu-pass-through">Bloquear Remetente</a></li>
+						<li><a href="#" class="menu-pass-through">Reportar Erro</a></li>
+					</ul>
+				</div>
+			</span>
+		</div>
+		<div class="buttons" style="float: right; margin: 3px; width: auto; display: inline;">
+			<span  class="message-flags" style="display: inline; margin-right: 1px;">
+
+				<input type="checkbox" id="check10<%= data.ID %>" class="message-important-flag"
+				<%= data.info.Flagged ? 'checked="checked"' : '' %>
+				/>
+				<label title="Marcar como importante" for="check10<%= data.ID %>">&nbsp;</label>
+
+				<input type="checkbox" id="check2<%= data.ID %>" class="message-unread-flag"/>
+				<label title="Marcar como nao lida" for="check2<%= data.ID %>">&nbsp;</label>
+
+				<input type="checkbox" id="check3<%= data.ID %>" class="message-spam-flag" 
+					<%= data.info.msg_folder.split(cyrus_delimiter)[data.info.msg_folder.split(cyrus_delimiter).length -1] == spamfolder ? 'checked="checked"' : ''%>/>
+				<label title="Marcar como Spam" for="check3<%= data.ID %>">&nbsp;</label>
+
+				<input type="checkbox" id="check4<%= data.ID %>" class="message-followup-flag"/>
+				<label title="Marcar com Sinalizador" for="check4<%= data.ID %>">&nbsp;</label>
+
+			</span>
+		</div>
+	</div>
+
+	<div class="message-header" style="background-color : #F3F7FD; width: 100%; font-weight: bold; font-size: 18px; border-left: 5px solid #BBD8FB;border-radius:5px;">
+		<span class="message-subject"><%=data.info.subject%></span>
+		<table class="message-details">
+			<tr>
+				<td>
+					Enviado Por:
+				</td>
+				<td>
+					<%= data.info.reply_toaddress %>
+				</td>
+			</tr>
+			<tr>
+				<td>
+					De:
+				</td>
+				<td>
+					<%= data.info.from.full %>
+				</td>
+			</tr>
+				<td>
+					Para:
+				</td>
+				<td>
+					<%= data.info.toaddress2 %>
+				</td>
+			<tr>
+			</tr>
+				<td>
+					Data:
+				</td>
+				<td>
+					<%= data.info.fulldate %>
+				</td>
+			<tr>
+			<% if(data.info.cc != ""){ %>
+			</tr>
+				<td>
+					CC:
+				</td>
+				<td>
+					<%= data.info.cc %>
+				</td>
+			<tr>
+			<%}%>
+			</tr>
+			<tr>
+			</tr>
+		</table>
+	</div>
+	<div style="border-radius: 5px; width: 100%; height: 12px;border-bottom: 1px solid #CCC; cursor: pointer;" align="center" title="Mostrar/Ocultar Detalhes" class="message-hide-show-details">
+		<span class="ui-icon ui-icon-carat-1-n"></span>
+		<span class="ui-icon ui-icon-carat-1-s" style="display:none;"></span>
+	</div>
+
+	<div class="message-content">
+		<%= data.info.body %>
+	</div>
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/attachment.ejs	(revision 7210)
@@ -0,0 +1,20 @@
+<div id="fileupload_msg<%=data.ID%>" class="fileupload" style="margin : 15px 0px -15px -10px; padding-bottom : 5px;">
+	<div class="row fileupload-buttonbar">
+		<div class="button-files-upload">
+			<<%= is_webkit ? 'button' : 'span style="height: 22px; cursor:pointer;"' %>  class="fileinput-button button small">
+				<span style="margin-top: 4px; cursor:pointer;"><i class="icon-plus icon-white"></i>Anexar arquivos</span>
+				<INPUT type="file" id="fileInput<%=data.ID%>" name="files[]" multiple></INPUT>
+			</<%= is_webkit ? 'button' : 'span' %>>
+			<button class="message-attach-link button small">
+				<span>Anexar mensagens</span>
+			</button>
+		</div>
+	</div>
+	<br />
+	<div class="files-list" style="margin: 5px; padding: 5px;">
+		<div class="attachments-list ui-corner-all" style="display:none;"></div>
+	</div>
+</div>
+<div id="fileupload_msg<%=data.ID%>_droopzone" style="display:none;" class="fileupload_msg_tooltip">
+	Solte aqui seus anexos
+</div>
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_listitem.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_listitem.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/label_listitem.ejs	(revision 7210)
@@ -0,0 +1,11 @@
+	<li class="label-item label-item-<%= data.id%>" style="background: <%= (data.bgColor) ? data.bgColor : '#ebebeb' %>; 
+		color: <%= (data.fontColor) ? data.fontColor : '#000000' %>;
+		border: 1px solid <%= (data.borderColor) ? data.borderColor : '#000000' %>;">	
+		
+		<input type="hidden" value="<%= data.id%>" name="labelItemId" class="id-item-list" />
+		<span class="text-list"><%= data.name %></span>
+		<div class="button close tiny" style="float: right" title="<%= get_lang("Delete")%>"></div>
+		<div class="button edit tiny" style="float: right" title="<%= get_lang("Edit")%>"></div>
+					
+	</li>
+	
Index: sandbox/newExpressoMail/prototype/modules/newMail2/templates/new_message.ejs
===================================================================
--- sandbox/newExpressoMail/prototype/modules/newMail2/templates/new_message.ejs	(revision 7210)
+++ sandbox/newExpressoMail/prototype/modules/newMail2/templates/new_message.ejs	(revision 7210)
@@ -0,0 +1,159 @@
+<div class="new-msg-head-buttons table_message ui-widget-header" style="width:99.8%; clear: both; display: inline-block; height: 30px;">
+	<div class="new-msg-head-left-buttons" style="float: left; margin: 3px;">		
+		<button class="send button small" title="<%= get_lang("Send Mail") %>"><%= get_lang("Send") %></button>
+		<%
+		if((preferences.save_in_folder == "-1") || (preferences.save_in_folder == "")) {
+		%>
+		<button class="save-and-send button small"><%= get_lang("Send and file") %></button>
+		<%
+		}
+		%>
+		<button class="save button small" title="<%= get_lang("Save Mail") %>"><%=get_lang("Save")%></button>
+		<span class="flags-buttons">
+			<%
+			if (parseInt(preferences.use_important_flag)){
+			%>
+			<button class="important button small msg-option" name="input_important_message" title="<%= get_lang("Important message") %>">&nbsp;</button>
+			<%
+			}
+			%>
+			
+			<button class="return-recept button small msg-option <%=(parseInt(preferences.return_recipient_deafault) != 0 ? "expressomail-button-icon-ative": "")%>" name="input_return_receipt" title="<%= get_lang("Return receipt") %>">&nbsp;</button>
+			
+			<%
+			if(parseInt(preferences.use_assinar_criptografar)){
+				if(parseInt(preferences.use_signature_digital_cripto)){
+			%>
+			<button class="return_cripto button small" title="<%=get_lang("Digitally sign message?")%>">&nbsp;</button>
+			<button class="return_digital button small" title="<%=get_lang("Encrypted email")%>">&nbsp;</button>
+			<%
+				}
+			}
+			%>
+		</span>
+	</div>
+	<div class="new-msg-head-right-buttons" style="float: right; margin: 3px; margin-rigth: 5px;">
+		<span class="field-buttons">
+			<button class="button small cc-button">CC</button>
+			<%if(allow_hidden_copy){ %>
+			<button class="button small cco-button">CCO</button>
+			<%
+			}	
+			%>
+			<button class="button small reply-to-button"><%= get_lang("Reply") %></button>
+		</span>
+		<button class="button small rich-button"><%= (preferences.plain_text_editor == 1 ? get_lang("Rich Text") : get_lang("Simple Text")) %></button>
+	</div>
+</div>
+<div class="new-msg-head-data" style="font-size:11px; overflow: auto;height: 95%; width: 100%;">
+	<form method="POST" id="form_message_<%= data.id%>" name="form_message_<%= data.id%>" action="message:detail" <%= (is_ie ? "encoding=\'multipart/form-data\'" : "enctype=\'multipart/form-data\'") %>>
+		<input style="display: none; " name="abaID" value="<%= data.id %>">
+		<table style="width: 100%;height: auto;">
+			<tr class="from-tr" style="display:none;">
+				<td class="field">
+					<%= get_lang("From") %>:
+				</td>
+				<td class="value">
+					<select style="width: 99.3%;" class="from-select" name="input_from" >
+					</select>
+				</td>
+			</tr>
+			<tr class="to-tr">
+				<td class="field" style="width: 1%;">
+					<button title="<%= get_lang("Search") %> | <%= get_lang("Use F9 Key as shortcut.") %>" class="button small adress_button">
+						<%= get_lang("To") %>:
+					</button>
+				</td>
+				<td class="value" style="width: 100%;">
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input to email-text" name="input_aux_to" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input to" name="input_to" style="width:99%; resize: none;display : none;"></textarea>
+				</td>
+			</tr>
+			<tr class="cc-tr" style="display:none;">
+				<td class="field">
+					<button title="<%= get_lang("Search") %> | <%= get_lang("Use F9 Key as shortcut.") %>" class="button small adress_button">
+						Cc:
+					</button>
+				</td>
+				<td class="value">
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input cc email-text" name="input_aux_cc" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input cc" name="input_cc" style="width:99%; resize: none;display : none;"></textarea>
+				</td>
+			</tr>
+			<tr class="cco-tr" style="display:none;">
+				<td class="field">
+					<button title="<%= get_lang("Search") %> | <%= get_lang("Use F9 Key as shortcut.") %>" class="button small adress_button">
+						<%= get_lang("CCo") %>:
+					</button>
+				</td>
+				<td class="value">
+					<div class="email-area ui-corner-all">
+						<input class="new-message-input cco email-text" name="input_aux_cco" type="text" value="" autocomplete="off"/>	
+					</div>
+					<textarea class="new-message-input cco" name="input_cco" style="width:99%; resize: none;display : none;"></textarea>
+				</td>
+			</tr>
+            <tr class="reply-to-tr" style="display:none;">
+                <td class="field" style="width: 6%;">
+                    <%= get_lang("Reply to") %>:
+                </td>
+                <td class="value" style="width: 100%;">
+                    <div class="email-area ui-corner-all">
+                        <input class="new-message-input reply-to email-text" name="input_aux_reply_to" type="text" value="" autocomplete="off"/>    
+                    </div>
+                    <textarea class="new-message-input reply-to" name="input_reply_to" style="width:99%; resize: none;display : none;"></textarea>
+                </td>
+            </tr>
+			<tr class="subject-tr">
+				<td class="field">
+					<%=get_lang("Subject")%>:
+				</td>
+				<td class="value">
+					<input name="input_subject" class="new-message-input subject" style="width:99.2%; border-radius: 5px;"></input>
+				</td>
+			</tr>
+			<tr class="message-general-options" style="display:none;">
+				<td class="field">
+					<label for="important_message"><%=get_lang("Important message")%></label>
+					<label for="textplain_rt_checkbox"><%=get_lang("Simple text mode")%></label>
+					<label for="return_receipt"><%=get_lang("Return receipt")%></label>
+				</td>
+				<td class="value">
+					<input type="checkbox" class="checkbox" name="input_return_receipt" <%=(parseInt(preferences.return_recipient_deafault) != 0 ? "checked='True'": "")%>/>
+					<input type="checkbox" class="checkbox" name="input_important_message"/>
+					<input type="checkbox" class="checkbox" name="textplain_rt_checkbox" <%=(parseInt(preferences.plain_text_editor) == 1 ? "checked='True'" : "")%>/>
+					<%
+					if(parseInt(preferences.use_assinar_criptografar)){
+						if(parseInt(preferences.use_signature_digital_cripto)){
+					%>
+						<input type="checkbox" class="checkbox" name="input_return_digital"/>
+						<input type="checkbox" class="checkbox" name="input_return_cripto"/>
+					<%
+						}
+					}
+					%>
+				</td>
+			</tr>
+			<tr class="attachment">
+				<td class="field">
+					<%=get_lang("Attachments: ")%>
+					<input style="display:none;" name="attDisposition<%= data.id %>" id="attDisposition<%= data.id%>" value="attachment"/>
+				</td>
+				<td class="value">
+					<div id="message-attach-dialog" title="'<%=get_lang("Select messages to attach...")%>" style="clear: both; display:none;")>&nbsp;</div>
+				</td>
+			</tr>
+		</table>	
+		<div class="editor">
+			<textarea id="body_<%= data.id %>" style="width : 100%;"></textarea>
+		</div>
+		<input type="hidden" name="input_folder"/>
+		<input type="hidden" name="msg_reply_from"/>
+		<input type="hidden" name="msg_forward_from"/>
+		
+	</form>
+</div>
