You should be able to do document.body.onmouseleave / onmouseout (see edits) on the iframe page. Since these are bubbles, you will need to verify that this is actually the body that triggered the event.
document.body.onmouseout = function () { if (event.srcElement == document.body) {
EDIT : my mistake is that onmouseleave does not bubble, so if statement is not required. onmouseleave does not work for other browsers, so you should use onmouseout and save the if statement because onmouse does not work.
if only IE6 bothers you, put the following <script> tag in your iframe page code (preferably a header).
<script type="text/javascript"> document.documentElement.onmouseleave = function () { alert('mouse left the iframe'); } </script>
See MSDN documentation here
source share