Is there a variable or some other way of finding out in PHP how far down the page the current position is (if that makes any sense)? Basically for pages with not much information on I want to display an advert at the bottom of the page, but for pages with a lot of information I want to put the advert in the sidebar. To decide what to do I need to know where the page ends, so I need a function something like current echo position.

Any suggestions?