    
    // helper function for getting DOM element
    function $(id) { return document.getElementById(id); }
    
    
    // method that replaces a user's information section on their
    // facebook page
    function renderProfileBox(fb_uid)
    {
        
        //FB.XFBML.Host.autoParseDomTree = false; 
        //FB.XFBML.Host.addElement(new FB.XFBML.UserLink($("userName_"+fb_uid))); 
        //FB.XFBML.Host.addElement(new FB.XFBML.ProfilePic($("userProfilePic_"+fb_uid))); 
        //FB.XFBML.Host.addElement(new FB.XFBML.UserStatus($("userStatus_"+fb_uid))); 
    
        //renderFriends(fb_uid);
    }
    
    
    
    // helper method to run an FQL and get the total number of friends
    // that a user has
    function renderFriends(fb_uid)
    {

        var fbApiClient = new FB.ApiClient('4898193dff0709d9ace9ed3514dcda4b');
        var numFriends = 0;
    
        fbApiClient.fql_query("SELECT uid2 FROM friend WHERE uid1 = 12808610",function(result,exception){ $("userFriendCount_"+fb_uid).innerHTML = "<a href='#'>" + (result.length+1) + "</a> friends";});
    }
    
    
    //function to prompt the user to connect to 4tay
    //a cookie is set if this is shown so that the user isn't
    //bugged by it
    function fbConnect_showJoinPopup()
    {
        var mypopup = new FB.UI.FBMLPopupDialog('Connect your facebook account to 4tay.com','<div style="padding:10px;">' +
        'Dear 4tay.com visitor,<br><br>'+
        '4tay.com is proud to announce that we are now using the facebook connect libraries to provide a simpler user experience for facebook users who visit 4tay.com.<br><br>'+
        'Facebook users who connect their accounts with 4tay.com will be able to post comments as themselves every time they come back to visit 4tay.com.<br><br>4tay.com does not store your facebook information and updates back to facebook require your approval.<br><br>'+
        '<center><a href="http://www.4tay.com/NewAccount.php?FacebookConnect=true">click here to connect your facebook profile to 4tay.com</a></center><br><br><sub>you will be prompted again to connect in 30 days</sub></div>',true,true);
        mypopup.show();
    }
    