Many people come across this issue with popup windows when they want to give the user a close button instead of the X up at the top.
You can easily and quickly achieve this just by adding a ‘href’ tag.
The following code is a sample, so customize it to whatever you need.
<a target="_top" href="javascript:window.close()">Close Window</a>