Feel free to make suggestions or to use this code how you'd like.
One condition, please just tell me if you're using it, and if you have ideas for improvement, let me know
kenny[@t ]]]standsolid.com
function sanitizeZ(elements){ function sortByZIndex(a, b){ return a[1] - b[1]; } var tempZArray = new Array(); for(i in elements) tempZArray.push([i, elements[i].style.zIndex]); tempZArray.sort(sortByZIndex); for(i in tempZArray) elements[ tempZArray[i][0] ].style ['zIndex'] = i; }