
a couple things , firstly please post your code in [small] tags so we can read it , then breifly i noticed that you re-defined the keys many times. you can remove alot of that by simply declaring keys globaly at the top of your code like so ,
Code:
new keys = MENU_KEY_0 | MENU_KEY_1 | MENU_KEY_2
all the way till you hit 9 (so that all the key options are available)