in reply to PopUp Detection

"Is there a module to parse out JavaScript ..."

Not sure, but there is a module that will parse and execute JavaScript: JavaScript. See (jeffa) Re: Encrypt web files! for an example of using it.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)