* TSX rises 35.86 points, or 0.28 percent, to 12,664.71 * Seven of the 10 main index sectors advance * Index looks headed for weekly gain * Canadian Natural has biggest positive impact on market By John Tilak TORONTO, July 19 (Reuters) - Canada's main stock index climbed for a third straight session on Friday as higher prices for oil, gold and other commodities buoyed shares of resource companies and lifted market sentiment. The Toronto index neared the six-week high it hit the previous session and looked on track to post a weekly gain, which would be its fourth in a row. Investors cheered reassurances from Federal Reserve Chairman Ben Bernanke earlier in the week that the U.S. central bank's plans to scale back monetary stimulus will be flexible. The strength in commodities helped the benchmark Canadian index do better on Friday than U.S. stocks, which were in the red. "Oil is the single biggest story," said John Stephenson, senior vice president at First Asset Investment Management. "It explains the outperformance of Canada versus the United States." Stephenson said he expects the diminishing spread between the price of Western Canada Select and the West Texas Intermediate crude oil benchmark, as well as a recent rally in oil prices to drive energy stocks. "There's tremendous potential for further gains since you have several factors working in its favor," he said. The Toronto Stock Exchange's S&P/TSX composite index was up 35.86 points, or 0.28 percent, at 12,664.71. Seven of the 10 main sectors on the index were higher. Shares of energy producers were up 0.7 percent, tracking higher oil prices. In the group, Canadian Natural Resources Ltd advanced 1.4 percent to C$34.41 and had the biggest positive influence on the index. Suncor Energy Inc gained 0.8 percent to C$32.80. The index's materials sector, which includes mining stocks, rose 1 percent, benefiting from a 2 percent surge in gold producers. Gold rose 1 percent, due to a decline in the dollar, with Bernanke's comments this week providing support. Barrick Gold Corp rose 2.3 percent. "Materials is the most attractive area going forward, but it's still too early (to get in)," Stephenson said. Financials, the index's most heavily weighted sector, gained 0.3 percent. Royal Bank of Canada, the country's biggest lender, added 0.3 percent to C$64.94, and Bank of Montreal rose 0.7 percent to C$64.83. The Canadian earnings season unofficially kicks off next week. Analysts expect companies to post small overall gains in second-quarter profit, as strength in the energy and insurance sectors is offset by struggling miners.