Could I get some advice on Improving this coding please?

Hey dude, thanks for your reply.
Ok I found the blink without delay tutorial so I now understand what you are talking about. Though I still have some questions. From what I have read it isnt possible to get an arduino to do 2 things at once. (I seem to remember this being easy with a picaxe?) so I cant have it constantly checking the sensor whilst it is fading the leds? I always have to wait for it to finish a cycle?
I get what you mean with 'state' but for changing between would you recommend the goto command?

So do you suggest I break the cycles to become much smaller, as in have more intervals? so it checks more often?

I worked out I can dim the leds by having the common anode 5V input to the LED coming from another PWM pin that says mostly high. I am running out of PWM pins though! even the mega only has 14, so thats only enough for 3 RGBs. How easy is it to "join" 2 unos? Do you know of a tutorial anywhere?

Thanks again!