So if you want to load an ad as the last item of the page but still have it in the header, what code do you need to insert?
What kind of ad? If you're using javascript make it a function and put an onload in the body element.