Check out bitescrow.org it might be what you're looking for. It lets you set up a 3-party escrow where no one party can spend the funds from the escrow address without the cooperation of at least one of the other two parties. You can use it as-is from that site, or download the code from GitHub if you want to modify it or run it from your own site (or locally on an offline machine). The code is available at
https://github.com/mannkind/bitescrow.org