Get (two-dimensional) array position

I found the tutorial about getting the index of something in an array, but i need the same for a twodimensional array, so i get [0][1] for example. How do i alter this code to do so?

Array.prototype.getIndex = function(data) {
 for (i=0; f=0; i<this.length; ++i; ) {
  if (this* == data) {
   return i;
  }
 }
 return -1;
}; 

maybe
Array.prototype.getIndex = function(dat) {
for (i=0; i<this.length; i++) {
for (j=0; j<this*.length; j++) {
if (this*[j] == dat) {
trace(i+" "+j);
}
}
}
};