92 Mazda Navajo headlight issues

After approximately twenty minutes of driving, my headlights begin to turn off and on. When the lights are off the high beams do not work. This cycle has repeated each day going to work and comming home. Have checked fuses and headlights. Wondering if the headlight switch is bad. The panel light brightness seems to gradually dim during the twenty minutes. Any suggestions would be greatly apreaciated. Thanks in advance.

Between the headlight switch and the headlights is the Dimmer/Flash-to-Pass switch. It could be your evil-doer.