Index: /branches/2.2/mobile/inc/class.ui_mobilemail.inc.php
===================================================================
--- /branches/2.2/mobile/inc/class.ui_mobilemail.inc.php	(revision 4002)
+++ /branches/2.2/mobile/inc/class.ui_mobilemail.inc.php	(revision 4040)
@@ -28,5 +28,4 @@
 			'new_msg'	=> True,
 			'delete_msg'	=> True,
-			'confirm_delete_msg'	=> True,
 			'init_schedule' => true,
 			'add_recipients' => true,
@@ -213,6 +212,9 @@
 			$this->template->set_var('lang_back', lang("back"));
 			$this->template->set_var('href_back',$GLOBALS['phpgw_info']['mobiletemplate']->get_back_link());
-			$this->template->set_var('lang_reading_message', lang("Reading Message"));
+			$this->template->set_var('lang_reading_message', lang("Reading Message"));		
+			$this->template->set_var('lang_confirm_delete_message', lang("Do you like to delete this message?"));
 			$this->template->set_var('theme', $GLOBALS['phpgw_info']['server']['template_set']);
+			$this->template->set_var('msg_folder', $msg_folder);
+			$this->template->set_var('msg_number', $msg_number);
 
 			// Define o cabeçalho do e-mail
@@ -235,18 +237,18 @@
 
 			if($msg["Draft"] === "X") {
-				$operations["edit_draft"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=use_draft";
+				$operations["edit_draft"]["link"] = "location.href='index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=use_draft'";
 				$operations["edit_draft"]["lang"] = lang("edit draft");
 			}	else {
-				$operations["mark_as_unread"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.mark_message_with_flag&flag=unseen&msgs_to_set=$msg_number&msg_folder=$msg_folder";
+				$operations["mark_as_unread"]["link"] = "location.href='index.php?menuaction=mobile.ui_mobilemail.mark_message_with_flag&flag=unseen&msgs_to_set=$msg_number&msg_folder=$msg_folder'";
 				$operations["mark_as_unread"]["lang"] = lang("mark as unread");
-				$operations["forward"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=forward";
+				$operations["forward"]["link"] = "location.href='index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=forward'";
 				$operations["forward"]["lang"] = lang("Forward");
-				$operations["reply"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply";
+				$operations["reply"]["link"] = "location.href='index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply'";
 				$operations["reply"]["lang"] = lang("Reply");
-				$operations["reply_all"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply_all";
+				$operations["reply_all"]["link"] = "location.href='index.php?menuaction=mobile.ui_mobilemail.new_msg&msg_number=$msg_number&msg_folder=$msg_folder&type=reply_all'";
 				$operations["reply_all"]["lang"] = lang("Reply to all");
 			}
 
-			$operations["delete"]["link"] = "index.php?menuaction=mobile.ui_mobilemail.confirm_delete_msg&msg_number=$msg_number&msg_folder=$msg_folder";
+			$operations["delete"]["link"] = "delete_msg()";
 			$operations["delete"]["lang"] = lang("Delete");
 
@@ -842,5 +844,5 @@
 			}else {
 				header('Location: index.php?menuaction=menuaction=mobile.ui_home.index&success_message='.lang("draft saved"));
-			}				
+			}
 		}
 		
@@ -957,19 +959,4 @@
 		}
 
-		function confirm_delete_msg()
-		{
-			//Cria um objeto template
-			//Define o template para mensagens de retorno da funcao
-			$this->template->set_file(array('delete_msg_t' => 'delete_msg.tpl'));
-			$this->template->set_block('delete_msg_t','retorno');			
-			$this->template->set_var('lang_delete_msg', lang("Do you like to delete this message?"));
-			$this->template->set_var('lang_yes', lang("Yes"));	
-			$this->template->set_var('lang_no', lang("No"));
-			$this->template->set_var('link_yes', 'index.php?menuaction=mobile.ui_mobilemail.delete_msg&msg_number='.$_GET['msg_number'].'&msg_folder='.$_GET['msg_folder']);
-			$this->template->set_var('link_no', 'index.php?menuaction=mobile.ui_mobilemail.show_msg&amp;msg_number='.$_GET['msg_number'].'&amp;msg_folder='.$_GET['msg_folder']);	
-			
-			$this->template->pfp('out','retorno');  
-		}
-
 		function delete_msg($params)
 		{
Index: /branches/2.2/mobile/templates/default/view_msg.tpl
===================================================================
--- /branches/2.2/mobile/templates/default/view_msg.tpl	(revision 3907)
+++ /branches/2.2/mobile/templates/default/view_msg.tpl	(revision 4040)
@@ -1,3 +1,13 @@
 <!-- BEGIN page -->
+
+<script type="text/javascript">
+
+function delete_msg() {
+			if ( confirm( '{lang_confirm_delete_message}' ) )
+				document.location.href = 'index.php?menuaction=mobile.ui_mobilemail.delete_msg&msg_number={msg_number}&msg_folder={msg_folder}';
+}
+
+</script>
+
 <div class="menu-contexto">
 	<span><a href="{href_back}">{lang_back}</a><span class="titulo-secao">{lang_reading_message}</span>
@@ -44,4 +54,4 @@
 
 <!-- BEGIN operation_block -->
-<button onclick="location.href='{operation_link}'" id="{operation_id}" class="btn-generico" style="margin-top: 1px">{lang_operation}</button>
+<button onclick="{operation_link}" id="{operation_id}" class="btn-generico" style="margin-top: 1px">{lang_operation}</button>
 <!-- END operation_block -->
