Every elected or appointed village official, officer, Clerk, Attorney, accountant and the like who shall be sued in their official capacity for authorized acts performed in behalf of the village shall be indemnified by the village as against any judgments and the like obtained against them, and the village shall authorize payment for such defense against any such lawsuits brought against them in such official capacity, notwithstanding that such lawsuits shall have been brought against such person both in his official capacity and privately. The village may, in the discretion of the Board of Trustees, establish a reserve fund for the purposes herein contained.