protected void Page_PreRender(object sender, EventArgs e)
    {
        if (hdnSelectedPatternRow.Text != "")
        {
            gvPatterns.Rows[Int32.Parse(hdnSelectedPatternRow.Text)].Attributes.Remove("onmouseout");
            gvPatterns.Rows[Int32.Parse(hdnSelectedPatternRow.Text)].Style.Add("background", "lightblue");
            pnlMatchForm.Visible  = true;
            pnlScriptForm.Visible = true;
            txtPattern.Text       = hdnSelectedPatternName.Text;
            lblExportPattern.Text = OSAEScriptManager.PatternExport(hdnSelectedPatternName.Text);
        }
        if (hdnSelectedMatchRow.Text != "")
        {
            gvMatches.Rows[Int32.Parse(hdnSelectedMatchRow.Text)].Attributes.Remove("onmouseout");
            gvMatches.Rows[Int32.Parse(hdnSelectedMatchRow.Text)].Style.Add("background", "lightblue");
            txtMatch.Text = hdnSelectedMatchName.Text;
        }

        if (hdnSelectedScriptRow.Text != "")
        {
            gvScripts.Rows[Int32.Parse(hdnSelectedScriptRow.Text)].Attributes.Remove("onmouseout");
            gvScripts.Rows[Int32.Parse(hdnSelectedScriptRow.Text)].Style.Add("background", "lightblue");
        }
    }