changing both texture images on a material

i have an object which has a diffuse detail material attached. i want to be able to change both the main texture and the detail texture at different times. how would i refer to each element to do so?
(the scenario is a car which changes colour on the main texture, but also gets dirtier on the detail texture

doorMaterial.mainTexture = doorColour[doorTexture];

this is the code i am using to change the car colour on the main texture

thanks

Use Material.SetTexture(). To know the name of a texture you will need to look at shader code used by the material. For builtin shaders take a look here.

The code for a material using Diffuse Detail would be:

doorMaterial.SetTexture("_Detail", detailTexture);