they sell products to treat thrush and fungus... just make sure you know which one your horse has. thrush treatment on fungus hooves will only make them worse! and dont get the products made to treat both... they have never worked for me.
Difference between fungus and thrush: If you swipe a hoofpick deep into fungus-infected tissue, it will smell "cheesy" like a yeast (Candida) infection. The back half of the frog peels off in deep layers, and the frog never becomes a wide, healthy triangle. The diseased tissue may be light gray in color; healthy frog is medium gray.
By comparison, thrush has a nasty, rotten smell, the tissue is black and slimy, and it tends to begin along the collateral grooves. Thrush is another wet-season problem.
if it's fungus, i've always had sucess with extra-strength Fungidye. also if you're willing to pay the extra expense, i'd suggest using Clean Trax from www.centaurforge.com (click on Hoof Care/Repair, then click Hoof Medications).
if it's thrush, i suggest Thrush-buster, but there are several other good products out there as well.