Most of the laws we have now are based on the ten commandments. While it is a religious document it is also a legal document by which we base our laws today. It is totally right and appropriate that we have them in public courthouses, if nothing else, for its historical context.
Yes, the ten commandments are permissible in public buildings, because the ten commandments are historical literature. It would be no different than putting up a statue honoring Dante's Inferno, or Robert Frost. The ten commandments are an historical document, and it is only fair to honor them, beacuse they are such a part of American heritage and culture.