function ListAwardsClass(pagejspfElementId, awardsElementId, numRecPageElementId, selectedPageElementId, numberPagesElementId, goToPageElementId, queryConditionCategory, initiativeCodeElementId,contexPath, pointValue, categoryElementId, fromPointsElementId, toPointsElementId, returnPageElementId) 
{   
  var _listAwards = this;
  
  this.pagejspfElementId = pagejspfElementId;
  this.awardsElementId = awardsElementId;
  this.numRecPageElementId = numRecPageElementId;
  this.selectedPageElementId = selectedPageElementId;
  this.numberPagesElementId = numberPagesElementId;
  this.goToPageElementId = goToPageElementId;
  this.initiativeCodeElementId = initiativeCodeElementId;
  this.queryConditionCategory = queryConditionCategory;
  this.contexPath = contexPath;
  this.pointValue = pointValue;
  this.categoryElementId = categoryElementId;
  this.fromPointsElementId = fromPointsElementId;
  this.toPointsElementId = toPointsElementId;
  this.returnPageElementId = returnPageElementId;
  
  this.updatePage = function(pageToGo, numRecPage) 
  {
	var awardsElement = document.getElementById(_listAwards.awardsElementId);
	var url = this.contexPath + "/includes/" + this.pagejspfElementId + UIObj.addJSessionId();
	
	var handleFailure = function(oResponse)
	{
	  UIObj.setUIMessage('Errore ajax: ' + oResponse.status, null, false);
	  UIObj.displayLoader(false);	
	}
		
	var handleComplete = function(oResponse)
	{	  
	  UIObj.endWait();
	}
	
	new Ajax.Updater(
	  awardsElement, 
	  url, 
	  { 
		method: 'post', 
		onFailure: handleFailure,
		onComplete: handleComplete,
		parameters: 
		{
		  numRecPage: numRecPage,
		  displayPage: pageToGo,
		  queryConditionCategory: this.queryConditionCategory,
		  initiativeCode: this.initiativeCodeElementId,
		  contexPath: this.contexPath,
		  pointValue: this.pointValue,
		  category: this.categoryElementId,
		  fromPoints: this.fromPointsElementId,
  		  toPoints: this.toPointsElementId,
  		  returnPage: this.returnPageElementId
		}, 
		evalScripts: true 
	  }
	);  
  }
  
  this.numRecPageChange = function() 
  {
	UIObj.startWait();  
	var selectedPageElement = document.getElementById(_listAwards.selectedPageElementId);
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = parseInt(selectedPageElement.value);	
	var numRecPage = parseInt(numRecPageElement.value);
	
	_listAwards.updatePage(pageToGo, numRecPage);
  }
  
  this.goToPageChange = function() 
  {
	UIObj.startWait();
	var goToPageElement = document.getElementById(_listAwards.goToPageElementId);
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = parseInt(goToPageElement.value);
	var numRecPage = parseInt(numRecPageElement.value);
	
	_listAwards.updatePage(pageToGo, numRecPage);
  }
  
  this.firstPage = function() 
  {
	UIObj.startWait();
		
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = 1;
	var numRecPage = parseInt(numRecPageElement.value);
	
	_listAwards.updatePage(pageToGo, numRecPage);	  
  }
  
  this.prevPage = function() 
  {
	UIObj.startWait();
    
	var selectedPageElement = document.getElementById(_listAwards.selectedPageElementId);
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = parseInt(selectedPageElement.value) - 1;
	var numRecPage = parseInt(numRecPageElement.value);
		
	_listAwards.updatePage(pageToGo, numRecPage);
  }
  
  this.nextPage = function() 
  {
	UIObj.startWait();
	
	var selectedPageElement = document.getElementById(_listAwards.selectedPageElementId);
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = parseInt(selectedPageElement.value) + 1;
	var numRecPage = parseInt(numRecPageElement.value);
	
	_listAwards.updatePage(pageToGo, numRecPage);
  }	  
  
  this.lastPage = function() 
  {
	UIObj.startWait();
		
	var numberPagesElement = document.getElementById(_listAwards.numberPagesElementId);
	var numRecPageElement = document.getElementById(_listAwards.numRecPageElementId);
	var pageToGo = parseInt(numberPagesElement.value);
	var numRecPage = parseInt(numRecPageElement.value);
				
    _listAwards.updatePage(pageToGo, numRecPage);
  }
}
