$(document).ready(function(){
	//paging();
});

function paging(){
	var totalPage = parseInt($('#totalPages').val());	
	//console.log("==totalPage=="+totalPage);
	var pag = $('#pagination').simplePaginator({
		totalPages: totalPage,
		maxButtonsVisible: 5,
		currentPage: 1,
		nextLabel: 'Next',
		prevLabel: 'Prev',
		firstLabel:'First',
		lastLabel: 'Last',
		clickCurrentPage: true,
		pageChange: function(page) {
		$("#content_load").html('<tr><td colspan="6"><strong><img src="images/loading.gif" width="50" height="50"></strong></td></tr>');
		/*var pcode = $('#pcode').val();
		var cmpname = $('#cmpname').val();
		var req_date = $('#req_date').val();
		var req_designs = $('#req_designs').val();
		var req_dies = $('#req_dies').val();
		var ord_designs = $('#ord_designs').val();
		var ord_dies = $('#ord_dies').val();
		var per_rec = $('#disp_rec').val();*/
            $.ajax({
				url:"ajax/load_data.php",
				method:"POST",
				dataType: "json",
				//data:{page:	page,pcode:pcode,cmpname:cmpname,req_date:req_date,req_designs:req_designs,req_dies:req_dies,ord_designs:ord_designs,ord_dies:ord_dies,per_rec:per_rec},
				data:{page:	page},
				success:function(responseData){
				//	alert(responseData.html);
					$('#content_load').html(responseData.html);
				}
			});
		}
	});
}
