
function facebook_onlogin_ready(switcher) {
  refresh_page(switcher);
}

function refresh_page(switcher) {
	
	if (switcher)
	{
		var lhr = switcher;
	}
	else
	{
		//var lhr = (fbconnect_location_refresh || location.href.replace(/#.*/,""));
	
		if("undefined" != typeof fbconnect_location_refresh && fbconnect_location_refresh) {
			lhr = fbconnect_location_refresh;
		}
		else {
			lhr = top.location.href.replace(/#.*/,"");
		}
	}
	
  window.parent.location.href = lhr;
  window.parent.closeIframeOverlay();
  //top.location = lhr;
}

/*
 * Prompts the user to grant a permission to the application.
 */
function facebook_prompt_permission(permission) {
  FB.ensureInit(function() {
    FB.Connect.showPermissionDialog(permission);
  });
}





