Changed frame() to accept either a frame id or frame name

I created two new functions: frame_by_name() and frame_by_id() and changed the frame() function to accept either a str or an int and it will call either frame_by_name() frame_by_id() depending on the type of arg. (Change suggested by Nathan Schneider.)