Here are some JavaScript array literals that might help.
joints[n] corresponds to jointStates[n]
jointStates[n][i] corresponds to the state you get when you use set_joint_state(player, n, i)
var joints = ['neck', 'chest', 'lumbar', 'abs', 'right pecs', 'right shoulder', 'right elbow', 'left pecs', 'left shoulder', 'left elbow', 'right wrist', 'left wrist', 'right glute', 'left glute', 'right hip', 'left hip', 'right knee', 'left knee', 'right ankle', 'left ankle'];
var jointStates = [
['extend', 'contract', 'hold', 'relax'],
['right rotate', 'left rotate', 'hold', 'relax'],
['right bend', 'left bend', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['lower', 'raise', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['lower', 'raise', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['extend', 'contract', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax'],
['contract', 'extend', 'hold', 'relax']
];