function contains(smstring,lrgstring) {
	//returns true if lrgstring contains smstring.
	//case insensitive
	smstring=smstring.toLowerCase();
	lrgstring=lrgstring.toLowerCase();
	strlen1 = smstring.length
	strlen2 = lrgstring.length
	istrue = false	
	for (i=0;i<=strlen2;i++) {
		comp=lrgstring.substring(i-1,strlen2)
		comp = comp.substring(0,strlen1)		
		if (comp == smstring) {
			istrue = true
			break
		}
	}
	return istrue
}

function NextBlock()
{
	nCurent=(nCurent+1)%Count;
	CurSpan=d.all('tspan'+nCurent);
	NextSpan=d.all ('tspan'+(nCurent+1)%Count);
}

function ClipSpan(span)
{
	var cT;
	var cB;
	if (span.style.posTop<0)
	{
		cT=Math.abs(span.style.posTop);
		cB=Height
	}
	else
	{
		cT=0;
		cB=Height-span.style.posTop;
	}
	span.style.clip='rect('+cT+' '+Width+' '+cB+' 0)';
}

function MoveIt()
{
	var cs=CurSpan.style;
	var ns=NextSpan.style;
	if (!Over)
	{
		if (cs.posTop==-1*Height)
		{
			cs.posTop=txtContainer.style.posHeight;
			ns.posTop=0;
			NextBlock();
		}
		else
		{
			cs.posTop-=1;
			ns.posTop=cs.posTop+Height;
			ClipSpan(CurSpan);
			ClipSpan(NextSpan);
		}
	}
	if (CurSpan.style.posTop==0)
	{
		setTimeout("MoveIt();",PauseTop);
	}
	else
	{
		setTimeout("MoveIt();",Scroll);
	}
}


function gAtt(s)
{
	return r.getAttribute(s);
}





if ((navigator.appVersion.substring(0, 1) >= "4") && (navigator.appName.substring(0, 9) == "Microsoft") )
{ 
	if ( contains("Macintosh",navigator.appVersion) ) 
	{
		document.write ("")
	}
	else
	{
		var CurSpan, NextSpan;
		xml = new ActiveXObject("msxml");
		xml.async = false;
		xml.url = "forat/common/xmldata.xml";
		r = xml.root;
		c = r.children;
		d = document;
		Over = false;
		Count = c.length;
		nCurent = -1;
		Width = Number(gAtt("width"));
		Height = Number(gAtt("height"));
		PauseTop = Number(gAtt("pausetop"));
		Scroll = Number(gAtt("srolldelay"));
		LinkC = gAtt("link");
		OverC = gAtt("over");
		TextC = gAtt("text");
		BackC = gAtt("background");
		Style = gAtt("style");
		Targt = gAtt("target");
		CatC = gAtt("CatC");
		if (typeof(Targt)=="")
		{
			Targt="_top";
		}

		d.write ('<div onmouseover="Over=true;" onmouseout="Over=false;" style="overflow-y: hidden; background-color: '+BackC+';color:	'+TextC+';height: '+Height+'px; width: '+Width+'; position: relative; clip: rect ( 0 '+Width+' '+Height+' 0);" id=txtContainer> ');
		i=0;
		j=0;
		for (i=0;i<Count;i++)
		{
			d.write ('<span id="tspan'+i+'" style="position: absolute;top: '+Height+';right: 15;clip: rect(0 0 0 0);'+Style+'">');
			for (j=0;j<c.item(i).children.length;j++)
			{
				node = c.item(i).children.item(j);
				nurl = node.getAttribute("href");
				audio = node.getAttribute("audio");
				cat = node.getAttribute("cat");

				if (cat!="") {d.write ('<img src="forat/images/icon2.gif"> <font color="'+CatC+'">'+node.getAttribute("cat")+'</font><BR>');}
				if (nurl != "")
				{
					d.write ('<a style="text-decoration:none;" href="'+ unescape(nurl) + '" style="color:'+LinkC+';" onmouseover="this.style.color=\''+OverC+'\';" onmouseout="this.style.color=\''+LinkC+'\';">');
					if (audio=="x") {d.write ('<BR><img src="img/article/ico_listen.gif" border=0>');}
				}
				
				
				d.write (node.text );
				if (nurl != "")
				{
					d.write ('</a>');
				}
				d.write ('<BR>');
				d.write ('<font color=#9DBC5F>'+node.getAttribute("date")+'</font><BR>');
				
			}
			d.write ('</span>');
		}
		NextBlock();
		setTimeout("MoveIt()",Scroll);
		d.write ("</div>");		
	}
}
else
{ 
	document.write ("_____")
}