Extract invertObject, rect2bnd(for IE issue) function.