/**
 * Playlist Application main program
 *
 * Copyright: (c)2007 CK Web Technologies
 * Author:    Chris Knowles <chris.knowles@ckweb.com.au>
 * Version:   $Id: main.js 19 2007-10-16 00:05:04Z Chris $
 */

(function(){
    
    $E.onDomload(
    
        function ()
        {
            /**
             *  Number of songlists to store in memory
             */
            var songlistCacheSize = 10;
            
            /**
             *  Number of seconds between autosaves
             */
            var autoSaveInterval = 10;
            
            /**
             * Create and load the app 
             */
            var app = new PlaylistApp;
            app.load(songlistCacheSize, autoSaveInterval);
            
            /**
             * Autolad a playlist if coming from songlist page menu
             */
            if (loadSonglist != undefined) {
                app.Songlist.autoload(loadSonglist.type, loadSonglist.val);
            }
        } 
          
    );

})();