我如何判断当前打开的窗口是否包含为指定名称的窗口
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<SCRIPT>
<!--
self.resizeTo(300, 300);
self.moveTo(0, 200);
var hasChild = false;
var child = null;
function openChild()
{
if ( hasChild )
{
child.document.body.innerHTML += hey! I found you!<BR>;
}
else
{
child = window.open(, child, width=300, height=200, scrollbars=no);
child.opener = self;
child.document.writeln(<HTML>);
child.document.writeln(<HEAD>);
child.document.writeln(<TITLE>child</TITLE>);
child.document.writeln(<SCRIPT>);
child.document.writeln(self.moveTo(400, 200););
child.document.writeln();
child.document.writeln(window.onload =);
child.document.writeln( function load());
child.document.writeln( {);
child.document.writeln( if ( !opener.closed ));
child.document.writeln( {);
child.document.writeln( opener.hasChild = true;);
child.document.writeln( });
child.document.writeln( });
child.document.writeln();
child.document.writeln(window.onunload =);
child.document.writeln( function unload());
child.document.writeln( {);
child.document.writeln( if ( !opener.closed ));
child.document.writeln( {);
child.document.writeln( opener.hasChild = false;);
child.document.writeln( });
child.document.writeln( });
child.document.writeln(</SCRIPT>);
child.document.writeln(</HEAD>);
child.document.writeln(<BODY>);
child.document.writeln(</BODY>);
child.document.writeln(</HTML>);
child.document.close();
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE=button VALUE=Open child Window ONCLICK=openChild()>
</BODY>
</HTML>