In javascript, how would you check if an object is actually visible. I don't just mean checking the visibility and display attributes. I mean, checking that the element is not
visibility:hidden or display:none
underneath another element
scrolled off the edge of the screen.
EDIT: For technical reasons, I can't include any scripts. I can however use prototype as it is on the page already.
EDIT 2: This is no longer neccesary, but I'd still find an answer interesting)