Bug 870502: Ajaxify newsletter forms

NIT: this function is a little long; it would be nice if it were broken up into smaller functions.