A better zIndex detection function, thanks Mark Larter.