ejs_scroll_message = new Array;
var ejs_tick_head, ejs_tick_text='', ejs_tick_prod, ejs_tick_target;

function make_tick_msg() {
  var message,m;

  message  = '<font size=2 color="#0077C0" face="Verdana, Arial, Helvetica, sans-serif">';
  message += '<b>' + ejs_tick_head + '</b>&nbsp;</font>';
  message += '<font size=2 color="#012E57" face="Verdana, Arial, Helvetica, sans-serif">';
  if ('' != ejs_tick_target) {
    message += '<a href="' + ejs_tick_target + '" target="_blank">';
    message += ejs_tick_text;
    message += ' - <b>' + ejs_tick_prod + '</b></a></font>';
  } else {
    message += ejs_tick_text;
    message += ' - <b>' + ejs_tick_prod + '</b></font>';
  }

  m = ejs_scroll_message.length;
  ejs_scroll_message[m] = message;

  message='';
  ejs_tick_head = ejs_tick_text = ejs_tick_prod = ejs_tick_target = '';

}

function tick_product(prodname) {
  var p;
  ejs_tick_prod = prodname;
  p = ejs_tick_prod.search(/ /);
  while (p >= 0) {
    ejs_tick_prod = ejs_tick_prod.substr(0,p) +'&nbsp;' + ejs_tick_prod.substr(p+1,200);
    p = ejs_tick_prod.search(/ /);
  }
//  ejs_tick_prod = prodname.replace("/ /", "&nbsp;");
}
function tick_headline(thead) {
  ejs_tick_head = thead;
}
function tick_news(message) {
  if ('' == ejs_tick_text) {
    ejs_tick_text = message;
  } else {
    ejs_tick_text = ejs_tick_text + ' ' + message;
  }
}
function tick_link(url) {
  ejs_tick_target = url;
}
