JS: functionname("yes/no");
<p>I want to put my two functions into one.
They look like this now:</p>

<pre><code>function MeYouFriend(){
    $.ajax({ 
       type: "POST",
       url: "misc/AddFriend.php",
    data: {
    mode: 'ajax',
    friend: 'ignore',
    uID : $('#uID').val(),
    fID : $('#fID').val()
    },
       success: function(msg){
$('#friendsPop').jGrowl('close');
        }
     });
}
function MeYouFriendY(){
    $.ajax({ 
       type: "POST",
       url: "misc/AddFriend.php",
    data: {
    mode: 'ajax',
        friend: 'confirm',
    uID : $('#uID').val(),
    fID : $('#fID').val()
    },
       success: function(msg){
$('#friendsPop').jGrowl('close');
        }
     });
}
</code></pre>

<p>The difference is only friend: 'confirm' and friend: 'ignore' , how can i put them together to one and make it simple?</p>
