function hasScrollbar() { var root = document.compatMode=='BackCompat'? document.body : document.documentElement; return root.scrollHeight>root.clientHeight; } function loadNextPage() { var formData = $('#pagination form:last').serialize(); if (formData) { $('#pagination').html('
'); $.ajax({ type: "POST", url: $('#search_form').prop('action'), data: formData, dataType: 'html', success: function(data) { var body = $(data); $('#pagination').remove(); $('#main_results').append('