var max = i = n = 0, a = document.getElementsByClassName("pdf"), b = [].slice.call(a, Math.floor(a.length/2)); for(; i < b.length; i++) (n = Math.max(a[i].scrollWidth, b[i].scrollWidth)) > max && (max = n);