<?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">
<?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();
?>
<form action="list.php" method="post" name="tasklistsmenu">
<?php Util::pformInput() ?>
<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>
</form>
 </span>
<?php endif; ?>

 <?php echo Nag::getMenu('string') ?>
</div>

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

<br />
<?php Nag::status();
