My friend... there is a way but "hack" does not begin to describe it. You have to basically exploit a bug in IE 6 & 7.
Works every time!
Instead of calling
window.close(), redirect to another page.
Redirect to another page. This fools IE into letting you close the browser on this page.