var progress = 'ajax_loading';

function ifaceGetFriendsWheel(sLogin) 
{	
	showProgress();
	JsHttpRequest.query(
		DIR_WEB_ROOT+'/include/ajax/iFaceFriends.php',
        {sLogin: sLogin, wheel: 'true', nojson: 'true' },
		function(result, errors) 
		{
			hideProgress();
	        if (!result) {
	        	msgErrorBox.alert('Error','Please try again later');
	            return false;
	        } 
	        if (result.bStateError) {
	      		msgErrorBox.alert(result.sMsgTitle,result.sMsg);
	      		return false;
	       	} 
	       	else 
	       	{
			//	msgNoticeBox.alert(result.sMsgTitle,result.sMsg);
			//	alert(result.sFriends);
			var data = result.sFriends;

				new MooWheel.Remote(data, $('canvas')
				, {
					onItemClick: function(item, e) {
						var url = DIR_WEB_ROOT+'/profile/'+item.text;
						window.open(url);
					},
					//type: 'heat'
					}
				);
	        }
        },
       true
    );
}

function showProgress()
{
	$(progress).show();
}

function hideProgress()
{
	$(progress).hide();
}
