
Partial Class Visitors_images_Campaignlandingpage
    Inherits CharterCMSPage
    Private mlc As String = "empty"

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        MyBase.SetTemplate(18)
    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        If Application("sendURL") Is Nothing Then
            Dim strSendURL As String = ""
            Dim host As String = Request.Url.Host
            Select Case host
                Case "kstlmcc2p01"
                    '#######
                    'PROD
                    '#######
                    strSendURL = "http://CHARTER.COM/visitors/campaignlanding/sendtofriend.aspx"
                Case "kstlmcc2p02"
                    '#######
                    'PROD
                    '#######
                    strSendURL = "http://CHARTER.COM/visitors/campaignlanding/sendtofriend.aspx"
                Case "kstlmweb66"
                    '#######
                    'UAT
                    '#######
                    strSendURL = "http://CC2UATW/visitors/campaignlanding/sendtofriend.aspx"
                Case "kstlmweb67"
                    '#######
                    'UAT
                    '#######
                    strSendURL = "http://CC2UATW/visitors/campaignlanding/sendtofriend.aspx"
                Case "kstlmweb65"
                    '#######
                    'DEV
                    '#######
                    strSendURL = "http://KSTLMWEB65/visitors/campaignlanding/sendtofriend.aspx"
                Case "kstlintcncegenm"
                    '#######
                    ' 
                    '#######
                    strSendURL = "http://kstlintcncegenm/ui/visitors/campaignlanding/sendtofriend.aspx"
                Case "localhost"
                    strSendURL = "http://localhost/visitors/campaignlanding/sendtofriend.aspx"

                Case Else
                    strSendURL = "http://CHARTER.COM/visitors/campaignlanding/sendtofriend.aspx"
            End Select

            Dim strTemp As New StringBuilder()
            strTemp.Append("<script type=""text/javascript"">")
            strTemp.Append("   var so = new SWFObject(""images/charter_winter_wonder_V9.swf"", ""campaign"", ""100%"", ""500"", ""7"", ""#ffffff"");")
            strTemp.Append("   so.write(""flashcontent"");")
            strTemp.Append("</script>")

            Application("sendURL") = strTemp.ToString()
        End If




        'If Not Page.IsPostBack Then
        '  If Request.QueryString("mlc") IsNot Nothing Then
        '    mlc = Request.QueryString("mlc")
        '  End If
        '  Page.ClientScript.RegisterStartupScript(Me.GetType(), "HBXScript", GenerateHBXPageScript())
        'End If
    End Sub

    Private Function GenerateHBXPageScript() As String
        Try
            Dim strTemp As New StringBuilder()

            strTemp.AppendLine("<script type=""text/javascript"">")
            strTemp.AppendLine("var utag_data = {")
            strTemp.AppendLine("page_level2:         'holiday campaign flash',")
            strTemp.AppendLine("page_level1:        '" & mlc & "'")
            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.Append("<SCRIPT>")
            'strTemp.Append("var hbxObj = new Object();")
            'strTemp.Append("hbxObj.pn = 'holiday campaign flash';")
            'strTemp.Append("hbxObj.mlc = '" & mlc & "';")
            'strTemp.Append("hbxObj.pr = """";")
            'strTemp.Append("hbxObj.ca = """";")
            'strTemp.Append("hbxObj.pc = """";")
            'strTemp.Append("hbxObj.qn = """";")
            'strTemp.Append("hbxObj.st = 1;")
            'strTemp.Append("hbxObj.sp = 0;")
            'strTemp.Append("hbxObj.sr = 1;")
            'strTemp.Append("hbxObj.oi = """";")
            'strTemp.Append("hbxObj.sk = """";")
            'strTemp.Append("hbxObj.po = """";")
            'strTemp.Append("hbxObj.ds = 0;")
            'strTemp.Append("hbxObj.ci = """";")
            'strTemp.Append("</script>")
            'strTemp.Append("<script language=""javascript"" type=""text/javascript"" src=""../Scripts/hbx_pagecode.js""></script>")
            'strTemp.Append("<script language=""javascript"" type=""text/javascript"" src=""../Scripts/hbx.js""></script>")
            Return strTemp.ToString
        Catch ex As Exception
            Throw ex
        End Try
    End Function
End Class
