You might try window.getComputedStyle() on the element:
https://developer.mozilla.org/en/DOM/window.getComputedStyle
var e = document.getElementById('mydiv');
var value = window.getComputedStyle(e[0], null)['zIndex']
I got these values: "auto", "10". After changing: z-index: 10, position: relative.