Finding the "coords" (x,y) position of an item in a multidimensional array

Is there a relatively easy way of finding the x,y position of an item in a multidimensional grid array?

I have this grid structure for drawing a map for a game. Number 2 is going to be the starting point of the player. How would i find the x,y position of that number in the array?

It’s currently at 2,2 within the array… but i want it to be dynamic.

[AS]
map[0] = new Array(1,1,1,1,1,1,1,1,1,1)
map[1] = new Array(1,0,0,0,0,1,0,0,0,1)
map[2] = new Array(1,0,2,0,1,0,0,0,1,1)
map[3] = new Array(1,0,0,1,1,1,0,1,1,1)
map[4] = new Array(1,0,0,0,1,0,0,0,1,1)
map[5] = new Array(1,0,0,0,0,0,0,0,0,1)
map[6] = new Array(1,1,1,1,0,1,1,1,1,1)
map[7] = new Array(1,0,0,0,0,0,0,0,0,1)
map[8] = new Array(1,0,0,0,0,0,0,0,0,1)
map[9] = new Array(1,1,1,1,1,1,1,1,0,1)
[/AS]

This is the code i have to draw the map.

[AS]
function drawIt(theMap) {
var pos = 0;
diameter = 72;
xOffset = 20;
yOffset = 15;
for (var y = 0; y<diameter; y++) {
for (var x = 0; x<diameter; x++) {
pos = x+(ydiameter);
if (theMap[y][x] == 0) {
root.attachMovie(“myTile2”, "tile"+pos, pos, {_x:x
diameter+xOffset, _y:ydiameter+yOffset});
} else if (theMap[y][x] == 1) {
root.attachMovie(“myTile”, "tile"+pos, pos, {_x:x
diameter+xOffset, _y:ydiameter+yOffset});
} else if (theMap[y][x] == 2) {
_root.attachMovie(“sprite”, “sprite”, 2, {_x:x
diameter+xOffset+35, _y:y*diameter+yOffset+35});
}
}
}
}
[/AS]