/* 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 = 20;
    width  = 200;
    break;
  }

  var html = 
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Allopathic Medicine<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Athletic Training<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Biomedical Engineering<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Chiropractic<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Clinical Psychology<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Dentistry<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Epidemiology<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Genetic Counseling<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Hospital Administration<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Medical Illustration<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Medical Informatics<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Medical Research<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Medical Social Work<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Nursing<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Occupational Therapy<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Optometry<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Osteopathic Medicine<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Pharmacy<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Physical Therapy<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Physician Assistant<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Podiatric Medicine<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Public Health<\/' + elm + '>' +
  '<' + elm + ' style="font: 13px arial, helvetica, sans-serif; text-align: center;">Veterinary Medicine<\/' + elm + '>' +
  ''
  ;

  var marquee = new xbMarquee(id, height, width, 2, 85, 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();};
}

