Internet Explorer is broken when it comes to using getElementsByName
The name attribute should only be used to specify form fields that are to be submitted.
In the way you are attempting to use it, you will be much better served by using the class attribute instead.
I can’t seem to find any native function for working on class attributes though. I kind of expected there to be a getElementByClass(), but alas there is not. How could I implement a function that performs similar function to mine but IE compatible?