I have a sofa bed that I am currently repairing. It has 3 sections of very thick foam (not the really springy light foam, the more solid heavy foam). The 3 sections used to be stuck together with cloth, but have now become detached. They have to be in 3 sections as when it's a sofa, they form the seat, backrest and sofa back. I can repair it, but have no idea what sort of glue would be best to stick the fabric to the foam - it needs to hold it very well. Any ideas??