	
function getNeighbours(){
	var url = 'lastfm/getNeighbours.php?user=' + encodeURIComponent(username);
 
 	var successo = function(transport) { 
	
						var retObj = transport.responseText.evalJSON(); 
						if (retObj != null){
							curNeighbours = retObj;
							showNeighbours(retObj);
						}
						toggleWaitingMessage(false);	
										
					} 
					
	doQuery(url, successo);	
	toggleWaitingMessage(true);

}

function showNeighbours(retObj){

	var content = "";
	var i = 0;
	
	Object.values(retObj).each( function(obj) {
	
		content = content + '<div class="friendElement">' + 
								'<img src="' + obj.image + '" style="float:right; width:30px; height:30px; padding:0px; border:1px solid black;" />' +
								'<p><a href="' + obj.url + '" target="_blank">' + obj.username + '</a>' +
								'<div style="float:right; width:50px; height:5px; padding:0px; margin:2px; border:1px solid black; ">'+
								    '<div style="padding:0px; border:0px solid black; height:5px; background-color:'+(parseFloat(obj.match)>=0?'red':'grey')+'; width:'+ 
								    Math.floor(Math.abs(50.0/100.0 * parseFloat(obj.match))) +'px;" ></div>'+
								'</div></p>' +
								'<div  id="neighbour' + i + '" username="'+obj.username+'" ></div>'+
							'</div>';
		i++;
		//NEIGHBOURSNUM = i;
		
	} );
	setDrawerContent(TABNEIGH, content);

}


