Adding required javascript to newmessage page