Cut the whole track into four sections, top, upper bridge, bottom, lower bridge. Make each section know which other two it connects to. So from the right side of the top section, you can only move to the bottom bridge section.

At least that's the way I would do it.