var countDiv=document.getElementById("countDiv"); if(countDiv){ if(window.attachEvent){ window.attachEvent("onload",function(){ countDiv.innerHTML=257; }); }else if(window.addEventListener){ window.addEventListener("load",function(){ countDiv.innerHTML=257; },false); } }else document.write(257);