Onsale Inc. agreed to buy competing online retailer Egghead.com Inc. for about $400 million in stock for one of the Internet's largest sellers of computer equipment, electronics and software. Menlo Park, Calif.-based Onsale would pay 0.565 of a share, or about $12.70, for each Egghead.com share. The combined company would operate under the Egghead.com name and Web address and have an estimated $500 million in sales this year. It would hold auctions under the Onsale name. Rather than continue battling each other for market share, the retailers want to pool their financial resources behind the better-known Egghead.com name. Onsale sells items such as computers and sporting goods that the company buys at a discount. Liberty Lake, Wash.-based Egghead.com, which once operated a chain of retail computer stores, now sells all of its computers and software online. Together the companies have about 3 million visitors monthly to their Web sites. On Nasdaq, Egghead.com shares fell 31 cents to close at $11.75, and Onsale shares fell $1.50 to close at $21.