function vote(itemID)
{
	$('voteButton').hide();
	$('voteSelect').hide();
	
	var im = new Element('img', {id: 'im_loading', src: ini_imageweb + '/ajaxloadersmall.gif'});
	$('voteSelect').insert({before: im});
	
	new Ajax.Request(ini_ws + '?Page=Display&ajax=1&action=voteItem', {
		parameters: {
			itemID: itemID,
			vote: $F('voteSelect')
		},
		onSuccess: function(res) {
			res = res.responseText.evalJSON();
			$('im_loading').remove();
			if (!res) {
				$('voteSelect').show();
				$('voteButton').show();
			} else {
				$('currentVote').remove();
				$('voteSelect').insert({before: res});
			}
		}
	});
}

function addStar(itemID, status)
{
	markItem(itemID, status, 'star')
}

function markRead(itemID, status)
{
	markItem(itemID, status, 'read')
}

function markItem(itemID, status, type)
{
	$('lnk_markasun' + type).hide();
	$('lnk_markas' + type).hide();
	
	var im = new Element('img', {id: 'im_loading', src: ini_imageweb + '/ajaxloadersmall.gif'});
	$('lnk_markasun' + type).insert({before: im});
	
	new Ajax.Request(ini_ws + '?Page=Display&ajax=1&action=markItem', {
		parameters: {
			itemID: itemID,
			status: status,
			type: type
		},
		onSuccess: function(res) {
			res = res.responseText.evalJSON();
			if (res) {
				$(res.show).show();
			}
			$('im_loading').remove();
		}
	});
}
