<pre>function selectedFields layer  toComputer  ----------------------------------------------------------------------  if layer is "card" or layer is "cd" then    put liste("selectedCardFields") into theSelectedFields    if theSelectedFields is empty then      if the number of cd flds = 0 then return empty      repeat with x = 1 to the number of cd flds        put the long name of cd fld x into line x of theSelectedFields      end repeat    end if  end if  ----------------------------------------------------------------------  if layer is "background" or layer is "bkgnd" or layer is "bg" then    put liste("selectedBkgndFields") into theSelectedFields    if theSelectedFields is empty then      if the number of bg flds = 0 then return empty      repeat with x = 1 to the number of bg flds        put the long name of bg fld x into line x of theSelectedFields      end repeat    end if  end if  -----------------------------------------------------------------------  return theSelectedFieldsend selectedFields</pre>