<script type='text/javascript'>
	function changePage(e)
	{
		var charCode;
		if(e && e.which)
		{
			charCode = e.which;
		}
		else if(window.event)
		{
			e = window.event;
			charCode = e.keyCode;
		}
		if(charCode == 13)
		{
			var bs = $("#page_bs").val();
			bs = parseInt(bs);
			if ( isNaN(bs) )
				bs = 1;
			document.location.href='<?=$this -> _link;?>?bs='+bs;
		}
	}
	function changeNumerRows()
	{
		var num = $("#rows").val();
		num 	= parseInt(num);
		if ( isNaN(num) )
			num = 1;
		document.location.href='./?r='+num;
	}
</script>
<div id='pagin'>
		<div id="info">
			Rekordy: <?=$this -> _start;?> - <?=$this -> _end;?> z <?=$this -> _total;?>
    </div>
    <div id="pagings">
			Liczba rekordów:
			<select name='rows' onChange='changeNumerRows();' id='rows' class="select">
				<option value='5' <? if ( $this -> _limit == 5 ) echo "selected='selected'";?>>5</option>
				<option value='10' <? if ( $this -> _limit == 10 ) echo "selected='selected'";?>>10</option>
				<option value='25' <? if ( $this -> _limit == 25 ) echo "selected='selected'";?>>25</option>
				<option value='50' <? if ( $this -> _limit == 50 ) echo "selected='selected'";?>>50</option>
				<option value='100' <? if ( $this -> _limit == 100 ) echo "selected='selected'";?>>100</option>
			</select>
      <?
      if ( $this -> _bs > 1 )
      {
        ?>
        <a href='<?= $this -> _link;?>?bs=1' title="pierwsza" class='arrow'><i class="icon-left-max"></i></a>
        <a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs - 1 );?>' title="poprzednia" class='arrow'><i class="icon-left"></i></a>
        <?
      }
      else
      {
        ?>
        <a class='arrow inactive'><i class="icon-left-max"></i></a>
        <a class='arrow inactive'><i class="icon-left"></i></a>
        <?
      }
      ?>
        <input type='text' value='<?= $this -> _bs;?>' class="input-text center" id='page_bs' onKeyPress='changePage(event)'>
      <?
      if ( $this -> _bs < $this -> _ls )
      {
        ?>
        <a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs + 1 );?>' title="następna" class='arrow'><i class="icon-right"></i></a>
        <a href='<?= $this -> _link;?>?bs=<?= $this -> _ls;?>' title="ostatnia" class='arrow'><i class="icon-right-max"></i></a>
        <?
      }
      else
      {
        ?>
        <a class='arrow inactive'><i class="icon-right"></i></a>
        <a class='arrow inactive'><i class="icon-right-max"></i></a>
        <?
      }
      ?>
    </div>
</div>