Canadian electronics manufacturing-services firm Celestica ( CLS) swung to a second-quarter loss, but the company's results topped analysts' estimates on both the top and bottom line. The company said late Thursday it lost $30.3 million, or 13 cents a share, in its second quarter. The results include $20 million in restructuring charges and $33 million in noncash losses relating to the sale of the company's plastics business during the quarter. Excluding certain items in the latest quarter, the company earned $29.1 million, or 13 cents a share, sliding from $39.8 million, or 17 cents a share, in the same period last year. On that basis, the company beat the Street's expectations by a penny. In last year's quarter, the company made a profit of $12.6 million, or 6 cents a share. Celestica posted revenue of $2.22 billion, down from $2.25 billion in the same quarter last year but exceeding the average analyst forecast of $2.13 billion. "With a backdrop of stable end markets, improved efficiencies in our high growth facilities, ramping new programs, and the completion of our restructuring activities, we are confident in continued revenue growth and stronger margins throughout 2006," Steve Delaney, Celestica CEO, said in a prepared statement. For its third quarter, Celestica anticipates earnings of 12 cents to 20 cents a share and revenue of $2.15 billion to $2.35 billion. That's in line with expectations of Thomson First Call, which expects EPS of 16 cents on sales of $2.2 billion. Celestica shares inched up 4 cents to $7.91 in recent after-hours trading.