automated menu creation through javascript, next up presencestate