Hey LSD man...
Forgive me if I'm not understanding your post correctly, but if you're talking about the code for a tear off menu, you can create your own with:
menu -to 1
Adding your own menu to the main Maya frame can be done like this:
setParent $gMainWindow;
menu -l "LSD Animation" -aob 1 -to 1 "LSDMenu";
menuItem -l "sphere" -c "sphere"-ann "sphere command";
setParent -menu ..;