The sunroof switch is a rocker switch, depending on which side of the switch one presses (front side or rear side) the switch closes the circuit to either the forward relay or the back relay. The direction of sunroof movement remains in play until the end of stroke as long as one has the switch pressed. If the sunroof glass has been opened & one presses the front side of the rocker switch the glass moves forward to the closed position, one releases the switch at the point the glass is closed to keep the glass closed, if one continues to hold down the front side of the switch the glass will open up to the vent position. The same control function takes place when retracting the glass to full open, when the glass goes to full open the glass stops moving, the load comes up on the motor circuit, no voltage is flowing, so both relays go open, this same action applies when the vent goes to fully open.