Some more details would be helpful.
There are three loops in your code. Which one are you having trouble with?
Assuming that it is this loop:
while(delayValue >=20){
delay(delayValue);
digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
What is the data type for delayValue? What is its initial value?