document javascript code