An excitation function of K− and K+ production in Au+Au reactions at the AGS