this function is used for some picture automatic switching