If you do it this way, it should only toggle the relay output when the button transitions from one state to another. That should eliminate the problem of infinite toggling that was present in my last suggestion.
Code:
// declare this as a global variable
bool LastButtonValue=0;
// place the following within the main loop
if(p1_sw_trig!=LastButtonValue)
relay1_fwd ^= p1_sw_trig;
LastButtonValue = p1_sw_trig;