The code just keep giving me 6 or 8 independent of the position i'm trying to access.

Code:
var valueMatrix = 0;
var matrix = [[0,0],[0,0],[0,0]];
   matrix[0,0,0] = 1;
   matrix[0,1,0] = 2;
   matrix[0,0,1] = 3;
   matrix[0,1,1] = 4;
   matrix[1,0,0] = 5;
   matrix[1,1,0] = 6;
   matrix[1,0,1] = 7;
   matrix[1,1,1] = 8;   
   
   
function test() 
  {
    valueMatrix = matrix[0,0,0];
   alert(valueMatrix);
  }

I dont know how to solve this...

(sorry for my poor english)