
// WebTicker by Mioplanet
// www.mioplanet.com

Conveyor_CONTENT = document.getElementById("Conveyor").innerHTML;
 
Conveyor_RIGHTTOLEFT = true;
Conveyor_SPEED = 3;
Conveyor_PAUSED = false;
Conveyor_POS = 0;

conveyor_start();

function conveyor_start()
{
  var tickerSupported = false;
  Conveyor_WIDTH = document.getElementById("Conveyor").style.width;

  // Firefox
  if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1)
  {
    document.getElementById("Conveyor").innerHTML = "<TABLE cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'><SPAN ID='Conveyor_BODY' width='100%'>&nbsp;</SPAN></TD></TR></TABLE>";
    tickerSupported = true;
  }
  // IE
  if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1)
  {
    document.getElementById("Conveyor").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'><SPAN ID='Conveyor_BODY' width='100%'></SPAN></DIV>";
    tickerSupported = true;
  }
  if(!tickerSupported)
    document.getElementById("Conveyor").outerHTML = "";
  else
  {
    document.getElementById("Conveyor").scrollLeft = Conveyor_RIGHTTOLEFT ? document.getElementById("Conveyor").scrollWidth - document.getElementById("Conveyor").offsetWidth : 0;
    document.getElementById("Conveyor_BODY").innerHTML = Conveyor_CONTENT;
    document.getElementById("Conveyor").style.display="block";
  }

  document.getElementById("Conveyor").scrollLeft = 945;

}

function MoveLeft()
{
  if (Conveyor_POS >= 105)
  {
    Conveyor_POS = 0;
	return;
  }
  document.getElementById("Conveyor").scrollLeft += Conveyor_SPEED;
  Conveyor_POS = Conveyor_POS+Conveyor_SPEED;

  window.setTimeout("MoveLeft()", 0);
}

function MoveRight()
{
  if (Conveyor_POS >= 105)
  {
    Conveyor_POS = 0;
	return;
  }
  document.getElementById("Conveyor").scrollLeft -= Conveyor_SPEED;
  Conveyor_POS = Conveyor_POS+Conveyor_SPEED;

  window.setTimeout("MoveRight()", 0);
}