Index: /trunk/mobile/mobile/calendar.php
===================================================================
--- /trunk/mobile/mobile/calendar.php	(revision 452)
+++ /trunk/mobile/mobile/calendar.php	(revision 452)
@@ -0,0 +1,99 @@
+<?
+	$phpgw_info = array();
+	$GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
+	if (!isset($GLOBALS['sessionid']) || !$GLOBALS['sessionid']) {
+		Header('Location: ./login.php?cd=10');
+		exit;
+	}
+
+	// Flag currentapp modificada para mobile
+	// Inserida flag mobileapp e definida como calendar
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'noheader'                => True,
+		'nonavbar'                => True,
+		'currentapp'              => 'mobile',
+		'mobileapp'				  => 'calendar',
+		'enable_network_class'    => True,
+		'enable_contacts_class'   => True,
+		'enable_nextmatchs_class' => True
+	);
+	include('../header.inc.php');
+	include('mobile_header.inc.php');
+
+	// Utiliza o novo header para a página principal.
+	print_header();
+
+	$accountId = $GLOBALS['phpgw_info']['user']['account_id'];
+
+	$uicalendar = CreateObject("calendar.uicalendar");
+	$daysofWeek = array(lang('Sunday'), lang('Monday'),lang('Tuesday'),lang('Wednesday'),lang('Thursday'),lang('Friday'),lang('Saturday'));
+	$year = $uicalendar->bo->year;
+	$month = $uicalendar->bo->month;
+	$day = $uicalendar->bo->day;
+	$start = $GLOBALS['phpgw']->datetime->get_weekday_start($year, $month, $day) + $GLOBALS['phpgw']->datetime->tz_offset;
+	$tstart = $start - $GLOBALS['phpgw']->datetime->tz_offset;
+	$tstop = $tstart + 604800;
+	$uicalendar->bo->so->owner = $accountId;
+	$uicalendar->bo->so->open_box($accountId);
+	$uicalendar->bo->store_to_cache(
+		Array(
+			'syear'  => date('Y',$tstart),
+			'owner'	=> $accountId,
+			'smonth' => date('m',$tstart),
+			'sday'   => date('d',$tstart),
+			'eyear'  => date('Y',$tstop),
+			'emonth' => date('m',$tstop),
+			'eday'   => date('d',$tstop)
+		)
+	);
+	$daily = $uicalendar->bo->cached_events;
+	$p = CreateObject('phpgwapi.Template', "../mobile/templates/".$GLOBALS['phpgw_info']['server']['template_set']);
+	$p->set_file(Array('view' => 'calendar.tpl'));
+	$data[] = array();
+	@ksort($daily);
+
+	if($daily){
+		$p->set_block('view','view_event');
+		foreach($daily as $date => $day_params)	{
+			$year  = (int)substr($date,0,4);
+			$month = (int)substr($date,4,2);
+			$day   = (int)substr($date,6,2);
+			$day_of_week = $daysofWeek[$GLOBALS['phpgw']->datetime->day_of_week($year,$month,$day)];
+			$p->set_var("header_date",$day_of_week." - ".$day."/".$month."/".$year);
+			for($i = 0; $i < count($day_params);$i++)	{
+				$vars = $uicalendar->bo->event2array($day_params[$i]);
+				$data  = array (
+							"title_field"		=> $vars['title']['field'],
+							"title_data"		=> $vars['title']['data'],
+							"location_field"	=> $vars['location']['field'],
+							"location_data"		=> $vars['location']['data'] ? $vars['location']['data'] : "&nbsp;",
+							"startdate_field"	=> $vars['startdate']['field'],
+							"startdate_data" 	=> substr($vars['startdate']['data'],13, 17),
+							"enddate_field" 	=> $vars['enddate']['field'],
+							"enddate_data" 		=> substr($vars['enddate']['data'],13, 17),
+							"description_field"	=> $vars['description']['field'],
+							"description_data"	=> $vars['description']['data'] ? $vars['description']['data'] : "&nbsp;"
+							);
+
+	    	 	$p->set_var($data);
+	    	 	$p->parse('views','view_event',True);
+			}
+		}
+		$p->pfp('out','views');
+	}
+	else {
+		$p->set_block('view','no_event');
+		$syear  = date('Y',$tstart);
+		$smonth = date('m',$tstart);
+		$sday   = date('d',$tstart);
+		$eyear  = date('Y',$tstop);
+		$emonth = date('m',$tstop);
+		$eday	= date('d',$tstop);
+		$p->set_var("start_date",$sday."/".$smonth."/".$syear);
+		$p->set_var("end_date", $eday."/".$emonth."/".$eyear);
+		$p->pfp('out','no_event');
+	}
+
+	// Utiliza o novo footer.
+	print_footer();
+?>
Index: /trunk/mobile/mobile/setup/phpgw_en.lang
===================================================================
--- /trunk/mobile/mobile/setup/phpgw_en.lang	(revision 452)
+++ /trunk/mobile/mobile/setup/phpgw_en.lang	(revision 452)
@@ -0,0 +1,4 @@
+From	mobile	pt-br	From
+Folder	mobile	pt-br	Folder
+Inbox	mobile	pt-br	Inbox
+Return	mobile	pt-br	Return
Index: /trunk/mobile/mobile/setup/phpgw_pt-br.lang
===================================================================
--- /trunk/mobile/mobile/setup/phpgw_pt-br.lang	(revision 452)
+++ /trunk/mobile/mobile/setup/phpgw_pt-br.lang	(revision 452)
@@ -0,0 +1,6 @@
+From	mobile	pt-br	De
+Folder	mobile	pt-br	Pasta
+Inbox	mobile	pt-br	Caixa de Entrada
+Return	mobile	pt-br	Retornar à lista de E-mails
+This message have attachment(s)	mobile	pt-br	Este e-mail possui anexo(s)
+This message don't have attachment(s)	mobile	pt-br	Este e-mail não possui anexo(s)
Index: /trunk/mobile/mobile/setup/setup.inc.php
===================================================================
--- /trunk/mobile/mobile/setup/setup.inc.php	(revision 452)
+++ /trunk/mobile/mobile/setup/setup.inc.php	(revision 452)
@@ -0,0 +1,43 @@
+<?php
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+	/* Basic information about this app */
+	$setup_info['mobile']['name']      = 'mobile';
+	$setup_info['mobile']['title']     = 'ExpressoMini';
+	$setup_info['mobile']['version']   = '0.1.001';
+	$setup_info['mobile']['app_order'] = 4;
+	$setup_info['mobile']['enable']    = 2;
+
+	$setup_info['mobile']['author'] = 'Mário César Kolling';
+	$setup_info['mobile']['note']   = 'Mobile é uma versão mais simples do Expresso, desenvolvida para ser utilizada através de dispositivos móveis';
+	$setup_info['mobile']['license']  = 'GPL';
+	$setup_info['mobile']['description'] = 'Mobile é uma versão mais simples do Expresso, desenvolvida para ser utilizada' .
+			' através de dispositivos móveis. Atualmente compreende um módulo de visualização de agenda e outro de leitura' .
+			' de e-mails.';
+
+	$setup_info['mobile']['maintainer'] = 'Mário César Kolling';
+	$setup_info['mobile']['maintainer_email'] = 'mario.kolling@serpro.gov.br';
+
+	/* The hooks this app includes, needed for hooks registration */
+	//$setup_info['mobile']['hooks'][] = 'admin';
+	//$setup_info['mobile']['hooks'][] = 'preferences';
+	//$setup_info['mobile']['hooks'][] = 'config_validate';
+
+	/* mobile Tables */
+
+	/* Dependencies for this app to work */
+	//TODO: Adicionar expressoMail1_2 e calendar como dependências
+	$setup_info['mobile']['depends'][] = array(
+		'appname' => 'phpgwapi',
+		'versions' => Array('0.9.14', '0.9.15' ,'0.9.24','1.0.0', '1.0.1')
+	);
+?>
Index: /trunk/mobile/mobile/mobilemail_index.php
===================================================================
--- /trunk/mobile/mobile/mobilemail_index.php	(revision 452)
+++ /trunk/mobile/mobile/mobilemail_index.php	(revision 452)
@@ -0,0 +1,77 @@
+<?php
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+
+	/* Índice da aplicação mobilemail */
+
+ 	$GLOBALS['phpgw_info'] = array();
+
+	/*
+	 * Para todas as aplicações do mobile mini a flag "currentapp" é definida como "mobile".
+	 * Foi criada a flag "mobileapp". Utilizada para determinar qual a aplicação móvel que está sendo executada no momento
+	 */
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'currentapp' => 'mobile',
+		'mobileapp'  => 'mobilemail',
+		'noheader'   => true,
+		'nonavbar'   => true
+	);
+	include('../header.inc.php');
+	include('mobile_header.inc.php');
+
+	/************************************\
+	 * Inicialização do expressoMail1_2 *
+	\************************************/
+	// Get Data from ldap_manager and emailadmin.
+	$ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
+	$boemailadmin	= CreateObject('emailadmin.bo');
+	$emailadmin_profile = $boemailadmin->getProfileList();
+	$_SESSION['phpgw_info']['expressomail']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
+	$_SESSION['phpgw_info']['expressomail']['user'] = $GLOBALS['phpgw_info']['user'];
+	$_SESSION['phpgw_info']['expressomail']['server'] = $GLOBALS['phpgw_info']['server'];
+	$_SESSION['phpgw_info']['expressomail']['ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;
+	$_SESSION['phpgw_info']['expressomail']['user']['email'] = $GLOBALS['phpgw']->preferences->values['email'];
+
+	// Fix problem with cyrus delimiter changes in preferences.
+	// Dots in names: enabled/disabled.
+	$save_in_folder = @eregi_replace("INBOX/", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder']);
+	$save_in_folder = @eregi_replace("INBOX.", "INBOX".$_SESSION['phpgw_info']['expressomail']['email_server']['imapDelimiter'], $save_in_folder);
+	$_SESSION['phpgw_info']['user']['preferences']['expressoMail']['save_in_folder'] = $save_in_folder;
+	// End Fix.
+
+    // Loading Admin Config Module
+    $c = CreateObject('phpgwapi.config','expressoMail1_2');
+    $c->read_repository();
+    $current_config = $c->config_data;
+    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_enable_log_messages'] = $current_config['expressoMail_enable_log_messages'];
+    // Begin Set Anti-Spam options.
+    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_ham'] = $current_config['expressoMail_command_for_ham'];
+    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_command_for_spam'] = $current_config['expressoMail_command_for_spam'];
+    $_SESSION['phpgw_info']['server']['expressomail']['expressoMail_use_spam_filter'] = $current_config['expressoMail_use_spam_filter'];
+    echo '<script> var use_spam_filter = \''.$current_config['expressoMail_use_spam_filter'].'\' </script>';
+	// End Set Anti-Spam options.
+
+    // Set Imap Folder names options
+    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultTrashFolder']		: "Trash";
+    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] ? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultDraftsFolder'] 	: "Drafts";
+    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder'] 	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSpamFolder']		: "Spam";
+    $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder']	= $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] 	? $_SESSION['phpgw_info']['expressomail']['email_server']['imapDefaultSentFolder'] 		: "Sent";
+
+	/*******************************\
+	 * Carrega o objeto mobilemail *
+	\*******************************/
+	print_header();
+	$obj = CreateObject('mobile.mobilemail');
+	$obj->index();
+	print_footer();
+
+?>
Index: /trunk/mobile/mobile/inc/common.inc.php
===================================================================
--- /trunk/mobile/mobile/inc/common.inc.php	(revision 452)
+++ /trunk/mobile/mobile/inc/common.inc.php	(revision 452)
@@ -0,0 +1,21 @@
+<?php
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+
+	/*
+	 * Não é necessário
+	 */
+	function mobileExecMethod($method, $functionparams = '_UNDEF_', $loglevel = 3, $classparams = '_UNDEF_'){
+
+	}
+
+?>
Index: /trunk/mobile/mobile/inc/class.mobilemail.inc.php
===================================================================
--- /trunk/mobile/mobile/inc/class.mobilemail.inc.php	(revision 452)
+++ /trunk/mobile/mobile/inc/class.mobilemail.inc.php	(revision 452)
@@ -0,0 +1,516 @@
+<?php
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+	//TODO: Criar a Classe Widget.
+
+	include_once(PHPGW_INCLUDE_ROOT.'/expressoMail1_2/inc/class.imap_functions.inc.php');
+
+	// Classe principal do Mini Mail
+	class mobilemail{
+
+		// Define as funções públicas
+		var $public_functions = array(
+			'mail_list'		=> True,
+			'change_folder' => True,
+			'change_page'	=> True,
+			'show_msg'		=> True,
+		);
+
+		var $folders; // Pastas imap
+		var $current_folder; // Pasta corrente
+		var $current_page; // Página corrente da lista de e-mails da pasta corrente
+		var $imap_functions; // Variável que recebe um objeto do tipo class.imap_functions.inc.php
+		var $allowed_tags = '<p><a><br><em><strong><ol><li><ul><div><font>'; // Tags html que não serão removidas
+			// ao mostrar corpo do e-mail
+
+
+		/*
+		 * @function mobilemail
+		 * @abstract Método construtor da classe principal do Mini Mail
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function mobilemail()
+		{
+
+			// Recupera atributos da classe gravados na sessão
+			$folders = $GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile');
+			$current_folder = $GLOBALS['phpgw']->session->appsession('mobilemail.current_folder','mobile');
+			$current_page = $GLOBALS['phpgw']->session->appsession('mobilemail.current_page','mobile');
+
+			// Inicializa a classe class.imap_functions.inc.php
+			$this->imap_functions = new imap_functions();
+
+			// Testa a existência dos atributos da classe recuperadas da sessão, e as carrega ou inicializa.
+			if ($folders)
+			{
+				$this->folders = $folders;
+			}
+			else
+			{
+				$this->folders = $this->imap_functions->get_folders_list();
+			}
+
+			if ($current_folder)
+			{
+				$this->current_folder = $current_folder;
+			}
+			else
+			{
+				$this->current_folder = 0; // Define o folder INBOX como o folder corrente
+			}
+
+			if ($current_page)
+			{
+				$this->current_page = $current_page;
+			}
+			else
+			{
+				$this->current_page = 1; // Define a primeira página como página padrão
+			}
+
+		}
+
+		/*
+		 * @function save_session
+		 * @abstract Salva os atributos da classe na sessão
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function save_session()
+		{
+
+			$GLOBALS['phpgw']->session->appsession('mobilemail.folders','mobile',$this->folders);
+			$GLOBALS['phpgw']->session->appsession('mobilemail.current_folder','mobile',$this->current_folder);
+			$GLOBALS['phpgw']->session->appsession('mobilemail.current_page','mobile',$this->current_page);
+
+		}
+
+		/*
+		 * @function change_page
+		 * @abstract Troca a página de exibição da lista de e-mails, e mostra a nova página
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function change_page()
+		{
+			if (isset($_GET['page']))
+			{
+				$this->current_page = $_GET['page'];
+			}
+			$this->mail_list();
+			$this->save_session();
+		}
+
+		/*
+		 * @function change_folder
+		 * @abstract Troca a pasta do imap, e mostra a primeira página da nova pasta
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function change_folder()
+		{
+			$folder = $_GET['folder'];
+			if (isset($folder))
+			{
+				$this->current_folder = $folder;
+				$this->current_page = 1;
+			}
+			$this->mail_list();
+			$this->save_session();
+		}
+
+		/*
+		 * @function show_msg
+		 * @abstract Mostra a mensagem de e-mail requisitada
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		 // TODO: retirar msg_folder dos parâmentros necessários no GET e usar $this->current_folder
+		function show_msg()
+		{
+			$params = array();
+
+			//TODO: testar chamar sem parâmetros para determinar se ocorre algum problema
+			if (isset($_GET['msg_number']) && isset($_GET['msg_folder']))
+			{
+				$params = array(
+					'msg_number' => $_GET['msg_number'],
+					'msg_folder' => $_GET['msg_folder'],
+				);
+			}
+
+			$msg = $this->imap_functions->get_info_msg($params);
+
+			// Carrega o template
+			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+			$p->set_file(
+				Array(
+					'view_msg_t' => 'view_msg.tpl'
+				)
+			);
+			$p->set_block('view_msg_t', 'mail_header');
+			$p->set_block('view_msg_t', 'mail_body');
+			$p->set_block('view_msg_t', 'mail_footer');
+			$p->set_block('view_msg_t', 'attachment_list');
+			$p->set_block('view_msg_t', 'begin_anchor');
+			$p->set_block('view_msg_t', 'end_anchor');
+
+			// Define o cabeçalho do e-mail
+			$p->set_var('from_label', lang("From"));
+			$p->set_var('from', $msg['from']['full']);
+			$p->set_var('to_label', lang("To"));
+			$p->set_var('to', $msg['toaddress2']);
+			$p->set_var('subject_label', lang("Subject"));
+			$p->set_var('subject', $msg['subject']);
+			$p->set_var('date_label', lang("Date"));
+			$p->set_var('date', $msg['fulldate']);
+
+
+			// Mostra o corpo do e-mail
+			$p->set_var('body', strip_tags($msg['body'], $this->allowed_tags)); // Usa a função strip_tags() para filtrar
+				// as tags que estão presentes no corpo do e-mail.
+			$p->set_var('link_text', lang("Return"));
+			$p->set_var('link', "index.php?menuaction=mobile.mobilemail.mail_list");
+
+			if (!empty($msg['attachments']) && !empty($msg['attachments']['names']))
+			{
+				$p->set_var('attachment_message', lang('This message have attachment(s)'));
+			}
+			else
+			{
+				$p->set_var('attachment_message', lang('This message don\'t have attachment(s)'));
+			}
+
+			$p->parse('view_msg_t', 'end_anchor');
+			$p->parse('view_msg_t', 'begin_anchor');
+			//$p->pfp('view_msg_t', 'mail_header');
+			$p->pfp('out', 'mail_header');
+			//$p->pfp('view_msg_t', 'mail_body');
+			$p->pfp('out', 'mail_body');
+			//$p->pfp('view_msg_t', 'attachment_list');
+			$p->pfp('out', 'attachment_list');
+			//$p->pfp('view_msg_t', 'mail_footer');
+			$p->pfp('out', 'mail_footer');
+
+		}
+
+		/*
+		 * @function index
+		 * @abstract Página inicial da aplicação mobilemail, mantém o estado atual. Ou seja, mostra lista de e-mails
+		 * do folder e página definidos pelos parâmetros current_folder e current_page.
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		 // TODO: Talvez seja melhor voltar sempre para o Inbox e primeira página
+		function index()
+		{
+
+			$this->print_folder_selection();
+			$this->mail_list();
+
+			$this->save_session();
+
+		}
+
+		/*
+		 * @function print_folder_selection
+		 * @abstract Imprime o folder corrente (INBOX)
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function print_folder_selection()
+		{
+
+			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+			$p->set_file(
+				Array(
+					'mobilemail_t' => 'mobilemail.tpl'
+				)
+			);
+			$p->set_block('mobilemail_t', 'inbox_folder_list');
+			$p->set_var('lang_folder', lang('Folder'));
+			$p->set_var('lang_inbox', lang('Inbox'));
+			//$p->set_var('folder_items', $folder_items);
+			$p->parse('mobilemail_t', 'inbox_folder_list');
+			$p->pfp('out', 'mobilemail_t');
+
+		}
+
+		/*
+		 * @function old_print_folder_selection
+		 * @abstract Imprime na tela a caixa de seleção de folders
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function old_print_folder_selection()
+		{
+
+			// Processa as options
+			$folder_items = '';
+
+			foreach ($this->folders as $i => $j)
+			{
+
+				$option_selected = '';
+				$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+				$p->set_file(
+					Array(
+						'mobilemail_t' => 'mobilemail.tpl'
+					)
+				);
+				$p->set_block('mobilemail_t', 'folder_item');
+
+				if (is_numeric($i))
+				{
+					if ($i == $this->current_folder)
+					{
+						 $option_selected = 'selected="selected"';
+					}
+
+					$p->set_var('option_selected', $option_selected);
+					$p->set_var('folder_id', $j['folder_id']);
+					$p->set_var('folder_name', $j['folder_id']); // Mudar... provavelmente usar preg_replace
+													   			 // para substituir cpf pelo nome do usuário.
+
+					if ($j['folder_unseen'] > 0)
+					{
+						$p->set_var('folder_unseen', ' - ('.$j['folder_unseen'].')');
+					}
+
+					$folder_items .= $p->fp('mobile_t', 'folder_item');
+				}
+
+			}
+
+			// Processa o select
+			$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+			$p->set_file(
+				Array(
+					'mobilemail_t' => 'mobilemail.tpl'
+				)
+			);
+			$p->set_block('mobilemail_t', 'folder_list');
+			$p->set_var('folder_items', $folder_items);
+			$p->parse('mobilemail_t', 'folder_list');
+			$p->pfp('out', 'mobilemail_t');
+
+		}
+
+		/*
+		 * @function mail_list
+		 * @abstract Imprime a lista de e-mails
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 */
+		function mail_list()
+		{
+
+			$this->messages_per_page = 10; //TODO: Pegar esse valor de preferences
+//		var $pages;
+//		var $actual_page;
+//		var $number_of_messages;
+
+			if (!isset($this->number_of_messages))
+			{
+				$params = array(
+					'folder' => $this->folders[$this->current_folder]['folder_id'],
+				);
+				$this->number_of_messages = $this->imap_functions->get_num_msgs($params);
+			}
+
+			// Recalcular as páginas
+			$this->pages = ceil($this->number_of_messages/$this->messages_per_page);
+			$page = $this->current_page;
+
+			$params = array(
+				'folder' 			=> $this->folders[$this->current_folder]['folder_id'],
+				'msg_range_begin' 	=> $this->current_page * 10 - 9,
+				'msg_range_end'		=> $this->current_page * 10,
+				'sort_box_type'		=> 'SORTARRIVAL',
+				'sort_box_reverse'	=> 1
+			);
+
+			$messages = $this->imap_functions->get_range_msgs2($params);
+
+			$this->print_mails_list($messages);
+			$this->print_page_navigation($this->pages, $this->current_page);
+
+		}
+
+		/*
+		 * @function print_mails_list
+		 * @abstract Imprime a lista de mensagens
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 * @param array Um array com a lista de mensagens recuperado por $this->imap_functions->get_range_msgs2($params)
+		 */
+		function print_mails_list($messages)
+		{
+
+			// Cria a lista de e-mails
+			$mail_rows = '';
+			if ($this->number_of_messages != 0)
+			{
+				foreach ($messages as $index => $msg)
+				{
+					$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+					$p->set_file(
+						Array(
+							'mobilemail_t' => 'mobilemail.tpl'
+						)
+					);
+					$p->set_block('mobilemail_t', 'mail_row');
+
+					if (is_numeric($index))
+					{
+						!empty($msg['from']['name']) ? $from = $msg['from']['name'] : $from = $msg['from']['email'];
+						!empty($msg['subject']) ? $subject = $msg['subject'] : $subject = lang('[empty subject]');
+						$p->set_var('from', $from);
+						$p->set_var('subject', $subject);
+						$p->set_var('msg_number', $msg['msg_number']);
+						$p->set_var('msg_folder', $this->folders[$this->current_folder]['folder_id']);
+						$p->set_var('from_label', lang('From'));
+						$mail_rows .= $p->fp('mobilemail_t', 'mail_row');
+					}
+				}
+
+				// Imprime a lista de e-mails
+				$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+				$p->set_file(
+					Array(
+						'mobilemail_t' => 'mobilemail.tpl'
+					)
+				);
+				$p->set_block('mobilemail_t', 'mail_list');
+				$p->set_var('mail_rows', $mail_rows);
+				$p->pfp('out', 'mail_list');
+			}
+			else
+			{
+				// Lista de e-mails vazia
+				$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+				$p->set_file(
+					Array(
+						'mobilemail_t' => 'mobilemail.tpl'
+					)
+				);
+				$p->set_block('mobilemail_t', 'empty_list');
+				$p->set_var('empty_message', lang('No messages in the mailbox'));
+				$p->pfp('out', 'empty_list');
+			}
+		}
+
+		/*
+		 * @funtion print_page_navigation
+		 * @abstract Imprime a barra de navegação da lista de e-mails da pasta corrente. Quem chama essa função é quem faz o controle do modelo.
+		 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+		 * @param integer Número de páginas que serão geradas
+		 * @param integer Página corrente
+		 */
+		// TODO: mover este método para a classe page_navigation subclasse de widget
+		function print_page_navigation($number_of_pages, $page = 1)
+		{
+
+			$pages = '';
+
+			if ($number_of_pages != 0)
+			{
+				// Geração das páginas
+				for ($i = 1; $i <= $number_of_pages ; $i++)
+				{
+
+					$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+					$p->set_file(
+						Array(
+							'mobilemail_t' => 'mobilemail.tpl'
+						)
+					);
+
+					$p->set_block('mobilemail_t', 'space');
+					$p->set_block('mobilemail_t', 'begin_anchor');
+					$p->set_block('mobilemail_t', 'end_anchor');
+					$p->set_block('mobilemail_t', 'page_item');
+					$p->set_block('mobilemail_t', 'begin_strong');
+					$p->set_block('mobilemail_t', 'end_strong');
+
+					if ($i == $page)
+					{
+						// Se for a página sendo gerada for a página corrente,
+						// não gera a âncora e destaca o número (negrito)
+						$p->set_var('end_anchor', '');
+						$p->set_var('begin_anchor', '');
+						$p->set_var('begin_strong', trim($p->fp('mobilemail_t', 'begin_strong')));
+						$p->set_var('end_strong', trim($p->fp('mobilemail_t', 'end_strong')));
+					}
+					else
+					{
+						// Senão, gera a âncora
+						$p->set_var('begin_strong', '');
+						$p->set_var('end_strong', '');
+						$p->set_var('end_anchor', trim($p->fp('mobilemail_t', 'end_anchor')));
+						$p->set_var('begin_anchor_href', "index.php?menuaction=mobile.mobilemail.change_page&page=$i");
+						$p->set_var('begin_anchor', trim($p->fp('mobilemail_t', 'begin_anchor')));
+					}
+
+					$p->set_var('page', $i);
+					$pages .= trim($p->fp('mobilemail_t', 'page_item'));
+
+				}
+
+				// Geração dos links "anterior" e "próximo"
+				$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+				$p->set_file(
+					Array(
+						'mobilemail_t' => 'mobilemail.tpl'
+					)
+				);
+
+				$p->set_block('mobilemail_t', 'space');
+				$p->set_block('mobilemail_t', 'mail_footer');
+				$p->set_block('mobilemail_t', 'previous');
+				$p->set_block('mobilemail_t', 'next');
+
+				$next_page = $page + 1;
+				$previous_page = $page - 1;
+
+				if ($page == 1)
+				{
+					// Se for a primeira página, não imprime o link "anterior""
+					$p->set_var('previous', '');
+					if ($page == $number_of_pages)
+					{
+						// Se só existir uma página, não imprime o link "próximo"
+						$p->set_var('next', '');
+					}
+					else
+					{
+						$p->set_var('next_href', "index.php?menuaction=mobile.mobilemail.change_page&page=$next_page");
+						$p->set_var('next', trim($p->fp('mobilemail_t', 'next')));
+					}
+
+				}
+				else if ($page == $number_of_pages)
+				{
+					// Se for a última página, não imprime o link "próximo"
+					$p->set_var('next', '');
+					$p->set_var('previous_href', "index.php?menuaction=mobile.mobilemail.change_page&page=$previous_page");
+					$p->set_var('previous', trim($p->fp('mobilemail_t', 'previous')));
+				}
+				else
+				{
+					// Senão, imprime os links "anterior" e "próximo"
+					$p->set_var('previous_href', "index.php?menuaction=mobile.mobilemail.change_page&page=$previous_page");
+					$p->set_var('previous', trim($p->fp('mobilemail_t', 'previous')));
+
+					$p->set_var('next_href', "index.php?menuaction=mobile.mobilemail.change_page&page=$next_page");
+					$p->set_var('next', trim($p->fp('mobilemail_t', 'next')));
+				}
+
+				$p->set_var('pages', $pages);
+				$p->pfp('out', 'mail_footer');
+			}
+
+		}
+
+	}
+?>
Index: /trunk/mobile/mobile/index.php
===================================================================
--- /trunk/mobile/mobile/index.php	(revision 452)
+++ /trunk/mobile/mobile/index.php	(revision 452)
@@ -0,0 +1,117 @@
+<?php
+	//TODO: Aplicar o conceito de subapp (mobileapp)
+
+	$phpgw_info = array();
+	$GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
+	if(!$GLOBALS['sessionid'])
+	{
+		/*if (($GLOBALS['phpgw_info']['server']['use_https'] == 2) && ($_SERVER['HTTPS'] != 'on'))
+		{
+
+			Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+			exit;
+		}
+		else
+		{*/
+		$location = 'Location: ' . $_SERVER['SCRIPT_URL'].'login.php';
+		Header('Location: ' . $_SERVER['SCRIPT_URL'].'login.php');
+		//Header('Location: ' . $_SERVER['SCRIPT_URL'].'login.php' .
+		//	(isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING']) ?
+		//	'?phpgw_forward='.urlencode('/index.php?'.$_SERVER['QUERY_STRING']):''));
+		exit;
+		//	Header('Location: login.php'.
+		//	(isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING']) ?
+		//	'?phpgw_forward='.urlencode('/mobile/index.php?'.$_SERVER['QUERY_STRING']):''));
+		//	exit;
+		//}
+	}
+
+	if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)	{
+		if ($_SERVER['HTTPS'] != 'on') {
+   			Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+			exit;
+		}
+	}
+
+	/*
+		This is the menuaction driver for the multi-layered design
+	*/
+	if(isset($_GET['menuaction']))
+	{
+		list($mobileapp,$class,$method) = explode('.',@$_GET['menuaction']);
+		if(! $mobileapp || ! $class || ! $method)
+		{
+			$invalid_data = True;
+		}
+	}
+	else
+	{
+	//$phpgw->log->message('W-BadmenuactionVariable, menuaction missing or corrupt: %1',$menuaction);
+	//$phpgw->log->commit();
+		$mobileapp = 'home';
+		$invalid_data = True;
+	}
+
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'noheader'   => True,
+		'nonavbar'   => True,
+		'currentapp' => 'mobile',
+		'mobileapp'  => $mobileapp,
+	);
+
+	include('../header.inc.php');
+	include('./mobile_header.inc.php');
+
+	if($mobileapp == 'home')
+	{
+		Header('Location: ' . $GLOBALS['phpgw']->link('/mobile/home.php'));
+	}
+
+	$GLOBALS[$class] = CreateObject(sprintf('%s.%s','mobile',$class));
+	$public_functions = $GLOBALS[$class]->public_functions;
+	if((is_array($GLOBALS[$class]->public_functions) && $GLOBALS[$class]->public_functions[$method]) && ! $invalid_data)
+	//if((is_array($public_functions) && $public_functions[$method]) && ! $invalid_data)
+	{
+		print_header();
+		execmethod($_GET['menuaction']);
+		print_footer();
+		unset($mobileapp);
+		unset($class);
+		unset($method);
+		unset($invalid_data);
+	}
+	else
+	{
+		if(!$mobileapp || !$class || !$method)
+		{
+			if(@is_object($GLOBALS['phpgw']->log))
+			{
+				$GLOBALS['phpgw']->log->message(array(
+					'text' => 'W-BadmenuactionVariable, menuaction missing or corrupt: %1',
+					'p1'   => $menuaction,
+					'line' => __LINE__,
+					'file' => __FILE__
+				));
+			}
+		}
+
+		if(!is_array($GLOBALS[$class]->public_functions) || ! $GLOBALS[$class]->public_functions[$method] && $method)
+		{
+			if(@is_object($GLOBALS['phpgw']->log))
+			{
+				$GLOBALS['phpgw']->log->message(array(
+					'text' => 'W-BadmenuactionVariable, attempted to access private method: %1',
+					'p1'   => $method,
+					'line' => __LINE__,
+					'file' => __FILE__
+				));
+			}
+		}
+		if(@is_object($GLOBALS['phpgw']->log))
+		{
+			$GLOBALS['phpgw']->log->commit();
+		}
+		$GLOBALS['phpgw']->redirect_link('/mobile/home.php');
+	}
+
+?>
Index: /trunk/mobile/mobile/mobile_header.inc.php
===================================================================
--- /trunk/mobile/mobile/mobile_header.inc.php	(revision 452)
+++ /trunk/mobile/mobile/mobile_header.inc.php	(revision 452)
@@ -0,0 +1,143 @@
+<?php
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+	/*******************************************\
+	 * Define a aplicação mobile preferencial  *
+	\*******************************************/
+	//TODO: Ler do banco do expresso as preferências do usuário e definir a aplicação móvel padrão
+	// por enquanto isto será hardcoded para mobilemail.
+	$GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] = 'mobilemail';
+	//TODO: Fazer mais genérico... Parecido com o home.php do expresso.
+
+	/*
+	 * @function start_prefered_app
+	 * @abstract Função que chama a aplicação móvel preferencial.
+	 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+	 */
+	function start_prefered_app(){
+
+		//TODO: Determinar qual a aplicação móvel preferida e iniciá-la.
+		//TODO: Costruir agenda como uma classe.
+
+		if ($GLOBALS['phpgw_info']['flags']['currentapp'] === 'mobile'){
+			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/'
+				. $GLOBALS['phpgw_info']['flags']['currentapp'] . '/'
+				. $GLOBALS['phpgw_info']['user']['preferences']['common']['default_mobile_app'] . '_'
+				. 'index.php'));
+		}
+
+	}
+
+	// Não será necessário implementar nada aqui
+	function print_navbar(){
+
+	}
+
+	/*
+	 * @function print_header
+	 * @abstract Imprime o início da tela do Expresso Mini, headers html e a barra de navegação
+	 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+	 */
+	function print_header(){
+
+		$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+		$p->set_file(
+				Array(
+					'home_t' => 'home.tpl'
+				)
+		);
+
+		$p->set_block('home_t', 'mobile_header');
+		$p->set_block('home_t', 'mobile_navbar');
+		$GLOBALS['phpgw']->accounts->read_repository();
+
+		$var  = Array(
+			'fullname'	=> $GLOBALS['phpgw']->accounts->data['fullname'],   //$GLOBALS['phpgw_info']['user']['firstname'],
+			//'last_name'		=> $GLOBALS['phpgw']->accounts->data['last_name'], //$GLOBALS['phpgw_info']['user']['lastname'],
+			'account_lid'	=> $GLOBALS['phpgw_info']['user']['account_lid'],
+			'lang_logout'	=> lang('Logout'),
+			'template_set'	=> $GLOBALS['phpgw_info']['server']['template_set']
+		);
+
+		$p->set_var($var);
+		$p->parse('home_t', 'mobile_header');
+
+		/*****************************\
+		 * Cria o link para a agenda *
+		\*****************************/
+		//TODO: Passar estes passos para um laço quando tivermos um modo de registrar aplicações mobile
+		$q = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+		$q->set_file(
+				Array(
+					'agenda_t' => 'home.tpl'
+				)
+		);
+
+		$q->set_block('agenda_t', 'agenda');
+		$q->set_block('agenda_t', 'begin_anchor');
+		$q->set_block('agenda_t', 'end_anchor');
+
+		$q->set_var('href', 'calendar.php');
+		$q->set_var('lang_agenda', lang('Calendar'));
+		$q->fp('agenda_t', 'begin_anchor');
+		$q->fp('agenda_t', 'end_anchor');
+
+		$p->set_var('agenda', trim($q->fp('agenda_t', 'agenda')));
+
+		/********************************\
+		 * Cria o link para o mobilemail *
+		\********************************/
+		$q = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+		$q->set_file(
+				Array(
+					'mobilemail_t' => 'home.tpl'
+				)
+		);
+
+		$q->set_block('mobilemail_t', 'mobilemail');
+		$q->set_block('mobilemail_t', 'begin_anchor');
+		$q->set_block('mobilemail_t', 'end_anchor');
+
+		$q->set_var('href', 'mobilemail_index.php');
+		$q->set_var('lang_email', lang('E-mail'));
+		$q->fp('mobilemail_t', 'begin_anchor');
+		$q->fp('mobilemail_t', 'end_anchor');
+
+		$p->set_var('mobilemail', trim($q->fp('mobilemail_t', 'mobilemail')));
+
+		/**************************************\
+		 * Termina de formar o menu e imprime *
+		\**************************************/
+		$p->parse('home_t', 'mobile_navbar', true);
+		$p->pfp('out', 'home_t');
+
+	}
+
+	/*
+	 * @function print_footer
+	 * @abstract Imprime o fim da tela do Expresso Mini, ou seja, fecha as tags <body> e <html>
+	 * @author Mário César Kolling <mario.kolling@serpro.gov.br>
+	 */
+	function print_footer(){
+
+		$p = CreateObject('phpgwapi.Template', PHPGW_SERVER_ROOT . '/mobile/templates/'.$GLOBALS['phpgw_info']['server']['template_set']);
+		$p->set_file(
+				Array(
+					'home_t' => 'home.tpl'
+				)
+		);
+
+		$p->set_block('home_t', 'mobile_footer');
+		$p->pfp('out', 'mobile_footer');
+
+	}
+?>
Index: /trunk/mobile/mobile/home.php
===================================================================
--- /trunk/mobile/mobile/home.php	(revision 452)
+++ /trunk/mobile/mobile/home.php	(revision 452)
@@ -0,0 +1,44 @@
+<?php
+
+	/**************************************************************************\
+	* eGroupWare                                                               *
+	* http://www.egroupware.org                                                *
+	* The file written by Mário César Kolling <mario.kolling@serpro.gov.br>    *
+	* --------------------------------------------                             *
+	*  This program is free software; you can redistribute it and/or modify it *
+	*  under the terms of the GNU General Public License as published by the   *
+	*  Free Software Foundation; either version 2 of the License, or (at your  *
+	*  option) any later version.                                              *
+	\**************************************************************************/
+
+	// Verifica se existe uma sessão
+	$phpgw_info = array();
+	$GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
+	if (!isset($GLOBALS['sessionid']) || !$GLOBALS['sessionid']) {
+		Header('Location: ./login.php?cd=10');
+		exit;
+	}
+
+	// Define as flas da aplicação mobile
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'noheader'                => True,
+		'nonavbar'                => True,
+		'currentapp'              => 'mobile',
+		//'disable_Template_class'  => True,
+		'enable_network_class'    => True,
+		'enable_contacts_class'   => True,
+		'enable_nextmatchs_class' => True
+	);
+
+	include('../header.inc.php');
+	include('./mobile_header.inc.php');
+	$accountId = $GLOBALS['phpgw_info']['user']['account_id'];
+
+	// executa a função start_prefered_app()
+	start_prefered_app();
+
+	// print_navbar()
+
+
+?>
+
Index: /trunk/mobile/mobile/login.php
===================================================================
--- /trunk/mobile/mobile/login.php	(revision 452)
+++ /trunk/mobile/mobile/login.php	(revision 452)
@@ -0,0 +1,143 @@
+<?php
+	//TODO: Trocar name="login" para name="user" no campo username
+	$phpgw_info = array();
+	$submit = False;
+
+	$GLOBALS['phpgw_info']['flags'] = array(
+		'disable_Template_class' => True,
+		'login'                  => True,
+		'currentapp'             => 'login',
+		'currentdir'             => '/mobile',
+		'noheader'               => True
+	);
+
+	include('../header.inc.php');
+	$GLOBALS['sessionid'] = @$_GET['sessionid'] ? $_GET['sessionid'] : @$_COOKIE['sessionid'];
+	if(isset($GLOBALS['sessionid']) && $_GET['cd'] != 10 && $_GET['cd'] != 1)
+		//$GLOBALS['phpgw']->redirect_link($GLOBALS['phpgw_info']['flags']['currentdir'].'/calendar.php');
+		//session_start();
+		$GLOBALS['phpgw']->redirect_link($GLOBALS['phpgw_info']['flags']['currentdir'].'/home.php');
+	if ($GLOBALS['phpgw_info']['server']['use_https'] > 0)	{
+		if ($_SERVER['HTTPS'] != 'on') {
+   			Header('Location: https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
+			exit;
+		}
+	}
+
+	$GLOBALS['phpgw']->session = CreateObject('phpgwapi.sessions');
+	//$GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/'.$GLOBALS['phpgw_info']['login_template_set'];
+	$GLOBALS['phpgw_info']['server']['template_dir'] = PHPGW_SERVER_ROOT.$GLOBALS['phpgw_info']['flags']['currentdir'].'/templates/';
+	$tmpl = CreateObject('phpgwapi.Template', $GLOBALS['phpgw_info']['server']['template_dir']);
+	$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'] = $GLOBALS['phpgw_info']['login_template_set'];
+	$tmpl->set_file(array('login_form' => 'login.tpl'));
+	$tmpl->set_var('cd',check_logoutcode($_GET['cd']));
+
+	function check_logoutcode($code) {
+		switch($code) {
+			case 1:
+				logout();
+				return lang('You have been successfully logged out');
+
+			case 2:
+				return lang('Sorry, your login has expired');
+
+			case 4:
+				return lang('Cookies are required to login to this site.');
+
+			case 5:
+				return '<font color="FF0000">' . lang('Bad login or password') . '</font>';
+
+			case 6:
+				return '<font color="FF0000">' . lang('Your password has expired, and you do not have access to change it') . '</font>';
+
+			case 98:
+				return '<font color="FF0000">' . lang('Account is expired') . '</font>';
+
+			case 99:
+				return '<font color="FF0000">' . lang('Blocked, too many attempts') . '</font>';
+
+			case 10:
+				$GLOBALS['phpgw']->session->phpgw_setcookie('sessionid');
+				$GLOBALS['phpgw']->session->phpgw_setcookie('kp3');
+				$GLOBALS['phpgw']->session->phpgw_setcookie('domain');
+				if($GLOBALS['phpgw_info']['server']['sessions_type'] == 'php4')	{
+					$GLOBALS['phpgw']->session->phpgw_setcookie(PHPGW_PHPSESSID);
+				}
+				return '<font color="#FF0000">' . lang('Your session could not be verified.') . '</font>';
+
+			default:
+				return '&nbsp;';
+		}
+	}
+
+	if($GLOBALS['phpgw_info']['server']['auth_type'] == 'http' && isset($_SERVER['PHP_AUTH_USER']))	{
+		$submit = True;
+		$login  = $_SERVER['PHP_AUTH_USER'];
+		$passwd = $_SERVER['PHP_AUTH_PW'];
+		$passwd_type = 'text';
+	}
+	else {
+		$passwd = $_POST['passwd'];
+		$passwd_type = $_POST['passwd_type'];
+	}
+
+	if(isset($passwd_type) || $_POST['submitit_x'] || $_POST['submitit_y'] || $submit) {
+		if(getenv('REQUEST_METHOD') != 'POST' && $_SERVER['REQUEST_METHOD'] != 'POST' &&
+			!isset($_SERVER['PHP_AUTH_USER']) && !isset($_SERVER['SSL_CLIENT_S_DN'])){
+			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link($GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php','cd=5'));
+		}
+
+		if(!$submit)
+			$login = $_POST['login'];
+
+		$GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create(strtolower($login),$passwd,$passwd_type,'u');
+
+		if(!isset($GLOBALS['sessionid']) || ! $GLOBALS['sessionid']){
+			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/login.php?cd=' . $GLOBALS['phpgw']->session->cd_reason);
+		}
+		else{
+			//$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/calendar.php');
+			$GLOBALS['phpgw']->redirect($GLOBALS['phpgw_info']['server']['webserver_url'] .$GLOBALS['phpgw_info']['flags']['currentdir'].'/home.php');
+		}
+	}
+	elseif ($_GET['lang'])	{
+		$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $_GET['lang'];
+	}
+	elseif(!isset($_COOKIE['last_loginid']) || !$prefs->account_id)	{
+		list($lang) = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);
+		$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] = $lang;
+	}
+
+	$tmpl->set_var('charset',$GLOBALS['phpgw']->translation->charset());
+	$tmpl->set_var('cookie',$last_loginid);
+	$tmpl->set_var('lang_username',lang('username'));
+	$tmpl->set_var('lang_password',lang('password'));
+	$tmpl->set_var('lang_login',lang('login'));
+	$tmpl->set_var('website_title', $GLOBALS['phpgw_info']['server']['site_title']);
+	$tmpl->set_var('template_set',$GLOBALS['phpgw_info']['login_template_set']);
+	$tmpl->set_var('language_select','');
+	$tmpl->set_var($var);
+	$tmpl->set_block('login_form','language_select');
+	$tmpl->pfp('loginout','login_form');
+
+	function logout(){
+		$verified = $GLOBALS['phpgw']->session->verify();
+		if ($verified)
+		{
+			if (file_exists($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']))
+			{
+				$dh = opendir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
+				while ($file = readdir($dh))
+				{
+					if ($file != '.' && $file != '..')
+					{
+						unlink($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid'] . SEP . $file);
+					}
+				}
+				rmdir($GLOBALS['phpgw_info']['server']['temp_dir'] . SEP . $GLOBALS['sessionid']);
+			}
+			$GLOBALS['phpgw']->hooks->process('logout');
+			$GLOBALS['phpgw']->session->destroy($GLOBALS['sessionid'],$GLOBALS['kp3']);
+		}
+	}
+?>
Index: /trunk/mobile/mobile/templates/default/home.tpl
===================================================================
--- /trunk/mobile/mobile/templates/default/home.tpl	(revision 452)
+++ /trunk/mobile/mobile/templates/default/home.tpl	(revision 452)
@@ -0,0 +1,40 @@
+<!-- BEGIN mobile_header -->
+<html>
+<head>
+<meta http-equiv="Content-Language" content="en" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<!-- <LINK href="../phpgwapi/templates/{template_set}/css/{template_set}.css" type=text/css rel=StyleSheet> -->
+<LINK href="./templates/css/mobile.css" type=text/css rel=StyleSheet>
+<title>Expresso Mobile {lang_home}</title>
+</head>
+<body style="background-color:white !important">
+<p>&nbsp;&nbsp;<strong>{fullname}: [{account_lid}]</strong></p>
+<hr />
+<!-- END mobile_header -->
+
+<!-- BEGIN mobile_navbar -->
+<!-- TODO: Yep! Deveria ser flexível, não hardcoded do jeito que tá -->
+<p>&nbsp;&nbsp;<strong>Expresso Mini</strong> :: {agenda} :: {mobilemail} :: <a href="./login.php?cd=1">{lang_logout}</a></p>
+<hr />
+<!-- END mobile_navbar -->
+
+<!-- BEGIN agenda -->
+{begin_anchor}{lang_agenda}{end_anchor}
+<!-- END agenda -->
+
+<!-- BEGIN mobilemail -->
+{begin_anchor}{lang_email}{end_anchor}
+<!-- END mobilemail -->
+
+<!-- BEGIN begin_anchor -->
+<a href="{href}">
+<!-- END begin_anchor -->
+
+<!-- BEGIN end_anchor -->
+</a>
+<!-- END end_anchor -->
+
+<!-- BEGIN mobile_footer -->
+</body>
+</html>
+<!-- END mobile_footer -->
Index: /trunk/mobile/mobile/templates/default/login.tpl
===================================================================
--- /trunk/mobile/mobile/templates/default/login.tpl	(revision 452)
+++ /trunk/mobile/mobile/templates/default/login.tpl	(revision 452)
@@ -0,0 +1,47 @@
+<HTML>
+<HEAD>
+<!-- <link href="../phpgwapi/templates/celepar/login.css" rel="stylesheet" type="text/css"> -->
+<LINK href="./templates/css/mobile.css" type=text/css rel=StyleSheet> 
+<TITLE>{website_title} - {lang_login}</TITLE>
+</HEAD>
+<body scroll="no"  style="overflow:hidden" bgcolor="#ffffff">
+	<table border="0" height="100%" width="100%">
+		<tr>
+			<td align="center" valign="top">
+				<div align="center" class="msgInicial">{cd}<br>{lang_message}<br>{website_title}<br><br></div>
+		        	<table border="0" bordercolor="#cfcfcf" cellpadding="0" cellspacing="0" width="auto">
+			        	<tbody>
+						<form name="form_login" method="post" action="./login.php" autocomplete=off>
+						<tr>
+							<td align="center" bgcolor="#f7f7f7" style="border:1px solid black">
+								<table border="0" cellpadding="1" cellspacing="0" class="tableLogin">
+									<tr><td width="96" colspan="3">&nbsp;</td></tr>												
+								    <tr><td width="120" class="loginLabel" align="right">{lang_username}:&nbsp;</td>
+										<td width="120"><input name="login" size="15">
+										<script>document.form_login.login.focus();</script></td>
+										<td width="43" rowspan="3" colspan=2>&nbsp;</td>
+									</tr>
+									<tr>
+										<td width="120" class="loginLabel"  align="right">{lang_password}:&nbsp;</td>
+										<td width="35"><input name="passwd" type="password" size="15"></td>
+									</tr>
+									<tr>
+										<td width="66">&nbsp;</td>
+										<td width="135">
+										  <input type="submit" value="{lang_login}" name="submitit" class="button">
+										</td>
+									</tr>
+								</table>              
+							</td>
+						</tr>
+						<input type="hidden" name="passwd_type" value="text">
+						<input type="hidden" name="account type" value="u">
+		              	</form>		          
+						</tbody>
+					</table>      
+				</div>
+			</td>		
+		</tr>
+	</table>
+</body>
+</html>
Index: /trunk/mobile/mobile/templates/default/calendar.tpl
===================================================================
--- /trunk/mobile/mobile/templates/default/calendar.tpl	(revision 452)
+++ /trunk/mobile/mobile/templates/default/calendar.tpl	(revision 452)
@@ -0,0 +1,28 @@
+<!-- BEGIN view_event -->
+<font color="#000066"><b>{header_date}</b></font><br>
+<table bgcolor="#f7f7f7" style="border:1px solid black" border="1" width="20%">
+	<tr>
+		<td valign="top" width="10%">&nbsp;<b>{title_field}:</b></td>
+		<td  valign="top" nowrap>{title_data}</td>
+	</tr>
+	<tr>
+		<td valign="top" width="10%" nowrap>&nbsp;<b>{location_field}:</b></td>
+		<td  valign="top" nowrap>{location_data}</td>
+	</tr>
+	<tr>
+		<td valign="top" width="10%" nowrap>&nbsp;<b>{startdate_field}:</b></td>
+		<td  valign="top" nowrap>{startdate_data}</td>
+	</tr>
+	<tr>
+		<td valign="top" width="10%" nowrap>&nbsp;<b>{enddate_field}:</b></td>
+		<td  valign="top" nowrap>{enddate_data}</td>
+	</tr>
+	<tr>
+		<td valign="top" width="10%" nowrap>&nbsp;<b>{description_field}:</b></td>
+		<td  valign="top" >{description_data}</td>
+	</tr>
+	</table><br>
+<!-- END view_event -->
+<!-- BEGIN no_event -->
+	<br>Na semana de <b>{start_date}</b> à <b>{end_date}</b> você não possui nenhum compromisso agendado.
+<!-- END no_event -->
Index: /trunk/mobile/mobile/templates/default/mobilemail.tpl
===================================================================
--- /trunk/mobile/mobile/templates/default/mobilemail.tpl	(revision 452)
+++ /trunk/mobile/mobile/templates/default/mobilemail.tpl	(revision 452)
@@ -0,0 +1,68 @@
+<!-- BEGIN folder_list -->
+<form id="folders_list_form" method="get" action="/naoseiainda.php">
+<!-- Adicionar Label antes e um botão após -->
+	<p>&nbsp;&nbsp;<select id="select_current_folder" name="current_folder" onchange="document.getElementById('folders_list_form').submit();">
+		{folder_items}
+	</select></p>
+</form>
+<hr />
+<!-- END folder_list -->
+
+<!-- BEGIN inbox_folder_list -->
+<p>&nbsp;&nbsp;<strong>{lang_folder}</strong>: {lang_inbox}</p>
+<hr />
+<!-- END inbox_folder_list -->
+
+<!-- BEGIN folder_item -->
+		<option {option_selected} value="{folder_id}">{folder_name} {folder_unseen}</option>
+<!-- END folder_item -->
+
+<!-- BEGIN mail_list -->
+{mail_rows}
+<hr />
+<!-- END mail_list -->
+
+<!-- BEGIN mail_row -->
+<p>&nbsp;&nbsp;<strong>{from_label}</strong>: {from}<br>
+&nbsp;&nbsp;&nbsp;&nbsp;<a href="index.php?menuaction=mobile.mobilemail.show_msg&msg_number={msg_number}&msg_folder={msg_folder}">{subject}</a></p>
+<!-- END mail_row -->
+
+<!-- BEGIN mail_footer -->
+<p>&nbsp;&nbsp;{previous}{space}{pages}{next}</p>
+<!-- END mail_footer -->
+
+<!-- BEGIN space -->
+&nbsp;
+<!-- END space -->
+
+<!-- BEGIN previous -->
+<a href="{previous_href}">&lt;</a>
+<!-- END previous -->
+
+<!-- BEGIN next -->
+<a href="{next_href}">&gt;</a>
+<!-- END next -->
+
+<!-- BEGIN page_item -->
+{begin_strong}{begin_anchor}{page}{end_anchor}{end_strong}{space}
+<!-- END page_item -->
+
+<!-- BEGIN end_anchor -->
+</a>
+<!-- END end_anchor -->
+
+<!-- BEGIN begin_anchor -->
+<a href="{begin_anchor_href}">
+<!-- END begin_anchor -->
+
+<!-- BEGIN empty_list -->
+<p>&nbsp;&nbsp;{empty_message}</p>
+<!-- END empty_list -->
+
+<!-- BEGIN begin_strong -->
+<strong>
+<!-- END begin_strong -->
+
+<!-- BEGIN end_strong -->
+</strong>
+<!-- END end_strong -->
Index: /trunk/mobile/mobile/templates/default/view_msg.tpl
===================================================================
--- /trunk/mobile/mobile/templates/default/view_msg.tpl	(revision 452)
+++ /trunk/mobile/mobile/templates/default/view_msg.tpl	(revision 452)
@@ -0,0 +1,31 @@
+<!-- BEGIN mail_header -->
+<p>&nbsp;&nbsp;<strong>{from_label}</strong>: {from}</p>
+<p>&nbsp;&nbsp;<strong>{to_label}</strong>: {to}</p>
+<p>&nbsp;&nbsp;<strong>{subject_label}</strong>: {subject}</p>
+<p>&nbsp;&nbsp;<strong>{date_label}</strong>: {date}</p>
+<br />
+<br />
+<!-- END mail_header -->
+
+<!-- BEGIN mail_body -->
+<div style="border: solid; border-width: 1px; margin: 5px; padding: 10px; width: 97%;">{body}</div></span>
+<br />
+<br />
+<!-- END mail_body -->
+
+<!-- BEGIN mail_footer -->
+<p>&nbsp;&nbsp;{begin_anchor}{link_text}{end_anchor}</p>
+<!-- END mail_footer -->
+
+<!-- BEGIN attachment_list -->
+<p>&nbsp;&nbsp;{attachment_message}</p>
+<br />
+<!-- END attachment_list -->
+
+<!-- BEGIN end_anchor -->
+</a>
+<!-- END end_anchor -->
+
+<!-- BEGIN begin_anchor -->
+<a href="{link}">
+<!-- END begin_anchor -->
Index: /trunk/mobile/mobile/templates/css/mobile.css
===================================================================
--- /trunk/mobile/mobile/templates/css/mobile.css	(revision 452)
+++ /trunk/mobile/mobile/templates/css/mobile.css	(revision 452)
@@ -0,0 +1,441 @@
+.grid_email_class
+{
+	border-bottom:1px solid #cfcfcf;
+}
+
+body
+{
+	/*margin: 0px !important;
+*/
+	/*background-color:#E9E9E9 !important;
+*/
+	font-size: 13px !important;
+	font-family: Verdana, Arial, Helvetica, sans-serif !important;
+	left: 0px;
+	padding: 0px;
+	margin: 0px;
+	/*padding:0px !important;
+*/
+}
+
+img
+{
+	border-width:0px !important;
+	border-style:none !important;
+	/*filter:progid:DXImageTransform.Microsoft.AlphaImageLoader;
+*/
+}
+
+a:link,a:visited
+{
+	cursor:pointer !important;
+	color: #0000aa !important;
+	text-decoration: none !important;
+}
+
+a:hover,a:active
+{
+	cursor:pointer !important;
+	color: #ff9933 !important;
+	text-decoration: underline !important;
+}
+
+input, button
+{
+	font-size: 11px !important;
+	color: #006699 !important;
+	font-family: Arial, Helvetica, sans-serif !important;
+	border: 1px #000066 solid !important;
+}
+
+input[type=submit],input[type=button],button
+{
+	margin:1px !important;
+	padding:0px 6px 0px 6px !important;
+	cursor: pointer !important;
+	cursor: hand !important;
+}
+
+input[type=image]
+{
+	cursor: pointer !important;
+	cursor: hand !important;
+	border: 1px #bbbbbb none !important;
+}
+select
+{
+	font-size: 11px !important;
+	color: #000066 !important;
+	font-family: Arial, Helvetica, sans-serif !important;
+	border: 1px #bbbbbb solid !important;
+	z-index: -1 !important;
+}
+
+td
+{
+	font-size: 11px !important;
+	/*text-align:left;*/
+	/*	padding-top:1px;
+	padding-bottom:1px;*/
+}
+
+.divLoginbox
+{
+	position:relative;
+	width: 300px;
+	border-right: #9c9c9c 0px solid;
+	border-top: #9c9c9c 1px solid;
+	border-left: #9c9c9c 0px solid;
+	border-bottom: #9c9c9c 1px solid
+}
+
+.divLoginboxHeader
+{
+	text-align:center;
+	background-color:#dddddd;
+	padding-top:2px;
+	font-size:10px;
+	color:#666666;
+}
+.divSidebox
+{
+	position:relative;
+	width: 147px;
+	border-right: #9c9c9c 1px solid;
+	border-top: #9c9c9c 1px solid;
+	border-left: #9c9c9c 1px solid;
+	border-bottom: #9c9c9c 1px solid
+}
+
+.tblHeadApp {
+
+	border-right: #9c9c9c 1px solid;
+	border-top: #9c9c9c 1px solid;
+	border-left: #9c9c9c 1px solid;
+	border-bottom: #9c9c9c 1px solid
+}
+
+.divSideboxHeader
+{
+	text-align:center;
+	background-color:#000066;
+	padding-top:2px;
+	height: 15px;
+	color: #FFFFFF;
+
+}
+
+a.divSideboxEntry, .divSideboxEntry
+{
+	text-align:left;
+	height:16px;
+	background-color:#eeeeee;
+}
+
+a.appTitles,.appTitles
+{
+	font-size: 10px;
+	height:18px;
+	padding-top:2px;
+	padding-bottom:2px;
+
+}
+
+a.textSidebox
+{
+	font-size: 10px;
+	border-top: #aaaaaa 0px none;
+}
+
+.textSidebox
+{
+	font-size: 10px;
+	height:18px;
+	padding-top:2px;
+	padding-bottom:2px;
+	border-top: #aaaaaa 1px solid;
+
+}
+
+.sideboxSpace
+{
+	height:9px;
+}
+
+.greyLine
+{
+	margin:1px;
+	border-top-color:#7e7e7e;
+	border-top-width:1px;
+	border-top-style:solid;
+	height:1px;
+}
+
+.prefSection
+{
+	font-weight:bold;
+	font-size:16px;
+	line-height:40px;
+}
+
+#extraIcons
+{
+/*	position:absolute;
+	z-index:13;
+	right:10px;
+	top:113px;
+	visibility:hidden;*/
+/*	background-image:url(../images/alpha-white.png);*/
+	background-color:#eeeeee;
+	border-width:1px;
+	border-color:#7e7e7e;
+	border-style:solid;
+}
+
+.extraIconsRow
+{
+	border-top-color:#dddddd;
+	border-top-width:1px;
+	border-top-style:solid;
+	padding:2px;
+}
+
+#divMain
+{
+	background-color:white;
+	margin-top: 0px;
+	padding:9px;
+	border-color:#7e7e7e;
+	border-width:1px;
+	border-style:solid;
+}
+
+#divLogo
+{
+	position:absolute;
+	left:20px;
+	top:5px;
+	z-index:51;
+}
+
+#divAppIconBar
+{
+	background-color:white;
+	border-top-color:#9c9c9c;
+	border-top-width:1px;
+	border-top-style:solid;
+	background-image: url(../images/background-icon-bar.png);
+	background-repeat: repeat-x
+}
+
+#divAppTextBar
+{
+	background-color:white;
+}
+
+#divStatusBar
+{
+	background-color:#f7f8fa;
+	height:15px;
+	padding-left:10px;
+	padding-top:0px;
+}
+
+/*#divSubContainer
+{
+}
+*/
+#tdSidebox
+{
+	width:170px;
+	background-color:white;
+	overflow:visible;
+}
+
+
+#tdAppbox
+{
+	background-color:white;
+	width: 100%;
+}
+#divSideboxContainer
+{
+	position:relative;
+	width:150px;
+	top:0px;
+	left:0px;
+	background-color:white;
+	border-width:1px;
+	border-style:solid;
+	z-index:40;
+}
+
+#divAppboxHeader
+{
+	margin-top:2px;
+	margin-left:2px;
+	margin-right:2px;
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 14px;
+	font-weight: bold;
+	color: #000066;
+	text-align: center;
+	padding: 0px;
+	background-image:url(../images/appbox-header-background21.png);
+	background-repeat: repeat-x;
+	height:24px;
+	line-height:24px;
+	border-top-color:#9c9c9c;
+	border-top-width:1px;
+	border-top-style:solid;
+	border-left-color:#9c9c9c;
+	border-left-width:1px;
+	border-left-style:solid;
+	border-right-color:#9c9c9c;
+	border-right-width:1px;
+	border-right-style:solid;
+}
+
+#divAppbox
+{
+	background-color:#f7f7f7;
+	padding-right:1px;
+	padding-top:1px;
+	padding-bottom:1px;
+	padding-left:15px;
+	border-bottom-color:#9c9c9c;
+	border-bottom-width:1px;
+	border-bottom-style:solid;
+	border-left-color:#9c9c9c;
+	border-left-width:1px;
+	border-left-style:solid;
+	border-right-color:#9c9c9c;
+	border-right-width:1px;
+	border-right-style:solid;
+	margin-top:0px;
+	margin-bottom:0px;
+	margin-left:2px;
+	margin-right:2px;
+
+}
+
+#fmStatusBar
+{
+	margin-left:4px;
+	margin-bottom:3px;
+	font-size: 10px;
+/*	font-family: Verdana, Arial, Helvetica, sans-serif;*/
+
+
+}
+
+
+.fmButton
+{
+	background-image:url(../images/buttonbackground.png);
+	width:28px;
+	height:28px;
+	background-repeat: no-repeat;
+}
+
+#fmLocation
+{
+	position:relative;
+	/*background-image:url(../images/buttonbackgroundscaled.png);
+	background-repeat: repeat-x;*/
+	/*margin-left:4px;*/
+	margin-bottom:3px;
+	height:27px;
+
+}
+
+#fmMenu
+{
+	position:relative;
+}
+#fmFileWindow
+{
+	background-color:#ffffff;
+	margin-left:4px;
+	padding:5px;
+	position:relative;
+	border-right: #cccccc 1px solid;
+	border-top: #9c9c9c 2px solid;
+	border-left: #9c9c9c 2px solid;
+	border-bottom: #cccccc 1px solid
+}
+
+#user_info
+{
+padding-left:17px;
+
+}
+
+#admin_info
+{
+	position:relative;
+	text-align:center;
+	margin-right:10px;
+}
+
+#divGenTime
+{
+	bottom:14px;
+	font-size: 9px;
+	color: #ff0000;
+	text-align:center;
+	width:99%;
+}
+
+#divPoweredBy
+{
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	color: #999999;
+	text-decoration: none;
+	padding: 7px;
+	text-align: center;
+	background-color:white;
+}
+
+A.minicalhol
+{
+	padding-left:3px;
+	padding-right:3px;
+	background: #dab0b0;
+	color: #000000;
+	font-size: 10px;
+}
+.loginLabel {
+	font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 10px;
+	color: #000066;
+	padding-left: 0px;
+}
+.tableLogin {
+        padding: 0px;
+        /*width: 274px;*/
+}
+.login {
+        text-align:center;
+        background-color: #F7F7F7;
+        border: 1px solid #CCCCCC;
+        margin: 5px 5px 50px;
+        padding: 5px;
+        height: 116px;
+        width: 300px;
+}
+.button {
+        font-family: Verdana, Arial, Helvetica, sans-serif;
+        font-size: 10px;
+        color: 006699;
+        background-color: #D4D0C8;
+        border: 1px solid #666666;
+}
+.msgInicial {
+        font-family: Verdana, Arial, Helvetica, sans-serif;
+	font-size: 12px;
+	color: #000066;
+	font-weight: bold;
+	padding-top: 70px;
+}
