<pre>on doToSelectedBkgnds doWhat  put "Protect,Unprotect,Mark,Unmark,Show,Hide,Edit" into doWhatDomain  if doWhat is not in doWhatDomain then exit doToSelectedBkgnds  put selectedBkgnds() into theSelectedBkgnds  if theSelectedBkgnds is empty then exit doToSelectedBkgnds  repeat with x = 1 to the number of bgs    if the id of bg x is in theSelectedBkgnds then      if doWhat is "Protect" then set cantDelete of bg x to true      if doWhat is "Unprotect" then set cantDelete of bg x to false      if doWhat is "Mark" then mark cds where the number of this bg is x      if doWhat is "Unmark" then unmark cds where the number of this bg is x      if doWhat is "Edit" then edit the script of bg x      if doWhat is "Show" then        go to bg x        show bg picture      end if      if doWhat is "Hide" then        go to bg x        hide bg picture      end if    end if  end repeatend doToSelectedBkgnds</pre>