improve the mouseover/mouseout function of borderRect