Index: trunk/phpgwapi/templates/default/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/default/head.inc.php	(revision 2)
+++ trunk/phpgwapi/templates/default/head.inc.php	(revision 882)
@@ -1,20 +1,67 @@
 <?php
-  /**************************************************************************\
-  * phpGroupWare                                                             *
-  * http://www.phpgroupware.org                                              *
-  * --------------------------------------------                             *
-  *  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.                                              *
-  \**************************************************************************/
+	/**************************************************************************\
+	* phpGroupWare                                                             *
+	* http://www.phpgroupware.org                                              *
+	* --------------------------------------------                             *
+	*  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.                                              *
+	\**************************************************************************/
 
 
-	$bodyheader = 'BGCOLOR="'.$GLOBALS['phpgw_info']['theme']['bg_color'].'"';
-	if($GLOBALS['phpgw_info']['server']['htmlcompliant'])
+	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
 	{
-		$bodyheader .= ' ALINK="'.$GLOBALS['phpgw_info']['theme']['alink'].'" LINK="'.$GLOBALS['phpgw_info']['theme']['link'].'" VLINK="'.$GLOBALS['phpgw_info']['theme']['vlink'].'"';
+		$mtime = microtime(); 
+		$mtime = explode(' ',$mtime); 
+		$mtime = $mtime[1] + $mtime[0]; 
+		$GLOBALS['page_start_time'] = $mtime; 
 	}
 
+	// get used language code
+	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
+
+	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
+		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
+		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
+
+	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
+	{
+		$bodyheader .= '';
+	}
+	$currentapp = $GLOBALS['phpgw_info']['flags']['currentapp'] ;
+
+	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
+	$theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	if(!file_exists($theme_css))
+	{
+		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
+	}
+
+	//pngfix defaults to yes
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
+	{
+		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/pngfix.js';
+		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
+		<!--[if lt IE 7]>
+		<script src="'.$pngfix_src.'" type="text/javascript">
+		</script>
+		<![endif]-->';
+	}
+
+	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
+	{
+		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/slidereffects.js';
+		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
+		</script>';
+	}
+	else
+	{
+		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/simple_show_hide.js';
+		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
+		</script>';
+	}
+
+	$cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/'.$GLOBALS['phpgw_info']['server']['template_set'].'/js/cookieManager.js" type="text/javascript"></script>';	
 	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
 	$tpl->set_unknowns('remove');
@@ -22,22 +69,22 @@
 	$tpl->set_block('_head','head');
 
-	if ($GLOBALS['phpgw_info']['flags']['app_header'])
-	{
-		$app = $GLOBALS['phpgw_info']['flags']['app_header'];
-	}
-	else
-	{
-		$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
-		$app = isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app);
-	}
-	$var = Array (
-		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
+	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
+	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
+
+	$var = Array(
+		'img_icon'      => '/'.$currentapp . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png',
+		'img_shortcut'  => '/'.$currentapp . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png',
+		'pngfix'        => $pngfix,
+		'slider_effects'=> $slider_effects,
+		'simple_show_hide'=> $simple_show_hide,
+		'lang_code'=> $lang_code,
 		'charset'       => $GLOBALS['phpgw']->translation->charset(),
 		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
-		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'] . ($app ? " [$app]" : ''),
+		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
 		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
+		'theme_css'     => $theme_css,
 		'css'           => $GLOBALS['phpgw']->common->get_css(),
 		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
+		'cookie_manager'=>	$cookie_manager
 	);
 	$tpl->set_var($var);
Index: trunk/phpgwapi/templates/canyon/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/canyon/head.inc.php	(revision 791)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?php
-	/**************************************************************************\
-	* phpGroupWare                                                             *
-	* http://www.phpgroupware.org                                              *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
-	{
-		$mtime = microtime(); 
-		$mtime = explode(' ',$mtime); 
-		$mtime = $mtime[1] + $mtime[0]; 
-		$GLOBALS['page_start_time'] = $mtime; 
-	}
-
-	// get used language code
-	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-
-	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
-		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
-		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
-
-	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
-	{
-		$bodyheader .= '';
-	}
-
-	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
-	$theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	if(!file_exists($theme_css))
-	{
-		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	}
-
-	//pngfix defaults to yes
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
-	{
-		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/js/pngfix.js';
-		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
-		<!--[if gte IE 5.5000]>
-		<script src="'.$pngfix_src.'" type="text/javascript">
-		</script>
-		<![endif]-->';
-	}
-
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
-	{
-		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/js/slidereffects.js';
-		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
-		</script>';
-	}
-	else
-	{
-		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/js/simple_show_hide.js';
-		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
-		</script>';
-	}
-
-	$cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/canyon/js/cookieManager.js" type="text/javascript"></script>';	
-	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
-	$tpl->set_unknowns('remove');
-	$tpl->set_file(array('_head' => 'head.tpl'));
-	$tpl->set_block('_head','head');
-
-	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
-	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
-
-	$var = Array(
-		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'pngfix'        => $pngfix,
-		'slider_effects'=> $slider_effects,
-		'simple_show_hide'=> $simple_show_hide,
-		'lang_code'=> $lang_code,
-		'charset'       => $GLOBALS['phpgw']->translation->charset(),
-		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
-		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
-		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
-		'theme_css'     => $theme_css,
-		'css'           => $GLOBALS['phpgw']->common->get_css(),
-		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
-		'cookie_manager'=>	$cookie_manager
-	);
-	$tpl->set_var($var);
-	$tpl->pfp('out','head');
-	unset($tpl);
-?>
Index: trunk/phpgwapi/templates/fozi/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/fozi/head.inc.php	(revision 791)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?php
-	/**************************************************************************\
-	* phpGroupWare                                                             *
-	* http://www.phpgroupware.org                                              *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
-	{
-		$mtime = microtime(); 
-		$mtime = explode(' ',$mtime); 
-		$mtime = $mtime[1] + $mtime[0]; 
-		$GLOBALS['page_start_time'] = $mtime; 
-	}
-
-	// get used language code
-	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-
-	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
-		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
-		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
-
-	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
-	{
-		$bodyheader .= '';
-	}
-
-	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
-	$theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	if(!file_exists($theme_css))
-	{
-		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	}
-
-	//pngfix defaults to yes
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
-	{
-		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/js/pngfix.js';
-		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
-		<!--[if gte IE 5.5000]>
-		<script src="'.$pngfix_src.'" type="text/javascript">
-		</script>
-		<![endif]-->';
-	}
-
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
-	{
-		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/js/slidereffects.js';
-		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
-		</script>';
-	}
-	else
-	{
-		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/js/simple_show_hide.js';
-		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
-		</script>';
-	}
-
-	$cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/fozi/js/cookieManager.js" type="text/javascript"></script>';	
-	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
-	$tpl->set_unknowns('remove');
-	$tpl->set_file(array('_head' => 'head.tpl'));
-	$tpl->set_block('_head','head');
-
-	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
-	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
-
-	$var = Array(
-		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'pngfix'        => $pngfix,
-		'slider_effects'=> $slider_effects,
-		'simple_show_hide'=> $simple_show_hide,
-		'lang_code'=> $lang_code,
-		'charset'       => $GLOBALS['phpgw']->translation->charset(),
-		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
-		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
-		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
-		'theme_css'     => $theme_css,
-		'css'           => $GLOBALS['phpgw']->common->get_css(),
-		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
-		'cookie_manager'=>	$cookie_manager
-	);
-	$tpl->set_var($var);
-	$tpl->pfp('out','head');
-	unset($tpl);
-?>
Index: trunk/phpgwapi/templates/azul/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/azul/head.inc.php	(revision 791)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?php
-	/**************************************************************************\
-	* phpGroupWare                                                             *
-	* http://www.phpgroupware.org                                              *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
-	{
-		$mtime = microtime(); 
-		$mtime = explode(' ',$mtime); 
-		$mtime = $mtime[1] + $mtime[0]; 
-		$GLOBALS['page_start_time'] = $mtime; 
-	}
-
-	// get used language code
-	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-
-	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
-		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
-		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
-
-	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
-	{
-		$bodyheader .= '';
-	}
-
-	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
-	$theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	if(!file_exists($theme_css))
-	{
-		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	}
-
-	//pngfix defaults to yes
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
-	{
-		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/js/pngfix.js';
-		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
-		<!--[if gte IE 5.5000]>
-		<script src="'.$pngfix_src.'" type="text/javascript">
-		</script>
-		<![endif]-->';
-	}
-
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
-	{
-		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/js/slidereffects.js';
-		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
-		</script>';
-	}
-	else
-	{
-		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/js/simple_show_hide.js';
-		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
-		</script>';
-	}
-
-	$cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/azul/js/cookieManager.js" type="text/javascript"></script>';	
-	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
-	$tpl->set_unknowns('remove');
-	$tpl->set_file(array('_head' => 'head.tpl'));
-	$tpl->set_block('_head','head');
-
-	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
-	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
-
-	$var = Array(
-		'img_icon'      => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'img_shortcut'  => PHPGW_IMAGES_DIR . '/favicon.ico',
-		'pngfix'        => $pngfix,
-		'slider_effects'=> $slider_effects,
-		'simple_show_hide'=> $simple_show_hide,
-		'lang_code'=> $lang_code,
-		'charset'       => $GLOBALS['phpgw']->translation->charset(),
-		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
-		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
-		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
-		'theme_css'     => $theme_css,
-		'css'           => $GLOBALS['phpgw']->common->get_css(),
-		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
-		'cookie_manager'=>	$cookie_manager
-	);
-	$tpl->set_var($var);
-	$tpl->pfp('out','head');
-	unset($tpl);
-?>
Index: trunk/phpgwapi/templates/celepar/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/celepar/head.inc.php	(revision 875)
+++ 	(revision )
@@ -1,92 +1,0 @@
-<?php
-	/**************************************************************************\
-	* phpGroupWare                                                             *
-	* http://www.phpgroupware.org                                              *
-	* --------------------------------------------                             *
-	*  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.                                              *
-	\**************************************************************************/
-
-
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['show_generation_time'])
-	{
-		$mtime = microtime(); 
-		$mtime = explode(' ',$mtime); 
-		$mtime = $mtime[1] + $mtime[0]; 
-		$GLOBALS['page_start_time'] = $mtime; 
-	}
-
-	// get used language code
-	$lang_code = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
-
-	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color'] . '" alink="'
-		. $GLOBALS['phpgw_info']['theme']['alink'] . '" link="' . $GLOBALS['phpgw_info']['theme']['link'] . '" vlink="'
-		. $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
-
-	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
-	{
-		$bodyheader .= '';
-	}
-
-	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
-	$theme_css = ".".$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	if(!file_exists($theme_css))
-	{
-		$theme_css = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/css/'.$GLOBALS['phpgw_info']['user']['preferences']['common']['theme'].'.css';
-	}
-
-	//pngfix defaults to yes
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_pngfix'])
-	{
-		$pngfix_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/pngfix.js';
-		$pngfix ='<!-- This solves the Internet Explorer PNG-transparency bug, but only for IE 5.5 and higher --> 
-		<!--[if lt IE 7]>
-		<script src="'.$pngfix_src.'" type="text/javascript">
-		</script>
-		<![endif]-->';
-	}
-
-	if(!$GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'])
-	{
-		$slider_effects_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/slidereffects.js';
-		$slider_effects = '<script src="'.$slider_effects_src.'" type="text/javascript">
-		</script>';
-	}
-	else
-	{
-		$simple_show_hide_src = $GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/simple_show_hide.js';
-		$simple_show_hide = '<script src="'.$simple_show_hide_src.'" type="text/javascript">
-		</script>';
-	}
-
-	$cookie_manager = '<script src="'.$GLOBALS['phpgw_info']['server']['webserver_url'] . '/phpgwapi/templates/celepar/js/cookieManager.js" type="text/javascript"></script>';	
-	$tpl = CreateObject('phpgwapi.Template',PHPGW_TEMPLATE_DIR);
-	$tpl->set_unknowns('remove');
-	$tpl->set_file(array('_head' => 'head.tpl'));
-	$tpl->set_block('_head','head');
-
-	$app = $GLOBALS['phpgw_info']['flags']['currentapp'];
-	$app = $app ? ' ['.(isset($GLOBALS['phpgw_info']['apps'][$app]) ? $GLOBALS['phpgw_info']['apps'][$app]['title'] : lang($app)).']':'';
-
-	$var = Array(
-		'img_icon'      => '/'.$GLOBALS['phpgw_info']['flags']['currentapp'] . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png',
-		'img_shortcut'  => '/'.$GLOBALS['phpgw_info']['flags']['currentapp'] . '/templates/'.$_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']['preferences']['common']['template_set'].'/images/navbar.png',
-		'pngfix'        => $pngfix,
-		'slider_effects'=> $slider_effects,
-		'simple_show_hide'=> $simple_show_hide,
-		'lang_code'=> $lang_code,
-		'charset'       => $GLOBALS['phpgw']->translation->charset(),
-		'font_family'   => $GLOBALS['phpgw_info']['theme']['font'],
-		'website_title' => $GLOBALS['phpgw_info']['server']['site_title'].$app,
-		'body_tags'     => $bodyheader .' '. $GLOBALS['phpgw']->common->get_body_attribs(),
-		'theme_css'     => $theme_css,
-		'css'           => $GLOBALS['phpgw']->common->get_css(),
-		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
-		'cookie_manager'=>	$cookie_manager
-	);
-	$tpl->set_var($var);
-	$tpl->pfp('out','head');
-	unset($tpl);
-?>
