on GetNowConf
 Global gLoadObj,gTextPath,gLimit,gGifObj,gAktLine
 
 set the text of field "big_list" to "-"
 set the text of field "line_Ctn" to "000"
 set the text of field "line_Act" to "000"
 set the text of field "info_url" to " "
 set gAktLine = 0
 mEmptyPict(gGifObj)
 mKillPref(gLoadObj,"data" & gLimit & "datconf.txt")
 mAddLoadNet(gLoadObj,gTextPath & "datconf.txt","data" & gLimit & "datconf.txt",2,false)
end GetNowConf


on GetNowEntr
 Global gContent,gAktLine,gAktProp,gGifObjPath,gTextPath,gLimit,gLoadObj
 
 if count(gContent) > 0 then
   set gAktLine = value(the text of field "line_Act")
   if gAktLine > 0 then
     set mySource = line gAktLine of (the text of field "big_list")
     set gAktProp = getProp(getAt(gContent,1), mySource)
     
     set the text of field "entry_name" to mySource
     set the text of field "img_name" to GetListPropAsValue(mySource,2)
     set the text of field "txt_name" to GetListPropAsValue(mySource,3)
     
     mAddLoadNet(gLoadObj,gGifObjPath & the text of field "img_name","data" & gLimit & the text of field "img_name",1,TRUE)
      mAddLoadNet(gLoadObj,gTextPath & the text of field "txt_name","data" & gLimit & the text of field "txt_name",3,TRUE)
    end if
  end if
end GetNowEntr


on GetListEntry
  Global gContent,gAktLine,gAktProp,gGifObjPath,gTextPath,gLimit,gLoadObj
  
  if count(gContent) > 0 then
    set gAktLine = GetListValues(the mouseV,the clickOn,"big_list")
    if gAktLine > 0 then
      set mySource = line gAktLine of (the text of field "big_list")
      set gAktProp = getProp(getAt(gContent,1), mySource)
      
      LoadRecord(mySource)
    end if
  end if
end GetListEntry


on ToggleHelp me
  Global gHelpObj
  
  mToggleHelp(gHelpObj)
end ToggleHelp


on DoThumb
  Global gWinObj
  
  if NOT(voidP(gWinObj)) AND gWinObj <> "" then
    tell the stage to ThumbWindow()
  end if
end DoThumb


on OpenPara
  Global gDialogObj,gHelpObj
  
  mKillHelp(gHelpObj)
  
  sendAllSprites(#mSetPause)
  
  if the machineType = 256 then
    set myWinType = 4
  else
    set myWinType = 52
  end if
  
  set gDialogObj = w(script"kWinObj",192,160,TRUE,0,0,"Parameter",myWinType,"para",EMPTY,TRUE,FALSE,FALSE)
end OpenPara


on ClosePara
  Global gDialogObj
  
  mKillWin(gDialogObj)
  
  sendAllSprites(#mSetActive)
  
  abort
end ClosePara


on OpenFind
  Global gDialogObj,gHelpObj
  
  mKillHelp(gHelpObj)
  
  sendAllSprites(#mSetPause)
  
  if the machineType = 256 then
    set myWinType = 4
  else
    set myWinType = 52
  end if
  
  set gDialogObj = new(script"kWinObj",192,65,TRUE,0,0,"Find",myWinType,"search",EMPTY,TRUE,FALSE,FALSE)
end OpenFind


on CloseFind wichOne
  Global gDialogObj,gContent,gAktLine
  
  mKillWin(gDialogObj)
  set gDialogObj = EMPTY
  
  sendAllSprites(#mSetActive)
  
  if wichOne <> "" then
    set gAktLine = (findPosNear(getAt(gContent,1), wichOne))
    set myMaxLine = the number of lines of (the text of field "big_list")
    set the scrollTop of member "big_list" = 0    
    scrollByLine member "big_list",gAktLine - 1
    
    if gAktLine > 0 AND gAktLine < myMaxLine then
      hilite line gAktLine of member "big_list"
      set mySource = line gAktLine of (the text of field "big_list")
      set gAktProp = getProp(getAt(gContent,1), mySource)
      
      LoadRecord(mySource)
    end if
  end if
  
  abort
end CloseFind


on LoadRecord wichOne
  Global gAktLine,gLoadObj,gGifObjPath,gLimit,gTextPath
  
  set the text of field "entry_name" to wichOne
  set the text of field "img_name" to GetListPropAsValue(wichOne,2)
  set the text of field "txt_name" to GetListPropAsValue(wichOne,3)
  set the text of field "line_Act" to MakeNull(gAktLine,3)
  
  if GetListPropAsValue(wichOne,4) = "y" then 
    set myLoad = TRUE
  else
    set myLoad = FALSE
  end if
  
  mAddLoadNet(gLoadObj,gGifObjPath & the text of field "img_name","data" & 
              gLimit & the text of field "img_name",1,myLoad)
  mAddLoadNet(gLoadObj,gTextPath & the text of field "txt_name","data" & 
              gLimit & the text of field "txt_name",3,myLoad)
end LoadRecord


on GoToTheURL
  Global gLoadObj
  
  set myURL = line 1 of the text of field "info_url"
  
  if browserName() <> "" then
    mSetStatus(gLoadObj,"Start" && GetBrowserName())
    gotoNetPage myURL
  else
    alert("Keinen voreingestellten Browser gefunden")
  end if
end GoToTheURL


on SetDataText
  Global gDataObj
  
  mText(gDataObj)
end SetDataText


on SetDataImg
  Global gDataObj
  
  mImage(gDataObj)
end SetDataImg
