function recordsPerPageJS(formName, id)
{$('#campProvider').html($('#clientCamp').html());
	$('#campAcceptor').html($('#clientCamp').html());
	$('#acceptorRelation').html($('#clientCamp').html());
				$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
	//alert(formName);
	document.getElementById("paginationCurrentPage"+id).value = 1;
	document.getElementById("linksToDisplayPagination"+id).value = 0;	
	//document.getElementById(formName).submit();
	if($("#hiddenCreateCampaignForm"))
		$("#divDataFeedPost").html($("#hiddenCreateCampaignForm").html());
		
	$("form#"+formName).submit();
}

function linksToDisplayPaginationJS(pageSet, formName, id)
{
	$('#campProvider').html($('#clientCamp').html());
		$('#campAcceptor').html($('#clientCamp').html());
		$('#acceptorRelation').html($('#clientCamp').html());
					$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
	
	document.getElementById("paginationCurrentPage"+id).value = pageSet;
	//document.getElementById(formName).submit();
	$("form#"+formName).submit();
}

function usListPaginationJsPlugin(paginationCurrentPage, formName, id)
{
	$('#campProvider').html($('#clientCamp').html());
		$('#campAcceptor').html($('#clientCamp').html());
		$('#acceptorRelation').html($('#clientCamp').html());
		//alert($('#acceptorRelation').html());
					$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
	document.getElementById("paginationCurrentPage"+id).value = paginationCurrentPage;
	if($("#hiddenCreateCampaignForm"))
		$("#divDataFeedPost").html($("#hiddenCreateCampaignForm").html());
	//document.getElementById(formName).submit();
	$("form#"+formName).submit();
}

function linksPageSetJS(linksPageSet, linkCount, formName, id)
{$('#campProvider').html($('#clientCamp').html());
	$('#campAcceptor').html($('#clientCamp').html());
	$('#acceptorRelation').html($('#clientCamp').html());
				$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
	//alert(linksPageSet);
	document.getElementById("paginationCurrentPage"+id).value = linksPageSet * linkCount + 1;
	document.getElementById("linksToDisplayPagination"+id).value = linksPageSet;
	document.getElementById("linksPageSet"+id).value = linksPageSet;
	if($("#hiddenCreateCampaignForm"))
		$("#divDataFeedPost").html($("#hiddenCreateCampaignForm").html());
	//document.getElementById(formName).submit();
	
	$("form#"+formName).submit();
}

function resetLinksPageSet(id)
{$('#campProvider').html($('#clientCamp').html());
	$('#campAcceptor').html($('#clientCamp').html());
	$('#acceptorRelation').html($('#clientCamp').html());
				$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
	
document.getElementById("linksPageSet"+id).value = 0;
}

function resetPaginationJS(formName, id)
{			
	$('#campProvider').html($('#clientCamp').html());
		$('#campAcceptor').html($('#clientCamp').html());
		$('#acceptorRelation').html($('#clientCamp').html());
					$('#acceptorProvider').html($('#clientCamp').html());
				$('#providerAcceptor').html($('#clientCamp').html());
		
	document.getElementById("paginationCurrentPage"+id).value = 1;
	document.getElementById("linksToDisplayPagination"+id).value = 0;
	//document.getElementById("recordsPerPage"+id).value = 10;
	
	document.getElementById(formName).submit();
}

function submitPaginationFormJS(e,formName, id)
{
	$('#campProvider').html($('#clientCamp').html());

	$('#campAcceptor').html($('#clientCamp').html());
	
		$('#acceptorRelation').html($('#clientCamp').html());
		
			$('#acceptorProvider').html($('#clientCamp').html());
			
				$('#providerAcceptor').html($('#clientCamp').html());
			
	

	if(e.keyCode==13)
	{
		resetPaginationJS(formName, id);
	}
}
/*$(document).ready(function(){	
	//Press Escape event!
	$(document).keypress(function(e){	 
		if(e.keyCode==13){
		return false;			
		}
	});

});*/