<script type="text/javascript">
//Global var to store a reference to the opened window
var openedWindow;
function openWindow()
{
openedWindow = window.open('moreinfo.htm');
}
function closeOpenedWindow()
{
openedWindow.close();
}
</script>
Code (JavaScript)
<script type="text/javascript">
function closeCurrentWindow()
{
window.close();
}
</script>