change function hideRightLayout()