function reload_page(url,obj) {

    setPageState($loggedIn,true)
    return;
    
	// Reload the page, so the plugin can perform auto-login of a frontend user
	// window.location.reload();
	if (url) {
		var dest = /*window.location.href + sep + "fbLogin=" + */ url;
		var frame = $(obj).up('.tx-newloginbox-pi1');
	} else {
		var dest = window.location.href;
		var frame =$(window);
	}

//top.alert(dest+'&type=0');

	new Ajax.Request(dest,
	  { method:'post',
		parameters:({type:801,cacheBuster:makeRandomString()}),
		onSuccess:function(trans) {
		   request = false;
//		   top.alert(trans.responseText);
		   frame.replace(trans.responseText);
		}
	  });
} // End reload_page()

function submit_unlink_form() {
	var form = $('tx-facebook-pi1-unlink_form');
	form.request();
	return false;
}

function reload_loginbox() {
// function from master.js - force reload loginbox
	setPageState($loggedIn,true);
}


function reload_window(urlx) {
    setPageState($loggedIn,true)
    return;
	if (urlx && $loggedIn==false) {
		window.location.href=urlx;
	} else {
		window.location.href=window.location.href;
	}
}

function reload_windowNow() {
		window.location.href=window.location.href;
}

function callPublish(msg, attachment, action_link) {
  FB.ensureInit(function () {
    FB.Connect.streamPublish('', attachment, action_link);
  });
}

