js changes for resorting of multiboxes