<pre>on togglelock  toComputer  push cd  repeat with x = 1 to the number of bgs    go to bg x    if the number of flds > 0 then      repeat with y = 1 to the number of flds        set lockText of fld y to not lockText of fld y      end repeat    end if  end repeat  repeat with x = 1 to the number of cds    go to cd x    if the number of cd flds > 0 then      repeat with y = 1 to the number of cd flds        set lockText of cd fld y to not lockText of cd fld y      end repeat    end if  end repeat  pop cdend togglelock</pre>