Twinkler Help

Anyone got any ideas of how to make this code i found do random multiple LEDs at time instead of just 1?

// LED twinkler: LEDs on pins 2 to 13. each with 470 ohams to ground pin
// Pot wiper to A0. ends to +5v and ground

int Pin = 0, Locpct = 0, activeLED = 0, onTime = 10, potPin = 0;

void setup(){
  // set pin mode and lights each led in sequance
  for(Pin = 2; Pin < 14; Pin++){
    pinMode(Pin,OUTPUT);
    digitalWrite(Pin,HIGH);
    delay(500);
    digitalWrite(Pin,LOW);
  }
}

void loop(){
  //only one random LED on at a time when pot is above center
  while(analogRead(2) <= 511){
     onTime = map(analogRead(potPin),0,511,2,100);
     activeLED = (random(2,14));
     digitalWrite(activeLED,HIGH);
     delay(random(onTime, onTime * 5));
     digitalWrite(activeLED,LOW);
  }
  // LEDs on and Off Randomly when pot is below center
  while(analogRead(potPin) > 511){
    onTime = map(analogRead(2),512,1023,100,2);
    digitalWrite(activeLED,HIGH);
    delay(random(onTime, onTime *5));
    digitalWrite(random(2,14),LOW);
  }
}

Change the code to have X amount of activeLEDs.
I recommend careful use of ctrl+c and ctrl+v.

Sorry it took so long to reply. I attempted what you said and i was unable to get it to work still. I did play around with the code and eventually with a couple of changes was able to get it to do what i wanted to.

Thank you for the help though.