Just when things were starting to look better at online advertising tech firm DoubleClick (NASDAQ:DCLK), the gig is officially up. In a press release issued just after midnight last night, DoubleClick announced that it has agreed to sell itself to Hellman & Friedman and JMI Equity, two private equity firms, for $1.1 billion, or $8.50 per share.

The announcement comes hard on the heels of DoubleClick's recent earnings report for the first quarter of 2005, in which the company reported losing $0.01 per diluted share, reversing a year-ago profit despite boosting its revenues by 12% over that time period.

As bad as that news might look at first glance, however, the rest of the earnings news belied it. Take gross margins, for instance, which rose year-on-year from 67% to 69%. Cash generation also improved over the past year -- or, more specifically, cash outflow declined -- as DoubleClick shored up its finances a bit. Its net cash outflow was $8 million, compared with $13.4 million in Q1 2004.

Though burning cash is never good (and may violate county ordinances), things were nonetheless beginning to look up for the erstwhile king of Web page banner advertising. And more importantly for investors, the company was beginning to make actual shareholder-friendly moves, as opposed to the mere gestures that had been its wont. Over the past 12 months, the company's weighted average shares outstanding declined by 8% through share buybacks.

All that being said, though, DoubleClick's "definitive agreement" to sell itself isn't quite as "definite" as it might sound. All it really means is that the company's board of directors has agreed to the sale. There's still the possibility that the government will weigh in on antitrust concerns, or that the shareholders will decide that the equity firms' offer -- which is currently lower than DoubleClick's shares are fetching on the open market -- is inadequate.

Whatever that means for the deal announced last night, and no matter whether DoubleClick's shares fall to the offer price or rise in anticipation of competing bids from newly interested parties, it's likely we're soon going to see heightened interest in the stock of DoubleClick's more profitable rivals, ValueClick (NASDAQ:VCLK) and aQuantive (NASDAQ:AQNT), and perhaps even in unprofitable 24/7 RealMedia (NASDAQ:TFSM) as well.

For further Foolish news and views on DoubleClick, read:

Fool contributor Rich Smith owns no shares in any company mentioned in this article.