function DepotItem (version, dateadded, baseURL, title, viewURL, dlURL) {
  this.version  = version;
  this.baseURL  = baseURL;
  this.title    = title;
  this.dateadded = dateadded;
  
  // Assuming the view and download location are the same except for the
  // .swf and .fla file extension, we use the baseURL for both.
  // If the view and download locations are different by more than
  // the file extension, viewURL and dlURL should be supplied  separately.

  this.viewURL  = viewURL;
  this.dlURL    = dlURL;
}

function DepotCategory (name) {
  this.name = name;
}

// contents of code depot table

var depot = [
  new DepotCategory("chapter 1"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap01/quiz", "multiple choice quiz, v1"),
  new DepotItem("mx", new Date(2002,8,9), "chapter-examples/chap01/quiz-mx", "multiple choice quiz, v1"),  

  new DepotCategory("chapter 2"),
  new DepotItem("5", new Date(2001,6,17), "chapter-examples/chap02/distanceCalculator-simple", "clip distance calculator"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap02/distanceCalculator", "clip distance calculator (extended)"),
  new DepotItem("5", new Date(2001,4,22), "chapter-examples/chap02/temperatureConverter", "temperature converter"),
  
  new DepotCategory("chapter 8"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap08/event-loop", "event loop"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap08/event-loop-controllable", "event loop, controllable"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap08/timeline-loop", "timeline loop"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap08/timeline-loop-emptyclip", "timeline loop (empty clip)"),
  
  new DepotCategory("chapter 9"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap09/quiz-version2", "multiple choice quiz, v2"),
  new DepotItem("mx", new Date(2002,8,9), "chapter-examples/chap09/quiz-version2-mx", "multiple choice quiz, v2"),
  
  new DepotCategory("chapter 10"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap10/custom-button", "custom button"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap10/custom-pointer", "custom pointer"),
  new DepotItem("5", new Date(2001,4,16), null, "onClipEvent(data) preloader",
                "chapter-examples/chap10/dataevent/dataEventPreloader.swf",
                "chapter-examples/chap10/dataevent/dataEventPreloader.zip"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap10/keydown-handler", "onClipEvent(keydown) handler"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap10/keyupkeydown-handlers", "onClipEvent(keyup/keydown) handlers"),
  new DepotItem("5", new Date(2001,7,28), "chapter-examples/chap10/loadevent-starfield", "onClipEvent(load) starfield"),
  
  new DepotCategory("chapter 11"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap11/historyNav", "back button with history"),  
  new DepotItem("5", new Date(2001,9,24), "chapter-examples/chap11/quiz-version3", "multiple choice quiz, v3"),
  new DepotItem("mx", new Date(2002,8,9), "chapter-examples/chap11/quiz-version3-mx", "multiple choice quiz, v3"),

  new DepotCategory("chapter 12 (2nd edition)"),
  new DepotItem("mx", new Date(2002,11,23), null, "oop application template",
                "chapter-examples/chap12/appTemplate/yourApp.swf",
                "chapter-examples/chap12/appTemplate/oopAppTemplate.zip"),
  new DepotItem("mx", new Date(2002,11,23), null, "multiple choice quiz, oop",
                "chapter-examples/chap12/ooQuiz/oo-quiz.swf",
                "chapter-examples/chap12/ooQuiz/ooQuiz.zip"),
  
  new DepotCategory("chapter 13"),
  new DepotItem("5", new Date(2001,8,12), "chapter-examples/chap13/analogClock", "analog clock"),
  new DepotItem("mx", new Date(2002,11,23), "chapter-examples/chap13/analogClockMX", "analog clock"),  
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap13/clip-stack/stackorder", "clip stack order demo"),
  new DepotItem("5", new Date(2001,9,24), null, "multiple choice quiz, v4",
                "chapter-examples/chap13/quiz-version4/quiz-version4.swf",
                "chapter-examples/chap13/quiz-version4/quiz-version4.zip"),

  new DepotCategory("chapter 14 (2nd edition)"),
  new DepotItem("mx", new Date(2002,6,27), "chapter-examples/chap14/1_ballMovieClipSubclass", "Ball, a MovieClip subclass (ex. 14-1)"),
  new DepotItem("mx", new Date(2002,6,27), "chapter-examples/chap14/2_ballSubClassInSymbol", "Ball subclass in a Library Symbol"),
  new DepotItem("mx", new Date(2002,6,27), "chapter-examples/chap14/3_ballComponent", "Ball component"),
  new DepotItem("mx", new Date(2002,6,28), "chapter-examples/chap14/4_componentTemplate", "a component template"),
  new DepotItem("mx", new Date(2002,6,28), "chapter-examples/chap14/5_baseballSubSubclass", "Baseball, a Ball subclass"),
  
  new DepotCategory("chapter 15 (1st edition)"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap15/bitwise-operations", "bitwise operations demo"),
  
  new DepotCategory("chapter 17"),
  new DepotItem("5", new Date(2001,4,2), null, "a flash form (simple echo)", "server communication/simple echo/echo.swf", 
                "server communication/simple echo/echo.zip"),
  new DepotItem("mx", new Date(2002,7,1), null, "a flash form (simple echo)", "server communication/simple echo/echo-mx.swf",
                "server communication/simple echo/echo-mx.zip"),  

  new DepotCategory("chapter 18 (1st edition)"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap18/htmltextfields", "html text fields"),
  new DepotItem("5", new Date(2001,4,15), "chapter-examples/chap18/textScroller", "basic text scroller"),

  new DepotCategory("playhead control"),
  new DepotItem("5", new Date(2002,11,31), "playheadControl/playInReverse", "play a timeline backwards"),
  new DepotItem("5", new Date(2000,9,24), "playheadControl/waitAtFrame", "wait at frame smartclip"),  
  new DepotItem("5", new Date(2000,9,24), null, "goto random frame smartclip", "playheadControl/smartClip-randomFrame.swf",  "playheadControl/smartClip-randomFrame.zip"),
    
  new DepotCategory("interface widgets"),
  new DepotItem("5", new Date(2001,5,14), "interface-widgets/carouselMenu", "carousel-style menu"),
  new DepotItem("5", new Date(2001,4,18), "interface-widgets/taborder", "custom flash 5 tab order"),
  new DepotItem("5", new Date(2000,9,23), "interface-widgets/dragndropia", "dragndropia"),
  new DepotItem("5", new Date(2001,4,14), "interface-widgets/dynamicGrid", "dynamic tile grid"),
  new DepotItem("5", new Date(2001,5,28), null, "files and windows", "interface-widgets/filesAndWindows.swf",
                "interface-widgets/filesAndWindows.zip"),
  new DepotItem("5", new Date(2001,4,2), null, "(loadable) text scroller", "interface-widgets/textScroller-pressNhold.swf",
                "interface-widgets/textScroller-pressNhold.zip"), 
  new DepotItem("5", new Date(2001,5,14), "interface-widgets/simpleScrollButtons", "scroll buttons for graphics"),
  new DepotItem("5", new Date(2001,4,18), "interface-widgets/sliderBar", "sliderBar"),
  
  new DepotCategory("motion > follow the leader"),
  new DepotItem("5", new Date(2001,7,8), "motion/follow-the-leader/followListOfPoints", "follow a list of points"),
  new DepotItem("5", new Date(2001,7,8), "motion/follow-the-leader/followGridOfPoints", "follow a grid of points"),
  new DepotItem("5", new Date(2000,9,23), "motion/follow-the-leader/simpleFollow", "simple follow"),
  new DepotItem("5", new Date(2001,6,5), "motion/follow-the-leader/rotateTowardsMouse", "rotate towards a point"),
  new DepotItem("mx", new Date(2002,11,30), "motion/follow-the-leader/rotateTowardsMouse-mx", "rotate towards the mouse"),  
  
  new DepotCategory("motion > general"),
  new DepotItem("5", new Date(2001,8,4), "motion/circular/motion-circular", "circular motion (basic)"),
  new DepotItem("5", new Date(2001,8,4), "motion/circular/motion-circular-multiple", "circular motion w/ multiple objects"),
  new DepotItem("5", new Date(2001,8,4), "motion/circular/ellipse-multiple-rotatable", "circular motion w/ rotatable ellipse"),
  new DepotItem("5", new Date(2001,8,4), "motion/circular/ellipse-multiple-rotatable-3d", "circular motion w/ \"3d\" rotatable ellipse"),  
  new DepotItem("5", new Date(2001,8,4), "motion/linear-bounce/motion-linearBounceWrap", "linear motion (bounce or wrap)"),
  new DepotItem("5", new Date(2001,8,4), "motion/spin/spinClip", "spin"),
  
  new DepotCategory("motion > trails"),
  new DepotItem("5", new Date(2000,9,24), "motion/trails/trailer-step1", "trailer tutorial, step 1"),
  new DepotItem("5", new Date(2000,9,24), "motion/trails/trailerEngine-noEffects", "trailer engine, no effects"),
  new DepotItem("5", new Date(2000,9,24), "motion/trails/trailerEngine-deluxe", "final trailer engine"),

  new DepotCategory("motion > user controlled"),
  new DepotItem("5", new Date(2000,9,20), "motion/user-controlled/spaceship/spaceship-timeadjusted", "spaceship"),

  new DepotCategory("preloaders"),
  
  new DepotItem("5", new Date(2001,3,20), "preloaders/basicPreloader", "basic movie preloader"),
  new DepotItem("5", new Date(2001,6,27), null, "generic flash 5 preload manager", "preloaders/f5PreloadManager/preloadManager.swf", "preloaders/f5PreloadManager/f5PreloadManager.zip"),
  new DepotItem("5", new Date(2001,2,23), null, "flash 5 mp3-style preloader", "preloaders/mp3StylePreloader/mp3StylePreloader.swf",                "preloaders/mp3StylePreloader/mp3StylePreloader.zip"),
  new DepotItem("mx", new Date(2003,0,5), null, "image loader w/ pan and zoom", "preloaders/ImageViewer/imageViewer.swf", "preloaders/ImageViewer/imageViewer.zip"),
  new DepotItem("mx", new Date(2003,0,21), null, "LoadVars variable preloader", "preloaders/LoadVars/loadVarsPreloader.swf", "preloaders/LoadVars/LoadVarsPreloader.zip"),
 new DepotItem("mx", new Date(2003,0,26), null, "Sound class mp3 loader", "preloaders/Sound/soundPreloader.swf", "preloaders/Sound/soundPreloader.zip"),
 new DepotItem("mx", new Date(2003,0,25), null, "xml preloader", "preloaders/XML/xmlPreload.swf", "preloaders/XML/xmlPreload.zip"),

  new DepotCategory("server communication"),
  new DepotItem("5", new Date(2001,5,6), null, "flatfile perl database", "server communication/textdb deluxe/deluxeFlatfileDatabase.swf",
                "server communication/textdb deluxe/textdb.zip"),
  new DepotItem("5", new Date(2001,8,4), null, "moockComm (basic chat client/server)", "../../chat/chatClient.swf", "../../chat/moockComm.zip"),
  
  new DepotCategory("sound"),
  new DepotItem("5", new Date(2000,11,20), "sound/panEffect", "pan effect"),
  
  new DepotCategory("strings"),
  new DepotItem("5", new Date(2002,11,31), null, "search and replace method", "strings/searchAndReplace.swf", "strings/String.replace.zip"),

  new DepotCategory("text fields"),
  new DepotItem("mx", new Date(2002,8,12), "TextField/arrayToTable", "convert an array to a table"),
  new DepotItem("mx", new Date(2002,11,3), "TextField/alternateFont", "assign font based on available fonts"),
  new DepotItem("mx", new Date(2002,11,3), "TextField/autoScroller", "auto-scroll any text field"),
  
  new DepotCategory("visuals"),
  new DepotItem("5", new Date(2000,9,23), "visuals/drawLine", "draw line in flash 5"),
  new DepotItem("5", new Date(2000,4,2), "visuals/attachNswapCandy", "attachNswapCandy"),

  new DepotCategory("xml"),
  new DepotItem("5", new Date(2002,5,17), "xml/stripEmptyTextNodes", "strip xml whitespace"),
  new DepotItem("5", new Date(2001,9,24), null, "multiple choice quiz, xml version", "xml/xmlQuiz/quiz-xmlversion.swf",
                "xml/xmlQuiz/quiz-xmlversion.zip"),
 
  new DepotCategory("miscellaneous (for now)"),
  new DepotItem("5", new Date(2000,9,23), "math/global-local-wrapper", "globalToLocal()/localToGlobal() wrapper"),  
  new DepotItem("5", new Date(2001,0,11), "math/vectorDemo", "vector calculation"),
     
  new DepotCategory("translated code samples"),
 new DepotItem("mx", new Date(2003,4,30), null, "german code samples", "translations/actionscript_dateien.zip", "translations/actionscript_dateien.zip")
  ];

