About analogWrite

Always post your code in code tags NEVER quotes.

Each time you complete the switch loop is called again and these two lines are executed.

analogWrite (MOTORA, 100);
  analogWrite (MOTORB, 100);

Get rid of them and all the delay()'s.

Mark