Convert a index.html page into document.writes. Resolve relative urls. Why? Because most ad delivery systems do this - so nice to emulate bad behaviour for testing.