This summer, Illinois lawmakers legalized video gambling in bars and restaurants to raise funds for capital projects. Since then, more than a dozen communities in the western suburbs have banned the machines, and several more are poised to outlaw them before the end of this year. As many more towns weigh a gambling ban, however, the overall amount of revenue video gambling is projected to raise for the state — estimated at more than 25 percent of the $31 billion capital projects bill — has been put into doubt.