function Search_Update(obj, fPreviewing)
{
    var sAttributes = GetAttribute(obj, "pAttributes");

    Plugin_Update(sAttributes, fPreviewing, true);
    Plugin_ShowCaptionEx(sAttributes);
    
    var fSorting  = parseInt(Plugin_GetFormOption(sAttributes, PLUGIN_FORM_OPTION_Option1)) > 0;
    var fPagesize = parseInt(Plugin_GetFormOption(sAttributes, PLUGIN_FORM_OPTION_Option2)) > 0;
    
    LookupSearch_ShowSort(fSorting);
    LookupSearch_ShowPageSize(fPagesize);
}

function Search_GetAttributes()
{
    return Plugin_GetFormAttributes();
}

function Search_Validate(sNewAttributes, sOldAttributes)
{
    return Command_Validate(sNewAttributes, sOldAttributes, PLUGIN_FORM_OPTION_SetPageSize, true, true, "Set \"Page Size\" value is invalid");
}
