Foley, Heasley advance to state tournament