protected void OKButton_Click(object sender, EventArgs e)
        {
            try
            {
                if (!String.IsNullOrEmpty(IndexSelector.SelectedValue))
                {
                    SessionManager.Instance.ClearAll();

                    IIndexResolver resolver = ResolverFactory.GetIndexResolver(IndexType);

                    SessionManager.Instance.CurrentIndex = resolver.GetIndex(IndexSelector.SelectedValue);

                    Response.Write("<script language='javascript'>window.top.dialogClose();</script>");
                }
                else
                {
                    Response.Write(String.Format("<script language='javascript'>window.alert({0});</script>",
                                                 Translate.Text("'The index is not selected. Please select an index.'")));
                }
            }
            catch (Exception ex)
            {
                ErrorResolver.ResolveError(ex, this);
            }
        }
        private void InitilizeIndexSelector()
        {
            IndexSelector.Items.Clear();

            IIndexResolver resolver = ResolverFactory.GetIndexResolver(IndexType);

            List <string> indexNames = resolver.GetIndexNames();

            indexNames.Insert(0, String.Empty);

            IndexSelector.DataSource = indexNames;
            IndexSelector.DataBind();

            IndexSelector.Enabled = true;
        }
        protected void IndexSelector_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                SessionManager.Instance.ClearAll();

                if (!String.IsNullOrEmpty(IndexSelector.SelectedValue))
                {
                    IIndexResolver resolver = ResolverFactory.GetIndexResolver(IndexType);

                    SessionManager.Instance.CurrentIndex = resolver.GetIndex(IndexSelector.SelectedValue);

                    OKButton.Enabled = true;
                }
                else
                {
                    OKButton.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                ErrorResolver.ResolveError(ex, this);
            }
        }