var users = {
	
	friends: function(fid, ignore)
	{
			if(!$defined(ignore)) { ignore = 0; }
			var req = new Request.HTML({  
			method: 'post',  
			url: 'php/friend.add.php',  
			data: { 'fid' :fid, 'ignore' : ignore },  
			onRequest: function() { 
				//$('r'+id).set({styles : { background: 'url(i/loading.gif) no-repeat 50% 50%', height:'100px', width: '100%'} }) 
			},  
			onComplete: function(a,b,c,d) 
			{ 
				//log(c);
				var r = JSON.decode(c);
				switch(r.error)
				{
					case "1":
						log(r);
						display_errors(r.errorDetails, 'ferror');
					
					break;
					
					case "0":
						$('freturn'+fid).set('html', r.msg);
					
					break;
				}
				
				
				//alert('r'+id); 
				//$('qreturn2').set('html', c); 
			}
			}).send();
	
	}
}