// Setup Scrolling constants
scrollingSPEED = 1;
scrollingSTYLE = "line-height:20px; background:#345812; font-family:Arial; font-weight:bold; font-size:12px; color:#FFFFFF;";
StartScrolling();

function StartScrolling() {
	// Get scrolling info from HTML page 
	scrollingTEXT = document.getElementById("SCROLLING").innerHTML;
	scrollingWIDTH = document.getElementById("SCROLLING").style.width;
	
	// Default support flag to not supported
	var scrollingSupported = false;

	// Default leading spacer so that text scrolls from right to left starting from far right
	var spacerheading = "<img src=/images/bkg-scroll.JPG width="+scrollingWIDTH+" height=10>";


	// Check Internet Explorer if supported
	if (navigator.userAgent.indexOf("MSIE")!=-1 && navigator.userAgent.indexOf("Opera")==-1) {
		// Create the inner HTML with a div tag and spacerheading
		document.getElementById("SCROLLING").innerHTML = "<DIV nowrap='nowrap' style='width:100%;'>"+spacerheading+"<SPAN style='"+scrollingSTYLE+"' ID='scrollingBODY' width='100%'></SPAN>"+spacerheading+"</DIV>";
		scrollingSupported = true;
	}
	// Check Firefox if supported
	if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1) {
		// Create the innter HTML with a table tag and spacerheading
		document.getElementById("SCROLLING").innerHTML = "<TABLE cellspacing='0' cellpadding='0' width='100%'><TR><TD nowrap='nowrap'>"+spacerheading+"<SPAN style='"+scrollingSTYLE+"' ID='scrollingBODY' width='100%'>&nbsp;</SPAN>"+spacerheading+"</TD></TR></TABLE></SPAN>";
		scrollingSupported = true;
	}
	if(scrollingSupported) {
		document.getElementById("scrollingBODY").innerHTML = scrollingTEXT;
		document.getElementById("SCROLLING").style.display="block";
		document.getElementById("SCROLLING").scrollLeft = 0;
		ScrollingTicker();
	} else {
		document.getElementById("SCROLLING").outerHTML = "";
	}
}

function ScrollingTicker() {
	document.getElementById("SCROLLING").scrollLeft += scrollingSPEED;
	if(document.getElementById("SCROLLING").scrollLeft >= document.getElementById("SCROLLING").scrollWidth - document.getElementById("SCROLLING").offsetWidth) document.getElementById("SCROLLING").scrollLeft = 0;
	window.setTimeout("ScrollingTicker()", 21);
}
