Como faço isso rodar ?
<html>
<head>
<script language="javascript">
function teste(){
alert("oi");
}
document.getElementById("as").onclick = function(){
teste();
}
</script>
</head>
<body>
<input type="button" id="as" value="AQUI">
</body>
</html>
setTimeout(function() { // CODE // }, 500);
...window.onload
nem roda todos navegadores de versão.