James Eagan Holmes is scheduled to be arraigned Tuesday, March 12, on 166 felony counts in the July 2012 Colorado theater shootings.

By M. Alex Johnson, staff writer, NBC News

The judge in last year's Colorado theater shootings, in which 12 people died and 70 others were wounded, rejected the defense's request Friday that he strike down the state's law on insanity pleas.

Lawyers for James Eagan Holmes, 25, who's charged with 166 felony counts, filed motions last week signaling that they were considering entering a plea of not guilty by reason of insanity when he is formally arraigned next Tuesday. He is accused of storming a theater in Aurora showing the premiere of "Batman: The Dark Knight Rises" on July 20 and opening fire with an armament of legally acquired weapons.

Holmes' lawyers asked the judge to declare Colorado's insanity law unconstitutional and in violation of his Fifth Amendment protection from self-incrimination, arguing that it was unclear when a defendant may waive his right to remain silent and whether he must reveal confidential medical information.

In a lengthy ruling Friday (.pdf), Arapahoe County District Judge William Sylvester rejected all but one of Holmes' arguments, saying many had already been settled by Colorado's courts and that others were "dependent on hypothetical facts and circumstances" that weren't before the court.

Sylvester granted Holmes' request for a written explanation of the consequences of pleading not guilty by reason of insanity, which he attached to the ruling.

Defense documents made public Friday added weight to the supposition that Holmes plans to plead insanity, revealing for the first time that Holmes was hospitalized in a psychiatric ward in November for "several days, frequently in restraints."

The disclosure came in a new motion asking the court to make sure that Denver Health Medical Center, where Holmes was taken from the Arapahoe County jail by ambulance Nov. 15, preserved video it made of his treatment and observation.

The motion said that both prosecutors and defense attorneys had been denied access to the tapes, which it said were "necessary to effectuate Mr. Holmes' constitutional right to due process."

The Nov. 15 date is significant. Just two days earlier, Holmes was sent to the same hospital after he rammed his head into a wall at the jail — an incident that was publicly reported.

Prosecutors still haven't said whether they intend to seek the death penalty for Holmes. They have two months following next week's arraignment to declare their intentions.