/// <summary>
        /// Initialize some of the page attributes and scripts.
        /// </summary>
        /// <param name="sender">Object causing this event to be triggered.</param>
        /// <param name="e">Parameters about the event.</param>
        protected void Page_Init(object sender, EventArgs e)
        {
            //
            // Request various javascript and CSS files to be included.
            //
            BasePage.AddJavascriptInclude(Page, BasePage.JQUERY_INCLUDE);
            BasePage.AddJavascriptInclude(Page, "include/scripts/jqueryui/js/jquery-ui-1.7.3.custom.min.js");
            BasePage.AddJavascriptInclude(Page, "UserControls/Custom/HDC/Misc/Includes/jquery-ui-timepicker-addon.js");
            BasePage.AddCssLink(Page, "include/scripts/jqueryui/css/custom-theme/jquery-ui-.custom.css");

            //
            // Setup the document browser/uploader.
            //
            mdlDocuments.Title          = "Select a Document";
            mdlDocuments.Url            = "DocumentBrowser.aspx?callback=selectDocument&DocumentTypeFilter=#documentTypeFilter#&SelectedID=#selectedID#&DocumentTypeID=#documentTypeID#";
            mdlDocuments.Width          = 310;
            mdlDocuments.Height         = 200;
            mdlDocuments.JSFunctionName = "openChooseDocumentWindow(documentTypeFilter, selectedID, documentTypeID)";

            //
            // Setup the lookup drop down list.
            //
            ddlTopicArea.Items.Add(new ListItem("", "-1"));
            String[] topicAreas = TopicAreaSetting.Split(',');
            foreach (String topicArea in topicAreas)
            {
                Lookup area = new Lookup(Convert.ToInt32(topicArea));

                ddlTopicArea.Items.Add(new ListItem(area.Value, area.LookupID.ToString()));
            }

            //
            // Load the promotion into memory.
            //
            LoadRequest();
        }
        /// <summary>
        /// Update the information displayed in the datagrid.
        /// </summary>
        private void ShowList()
        {
            DataTable table = new PromotionRequestData().GetPromotionWebList_DT(true, -1);

            String[] topicAreas;


            //
            // Filter out rows we don't want. We only want rows that are promoted in the correct areas.
            //
            if (!String.IsNullOrEmpty(TopicAreaSetting))
            {
                topicAreas = TopicAreaSetting.Split(',');

                //
                // Walk each row in the table and process all rows that are not marked as deleted.
                //
                foreach (DataRow row in table.Rows)
                {
                    if (row.RowState != DataRowState.Deleted)
                    {
                        bool     flag     = false;
                        string[] strArray = row["cross_promote_values"].ToString().Split(new char[] { ',' });

                        //
                        // We start with flag = false and look for a match on each of the possible
                        // topic areas.
                        //
                        foreach (String area in topicAreas)
                        {
                            //
                            // If the primary topic area matches, set flag = true so it will be kept.
                            //
                            if (area.Trim() == row["topic_area_luid"].ToString())
                            {
                                flag = true;
                            }

                            //
                            // Check if topic area against the secondary topic areas. If we find a match
                            // set flag = true so the row will be kept.
                            //
                            foreach (string str in strArray)
                            {
                                if (str == area.Trim())
                                {
                                    flag = true;
                                }
                            }
                        }

                        //
                        // If no topic area match was found, delete the row.
                        //
                        if (!flag)
                        {
                            row.Delete();
                        }
                    }
                }

                table.AcceptChanges();
            }

            //
            // Setup all the parameters for the datagrid.
            //
            dgPromotions.AllowPaging        = false;
            dgPromotions.PagerStyle.Visible = false;
            dgPromotions.ItemType           = "Display Request";
            dgPromotions.ItemBgColor        = base.CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgPromotions.ItemAltBgColor     = base.CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgPromotions.ItemMouseOverColor = base.CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgPromotions.AddEnabled         = false;
            dgPromotions.DeleteEnabled      = true;
            dgPromotions.DeleteIsAsync      = false;
            dgPromotions.EditEnabled        = false;
            dgPromotions.MergeEnabled       = false;
            dgPromotions.MailEnabled        = false;
            dgPromotions.ExportEnabled      = true;
            dgPromotions.DataSource         = table;
            dgPromotions.DataBind();
        }