Try this :

Code: JavaScript
function closeWindow() {
newwin = window.open(location.href,'_parent','');
newwin.close();
}