<script>
function setit(){
if(document.all){
document.getElementById("myframe").attachEvent("onfocus",dothis);
}else{
document.getElementById("myframe").contentWindow.addEventListener("onfocus",dothis,false);
}
}
function dothis(){
alert("blurred");
}
</script>
<body onload="setit()">
<input />
</body>