var parentOpen = true;
var childClose = true;
window.onunload = UpdateParent;
function UpdateParent()
{
	//Only if the parent is open, update the status of the child window
	if (parentOpen && childClose)
	{
		window.opener.remoteOpen = false;
		//alert("closing");
	}
}