function initPager(id, pagesCount, changePagecallback){
	var activePagerColor = "#002E60";
	var disabledPagerColor = "#DCDED5";
	if (pagesCount>1){
		jQuery("#"+id+" .pagesCount").html(pagesCount);
		jQuery("#"+id+" .currentPage").val(1);
		jQuery("#"+id+" .back").click(function(){
			var cpage = parseInt(jQuery("#"+id+" .currentPage").val());
			var pages = parseInt(jQuery("#"+id+" .pagesCount").html());		
			if (cpage==1){
				return;
			}
			var npage = cpage-1;
			jQuery("#"+id+" .currentPage").val(npage);

			if (npage>1){
				jQuery(this).css("background-color",activePagerColor);
			}else{
				jQuery(this).css("background-color",disabledPagerColor);
			}
			if (npage<pages){
				jQuery("#"+id+" .fvd").css("background-color",activePagerColor);
			}else{
				jQuery("#"+id+" .fvd").css("background-color",disabledPagerColor);
			}

			if (typeof(changePagecallback)=="function"){
				changePagecallback((cpage-1));
			}				
		});
		jQuery("#"+id+" .fvd").click(function(){
				var cpage = parseInt(jQuery("#"+id+" .currentPage").val());
				var pages = parseInt(jQuery("#"+id+" .pagesCount").html());
				if (cpage==pages){
					return;
				}
				var npage = cpage+1;
				jQuery("#"+id+" .currentPage").val(npage);
				if (npage>1){
					jQuery("#"+id+" .back").css("background-color",activePagerColor);
				}else{
					jQuery("#"+id+" .back").css("background-color",disabledPagerColor);
				}
				if (npage<pages){
					jQuery(this).css("background-color",activePagerColor);
				}else{
					jQuery(this).css("background-color",disabledPagerColor);
				}

				if (typeof(changePagecallback)=="function"){
					changePagecallback((cpage+1));
				}				
		});		
		jQuery("#"+id).show();
	}
	if (typeof(changePagecallback)=="function"){
		changePagecallback(1);
	}
}
