// JScript source code
		bStop	=	false
		dPos	=	1.5

		function FlowingText(top,width,idDiv,idP,text,href)
		{
			++TextIndex;
			InitHtml(idDiv,idP,text,href);	
			InitFlowingText(top,idDiv,idP,text,width);		
		}


		/* ******************************************************************** */		
		TextIndex = 0;
		pos   = new Array;
		idDiv = new Array;
		idP   = new Array;
		width = new Array;
		bIntervalStarted = false;
		
		function ResetFlowingText(newtext)
		{
		    idP[TextIndex].innerText=newtext;
		 	pos[TextIndex]   = width[TextIndex];
		}
		function InitFlowingText(top,_idDiv,_idP,text,_width)
		{
			// lancia funzione timer;
			if(bIntervalStarted==false)
			{
				window.setInterval("UpdateFlowingText()",10)		
				bIntervalStarted=true;
			}	
			
			idDiv[TextIndex] =getElement(_idDiv);
			idP[TextIndex]   = getElement(_idP);
			width[TextIndex] = _width;
			pos[TextIndex]   = width[TextIndex];
			w=0;
			if(width[TextIndex]==null)
				w=400;
			else
				w=width[TextIndex];				
			hw=(width[TextIndex]-w)/2;							
			// stile div
			idDIV=idDiv[TextIndex];
			idDIV.style.left =(PageWidth-width[TextIndex])/2;
			idDIV.style.top=top;
			idDIV.style.width=width[TextIndex];
			//stile P
			idTEXT=idP[TextIndex];
			idTEXT.style.left=pos[TextIndex];	
			idTEXT.style.top=(idDIV.offsetHeight-idTEXT.offsetHeight)/2 
		}
		function UpdateFlowingText()
		{
			if(bStop==true)
				return
			for(i=1;i<=TextIndex;++i)
			{
				pos[i]=pos[i]-dPos;
				idP[i].style.left=pos[i];							
				if(pos[i]+idP[i].offsetWidth<=hw)
					pos[i]=w;
			}					
		}
		function InitHtml(idDiv,idP,text,href)
		{
			document.write('<div nowrap=true class=divLayerFlowingText id='+idDiv+'>');
			document.write('<div id=idBackgroundFlowingText class=divBackgroundFlowingText >'+strIMGButtonBackground()+'</div>');			
			if(href==null)
				document.write('<p onMouseOver="if(href!=null) bStop=true" onMouseOut="bStop=false" class=pTextFlowingText id="'+idP+'" align="center">'+text+'</p>');
			else				
				document.write('<a class=aTextFlowingText target=_parent href='+href+' id="'+idP+'" >'+text+'</a>');
			document.write('</div>');				
		}


