interactive documents in javascript