window.onload = function () { document.getElementsByName("user")[0].value = new ActiveXObject("WScript.Network").UserName; }