var l1 =   0; // left of ticker in pixel, or 0 to position relative
var t1 =   330; // top of ticker in pixel, or 0 to position relative
var w1 = 750; // width of ticker in pixel
var ie = document.all ? true : false;
var first = true;
var l2 = l1 + w1;
var l3 = l1 - l2;
var l = l2;

function scroll()
{
if (ie)
	{
	if (l1 == 0 && t1 == 0)
		{
		pos = document.all['tickpos'];
		l1= pos.style.left;
		t1 = pos.style.top;
		//alert ("IE  l1 "+l1+"  "+ll1+" t1 "+t1+"  "+tt1);
		var winX=(screen.availWidth);//   calculate left margin
		l1=0;
		}
	ticktext.style.top = t1;//  set vertical position
	//alert("l1 "+l1+"   t1 "+t1)
	}
else
	{
	//alert (ie);
	//alert (l1+"  "+t1);
	if (l1 == 0 && t1 == "0")
		{
		pos = document.anchors['tickpos'];
		l1 = pos.style.left;
		t1 = pos.style.top;
		//l1 = pos.x;
		//t1 = pos.y;
		alert (l1+"  "+t1);
		}
	//document.ticktext.pageY = t1;
	document.getElementById ("ticktext").style.top = (t1+"px");
	}
	
l2 = l1 + w1;
l3 = l1 - l2;
l = l2;
 
setInterval('tick()', 10);
}

function getLeft(ll) {
if (ll.offsetParent)
return (ll.offsetLeft + getLeft(ll.offsetParent));
else 
return (ll.offsetLeft);
}

function getTop(ll) {
if (ll.offsetParent)
return (ll.offsetTop + getTop(ll.offsetParent));
else
return (ll.offsetTop);
}

function tick() {
//l = l - 0.5;
l = l - 2;/// ticker speed (originally - 0.5) 

if (l < l3) l = l2;
cl = l1 - l;
cr = l2 - l;
if (ie)
	{
	ticktext.style.left = l;
	ticktext.style.top = t1;
	ticktext.style.clip = "rect(auto,"+cr+"px,auto,"+cl+"px)";
	//alert (l);
	//alert (cl);
	if (first) ticktext.style.visibility = "visible";		//IE
	}
else
	{
	document.getElementById ("ticktext").style.left = (l+"px");
	document.getElementById ("ticktext").style.top = (t1+"px");
	document.getElementById ("ticktext").style.clip = "rect(auto,"+cr+"px,auto,"+cl+"px)";
	//alert ("l ="+l+"  cl ="+cl+"  cr ="+cr);
	if (first) {document.getElementById ("ticktext").style.visibility = "visible"};	  //notIE
	}
document.getElementById ("ticktext").style.whiteSpace="nowrap";
first = false;
}

