function pageData(countURL, countData, itemURL, itemData, pagingSize,carousel,callBackOBJ){
	/*-------------------------GLOBALS-------------------------*/
	
	if(!pagingSize){
		var pagingSize 	= 9;
	}
	var recordCount;
	var div_liCount;
	var currentPage;
	var currentRecord=0;
	var divCounter=0;
	var liContent;
	itemData.current=currentRecord;
	itemData.size=pagingSize;


	/*---------------------------------------------------------------*/
	
	getRecordCount();
	function getRecordCount() {
		var myAjax= new jQuery.ajax({
		   type: "GET",
		   url:countURL,
		   data:countData,
		   cache:true,
		   success: function(response){
			 recordCount = response;
			 div_liCount= Math.ceil(recordCount/pagingSize);
 			 carousel.size(div_liCount);
			 getTableData();
		   }
		 }
	 );
	}
	
	function getTableData() {
		itemData.current=currentRecord;
		if(divCounter<(div_liCount)){
			var myAjax = new jQuery.ajax({
							type: "GET", 
							url:itemURL,
							data:itemData,
							dataType:"json",
							cache:false,
							success: function(response) {
								currentDiv_li = response;
								liContent=callBackOBJ.callBackPager(currentDiv_li);
								carousel.add(divCounter,liContent);
								divCounter+=1;
								currentRecord+=pagingSize;	
								getTableData();
							}
						});
		}else{
			callBackOBJ.callBackAfter(carousel);
		}
	}
}

