Corporate executives have nightmares like this:

On Aug. 11, 1983, federal agents descended on the Memphis offices of William B. Tanner Co., a firm that acts as an agent bartering radio and television commercial time for goods and services. The feds sealed off the building, armed with a search warrant that alleged that top executives and employes of Tanner -- including its chairman, William B. Tanner -- had taken kickbacks, bribed customers with cash, made women available for sex with clients and evaded income taxes. The warrant was supported by an FBI agent's affidavit.

For Media General Inc., the Richmond media conglomerate that had bought Tanner Co. for $39.5 million 15 months earlier, the nightmare was real. Media General quickly disassociated itself from the alleged acts of its subsidiary and Tanner. It insisted that it had no knowledge of any wrongdoing, even actions that may have occurred under its corporate nose.

In the 18 months since, Media General has had to try to rebuild and restore the image of a subsidiary it once considered one of its more promising. Another company might have tried to sweep the incident under the rug, letting federal officials handle any prosecution while trying subtly to upgrade its own image. But Media General tackled the problem head on.

Not waiting for the government to file formal charges -- FBI agents are still going through documents in the division's offices, according to Media General, and a federal grand jury in Memphis has been hearing evidence related to Tanner's operation for 18 months -- the company has pursued Tanner aggressively, slapping him with a $190 million lawsuit in federal court in Memphis. The suit alleges that Tanner tried to defraud Media General by misrepresenting his company when he sold it and by allegedly covering up illegal acts. Similar allegations are made in a $47 million lawsuit filed by Media General in a Tennessee state court.

Tanner, who has maintained his innocence all along and held a press conference last March to threaten Media General with a countersuit, could not be reached to be interviewed for this story. He has delayed having to respond formally to the allegations by filing a variety of motions to dismiss Media General's suits, but his Washington lawyer, Peter Van N. Lockwood said last week, "I can assure you that when, as and if we are required to answer, we will deny" the allegations. Lockwood said counterclaims against Media General would likely be included in any formal response to the charges.

Media General also has sued Touche Ross & Co., the major accounting firm that prepared Tanner's books and assured Media General at the time of the sale that all was in order. The suit contends that Touche Ross failed to uncover Tanner Co.'s alleged wrongdoing and demands $75 million in damages. Touche Ross denies the allegations.

In addition to going on the legal offensive, Media General has been trying to rebuild its subsidiary's reputation in the broadcast industry. Renamed Media General Broadcast Services (MGBS), the division has moved its headquarters to New York, reshuffled top management and many other key positions, smoothed over problems with clients -- many of whom were named in either the company's lawsuit or the affidavit accompanying the federal search warrant -- and embarked on a $1 million ad campaign in trade publications that boasts, "Under New Management."

But while they estimate that the notoriety has cost the business about one-third of its pre-raid revenue of $100 million, Media General executives say the controversy has been "a blessing in disguise," allowing them to restructure the division to operate more efficiently than if nothing had happened.

"Even given the current pain and the cost, which is very large . . . we've been thrice blessed by the discovery of everything that we've said in our lawsuits," says James A. Linen IV, senior vice president of Media General with responsibility for MGBS and the company's other broadcast and newsprint operations. "We've learned that we had a better business without Bill Tanner than we would have had with him."

William B. Tanner Co. got its start as a maker of musical jingles for radio stations. When some stations had trouble paying for the jingles, they gave the company advertising time in exchange for the station-identification ditties.

That created a new business for the company, which was purchased by long-time executive Tanner in the mid-70s. Building up a bank of unused commercial time, it began trading that time to advertisers for goods and services, which were then either sold or bartered for more time.

It was a good deal for all concerned: The stations got their jingles, or, in later years, cash and merchandise (for some, the money received for promised air time provided badly needed cash flow, while the merchandise could be used as prizes in on-air giveaways). Tanner Co. got commercial time at a rate usually half of what it would have cost. And advertisers, in turn, got that time at cut-rate prices -- with Tanner Co. earning its profit on the difference, plus whatever it could make reselling or trading the goods and services -- and a commission to boot.

In advertising, such barter arrangements are not uncommon. But nobody did it better than William B. Tanner. Crowned the "Sultan of Swap" in a 1982 Fortune magazine profile, his company was considered to be the biggest and most successful in the time-bartering business. The flamboyant Tanner was a big man in Memphis, living in a $600,000 house with $2 million worth of furniture and a wardrobe of 400 suits; driving a fleet of pricey automobiles; throwing lavish parties, and occasionally, according to the Fortune article, sending a limousine escorted by a pair of motorcycle patrolmen to pick up key clients at their hotels.

Tanner Co.'s success caught the eye of executives of Media General. They were looking for a fast-growing, profitable business to add to the company's extensive holdings of broadcast stations, electronic data systems, newspapers -- including The Richmond News Leader and Times-Dispatch -- and newsprint mills.

"We thought the company had a great deal of potential, and we still think so -- it's an interesting field," says Alan S. Donnahoe, Media General's chief executive officer at the time of the acquisition, who has since retired.

Media General paid Tanner $39.5 million for his company, and kept him on the payroll as president at a salary that, including perks, came to nearly $1 million a year.

Media General executives say they exercised the required "due diligence" in evaluating Tanner Co. before they bought it. In addition to a clean bill of health from Touche Ross, they had favorable recommendations from officials at a number of major companies and ad agencies -- many of whom, some Media General executives now say privately, may have been benefitting from Tanner's alleged schemes. "Media General relied to a significant degree on the opinions of agency and client officers, at high levels, who later turned out to be not in a position to give an unbiased account," an industry source says.

"In hindsight, we were naive about some parts of Bill's operation -- there's no question about it," Linen says. But he said the company could find no obvious problems, and thought any suggestion of problems was attributable largely to Tanner's colorful, freewheeling style. "If there was no fire where the smoke was, there still would have been that smoke, because that was some of the smoke that Bill created," Linen says.

But, according to the allegations contained in Media General's lawsuits and the affidavit accompanying the federal search warrant, there was a lot of fire.

In the FBI agent's affidavit, Tanner Co. was said to be "engaged in the practice of making payoffs as a normal procedure in the day-to-day operations."

The affidavit, based on interviews with former Tanner employes and others, said these payoffs to clients were kickbacks or bribes, paid in cash, automobiles and other merchandise -- even in sex. According to the affidavit, Tanner also kept a hidden inventory of commercial air time -- said to be worth as much as $83 million -- as well as a large inventory of merchandise that also did not appear on the company's books. The affidavit also alleged that Tanner kept "turnaround" accounts that funneled money back from the company for his personal use. Some of the biggest names in American consumer products, including STP Corp., Thomas J. Lipton Inc. and Mrs. Paul's Kitchens Inc., were mentioned in the affidavit as companies whose employes allegedly took payoffs.

The charges rocked Memphis, the advertising and broadcasting industries, and Media General. There was no suggestion in the FBI's filing that Media General had any idea of what was alleged to be going on at its subsidiary, and indeed, Media General officials say the first they knew of any problems was when the FBI raided Tanner's offices.

Still, Media General had to deal with the problem. Tanner took a leave of absence from the company -- he would later be fired -- and Media General went on the offensive, setting up an investigative team that reported to a Richmond law firm rather than company management. "Damage control was all we could do at first," Linen says. "We made a decision to be very up-front about it at a time when we had no basis for concluding there was anything to the government's charges."

"As we well know, chief executive officers often go under cover when this sort of thing happens," Donnahoe says. "We don't believe in that."

The company exposed itself to a second wave of adverse publicity with its lawsuit against Tanner and other former officials of the unit last March. In addition to repeating some of the information in the government's case, Media General alleged in the federal suit that Tanner had furnished it with false financial information; undervalued Tanner Co.'s inventory of such items as Speidel watches, Ben Hogan golf putters and Bic razors; and received income "through artifice and scheme" for services that had never been delivered by the company. Media General further claimed that Tanner had "secret compensation agreements" with many employes, and used company funds for his personal needs.

Media General's federal suit also alleged that Tanner tapped his company's phones and bugged some of its offices, took kickbacks and made bribes even after Media General had bought the company, and destroyed or fabricated documents after the federal search warrant had been issued.

Media General also said that Tanner had put most of his extended family on the payroll, many in nonexistent jobs. Media General officials say Tanner had at least 20 relatives on the company's books, including his ex-wife Pearline, who was being paid $40,000 a year as a promotional consultant to the company.

(Pearline Tanner, in a separate lawsuit against her ex-husband, says she had "no earthly idea" of what she was supposed to be doing for the company, and alleges that she was hired under a "sham contract" designed to reduce Tanner's alimony payments to her. Pearline Tanner, who was divorced by Tanner 2 1/2 years before he sold the company, claims that Tanner had told her "that he had no money," and as a result she claims she was "shocked" when he sold Tanner Co. for $39.5 million. She is asking for $30 million in damages from her ex-husband.)

In yet another lawsuit stemming from the case, Media General alleges that Touche Ross failed to examine Tanner Co.'s books adequately.

"Touche Ross had or should have had intimate knowledge of the company and its operations," the suit claims. "Touche Ross supplied false information and failed to exercise reasonable care or competence in obtaining and/or communicating the said false information." In its response, Touche Ross said Tanner apparently had not made all the information available to the accountants. In any case, it said, Media General's accountants had reviewed Touche Ross' work before the purchase and found no discrepancies.

Media General's complaint in federal court alleges that Tanner and his associates had given assurances that all the information they furnished Media General at the time of the sale was true. Media General said it "would not have entered into the purchase agreement or purchased the stock in the absence of any one of the representations and warranties made by the defendants." The complaint alleged that Tanner and the other defendants engaged in a "scheme to defraud Media General," and said the company had suffered $40 million in actual damages and $50 million in damage to its reputation. The suit also asks for $100 million in punitive damages.

"The suit was filed with deadly serious purpose," Linen says. "Had we done it just to indicate that we wanted to get as far away from Bill Tanner as we could, we would have filed it earlier. . . . We intend to recover very serious money."

The lawsuits renewed the publicity over the case, publicity that was already costing the division millions of dollars in business, company officials said. "I can't say you'd file a lawsuit as a marketing strategy," Linen says. "There's no question that $25 to $35 million worth of business is not around that was around two years ago" -- to say nothing of any potential business that was scared off.

Media General had to reorganize its division and rebuild its client base and reputation. "The first job was to preserve that portion of the client base and that business that we wanted to preserve," Linen says. One of the company's earliest moves was to distribute to employes and clients a set of ethical guidelines to which the company would adhere.

A new management team, led by L. Donald Robinson, former president of Katz Independent Television, began reorganizing the division's operations.

Tanner had run the company basically as a "one-man show," according to Linen, with virtually all parts of the sprawling firm reporting to him. Media General installed a more formal, layered management structure. It also cut the number of employes from 450 to about 335, through resignations, firings and some layoffs (not to mention the departure of Tanner's relatives).

For the first time, the division published a merchandise catalogue, setting concrete rates for all of its transactions. Media General says it found that Tanner sometimes gave different exchange rates to different customers. "We never put prices on it before," Robinson says. "We'd negotiate whatever you got at the time. The guy who didn't have much could get screwed. . . . Now we publish prices. Everybody gets the same thing."

Perhaps the most ticklish task for Media General was wooing back clients who had been implicated in the affidavit accompanying the search warrant or the lawsuits. Most have returned, according to Robinson and Linen, although the company had to make some concessions to make good on some advertising commitments Tanner had made that did not appear on the books. In most cases, the company has been able to negotiate settlements with the clients, company officials said. But one, Lipton, has filed suit against Media General demanding full payment of Tanner's obligations. (Lipton also has sued some of its own former employes who were said in the FBI affidavit to have accepted kickbacks from Tanner.)

The move to New York, nearer the advertising and broadcast communities, also has helped restore the company's image, as did the "Under New Management" ad campaign, which stressed Media General's corporate reputation and financial strength.

MGBS is taking tentative steps into new fields, working on a pilot for a syndicated television program it hopes to barter to stations in return for advertising time, and applying a sophisticated new software system to the company's complicated advertising-time bookkeeping needs. With all the changes, Linen expects the division to be back to pre-raid revenue by the end of 1986.

"The damage control stage is over now," Linen says. "We're now in crisis management and building for the future."

Media General never expected, when it bought what appeared to be a thriving operation in 1982, to have to rebuild it. But company executives concede that what they sometimes refer to as "the incident" has caused make needed changes they might otherwise not have made.

"It in effect expedited the reorganization job," Donnahoe says, though he also says, "I think I would have preferred to do it in a gentler fashion and a little less notorious fashion."

"In two or three years, we'll have a better business than we would have had had there been no problem and Bill Tanner had continued to manage it . . . because we've been able to bring modern management techniques to it," Linen says. "It's the classic blessing in disguise."