A Microeconomic Model of the Effects of Advertising