Using setAttribute, you should be able to set any attribute on an element.
It appears that in IE, trying to set the style attribute does not work (even if you use the IE-only quirky third parameter set to 0).
This means that you cannot rely on what should be simple cross-browser code to set all style properties on an element in 1 go.
Running the test page in FF, Opera, or NN produces the same result - Test div 1 is positioned at 100, 100, and Test div 2 is positioned at 150, 150. This is what I would expect to see.
In IE, the setAttribute command doesn't seem to want to work on the style attribute, so only Test div 1 gets positioned correctly.