Public Class Redirect
    Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

    'This call is required by the Web Form Designer.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

    End Sub

    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeComponent()
    End Sub

#End Region

        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
                Dim bCurrentBrowser As Boolean = True
                Dim strPageType As String = UCase(Request.QueryString("PageType"))
                Dim strChatID As String = Request.QueryString("ID")
                Dim strNewURL As String = "http://www.xmlpitstop.com"

                bCurrentBrowser = Double.Parse(Request.Browser.Version) > 5.01

                Session("ChatID") = strChatID
                'Put user code to initialize the page here
                Select Case strPageType
                        Case "PRINT"
                                If bCurrentBrowser Then
                                        strNewURL = "report/CreateChat_Preview.aspx"
                                Else
                                        strNewURL = "report/ChatReport.aspx"
                                End If
                        Case "JOIN"
                                If bCurrentBrowser Then
                                        strNewURL = "ChatIE/ChatIEFrame.aspx"
                                Else
                                        strNewURL = "ChatNS/ChatNSFrame.htm"
                                End If

                End Select
                Response.Redirect(strNewURL)
        End Sub

End Class
