make the database include the links, which could be dynamic assuming you have an easy way to add more links to it...
as far as having a submenu appear without having to refresh the entire page on each click you'll have to use some javascript...
like...and this wont really help
<span id="menu1" onClick="showhide(menu1outline)" style="cursor:hand">
which basically, when you click a primary link, the java function showhide(whichmenu) with show or hide the rest of the links associated with this portion of the menu
it will take some work to bring it all together with sql and php and whatnot in fine tuning your java, but it shouldnt be too bad...
I dont have any more info on that function, my friend uses it on his site (www.almostsmart.com) for an example, but hes not online so I cant ask him much about it