// deprecated in favor of burning-questions.js effective 10/05/2009
function addVote(questionID, updateID) {
	var url = 'bquestionsvote.cfm?questionID='+questionID+'&voteaction=add';
	
	submitVoteRequest(url, updateID);
	
	return false;
}

function subtractVote(questionID, updateID) {
	var url = 'bquestionsvote.cfm?questionID='+questionID+'&voteaction=subtract';
	
	submitVoteRequest(url, updateID);

	return false;
}

function submitVoteRequest(url, updateID) {

	new Ajax.Request(url, {
			method: 'post',
			onSuccess: function (t) {
				$(updateID).update('Thanks for the feedback!');
			},
			onCreate: function (t) {
				$(updateID).addClassName('bQuestionVote');
				$(updateID).update('<img src="http://www.vat19.com/webimages/generic/ajax-loader-small.gif" border="0"> Sending vote...');
			}
		});

}