ah, you mean something like this?

if(hitMap==mouse_panel)
{...}

i will try it tonight after work