<script type="text/javascript">
var Paginator =
{
    jumpToPage: function(pages)
    {
        var page = prompt("Enter a number between 1 and " + pages + " to jump to that page", "");
        if (page != undefined)
        {
            page = parseInt(page, 10)
            if (!isNaN(page) && page > 0 && page <= pages)
            {
                window.location.href = "?page=" + page;
            }
        }
    }
};
</script>
<span class="paginate-pages" onclick="Paginator.jumpToPage({{ pages }})" title="Page Jump">{{ pages }} Pages</span>
{% if show_first %}<span class="paginate-first"><a href="?page=1" title="First Page">&laquo;</a></span>{% endif %}
{% if has_previous %}<span class="paginate-previous"><a href="?page={{ previous }}" title="Previous Page">&lt;</a></span>{% endif %}
{% for num in page_numbers %}
  {% ifequal num page %}
    <span class="paginate-current" title="Current Page">{{ num }}</span>
  {% else %}
    <span class="paginate-link"><a href="?page={{ num }}" title="Page {{ num }}">{{ num }}</a></span>
  {% endifequal %}
{% endfor %}
{% if has_next %}<span class="paginate-next"><a href="?page={{ next }}" title="Next Page">&gt;</a></span>{% endif %}
{% if show_last %}<span class="paginate-last"><a href="?page={{ pages }}" title="Last Page">&raquo;</a></span>{% endif %}
