
var populateTopComplete = function (o)
{
	var nav = document.getElementById("topJournalsContent");
	while (nav.firstChild) {
		nav.removeChild(nav.firstChild);
	}	
	
	var html = o.responseText.replace(/\r|\n/g, '');

	$("topJournalsContent").innerHTML = html;
}

function populateTopJournals(rows, offset, sport, user, edit)
{
	callback = {
		success:populateTopComplete,
		failure:responseFailure,
		argument:args 
	};
	
	var args2 = "rows=" + rows
	if (sport > 0) {
		args2 = args2 + "&sport=" + sport;
	}	
	if (user > 0) {
		args2 = args2 + "&user=" + user;	
	}	
	if (offset > 0) {
		args2 = args2 + "&offset=" + offset;
	}
	
	connObj = $C.asyncRequest("POST", TOP_JOURNALS_URL, callback, args2);
}