function listing_count(buffer, pageNo, totalPages, firstIndex, lastIndex, totalResults, totalMapSearchCount) { buffer.append('
'+str+'
'); buffer.append('');
if (pageNo > 1) {
buffer.append(' ');
} else {
buffer.append(' ');
}
buffer.append(' | ');
buffer.append('');
var minPage = pageNo - 5;
if (minPage <= 0) {
minPage = 1;
}
var maxPage = pageNo + 5;
if (maxPage > totalPages) { maxPage = totalPages; }
buffer.append(' | ');
buffer.append('');
if (pageNo < totalPages) {
buffer.append(' ');
} else {
buffer.append(' ');
}
buffer.append(' | ');
buffer.append('
\n');
buffer.append('| '); } listing_text(buffer, firstIndex + i, listings[i]); if (two_col == true){ buffer.append(' | '); if (i % 2 == 1 || i == listings.length - 1) { buffer.append('
\n');
buffer.append('