Integer dropping for no apparent reason.

  if (analogRead(HoriPotVal) < 500) {

HoriPotVal is NOT a pin number.

  if (analogRead(VertPotVal) < 450) {

Neither is VertPotVal.