

function BxBlgVote (iEntryId, iVote, iPlace)
{
	var $this = this;

	var h = function (r)
	{		
		var o = new BxXmlRequest('','','');			
		var ret = o.getRetNodeValue (r, 'ret');
		
		if ('err' == ret)
		{
			alert ('Voting error');
		}
		else
		if ('login' == ret)
		{
			showLoginForm();
		}
		else
		if ('dup' == ret)
		{
			alert ('Duplicate vote');
		}
		else
		{
			$('entry_vote_' + iEntryId).innerHTML = ret;
		}

		return false;
	}	
	
	var sAction = 'xml_vote';
	if ('comment' == iPlace)
		sAction = 'xml_vote_comment';

	new BxXmlRequest (aBxConfig['urlRoot'] + "blog/" + sAction + "/?id=" + iEntryId + '&vote=' + iVote + '&place=' + iPlace + '&date=' + (new Date()), h, true);

	return false;
}


