Imports Microsoft.VisualBasic

Public Class HBXSupport

  Public Shared Function GenerateHBXPageScript(ByVal HBXPageName As String, ByVal HBXMLC As String) As String
        Try
            ' issue 15850

            Dim strTemp As New StringBuilder()

            ' issue 15850
            strTemp.AppendLine("<script type=""text/javascript"">")
            strTemp.AppendLine("var utag_data = {")
            strTemp.AppendLine("page_level2:         '" & HBXPageName & "',")
            strTemp.AppendLine("page_level1:        '" & HBXMLC & "'")
            strTemp.AppendLine("}")
            strTemp.AppendLine("</script>")
            strTemp.AppendLine("<script type=""text/javascript"" src=""//tealium.hs.llnwd.net/o43/utag/charter/main/prod/utag.js""></script>")

            'strTemp.AppendLine("<script>")
            'strTemp.AppendLine("var hbxObj = new Object();")
            'strTemp.AppendLine("hbxObj.pn = '" & HBXPageName & "';")
            'strTemp.AppendLine("hbxObj.mlc = '" & HBXMLC & "';")
            'strTemp.AppendLine("hbxObj.pr = '';")
            'strTemp.AppendLine("hbxObj.ca = '';")
            'strTemp.AppendLine("hbxObj.pc = '';")
            'strTemp.AppendLine("hbxObj.qn = '';")
            'strTemp.AppendLine("hbxObj.st = 1;")
            'strTemp.AppendLine("hbxObj.sp = 0;")
            'strTemp.AppendLine("hbxObj.sr = 1;")
            'strTemp.AppendLine("hbxObj.oi = '';")
            'strTemp.AppendLine("hbxObj.sk = '';")
            'strTemp.AppendLine("hbxObj.po = '';")
            'strTemp.AppendLine("hbxObj.ds = 0;")
            'strTemp.AppendLine("hbxObj.ci = '';")
            'strTemp.AppendLine("</script>")
            'strTemp.AppendLine("<script language=""javascript"" type=""text/javascript"" src=""../Scripts/hbx_pagecode.js""></script>")
            'If HBXPageName = "step 6 - finish and receipt" And HBXMLC = "/orderflow" Then
            '    strTemp.AppendLine("<script language=""javascript"" type=""text/javascript"" src=""../Scripts/hbx_order.js""></script>")
            'Else
            '    strTemp.AppendLine("<script language=""javascript"" type=""text/javascript"" src=""../Scripts/hbx.js""></script>")
            'End If
            Return strTemp.ToString
        Catch ex As Exception
            Throw ex
        End Try
  End Function

End Class
