//Functionability for the Tabination and Pagination of Spawnpoint 4.5
function tabPage(origination, filter, where, what, size, page, count, extra) {
	toUpdate = where + "_content";
	toUpdate = document.getElementById(toUpdate);
	toUpdate.innerHTML = "<div class=\"throbber\"><img src=\"http://static.spawnpoint.com/img/reg_load.gif\" border=\"0\"></div>";

	if (origination != null) {
		var target;
		for (var i = 1; i < 20; i++) {
			target = document.getElementById(where + "_link_" + i);
			if (target)
				target.className='';
			else
				break;
		}
		origination.className = "active";
	}
	
	AjaxRequest.get(
		{
			'url':'/ajax.php'
			,'parameters':{ 'filter':filter, 'what':what, 'size':size, 'page':page, 'count':count, 'where':where, 'extra':extra }
			,'onSuccess':function(req) { tabPageCallback(req, toUpdate); }
		}
	);
}
function tabPageCallback(req, where) {
	where.innerHTML = req.responseText;
	
}
