<pre>on toggleLockFields  toComputer  if the number of cd flds > 0 then    repeat with x = 1 to the number of cd flds      set lockText of cd fld x to not lockText of cd fld x    end repeat  end if  if the number of flds > 0 then    repeat with x = 1 to the number of flds      set lockText of fld x to not lockText of fld x    end repeat  end ifend toggleLockFields</pre>