The correlation between spending and winning in the NBA: trends by year and by team

Money is the topic of the moment in the NBA, what with the unfortunate lockout and all. One relevant question is how much the budgets of different teams affect their abilities to win. The Lakers and Knicks, in the two biggest markets, can spend pretty much anything and still turn a profit. The Grizzlies and the Bobcats, not so much.

But how does spending correlate with winning for NBA teams?