It's actually pretty simple. Just wire the hid ballasts with a relay, since they are on all the time when the lows are activated you don't need a complicated harness. With cars like the 04 impreza the lows will NOT come on when the highs are activated, that would be pointless and I have not seen one car with separate lows and highs do that.
For the high beams. Simply tap into the high beam connectors. Wire them directly to the solenoids with a diode.
What will happen now is when you hit the highs in the middle of the day the halogen highs come on and the solenoids of the fx projectors activate-but since the hids are not on they won't come on, only the solenoids move... which is perfectly fine.
When the lows are on and you activate high beams the same thing happens except this time hid highs and halogen highs activate.
This way you save your hids from being flashed on when they are off and you can still have ftp. If you want to avoid the solenoid activating because it bothers you, you would have to make a much more complicated circuit. I'd just do it like I said to keep it simple.
Aside: Since our cars are ground switched even bugeye owners can wire them up like this very easily. I have my highs only coming on when the lows are already on. If I try to flash them in the middle of the day the solenoid activates but that's all!