content: ' function for getting bookmark position for item by id
  ' read bookmark from registry
  'TO DO: Implement Server based versions of these as well
  
  function BookmarksHelper_GetBookmarkData(id as Object) As Integer
      ?"BookmarksHelper_GetBookmarkData(" id ")"
      sec = CreateObject("roRegistrySection", "Bookmarks")
      ' check whether bookmark for this item exists
      if sec.Exists("Bookmark_" + id.ToStr())
          return sec.Read("Bookmark_" + id.ToStr()).ToInt()
      end if
      return 0
  end function
  
  ' function for setting bookmark position for item by id
  ' write bookmark to registry
  sub BookmarksHelper_SetBookmarkData(id as String, position as Integer)
      ?"BookmarksHelper_SetBookmarkData(" id "," position ")"
      sec = CreateObject("roRegistrySection", "Bookmarks")
      sec.Write("Bookmark_" + id, position.ToStr())
      sec.Flush()
  end sub
  
  ' function for removing bookmark from registry
  sub BookmarksHelper_DeleteBookmark(id as String)
      ?"BookmarksHelper_DeleteBookmark(" id ")"
      sec = CreateObject("roRegistrySection", "Bookmarks")
      sec.Delete("Bookmark_" + id)
      sec.Flush()
  end sub
  