Five years after Ed Kramar and his partners founded Cypress Electronics in Santa Clara, Calif., they knew that they needed more cash to expand their wholesale electronics distribution firm. They borrowed some money, then began casting about for a buyer, figuring that they would stay on or go, depending on who bought the company.

In 1985, Cypress agreed to be acquired for $4 million by Brajdas Corp., a public company based in Woodland Hills, Calif..

Kramar agreed to stay on as president and asked his lawyer to draft what is known in the world of mergers and acquisitions as an "earnout agreement."

Under an earnout agreement, the seller accepts a lump sum up front and more cash later, with the amount usually pegged to the company's future profits.

As small-business owners find venture capital and private funding sources more difficult to tap, financial advisers familiar with earnouts predict that they will greatly increase in popularity.

"An earnout fills the gap in price between the buyer and the seller," said Gary Mendoza, a lawyer who specializes in mergers and acquisitions for Riordan & McKinzie in Los Angeles.

In a well-drafted earnout, the buyer of a growing company benefits by having to put up less cash in the beginning.

The earnout agreement also keeps key people around for a few years, increasing the chance of a smooth transition.

Most earnouts serve as an incentive for the previous owners to work hard because future compensation is hinged to the company's profit.

Advisers caution that earnouts don't work for everyone, especially strong-willed entrepreneurs who would bristle at taking orders from new owners.

Because there are so many legal and accounting factors, an earnout agreement should be written by experts. The agreement should also include ways to undo the agreement if the deal doesn't seem to be working out.

"You should have an unwind provision that specifies whether the seller gets the company back -- and at what price -- if things don't work out," said Mendoza. "If you sold good goods, you don't want to buy back bad goods."

Kramar asked Brajdas to reduce his earnout agreement from three years to two because he was facing certain ethical dilemmas related to the future of the company's operations.

For example, Kramar said, he was torn between spending money to hire people and open new offices to bring in new business, or cutting back on expenses to improve profit.

If he cut expenses, he could increase the amount of money he would receive under the earnout agreement.

"But what might have been the best for me personally was not the best thing for the company," Kramar said.

Allan Klein, chief financial officer of Brajdas, said the ethical situation that Kramar was in illustrates a problem with earnouts.

The buyer must be careful to structure the deal so that the earnout does not interfere with the company's growth.

But overall, Klein said, Brajdas is pleased with the way the Cypress earnout has worked, especially since Kramar is still part of the management team three years after the earnout expired.

Kramar currently receives a salary and a percentage of the profits.

"We were very fortunate that the former owners wanted to be part of a growth scenario," said Klein, who was responsible for presenting the former owners with monthly financial reports.

Today, Cypress Electronics is one of three divisions of Brajdas, which had 1990 annual sales of $58 million and about 165 employees.

For Kramar personally, the first year after selling out was the hardest.

"Before the sale, if I wanted to spend $200,000, I just did it," he said.

After the sale, he had to ask the new president for his approval on major issues, although day-to-day operations were still up to him.

"If we had sold the company to a more hands-on person, I probably wouldn't have lasted more than a year," Kramar said.

Earnouts should be drafted by a skilled lawyer working with a good tax accountant. The accountant must consider all the tax ramifications of the lump sum payment and be sure the future compensation package is structured for the best tax advantages.

"Most earnouts are set up to last between two and five years," said Robert Untracht, the partner in charge of the diversified industries group at Ernst & Young in Century City.

Untracht, a lawyer and CPA, has structured several earnout agreements for big and small companies.

Even the most well-written agreements can end in disaster if buyers and sellers have different ideas about how to run the company.

There also tend to be more problems when the seller is given a big chunk of cash up front and a paltry compensation package.

With this approach, there is little incentive for the former owner to stay on and work hard for the company.

Untracht said earnouts work especially well for professionals, such as doctors or dentists, who want to bring in a young partner to take over the business.

"Don't sell your business the day you want to retire," said Untracht.

"Begin to get ready three or four years ahead."

Jane Applegate welcomes letters and story suggestions from readers. Please write to her at the Los Angeles Times, Times Mirror Square, Los Angeles, Calif. 90053.