I am writing a page that collects serial numbers for parts installed in an assembly. I want to validate the user input on the client-side, if I can.

So if I have multiple dense arrarys, how can I refer to them using a varaiable? For instance, say I have three densely packed arrays who's names represent part numbers, and who's values represent serial numbers (that have been consumed in other assemblies).

```
arr_PN-123-ABC = ('SN0123','SN0124','SN0125')
arr_PN-456-DEF = ('SN00333','SN00334','SN00335')
arr_PN-789-GHI = ('SN-0001','SN-0002','SN-0003','SN-0004')

function fcnValidateSN(_givenPN, _givenSN) {

  //make sure the given values are not null or empty...

  //derive the array of serial numbers that coorsponds to the given part number...
  var vArrName = "arr_" + vGivenPN;

  //loop thru the array of serial numbers to determine if the given sn was already used...
  for(var x=0; x < vArrName.length(); x++) {
    if(vArrName[x]==_givenSN) {
      alert("Serial number '" + _givenSN + "' was already used in another assembly.");
      theForm.txtPN.focus();
      return;
    }

  } //end 'for' loop

} //end fcnValidateSN()

```

So the problem is that 'vArrName' is a string with a value of 'arr\_' instead of a refernece to an array who's name is 'arr\_'.

I tried wrapping it with the eval() function, but eval() treats dashes as minus signs.

One other note: I cannot use jquery for this effort.

Thank you