add the document.write and headJs