/*
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 = 100;
    width  = 200;
    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 = 128;
    width  = 740;
    break;
  }

  var html = 
    '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/01view.jpg" width="228" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/02benchview.jpg" width="186" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/03deer.jpg" width="149" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/04balloon.jpg" width="101" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/05bridges.jpg" width="186" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/06deer.jpg" width="232" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/07LR.jpg" width="83" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/08front.jpg" width="240" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/10kit.jpg" width="83" height="124"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="1" src="images/scroller/09BC.jpg" width="83" height="124"><\/' + elm + '>' +
''  
;

  var marquee = new xbMarquee(id, height, width, 2, 86, 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();};
}

