Here is the detail on how to use it: Full source
About cmenu1, cmenu2, cmenu3 - they are the 3 different menu samples on the same link you shared. If you see, there are multiple menu's example on the page for demo. Don't get confused. Source explains with a single menu and how to use and is implemented.