i'm using getElementById() function to get the <img> in the document.... these <img> are the array of the images.... while using the getElementById() in javascript, it always returns 'null'

html code
Code:
Ex... <img name=sameName> <img name=sameName> <img name=samename>
I think by keeping the same name <img> will be treated as array of images...

using Javascript code,
Code:
   var obj;
   var iTotalImg = ...; // this is calculated

   for (i = 0; i <iTotalImg; i++)
	{
	    obj = document.getElementById("sameName[" + i + "]");
	    obj.src =  imgList[i];
	    //obj will always be 'null'
	}
always, 'obj' object is 'null'... what is wrong in my code...??

Cheers!
VB