The world is facing a housing crisis. About 100 million people on the planet are homeless, and 31% of the world's urban population lives in slums. Armed conflicts in many countries continue to damage communities and drive thousands of people into refugee camps, where housing is never adequate.

Some scientists think a common material that's usually thrown out with the trash could go a long way to solving the world's housing shortage.

Polystyrene foam - better known as Styrofoam - is most commonly seen in the form of a coffee cup. It's a great insulator, keeping hot foods hot and cold foods cold. But the material those cups are made of - basically, petroleum and air - can be put to use in a much larger way? building a house.

Hoot Haddock is the founder and owner of ThermaSave homes, an Alabama business that designs and builds houses out of foam panels. He explains that the foam is cut to size and 2 sheets of cement board are glued to either side, sandwiching the polystyrene inside. "You can get it as thick as you want it and it works just exactly like plywood," Mr. Haddock says.

Building a foam house is like erecting a giant puzzle. The panels - which can be as tall as 3½ meters -- are numbered, because they have to be put up in the right order. They're hoisted into place and connected using special fasteners.

Mr. Haddock says that's one of the panels' advantages over plywood. Unlike traditional "stick built structures" that have a row of nails every 1/2 meter, foam houses only have fasteners every 1 ¼ meters at the top and bottom.

Furthermore, it only takes about a week to erect the outer wall of a foam house. A standard construction of wood and drywall could take at least twice as long.

Architect Ed Bondurant works with Mr. Haddock and has built a foam house for himself. It looks like any other on the street -- it's painted blue, and has large windows under a long, slanted roof. The inside is stunning ? with high ceilings, a modern kitchen and hardwood floors, laid on top of 20-centimeter thick ThermaSave panels.

Anything exposed to the elements at all -- be it floor, roof or wall -- was constructed using the Styrofoam panels. That takes advantage of their insulating qualities, Mr. Bondurant explains, because foam tends to store heat, like during the day when the sun's shining, on it and then that would give you heat during the night. It stays about the same temperature in here all the time."

The panels are also sturdy enough to stand up to earthquakes, which make them a good building material for places like Afghanistan and Iraq. Hoot Haddock has seen it first-hand, in the first house he built, in 1984. "It's in Alaska," he says, "where we have the most earthquakes, we have more than in California, the highest winds in the country and, of course, we've got the heaviest snow loads. It's performing perfectly, there's no problems with it, and it's been performing perfectly for 20 years." His daughter still lives in it.

There's now scientific proof to back up his claims. Earlier this year, a two-story ThermaSave house underwent what's called a "shake-table test" ? basically, the structure was placed on a platform and shaken the way it would be during an earthquake. It passed with flying colors.

Rachel Jagoda, Project Manager for Housing Technology for the Federation of American Scientists, says that makes foam houses a natural for earthquake-prone regions, from the Andes to Afghanistan. "In Afghanistan, what they have used for thousands of years is adobe bricks to construct their homes. And those are incredibly unsafe in earthquakes. But if you have a panel home with some stucco coating it actually looks pretty close on the outside and inside to an adobe home."

Once the security situation in Afghanistan is stable enough, the Federation and ThermaSave will begin putting up new homes. Ms. Jagoda says the FAS and Mr. Haddock are also talking with development organizations about using the material for reconstruction in Iraq but, again, they'll have to find a way to overcome worries that a foam house will just fall apart.

The Federation of American Scientists thinks the technology could go a long way toward solving the affordable housing crisis here in the United States and is hoping to get more Americans interested in building foam panel houses. So, with help from the U.S. Department of Energy, it's building a model home in Houston -- with more planned for the future if all goes well.