var LIC_ajax_in_progress = false;
function LIC_click_link(e, wanted) {
	if (LIC_ajax_in_progress) return false;
	if (typeof(Prototype)=='undefined') return false;
	var id = Element.identify(e);
	wanted = (id.startsWith('lic-prev-link-') ? wanted-1 : wanted+1);
	var target = (id.startsWith('lic-prev-link-') ? id.sub('lic-prev-link-', '') : id.sub('lic-next-link-', ''));
	var container = 'lic-ajax-target-' + target;
	LIC_ajax_in_progress = true;
	new Ajax.Updater(
		{ success: container },
		'/wp-content/plugins/latest_in_category.php?ajax',
		{
			parameters: { page: wanted, target: target },
			method: 'post',
			evalScripts: true,
			onComplete: function(request) {
				LIC_ajax_in_progress = false;
			}
		}
	);
}