document.getElementById replacement

The following example shows current browser results as well as the correct results. Each button looks for the className property of the element with id "Test".

<div id="test" class="container1">
<div id="Test" class="container2">