<pre>on hideAllButtons  ---  if the editBkgnd then    if the number of bg btns = 0 then return "Nothing to hide"    repeat with x = 1 to the number of bg btns      hide bg btn x    end repeat  else    if the number of cd btns = 0 then return "Nothing to hide"    repeat with x = 1 to the number of cd btns      hide cd btn x    end repeat	  end if  ---end hideAllButtons</pre>