I've been using the following code without problems for the past 5 years or so to check that an iframe has been launched from its parent:

Code:
	echo "<script type='text/javascript' language='javascript'>\n";
	echo "if (top.location == location) {\n";
	echo "location.href='./index.php?func=loggedout&q=1'\n";
	echo "}\n";   
	echo "</script>\n";
Suddenly, in the past couple of days it's stopped working in some versions of IE which I'm guessing might be due to a javascript update that some users of the site have had while others haven't. No problems with Firefox, Chrome, Safari etc.

Can anyone suggest why

Code:
  if (top.location == location)
should no longer function as expected all of a sudden?