It's been awhile since I've used javascript, but maybe "body" is a reserved word or buggy in this context:
document.message.body.value
Have you tried using a different input variable name?