Any individual detained pursuant to this act shall be entitled to the writ of habeas corpus upon proper petition by himself or a friend to any court generally empowered to issue the writ of habeas corpus in the county in which he is detained.
Idaho Code § 66-347