ALBANY - Three dozen homeowners facing foreclosure in Orange, Sullivan and Ulster counties will get a chance at relief under a program in which the state is buying nearly 400 delinquent mortgages to help borrowers and prevent more vacancies in areas hurt by the housing crisis.Under the state’s $7.6 million Community Restoration Fund, local nonprofits will work with the borrowers on modifying mortgage amounts and terms so they can keep their homes.