"; if (item.fileFormat != null) content += "
File Format: " + item.fileFormat + "
"; content += item.htmlSnippet.replace('
', '') + "
" + item.htmlFormattedUrl + "
" + "
"; document.getElementById("googleContent").innerHTML += content; } var totalPages = Math.ceil(response.searchInformation.totalResults / 10); var currentPage = Math.floor(start / 10 + 1); var pageControls = ""; for (var x = 1; x <= totalPages && x <= 10; x++) { pageControls += "
"; } pageControls += "
"; document.getElementById("googleContent").innerHTML += pageControls; }