protected void Page_PreRender(object sender, EventArgs e) { if (!Visible || !ChatProtectionHelper.IsSupportChatPanelEnabled() || MembershipContext.SignOutPending) { Visible = false; return; } // Script references insertion ChatScriptHelper.RegisterChatSupportManager(Page); ChatScriptHelper.RegisterChatNotificationManager(Page); ScriptHelper.RegisterScriptFile(Page, "~/CMSModules/Chat/Controls/SupportChatHeader.js"); // Create and launch startup script. ScriptHelper.RegisterStartupScript(Page, typeof(string), "SupportChatHeader_" + ClientID, GetStartupScript(), true); }