if( typeof (marqueeWidth) == 'undefined' || !marqueeWidth )
{ var marqueeWidth="300px"; }	//Specify the marquee's width (in pixels)

if( typeof (marqueeHeight) == 'undefined' || !marqueeHeight )
{ var marqueeHeight="36px" }	//Specify the marquee's height

if( typeof (marqueeSpeed) == 'undefined' || !marqueeSpeed )
{	var marqueeSpeed=( document.all ? 2 : 3 ); }	//Specify the marquee's marquee speed (larger is faster 1-10)

if( typeof (marqueeBgColor) == 'undefined' || !marqueeBgColor )
{ var marqueeBgColor = "#f0f0f0"; }	//configure background color:

if( typeof (pauseOver) == 'undefined' || ( !pauseOver && pauseOver != 0 ) )
{ var pauseOver = 1; }				//Pause marquee onMousever (0=no. 1=yes)?

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):
if( typeof marqueeContent == 'undefined' || !marqueeContent )
{
	var marqueeContent='<nobr>News: there are no breaking news at the moment</nobr>';
}

////NO NEED TO EDIT BELOW THIS LINE////////////
marqueeSpeed	= (document.all) ? marqueeSpeed : Math.max(1, marqueeSpeed-1); //slow speed down by 1 for NS
var copySpeed	= marqueeSpeed;
var pauseSpeed	= (pauseOver==0) ? copySpeed : 0;
var iedom 		= document.all || document.getElementById;
var actualWidth = '';
var crossMarquee, nsMarquee;

if (iedom)
{
	document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-99999px;left:-99999px">'+marqueeContent+'</span>');
}

function populate()
{
	if (iedom)
	{
		crossMarquee = document.getElementById ? document.getElementById("iemarquee") : document.all.iemarquee;
		crossMarquee.style.left = parseInt(marqueeWidth)+8+"px";
		crossMarquee.innerHTML = marqueeContent;
		actualWidth = document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth;
	}
	else if (document.layers)
	{
		nsMarquee = document.nsMarquee.document.nsMarquee2;
		nsMarquee.left = parseInt(marqueeWidth)+8;
		nsMarquee.document.write(marqueeContent);
		nsMarquee.document.close();
		actualWidth = nsMarquee.document.width;
	}
	leftTime = setInterval("scroll_marquee()",40);
}

window.onload = populate;

/**
 * Functions
 */
function scroll_marquee()
{
	if (iedom)
	{
		if (parseInt(crossMarquee.style.left) > (actualWidth*(-1)+8))
			crossMarquee.style.left = parseInt(crossMarquee.style.left) - copySpeed + "px";
		else
			crossMarquee.style.left = parseInt(marqueeWidth) + 8 + "px";
	}
	else if (document.layers)
	{
		if (nsMarquee.left > (actualWidth*(-1)+8))
			nsMarquee.left -= copySpeed;
		else
			nsMarquee.left = parseInt(marqueeWidth) + 8;
	}
}
