/// <summary>
    /// Update Expand script
    /// </summary>
    public void UpdateExpandedScript(MapFilter mapfilter, string header)
    {
        string searchPage = (ViewState[SEARCHPAGE] == null) ? String.Empty : ViewState[SEARCHPAGE].ToString();

        ViewState[EXPAND_QUERY]   = mapfilter.SqlWhere;
        ViewState[EXPAND_SECTOR]  = mapfilter.Layers;
        ViewState[EXPAND_VISIBLE] = mapfilter.VisibleLayers;
        ViewState[EXPAND_HEAD]    = header;

        // Safety storing of sql
        // Store the current sql in cookie. Only used as fallback if ViewState fails to store values
        CookieStorage.SaveExpandMap(Response, mapfilter.SqlWhere, mapfilter.Layers, header, mapfilter.VisibleLayers);
    }