function recipe_vote(recipe,css_value,value,return_field,thanks_id){
	field = $(return_field);
	thanks = $(thanks_id);
	if (field != null){
		field.set('class', 'rating ' + css_value);
		succes = vote(recipe,value);
		thanks.innerHTML = "Bedankt voor uw stem";
	}
}

function vote(recipe,value){
	success = false;
	var req = new Request({
		url:'/recepten_stem/',
		method:'post',
		autoCancel:true,
		data:'recipe=' + recipe + '&value=' + value,
		onSuccess: function(txt) {

		},
		onFailure: function(txt){

		}
	}).send();
	return success;
}
