/*
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 = 105;
    width  = 400;
    break;
  }

  var html = 
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image1.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image2.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image3.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image4.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image5.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image6.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image7.jpg" width="132" height="99"><\/' + elm + '>' +
  '<' + elm + ' style="background-color: black;"><img border="2" src="scroller/image8.jpg" width="132" height="99"><\/' + elm + '>' +
''  
;

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