Looks like others explained it above but i found this pretty helpful, I was doing the same thing:
http://arduino.cc/playground/Code/AvoidDelay