I've seen vtop which is supposed to be a top replacement written in JS that does something similar to what you're looking for? That said, can they not use Activity Monitor or Task Manager or whatever the OS equivalent is? Is there a specific reason for it to be implemented in Javascript.
Just messing around this weekend, riced out my alphabet. It's now a modified version of /r/elianscript, and it's pretty sexy if you ask me.