﻿function showInviteFriendsDialog(title, header, invite_text, next_page, type, excluded){
    var the_fbml = '\
        <fb:fbml>\
            <fb:request-form style="width: 630px; height: 560px;" action="' + next_page + '" method="GET" invite="true" type="' + type + '" content="' + invite_text + '">  \
                <fb:multi-friend-selector showborder="false" bypass="cancel" exclude_ids="' + excluded + '" actiontext="' + header + '">  \
            </fb:request-form>  \
        </fb:fbml>';
    var dlg = new FB.UI.FBMLPopupDialog(title, the_fbml);
    dlg.setContentWidth(800);
    dlg.setContentHeight(600);
    dlg.set_placement(FB.UI.PopupPlacement.center);
    dlg.show();
 }
function facebook_publish_feed_story(form_bundle_id, template_data, callback) {
  FB.Connect.showFeedDialog(form_bundle_id, template_data, null, null, null, FB.RequireConnect.require, callback);
}

function AddOnload(myfunc)
{
    if(window.addEventListener)
        window.addEventListener('load', myfunc, false);
    else if(window.attachEvent)
        window.attachEvent('onload', myfunc);
}

function doFBLogin() {
    FB.Connect.requireSession( function() { __doPostBack( 'FBCONNECT','') } );
}