function voteProcess(url, vars){
			$.post(
				url, 
				vars,
				function(xmlResponse){
		    		var root = xmlResponse.getElementsByTagName('root');
					var id = xmlResponse.getElementsByTagName('id')[0].childNodes[0].nodeValue;
					var response = xmlResponse.getElementsByTagName('response')[0].childNodes[0].nodeValue;
					var html = xmlResponse.getElementsByTagName('code')[0].childNodes[0].nodeValue;
					
					if(response == 'true'){
						$('#yes_'+id).css('display', 'none');
						$('#no_'+id).css('display', 'none');
						$('#helpfull_votes').html(html);
					}
					else{
						alert('Error - Please try again later.');
					}
					
					hideWait();
				}, 
				"xml"
			);
		}
		
		function addVote(par){
			showWait();
			var url = 'ajax/vote.php';
			var data = par.split("_");
			var vars = 'type=' + encodeURIComponent(data[0]) + '&review_id=' + encodeURIComponent(data[1]);
			
			setTimeout("voteProcess('"+url+"', '"+vars+"')", 1000);
		}
	
		$(document).ready(function(){
			$('#helpfull-box a.helpfull').each(function(){
				$(this).click(function(){
					var param = $(this).attr('id');
					addVote(param);
					return false;
				});
			})
		});
