A quick romp through the TM Technical Library brings up this thread
http://www.trailmanorowners.com/foru...ad.php?t=13839
In it you will find a wiring diagram for the 2002 TMs. No guarantee that it corresponds exactly to the 1998, but it will be very close in all areas that matter in this discussion.
Download the manual, open it up, and proceed to page 34 (not numbered on the page, but right after page 33). On the lower left you will see the 7-pin Bargman connector that plugs into the tow vehicle. At the 11 o'clock position in the connector, you see the pin that brings 12 volt from the car to the trailer. The wire from this pin splits, going to the right to the TM battery (labeled simply "battery"), and to the left to the breakaway switch. The other side of the switch goes to a box labeled "brake". This box shows 3 wires going into it. The first (the wire to the right) goes to ground (white). The second, the wire at the top (blue) goes to the 7 o'clock position in the Bargman, which is where power from the brake controller in the tow vehicle comes in. The third wire is the one from the breakaway switch. Since the brakes have only two wires, I believe this is a drafting error, and the second and third wire should be connected together.
When you connect these two wires, you can see that the brakes can get power from either of two sources. The first is from the brake controller in the tow vehicle, the second is from the breakaway switch.
Aside from the drafting error, this diagram is pretty simple and clear in the area that concerns you, so understanding it should be straightforward. Unraveling the strange wiring in your TM may be less so. But spend some time studying it, and you should be able to do it.
You should probably start with the assumption that the blue wire is not "extra". It had a purpose, and the diagram should help you figure out what it was.
Bill