What would cause the tail lights and headlights to blink off and on sporatically on a Ford truck?

bad headlight switch.