function facebook_invite_users() {
	var dialog = new FB.UI.FBMLPopupDialog('Invite your friends to mikeluby.com', '');
	var fbml = "<fb:fbml>"+"<fb:request-form style=\"width:630px; height:540px;\" action=\"" + document.location.href + "?\"\tmethod=\"POST\" invite=\"true\" type=\"invite\" "+"content=\"I found a site that you might be interested in. You should check it out at http://www.mikeluby.com/ <fb:req-choice url='http://mikeluby.com/' label='Go to mikeluby.com' />\">"+"<fb:multi-friend-selector\tshowborder=\"false\" exclude_ids=\"\" actiontext=\"Invite your friends\" rows=\"5\" bypass=\"cancel\"\tshowborder=\"false\" />"+"</fb:request-form>"+"</fb:fbml>";
	dialog.setFBMLContent(fbml);
	dialog.setContentWidth(630); 
	dialog.setContentHeight(540);
	dialog.show();
}

function updateSessionState( session ) {
	/*for( var p in session ) {
		document.getElementById( "connectUser" ).innerHTML += session[ p ] + "<br/>";
	}*/
	document.getElementById( "connectUser" ).innerHTML = '<iframe src="http://mikeluby.com/fbcbox.php?user_id=' + session.uid + '" frameborder="0" width="100%" scrolling="no" height="80px"></iframe><div><a href="#" onclick="FB.Connect.logout(function() { window.location = window.location; }); return false;">Logout of Facebook</a></div>';
}

function fbc_loginbutton( ) {
	if( document.getElementById( "connectButton" ) ) {
		document.getElementById( "connectButton" ).innerHTML = '<fb:login-button autologoutlink="true"></fb:login-button>';
	}	
}
