Javascript cookies

im trying to make a form that makes a cookie called users and in that cookie there is a username which is determined from a textarea on that page… i cant find sufficient help on the net so i though i might try u guys, thanx in advance