this is something i've put a lot of thought into - i was going to write this function for my dissertation, but wasn't confident of how accurately a screenshot could be made, due to stylesheets, dhtml, z-indexes etc etc.
i'd be interested to see where this goes