on PrepareMovie
  Global gWinObj,gOldPos,gDoQuit
  
  ClearGlobals
  
  set the windowList = []
  
  set gDoQuit = TRUE
  
  set gWinObj = new(script"kWinObj",336,260,TRUE,0,0,"HotReader",52,"HotRead",EMPTY,FALSE,TRUE,TRUE)
 end PrepareMovie
 
 
 on StopMovie
   Global gWinObj,gOldPos
   
   if objectP(gWinObj) then
     set gOldPos = mKillWin(gWinObj)
   end if
   
   set gWinObj = EMPTY
 end StopMovie
 
 
 on ThumbWindow
   Global gWinObj,gDoQuit,gThumbObj,gOldPos
   
   set gDoQuit = FALSE
   
   if objectP(gWinObj) then
     mCloseWin(gWinObj)
   end if
   
   set gThumbObj = w(script"kWinObj",32,30,TRUE,0,0,"HotSmall",52,"thumb",gOldPos,FALSE,FALSE,TRUE)
 end ThumbWindow
 
 
 on CloseThumb
   Global gThumbObj
   
   if objectP(gThumbObj) then
     mCloseWin(gThumbObj)
   end if
 end CloseThumb
 
 
 on BigWindow
   Global gWinObj,gOldPos,gDoQuit,gThumbObj
   
   set gDoQuit = TRUE
   
   if objectP(gThumbObj) then
     set gOldPos = mKillWin(gThumbObj)
   end if
   
   mOpenWin(gWinObj)
 end BigWindow
 
 
 on Finish
   Global gDoQuit,gWinObj,gThumbObj
   
   if gDoQuit then
     if objectP(gThumbObj) then
       mKillWin(gThumbObj)
     end if
     if objectP(gWinObj) then
       mKillWin(gWinObj)
     end if
     if the runMode <> "Author" then
       quit
     end if
   end if
 end Finish
