function ProfileCore() {
	this.ident ='';
	
	this.addFriend = function(id) {
		var data = new Object();
		 data['userid'] = id;
		 data['action'] = 'addfriend';
		 data['widget'] = 'profile';
		 this.InitializeRequest('POST', '/ajax.php');
         this.Commit(postquery(data));	
	}
	
	this.delFriend = function(id) {
		var data = new Object();
		 data['userid'] = id;
		 data['action'] = 'deletefriend';
		 data['widget'] = 'profile';
		 this.InitializeRequest('POST', '/ajax.php');
         this.Commit(postquery(data));	
	}
	
	this.OnSuccess = function()
      {
      	//alert(this.GetResponseText());
      	eval(this.GetResponseText());
      	// fade(0,"form_"+this.ident);
      	// $("loading_"+this.ident).style.display = 'none';
      }
}

ProfileCore.prototype = new ajax();
Profile = new ProfileCore();