private void DrawProfilesModule()
        {
            string output = string.Empty;
            string tab    = string.Empty;

            tab = Request.QueryString["tab"];

            if (Request.QueryString["searchtype"] == "everything")
            {
                tab = "all";
            }
            if (Request.QueryString["searchtype"] == "people")
            {
                tab = "people";
            }
            Utilities.DataIO data = new Profiles.Search.Utilities.DataIO();

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchString", base.Namespaces) != null)
            {
                //   output += "<li>" + base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchString", base.Namespaces).InnerText + "</li>";
                foreach (XmlNode n in base.BaseData.SelectNodes("rdf:RDF/rdf:Description/vivo:overview/SearchDetails/SearchPhraseList/SearchPhrase", base.Namespaces))
                {
                    output += "<li>" + n.InnerText + "</li>";
                }
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://xmlns.com/foaf/0.1/lastName']", base.Namespaces) != null)
            {
                output += "<li>" + base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://xmlns.com/foaf/0.1/lastName']", base.Namespaces).InnerText + "</li>";
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://xmlns.com/foaf/0.1/firstName']", base.Namespaces) != null)
            {
                output += "<li>" + base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://xmlns.com/foaf/0.1/firstName']", base.Namespaces).InnerText + "</li>";
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://profiles.catalyst.harvard.edu/ontology/prns#hasPersonFilter']", base.Namespaces) != null)
            {
                string s = string.Empty;
                if (!Request.QueryString["otherfilters"].IsNullOrEmpty())
                {
                    s = Request.QueryString["otherfilters"];
                    if (!s.IsNullOrEmpty())
                    {
                        foreach (GenericListItem gi in data.GetOtherOptions(s))
                        {
                            Filters = data.GetConvertedURIListItem(data.GetListOfFilters(), gi.Value);
                            output += "<li>" + Filters + "</li>";
                        }
                    }
                }
                else
                {
                    List <GenericListItem> g = new List <GenericListItem>();
                    g = data.GetListOfFilters();

                    foreach (XmlNode x in base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://profiles.catalyst.harvard.edu/ontology/prns#hasPersonFilter']", base.Namespaces))
                    {
                        s       = data.GetConvertedURIListItem(g, x.InnerText);
                        output += "<li>" + s + "</li>";
                    }
                }
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://vivoweb.org/ontology/core#positionInOrganization']", base.Namespaces) != null)
            {
                if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://vivoweb.org/ontology/core#positionInOrganization']/@IsExclude", base.Namespaces).Value == "1")
                {
                    Institution = "(Except)";
                }

                Institution += data.GetConvertedURIListItem(data.GetInstitutions(), base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://vivoweb.org/ontology/core#positionInOrganization']", base.Namespaces).InnerText);
                output      += "<li>" + Institution + "</li>";
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://profiles.catalyst.harvard.edu/ontology/prns#positionInDepartment']", base.Namespaces) != null)
            {
                if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://profiles.catalyst.harvard.edu/ontology/prns#positionInDepartment']/@IsExclude", base.Namespaces).Value == "1")
                {
                    Department = "(Except) ";
                }

                Department += data.GetConvertedURIListItem(data.GetDepartments(), base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://profiles.catalyst.harvard.edu/ontology/prns#positionInDepartment']", base.Namespaces).InnerText);
                output     += "<li>" + Department + "</li>";
            }

            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://profiles.catalyst.harvard.edu/ontology/prns#positionInDivision']", base.Namespaces) != null)
            {
                Division = data.GetConvertedURIListItem(data.GetDivisions(), base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property2='http://profiles.catalyst.harvard.edu/ontology/prns#positionInDivision']", base.Namespaces).InnerText);
                output  += "<li>" + Division + "</li>";
            }



            if (base.BaseData.SelectSingleNode("rdf:RDF/rdf:Description/vivo:overview/SearchOptions/MatchOptions/SearchFiltersList/SearchFilter[@Property='http://profiles.catalyst.harvard.edu/ontology/prns#hasFacultyRank']", base.Namespaces) != null)
            {
                foreach (GenericListItem gi in data.GetFacultyRanks())
                {
                    if (base.BaseData.SelectSingleNode(".").InnerXml.Contains(gi.Value) && !gi.Value.IsNullOrEmpty())
                    {
                        Rank    = gi.Text;
                        output += "<li>" + Rank + "</li>";
                    }
                }
            }
            if (base.BaseData.SelectNodes("rdf:RDF/rdf:Description/vivo:overview/SearchDetails/SearchPhraseList", base.Namespaces).Count > 0 && tab == "people")
            {
                litWhyText.Text = "<div style='margin-top:5px;'>Click \"Why?\" to see why a" + (tab == "people" ? " person" : "n item") + " matched the search.</div>";
            }
            else
            {
                litWhyText.Visible = false;
            }


            litSearchCriteria.Text = output;
        }
        protected void rDetail_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                DataRowView l_Item            = (DataRowView)e.Item.DataItem;
                CheckBox    l_checkDetailText = (CheckBox)e.Item.FindControl("checkDetailText");

                if (l_Item[DataDetailCheckedField] != DBNull.Value && (bool)l_Item[DataDetailCheckedField])
                {
                    l_checkDetailText.Checked = true;
                }

                l_checkDetailText.Text = l_Item[DataDetailTextField].ToString();

                HiddenField l_hdnDetailText = (HiddenField)e.Item.FindControl("hdnDetailText");
                l_hdnDetailText.Value = l_Item[DataDetailTextField].ToString();

                HiddenField l_hdnDetailID = (HiddenField)e.Item.FindControl("hdnDetailID");
                l_hdnDetailID.Value = l_Item[DataDetailIDField].ToString();


                l_checkDetailText.Attributes.Add("onclick", string.Format("ClickCheckBox('{0}', this);", ClientID));

                if (this.SearchRequest != null)
                {
                    if (!end && this.SearchRequest.OuterXml.Contains(data.GetConvertedListItem(data.GetListOfFilters(), l_checkDetailText.Text)))
                    {
                        script += "document.getElementById('" + l_checkDetailText.ClientID + "').checked=true; ClickCheckBox('" + ClientID + "',document.getElementById('" + l_checkDetailText.ClientID + "'));";
                    }
                }
            }
        }