The Chinese city of Tianjin has ordered 40 factories to close for nearly two months in an effort to cut air pollution for the Beijing Olympics .