bypass "The Web page you are viewing is trying to close the window" - (simple)
if you are closing a page using javascript in IE
window.close()
it will prompt an Microsoft Internet Explorer message
"The Web page you are viewing is trying to close the window",
to avoid / bypass this alert / message,
you need to assign the page you going to close with
window.opener = "to some value";
this is because if you want to close a page directly the page should have a opener
thus by assigning the page with a opener value, the page can be close by calling window.close() subsequently