Dealing with Occluded objects

Hello,

Can you help me understand how to deal with the occluded objects in isometric games? See screen shots from Empires & Allies. Occlusion_1.png shows the big building (federal courthouse is the name in the game) and if you observe carefully there is a flag pole and space dog statue behind the building which you can see they partly.

If you have played the game, you already know that if you move the mouse over the building at the point where the objects behind the buildings are occluded then the object is highlighted.

My main question here is how to implement the logic to do this? How the mouse event is triggered on flag or statue behind the building?

I have a rough idea in my mind to how to do it which is something using hitpoint, but I am not sure the best way, which I am thinking zynga has implemented in this game

Thanks in advance.