Canceling year-end parties is a hot holiday trend. But Yahoo executives, even as they prepared to put 1,500 employees on the street this week, greenlighted a bash for the troubled Web giant which took place Saturday. The theme: gambling. Appropriate!

Why is CEO Jerry Yang all smiles in these pictures with employees, some of whom he's about to lay off? Well, he's losing his job, too — as soon as the company finds a replacement. (The search is going so poorly that the company may end up tapping a board member out of sheer expediency.) Perhaps that sense of impending loss has allowed the company's billionaire founder to chum around so convincingly with rank-and-file Yahoos at a suburban racetrack south of San Francisco, dolled up to look like a poor imagining of Las Vegas.

The smiles and parties are part of Yahoo's problem. Remember that this company, which started as a collection of links Yang kept online, grew to be worth $100 billion and emerged from the dotcom bust without peer among Internet portals. Back then, a company mandate to embrace fun made up for long hours spent crushing rivals.

But Yahoo is now worth a sixth of its peak price, and its culture has since turned into a toxic parody of the kind of public-school self-esteem programs Garry Trudeau once mocked in Doonesbury. Work and achievement aren't properly celebrated at Yahoo. Instead, just showing up to work seems to be what counts. To keep up with Google, Yahoo lavished salary hikes and raises on employees; it now has an uncomfortable number of the overpaid and underworked. Long before the economy turned sour, Yahoo needed to cut back a good quarter of its workforce. As gloomy as the prospect of its coming layoffs are, Yahoo will still have too many employees. But its shareholders paid millions to throw them a party anyway.

More shots of Yahoo's last hurrah are on Flickr, the photo site whose employees surely wish it wasn't owned by Yahoo.

(Photo of Yang with employee by zhouyaoji, group shot by remfan)