var pagerClass={

	txtFirst	: "els&#337;",
	txtLast	: "utolsó",
	txtBack	: "el&#337;z&#337;",
	txtNext	: "következ&#337;",
	leftSepar	: "<<<",
	rightSepar	: ">>>",
	count		: 0,
	extraBar	: true,
	type		: 0,
	pageNum	: 10,
	url		: "",
	current	: 1,
	middleTag	: 5,

	pager_init : function  ( maxItem, itemsOnPage, currentPage, url ){
		this.count = maxItem;
		this.pageNum = itemsOnPage;
		this.current = currentPage;
		this.url = url;
	},

	getCode : function () {
		str = "";
		if (this.count > this.pageNum) {
			lastPage = Math.ceil( this.count / this.pageNum );
			if ( this.type == 0) {
				if ( this.extraBar && this.current == 1 && this.txtFirst != "") 	{ str +="<span class='pagerExtraInactive'>"+this.txtFirst+"</span>|"; }
				if ( this.extraBar && this.current == 1 && this.txtBack != "") 	{ str +="<span class='pagerExtraInactive'>"+this.txtBack+"</span>|";}
				if ( this.extraBar && this.current > 1 && this.txtFirst != "") 	{ str +="<span class='pagerExtraActive'><a href='"+this.getIndexUrl(1)+"'>"+this.txtFirst+"</a></span>|"; }
				if ( this.extraBar && this.current > 1 && this.txtBack  != "")	{ str +="<span class='pagerExtraActive'><a href='"+this.getIndexUrl( this.current-1 )+"'>"+this.txtBack+"</a></span>|";}
				ctMin = this.current - this.middleTag;
				ctMax = this.current + this.middleTag;
				if ( ctMin < 0 ) { ctMax += Math.abs(ctMin); ctMin = 1; }
				for ( i=1; i<lastPage+1; i++ ) {
					if ( this.middleTag != 0 && ( ctMin > i || ctMax < i ) ) continue;
					if ( i == this.current )  { str += "<span class='pagerInactive'>"+i+"</span>"; continue; }
					str +="<span class='pagerActive'><a href='"+this.getIndexUrl(i)+"'>"+i+"</a></span>";
				}
				if ( this.extraBar && this.current == lastPage && this.txtNext != "") 	{ str += "|<span class='pagerExtraInactive'>"+this.txtNext+"</span>";}
				if ( this.extraBar && this.current == lastPage && this.txtLast != "") 	{ str += "|<span class='pagerExtraInactive'>"+this.txtLast+"</span>";}
				if ( this.extraBar && this.current < lastPage && this.txtNext != "") 	{ str +="|<span class='pagerExtraActive'><a href='"+this.getIndexUrl(this.current+1)+"'>"+this.txtNext+"</a></span>"; }
				if ( this.extraBar && this.current < lastPage && this.txtLast != "")		{ str += "|<span class='pagerExtraActive'><a href='"+this.getIndexUrl( (lastPage) )+"'>"+this.txtLast+"</a></span>";}
			}
			else {

			}
		}
		str += "";
		return str;
	},

	getIndexUrl : function ( strInd ) {
		ret = this.url.replace(/II/, strInd);
		return ret;
	}
}