// BEHAVIOUR: WELCOME PAGE (SLIDESHOW, etc)

// (c) 2006 Kleeton PL - all rights reserved

try
{

    // 'HOST-PAGE LOADED' - called when complete page loaded with images, etc.
    // Initially, only start slideshow projector if broadband (to ensure responsiveness on low-bandwidth); however,
    // when page fully downloaded (hence cached), & then re-entered, slideshow will download even if low-bandwidth.
    // Site response-times (& UX) are improved by use of common image-files for slideshows.
    // Tech-Note: when the classes are instantiated below, the instance-reference is stored as usual.
    //            This is done to allow instance-inspection and to be conventional. However, for these specific classes,
    //            saving the instance-reference is optional, as instance-methods assigned to the DOM, etc,
    //            have closures, which will maintain the instance even though the constructor has terminated.

    KPL.app.hostLoaded = function ()
    {
      try
      {
          KPL.css.ctrl1  = new KPL.css.Ctrl();
          KPL.img.viewz1 = new KPL.img.Viewz('hdslideshow', 'hdbutzoom', 'hdslideshgt');

          if (KPL.app.slowLoad())  { return; }                                     // abort if slow page load.

          KPL.sld.projctorb1 = new KPL.sld.ProjctorB( 'hdslideshow',     // target element for slideshow
                                                      3,                 // first-slide  duration in secs
                                                      5,                 // other-slides duration in secs
                                                      3,                 // resume-after-pause delay in secs
                                                      0.1,               // start delay, in secs (breathing-space)
                                                      'hdbutnext',       // target element1 for next-click   [otherwise use '']
                                                      '',                // target element2 for next-click   [otherwise use '']
                                                      'hdlogo',          // target element1 for hover-pause  [otherwise use '']
                                                      '',                // target element2 for hover-pause  [otherwise use '']
                                                      'images',          // slides-folder - relative to page [otherwise use '']
                                                      'hd_bkgd1.jpg',
                                                      'hd_bkgd5.jpg',
                                                      'hd_bkgd2.gif',
                                                      'hd_bkgd3.jpg',
                                                      'hd_bkgd4.jpg' );
      }
      catch(e) {}
    };

    // SCRIPT INITIALISATION
    // Enable event for when page fully loaded

    KPL.app.enableNotifyOnPageLoad(KPL.app.hostLoaded);

}
catch(e) {}

// end script

