<html>
<body onload="load()">
This frame should get the focus.
<input id="box"></input>
<script>
function load()
{
document.getElementById("box").focus();
window.top.simulateCloseWindow();
}
</script>
</body>
</html>