Storing remote HTML source code in local JavaScript variable.

Storing remote HTML source code in local JavaScript variable.

Hi,
 
I am trying to find a way in client side JavaScript to store the HTML source code of a given web page in a JavaScript variable.
 
I want to do this to filter out a pop up ad from a served piece of HTML before displaying it in an div
 
any ideas?
 
thanks
vinay