NEW YORK (Reuters) - In a time when chain smoking, off-color jokes and three-martini lunches have largely faded from the workplace, the holiday office party survives.

Revellers dance at an office Christmas party in London December 13, 2007. REUTERS/Finbarr O'Reilly

Despite being toned down amid a shaky economy, sensitized by sexual harassment cases and sobered by the dangers of drunk driving, those parties are a minefield of potential embarrassments and worse.

Hoping to keep bad behavior at bay, companies may host a party in an art gallery, perhaps during the day, with alcohol limited to beer and wine, experts say. Even the food has gotten healthier and the portions smaller.

“You want it to be fun. It’s always a balance between managing your legal risks and also having a fun party,” said Michael Johnson of Global Compliance, an ethics training and compliance firm.

Behind much of that conscience is the threat of legal liability, be it for employees driving home drunk or bosses harassing underlings, workplace experts say.

“There’s some obvious things, like I don’t think many clients are suggesting hanging mistletoe or suggesting, ‘Oh, let’s have a game of Twister,’ kind of obvious danger zones,” said Johnson.

Despite the pitfalls, almost 80 percent of companies throw holiday parties, a recent survey showed. The study, by executive search firm Amrop Battalia Winston, revealed that the number of companies having parties was down to its lowest level in 22 years to 79 percent, and two-thirds are restricted to employees only.

“Parties aren’t going away,” said Dale Winston of Battalia Winston, who noted they are less about entertaining clients and drumming up new business than rewarding employees.

But workers, when asked in another survey if they would rather receive a bonus than swill eggnog at an office party, overwhelmingly chose cash. The survey of 1,008 people for Randstad U.S., a worldwide staffing company, found 93 percent of respondents would ditch the year-end party for more money.

And with research showing companies are planning to spend no more than last year, it is more likely than not a company will host the festivities in its own building.

Although the office party may no longer be an alcohol-fueled extravaganza, it is still important to relax, mingle and have a good time, experts say.

“This is the last vestige where people can just show up, have a couple of glasses of wine and socialize,” said Winston.

The trick for a cringe-free party is to find a balance between fun and moderation, corporate behavior experts say. One drink, absolutely. More than two? No way.

“Too many people let loose,” said Barbara Pachter, a workplace behavior expert. “The bottom line is the holiday party is a business event, and people forget that.”

Another land mine to avoid is using the party as a moment to flirt with a colleague or make public an office romance.

“It’s not the time to flirt,” said Pachter. “If you are dating somebody at work and people don’t know it, that’s not the time to let your guard down, even if you’re snuggling all night.”