Hi!
What do you mean by "doing it in PHP"? If you need to cut down the time used to load the images, you probably won't be able to do it using PHP. You could optimize your gifs, make a Flash movie which could be around 30-40 kbs. However, if the menu changes from page to page you probably need to go with PHP. Make an associative array of top level menus with subarrays that have keys like "image", "target", "link", "submenus". The "submenus" key would have an associated array just like the top one. Then design an algorithm for going thru the menus and printing it to regular HTML.
If you need any help with that, please email me or post to this thread.
Best,
Stas