Changed frame() to accept either a frame id or frame name, as suggested by Nathan Schneider