(Reuters) - The S&P 500 and the Nasdaq advanced to record levels on Friday, buoyed by gains in technology stocks, while each of the major indexes closed out the quarter with solid gains.