function findHighestZIndex(elem) {
    var elems = document.getElementsByTagName(elem);
    var highest = 0;
    for (var i = 0; i < elems.length; i++) {
        var zindex = document.defaultView.getComputedStyle(elems[i], null).getPropertyValue("z-index");
        if ((zindex > highest) && (zindex != 'auto')) {
            highest = zindex;
        }
    }
    return highest;
}
/* Function for finding the highest z-index */
Function for finding the highest z-index
Function for finding the highest z - index
function findHighestZIndex(elem) {
    var elems = document.getElementsByTagName(elem);
    var highest = 0;
    for (var i = 0; i < elems.length; i++) {
        var zindex = document.defaultView.getComputedStyle(elems[i], null).getPropertyValue("z-index");
        if ((zindex > highest) && (zindex != 'auto')) {
            highest = zindex;
        }
    }
    return highest;
}
function findHighestZIndex ( elem ) { var elems = document . getElementsByTagName ( elem ) ; var highest = 0 ; for ( var i = 0 ; i < elems . length ; i ++ ) { var zindex = document . defaultView . getComputedStyle ( elems [ i ] , null ) . getPropertyValue ( "z-index" ) ; if ( ( zindex > highest ) && ( zindex != 'auto' ) ) { highest = zindex ; } } return highest ; }
Function for finding the highest z-index
Function for finding the highest z - index