Code from DevFright.com tutorial on how to work with a dynamic menu.