To local fans they might be the "Damn Yankees," but to Harrisburg and City Hall, the Phillies couldn't have hosted better guests than the likes of Alex Rodriguez, Derek Jeter, and Mark Teixeira.

And to Eagles loyalists, the Washington Redskins might be bumbling division rivals who at the very least deserved to lose, but state and city tax collectors saw a welcome shade of green in those burgundy uniforms.

That's because the New York Yankees, just by spending an autumn weekend in Philadelphia, probably chipped in well over $300,000 to the state and city treasuries in the form of income taxes.

And for playing Sunday's game in Philadelphia, Washington could be kicking in $100,000 more. The Vancouver Canucks could add a cool $40,000 for Thursday's NHL game against the Flyers, and the city and state may mine $40,000 more from the NBA's Denver Nuggets when they come to town for Monday's game.

As with cash-hungry governments all over the country, the city and both states have found pay dirt in the mega-salaries of professional athletes. Philadelphia, Pennsylvania and New Jersey - which hosts two "New York" football teams with generous payrolls - might have collected $40 million or more in income taxes from their sports teams and their visitors in 2008.

Revenue departments declined to disclose amounts. The Inquirer's estimates are based on analyses of the departments' complicated formulas for calculating the taxes and published reports of team salaries.

Neither the players nor the accountants who suffer the paperwork headaches of dealing with 20 states and several cities is terribly happy about what they see as tax lunacy.

"It's a painful issue for athletes," said Stephen Kidder, a former Massachusetts revenue commissioner who now is counsel to the Major League Baseball, NFL, and NHL players associations.

Athletes can recover substantial chunks of that money from state and federal tax breaks. And the taxing of jillionaires is unlikely to incite the populace to march on the halls of government with torches and pitchforks.

But some tax experts hold that the athletes are indeed victims.

"It's an inexcusable money grab," said William Ahern, policy director of the Tax Foundation in Washington. He argues that athletes are targeted because of their high visibility and even higher salaries.

The tax collectors maintain that athletes, just like everyone else, need to chip in for government services. Kidder said the athletes don't resent paying the levies, but do resent being singled out.

Complaints notwithstanding, the so-called jock tax is generating more revenue than ever, and Philadelphia, with four major sports franchises and one of the nation's highest wage-tax rates, has been a big winner.

Figures on amounts collected from visiting teams were unavailable. However, Pennsylvania, which has a flat 3.07 percent tax rate, said it took in $18.6 million last year from the state's seven MLB, NFL, NHL and NBA franchises and the teams they hosted.

Philadelphia, with its 3.499 percent nonresident and 3.930 percent resident rates, probably pulled in more than $10 million in wage taxes from professional athletes in 2008.

Perhaps as much as two-thirds of the state total came from Philadelphia, home of the Phillies, Eagles, 76ers and Flyers. Pittsburgh has no NBA franchise, and its baseball team has a paltry payroll.

Statewide, among the major pro leagues, the NFL was the biggest contributor at $7.28 million, thanks to the Eagles, the Pittsburgh Steelers, and the teams they hosted.

The Garden State has fewer big-league teams, but has the good fortune to be the home of the Giants and Jets, who play in the Meadowlands. Under New Jersey's graduated system, incomes of more than $500,000 are taxed at close to 9 percent. Thus, the state might well have collected more than $10 million from the Jets, Giants, and guests, not to mention the basketball Nets and hockey Devils.

Although the NFL plays far fewer games than the other leagues, it is a huge friend of the treasury because of high salaries and the "duty day" concept.

Theoretically at least, all wage-earners - rock stars, comedians, lawyers, electricians, even journalists - are required to pay taxes on wages earned in a town or state with an income levy.

Figuring out how much is earned in a given location is more art than science, however. Like most other taxing jurisdictions, Philadelphia tries to estimate the percentage of a salary earned in the city.

In the case of baseball, for tax purposes the earnings season for all teams is defined as the first day of spring training until the final game of the World Series, roughly 250 calendar days.

A player would be taxed for each "duty day," defined as any on which he participated in a game, practice or workout in Philadelphia. It would include travel and participation in certain special events. To get the percentage taxable, the duty days are divided by the total number of days in the season.

In 2008, a Phillies player would have paid state and local taxes on about 45 percent of his salary, based on an analysis by Brian J. Woods, vice president of Geier Financial Group, an accounting firm that represents Teixeira and Phillies closer Brad Lidge.

The Yankees likely were charged for five duty days for the three World Series games at Citizens Bank Park.

The Yanks' 2009 player payroll was estimated at a little more than $200 million, and the champs could have earned an additional $25 million in postseason shares. Salaries of the manager, coaches, staff, bat boy and executives also would be taxable.

In football, although the games are fewer, the duty day calculation is a tad heartier. The season typically is defined as the first day of training camp to the day of the Super Bowl, about 200 days.

For a home game, the Eagles might be taxed for six days in a given week, Kidder said, and the visiting team two days. So although the Eagles might play only 11 home games, including exhibition and postseason, an Eagle might have to pay city and state taxes on more than 60 duty days, about a third of his salary.

Kidder said that Philadelphia, a pioneer in the annals of the jock tax, is one of the nation's most aggressive collectors. Mike Muñoz, who runs the Revenue Collection Bureau, a collection agency in Mayfair retained by the city, concurred.

Muñoz said that visitors should compensate their hosts for services rendered. "It's only fair," he said. "We have to pay for police protection. We have to pay for trash collection."

Muñoz denied that Philadelphia targets athletes or any other group. Deputy Revenue Commissioner Frank Breslin said that in terms of amounts it pursues, the city has no minimum, but he acknowledged that it is not cost-effective to go after everyone.

Philadelphia entered the jock-tax sweepstakes in a major-league way in late 1992, when then-Mayor Edward G. Rendell ordered a collection crackdown.

California is credited with being the first jurisdiction to hit up visiting athletes. After the Chicago Bulls swept the Los Angeles Lakers in the 1991 NBA finals, the state informed the Bulls that they owed the state nonresident wage taxes.

Willie Randolph, former Yankees second baseman and New York Mets manager, recalled that the new wave of out-of-town taxes surprised players. They wanted to know, "What's up with that?" he recalled. Their viewpoint, he said, was, "We're in and out so fast, it's like we're not even there."

Philadelphia quickly became a major battleground in the jock-tax wars, Kidder said. He recalled meeting with the attorney the city had retained to go after delinquents. Kidder himself was determined not to become one of his targets.

"When I came to Philadelphia," he said, "I got him to write me a waiver letter."