Update OptionsMenu.js

Replaced "for in" statements by standard for statement because if guys (like me) prototype arrays, weird things happens.
Added handler func to make it handy from outside