(Updates closing numbers, adds details, quotes)
* TSX up 1 percent on day, down 1 percent on week
* Resource sectors boosted by strong earnings
* Loblaw down after profit disappoints
TORONTO, July 25 (Reuters) - The Toronto Stock Exchange's main index rose 1 percent on Friday, with resource shares climbing as investors took heart from strong earnings this week from the energy and materials sectors.
Among the leaders in the oil patch, Suncor Energy (SU.TO) gained 4 percent, and Petro-Canada PCA.TO rose 2.6 percent, after both companies reported a jump in profit on Thursday.
The sector was able to largely ignore a $2.23 drop that took the crude price down to $123.26 a barrel on Friday, racking up a loss of more than $23 in two weeks as it was pressured by faltering demand.
The materials sector, home to resource shares, also saw gains after this week's quarterly results from Potash Corp of Saskatchewan (POT.TO), which rose 4.6 percent, and Fording Canadian Coal Trust FDG_u.TO, which gained 5.8 percent.
"My general sense is what's happening now in terms of earnings is very good, it's surprising people on the upside," said Ian Nakamoto, director of research at MacDougall, MacDougall & MacTier.
"I think myself what you need is some confidence to come back into the market, and I think one of the confidence builders -- not the sole one -- is good earnings."
The S&P/TSX composite index .GSPTSE closed up 172.67 points, or 1.31 percent, at 13,378.81 with seven of its 10 main sectors pushing higher.
The index was off 1 percent for the week, its seventh negative week in a row.
The materials and energy sectors gained 2.2 percent and 1.9 percent respectively on Friday. Both of them came back from declines in Thursday's session, which saw the TSX composite fall more than 2 percent.
The materials group also got a lift from gold producers as the price of bullion rose as worries over the U.S. financial sector raised its safe haven appeal.
Potash Corp rose C$9.04 to C$205.89, and Fording gained C$4.46 to C$81.86. In the energy group, Suncor added C$2.13 to C$55.04, and Petro-Canada was up C$1.18 at C$47.22.
On the downside, Loblaw Cos (L.TO) fell C$1.12, or 3.7 percent, to C$29.25 after Canada's biggest supermarket chain failed to beat analyst earnings estimates. ($1=$1.02 Canadian) (Reporting by Leah Schnurr; editing by Rob Wilson)