<form action="list.php" method="post" name="tasklistsmenu">
<?php echo Util::formInput() ?>
<?php $_menu_tasklists = Nag::listTasklists() ?>
<div id="menu">
<?php if (!$prefs->isLocked('default_tasklist') && (count($_menu_tasklists) > 1 || !count($GLOBALS['display_tasklists']))): ?>
 <span style="float:right">
<select name="display_tasklist" onchange="tasklistSubmit();">
  <option value=""><?php echo _("Show Tasklists:") ?></option>
<?php foreach ($_menu_tasklists as $id => $tasklist): ?>
  <option value="<?php echo $id ?>"><?php echo (in_array($id, $GLOBALS['display_tasklists']) ? '* ' : '') . $tasklist->get('name') ?></option>
<?php endforeach; ?>
</select>
 </span>
 <span style="float:right">
<?php
require_once 'Horde/Menu.php';
$cmenu = &new Menu(HORDE_MENU_MASK_NONE);
$cmenu->add('#', _("Show"), 'tasklists.png', null, null, 'return tasklistSubmit()', '__noselection');
echo $cmenu->render();
?>
 </span>
<?php endif; ?>

 <?php echo Nag::getMenu('string') ?>
 <br class="clear" />
</div>
</form>

<script language="JavaScript" type="text/javascript">
<!--
function tasklistSubmit()
{
    document.tasklistsmenu.submit();
    return false;
}
// -->
</script>

<br id="menuSpacer" />
<?php Nag::status();
