unset style/currentstyle property

Source Code

        function testCurrentStyle() {
            var zIndex = document.getElementById('test').currentStyle.zIndex;
            if (zIndex == 0) {
                alert('zIndex on unset currentStyle property is 0');
            }
            else if (zIndex == 0 || zIndex == "auto") {
                alert('zIndex on unset currentStyle property is auto');
            }
        }
        function testStyle() {
            var zIndex = document.getElementById('test').style.zIndex;
            if (zIndex === 0) {
                alert('zIndex on unset style property is 0');
            }
            else if (zIndex === 0 || zIndex == "") {
                alert('zIndex on unset style property is empty');
            }
        }