The law , known as the Safe Harbor for Exploited Youth Act , will divert children under the age of 18 who have been arrested for prostitution into counseling and treatment programs , provided they agree to aid in the prosecution of their pimps .