Index: /trunk/phpgwapi/inc/class.phpgw.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.phpgw.inc.php	(revision 2)
+++ /trunk/phpgwapi/inc/class.phpgw.inc.php	(revision 2419)
@@ -147,4 +147,10 @@
 				$url = $_SERVER['PHP_SELF'];
 			}
+			if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) )
+			{
+				if ( strpos( $url, '?' ) === false )
+					$url .= '?';
+				$url .= 'BackgroundRequest=requested';
+			}
 			if($iis)
 			{
Index: /trunk/phpgwapi/inc/functions.inc.php
===================================================================
--- /trunk/phpgwapi/inc/functions.inc.php	(revision 2368)
+++ /trunk/phpgwapi/inc/functions.inc.php	(revision 2419)
@@ -180,23 +180,13 @@
 	/* Fill phpgw_info["server"] array */
 	// An Attempt to speed things up using cache premise
-	/* jakjr: ExpressoLivre does not use cache. */
+
 	/*
-	$GLOBALS['phpgw']->db->query("select config_value from phpgw_config WHERE config_app='phpgwapi' and config_name='cache_phpgw_info'",__LINE__,__FILE__);
-	if ($GLOBALS['phpgw']->db->num_rows())
-	{
-		$GLOBALS['phpgw']->db->next_record();
-		$GLOBALS['phpgw_info']['server']['cache_phpgw_info'] = stripslashes($GLOBALS['phpgw']->db->f('config_value'));
-	}*/
-
-	/* jakjr: ExpressoLivre does not use cache. */
-	/*	
-	$cache_query = "select content from phpgw_app_sessions where"
-		." sessionid = '0' and loginid = '0' and app = 'phpgwapi' and location = 'config'";
-
-	$GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__);
-	$server_info_cache = $GLOBALS['phpgw']->db->num_rows();
-	*/
-	/*
-	if(@$GLOBALS['phpgw_info']['server']['cache_phpgw_info'] && $server_info_cache)
+	$GLOBALS['phpgw']->db->query(
+		"select content from phpgw_app_sessions"
+			. " where sessionid = '0' and loginid = '0'"
+			. " and app = 'phpgwapi' and location = 'config'",
+		__LINE__, __FILE__ );
+
+	if ( $GLOBALS['phpgw']->db->num_rows( ) )
 	{
 		$GLOBALS['phpgw']->db->next_record();
@@ -212,18 +202,11 @@
 
 		/*
-		if(@isset($GLOBALS['phpgw_info']['server']['cache_phpgw_info']))
-		{
-			if($server_info_cache)
-			{
-				$cache_query = "DELETE FROM phpgw_app_sessions WHERE sessionid='0' and loginid='0' and app='phpgwapi' and location='config'";
-				$GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__);
-			}
-			$cache_query = 'INSERT INTO phpgw_app_sessions(sessionid,loginid,app,location,content) VALUES('
-				. "'0','0','phpgwapi','config','".addslashes(serialize($GLOBALS['phpgw_info']['server']))."')";
-			$GLOBALS['phpgw']->db->query($cache_query,__LINE__,__FILE__);
-		}*/
-	//}
-	unset($cache_query);
-	unset($server_info_cache);
+		$GLOBALS['phpgw']->db->query(
+			'INSERT INTO phpgw_app_sessions(sessionid,loginid,app,location,content)'
+				. " VALUES('0','0','phpgwapi','config','"
+				. addslashes( serialize( $GLOBALS['phpgw_info']['server'] ) ) . "')",
+			__LINE__, __FILE__ );
+	}*/
+
 	if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) && !$_SERVER['HTTPS'])
 	{
@@ -438,4 +421,11 @@
 		* Load the header unless the developer turns it off                       *
 		\*************************************************************************/
+		if ( array_key_exists( 'HTTP_BACKGROUNDREQUEST', $_SERVER ) || array_key_exists( 'BackgroundRequest', $_GET ) )
+		{
+			$GLOBALS['phpgw_info']['flags'] = array(
+				'noheader'   => true,
+				'nonavbar'   => true
+			);
+		}
 		if (!@$GLOBALS['phpgw_info']['flags']['noheader'])
 		{
Index: /trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- /trunk/phpgwapi/inc/class.common.inc.php	(revision 2367)
+++ /trunk/phpgwapi/inc/class.common.inc.php	(revision 2419)
@@ -1224,6 +1224,6 @@
 			}
 
-			//$GLOBALS['phpgw']->js->validate_file( 'tools','event_config' );
-			//$GLOBALS['phpgw']->js->validate_file( 'tools','xconnector' );
+			$GLOBALS['phpgw']->js->validate_file( 'tools','event_config' );
+			$GLOBALS['phpgw']->js->validate_file( 'tools','xconnector' );
 			//$GLOBALS['phpgw']->js->validate_file( 'tools','xlink' );
 
Index: /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 2352)
+++ /trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php	(revision 2419)
@@ -57,8 +57,8 @@
 			$context = $_GET["context"];
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '. lang('list inactives');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -137,8 +137,8 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('User accounts');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -250,8 +250,8 @@
 				
 			// Imprime nav_bar
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create User');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Seta template
@@ -470,9 +470,9 @@
 			
 			// Seta header.
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit User');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Seta templates.
@@ -822,9 +822,9 @@
 
 			// Seta header.
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Access Log');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Seta templates.
Index: /trunk/expressoAdmin1_2/inc/class.uicomputers.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uicomputers.inc.php	(revision 414)
+++ /trunk/expressoAdmin1_2/inc/class.uicomputers.inc.php	(revision 2419)
@@ -73,9 +73,9 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Computers');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -168,8 +168,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create Computers');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -300,8 +300,8 @@
 			
 			// Set o header
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Computer');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
@@ -488,8 +488,8 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Delete Computer');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
Index: /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 1684)
+++ /trunk/expressoAdmin1_2/inc/class.uimanagers.inc.php	(revision 2419)
@@ -60,5 +60,5 @@
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('List Managers');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Seta o template
@@ -120,7 +120,10 @@
 				}
 			}
+
+			ldap_close($ldap_conn);
+
 			$p->set_var($var);
+			echo $GLOBALS['phpgw']->js->get_script_links();
 			$p->pfp('out','body');
-			ldap_close($ldap_conn);
 		}
 
@@ -143,5 +146,5 @@
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Add Managers');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Seta variaveis javascript necessárias
@@ -284,5 +287,5 @@
 			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Managers');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Seta variaveis javas necessárias
Index: /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 493)
+++ /trunk/expressoAdmin1_2/inc/class.uimaillists.inc.php	(revision 2419)
@@ -67,9 +67,9 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Email Lists');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -178,8 +178,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create Email List');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -229,8 +229,8 @@
 			$maillist_info = $this->maillist->get_info($_GET['uidnumber']);
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Email Lists');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
@@ -329,8 +329,8 @@
 			$maillist_info = $this->maillist->get_scl_info($_GET['uidnumber']);
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Sending Control List');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
Index: /trunk/expressoAdmin1_2/inc/class.uilogs.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uilogs.inc.php	(revision 414)
+++ /trunk/expressoAdmin1_2/inc/class.uilogs.inc.php	(revision 2419)
@@ -39,8 +39,8 @@
 			}
 						
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Logs');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
Index: /trunk/expressoAdmin1_2/inc/class.uishared_accounts.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uishared_accounts.inc.php	(revision 1913)
+++ /trunk/expressoAdmin1_2/inc/class.uishared_accounts.inc.php	(revision 2419)
@@ -59,8 +59,8 @@
 			/* End: Check manager access */
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('shared accounts');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
Index: /trunk/expressoAdmin1_2/inc/class.institutional_accounts.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.institutional_accounts.inc.php	(revision 414)
+++ /trunk/expressoAdmin1_2/inc/class.institutional_accounts.inc.php	(revision 2419)
@@ -53,8 +53,8 @@
 			/* End: Check manager access */
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Institutional accounts');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
Index: /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 1847)
+++ /trunk/expressoAdmin1_2/inc/class.uigroups.inc.php	(revision 2419)
@@ -71,9 +71,9 @@
 			}
 						
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('User groups');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -180,8 +180,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create Group');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -260,8 +260,8 @@
 			$group_info = $this->group->get_info($_GET['gidnumber']);
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Group');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
Index: /trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uisectors.inc.php	(revision 1991)
+++ /trunk/expressoAdmin1_2/inc/class.uisectors.inc.php	(revision 2419)
@@ -52,9 +52,9 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Sectors');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -168,8 +168,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Create Sector');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -228,8 +228,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Sector');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -296,8 +296,8 @@
 
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Edit Sector');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
@@ -367,8 +367,8 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Delete Sectors');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			// Set o template
Index: /trunk/expressoAdmin1_2/inc/class.uidomains.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.uidomains.inc.php	(revision 414)
+++ /trunk/expressoAdmin1_2/inc/class.uidomains.inc.php	(revision 2419)
@@ -46,9 +46,9 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Samba Domains');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
@@ -116,8 +116,8 @@
 			$organizations = $this->functions->get_sectors($_POST['context'], false, false);
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['expressoAdmin1_2']['title'].' - '.lang('Add Samba Domain');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			
 			// Set o template
Index: /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php
===================================================================
--- /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php	(revision 414)
+++ /trunk/expressoAdmin1_2/inc/class.totalsessions.inc.php	(revision 2419)
@@ -37,6 +37,6 @@
 		{
 			$GLOBALS['phpgw_info']['flags']['app_header'] = 'ExpressoAdmin - '.lang('Total Sessions');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$this->template->set_file('template','totalsessions.tpl');
Index: /trunk/admin/inc/class.uiaccess_history.inc.php
===================================================================
--- /trunk/admin/inc/class.uiaccess_history.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uiaccess_history.inc.php	(revision 2419)
@@ -51,6 +51,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$total_records = $this->bo->total($account_id);
Index: /trunk/admin/inc/class.uicategories.inc.php
===================================================================
--- /trunk/admin/inc/class.uicategories.inc.php	(revision 662)
+++ /trunk/admin/inc/class.uicategories.inc.php	(revision 2419)
@@ -178,6 +178,6 @@
 
 			$GLOBALS['phpgw_info']['flags']['app_header'] .= ' - '.lang('Global categories');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 			$this->set_langs();
 
@@ -542,6 +542,6 @@
 			$this->template->set_var('hidden_vars',$hidden_vars);
 
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$this->template->pfp('out','form');
@@ -601,6 +601,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$hidden_vars = '<input type="hidden" name="cat_id" value="' . $this->cat_id . '">' . "\n";
Index: /trunk/admin/inc/class.uiapplications.inc.php
===================================================================
--- /trunk/admin/inc/class.uiapplications.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uiapplications.inc.php	(revision 2419)
@@ -46,6 +46,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$GLOBALS['phpgw']->template->set_file(array('applications' => 'applications.tpl'));
@@ -225,6 +225,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$GLOBALS['phpgw']->template->set_var('th_bg',$GLOBALS['phpgw_info']['theme']['th_bg']);
@@ -307,6 +307,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			if ($totalerrors)
@@ -369,6 +369,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$GLOBALS['phpgw']->template->set_var('messages',lang('Are you sure you want to delete the application %1 ?',$GLOBALS['phpgw_info']['apps'][$app_name]['title']));
Index: /trunk/admin/inc/class.uivoip.inc.php
===================================================================
--- /trunk/admin/inc/class.uivoip.inc.php	(revision 571)
+++ /trunk/admin/inc/class.uivoip.inc.php	(revision 2419)
@@ -57,7 +57,8 @@
 			$GLOBALS['phpgw']->js->validate_file('voip',$tmp,'admin');
 		
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		echo '<script type="text/javascript">var path_adm="'.$webserver_url .'"</script>';
+		echo $GLOBALS['phpgw']->js->get_script_links();
 
 		$ous = "<option value='-1'>-- ".lang('Select Organization')." --</option>";	
Index: /trunk/admin/inc/class.uilog.inc.php
===================================================================
--- /trunk/admin/inc/class.uilog.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uilog.inc.php	(revision 2419)
@@ -266,6 +266,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 			$this->t->pfp('out','log_list_t');
 //			$this->set_app_langs();
Index: /trunk/admin/inc/class.uimainscreen.inc.php
===================================================================
--- /trunk/admin/inc/class.uimainscreen.inc.php	(revision 1362)
+++ /trunk/admin/inc/class.uimainscreen.inc.php	(revision 2419)
@@ -93,6 +93,6 @@
 
 			   $GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			   $GLOBALS['phpgw']->common->phpgw_header();
-			   echo parse_navbar();
+			   //$GLOBALS['phpgw']->common->phpgw_header();
+			   //echo parse_navbar();
 				  
 			   
@@ -161,6 +161,6 @@
 
 				$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-				$GLOBALS['phpgw']->common->phpgw_header();
-				echo parse_navbar();
+				//$GLOBALS['phpgw']->common->phpgw_header();
+				//echo parse_navbar();
 				
 				$GLOBALS['phpgw']->template->set_var('form_action',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.index'));
Index: /trunk/admin/inc/class.uiasyncservice.inc.php
===================================================================
--- /trunk/admin/inc/class.uiasyncservice.inc.php	(revision 86)
+++ /trunk/admin/inc/class.uiasyncservice.inc.php	(revision 2419)
@@ -47,6 +47,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			$async = $GLOBALS['phpgw']->asyncservice;	// use an own instance, as we might set debug=True
Index: /trunk/admin/inc/class.uiconfig.inc.php
===================================================================
--- /trunk/admin/inc/class.uiconfig.inc.php	(revision 1325)
+++ /trunk/admin/inc/class.uiconfig.inc.php	(revision 2419)
@@ -149,6 +149,6 @@
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
 
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 
 			if($appname=="expressoAdmin1_2") {
@@ -189,5 +189,12 @@
 				include_once("news_admin/inc/fckeditor.php");
 				$oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]');
-				$oFCKeditor->BasePath = 'news_admin/templates/default/fckeditor/'; 
+
+				$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
+				$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
+
+				if(strrpos($webserver_url,'/') === false || strrpos($webserver_url,'/') != (strlen($webserver_url)-1))
+					$webserver_url .= '/';
+
+				$oFCKeditor->BasePath = $webserver_url . 'news_admin/templates/default/fckeditor/'; 
 				$oFCKeditor->ToolbarSet = 'Basic';
 				$oFCKeditor->Value = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : '';
Index: /trunk/admin/inc/class.uicurrentsessions.inc.php
===================================================================
--- /trunk/admin/inc/class.uicurrentsessions.inc.php	(revision 2)
+++ /trunk/admin/inc/class.uicurrentsessions.inc.php	(revision 2419)
@@ -39,6 +39,6 @@
 			}
 			$GLOBALS['phpgw']->js->validate_file('jscode','openwindow','admin');
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 		}
 
Index: /trunk/admin/phpinfo.php
===================================================================
--- /trunk/admin/phpinfo.php	(revision 2)
+++ /trunk/admin/phpinfo.php	(revision 2419)
@@ -23,5 +23,19 @@
 	}
 
-// Throw a little notice out if PHPaccelerator is enabled.
+	ob_start();
+
+	phpinfo();
+
+	$matches = array ();
+	preg_match( '%(<style type="text/css">.*?</style>).*?<body>(.*?)</body>%s', ob_get_clean( ), $matches );
+
+	$matches[ 1 ] = preg_replace( '%body.*?{[^}]*}\n%s', '', $matches[ 1 ] );
+	$matches[ 1 ] = preg_replace( '%(\n)%s', '$1.phpinfo ', $matches[ 1 ] );
+
+	phpcredits( CREDITS_ALL - CREDITS_FULLPAGE );
+
+	$matches[ 2 ] = preg_replace( '%<a[^>]*>PHP Credits</a>%s', ob_get_clean( ), $matches[ 2 ] );
+
+	// Throw a little notice out if PHPaccelerator is enabled.
 	if($GLOBALS['_PHPA']['ENABLED'])
 	{
@@ -30,5 +44,4 @@
 	}
 
-	phpinfo();
-//	$phpgw->common->phpgw_footer();
+	print $matches[ 1 ] . '<div class="phpinfo">' . $matches[ 2 ] . '</div>';
 ?>
Index: /trunk/admin/templates/default/listcats.tpl
===================================================================
--- /trunk/admin/templates/default/listcats.tpl	(revision 577)
+++ /trunk/admin/templates/default/listcats.tpl	(revision 2419)
@@ -56,11 +56,11 @@
 
 			<tr valign="bottom" height="50">
-			<form method="POST" action="{action_url}">
-<!-- BEGIN add -->
-				<td><input type="submit" name="add" value="{lang_add}"> &nbsp;
-<!-- END add -->
-				<input type="submit" name="done" value="{lang_cancel}"></td>
+				<td>
+					<form method="POST" action="{action_url}">
+						<input type="submit" name="add" value="{lang_add}"> &nbsp;
+						<input type="submit" name="done" value="{lang_cancel}">
+					</form>
+				</td>
 				<td colspan="5">&nbsp;</td>
-			</form>
 			</tr>
 		</table>
Index: /trunk/jabberit_messenger/inc/class.uigroupsldap.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uigroupsldap.inc.php	(revision 1839)
+++ /trunk/jabberit_messenger/inc/class.uigroupsldap.inc.php	(revision 2419)
@@ -36,6 +36,6 @@
 		}		
 		
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 
 		$ldapInternal = $this->bo->getServerLdapInternal();
@@ -82,6 +82,6 @@
 		}
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		
 		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
Index: /trunk/jabberit_messenger/inc/class.uimodule.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uimodule.inc.php	(revision 1780)
+++ /trunk/jabberit_messenger/inc/class.uimodule.inc.php	(revision 2419)
@@ -48,6 +48,6 @@
 			$GLOBALS['phpgw']->js->validate_file('',$tmp,'jabberit_messenger');
 		
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		
 		if( $apps_list = $this->bo->getApplicationsEnabled())
Index: /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php	(revision 1777)
+++ /trunk/jabberit_messenger/inc/class.uilogmessage.inc.php	(revision 2419)
@@ -55,6 +55,6 @@
 
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		
 		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger' => 'logMessagesJabber.tpl'));
@@ -91,6 +91,6 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Log de Mensagens Instântaneas - BanderSnatch';	
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		
 		$value_messages = "";
@@ -176,6 +176,6 @@
 
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 		
 		$user 			= $_REQUEST['user'];
@@ -273,6 +273,6 @@
 
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 
 		$user1	= $_REQUEST['user1'];
Index: /trunk/jabberit_messenger/inc/class.uienabledgroups.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uienabledgroups.inc.php	(revision 1845)
+++ /trunk/jabberit_messenger/inc/class.uienabledgroups.inc.php	(revision 2419)
@@ -38,6 +38,6 @@
 			$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Liberar Organizações para grupos restritos';
 	
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 	
 			$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
@@ -112,6 +112,6 @@
 		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Liberar Organizações para grupos restritos';
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 
 		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
Index: /trunk/jabberit_messenger/inc/class.uigroupslocked.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uigroupslocked.inc.php	(revision 1780)
+++ /trunk/jabberit_messenger/inc/class.uigroupslocked.inc.php	(revision 2419)
@@ -52,6 +52,6 @@
     	$_SESSION['phpgwinfo']['db_type'] = $GLOBALS['phpgw_info']['server']['db_type'];			
 
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 
 		$webserver_url = $GLOBALS['phpgw_info']['server']['webserver_url'];
Index: /trunk/jabberit_messenger/inc/class.uiconfig.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uiconfig.inc.php	(revision 1900)
+++ /trunk/jabberit_messenger/inc/class.uiconfig.inc.php	(revision 2419)
@@ -24,5 +24,5 @@
 	function __construct()
 	{
-		$GLOBALS['phpgw']->common->phpgw_header();
+		//$GLOBALS['phpgw']->common->phpgw_header();
 	}	
 
@@ -35,5 +35,5 @@
 
 		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Permissões de Acesso';
-		echo parse_navbar();
+		//echo parse_navbar();
 
 		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'configItens.tpl'));
@@ -67,5 +67,5 @@
 
 		$GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Configurações do Servidor';
-		echo parse_navbar();
+		//echo parse_navbar();
 		
 		$GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'configItens.tpl'));
Index: /trunk/jabberit_messenger/inc/class.uihostsjabber.inc.php
===================================================================
--- /trunk/jabberit_messenger/inc/class.uihostsjabber.inc.php	(revision 1780)
+++ /trunk/jabberit_messenger/inc/class.uihostsjabber.inc.php	(revision 2419)
@@ -47,6 +47,6 @@
 		$webserver_url = ( !empty($webserver_url) ) ? $webserver_url : '/';
 		
-		$GLOBALS['phpgw']->common->phpgw_header();
-		echo parse_navbar();
+		//$GLOBALS['phpgw']->common->phpgw_header();
+		//echo parse_navbar();
 
 		// Load Language;
Index: /trunk/index.php
===================================================================
--- /trunk/index.php	(revision 237)
+++ /trunk/index.php	(revision 2419)
@@ -54,6 +54,6 @@
 
 	$GLOBALS['phpgw_info']['flags'] = array(
-		'noheader'   => True,
-		'nonavbar'   => True,
+		//'noheader'   => True,
+		//'nonavbar'   => True,
 		'currentapp' => $app
 	);
Index: /trunk/emailadmin/inc/class.ui.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.ui.inc.php	(revision 2169)
+++ /trunk/emailadmin/inc/class.ui.inc.php	(revision 2419)
@@ -137,6 +137,6 @@
 					break;
 			}
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 		}
 
Index: /trunk/emailadmin/inc/class.uiuserdata.inc.php
===================================================================
--- /trunk/emailadmin/inc/class.uiuserdata.inc.php	(revision 2)
+++ /trunk/emailadmin/inc/class.uiuserdata.inc.php	(revision 2419)
@@ -29,6 +29,6 @@
 		function display_app_header()
 		{
-			$GLOBALS['phpgw']->common->phpgw_header();
-			echo parse_navbar();
+			//$GLOBALS['phpgw']->common->phpgw_header();
+			//echo parse_navbar();
 			
 		}
Index: /trunk/calendar/inc/class.uiholiday.inc.php
===================================================================
--- /trunk/calendar/inc/class.uiholiday.inc.php	(revision 1684)
+++ /trunk/calendar/inc/class.uiholiday.inc.php	(revision 2419)
@@ -52,8 +52,8 @@
 			      $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php'));
 			}
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = &$GLOBALS['phpgw']->template;
@@ -138,8 +138,8 @@
 				$GLOBALS['phpgw']->redirect_link($this->base_url,$link_params);
 			}
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 			$p = CreateObject('phpgwapi.Template',$this->template_dir);
 			$p->set_file(Array('locale'=>'locales.tpl'));
@@ -247,9 +247,9 @@
 				$holiday['locale'] = $this->locale;
 			}
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.($this->bo->id ? lang('Edit') : lang('Add')).' '.lang('Holiday');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$t = &$GLOBALS['phpgw']->template;
@@ -380,8 +380,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',$this->template_dir);
@@ -420,8 +420,8 @@
 			}
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = CreateObject('phpgwapi.Template',$this->template_dir);
@@ -484,5 +484,5 @@
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['nofooter'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			echo '<body onLoad="document.submitform.submit()">'."\n";
Index: /trunk/calendar/inc/class.uicustom_fields.inc.php
===================================================================
--- /trunk/calendar/inc/class.uicustom_fields.inc.php	(revision 1684)
+++ /trunk/calendar/inc/class.uicustom_fields.inc.php	(revision 2419)
@@ -44,8 +44,8 @@
 			      $GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/admin/index.php'));
 			}
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Custom fields and sorting');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$this->tpl = $GLOBALS['phpgw']->template;
Index: /trunk/calendar/inc/class.uigroup_access.inc.php
===================================================================
--- /trunk/calendar/inc/class.uigroup_access.inc.php	(revision 1684)
+++ /trunk/calendar/inc/class.uigroup_access.inc.php	(revision 2419)
@@ -45,5 +45,5 @@
 					);
 		
-		$GLOBALS['phpgw']->common->phpgw_header();
+		//$GLOBALS['phpgw']->common->phpgw_header();
 		$this->template_dir = 'calendar/templates/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['template_set'];
 		$this->template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);		
Index: /trunk/calendar/inc/class.uicalendar.inc.php
===================================================================
--- /trunk/calendar/inc/class.uicalendar.inc.php	(revision 2230)
+++ /trunk/calendar/inc/class.uicalendar.inc.php	(revision 2419)
@@ -170,10 +170,10 @@
 			$sb = CreateObject('phpgwapi.sbox2');
 			$jscal = CreateObject('phpgwapi.jscalendar');	// before phpgw_header() !!!
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $event['id'] ? lang('Calendar - Edit') : lang('Calendar - Add');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
@@ -477,6 +477,6 @@
 			else
 			{
-				unset($GLOBALS['phpgw_info']['flags']['noheader']);
-				unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+				//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+				//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 				unset($GLOBALS['phpgw_info']['flags']['noappheader']);
 				unset($GLOBALS['phpgw_info']['flags']['noappfooter']);
@@ -486,5 +486,6 @@
 				}
 				
-				$GLOBALS['phpgw']->common->phpgw_header();
+				$this -> header( );
+				//$GLOBALS['phpgw']->common->phpgw_header();
 				$new_body = $this->bo->debug_string.$body;				
 				
@@ -833,9 +834,9 @@
 		function view($vcal_id=0,$cal_date=0)
 		{
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('View');
 			$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$cal_id = get_var('cal_id',array('GET','POST'),$vcal_id);
@@ -1180,8 +1181,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Reinstate');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$cal_id = get_var('cal_id',array('GET'),$params['cal_id']);
@@ -1862,10 +1863,10 @@
 		function edit_status()
 		{
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Change Status');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$event = $this->bo->read_entry($_GET['cal_id']);
@@ -1979,10 +1980,10 @@
 				}
 	
-				unset($GLOBALS['phpgw_info']['flags']['noheader']);
-				unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+				//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+				//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 				$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 				$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 				$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Scheduling Conflict');
-				$GLOBALS['phpgw']->common->phpgw_header();
+				//$GLOBALS['phpgw']->common->phpgw_header();
 	
 				$p = $GLOBALS['phpgw']->template;
@@ -2152,8 +2153,8 @@
 			if (!$no_header)
 			{
-				unset($GLOBALS['phpgw_info']['flags']['noheader']);
-				unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+				//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+				//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 				if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Group Planner');
-				$GLOBALS['phpgw']->common->phpgw_header();
+				//$GLOBALS['phpgw']->common->phpgw_header();
 			}
 
@@ -2697,8 +2698,8 @@
 			$sb = CreateObject('phpgwapi.sbox');
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Matrixview');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = &$GLOBALS['phpgw']->template;
@@ -2853,8 +2854,8 @@
 			$GLOBALS['phpgw']->session->appsession("participants", NULL, implode(";", $participants));
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			if ($this->always_app_header) $GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Matrixview');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			switch($_POST['matrixtype'])
@@ -2919,8 +2920,8 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Search Results');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$error = '';
@@ -3360,10 +3361,10 @@
 			if(!isset($GLOBALS['phpgw_info']['flags']['noheader']))
 			{
-				unset($GLOBALS['phpgw_info']['flags']['noheader']);
-				unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+				//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+				//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 				$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 				$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 				$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Permission denied');
-				$GLOBALS['phpgw']->common->phpgw_header();
+				//$GLOBALS['phpgw']->common->phpgw_header();
 			}
 			echo '<center>You do not have permission to edit this appointment!</center>';
@@ -3814,10 +3815,10 @@
 			}
 
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $GLOBALS['phpgw_info']['apps']['calendar']['title'].' - '.lang('Scheduling Conflict');
-			$GLOBALS['phpgw']->common->phpgw_header();
+			//$GLOBALS['phpgw']->common->phpgw_header();
 
 			$p = $GLOBALS['phpgw']->template;
@@ -4908,11 +4909,11 @@
 			$jscal = CreateObject('phpgwapi.jscalendar');	// before phpgw_header() !!!
 			
-			unset($GLOBALS['phpgw_info']['flags']['noheader']);
-			unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
+			//unset($GLOBALS['phpgw_info']['flags']['noheader']);
+			//unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
 			$GLOBALS['phpgw_info']['flags']['noappheader'] = True;
 			$GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
 			$GLOBALS['phpgw_info']['flags']['app_header'] = $event['id'] ? lang('Editing event') : lang('Adding event');
 			if ($param['plain'] != "True"){
-				$GLOBALS['phpgw']->common->phpgw_header();
+			//	$GLOBALS['phpgw']->common->phpgw_header();
 			}
 			else{
