
Partial Class Reports_PopUp
    Inherits System.Web.UI.Page

    ''' -----------------------------------------------------------------------------
    ''' <summary>
    '''     Handle page-initialization tasks, such as validating user security, 
    ''' setting javascript Attributes of certain controls, and initial display
    ''' of data.
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks>
    '''     The "?textbox=" portion of the form's QueryString must be populated
    ''' with the name of a valid text box on the calling page.  This routine
    ''' stores the name of that control for later use, when the user selects a
    ''' date.
    ''' </remarks>
    ''' <history>
    ''' 	[JGilbert]	4/15/2004	Created
    ''' </history>
    ''' -----------------------------------------------------------------------------
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        control.Value = Request.QueryString("textbox").ToString()
    End Sub

    ''' -----------------------------------------------------------------------------
    ''' <summary>
    '''     Change the value of the text box that has been supplied during program startup
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks>
    '''     
    ''' </remarks>
    ''' <history>
    ''' 	[JGilbert]	5/4/2004	Created
    ''' </history>
    ''' -----------------------------------------------------------------------------
    Protected Sub Change_Date(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim strScript As String = "<script>window.opener.document.forms(0)." & _
                      control.Value & _
                      ".value = '" & _
                     calDate.SelectedDate.ToString("MM/dd/yyyy") & _
                     "';self.close()" & _
                     "</" & "script>"

        ClientScript.RegisterClientScriptBlock(GetType(Page), "DatePopupOpener", strScript)
    End Sub

    Private Sub InitializeComponent()

    End Sub

    ''' -----------------------------------------------------------------------------
    ''' <summary>
    '''     Provide special  highlighting during mouseover/mouseout events on the 
    ''' individual day cells of the displayed month.
    ''' </summary>
    ''' <param name="sender"></param>
    ''' <param name="e"></param>
    ''' <remarks>
    ''' </remarks>
    ''' <history>
    ''' 	[JGilbert]	5/4/2004	Created
    ''' </history>
    ''' -----------------------------------------------------------------------------
    Private Sub calDate_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles calDate.DayRender
        e.Cell.Attributes.Add("onMouseOver", "this.style.backgroundColor='lightcyan';")
        e.Cell.Attributes.Add("onMouseOut", "this.style.backgroundColor='';")
    End Sub
End Class
