home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Electronic Whole Earth Catalog
/
ElectronicWholeEarthCatalog.img
/
COMMUNITY
/
stack.txt
< prev
Wrap
Text File
|
1989-02-09
|
26KB
|
937 lines
-- stack: in
-- format: 8 (HyperCard 1)
-- flags: 0x1000 (none)
-- protect password hash: 0
-- maximum user level: 5 (scripting)
-- window: Rect(x1=0, y1=0, x2=0, y2=0)
-- screen: Rect(x1=0, y1=0, x2=0, y2=0)
-- card dimensions: w=0 h=0
-- scroll: x=0 y=0
-- background count: 8
-- first background id: 14703
-- card count: 655
-- first card id: 15017
-- list block id: 3474
-- print block id: 115223
-- font table block id: 0
-- style table block id: 0
-- free block count: 3
-- free size: 17408 bytes
-- total size: 1622016 bytes
-- stack block size: 25600 bytes
-- created by hypercard version: 0x00000000
-- compacted by hypercard version: 0x01228000
-- modified by hypercard version: 0x01228000
-- opened by hypercard version: 0x01228000
-- patterns[0]: 0x1144114411441144
-- patterns[1]: 0x8000000008000000
-- patterns[2]: 0x8800220088002200
-- patterns[3]: 0x8888222288882222
-- patterns[4]: 0x88AA22AA88AA22AA
-- patterns[5]: 0xCCAA33AACCAA33AA
-- patterns[6]: 0xEEAABBAAEEAABBAA
-- patterns[7]: 0xEEBBBBEEEEBBBBEE
-- patterns[8]: 0xFFBBFFEEFFBBFFEE
-- patterns[9]: 0xFFFFFFFFFFFFFFFF
-- patterns[10]: 0x0000000000000000
-- patterns[11]: 0x55AA55AA55AA55AA
-- patterns[12]: 0x8822882288228822
-- patterns[13]: 0x1122448811224488
-- patterns[14]: 0xC4800C6843023026
-- patterns[15]: 0xB130031BD8C00C8D
-- patterns[16]: 0xAA00AA00AA00AA00
-- patterns[17]: 0x8822552288225522
-- patterns[18]: 0x8855225588552255
-- patterns[19]: 0x77DD77DD77DD77DD
-- patterns[20]: 0x8000000000000000
-- patterns[21]: 0xAA55AA55AA55AA55
-- patterns[22]: 0x038448300C020101
-- patterns[23]: 0x8244394482010101
-- patterns[24]: 0x8814224188412214
-- patterns[25]: 0x8080413E080814E3
-- patterns[26]: 0x22048C7422179810
-- patterns[27]: 0xBE808808EB088880
-- patterns[28]: 0x25C8328964244C92
-- patterns[29]: 0xA29C41BE2AC914EB
-- patterns[30]: 0x40A00000040A0000
-- patterns[31]: 0x8040200002040800
-- patterns[32]: 0xAA00800088008000
-- patterns[33]: 0xFF80808080808080
-- patterns[34]: 0x081C22C180010204
-- patterns[35]: 0xFF808080FF080808
-- patterns[36]: 0xF87422478F172271
-- patterns[37]: 0xBF00BFBFB0B0B0B0
-- patterns[38]: 0xFF7FBE5DA2418000
-- patterns[39]: 0xFAF5FAF5A050A050
-- checksum: 0x0
----- HyperTalk script -----
-- final stack script 2/2/89 jdt
------------------------------ Initialize Stack ------------------------------
on openstack
hide menuBar
initStackList
initSound
send "initAccUpdate" to bg "Access" -- for access updating
end openstack
on initStackList
global stackList
-- note: there is no stack 13; MUSIC is #14
put "COMMUNITY,COMMUNICATIONS,CRAFT,HEALTH" into stackList
put ",HOUSEHOLD,LEARNING,LIVELIHOOD,MEDIA,NOMADICS" after stackList
put ",PLACE,WHOLE SYSTEMS,INTRODUCTION,,MUSIC" after stackList
end initStackList
--------------------------- Misc HyperCard Msgs ------------------------------
on closeStack
send "exitAccUpdate" to bg "Access" -- for access updating
end closeStack
on closeCard
-- turn off sound, if any, before leaving card
soundCloseCard
end closeCard
on doMenu menuChoice
if menuChoice = "Help" then
goHelp
else
pass doMenu
end if
end doMenu
------------------------------ Sound Scripts ------------------------------
on initSound
global curSnd, sndRefNum
put 0 into sndRefNum
put empty into curSnd
end initSound
function openSound shortname
put the long name of this stack into foo
delete first word of foo
delete first char of foo
delete last char of foo
repeat with i = length(foo) down to 1
if char i of foo is ":" then exit repeat
end repeat
put (char 1 to i of foo) & shortname into bar
return OpenRes(bar)
end openSound
on idle
global curSnd, curChunk
if curSnd is not empty then
put curSnd & "." & curChunk into chunkName
if the sound is chunkName then
add 1 to curChunk
play curSnd & "." & curChunk
else if the sound is "done" then
get curSnd
put empty into curSnd
set hilite of card button ("Sound " & it) to false
end if
end if
pass idle
end idle
on playLong sndName
global curSnd, curChunk, sndRefNum
if curSnd is not empty then
stopSnd
else
put char 1 to 2 of sndName into prefix
-- special case for down home records
if prefix is "dh" OR prefix is "DH" then
put char 3 to 4 of sndName into num
if num > 35 then put "d2" into prefix
else put "d1" into prefix
end if
put openSound( "SoundFiles:" & prefix & ".chunx" ) into sndRefNum
put sndName into curSnd
set hilite of card button ("Sound " & curSnd) to true
put 1 into curChunk
play curSnd & "." & curChunk
end if
end playLong
on stopSnd
global curSnd, curChunk
play stop
if curSnd is not empty
then
set hilite of card button ("Sound " & curSnd) to false
end if
put empty into curSnd
put 0 into curChunk
end stopSnd
on soundCloseCard
global sndRefNum
stopSnd
if sndRefNum is not 0 then
closeRes sndRefNum
end if
put 0 into sndRefNum
end soundCloseCard
on newSoundBtn sndCode
-- authoring script to create a new sound button to play 'sndCode' resource
doMenu "New Button"
put "Sound" && sndCode into sndBtnName
set the name of last button to sndBtnName
set the style of btn sndBtnName to transparent
set the icon of btn sndBtnName to 13667 -- musical note icon id
set the rect of btn sndBtnName to "291,301,329,337"
set the autoHilite of btn sndBtnName to true
set the showName of btn sndBtnName to false
put "on mouseUp" & return into sndScript
put " playLong" && sndCode & return after sndScript
put "end mouseUp" & return after sndScript
set the script of btn sndBtnName to sndScript
choose Browse tool
end newSoundBtn
---------------------- Misc Hypercard Object Utilities ----------------------
function hasCdField what
repeat with i = 1 to number of cd fields
if short name of cd field i = what then return true
end repeat
return false
end hasCdField
function hasBgField what
repeat with i = 1 to number of bg fields
if short name of bg field i = what then return true
end repeat
return false
end hasBgField
on listFields
-- handy utility for listing names of all fields on a card
-- hidden fields are marked with asterisks
set lockScreen to true
doMenu "New Field"
put the number of card fields into here
set name of card field here to "fieldListing"
set style of card field "fieldListing" to scrolling
set the rect of card field "fieldListing" to "0,20,200,300"
set textFont of card field "fieldListing" to monaco
set textSize of card field "fieldListing" to 9
set lockScreen to false
repeat with cntr = 1 to the number of bkgnd fields
put short name of bg fld cntr into fldName
get the visible of bg fld cntr
if it is true then
put " " && "bg" && "fld" && Quote & fldName & Quote & Return after cd fld "fieldListing"
else
put "*" && "bg" && "fld" && Quote & fldName & Quote & Return after cd fld "fieldListing"
end if
end repeat
put Return after card field "fieldListing"
repeat with cntr = 1 to the number of card fields
put short name of cd fld cntr into fldName
get the visible of cd fld cntr
if it is true then
put " " && "cd" && "fld" && Quote & fldName & Quote & Return after cd fld "fieldListing"
else
put "*" && "cd" && "fld" && Quote & fldName & Quote & Return after cd fld "fieldListing"
end if
end repeat
end listFields
on listButtons
set lockScreen to true
doMenu "New Field"
put the number of card fields into here
set name of card field here to "fieldListing"
set style of card field "fieldListing" to scrolling
set the rect of card field "fieldListing" to "0,20,200,300"
set textFont of card field "fieldListing" to monaco
set textSize of card field "fieldListing" to 9
set lockScreen to false
repeat with cntr = 1 to the number of bkgnd buttons
put short name of bg btn cntr into btnName
get the visible of bg btn cntr
if it is true then
put " " && "bg" && "btn" && Quote & btnName & Quote & Return after cd fld "fieldListing"
else
put "*" && "bg" && "btn" && Quote & btnName & Quote & Return after cd fld "fieldListing"
end if
end repeat
put Return after card field "fieldListing"
repeat with cntr = 1 to the number of card buttons
put short name of cd btn cntr into btnName
get the visible of cd btn cntr
if it is true then
put " " && "cd" && "btn" && Quote & btnName & Quote & Return after cd fld "fieldListing"
else
put "*" && "cd" && "btn" && Quote & btnName & Quote & Return after cd fld "fieldListing"
end if
end repeat
end listButtons
------------------------------ Make New Cards -------------------------------
-- Authoring scripts for creating new article cards.
--
on emptyFields
-- empties all card and bkgnd fields on the present card
put number of bg fields into fc
repeat with i = 1 to fc
put empty into bg field i
end repeat
put number of cd fields into fc
repeat with i = 1 to fc
put empty into cd field i
end repeat
end emptyFields
on copyFields srcCard, destCard
go to srcCard
put number of fields into fc
repeat with i = 1 to fc
put short name of fld i into thisFldName
put fld thisFldName of srcCard into fld thisFldName of destCard
end repeat
put number of cd fields into fc
repeat with i = 1 to fc
put short name of cd fld i into thisFldName
put cd fld thisFldName of srcCard into cd fld thisFldName of destCard
end repeat
end copyFields
on newReview
push card
go to first card of bkgnd "Review"
put the id of this bg into goodBgID
domenu copy card
pop card
domenu paste card
emptyFields
if the id of this bg is not goodBgID then
answer "The background ID is bad. Deleting..." with "OK"
doMenu "Delete Card"
exit newReview
end if
put "Review" into fld "theIdent"
put "Menu" into field "theHeading"
answer "Do you want?" with "New Title" or "Prev Title"
if it is "New Title" then
ask "What Title for this Review?"
put it into fld "theTitle"
else
put fld "theTitle" of prev card into fld "theTitle"
end if
answer "Use?" with "New Acc#" or "Prev Acc#"
if it is "New Acc#" then
ask "What Accession number for this Review?"
put it into field "Accession"
else
put fld "Accession" of prev card into fld "Accession"
end if
end newReview
on newAccess
push card
go to first card of bkgnd "Access"
put the id of this bg into goodBgID
domenu copy card
pop card
domenu paste card
emptyFields
if the id of this bg is not goodBgID then
answer "The background ID is bad. Deleting..." with "OK"
doMenu "Delete Card"
exit newAccess
end if
put "Access" into fld "theIdent"
put "Menu" into field "theHeading"
put field "theTitle" of previous card into field "theTitle"
put field "accession" of previous card into field "accession"
Answer "Does this item require a Survey Acc #?" with "Yes" or "No"
if it is "Yes" then
ask "What Survey Accession number for this item?"
put it into field "SurveyAccession"
end if
end newAccess
on newExcerpt
push card
go to first card of bkgnd "Excerpt"
put the id of this bg into goodBgID
domenu copy card
pop card
domenu paste card
emptyFields
if the id of this bg is not goodBgID then
answer "The background ID is bad. Deleting..." with "OK"
doMenu "Delete Card"
exit newExcerpt
end if
put "Excerpt" into fld "theIdent"
put "Menu" into field "theHeading"
put field "theTitle" of previous card into field "theTitle"
put field "accession" of previous card into field "accession"
end newExcerpt
on newPicture
push card
go to first card of bkgnd "Picture"
domenu copy card
pop card
domenu paste card
emptyFields
if the id of this bg is not goodBgID then
answer "The background ID is bad. Deleting..." with "OK"
doMenu "Delete Card"
exit newPicture
end if
put "Picture" into fld "theIdent"
put "Menu" into field "theHeading"
put field "theTitle" of previous card into field "theTitle"
put field "accession" of previous card into field "accession"
Answer "Is this Picture a full-screen graphic?" with "Yes" or "No"
if it is "Yes" then
put "X" into fld "fullScreen"
else
put empty into fld "fullScreen"
end if
end newPicture
---------------------------- Lookup Scripts ------------------------------
-- Most of the action in the Catalog consists of jumping from one card to
-- another. These are the underlying scripts for 'lookup'.
function whichstack theAccess
-- Each stack has a unique two-digit identifier. Thses identifiers are used
-- as prefixes for all accession numbers in the Whole Earth stacks. By
-- examining the first two digits of any accession number we can deternine
-- what Whole Earth stack contains the article corresponding to an accession
-- number.
global stackList
put char 1 to 2 of theAccess into theStack
return item theStack of stackList
end whichstack
on lookup theAccess, theEffect
-- This is the key navigation script. 'theAccess' is either a card id or
-- an accession number. If it is a card id, we go there forthwith.
-- Otherwise it is an accession number and we must find the accession
-- number in theaccList and then get the card id from the corresponding
-- line in the idList.
global accList, idList
lock screen
if theAccess contains "card id" then -- theAccess is a card id, go there
go to theAccess
unlock screen with theEffect
exit lookup
end if
-- it's an accession; check to see if it is in a different stack and if so,
-- go there.
put whichStack(theAccess) into theStack
if theStack is not (short name of this stack) then
set lockrecent to true
go to stack theStack
set lockrecent to false
end if
-- reload accList and idList
-- only necessary if 'lookup' is given an accession number
put char 1 to 2 of theAccess into accStack
put char 1 to 2 of accList into accListStack
if accStack <> accListStack then
put field "theIDs" of card "Contents" into idList
put field "theAccessions" of card "Contents" into accList
end if
-- find access number in accList
put offset(theAccess, accList) into where
if where is 0 then
beep
put "Lookup failed on access #" & theAccess && "..." into errMsg
answer errMsg with "OK"
else
-- calculate its line and get corresponding card id in idList
put line (where div 9 + 1) of idList into targetID
go to targetID
unlock screen with theEffect
end if
end lookup
----------------------- Navigation on the Fly -------------------------------
-- Normally the navigation buttons ("Map", "Right", "Left", "Up" and "Down")
-- check their corresponding "dest" field for a card id or an accession
-- number and then call 'lookup' with that information. However, if the
-- "dest" field is empty, the button will call one of the following scripts
-- which calculates the destination on the fly. This was useful during
-- development when the "dest" fields were empty.
--
function getLastIMap
put empty into lastIMapFld
put number of cd flds into cdFldCount
repeat with i = 1 to cdFldCount
if short name of cd fld i = "iMap" then
put i into lastIMapFld
end if
end repeat
return lastIMapFld
end getLastIMap
on prevSection
set lockscreen to true
backupToBG "Cluster Map"
if bkgnd field "theIdent" of prev card is "Section Map" then
backupToBG "Cluster Map"
end if
unlock screen with scroll right
end prevSection
on nextSection
set lockscreen to true
go to next card of bkgnd "Cluster Map"
if bkgnd field "theIdent" of prev card is "Section Map" then
go to next card of bkgnd "Cluster Map"
end if
unlock screen with scroll left
end nextSection
on prevMap
set lockscreen to true
if bkgnd field "theIdent" of prev card is "Cluster Map" then
go to next card of bkgnd "Cluster Map"
end if
backupToBG "Item Map"
unlock screen with scroll right
end prevMap
on nextMap
set lockscreen to true
go to next card of bkgnd "Item Map"
if bkgnd field "theIdent" of prev card is "Cluster Map" then
go to prev card
backupToBG "Cluster Map"
go to next card of bkgnd "Item Map"
end if
unlock screen with scroll left
end nextMap
on prevArticle
lock screen
-- back out of present article by looking for different accession
put fld "accession" into thisAcc
repeat while fld "accession" = thisAcc
set cursor to busy
go to prev card
end repeat
-- if in Item Map, go to article in last "iMap" field
-- else if in prev article, go to page 1
if short name of this bg is "Item Map" then
put getLastIMap() into lastIMap
send mouseUp to cd fld lastIMap
else
repeat
set cursor to busy
if short name of this bg <> "Picture" then -- "thePage" is cd fld
if word 1 of fld "thePage" is "1" then
exit repeat
end if
end if
go to prev card
end repeat
end if
unlock screen with scroll right slow
end prevArticle
on nextArticle
lock screen
put fld "accession" into thisAcc
-- push forward out of present article
repeat while fld "accession" = thisAcc
set cursor to busy
go to next card
end repeat
-- if we're in a Review, stop
-- else we are in a Map bg,
-- back up to Item Map, then forward one
if short name of this bg contains "Map" then
go to prev card -- in case at "Section Map"
backupToBG "Item Map"
go to next card
end if
unlock screen with scroll left slow
end nextArticle
on prevPage -- page back in article
put fld "accession" into thisAcc
put fld "accession" of prev card into prevAcc
lock screen
if prevAcc <> thisAcc then -- wrap from first page to last page
repeat while fld "accession" of next card = thisAcc
go to next card
end repeat
else
go to prev card
end if
unlock screen with scroll left
end prevPage
on nextPage -- page forward in article
put fld "accession" into thisAcc
put fld "accession" of next card into nextAcc
lock screen
if nextAcc <> thisAcc then -- wrap from last page to first page
repeat while fld "accession" of prev card = thisAcc
go to prev card
end repeat
else
go to next card
end if
unlock screen with scroll left
end nextPage
on backupToBG bgName
repeat with i = (the number of this card -1 ) down to 1
if (field theIdent of card i) is bgName then exit repeat
set cursor to busy
end repeat
if (field theIdent of card i) is not bgName then
go to last card
repeat with i = (the number of this card -1 ) down to 1
if (field theIdent of card i) is bgName then exit repeat
set cursor to busy
end repeat
end if
go to card i
end backupToBG
-------------------------- Navigation Buttons -------------------------------
-- The Navigation Buttons are the "Map", "Left", and "Right" buttons, and the
-- pager buttons: "Up" and "Down" on the Article cards. Their scripts are
-- centralized at the stack level (rather than in the buttons themselves)
-- for convenience during development.
---------------------- Cluster Map Navigation Buttons -----------------------
on doClusterMapButton
if fld "MapDest" is not empty then
lookup fld "MapDest", "dissolve"
else
visual effect dissolve
go to first card of bg "Section map"
end if
end doClusterMapButton
on doClusterLeftButton
if fld "LeftDest" is not empty then
lookup fld "LeftDest", "scroll right"
else
prevSection
end if
end doClusterLeftButton
on doClusterRightButton
if fld "RightDest" is not empty then
lookup fld "RightDest", "scroll left"
else
nextSection
end if
end doClusterRightButton
------------------------ Item Map Navigation Buttons --------------------------
on doItemMapButton
if fld "MapDest" is not empty then
lookup fld "MapDest", "dissolve"
else
lock screen
backUpToBG "Cluster Map"
unlock screen with dissolve
end if
end doItemMapButton
on doItemLeftButton
if fld "LeftDest" is not empty then
lookup fld "LeftDest", "scroll right"
else
prevMap
end if
end doItemLeftButton
on doItemRightButton
if fld "RightDest" is not empty then
lookup fld "RightDest", "scroll left"
else
nextMap
end if
end doItemRightButton
------------------------ Article Navigation Buttons --------------------------
on doArticleMapButton
if fld "MapDest" is not empty then
lookup fld "MapDest", "dissolve"
else
lock screen
backUpToBG "Item Map"
unlock screen with dissolve
end if
end doArticleMapButton
on doArticleLeftButton
if fld "LeftDest" is not empty then
lookup fld "LeftDest", "scroll right slow"
else
prevArticle
end if
end doArticleLeftButton
on doArticleRightButton
if fld "RightDest" is not empty then
lookup fld "RightDest", "scroll left slow"
else
nextArticle
end if
end doArticleRightButton
on doArticleUpButton
if fld "UpDest" is not empty then
lookup fld "UpDest", "scroll right"
else
prevPage
end if
end doArticleUpButton
on doArticleDownButton
if fld "DownDest" is not empty then
lookup fld "DownDest", "scroll left"
else
nextPage
end if
end doArticleDownButton
--------------------------- Popdown Menu Scripts -----------------------------
function popMenu itemList, itemCount
-- itemCount is the number of items passed by client
-- put the paramCount
put the short name of this bg into bgName
if bgName is "Access" then
put ",(-,Help,Contents,Index,Print Article,Print Order Form,Quick Search,Quit" into menuString
else if bgName is in "Review,Excerpt,Picture" then
put ",(-,Help,Contents,Index,Print Article,(Print Order Form,Quick Search,Quit" into menuString
else
put ",(-,Help,Contents,Index,(Print Article,(Print Order Form,Quick Search,Quit" into menuString
end if
put the rect of target into popRect
add 1 to item 3 of popRect -- compensate for error in XFCN code
put popDown( itemList & menuString, popRect ) into theCommand
-- should client handle the command?
if theCommand <= itemCount
then RETURN theCommand
-- otherwise, we should handle it
subtract itemCount+1 from theCommand
if theCommand = 1 then
goHelp
else if theCommand = 2 then
go to card "contents"
else if theCommand = 3 then
goIndex
else if theCommand = 4 then
printArt
else if theCommand = 5 then
printOrderForm
else if theCommand = 6 then
go to stack "Quick Search"
else if theCommand = 7 then
doMenu "Quit Hypercard"
end if
return 0
end popMenu
on goWholeEarth
-- called by "Earth" buttons and the popdown menus
visual effect checkerboard slow
go to card 2 of stack "WHOLE EARTH"
end goWholeEarth
on goIndex
global indexLetter
if indexLetter is not in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" then
put "A" into indexLetter
end if
visual effect checkerboard slow
do "go to card" && indexLetter && "of stack Index"
end goIndex
on printArt
-- no user control is offered
-- we just print all the cards of the article in succession
lock screen
set lockRecent to true
push card
-- back up just beyond first card of article
put field "accession" into acc
repeat while field "accession" = acc
go to prev card
end repeat
-- move ahead to beginning of article
go to next card
-- print each card of the article
open printing
repeat while field "accession" = acc
print card
go to next card
end repeat
close printing
pop card
set lockRecent to false
unlock screen
end printArt
on printOrderForm
go to stack "EWEC Order Form"
end printOrderForm
on goHelp
put short name of this bg into bgName
if bgname = "Section Map" then
put "Domain" into bgName
else if bgName = "Cluster Map" then
put "Section" into bgName
else if bgName = "Item Map" then
put "Cluster" into bgName
else if bgName = "Picture" then
if fld "fullScreen" is not empty then
put "Full Screen Picture" into bgName
end if
end if
put showHelp(bgName) into choice
if choice = 1 then
go to card id 63823 of stack "Introduction"
else if choice = 2 then
go to stack "Help"
end if
end goHelp
------------------------ Popdown Navigation --------------------------------
on popBackToEarth
visual effect dissolve
go to card 2 of "WHOLE EARTH"
end popBackToEarth
on popBackToDomain
visual effect dissolve
go to first card of bg "Section Map"
end popBackToDomain
on popBackToClusterMap
if line 3 of fld "popupDest" is empty then
visual effect dissolve
backupToBG "Cluster Map"
else
lookup line 3 of fld "popupDest", "dissolve"
end if
end popBackToClusterMap
on popBackToItemMap
if line 4 of fld "popupDest" is empty then
visual effect dissolve
backupToBG "Item Map"
else
lookup line 4 of fld "popupDest", "dissolve"
end if
end popBackToItemMap
---------------------------- Popmenu Scripts ---------------------------------
-- Clicking on the "Menu" field brings up a popdown menu by calling one of the
-- following scripts depending on the card's background. The only difference
-- is in the number of hierarchy levels above a particular card. When the
-- chooses to return to a higher level, the script will dissolve to each
-- intervening level until arriving at the chosen level.
--
on popMenuCMap
get popMenu( field "popup", 2 )
if it = 0 then exit popMenuCMap
if it <= 2 then popBackToDomain
if it <= 1 then popBackToEarth
end popMenuCMap
on popMenuIMap
get popMenu( field "popup", 3 )
if it = 0 then exit popMenuIMap
if it <= 3 then popBackToClusterMap
if it <= 2 then popBackToDomain
if it <= 1 then popBackToEarth
end popMenuIMap
on popMenuArticle
get popMenu( field "popup", 4 )
if it = 0 then exit popMenuArticle
if it <= 4 then popBackToItemMap
if it <= 3 then popBackToClusterMap
if it <= 2 then popBackToDomain
if it <= 1 then popBackToEarth
end popMenuArticle