function doOnload() { setTimeout("downloadComponents()", 1000); } window.onload = doOnload; function downloadJS(url) { var elem = document.createElement("script"); elem.src = url; document.body.appendChild(elem); } function downloadCSS(url) { var elem = document.creatElement("link"); elem.rel = "stylesheet"; elem.type = "text/css"; elem.href = url; document.body.appendChild(elem); }