diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 55b60cc1431..c5eab51a457 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -943,9 +943,13 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
// For backward compatibility with old modules
if (empty($conf->headerdone)) top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
- if ($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
+ print '
';
+
+ if ($conf->use_javascript_ajax)
{
- print '';
- }
+ }
- print '';
-
- // Wrapper to show tooltips
- print '';
+ ';
+ }
/*
* Top menu
@@ -1127,7 +1130,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
print "\n";
- if (! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
+ if (! $conf->use_javascript_ajax || ! $conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)
{
print '