Imports System.Web
Imports System.Collections.Generic
Imports System.Net
Imports CharterDotCom.CommonEntities.Library.Enumerations
Imports CharterDotCom.CommonEntities.Library
Imports CharterDotCom.CommonEntities.Library.EntityMemberServices
Imports CharterDotCom.CommonEntities.Library.EntityWebConfig
Imports CharterDotCom.WebSite.Library

Partial Class Controls_ContactUsASA
    Inherits System.Web.UI.UserControl

    Private _chatcategory As String

    Private linkVal As String
    Private ltlText As String

    Public Property Item() As MenuItem
        Get
            If ViewState(Me.ID & "_Item") Is Nothing Then
                Return MenuItem.Unspecified
            Else
                Return CType(ViewState(Me.ID & "_Item"), MenuItem)
            End If
        End Get

        Set(ByVal value As MenuItem)
            ViewState(Me.ID & "_Item") = value
        End Set
    End Property

    Public Property Chatcategory() As String
        Get
            Return _chatcategory
        End Get
        Set(ByVal value As String)
            _chatcategory = value
        End Set
    End Property

    Public Property ShowTitleEmail() As Boolean
        Get
            Return CType(ViewState(Me.ID & "_ShowTitleEmail"), Boolean)
        End Get

        Set(ByVal value As Boolean)
            ViewState(Me.ID & "_ShowTitleEmail") = value
        End Set
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        '#####################################################################
        '4/8/2008  SIVA DOLA
        'Showing CB ContactUs panel for CB pages only
        '#####################################################################
        Dim url As String = Request.Url.ToString().ToLower()
        pnlCBContactUs.Visible = False
        Select Case True
            Case url.Contains("/order/") 'Rod Copeland Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("/account/") 'Naqib Jan 14 2009
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("order/cb")
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = True   'OK
                pnlASANeedMoreHelp.Visible = False          'Naqib Oct 29 2008
                pnlASAChatNowButton.Visible = False
            Case url.Contains("visitors/cb")
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = True       'OK
                pnlASANeedMoreHelp.Visible = False          'Naqib Oct 29 2008
                pnlASAChatNowButton.Visible = False
            Case url.Contains("cbaccount")
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = True       'OK
                pnlASANeedMoreHelp.Visible = False          'Naqib Oct 29 2008
                pnlASAChatNowButton.Visible = False
                '#####################################################################
                '5/19/2008  MARK SNYDER
                'DO NOT SHOW EMAIL LINK ON THE CONTACT US PAGES
                '#####################################################################
            Case url.Contains("customers/contactus")
                liEmail.Visible = False
                liEmail2.Visible = False
                pnlCBContactUs.Visible = False
                pnlASAAvailable.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("customers/supportgettingstarted")
                pnlASANeedMoreHelp.Visible = True
            Case url.Contains("customers/support.aspx")           'Naqib Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("customers/supportgeneral.aspx")           'Jonathan Dec 4 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("visitors/products.aspx")           'Naqib Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("visitors/channels.aspx")           'Naqib Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("visitors/timeout.aspx")           'Naqib Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("errors/missingcatalog.aspx")           'Naqib Oct 29 2008
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("customers/searchsupport.aspx") 'ADDED BY ISSUE 6615  ROD COPELAND    AUG 25, 2009
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True
            Case url.Contains("visitors/searchsite.aspx") 'ADDED BY ISSUE 6615  ROD COPELAND    AUG 25, 2009
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True

            Case url.Contains("/idtheft/")
                pnlASAAvailable.Visible = False
                pnlASANotAvailable.Visible = False
                pnlCBContactUs.Visible = False
                pnlASANeedMoreHelp.Visible = False
                pnlASAChatNowButton.Visible = True


        End Select

        '#############################################################################
        'E N D   O F   M O D I F I C A T I O N   6/26/2008     MARK SNYDER
        '#############################################################################
    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        ChatNow_Click(Nothing, Nothing)

        If pnlASANeedMoreHelp.Visible Then



            '##########################################################################
            'MODIFICATION   ROD COPELAND    4/13/2010   ISSUE ID 8892
            '##########################################################################
            'SHOW CHARTER BUSINESS SPECIFIC CONTENT RECORD IN THE EVENT THIS IS A CB 
            'CUSTOMER.
            '##########################################################################
            Dim _account As IAccount = AccountManager.Instance.GetAccount()
            If Not String.IsNullOrEmpty(Application("ENABLE_CHARTER_BUSINESS_MYACCOUNT_CONTENTRECORDS")) AndAlso _
            Application("ENABLE_CHARTER_BUSINESS_MYACCOUNT_CONTENTRECORDS").ToString().Trim().ToUpper() = "T" AndAlso _
            Not String.IsNullOrEmpty(_account.AccountType) AndAlso _
            _account.AccountType.ToLower().Trim() = "bus" Then
                '######################################
                'SHOW CHARTER BUSINESS CONTENT RECORD
                '######################################
                ltlText = ContentManager.Instance.GetContent("Support:Home:ContactUs:CB", 1, OwnerType.Other)
            Else
                '######################################
                'SHOW NORMAL CONTENT RECORD OPTIONS
                '######################################
                ltlText = ContentManager.Instance.GetContent("Support:Home:ContactUs", 1, OwnerType.Other)
            End If
            '##########################################################################





            If Chatcategory <> "FINISH" Then
                ltlucSupportHomeContactUs.Text = ltlText.Replace("{{ltlChatWindowLink}}", "../Visitors/chatlive.aspx?Chattype=" & Chatcategory)
            Else
                ltlucSupportHomeContactUs.Text = ltlText.Replace("{{ltlChatWindowLink}}", "chaturl")
            End If
        End If

        If pnlASAChatNowButton.Visible Then
            '<a id="chatLive" href="#" onclick="<%If Chatcategory <> "FINISH" Then %>javascript:window.open('../Visitors/chatlive.aspx?Chattype=<%=Chatcategory%>','_charter_chat','width=550,height=660,left=50,top=15');<%Else%>javascript:window.open(chaturl,'_charter_chat','width=550,height=660,left=50,top=15');<%End If %>"> </a>





            '##########################################################################
            'MODIFICATION   ROD COPELAND    4/13/2010   ISSUE ID 8892
            '##########################################################################
            'SHOW CHARTER BUSINESS SPECIFIC CONTENT RECORD IN THE EVENT THIS IS A CB 
            'CUSTOMER.
            '##########################################################################
            Dim _account As IAccount = AccountManager.Instance.GetAccount()
            If Not String.IsNullOrEmpty(Application("ENABLE_CHARTER_BUSINESS_MYACCOUNT_CONTENTRECORDS")) AndAlso _
            Application("ENABLE_CHARTER_BUSINESS_MYACCOUNT_CONTENTRECORDS").ToString().Trim().ToUpper() = "T" AndAlso _
            Not String.IsNullOrEmpty(_account.AccountType) AndAlso _
            _account.AccountType.ToLower().Trim() = "bus" Then
                '######################################
                'SHOW CHARTER BUSINESS CONTENT RECORD
                '######################################
                ltlText = ContentManager.Instance.GetContent("Support:Overview:ContactUs:CB", 1, OwnerType.Other)
            Else
                '######################################
                'SHOW NORMAL CONTENT RECORD OPTIONS
                '######################################
                ltlText = ContentManager.Instance.GetContent("Support:Overview:ContactUs:SYCH", 1, OwnerType.Other)
            End If
            '##########################################################################









            If Chatcategory <> "FINISH" Then
                litChatLive.Text = ltlText.Replace("{{ltlChatWindowLink}}", "../Visitors/chatlive.aspx?Chattype=" & Chatcategory)
            Else
                litChatLive.Text = ltlText.Replace("{{ltlChatWindowLink}}", "chaturl")
            End If

        End If
    End Sub

    Protected Sub ChatNow_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)

        Dim chatmapping As String = ""
        Dim strBSN As String = "0"
        Dim flag As Boolean = False
        Dim _catgr As StringBuilder = New StringBuilder
        Dim sb As New StringBuilder()
        Dim _actualCategory = _catgr.ToString()
        Dim url As String = Request.Url.ToString().ToLower()
        Try
            _chatcategory = "CHATWINDOW"

            If url.Contains("support.aspx") Or url.Contains("products.aspx") Then
                If url.Contains("menuitem=2") Or Item = MenuItem.CableTV Or url.Contains("channels.aspx") Then
                    _chatcategory = "DIGCABLE"
                    flag = True
                ElseIf url.Contains("menuitem=3") Or url.Contains("nonproductitem=303") Or url.Contains("nonproductitem=304") Or Item = MenuItem.Internet Or Item = MenuItem.Email Then
                    _chatcategory = "HSI"
                    flag = True
                ElseIf url.Contains("menuitem=4") Or Item = MenuItem.Telephone Then
                    _chatcategory = "TELEPHONE"
                    flag = True
                ElseIf url.Contains("menuitem=8") Or Item = MenuItem.MyAccount Then
                    _chatcategory = "Q_23170"
                    flag = True
                ElseIf url.Contains("menuitem=5") Or Item = MenuItem.Support Then
                    _chatcategory = "CHATWINDOW"
                    flag = True
                    ' *** Issue ID:  5421 STARTS ****    
                ElseIf url.Contains("menuitem=61") Or url.Contains("menuitem=62") Or url.Contains("menuitem=63") Then
                    _chatcategory = "Q_20957"
                    flag = True
                ElseIf url.Contains("menuitem=64") Or url.Contains("menuitem=65") Or url.Contains("menuitem=66") Then
                    _chatcategory = "Q_20956"
                    flag = True
                ElseIf url.Contains("menuitem=67") Or url.Contains("menuitem=68") Or url.Contains("menuitem=69") Then
                    _chatcategory = "Q_21175"
                    flag = True
                ElseIf url.Contains("menuitem=70") Or url.Contains("menuitem=71") Or url.Contains("menuitem=72") Then
                    _chatcategory = "Q_23170"
                    flag = True
                ElseIf url.Contains("menuitem=73") Or url.Contains("menuitem=74") Or url.Contains("menuitem=75") Then
                    _chatcategory = "Q_20956"
                    flag = True
                ElseIf url.Contains("menuitem=76") Or url.Contains("menuitem=77") Or url.Contains("menuitem=78") Then
                    _chatcategory = "Q_23511"
                    flag = True
                    ' **** Issue ID:  5421 ENDS *** 
                End If

                '#############################################################################
                ' 7/7/2008     Jonathan Parks
                '#############################################################################
                ' IF A SUPPORT ARTICLE IS ON THE QUERYSTRING, SET THE CHAT CATEGORY ASSOCIATED 
                ' WITH THE SUPPORT ARTICLE ID. 
                '#############################################################################
                If url.Contains("supportarticleid=") Then
                    Dim lMenuItems As String = Application("SUPPORT_ARTICLE_MENU_ITEM")

                    If Not lMenuItems Is Nothing Then
                        ' Get starting and ending positions of the support article parameter in the querystring
                        Dim lStartPos As Int32 = Request.Url.ToString().ToLower().IndexOf("supportarticleid=")
                        Dim lEndPos As Int32
                        If Request.Url.ToString().IndexOf("&", lStartPos) <> -1 Then
                            lEndPos = Request.Url.ToString().IndexOf("&", lStartPos)
                        Else
                            lEndPos = Request.Url.ToString().Length
                        End If

                        Dim lArticlePos As Int32 = lMenuItems.IndexOf(Request.Url.ToString().ToLower().Substring(lStartPos, lEndPos - lStartPos))

                        ' If the support article ID in the URL is contained in the config string...
                        If lArticlePos <> -1 Then

                            ' Split the string starting at the position where the support article ID is found; this should ensure that
                            ' the first array element is the one we want and limit looping to just one time
                            Dim lSupportArticles As String() = lMenuItems.Substring(lArticlePos).Split(CType("|", Char))

                            For Each supportArticle As String In lSupportArticles
                                If supportArticle <> String.Empty Then
                                    Dim lSupportArticleElements As String() = supportArticle.Split(CType(";", Char))

                                    If lSupportArticleElements.Length > 0 Then
                                        ' If the url contains this support article ID...
                                        If Request.Url.ToString().ToLower().Contains(lSupportArticleElements(0).ToLower) Then
                                            ' set the chat category
                                            Dim menuItem As New MenuItem
                                            Try
                                                ' Attempt to set the menu item category
                                                menuItem = CType(lSupportArticleElements(1), MenuItem)
                                            Catch ex As InvalidCastException
                                                menuItem = menuItem.Internet
                                            End Try

                                            '-----------------------------------------------------------------------------------------------------
                                            ' ISSUE #12847  04-05-2011  JLN
                                            '-----------------------------------------------------------------------------------------------------
                                            ' Description:  Chat for support articles had no pre-selected chat category.
                                            '      Change:  Added assignment of "flag = True", so that the code will not fall into
                                            '               the "If flag = False" section below, where most support page requests are
                                            '               re-assigned to a _chatcategory of "CHATWINDOW", which is the default.
                                            '-----------------------------------------------------------------------------------------------------
                                            Select Case menuItem
                                                Case menuItem.CableTV
                                                    _chatcategory = "DIGCABLE"
                                                    flag = True
                                                Case menuItem.Internet
                                                    _chatcategory = "HSI"
                                                    flag = True
                                                Case menuItem.Email
                                                    _chatcategory = "HSI"
                                                    flag = True
                                                Case menuItem.Telephone
                                                    _chatcategory = "TELEPHONE"
                                                    flag = True
                                                Case menuItem.Security
                                                    _chatcategory = "BILLING"
                                                    flag = True
                                                Case menuItem.MyAccount
                                                    _chatcategory = "BILLING"
                                                    flag = True
                                            End Select

                                            Exit For
                                        End If

                                    End If

                                End If
                            Next
                        End If  'If lArticlePos <> -1
                    End If  'If Not lMenuItems Is Nothing
                End If
                '#############################################################################
                ' E N D   O F   M O D I F I C A T I O N   7/7/2008     Jonathan Parks
                '#############################################################################
                hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=support');""" > " 'ISSUE ID 6573"
            ElseIf url.Contains("contactus.aspx") Then
                hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=contact%20charter');""" > "  'ISSUE ID 6573"
                pnlASANotAvailable.Visible = False
            ElseIf url.Contains("finishorder.aspx") Then
                _chatcategory = "FINISH"
            ElseIf url.Contains("redeemcoupon.aspx") Then
                _chatcategory = "BILLING"
                flag = True
            Else
                _chatcategory = "SALES"
            End If

            If flag = False Then
                '#####################################################################
                'MODIFICATION   ROD COPELAND    FEB 25, 2008    ISSUE ID 3373
                '#####################################################################
                'IT LOOKS LIKE THE BUSINESS HAS ADDED SOME NEW QUEUES THAT DIDNT 
                'EXIST AT THE TIME OF THE ASA CHAT ROLLOUT.  THE ISSUE ID HAS 
                'PROVIDED SPECIFIC URLS THAT SHOULD ROUTE TRAFFIC TO THE NEW QUEUES.
                '#####################################################################
                Select Case True
                    Case url.Contains("customers/contactus.aspx?contactus=1")
                        _chatcategory = "Q_21853"
                    Case url.Contains("customers/contactus.aspx?contactus=4")
                        _chatcategory = "Q_21193"
                    Case url.Contains("customers/contactus.aspx?contactus=5")
                        _chatcategory = "Q_23170"
                    Case url.Contains("customers/contactus.aspx?contactus=6")
                        _chatcategory = "Q_20957"
                    Case url.Contains("customers/contactus.aspx?contactus=7")
                        _chatcategory = "Q_20956"
                    Case url.Contains("customers/contactus.aspx?contactus=8")
                        _chatcategory = "Q_21175"
                    Case url.Contains("customers/contactus.aspx")
                        _chatcategory = "CHATWINDOW"

                        ' This section dealing with support.aspx?menuitem=8, has been moved at the top
                        'Case url.Contains("customers/support.aspx?menuitem=8")
                        '    _chatcategory = "Q_20957" !this was wrong code and was never getting executed?
                    Case url.Contains("customers/support.aspx?supportarticleid=1397")
                        _chatcategory = "Q_20957"
                    Case url.Contains("customers/support.aspx?supportarticleid=1776")
                        _chatcategory = "Q_20956"
                    Case url.Contains("customers/support.aspx?supportarticleid=8")
                        _chatcategory = "Q_21175"
                    Case url.Contains("customers/support.aspx?supportarticleid=37")
                        _chatcategory = "Q_23170"
                    Case url.Contains("customers/support.aspx?supportarticleid=1681")
                        _chatcategory = "Q_22753"
                    Case url.Contains("customers/support.aspx?supportarticleid=3")
                        _chatcategory = "Q_22753"
                    Case url.Contains("customers/support.aspx")
                        _chatcategory = "CHATWINDOW"
                    Case url.Contains("visitors/searchsite.aspx") 'ADDED BY ISSUE 6615  ROD COPELAND    AUG 25, 2009
                        _chatcategory = "CHATWINDOW"
                    Case url.Contains("customers/searchsupport.aspx") 'ADDED BY ISSUE 6615  ROD COPELAND    AUG 25, 2009
                        _chatcategory = "CHATWINDOW"
                    Case url.Contains("order/offers.aspx?productitem=2")
                        _chatcategory = "SALES_Q_21791"
                    Case url.Contains("order/offers.aspx?productitem=3")
                        _chatcategory = "SALES_Q_21792"
                    Case url.Contains("visitors/products.aspx?menuitem=2")
                        _chatcategory = "SALES_Q_21790"
                    Case url.Contains("visitors/products.aspx?menuitem=3")
                        _chatcategory = "SALES_Q_21791"
                    Case url.Contains("visitors/products.aspx?menuitem=4")
                        _chatcategory = "SALES_Q_21792"
                        '#####################################################################
                        'MODIFICATION   Jonathan Parks    7/22/2008    ISSUE ID 4279
                        '#####################################################################
                        'MORE SPECIFIC URLS THAT SHOULD ROUTE TRAFFIC TO NEW QUEUES.
                        '#####################################################################
                    Case url.Contains("visitors/products.aspx?productitem=4")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=5")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=6")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=7")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=8")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=9")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/products.aspx?productitem=10")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/channels.aspx")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/frequentquestions.aspx?productitem=1")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/frequentquestions.aspx?productitem=2")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/frequentquestions.aspx?productitem=3")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=61")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=62")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=63")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=64")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=65")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=66")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=68")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=81")
                        _chatcategory = "Q_21853"
                    Case url.Contains("visitors/nonproducts.aspx?nonproductitem=83")
                        _chatcategory = "Q_21853"
                    Case url.Contains("order/register.aspx")
                        _chatcategory = "Q_23170"
                    Case url.Contains("account/internettools.aspx")
                        _chatcategory = "Q_20956"
                    Case url.Contains("customers/supportgeneral.aspx?pagetype=3")
                        _chatcategory = "BILLING"
                        '#####################################################################
                    Case url.Contains("supportgettingstarted.aspx")
                        _chatcategory = "CHATWINDOW"
                    Case Else
                        _chatcategory = "SALES"
                End Select
                '#####################################################################




                '####################################################
                '10/03/2007     ROD COPELAND
                'ASA MOD TO INTEGRATE THE MYACCOUNT PAGES INTO CHAT
                '####################################################
                If url.Contains("login.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_23170"
                ElseIf url.Contains("highspeedsecurity.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_20956"
                ElseIf url.Contains("manageemailaccounts.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_23170"
                ElseIf url.Contains("managelogin.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_23170"
                ElseIf url.Contains("managewebspace.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_20956"
                ElseIf url.Contains("myaccount.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "q_23170"
                ElseIf url.Contains("mywebspace.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_23170"
                ElseIf url.Contains("forgot.aspx") Then
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">" 'ISSUE ID 6573
                    _chatcategory = "Q_23170"
                ElseIf url.Contains("retrieveusername.aspx") Then
                    '-----------------------------------------------------------------------------------------------------
                    ' ISSUE #12954  04-01-2011  JLN
                    '-----------------------------------------------------------------------------------------------------
                    ' Description:  Default chat queue for RetrieveUsername.aspx was "Sales" instead of "My Account".
                    '      Change:  Added reference to RetrieveUsername.aspx page in this if-then-else structure.
                    '-----------------------------------------------------------------------------------------------------
                    ' issue 20613
                    ' Description:  Change to use external JS file for NextIT link instead of charter.com
                    hypASAChatLink.InnerHtml = "<a href=""#"" onclick=""javascript:OpenExternalHelp('&question=myaccount');"">"
                    _chatcategory = "Q_23170"
                End If
                '####################################################
            End If

        Catch ex As Exception
        End Try

    End Sub

End Class
