You are right. On a 1997 Civic, the Main Relay is located on the passenger's side, next to the kick panel. Over time, cold solder joints on the circuit board form, due to different coefficients of expansion for components, circuit board, and solder. Solder, being the weakest, gives way. Some people have been successful in resoldering their relays. To do the job properly, all joints need to be "desoldered" first. Without the proper tools, this is more difficult than you would think. Since this is a critical electrical system component, that is notorious for being problematic, I would buy a new one.
Here's approximately what they cost:
Advance Auto Parts http://www.partsamerica.com/ProductL...ection%20Relay RockAuto.com http://www.rockauto.com/catalog/x,ca...6,partGroup,78