With states struggling to stretch their budgets, lawmakers have begun to float the idea of legalizing online gambling. While that may be great news for poker fiends, the possibility also strikes fear into casinos' hearts.

Consider Atlantic City, New Jersey, where the casino business has suffered in recent years. MGM Resorts (NYSE: MGM) decided to sell its share of the Borgata hotel and casino, while co-owner Boyd Gaming's (NYSE: BYD) chose not to exercise its right of first refusal to buy MGM's stake. Las Vegas Sands (NYSE: LVS) opened a casino in neighboring Pennsylvania last year, and new and proposed casinos in Philadelphia could further threaten Atlantic City's traffic.

As if that weren't enough of a headache, State Sen. Ray Lesniak has now proposed legalizing online gambling in New Jersey. This controversial proposal would give the state 20% of online gambling revenue generated within its borders, which might amount to $50 million or so.

A national push
Rep. Barney Frank (D-Mass.) has similarly championed legalized online gambling in the House of Representatives, arguing that adults should be free to gamble online if they want to. Because of current laws, any Americans gambling online generally do so through companies based outside the U.S. Proposed legislation would bring that business back into the country. Meanwhile, Rep. Jim McDermott (D-Wash.) wants to tax online gambling revenue, which could generate more than $40 billion over the coming decade, according to the Joint Tax Committee.

Win-win-Wynn
While casino operators stand to lose some business to online gambling, such legislation might allow them to profit off their own online offerings. Like other online operations, virtual casinos have little overhead, easy scalability, and potentially high profit margins. Casino operators could even offer benefits and rewards tied to their brick-and-mortar properties, driving additional traffic there.

In addition, since online gambling is easier to access, it may draw more gamblers, and perhaps more frequent ones. A study in Canada found that online gamblers spent an average of nearly $10,000 Canadian apiece annually, compared to just over $500 Canadian for gamblers who stay offline. In the U.S., the percentage of college-age males engaging in online gambling has risen from 4.4% in 2008 to 16% in 2010.

Several members of the casino industry are already positioning themselves to profit. The Foxwoods Development Company is partnering with an online gaming company, and Harrah's has already launched online casinos in areas where such gambling is currently regulated.

The benefits of newly legalized online gambling could even spread beyond U.S. borders. In China, Macau is currently a bigger gambling destination than Las Vegas. If China approves online gambling, big operators there such as Melco Crown Entertainment (Nasdaq: MPEL) could benefit.

In gambling as in many other facets of business, change is clearly in the air -- and companies that don't keep up with changes may end up left behind.

Don't gamble on your investments. For great stock ideas, get the Motley Fool's free report, 5 Stocks the Motley Fool Owns ... and You Should Too.