Another possible solution
http://tchtechnology.com/products/gcfc/
The Grade Crossing Pro board from Logic Rail Technologies will do this if you hook it up with an on/off switch and no detectors.
http://logicrailtech.com