var ETSOOMarqueeIntervals=[];
function ETSOOMarquee(aM,sId,iWidth,iHeight,iSpeed,iDirect)
{
	if(sId==null)sId="ETSOOMarqueeDiv";
	if(iWidth==null||iHeight==null)return false;
	if(iSpeed==null)iSpeed=30;
	if(iDirect==null)iDirect=0;
	var oT=document.getElementById(sId);
	if(oT)
	{
		var sList;
		if(typeof(aM)=="object")
		{
			sList='';
			var iLen=aM.length;
			for(var i=0;i<iLen;i++)
			{
				var aOne=aM[i];
				sList+=ETSOOMarqueeDoList(aOne,i);
			}
		}
		else sList=aM;
		sT='<table width="100%" border="0" cellpadding="0" cellspacing="0">';
		if(iDirect%2==0)
		{
			sT+='<tr>';
			sT+='<td id="'+sId+'_TD1" nowrap="nowrap">'+sList+'</td>';
			sT+='<td id="'+sId+'_TD2" nowrap="nowrap">'+sList+'</td>';
			sT+='</tr>';
		}
		else
		{
			sT+='<tr><td id="'+sId+'_TD1" nowrap="nowrap">'+sList+'</td></tr>';
			sT+='<tr><td id="'+sId+'_TD2" nowrap="nowrap">'+sList+'</td></tr>';
		}
		sT+='</table>';
		oT.innerHTML=sT;
		oT.onmouseover=function(){var oI=ETSOOMarqueeIntervals[this.id];if(oI)window.clearInterval(oI);};
		oT.onmouseout=function(){ETSOOMarqueeIntervals[this.id]=window.setInterval("ETSOOMarqueeAdd('"+this.id+"',"+iDirect+")",iSpeed)};
		
		with(oT.style)
		{
			overflow="hidden";
			width=iWidth+"px";
			height=iHeight+"px";
		}
		oT.onmouseout();
	}
}
function ETSOOMarqueeMyList(aOne,sOne,i)
{
	return sOne;
}
function ETSOOMarqueeDoList(aOne,i)
{
	var sImg=aOne[0];
	var sTitle=aOne[1];
	var sLink=aOne[2];
	var sTarget=aOne[3];
	var sOne='<img src="'+sImg+'" border="0" title="'+sTitle+'" />';
	if(sLink)
	{
		sLink='<a href="'+sLink+'" title="'+sTitle+'"';
		if(sTarget)sLink+=' target="'+sTarget+'"';
		sLink+='>';
		sOne=sLink+sOne+'</a>';
	}
	sOne=ETSOOMarqueeMyList(aOne,sOne,i);
	
	return sOne;
}
function ETSOOMarqueeAdd(sId,iDirect)
{
	var oT=document.getElementById(sId);
	var oT1=document.getElementById(sId+"_TD1");
	var oT2=document.getElementById(sId+"_TD2");
	if(oT!=null&&oT1!=null&&oT2!=null)
	{
		if(iDirect==0)
		{
			if(oT2.offsetWidth-oT.scrollLeft<=0)oT.scrollLeft-=oT1.offsetWidth;
			else oT.scrollLeft++;
		}
		else if(iDirect==1)
		{
			if(oT2.offsetHeight-oT.scrollTop<=0)oT.scrollTop-=oT1.offsetHeight;
			else oT.scrollTop++;
		}
		else if(iDirect==2)
		{
			if(oT.scrollLeft==0)
			{
				oT.scrollLeft=oT2.offsetWidth;
			}
			else oT.scrollLeft--;
		}
		else
		{
			if(oT.scrollTop==0)
			{
				oT.scrollTop=oT1.offsetHeight;
			}
			else oT.scrollTop--;
		}
	}
}