Code explanation please!

maxTiles = 20;
cardsMatched = 0;
map = new Array();

function sortByWeight(a,b) {
if (a[1] > b[1]) {return 1;}
else if (a[1] < b[1]) {return -1;}
else {return 0;}
}
for (var i=0; i<maxTiles; i++) {
map* = new Array(i, Math.random());
}
map.sort(sortByWeight);

// insert tiles
for (var i=0; i<maxTiles; i++) {
_root[“tile”+i].pics.gotoAndStop(map*[0]+1);
//_root[“tile”+i].pics.gotoAndStop(i+1);
_root[“tile”+i].itemNumber = Math.floor(map*[0] / 2);
}

can someone please tell me what (map*[0]+1); in the inserting tiles does? i dont quite understand arrays. pics is a movieclip that contains different images on each frame.

also can you explain the last line of code coz i dont understand it at all?!

Thanks!!