Пытался, но судя по всему моих познаний в JavaScript недостаточно...
var fleet = new Array(13);
fleet[0] = new Array( 202, 2000, 2000, 0 );
fleet[1] = new Array( 203, 6000, 6000, 0 );
fleet[2] = new Array( 204, 3000, 1000, 0 );
fleet[3] = new Array( 205, 6000, 4000, 0 );
fleet[4] = new Array( 206, 20000, 7000, 2000 );
fleet[5] = new Array( 207, 45000, 15000, 0 );
fleet[6] = new Array( 208, 10000, 20000, 10000 );
fleet[7] = new Array( 209, 10000, 6000, 2000 );
fleet[8] = new Array( 210, 0, 1000, 0 );
fleet[9] = new Array( 211, 50000, 25000, 15000 );
fleet[10] = new Array( 212, 0, 2000, 500 );
fleet[11] = new Array( 213, 60000, 50000, 15000 );
fleet[12] = new Array( 214, 5000000, 4000000, 1000000 );
fleet[13] = new Array( 215, 30000, 40000, 15000 );
for (var i = 0; i < 14; i++) {
document.getElementById('details' + fleet[i][0]).addEventListener('click', function() { check(fleet[i][0]) }, false);
}
var check = function(fleet) {
alert(fleet);
}
В FireFox(GM), выдаёт.
Error: fleet[i] is undefined
В Опере всё работает...