Index: sandbox/2.4-expresso-api/home.php
===================================================================
--- sandbox/2.4-expresso-api/home.php	(revision 5042)
+++ sandbox/2.4-expresso-api/home.php	(revision 5888)
@@ -98,88 +98,38 @@
 		echo parse_navbar();
 	}
-	// Default Applications (Home Page) 
-	$default_apps = Array(			
-			'workflow',			
-			'expressoMail1_2',
-			'calendar',
-			'news_admin'
-		);
-	$sorted_apps = array();
-	$user_apps = $GLOBALS['phpgw_info']['user']['apps']; 
-	@reset($user_apps);	
-	for($i = 0; $i < count($default_apps);$i++) {
-		if(array_key_exists($default_apps[$i], $user_apps)){
-			$sorted_apps[] = $default_apps[$i];
-		}		
-	}
-	
-	foreach($GLOBALS['phpgw_info']['user']['apps'] as $i => $p) {
-		$sorted_apps[] = $p['name'];
-	}
-	
-	$portal_oldvarnames = array('mainscreen_showevents', 'homeShowEvents','homeShowLatest','mainscreen_showmail','mainscreen_showbirthdays','mainscreen_show_new_updated');
-	$done = array();
-	// Display elements, within appropriate table cells	
-	@reset($sorted_apps);
-	$idx = 1;
-	echo "<table width='100%' cellpadding=5>";
-	foreach($sorted_apps as $appname)
-	{
-		if((int)$done[$appname] == 1 || empty($appname)){
-			continue;
-		}		
-		$varnames = $portal_oldvarnames;
-		$varnames[] = 'homepage_display';
-		$thisd = 0;
-		$tmp = '';
-		
-		foreach($varnames as $varcheck)
-		{
-									
-			/*if($appname == 'expressoMail1_2') {
-				$tmp = $appname;
-				$appname = 'expressoMail';
-			}*/				
 
-			if(array_search($appname, $default_apps) !== False){
-				$thisd = 1;
-				break;
-			}
-			if($GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck]=='True') {
-				$thisd = 1;
-				break;
-			}
-			else  {
-				$_thisd = (int)$GLOBALS['phpgw_info']['user']['preferences'][$appname][$varcheck];
-				if($_thisd > 0) {
-					$thisd = $_thisd;
-					break;
-				}
-			}
-		}
+//Inicio	
+	echo '
+            <link rel="Stylesheet" type="text/css" href="prototype/plugins/jquery/jquery-ui.css" />					
+    
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery.min.js"></script>
+        
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.min.js"></script>
+            <script type="text/javascript" src="prototype/plugins/jquery/jquery-ui.custom.min.js"></script>
+            <script src="prototype/plugins/json2/json2.js" language="javascript"></script>
+            <script src="prototype/plugins/ejs/ejs.js" language="javascript"></script>
+            <script src="prototype/plugins/store/jquery.store.js" language="javascript"></script>
+            
+            <script src="prototype/api/datalayer.js" language="javascript"></script>	
+           
+            <script type="text/javascript" src="prototype/plugins/datejs/date-pt-BR.js"></script>
+            <script type="text/javascript" src="prototype/plugins/datejs/sugarpak.js"></script>
+            <script type="text/javascript" src="prototype/plugins/datejs/parser.js"></script>
 
-		if($thisd > 0)
-		{
-			if($tmp) {
-               	$appname = $tmp;
-				$tmp = '';
-			}
-			if($idx == 0) {				
-				print '<tr>';
-			}
-			print '<td style="vertical-align:top;" width="45%">';
-			$GLOBALS['phpgw']->hooks->single('home',$appname);			
-			print '</td>';
-			
-			if($idx == 2){
-				$idx = 0;
-				print '</tr>';
-			}			
-			$idx++;
-			$neworder[] = $appname;
-		}
-		$done[$appname] = 1;
-	}
-	print '</table>';
+	    <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown.min.js"></script>
+	    <script type="text/javascript" src="prototype/plugins/countdown/jquery.countdown-pt-BR.js"></script>
+	    
+	    <script type="text/javascript" src="prototype/modules/home/js/home.js"></script>
+	    <link rel="Stylesheet" type="text/css" href="prototype/modules/home/css/home.css" />	
+        ';
+
+	echo'
+	    <tr>
+		<td>
+		    <div class="portlets" style="width: 100%;"></div>
+		<td>
+	    </tr>';
+
+//Fim	
 	$GLOBALS['phpgw']->common->phpgw_footer();
 ?>
