/*
xbMarquee-test.js

This script performs the setup for a number of 
demonstration tests of the xbMarquee object.

*/

function startMarquee(id, dir, behav)
{
  var elm;
  var height;
  var width;

  switch (dir)
  {
  case 'up':
  case 'down':
    // use divs to contain each item in the marquee to force
    // each item to begin on different lines
    elm = 'div';
    height = 180;
    width  = 600;
    break;

  case 'left':
  case 'right':
  default:
    // use spans to contain each item in the marquee to force
    // each item to begin on the same line
    elm = 'span';
    height = 104;
    width  = 740;
    break;
  }

  var html = 
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/rearspoilercorolla.jpg" width="178" height="99"><\/' + elm + '>' +    
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/06Corolladoorsill.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/knobs.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/06CorollaExhaustTip.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/06CorollaAWmats.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/06CorollaMask.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/mudguardscorolla.jpg" width="178" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroll/autodimmingmirror.jpg" width="178" height="99"><\/' + elm + '>' +

''  
;

  var marquee = new xbMarquee(id, height, width, 4, 40, dir, behav, html);

  // due to limitations in Internet Explorer's initialization of
  // element heights and widths, execute the marquee start method
  // in the page's load event handler.
  window.onload = function () {marquee.start();};
}

