in reply to PopUp Detection
You could use HTML::TokeParser or HTML::TokeParser::Simple to estract Javascript code, and then search for window.open commands. There is a little example by teabag at Re: Check for popups in webpage.
Ciao, Valerio