NEW YORK - Millions of people were left reeling in the aftermath of the whipping winds and heavy rains of the massive storm Sandy on Tuesday as New York City and many parts of the eastern United States struggled with epic flooding and extensive power outages.The storm killed at least 40 people, including at least 18 in New York City, and insurance companies started to tally billions of dollars in losses.Sandy, which crashed ashore with hurricane-force winds on Monday near the New Jersey gambling resort of Atlantic City, was the biggest storm to hit the country in generations. It swamped parts of New York's subway system and lower Manhattan's Wall Street district, closing financial markets for a second day.Businesses and homes along New Jersey's shore were wrecked and communities were submerged under floodwater across a large area. More than 8 million homes and businesses in several states were without electricity as trees toppled by Sandy's fierce winds took down power lines. Across the region, crews began the monumental task of getting power back on.The storm reached as far inland as Ohio and caused thousands of flight cancellations. Cellphone outages also were widespread.Parts of West Virginia were buried under 3 feet (1 meter) of drifting snow from the storm.Some East Coast cities like Washington, Philadelphia and Boston were spared the worst effects from Sandy and appeared ready to return to normal by Wednesday. But New York City, large parts of New Jersey and some other areas will need at least several days to get back on their feet. "The devastation is unthinkable," New Jersey Governor Chris Christie said after seeing pictures of the New Jersey shore.The storm interrupted the US presidential campaign just a week before the Nov. 6 election. The damage it caused raised questions about whether polling places in some hard-hit communities would be ready to open by next Tuesday.Seeking to show he was staying on top of a storm situation that affected a densely populated region, the White House said President Barack Obama planned to tour damaged areas of New Jersey on Wednesday accompanied by Christie.The New Jersey governor, who has been a strong supporter of Republican presidential challenger Mitt Romney, praised Obama and the federal response to the storm."New Jersey, New York in particular have been pounded by this storm. Connecticut has taken a big hit," Obama said during a visit to Red Cross headquarters in Washington.Obama issued federal emergency decrees for New York and New Jersey, declaring that "major disasters" existed in both states.Power outages darkened large parts of downtown Manhattan. A large blaze destroyed more than 80 homes in New York City's borough of Queens, where flooding hampered firefighting efforts. "To describe it as looking like pictures we've seen of the end of World War Two is not overstating it. The area was completely leveled. Chimneys and foundations were all that was left of many of these homes," New York Mayor Michael Bloomberg said after touring the area.Neighborhoods along the East and Hudson rivers in Manhattan were underwater, as were low-lying streets in Battery Park near Ground Zero, where the World Trade Center once stood. Lower Manhattan could be without power for four days.One disaster modeling company said on Tuesday that Sandy may have caused up to $15 billion in insured losses. That would make it the third-costliest hurricane on record, behind hurricanes Katrina, which laid waste to New Orleans and the Gulf Coast in 2005, and Andrew, which devastated parts of Florida in 1992.That figure did not take into account residential flood losses or flooding of tunnels and subways, meaning ultimate insurance claims could rise higher still.Campaigning put on holdObama and Romney put campaigning on hold for a second day. The campaign truce was likely to be short-lived, as Romney planned to hit the trail again in Florida on Wednesday. Obama appeared likely to resume campaigning on Thursday for a final five-day sprint to Election Day.Obama faces political danger if the government fails to respond well, as was the case with predecessor George W. Bush's botched handling of Katrina. Obama has a chance to show not only that his administration has learned the lessons of Katrina but that he can take charge and lead during a crisis.All along the East Coast, residents and business owners found scenes of destruction."There are boats in the street five blocks from the ocean," said evacuee Peter Sandomeno, one of the owners of the Broadway Court Motel in Point Pleasant Beach, New Jersey. "That's the worst storm I've ever seen, and I've been there for 11 years."Sandy, which was especially imposing because of its wide-ranging winds, brought a record storm surge of almost 14 feet (4.2 meters) to downtown Manhattan, well above the previous record of 10 feet (3 meters) during Hurricane Donna in 1960, the National Weather Service said.Water poured into the subway tunnels under New York City. Bloomberg said the subway system, which normally carries over 5 million people each weekday, would likely be closed for four or five days."Hitting at high tide, the strongest surge and the strongest winds all hit at the worst possible time," said Jeffrey Tongue, a meteorologist for the weather service in Brookhaven, New York.Hurricane-force winds as high as 90 miles per hour (145 km per hour) were recorded, he said. "Hopefully it's a once-in-a-lifetime storm," Tongue said.The US Department of Energy said more than 8 million homes and businesses in several states were without electricity due to the storm."This storm is not yet over," Obama told reporters at the Red Cross as he warned of the dangers of continued flooding, downed power lines and high winds. Obama, possibly mindful that disgruntled storm victims could mean problems for his re-election bid, vowed to push hard for power to be restored.The flooding hampered efforts to fight a massive fire that destroyed more than 80 homes in Breezy Point, a private beach community on the Rockaway barrier island in the New York City borough of Queens.New York University's Tisch hospital was forced to evacuate more than 200 patients, among them babies on respirators in the neonatal intensive care unit, when the backup generator failed.Besides the deaths in New York City, others were reported in New York state, Massachusetts, Maryland, Connecticut, New Jersey, Pennsylvania, Virginia and West Virginia. Toronto police also recorded one death - a woman hit by flying debris. Sandy killed 69 people in the Caribbean last week.US government offices in Washington were due to reopen on Wednesday after two days. Schools were shut up and down the East Coast but were due to reopen on Wednesday in many places.US stock markets were closed on Tuesday but exchanges are expected to reopen on Wednesday.The storm weakened as it plowed slowly west across southern Pennsylvania, its remnants situated between Pittsburgh and Philadelphia, with maximum winds down to 45 mph (72 kph), the National Hurricane Center said.As Sandy converged with a cold weather system, blizzard warnings were in effect for West Virginia, western Maryland, eastern Tennessee, eastern Kentucky and western North Carolina.Garrett County in Maryland had as much as 20 inches of heavy, icy snow that knocked out power to almost three-quarters of the area's 23,000 customers."It's the biggest (October snowstorm) that I remember and I've been here 25 years," said area resident Richard Hill, who planned to huddle by his wood stove.