if (window.attachEvent) { window.attachEvent("onload", remove); } else if (window.addEventListener) { window.addEventListener("load", remove, false); } function remove() { var div = document.getElementByIdx_x("divprogressbar"); document.body.removeChild(div); }