Index: trunk/phpgwapi/inc/class.javascript.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.javascript.inc.php	(revision 2608)
+++ trunk/phpgwapi/inc/class.javascript.inc.php	(revision 2623)
@@ -121,5 +121,5 @@
 			if(!empty($this->files) && is_array($this->files))
 			{
-				$links = "<!--JS Imports from phpGW javascript class -->\n";
+				$links = "\n\t\t<!--JS Imports from phpGW javascript class -->";
 				foreach($this->files as $app => $packages)
 				{
@@ -145,8 +145,6 @@
 									else
 									{
-										$links .= '<script type="text/javascript" src="'
-											. $GLOBALS['phpgw_info']['server']['webserver_url']
-											. "/$app/js/$pkg/$file" . '.js?' . filemtime( $jsFilePath ) . '">'
-											. "</script>\n";
+										$_script = '<script type="text/javascript" src="%s/%s/js/%s/%s.js?%d"></script>';
+										$links .= "\n\t\t" . sprintf( $_script, $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ], $app, $pkg, $file, filemtime( $jsFilePath ) );
 									}
 
@@ -264,4 +262,5 @@
 				return true;
 			}
+			error_log( $_file . "\n\n", 3, '/tmp/log' );
 			return false;
 		}
Index: trunk/phpgwapi/inc/class.common.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.common.inc.php	(revision 2616)
+++ trunk/phpgwapi/inc/class.common.inc.php	(revision 2623)
@@ -399,10 +399,11 @@
 					$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode', 'cookieManager', 'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'] );
 
-					$this -> phpgw_header( );
+					$this -> phpgw_header( $module_content );
 				}
 				else
+				{
 					echo $this -> get_java_script( );
-
-				echo $module_content;
+					echo $module_content;
+				}
 
 				/*if (is_object($GLOBALS['phpgw']->accounts))
@@ -1207,5 +1208,5 @@
 			if ($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'preferences' || $GLOBALS['phpgw_info']['flags']['currentapp'] == 'about')
 			{
-				$app = $app_title = 'eGroupWare';
+				$app = $app_title = ':: ExpressoLivre ::';
 			}
 			else
@@ -1250,30 +1251,36 @@
 		@abstract load the phpgw header
 		*/
-		function phpgw_header()
+		function phpgw_header( $content )
 		{
 			// add a content-type header to overwrite an existing default charset in apache (AddDefaultCharset directiv)
-			header('Content-type: text/html; charset='.$GLOBALS['phpgw']->translation->charset());
+			header( "Content-type: text/html; charset={$GLOBALS[ 'phpgw' ] -> translation -> charset( )}" );
 
 			$path = PHPGW_INCLUDE_ROOT . '/phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'];
 
-			include_once( "{$path}/head.inc.php" );
-
 			$this -> navbar( false );
 
 			include_once( "{$path}/navbar.inc.php" );
 
-			if (!@$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target'])
-				echo parse_navbar();
+			if ( ! @$GLOBALS['phpgw_info']['flags']['nonavbar'] && !@$GLOBALS['phpgw_info']['flags']['navbar_target'])
+			{
+				parse_navbar( );
+				$content = ob_get_contents( ) . $content;
+				ob_clean( );
+
+				parse_navbar_end( );
+				$content .= ob_get_contents( ) . "\t";
+				ob_clean( );
+			}
+
+			require_once "{$path}/head.inc.php";
 		}
 
 		function phpgw_footer()
 		{
-			if (!defined('PHPGW_FOOTER'))
-			{
-				define('PHPGW_FOOTER',True);
-				if (!isset($GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter'])
-				{
-					include(PHPGW_API_INC . '/footer.inc.php');
-				}
+			if ( ! defined( 'PHPGW_FOOTER' ) )
+			{
+				define( 'PHPGW_FOOTER', true );
+				if ( ! isset( $GLOBALS['phpgw_info']['flags']['nofooter']) || !$GLOBALS['phpgw_info']['flags']['nofooter'] )
+					include_once PHPGW_API_INC . '/footer.inc.php';
 			}
 		}
@@ -1294,4 +1301,5 @@
 			$tpl->set_var($GLOBALS['phpgw_info']['theme']);
 			$app_css = '';
+
 			if(@isset($_GET['menuaction']))
 			{
@@ -1303,9 +1311,9 @@
 				}
 			}
-			if (isset($GLOBALS['phpgw_info']['flags']['css']))
-			{
+
+			if ( isset( $GLOBALS['phpgw_info']['flags']['css'] ) )
 				$app_css .= $GLOBALS['phpgw_info']['flags']['css'];
-			}
-			$tpl->set_var('app_css', $app_css);
+
+			$tpl->set_var( 'app_css', $app_css );
 
 			// search for app specific css file
@@ -1318,6 +1326,6 @@
 				$path = PHPGW_SERVER_ROOT . str_replace( '/', SEP, $css );
 
-				$link = '<LINK href="%s" type="text/css" rel="StyleSheet">';
-				$link = sprintf( $link,
+				$link = '<link href="%s" type="text/css" rel="StyleSheet" />';
+				$link = "\n\t\t" . sprintf( $link,
 					"{$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ]}{$css}"
 				);
@@ -1347,5 +1355,5 @@
 			}
 
-			return $tpl -> subst('css');
+			return $tpl -> subst( 'css' );
 		}
 
@@ -1362,5 +1370,5 @@
 		function get_java_script( )
 		{
-			$java_script = '';
+			$java_script = "\t\t";
 
 			/* this flag is for all javascript code that has to be put before other jscode. 
Index: trunk/phpgwapi/js/tools/xobject.js
===================================================================
--- trunk/phpgwapi/js/tools/xobject.js	(revision 2561)
+++ trunk/phpgwapi/js/tools/xobject.js	(revision 2623)
@@ -18,4 +18,9 @@
 		}
 	};
+
+	String.prototype.trim = function( )
+	{
+		return this.replace( /^ +| +$/g, '' );
+	}
 
 	function f( n )
@@ -61,12 +66,11 @@
 	{
 		escapable.lastIndex = 0;
-		return escapable.test(string) ?
+		return escapable.test( string ) ?
 			'"' + string.replace(escapable, function (a)
-					{
-					var c = meta[a];
-					return typeof c === 'string' ? c :
+			{
+				var c = meta[ a ];
+				return typeof c === 'string' ? c :
 					'\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
-					}) + '"' :
-		'"' + string + '"';
+			} ) + '"' : '"' + string + '"';
 	}
 
Index: trunk/phpgwapi/js/expressoAjax/dom.js
===================================================================
--- trunk/phpgwapi/js/expressoAjax/dom.js	(revision 2618)
+++ trunk/phpgwapi/js/expressoAjax/dom.js	(revision 2623)
@@ -1,2 +1,53 @@
+XEvents.add( window, "onload", function( )
+{
+	if ( template == 'classic' )
+		return false;
+
+	var icons = document.getElementById( "app_icons" ).getElementsByTagName( "td" );
+	for ( var i = 0; i < icons.length; i++ )
+	{
+		XEvents.add( icons.item( i ), "onmouseover", function( )
+		{
+			if ( this.className != "navbar_butOut" )
+			{
+				this.className = "navbar_butOver";
+				/*zoom_in( this.firstChild.firstChild.id );*/
+			}
+		} );
+		XEvents.add( icons.item( i ), "onmouseout", function( )
+		{
+			if ( this.className != "navbar_butOut" )
+			{
+				this.className = "navbar_but";
+				/*zoom_out( this.firstChild.firstChild.id );*/
+			}
+		} );
+		XEvents.add( icons.item( i ), "onclick", function( )
+		{
+			if ( this.className != "navbar_butOut" )
+			{
+				this.className = "navbar_butOut";
+				/*zoom_out( this.firstChild.firstChild.id );*/
+				var app = document.getElementById( curr_app );
+				if ( app )
+					app.parentNode.parentNode.className= "navbar_but";
+				//curr_app = "' . str_replace( '_', '', $app ) . 'id"
+			}
+		} );
+	}
+} );
+
+function openWindow( newWidth, newHeight, link )
+{
+	newScreenX  = screen.width - newWidth;
+	newScreenY  = 0;
+	Window1 = window.open( link, "",
+		"width=" + newWidth + ", height=" + newHeight
+		+ ", screenX=" + newScreenX + ", screenY=" + newScreenY
+		+ ", top=" + newScreenY + ", left=" + newScreenX
+		+ ", toolbar=no, scrollbars=yes, resizable=no"
+	);
+}
+
 function borkb(size){
         kbyte = 1024;
@@ -193,5 +244,5 @@
 	extra = document.getElementById("extraButton");
 	extra.style.visibility = "hidden";
-	but.innerHTML="<a title='"+title+"' onClick='javascript:changeBar()'><img src="+URL_SERVER+"'/phpgwapi/templates/default/images/up.button.png'></a>";
+	but.innerHTML='<a title="' +title + '" onClick="javascript:changeBar()"><img src="' + URL_SERVER + '/phpgwapi/templates/default/images/up.button.png"></a>';
 	var neverExpires = new Date("January 01, 2100 00:00:00");
 	document.cookie = "showHeader=true"+
Index: trunk/phpgwapi/templates/classic/head.tpl
===================================================================
--- trunk/phpgwapi/templates/classic/head.tpl	(revision 2561)
+++ trunk/phpgwapi/templates/classic/head.tpl	(revision 2623)
@@ -4,21 +4,17 @@
 		<title>{website_title}</title>
 		<meta http-equiv="content-type" content="text/html; charset={charset}" />
-		<meta name="keywords" content="eGroupWare" />
-		<meta name="description" content="eGroupware" />
-		<meta name="keywords" content="eGroupWare" />
-		<meta name="copyright" content="eGroupWare http://www.egroupware.org (c) 2003" />
+		<meta name="keywords" content="ExpressoLivre" />
+		<meta name="description" content="ExpressoLivre" />
+		<meta name="copyright" content="ExpressoLivre http://www.expressolivre.org (l) 2003" />
 		<meta name="language" content="{lang_code}" />
-		<meta name="author" content="eGroupWare http://www.egroupware.org" />
+		<meta name="author" content="ExpressoLivre http://www.expressolivre.org" />
 		<meta name="robots" content="none" />
+		<meta http-equiv="Default-Style" content="eGroupWareStyle">
 		<link rel="icon" href="{img_icon}" type="image/x-ico" />
 		<link rel="shortcut icon" href="{img_shortcut}" />
-		<META http-equiv="Default-Style" content="eGroupWareStyle">
-		{slider_effects}
-		{simple_show_hide}
-		{pngfix}
-		{css}
-		{java_script}
+{css}{pngfix}{java_script}
 	</head>
 	<!-- we don't need body tags anymore, do we?) we do!!! onload!! LK -->
-	<body {body_tags}>
+	<body {body_tags}>{content}</body>
+</html>
 <!-- END head -->
Index: trunk/phpgwapi/templates/default/css.tpl
===================================================================
--- trunk/phpgwapi/templates/default/css.tpl	(revision 1247)
+++ trunk/phpgwapi/templates/default/css.tpl	(revision 2623)
@@ -1,9 +1,8 @@
-<style type="text/css">
-<!--
-	.row_on { color: {row_text}; background-color: {row_on}; }
-	.row_off { color: {row_text}; background-color: {row_off}; }
-	.th { color: {th_text}; background-color: {th_bg}; }
-	{app_css}
--->
-</style>
-{css_file}
+		<style type="text/css">
+		<!--
+			.row_on { color: {row_text}; background-color: {row_on}; }
+			.row_off { color: {row_text}; background-color: {row_off}; }
+			.th { color: {th_text}; background-color: {th_bg}; }
+			{app_css}
+		-->
+		</style>{css_file}
Index: trunk/phpgwapi/templates/default/footer.tpl
===================================================================
--- trunk/phpgwapi/templates/default/footer.tpl	(revision 1247)
+++ trunk/phpgwapi/templates/default/footer.tpl	(revision 2623)
@@ -1,8 +1,11 @@
-		 							</td></tr></table>
-									</div>
-		  <!-- Applicationbox Column -->
-		  </td>
-		  </tr>
-  </table>
-</div>
-<!-- END footer.tpl -->
+		<!-- BEGIN footer.tpl -->
+									</td>
+								</tr>
+							</table>
+						</div>
+					</td>
+					<!-- Applicationbox Column -->
+				</tr>
+			</table>
+		</div>
+		<!-- END footer.tpl -->
Index: trunk/phpgwapi/templates/default/head.inc.php
===================================================================
--- trunk/phpgwapi/templates/default/head.inc.php	(revision 2561)
+++ trunk/phpgwapi/templates/default/head.inc.php	(revision 2623)
@@ -13,54 +13,37 @@
 	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; 
+		$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'];
+	$pngfix = '';
+	if ( ! $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'disable_pngfix' ] )
+		$pngfix = "\t\t" . '<!--[if lt IE 7]>' . "\n\t\t\t"
+			. '<script src="'
+			. $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] . '/phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ] . '/js/pngfix.js'
+			. '" type="text/javascript">'
+			. "</script>\n\t\t"
+			. "<![endif]-->\n";
 
-	$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'] . '"';
+	error_log( var_export( $GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode',
+		( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ),
+		'phpgwapi/templates/' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'template_set' ], true ), true ) . "\n\n" , 3, '/tmp/log' );
 
-	if(!$GLOBALS['phpgw_info']['server']['htmlcompliant'])
-	{
-		$bodyheader .= '';
-	}
-	$currentapp = $GLOBALS['phpgw_info']['flags']['currentapp'] ;
+	$bodyheader = ' bgcolor="' . $GLOBALS['phpgw_info']['theme']['bg_color']
+		. '" link="' . $GLOBALS['phpgw_info']['theme']['link']
+		. '" alink="' . $GLOBALS['phpgw_info']['theme']['alink']
+		. '" vlink="' . $GLOBALS['phpgw_info']['theme']['vlink'] . '"';
 
-	#_debug_array($GLOBALS['phpgw_info']['user']['preferences']['common']);
+	$app = $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ];
+	$app = ( $app ) ? ' [' . ( isset( $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ] ) ? $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ] : lang( $app ) ) . ']' : '';
 
-	//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]-->';
-	}
+	$webserver_url = ( ! empty( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] ) ) ?
+		$GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] : '/';
 
-	$GLOBALS[ 'phpgw' ] -> js -> validate_file( 'jscode',
-		( ( ! $GLOBALS['phpgw_info']['user']['preferences']['common']['disable_slider_effects'] ) ? 'slidereffects' : 'simple_show_hide' ),
-		'phpgwapi/templates/' . $GLOBALS['phpgw_info']['server']['template_set'], true );
+	if ( strpos( $webserver_url, '/' ) != ( strlen( $webserver_url ) - 1 ) )
+		$webserver_url .= '/';
 
-	$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)).']':'';
-
-	$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 .= '/';
-	
 	if( is_null($_SESSION['phpgw_info'][$GLOBALS['phpgw_info']['flags']['currentapp']]['user']))
 		$tmpDefault = "default";
@@ -69,20 +52,23 @@
 
 	$var = Array(
-		'img_icon'      => $webserver_url . $currentapp . '/templates/'.$tmpDefault.'/images/navbar.png',
-		'img_shortcut'  => $webserver_url . $currentapp . '/templates/'.$tmpDefault.'/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(),
-		'css'           => $GLOBALS['phpgw']->common->get_css(),
-		'java_script'   => $GLOBALS['phpgw']->common->get_java_script(),
-		'cookie_manager'=> ''
+		'img_icon'       => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png",
+		'img_shortcut'   => "{$webserver_url}{$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ]}/templates/{$tmpDefault}/images/navbar.png",
+		'pngfix'         => $pngfix,
+		'lang_code'      => $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'lang' ],
+		'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()}",
+		'css'            => $GLOBALS[ 'phpgw' ] -> common -> get_css( ),
+		'java_script'    => $GLOBALS[ 'phpgw' ] -> common -> get_java_script( ),
+		'content'        => $content
 	);
-	$tpl->set_var($var);
-	$tpl->pfp('out','head');
-	unset($tpl);
+
+	$tpl = CreateObject( 'phpgwapi.Template', PHPGW_TEMPLATE_DIR );
+	$tpl -> set_unknowns( 'remove' );
+	$tpl -> set_file( array( '_head' => 'head.tpl' ) );
+	$tpl -> set_block( '_head', 'head' );
+	$tpl -> set_var( $var );
+	$tpl -> pfp( 'out', 'head' );
+	unset( $tpl );
 ?>
Index: trunk/phpgwapi/templates/default/head.tpl
===================================================================
--- trunk/phpgwapi/templates/default/head.tpl	(revision 2561)
+++ trunk/phpgwapi/templates/default/head.tpl	(revision 2623)
@@ -4,21 +4,17 @@
 		<title>{website_title}</title>
 		<meta http-equiv="content-type" content="text/html; charset={charset}" />
-		<meta name="keywords" content="eGroupWare" />
-		<meta name="description" content="eGroupware" />
-		<meta name="keywords" content="eGroupWare" />
-		<meta name="copyright" content="eGroupWare http://www.egroupware.org (c) 2003" />
+		<meta name="keywords" content="ExpressoLivre" />
+		<meta name="description" content="ExpressoLivre" />
+		<meta name="copyright" content="ExpressoLivre - http://www.expressolivre.org (c) 2005 - GPL" />
 		<meta name="language" content="{lang_code}" />
-		<meta name="author" content="eGroupWare http://www.egroupware.org" />
+		<meta name="author" content="ExpressoLivre http://www.expressolivre.org" />
 		<meta name="robots" content="none" />
+		<meta http-equiv="Default-Style" content="eGroupWareStyle">
 		<link rel="icon" href="{img_icon}" type="image/x-ico" />
 		<link rel="shortcut icon" href="{img_shortcut}" />
-		<META http-equiv="Default-Style" content="eGroupWareStyle">
-		{slider_effects}
-		{simple_show_hide}
-		{pngfix}
-		{css}
-		{java_script}
+{css}{pngfix}{java_script}
 	</head>
 	<!-- we don't need body tags anymore, do we?) we do!!! onload!! LK -->
-	<body {body_tags}>
+	<body {body_tags}>{content}</body>
+</html>
 <!-- END head -->
Index: trunk/phpgwapi/templates/default/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/default/navbar.inc.php	(revision 2578)
+++ trunk/phpgwapi/templates/default/navbar.inc.php	(revision 2623)
@@ -43,13 +43,8 @@
 	$var['table_bg_color'] = $GLOBALS['phpgw_info']['theme']['navbar_bg'];
 
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['click_or_onmouseover']=='onmouseover')
-	{
+	if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'click_or_onmouseover' ] == 'onmouseover' )
 		$show_menu_event = 'onMouseOver';
-	}
 	else
-	{
 		$show_menu_event = 'onClick';
-	}
-
 
 	$applications = '';
@@ -57,177 +52,169 @@
 	//	== 'icons_and_text')
 
-	$max_icons=$GLOBALS['phpgw_info']['user']['preferences']['common']['max_icons'];
-
-	if(!$max_icons)
-	{
-		$max_icons=200;
-	}
-
+	$max_icons = $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'max_icons' ];
+
+	if ( ! $max_icons )
+		$max_icons = 200;
+
+	$indent = "\n\t\t\t\t\t\t";
 	$curr_app = NULL;
 	$i = 0;
-	foreach($GLOBALS['phpgw_info']['navbar'] as $app => $app_data)
-	{
-		$current_app = False;
-		if($app != 'preferences' && $app != 'about' && $app != 'logout')
+	$cacheit = array( 'admin', 'expressoAdmin1_2', 'expressoMail1_2', 'contactcenter', 'jabberit_messenger', 'filemanager' );
+	foreach ( $GLOBALS[ 'phpgw_info' ][ 'navbar' ] as $app => $app_data )
+	{
+		$current_app = false;
+		if ( $app != 'preferences' && $app != 'about' && $app != 'logout' )
 		{
-			$icon = '<a href="'.$app_data['url'].'" cacheit="'
-				. ( ( $app == 'admin' || $app == 'expressoAdmin1_2' || $app == 'expressoMail1_2' || $app == 'contactcenter' || $app == 'jabberit_messenger' || $app == 'filemanager'  ) ? 'true' : 'false')
+			$icon = "{$indent}\t\t\t" . '<a href="' . $app_data[ 'url' ] . '" cacheit="'
+				. ( in_array( $app, $cacheit ) ? 'true' : 'false' )
 				. '">';
-			$title = $GLOBALS['phpgw_info']['apps'][$app]['title'];
-			if($app == 'home') $title = lang('Home');
-
-			if ($GLOBALS['phpgw_info']['flags']['currentapp'] == $app)
-			{
-				$current_app = True;
+
+			$title = $GLOBALS[ 'phpgw_info' ][ 'apps' ][ $app ][ 'title' ];
+
+			if ( $app == 'home' )
+				$title = lang( 'Home' );
+
+			if ( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'currentapp' ] == $app )
+			{
+				$current_app = true;
 				$curr_app = $app;
 			}
 
-			$icon .= '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title
-				. '" border="0" width="'.($current_app ? 35 : 24 ).'" height="'.($current_app ? 35 : 24 ).'" nowrap="nowrap"/></a>';
-
-			if($app=='home')
-			{
-				if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
-				{
+			$icon .= "{$indent}\t\t\t\t" . '<img id="'.str_replace('_','',$app).'id" src="' . $app_data['icon'] . '" alt="' . $title . '" title="'. $title
+				. '" border="0" width="' . ( $current_app ? 35 : 24 ) . '" height="' . ( $current_app ? 35 : 24 ) . '" nowrap="nowrap"/>'
+				. "{$indent}\t\t\t</a>";
+
+			if ( $app == 'home' )
+				if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'start_and_logout_icons' ] == 'no' )
 					continue;
-				}
-			}
-
-			// Verifica qual o formato da Barra de navegação: 
-			// Icone ou Texto, ou Icone e Texto
-
-
-			if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') {
+
+			if ( $GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons' )
+			{
 				$title_extra = $title;
 				$title = '';
 			}
-			else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){
-				$icon = '';
-			}
-
-			if($i< $max_icons) {
-
-				if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']=='no')
-				{
-					$tdwidth = 100/($max_icons);
-				}
+			else
+				if( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'navbar_format' ] == 'text' )
+					$icon = '';
+
+			if ( $i < $max_icons )
+			{
+				if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'start_and_logout_icons' ] == 'no' )
+					$tdwidth = 100 / ( $max_icons );
 				else
-				{
-					$tdwidth = 100/($max_icons+2);
-				}
-
-				$app_icons .= '<td nowrap'
-					. ' onmouseover="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id);}"'
-					. ' onmouseout="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id);}"'
-					. ' onclick="if ( this.className != \'navbar_butOut\'){this.className=\'navbar_butOut\'; zoom_out(curr_app);'
-					. 'var app = document.getElementById(curr_app); if ( app ) app.parentNode.parentNode.className=\'navbar_but\';curr_app=\'' . str_replace('_','',$app) . 'id\'}"'
-					. ' class="navbar_but'.($current_app?'Out':'').'">';
-
-				if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
-				{
+					$tdwidth = 100 / ( $max_icons + 2 );
+
+				$app_icons .= "{$indent}\t\t" . '<td nowrap class="navbar_but' . ( $current_app ? 'Out' : '' ) . '">';
+
+				if ( isset( $GLOBALS['phpgw_info']['flags']['navbar_target'] ) && $GLOBALS['phpgw_info']['flags']['navbar_target'] )
 					$app_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
-				}						
+
 				$app_icons .=  $icon;
-			}
-
-
-			$icon = '<img align="center" src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />';
-
-			$app_extra_icons .= '<tr>';
-
-			if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']!='text')
-			{
-				$app_extra_icons .= '<td class="extraIconsRow"><a href="' . $app_data['url'] . '"';
-
-				if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
-				{
-					$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
-				}
-
-				$app_extra_icons .= ' >' . $icon . '</a></td>';
-			}
-
-
-			$app_extra_icons .= '<td align="left" class="extraIconsRow" style=""><a href="'.$app_data['url'] . '"';
-
-			if(isset($GLOBALS['phpgw_info']['flags']['navbar_target']) && $GLOBALS['phpgw_info']['flags']['navbar_target'])
-			{
+				$app_icons .=  "{$indent}\t\t</td>";
+			}
+
+
+			$icon = "{$indent}\t\t\t" . '<img align="center" src="' . $app_data['icon'] . '" alt="' . $title . '" width="16" title="'. $title . '" border="0" />';
+
+			$app_extra_icons .= "{$indent}<tr>";
+
+			if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'navbar_format' ] != 'text' )
+			{
+				$app_extra_icons .= "{$indent}\t" . '<td class="extraIconsRow">'
+					. "{$indent}\t" . '	<a href="' . $app_data['url'] . '"';
+
+				if ( isset( $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'navbar_target' ] ) && $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'navbar_target' ] )
+					$app_extra_icons .= ' target="' . $GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'navbar_target' ] . '"';
+
+				$app_extra_icons .= " >{$icon}{$indent}\t\t</a>{$indent}\t</td>";
+			}
+
+
+			$app_extra_icons .= "{$indent}\t" . '<td align="left" class="extraIconsRow" style="">'
+				. "{$indent}\t\t" . '<a href="'.$app_data['url'] . '"';
+
+			if ( isset( $GLOBALS['phpgw_info']['flags']['navbar_target'] ) && $GLOBALS['phpgw_info']['flags']['navbar_target'] )
 				$app_extra_icons .= ' target="' . $GLOBALS['phpgw_info']['flags']['navbar_target'] . '"';
-			}
-
-			$app_extra_icons .= '>' . $title_extra . '</a></td></tr>';
-
-			unset($icon);
-			unset($title);
-			$i++;				
+
+			$app_extra_icons .= '>' . $title_extra . '</a>'
+				. "{$indent}\t</td>"
+				. "{$indent}</tr>";
+
+			unset( $icon );
+			unset( $title );
+			$i++;
 		}
 	}
 
-	echo '<script>var curr_app = "' . ( ( $curr_app ) ? str_replace( '_','',$curr_app ) . 'id' : '' ) . '";</script>';
-
-	if($GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons']!='no')	
-	{
-
-		$hint = $GLOBALS['phpgw_info']['navbar']['logout']['title'];
-		$icon = '<img id="logout_id" width="24" height="24" src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">';
-
-		if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='icons') {
-
+	$GLOBALS[ 'phpgw_info' ][ 'flags' ][ 'java_script' ] .= "\n\t\t<script>\n\t\t\t"
+		. 'var curr_app = "' . ( ( $curr_app ) ? str_replace( '_','',$curr_app ) . 'id' : '' ) . '";' . "\n\t\t"
+		. '</script>';
+
+	if ( $GLOBALS['phpgw_info']['user']['preferences']['common']['start_and_logout_icons'] != 'no' )
+	{
+
+		$hint = $GLOBALS[ 'phpgw_info' ][ 'navbar' ][ 'logout' ][ 'title' ];
+		$icon = '<img id="logout_id" width="24" height="24" src="'
+			. $GLOBALS[ 'phpgw_info' ][ 'navbar' ][ 'logout' ][ 'icon' ]
+			. '" alt="' . $hint . '" title="' . $hint . '">';
+
+		if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'navbar_format' ] == 'icons' )
 			$title = '';
-		}
-		else if($GLOBALS['phpgw_info']['user']['preferences']['common']['navbar_format']=='text'){
-
+		else if ( $GLOBALS[ 'phpgw_info' ][ 'user' ][ 'preferences' ][ 'common' ][ 'navbar_format' ] == 'text' )
 			$icon = '';
-		}			
-		$app_icons .= '<td nowrap '.
-			'onmouseover="javascript:this.className=\'navbar_butOver\'; zoom_in(this.firstChild.firstChild.id)" '.
-			'onmouseout="javascript:this.className=\'navbar_but\'; zoom_out(this.firstChild.firstChild.id)" '.
-			'class="navbar_but"><a onclick="location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\'">'.$icon.'</td>';
-	}			//			window.location.href=\''.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'\'
-
-	$var['app_icons'] = $app_icons;
+
+		$app_icons .= '<td nowrap class="navbar_but"><a onclick="location.href=\''
+			. $GLOBALS[ 'phpgw_info' ][ 'navbar' ][ 'logout' ][ 'url' ] . '\'">' . $icon . '</td>';
+	}
+
+	$var[ 'app_icons' ] = $app_icons;
 
 	$hint = $GLOBALS['phpgw_info']['navbar']['logout']['title'];
-	$icon = '<img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">';
+	$icon = "{$indent}\t\t\t" . '<img src="'.$GLOBALS['phpgw_info']['navbar']['logout']['icon'].'"  alt="'.$hint.'" title="'.$hint.'">';
 	$title = $GLOBALS['phpgw_info']['navbar']['logout']['title'];
 
-	$app_extra_icons .= '<td  class="extraIconsRow">
-		<a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$icon.'</a></td>';
-
-	$app_extra_icons .= '<td class="extraIconsRow">
-		<a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$title.'</a></td>';
-
-
-	$app_extra_icons_div = '
-		<script language="javascript">
-new ypSlideOutMenu("menu1", "down", 5, 24, 160, 200,\'left\')
-				</script>
-				<div id="menu1Container">
-				<div id="menu1Content" style="position: relative; left: 0; text-align: left;">
-
-				<div id="extraIcons">
-
-				<table cellspacing="0" cellpadding="0" border="0" width="100%">
-				<tr>
-				<td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd;padding:1px;">
-				<a href="#" '.$show_menu_event.'="ypSlideOutMenu.hide(\'menu1\')" title="'.lang('close').'">
-				<img style="" border="0" src="'.$var['img_root'].'/close.png"/></a></span></td></tr>
-				<tr>
-				<td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;">
-					<a href="#" onClick="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'">
-					<img src = "'.$var['img_root'].'/down.button.png"></a>
-				</td>
-				<td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;">
-					<a href="#" onClick="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'">
-					<b>'.lang('Expand Menu').'</b></a></td></tr>				
-				'.$app_extra_icons.'</table>
-				</div>
-
-				</div>
-				</div>
-				';
-
-				$var['app_extra_icons_div']= $app_extra_icons_div;				
-				$var['app_extra_icons_icon']= '<td width="26" valign="top" align="right" style="zIndex:10000;padding-right:3px;padding-top:10px;"><a title="'.lang('show_more_apps').'" href="#"  '.$show_menu_event.'="ypSlideOutMenu.showMenu(\'menu1\')"><img src="'.$var['img_root'].'/extra_icons.png" border="0" /></a></td>';
+	$app_extra_icons .= "{$indent}<tr>{$indent}\t" . '<td  class="extraIconsRow">'
+		. "{$indent}\t\t" . '<a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'. "{$icon}{$indent}\t\t</a>"
+		. "{$indent}\t</td>"
+		. "{$indent}\t" . '<td class="extraIconsRow">'
+		. "{$indent}\t\t" . '<a href="'.$GLOBALS['phpgw_info']['navbar']['logout']['url'].'">'.$title.'</a>'
+		. "{$indent}\t</td>{$indent}</tr>";
+
+	$app_extra_icons_div = '<script language="javascript">' . "\n\t\t"
+		. '	new ypSlideOutMenu( "menu1", "down", 5, 24, 160, 200, "left" );' . "\n\t\t"
+		. '</script>' . "\n\t\t"
+		. '<div id="menu1Container">' . "\n\t\t"
+		. '	<div id="menu1Content" style="position: relative; left: 0; text-align: left;">' . "\n\t\t"
+		. '		<div id="extraIcons">' . "\n\t\t"
+		. '			<table cellspacing="0" cellpadding="0" border="0" width="100%">' . "\n\t\t"
+		. '				<tr>' . "\n\t\t"
+		. '					<td colspan="2" nowrap="nowrap" align="right" style="background-color:#dddddd;padding:1px;">' . "\n\t\t"
+		. '						<a ' . $show_menu_event . '="ypSlideOutMenu.hide(\'menu1\')" title="' . lang('close') . '">' . "\n\t\t"
+		. '							<img style="" border="0" src="' . $var[ 'img_root' ] . '/close.png"/>' . "\n\t\t"
+		. '						</a>' . "\n\t\t"
+		. '					</td>' . "\n\t\t"
+		. '				</tr>' . "\n\t\t"
+		. '				<tr>' . "\n\t\t"
+		. '					<td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;">' . "\n\t\t"
+		. '						<a href="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'">' . "\n\t\t"
+		. '							<img src = "' . $var[ 'img_root' ] . '/down.button.png"></a>' . "\n\t\t"
+		. '					</td>' . "\n\t\t"
+		. '					<td colspan="1" valign="top" nowrap="nowrap" align="left" style="background-color:#dddddd;padding:1px;">' . "\n\t\t"
+		. '						<a href="javascript:ypSlideOutMenu.hide(\'menu1\');showBar()" title="'.lang('Expand Menu').'">' . "\n\t\t"
+		. '							<b>' . lang('Expand Menu') . '</b>' . "\n\t\t"
+		. '						</a>' . "\n\t\t"
+		. '					</td>' . "\n\t\t"
+		. "				</tr>{$app_extra_icons}\n\t\t"
+		. '			</table>' . "\n\t\t"
+		. '		</div>' . "\n\t\t"
+		. '	</div>' . "\n\t\t"
+		. '</div>';
+
+	$var['app_extra_icons_div'] = $app_extra_icons_div;
+	$var['app_extra_icons_icon'] = '<td width="26" valign="top" align="right" style="zIndex:10000;padding-right:3px;padding-top:10px;">'
+		. $indent . '<a title="' . lang( 'show_more_apps' ) . '" ' . $show_menu_event . '="ypSlideOutMenu.showMenu(\'menu1\')">'
+		. "{$indent}\t" . '<img src="' . $var[ 'img_root' ] . '/extra_icons.png" border="0" />'
+		. "{$indent}</a>\n\t\t\t\t\t"
+		. '</td>';
 
 
Index: trunk/phpgwapi/templates/default/navbar.tpl
===================================================================
--- trunk/phpgwapi/templates/default/navbar.tpl	(revision 2617)
+++ trunk/phpgwapi/templates/default/navbar.tpl	(revision 2623)
@@ -1,111 +1,133 @@
 <!-- BEGIN navbar_header -->
-<div align="center" id="hiddenButton" style="position:absolute">
-</div>
-<div align="center" id="extraButton" style="position:absolute">
-<table><tr>{app_extra_icons_icon}</tr></table>
-</div>
-{app_extra_icons_div}
+		<div align="center" id="hiddenButton" style="position:absolute"></div>
+		<div align="center" id="extraButton" style="position:absolute">
+			<table>
+				<tr>
+					{app_extra_icons_icon}
+				</tr>
+			</table>
+		</div>
+		{app_extra_icons_div}
+		<div class="toolbar" id="toolbar" style="visibility:hidden">
+			<table border="0" height="50px" width="100%" cellpadding=0 cellspacing=0>
+				<tr>
+					<td class="logo_expresso">&nbsp;<br></td>
+					<td align="center">
+						<table id="app_icons" width="auto" border="0" cellpadding="0" cellspacing="0">
+							<tr>{app_icons}
+							</tr>
+						</table>
+					</td>
+					<td style="padding-left:0px;padding-right:25px" align="right" nowrap></td>
+				</tr>
+			</table>
+			<div id ="divStatusBar">
+				<table width="100%" border="0" cellspacing="0" cellpadding="0">
+					<tr>
+						<td width="30%" align="left" id="user_info" nowrap>{user_info}{frontend_name}</td>
+						<td width="30%" id="admin_info" nowrap>{current_users}</td>
+						<td style="padding-right:10px" width="*" align="right" valign="center" nowrap="true">
+							<a href="{dir_root}/preferences/" title="{title_my_preferences}" alt="{title_my_preferences}" cacheit="true" onmouseover="javascript:self.status='{title_my_preferences}'" onmouseout="javascript:self.status=''">
+								<img height="15px" src="{dir_root}/phpgwapi/templates/{template}/images/preferences.png" />
+								<font id="links_bar">{my_preferences}</font>
+							</a>
+							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+							<a href="javascript:openWindow(400,550,'{dir_root}/help/enviasugestao.php')" title="{title_suggestions}" alt="{title_suggestions}" onmouseover="javascript:self.status='{title_suggestions}'" onmouseout="javascript:self.status=''">
+								<img src="{dir_root}/phpgwapi/templates/{template}/images/critic.png" />
+								<font id="links_bar">{suggestions}</font>
+							</a>
+							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+							<a href="javascript:openWindow(480,510,'{dir_root}/help')" title="{title_help}" alt="{title_help}" onmouseover="javascript:self.status='{title_help}'" onmouseout="javascript:self.status=''">
+								<img src="{dir_root}/phpgwapi/templates/{template}/images/help.png" width="16px" />
+								<font id="links_bar">{help}</font>
+							</a>
+						</td>
+					</tr>
+				</table>
+			</div>
+		</div>
+<!-- END navbar_header -->
 
-<div class="toolbar" id="toolbar" style="visibility:hidden">
-<table border="0" height="50px" width="100%" cellpadding=0 cellspacing=0><tr>
-	<td class="logo_expresso">&nbsp;<br></td>
-	<td align="center">
-	<table width="auto" border="0" cellpadding="0" cellspacing="0">{app_icons}</table>
-	</td><td style="padding-left:0px;padding-right:25px" align="right" nowrap>
-</td></tr></table>
-<div id ="divStatusBar">
-<table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
-  <td width="30%" align="left" id="user_info" nowrap>{user_info}{frontend_name}</td>
-  <td width="30%" id="admin_info" nowrap>{current_users}</td>
-  <td style="padding-right:10px" width="*" align="right" valign="center" nowrap="true">
-  		<a href="{dir_root}/preferences/" title="{title_my_preferences}" alt="{title_my_preferences}" cacheit="true" onmouseover="javascript:self.status='{title_my_preferences}'" onmouseout="javascript:self.status=''"><img height="15px" src="{dir_root}/phpgwapi/templates/{template}/images/preferences.png"><font id="links_bar">{my_preferences}</font></a>
-  		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
-  		<a href="#" title="{title_suggestions}" alt="{title_suggestions}" onmouseover="javascript:self.status='{title_suggestions}'" onmouseout="javascript:self.status=''" onclick="javascript:openWindow(400,550,'{dir_root}/help/enviasugestao.php')"><img src="{dir_root}/phpgwapi/templates/{template}/images/critic.png"><font id="links_bar">{suggestions}</font></a>
-  		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-  		<a href="#" title="{title_help}" alt="{title_help}" onmouseover="javascript:self.status='{title_help}'" onmouseout="javascript:self.status=''" onclick="javascript:openWindow(480,510,'{dir_root}/help')"><img src="{dir_root}/phpgwapi/templates/{template}/images/help.png" width="16px"><font id="links_bar">{help}</font></a>
-  </td>
- </tr>
-</table>
-</div>
-</div>
+<!-- BEGIN appbox -->
+		<div id="divSubContainer">
+			<table width="100%" cellspacing="0" cellpadding="0" border="0">
+				<tr>
+				{sideboxcolstart}
+<!-- END appbox -->
 
-<script language="Javascript">
- function openWindow(newWidth,newHeight,link)
-  {			
-		
-	newScreenX  = screen.width - newWidth;	
-	newScreenY  = 0;		
-	Window1=window.open(link,'',"width="+newWidth+",height="+newHeight+",screenX="+newScreenX+",left="+newScreenX+",screenY="+newScreenY+",top="+newScreenY+",toolbar=no,scrollbars=yes,resizable=no");
-				
-  }	
-</script>
-<!-- END navbar_header -->
-<!-- BEGIN appbox -->	
-	<div id="divSubContainer">
-		<table width="100%" cellspacing="0" cellpadding="0" border="0">
-		<tr>
-		{sideboxcolstart}
-<!-- END appbox -->
 <!-- BEGIN sidebox_hide_header -->
-	<script language="javascript">
-		new ypSlideOutMenu("menu2", "right", 0, 165, 160, 200)
-	</script>
+		<script language="javascript">
+			new ypSlideOutMenu("menu2", "right", 0, 165, 160, 200)
+		</script>
+		<div id="sideboxdragarea" style="position:absolute;left:0px;top:175px">
+			<a href="javascript:" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}">
+				<img src="{img_root}/dragarea_right.png" />
+			</a>
+		</div>
+		<div id="menu2Container">
+			<div id="menu2Content" style="position: relative; left: 0; text-align: left;">
+				<table cellspacing="0" cellpadding="0" border="0">
+					<tr>
+						<td>
+							<div style="background-color:#ffffff;border: #9c9c9c 1px solid;padding:5px;">
+<!-- END sidebox_hide_header -->
 
-	<div id="sideboxdragarea" style="position:absolute;left:0px;top:175px">
-	<a href="#" {show_menu_event}="ypSlideOutMenu.showMenu('menu2')" onmouseover="//ypSlideOutMenu.showMenu('menu2')" title="{lang_show_menu}"><img src="{img_root}/dragarea_right.png" /></a>
-	</div>
-	<div id="menu2Container">
-	<div id="menu2Content" style="position: relative; left: 0; text-align: left;">
-		<table cellspacing="0" cellpadding="0" border="0">
-		 <tr><td>
-		  
-		<div style="background-color:#ffffff;border: #9c9c9c 1px solid;padding:5px;">
-<!-- END sidebox_hide_header -->
 <!-- BEGIN sidebox_hide_footer -->
-</div>
-</td><td style="padding-top:10px" valign="top">
-<a href="#" onClick="ypSlideOutMenu.hide('menu2')" ><img src="{img_root}/dragarea_left.png" align="right" /></a>
-</td></tr></table>
-</div>
-</div>
-<script language="Javascript">
-	initBar(GetCookie("showHeader"));
-</script>
+							</div>
+						</td>
+						<td style="padding-top:10px" valign="top">
+							<a href="javascript:" onClick="ypSlideOutMenu.hide('menu2')" >
+								<img src="{img_root}/dragarea_left.png" align="right" />
+							</a>
+						</td>
+					</tr>
+				</table>
+			</div>
+		</div>
+		<script language="Javascript">
+			initBar(GetCookie("showHeader"));
+		</script>
 <!-- END sidebox_hide_footer -->
 
+<!-- BEGIN navbar_footer -->
+{sideboxcolend}
+					<!-- End Sidebox Column -->
+					<!-- Applicationbox Column -->
+					<td id="tdAppbox" valign="top" {remove_padding}>
+						<div id="divAppboxHeader">{current_app_title}</div>
+						<div id="divAppbox" class="divAppbox">
+							<table id="tableDivAppbox" width="98%" cellpadding="0" cellspacing="0">
+								<tr>
+									<td>
+<!-- END navbar_footer -->
 
+<!-- BEGIN extra_blocks_header -->
+								<div class="divSidebox">
+									<div class="divSideboxHeader"><span>{lang_title}</span></div>
+									<div>
+										<table width="100%" cellspacing="0" cellpadding="0" border=0>
+<!-- END extra_blocks_header -->
 
+<!-- BEGIN extra_block_row -->
+											<tr class="divSideboxEntry">
+												<td width="15" align="center" valign="middle" class="textSidebox">
+													{icon_or_star}
+												</td>
+												<td class="textSidebox">
+													<a class="textSidebox" href="{item_link}"{target}>{lang_item}</a>
+												</td>
+											</tr>
+<!-- END extra_block_row -->
 
+<!-- BEGIN extra_block_spacer -->
+											<tr class="divSideboxEntry">
+												<td colspan="2" height="8" class="textSidebox">&nbsp;</td>
+											</tr>
+<!-- END extra_block_spacer -->
 
-<!-- BEGIN navbar_footer -->	
-		{sideboxcolend}
-		<!-- End Sidebox Column -->
-		<!-- Applicationbox Column -->
-		<td id="tdAppbox" valign="top" {remove_padding}>
-		<div id="divAppboxHeader">{current_app_title}</div>
-		<div id="divAppbox" class="divAppbox">
-		<table id="tableDivAppbox" width="98%" cellpadding="0" cellspacing="0">
-		<tr><td>
-<!-- END navbar_footer -->
-<!-- BEGIN extra_blocks_header -->
-<div class="divSidebox">
-	<div class="divSideboxHeader"><span>{lang_title}</span></div>
-	<div>
-		<table width="100%" cellspacing="0" cellpadding="0" border=0>
-<!-- END extra_blocks_header -->
 <!-- BEGIN extra_blocks_footer -->
-	</table>	
-		</div>
-		</div>
-		<div class="sideboxSpace"></div>
+										</table>
+									</div>
+								</div>
+								<div class="sideboxSpace"></div>
 <!-- END extra_blocks_footer -->
-<!-- BEGIN extra_block_row -->
-<tr class="divSideboxEntry">
-<td width="15" align="center" valign="middle" class="textSidebox">{icon_or_star}</td><td class="textSidebox"><a class="textSidebox" href="{item_link}"{target}>{lang_item}</a></td></tr>
-<!-- END extra_block_row -->
-<!-- BEGIN extra_block_spacer -->
-<tr class="divSideboxEntry"> 
-	<td colspan="2" height="8" class="textSidebox">&nbsp;</td>
-</tr>
-<!-- END extra_block_spacer -->
