I have just found the cause of an odd error that has been occurring for certain users of our web application.
After a small amount of research I ended up on the MSDN documentation site and found that apparently for IE7 running in protected mode on Vista (the default setting by all accounts), window.open() may not return a valid reference to the new window. So code that calls
var w = window.open() and then attempts to use w will fail as w will be null.
You can read more here.
Unhelpful is a word that springs to mind.