javascript for active/waiting lists