				var arrColors	= new Array();
				var arrLinks	= new Array();
				
				var indiceColore = 25;
				var indiceLink = 0;
				var verso = false;
				var stop = false;
				var intTempo = 100;
				
				var indiceMassimo = 3
				
				function popolaVettori()
				{
				//gamma dei colori di riferimento

					arrColors[0]='#e9ecf3';
					arrColors[1]='#e9ecf3';
					//arrColors[0]='#fffec4';
					//arrColors[1]='#fffec4';
					arrColors[2]='#eae9bd';
					arrColors[3]='#e0dfba';
					arrColors[4]='#d7d6b7';
					arrColors[5]='#cecdb4';
					arrColors[6]='#c4c3b1';
					arrColors[7]='#bab9ae';
					arrColors[8]='#b0afab';
					arrColors[9]='#a8a7a8';
					arrColors[10]='#9e9da5';
					arrColors[11]='#9493a2';
					arrColors[12]='#8b8a9f';
					arrColors[13]='#82819c';
					arrColors[14]='#797899';
					arrColors[15]='#6f6e96';
					arrColors[16]='#676693';
					arrColors[17]='#5d5c91';
					arrColors[18]='#53528b';
					arrColors[19]='#4b4a8b';
					arrColors[20]='#424188';

					arrColors[21]='#383785';
					arrColors[22]='#383785';
					arrColors[23]='#383785';
					arrColors[24]='#383785';
					arrColors[25]='#383785';
					arrColors[26]='#383785';
				
				//gamma dei valori da visualizzare

					if (document.getElementById('tdBandi') != null)
					{
						var arrDivBandi = document.getElementById('tdBandi').getElementsByTagName('div');
						for (i=0;i<arrDivBandi.length;i++)
						{
							arrLinks[i] = arrDivBandi[i].innerHTML;
						}
						indiceMassimo=arrDivBandi.length-1;
						
						if (indiceMassimo != -1)
						{
							document.getElementById('tdBandi').innerHTML = arrLinks[0];
						}
					}
					
				/*	var arrDiv = document.getElementById('tdOpportunita').getElementsByTagName('div');
					for (i=0;i<arrDiv.length;i++)
					{
						arrLinks[i] = arrDiv[i].innerHTML;
					}
					indiceMassimo=arrDiv.length-1;
					
					if (indiceMassimo != -1)
					{
						document.getElementById('tdOpportunita').innerHTML = arrLinks[0];
					}
				*/
				}
				
				function giostra()
				{
					//var objTd = document.getElementById('tdOpportunita');
					var objTdBandi = document.getElementById('tdBandi');

					if (verso==true)
					{
						indiceColore ++;
						
					}	
					else
					{
						indiceColore--;
					}
					
					//determinazione del tempo di scorrimento===================	
					intTempo=100;
					if(indiceColore>21)
					{
						intTempo=600;
					}
					//=============================================================
					if (indiceColore==26)
					{
						verso = false;
					}
					else if (indiceColore==0)
					{
						verso = true;
						indiceLink ++;
						
						
						if (indiceLink > indiceMassimo)
						{
							indiceLink = 0 ;
						}
						
						/*
						//qui cambio il contenuto della tabella
						if(indiceMassimo!=-1)
						{
							objTd.innerHTML= arrLinks[indiceLink];
						}*/
					}

					/*var arrFonts = objTd.getElementsByTagName('font')
					var arrAncors = objTd.getElementsByTagName('a')
					for(i=0;i<arrAncors.length;i++)
					{
						arrAncors[i].style.color = arrColors[indiceColore];
						//arrFonts[i].style.color = arrColors[indiceColore];
					}*/
					
					if (document.getElementById('tdBandi') != null)
					{
						var arrFontsBandi = objTdBandi.getElementsByTagName('font')
						var arrAncorsBandi = objTdBandi.getElementsByTagName('a')
						for(i=0;i<arrAncorsBandi.length;i++)
						{
							arrAncorsBandi[i].style.color = arrColors[indiceColore];
							arrFontsBandi[i].style.color = arrColors[indiceColore];
						}
					}

					if (stop==false)
					{
						setTimeout("giostra()",intTempo);
					}
				}

				function adduma()
				{
					stop=true;
					indiceColore=26;
					var objTd = document.getElementById('tdOpportunita');
					var arrFonts = objTd.getElementsByTagName('font')
					var arrAncors = objTd.getElementsByTagName('a')
					for(i=0;i<arrAncors.length;i++)
					{
						arrAncors[i].style.color = arrColors[indiceColore];
						arrFonts[i].style.color = arrColors[indiceColore];
					}		
				}
				
				function getPaginaFinanziamenti()
				{
					var strQuery = queryString(null);
					if(strQuery != '')
					{
						//window.location.href='Finanziamenti.aspx?flag_tipo=' + queryString('flag_tipo') + '&idEnte=' + queryString('idEnte');
						document.formLinkFinanziamenti.selRegione.value=document.getElementById('selReg').value;
						document.formLinkFinanziamenti.selTerritorio.value=document.getElementById('selTer').value;
						document.formLinkFinanziamenti.selComune.value=document.getElementById('selCom').value;

						var stringa = sendUrlArgs();
						
						if (stringa.indexOf("id=")>-1)
						{
							stringa = stringa.substring(stringa.indexOf("id=")-1,0);	
						}
												
						document.formLinkFinanziamenti.action='Finanziamenti.aspx' + stringa;
						
						document.formLinkFinanziamenti.submit();						
					}
					else
					{
						window.location.href='Finanziamenti.aspx?' + strQuery;
					}
					//	strQuery = '?' + strQuery ;
				}
				
				function getPaginaRiferimentiUtili()
				{
					var strQuery = queryString(null);
					if(strQuery != '')
					{
						//window.location.href='Finanziamenti.aspx?flag_tipo=' + queryString('flag_tipo') + '&idEnte=' + queryString('idEnte');
						document.formLinkRiferimentiUtili.selRegione.value=document.getElementById('selReg').value;
						document.formLinkRiferimentiUtili.selTerritorio.value=document.getElementById('selTer').value;
						document.formLinkRiferimentiUtili.selComune.value=document.getElementById('selCom').value;

						document.formLinkRiferimentiUtili.action='LinkUtili.aspx' + sendUrlArgs();
						
						document.formLinkRiferimentiUtili.submit();						
					}
					else
					{
						window.location.href='LinkUtili.aspx?' + strQuery;
					}
					//	strQuery = '?' + strQuery ;
				}

				function submitAreeTrovate()
				{
					if(queryString('flag_tipo') != '')
					{
						document.formLinkAree.nomeRegione.value = document.getElementById('regSel').value;
						document.formLinkAree.nomeTerritorio.value=document.getElementById('terSel').value;
						document.formLinkAree.nomeComune.value=document.getElementById('comSel').value;
						
						document.formLinkAree.selRegione.value=document.getElementById('selReg').value;
						document.formLinkAree.selTerritorio.value=document.getElementById('selTer').value;
						document.formLinkAree.selComune.value=document.getElementById('selCom').value;
						
						document.formLinkAree.action='AreeTrovate.aspx' + sendUrlArgs();
						document.formLinkAree.submit();
						
					}
					else
					{
						document.location.href='Aree.aspx';			
					}
				}