Are you sure I should be the one doing this? My mind is getting so that I miss the obvious too much.
Added these parts...
setmenu($_menu,macro,"Images >> Viewer for:", "addpermB1_Viewer(openImagesPerm)");
setmenu($_menu,macro,"Cookies >> Viewer for:", "addpermB1_Viewer(openCookiesPerm)&q