in reply to Determining page height

You can do this with JavaScript because items in the DOM know how high/wide they are rendered. But I'm absolutely with pg: too many ads is bad (more than one leaderboard? that's wack); coupled with it not being a Perl question, I won't post any solution code.