Notwithstanding any other provision of this article or Article 3 (commencing with Section 76200), the board of supervisors that has established a Courthouse Construction Fund or a Criminal Justice Facilities Construction Fund pursuant to the provisions of this chapter may, by resolution, provide for the transfer of excess deposits from such a fund to the county general fund for the purposes of meeting the public safety or emergency medical services needs of the county, provided that any transfer pursuant to this section shall not interfere with the purposes for which
the fund was created or impair any obligations of the fund and shall not occur until the need for courthouse construction or the construction of criminal justice facilities has been met.