More on the subject: Obama advisor raises concerns
Update:
United States Code TITLE 36 > Subtitle I > Part A > CHAPTER 3
§ 301. National anthem
(a) Designation.— The composition consisting of the words and music known as the Star-Spangled Banner is the national anthem.
(b) Conduct During Playing.— During a rendition of the national anthem—
(1) when the flag is displayed—
(A) all present except those in uniform should stand at attention facing the flag with the right hand over the heart;
(B) men not in uniform should remove their headdress with their right hand and hold the headdress at the left shoulder, the hand being over the heart; and
(C) individuals in uniform should give the military salute at the first note of the anthem and maintain that position until the last note; and
(2) when the flag is not displayed, all present should face toward the music and act in the same manner they would if the flag were displayed.