  function update_user_box() { 
    var user_box = document.getElementById("user"); 
    // add in some XFBML. note that we set useyou=false so it doesn't display "you" 
    user_box.innerHTML = "<span>" + "<fb:profile-pic uid='loggedinuser' facebook-logo='true'></fb:profile-pic>" + "Welcome, <fb:name uid='loggedinuser' useyou='false'></fb:name>. You are signed in with your Facebook account." + "</span>"; 
    // because this is XFBML, we need to tell Facebook to re-process the document 
    FB.XFBML.Host.parseDomTree(); 
    
    // ask for status update permissions
    
    // check if they've already granted status_update permissions
    FB.Facebook.apiClient.users_hasAppPermission('status_update', function( response ) {
      if ( response == 0 ) {
        // they haven't, so ask for them for it
        FB.Connect.showPermissionDialog('status_update', function( response ) {
          // if granted, this returns the granted permission
          if ( response == 'status_update' ) {
            // need to add them to our db, get their user id and make an ajax request to store it
            //var uid = FB.Facebook.apiClient.get_session().uid;
            //$.post( 'auth.php', { uid: uid, site: 'testsite' } );
            // yay! update our status
          }
        });
      }
    });
  }
  
function fbPublish() {
  var id = readCookie( 'videoId' );
  
  // need a way to get acutal video vote here
  FB.Connect.streamPublish('I just voted for my favorite notsosure.org video. What\'s yours? http://bit.ly/10gm6m');
}
