home *** CD-ROM | disk | FTP | other *** search
- on insertKey NewKey
- global UsrDivKeys, UsrDivKeyCount
- if NewKey = EMPTY then
- return
- end if
- if UsrDivKeyCount = 0 then
- set UsrDivKeys to NewKey & ","
- set UsrDivKeyCount to UsrDivKeyCount + 1
- return
- end if
- if NewKey < item 1 of UsrDivKeys then
- put NewKey & "," before item 1 of UsrDivKeys
- set UsrDivKeyCount to UsrDivKeyCount + 1
- return
- end if
- repeat with i = 1 to UsrDivKeyCount
- if item i of UsrDivKeys = NewKey then
- return
- next repeat
- end if
- if NewKey < item i of UsrDivKeys then
- put NewKey & "," before item i of UsrDivKeys
- set UsrDivKeyCount to UsrDivKeyCount + 1
- return
- end if
- end repeat
- put NewKey after item i of UsrDivKeys
- set UsrDivKeyCount to UsrDivKeyCount + 1
- end
-