
Partial Class Latino_Home
    Inherits CharterCMSPage

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

        Dim d As DateTime = CachedControls.getExpireDate()
        If HttpContext.Current.Cache.Item("Template1") Is Nothing Then
            HttpContext.Current.Cache.Insert("Template1", DateTime.Now, Nothing, d, System.TimeSpan.Zero, System.Web.Caching.CacheItemPriority.NotRemovable, Nothing)
        End If

        Response.AddCacheItemDependency("Template1")

        If Application(Request.Url.LocalPath) Is Nothing Then
            Application.Add(Request.Url.LocalPath, "Template1")
        End If
    End Sub

    Protected Sub Page_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
        Page.ClientScript.RegisterStartupScript(Me.GetType(), "HBXScript", GenerateHBXPageScript())
    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:         'home page',")
            strTemp.AppendLine("page_level1:        ''")
            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 = ""home page"";")
            'strTemp.Append("hbxObj.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
