What do Frames/Iframes do to SEO?
document.write() statements? For example, take the Google AdSense code ... you put it wherever you want AdSense to appear. What if that is near the top of the page? If Google's server is lagging, the rest of your site doesn't get loaded.
How can I use AJAX? No experience there. :) But interested!
You shouldn't be using code that contains document.write() statements. That's deprecated and may or may not work based upon doctype.
I haven't looked at Google Adsense code since... nevermind. Awhile. And since it's being provided, you might be break all sorts of rules if you modified it.
In general, you'd have a div where you wanted the ad. You'd have a script to retrieve the ad image/link code. You'd place that script at the very bottom of your page. Then you'd have a script after that, which alters the content of the div, placing the ad within it.
If their code uses document.write(), though, that approach wouldn't work.
It's similar to AdSense ... AdSense uses document.write as well AFAIK.