Just need another set of eyes to sees this it almost works!

I have a script that when the use types in their name, it is to pick a random name from the list. Problem is, it isn’t picking random exactly I get a lot of repeats and sometimes it just comes up undefined.

Here is the script does any one have any ideas of what is wrong?

if (combobox.getSelectedIndex() == 0)
{
txt2.text = “Female Name”;
female.play();
var myArrayb = [“Angel”,“Avenging Angel”,“Batgirl”,“Big Red”,“Brain Storm”,“Brain Wave”,“Brimstone”,“Caribbean Queen”,“Chameleon”,“Constrictor”,“Copperhead”,“Cri mson Dynamo”,“Crimson Fox”,“Crystal”,“Cybergirl”,“Cypher”,“Darkhawk”,“Da rkstar”,“Doctor Alchemy”,“Doctor Destiny*”,“Doctor Fate*”,“Doctor Phosphorus”,“Dyna Girl”,“Dynamo”,“Electro Girl”,“Electron”,“Elektra”,“Element Girl”,“Firebird”,“Firefly”,“Firehawk”,“Flamebird”, “Flying Fox”,“Four Winds”,“Fusion”,“Gazelle Girl”,“Gem Girl”,“Gemini”,“Golden Archer”,“Golden Eagle”,“Golden Glider”,“Hawkgirl”,“Hawkwoman”,“Heat Wave”,“Heavy Metal”,“Helix”,“Hydra”,“Icewoman”,“Invisible Woman”,“Isis”,“Jade”,“Jade Dragon”,“Jetstream”,“Jubilee”,“Karma”,“Lady Blackhawk”,“Lady Dragon”,“Lara Croft”,“Madame Xanadu*”,“Magenta”,“Mantis”,“Miss Marvel”,“Mist”,“Moondragon”,“Muse”,“Mystique”,“Neu tron”,“Nightcrawler”,“Nighthawk”,“Northwind”,"Nova ",“Oberon”,“Obsidian”,“Omega Red”,“Pantha”,“Phantom Girl”,“Phantom Lady”,“Phanton Eagle”,“Phoenix”,“Pisces”,“Plastique”,“Polaris”,“P rism”,“Quasar”,"Quicksilver ",“Rainbow Raider”,“Raven”,“Reactron”,“Red Bee”,“Red Dragon”,“Red Eye”,“Red Fox”,“Red Guardian”,“Red Queen”,“Red Racer”,“Red Raven”,“Red Shadows”,“Red Star”,“Red Trinity”,“Redhawk”,“Redstarr”,“Rogue”,“Sailor Moon”,“Shadowcat”,“Shadowdragon”,“Shockwave”,“Silv er”,“Silver fox”,“Silver Swan”,“Silversword”,“Skyhawk”,“Snowbird”,“Solarr”, “Songbird”,“Sphinx”,“Spiderwoman”,“Storm”,“Stretch girl”,“Sunspot”,“Tempest”,“The Brain”,“The Orchid Queen”,“Thunderbird”,“Thunderbolt”,“Tigra”,“Tigres s”,“Titania”,“Trinity”,“Tsunami”,“Whirlwind”,“Whit e Queen”,“White Witch”,“Wildcat”,“Wildfire”,“Wind Warrior”,“Yellow Claw”,“Zatanna”];
myalenb = myArrayb.length;
}
else
{
var myArrayb = [“Acro-Bat”,“Airboy*”,“Airwalker”,“Andromeda”,“Anti-Matter Man”,“Aqualad”,“Aquaman”,“Astro Boy*”,“Atlas”,“Atom Boy”,“Atomic Knight”,“Batman”,“Big Red”,“Black Knight”,“Black Lightning”,“Blue Shield”,“Blue Streak”,“Brain Storm”,“Brain Wave”,“Brimstone”,“Bronze Tiger”,“Captain Atlas”,“Chameleon”,“Chemistro”,“Chronos”,“Cobra Kid”,“Constrictor”,“Copperhead”,“Crimson Commando”,“Crimson Dynamo”,“Crimson Fox”,“Daredevil”,“Dark Matter”,“Dark Phoenix”,“Darkhawk”,“Darkman”,“Darkstar”,“Dash”,“D efender”,“Diamondback”,“Doctor Alchemy”,“Doctor Destiny*”,“Dragon King”,“Dragon Man”,“Dynamo”,“Eclipso”,“Electron”,“Firebird”,“Fir ehawk”,“Flamebird”,“Flash”,“Four Winds”,“Golden Archer”,“Golden Eagle”,“Golden Gladiator”,“Golden Glider”,“Graviton”,“Green Arrow”,“Green Lantern”,“Hawkman”,“Heat Wave”,“Iceman”,“Iridium Man”,“Iron Fist”,“Iron Man”,“Jade Dragon”,“Jetstream”,“King Shark”,“Kobra”,“Lava Man”,“Lightspeed”,“Lizard King”,“Magneto”,“Man-Bat”,“Manta”,“Mantis”,“Mister Atom”,“Mister Element”,“Mister Miracle”,“Moondragon”,“Nebula Man”,“Neutron”,“Nightcrawler”,“Nighthawk”,“Northwi nd”,“Phoenix”,“Plantman”,“Plastic Man”,“Polaris”,“Prism”,“Professor X”,“Quicksilver “,“Rainbow Raider”,“Red Bolt”,“Red Condor”,“Red Crow”,“Red Fire”,“Red Flame”,“Red Fox”,“Red King”,“Red Knight”,“Red Lightning”,“Red Mantra”,“Red Mask”,“Red Panther”,“Red Racer”,“Red Talon”,“Red Tornado”,“Redguard”,“Redhawk”,“Redstarr”,“Robin”,” Robotman”,“Rocket Red “,“Shadowcat”,“Shadowdragon”,“Shockwave”,“Silv er Samurai”,“Silver Surfer”,“Silversword”,“Skyhawk”,“Skywalker”,“Takio n”,“Teen Titan”,“The Bionic Man*”,“The Brain”,“The Bug Man”,“Thunderbird”,“Tigorr”,“Timber Wolf”,“Titan”,“Titan of Myth”,“Titanium Man”,“Tsunami”,“Viper”,“Volcano Man”,“Zero G”];
myalenb = myArrayb.length;
txt2.text = “Male Name”;
male.play();
}
var myArraya = [””, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”];
myalen = myArraya.length;
var myString = firstname.text;
myString.toUpperCase();
myArray = new Array(myString);
var i = (Math.random()*10);
while (i < myString.length)
{
cnt = ord(myString.charAt(i));
gnt = int(gnt) + cnt;
++i;
}
totn = gnt / i;
totalx = totn / myalen;
totnx = Math.ceil(Math.ceil((totalx - Math.floor(totalx)) * 200) / 200 * myalen);
txtone = myArraya[totnx];
totnxb = Math.ceil(Math.ceil((totalx - Math.floor(totalx)) * 200) / 200 * myalenb);
txtoneb = myArrayb[totnxb];
my.txt.txt1.text = txtoneb + " " + txtone;
gnt = 0;