* TSX closes 21.53 points, or 0.18 pct, higher at 12,233.95 * All 10 index sectors stronger, led by commodities By Claire Sibonney TORONTO, Oct 11 (Reuters) - Canada's main stock index rose slightly on Thursday, recovering from three days of losses that culminated in a five-week low, encouraged by U.S. employment data and comments from the IMF that were seen as supporting stability in the euro zone. All 10 of the index's sectors were higher, led by resource-related shares as commodity prices rose. Among the top advancers, Potash Corp was up 2.2 percent at C$41.43, Encana Corp climbed 2.7 percent to C$21.79, and Teck Resources added 1.6 percent to C$30.39. Market sentiment was boosted by data that showed U.S. initial jobless claims fell to the lowest level in more than 4-1/2 years. That report followed a U.S. government report last week that showed a surprising drop in September's unemployment rate to 7.8 percent. "I think that the tone was set very early in the day with the U.S. initial jobless claims coming in significantly better than expected," said Craig Fehr, Canadian market strategist at Edward Jones in St. Louis. "So a bit of a carry-on from the most recent employment report we got in the States, which is to suggest that conditions, while certainly not the level where most investors would want to see them, are continuing to show modest improvement and that's reflective of continued slow growth in the economy." The Toronto Stock Exchange's S&P/TSX composite index ended up 21.53 points, or 0.18 percent, at 12,233.95, which was well off the day's high of 12,295.43 as the TSX tracked Wall Street lower on a drop in Apple shares after a legal ruling went against the company. Early in the day, markets reacted positively to remarks from Christine Lagarde, the IMF's managing director, who said that indebted euro zone economies should have more time to cut budget deficits. Lagarde's comments helped to offset news of a downgrade of Spain's credit rating. "I think the downgrade of Spain was already priced in," said Gavin Graham, president of Graham Investment Strategy. "The fact is that there's no way Spain is investment grade at present, so it's a question of what is the political will on the part of the European authorities to continue buying Spain, and for that matter Italian, bonds." Looking forward, investors will continue to follow U.S. company earnings for direction. The third-quarter earnings season got off to a disappointing start on Tuesday and Wednesday with worrying reports from Chevron and Alcoa. "We're drifting along a little bit and there's no question as we move now into third-quarter earnings season we're going to have a split focus by the markets between what's going on in Europe, the broad economic focus, and certainly a more micro economic focus on exactly what companies are delivering this quarter," Fehr said.