Added detail codes for the function of popup width changing