Under certain circumstances, document.write can overwrite the entire page, since this function is only called after the page has been completely loaded. You can find more information about this here.
Please use the following code instead:
...
Under certain circumstances, document.write can overwrite the entire page, since this function is only called after the page has been completely loaded. You can find more information about this here.
Please use the following code instead:
...