Javascript encrypt

Hi there,

I need a simple javascript function that allows me to encrypt textarea data with a key (The key is the users password stored as a hashed session variable, printed by PHP into a field)

I essentially want the textarea data to be encrypted when the user clicks a button within the form.
Thanks