Im guessing it in the .tpl for he specific menus, but not sure without seeing the content of them.
if you notice {$content} in menu_dialog.tpl.
That pulls in the specific content for each menu. So like for the categories you will have
Code:
{capture name=menu}
{if $active_modules.Flyout_Menus}
{include file="modules/Flyout_Menus/categories.tpl"}
{assign var="additional_class" value="menu-fancy-categories-list"}
{else}
<ul>
{foreach from=$categories_menu_list item=c name=categories}
<li{interline name=categories}><a href="home.php?cat={$c.categoryid}" title="{$c.category|escape}">{$c.category}</a></li>
{/foreach}
</ul>
{assign var="additional_class" value="menu-categories-list"}
{/if}
{/capture}
{include file="customer/menu_dialog.tpl" title=$lng.lbl_categories content=$smarty.capture.menu}
That is where the <ul> </ul> is coming from.