Close Window Browser Without Warning

How can you close window browser without get warning message like this
"The page is trying to close the window." ?  This warning message shows up when you use Java Script syntax window.close(); or self.close();
window.close() checks window.opener. If "opener" equals empty string it suspects that we talk about parent window (not the one that was opened with window.open(...)) and pop-ups warning.

So we use this simple function :
// Work with Firefox, Netscape, IE, Opera
function closeWithoutWarning()
{
    window.open('','_parent','');
    window.close();
}

// Work with IE
function closeWithoutWarning2()
{
    window.opener = "whatever";
    window.close();
}