The Internet: Distraction or salvation? It may depend on the computer maker.

Compaq Computer Corp., the ailing No. 1 personal computer company, saw its stock price sag today amid widespread reports that it is negotiating to sell its venerable AltaVista search engine, which would mean it is backing off from the World Wide Web. The Wall Street Journal reported today that Compaq hopes to get $2 billion to $3 billion for AltaVista from the Internet investment company CMGI Inc., which already owns 18 percent of another search engine, Lycos.

Reuters news service reported that an industry source said the companies had held talks, but had not reached a deal. Another source close to AltaVista said a deal was expected within days.

Meanwhile, Gateway 2000 Inc., the much healthier No. 3 personal computer maker, also suffered a stock drop after the Journal reported that the company was holding preliminary talks to buy EarthLink Network Inc., a fast-growing Internet service provider that has about 1.2 million customers.

All four companies declined to comment today, the second day of speculation and reports of impending deals. Still, the stocks of EarthLink and CMGI got a boost: EarthLink's rose $4 to close at $61.25, on top of a 20 percent gain Tuesday; CMGI stock rose $4 to close at $98.93 3/4.

"These moves make sense," said John Robb, an analyst at Gomez Advisers Inc. "Compaq hasn't moved down the Internet learning curve, and they're being spanked by Dell in their core business sales. They don't have the internal expertise to make AltaVista into a real consumer portal."

Glenn Powers, an analyst at Cruttenden Roth Inc., said: "Here's what the AltaVista deal is about. If you're a big company with billions in revenues like Compaq, are you going to get credit for the Internet effort you've made? If not, it makes more sense to monetize it."

Compaq previously had planned to spin off AltaVista while retaining control. As the prices of personal computers plummet ever lower, squeezing if not destroying profit margins, there's a virtue to being able to install a proprietary search engine on a manufacturer's machines. This would generate traffic on the site, which in turn would allow more to be charged for advertising.

Such a process takes time, however, and Compaq is in too much of a tailspin for that. In April, it ousted its chief executive, Eckhard Pfeiffer, and still hasn't found a replacement. During the first quarter, Compaq's share of the U.S. market dropped 2.1 percent against a surging Dell Computer Corp. and Gateway, according to the market research firm Dataquest. Last week Compaq said it would lose 15 cents a share in the second quarter, a much grimmer situation than analysts had been predicting.

Gateway has a closer link to consumers than Compaq, selling to them directly rather than through dealers. Gateway Chairman Ted Waitt also has made clear his intentions to make his company more than a personal computer maker or even a pure technology company. As for EarthLink, it needs alliances that would prevent it from being overwhelmed by the leading Internet service provider, America Online Inc.

Up for Sale?

Here are the companies involved in two possible

Internet deals:

Potential target Likely buyer Estimated price

AltaVista search CMGI, an Internet $2 billion

engine, now investment to $3 billion

owned by Compaq company

Computer

Earthlink Network, Gateway, No. 3 Unknown

a fast-growing personal-computer

Internet service maker

provider