The first time thru the loop() function, delayValue = 500 and the while() loop will behave as expected. The second time thru the loop() function delayValue < 20 so the while() loop does not run. Try this instead of a while() loop...
for (delayValue=500;delayValue>=20;delayValue-=20) {
// yada yada
}