	function refreshData_old(idx)
	{
		window.document.getElementById('searchForm').submit();
	}
	function refreshData(idx)
	{
		var refresh = window.document.getElementById('refreshType');
		var ma = window.document.getElementById('strMarca');
		var mo = window.document.getElementById('strModello');
		var ru = window.document.getElementById('strRuota');
		var mi = window.document.getElementById('strMisura');
		var div = window.document.getElementById('applicazioniSheet');

		//if(ma) ma.disabled = true;
		//if(mo) mo.disabled = true;
		//if(ru) ru.disabled = true;
		//if(mi) mi.disabled = true;
		if(idx==1)
		{
			if(ma && ma.selectedIndex>0)
			{
				mo.options.length = 0;
				var opt = document.createElement('option');
				opt.text = "in aggiornamento...";
				opt.value = "";
				mo.options.add(opt);
				refresh.value = "marca"
				//div.style.display = "none";
			}
			else
			{
				alert('Selezionare una Marca');
				mo.options.length = 0;
				ru.options.length = 0;
				mi.options.length = 0;
				if(ma) ma.disabled = false;
			}
		}
		else if(idx==2)
		{
			if(ma && ma.selectedIndex>0 && mo && mo.selectedIndex>0)
			{
				ru.options.length = 0;
				var opt = document.createElement('option');
				opt.text = "in aggiornamento...";
				opt.value = "";
				ru.options.add(opt);
				refresh.value = "modello"
				//div.style.display = "none";
			}
			else
			{
				alert('Selezionare un modello');
				ru.options.length = 0;
				mi.options.length = 0;
				if(ma) ma.disabled = false;
				if(mo) mo.disabled = false;
			}
		}
		else if(idx==3)
		{
			if(ma && ma.selectedIndex>0 && mo && mo.selectedIndex>0 && ru && ru.selectedIndex>0)
			{
				mi.options.length = 0;
				var opt = document.createElement('option');
				opt.text = "in aggiornamento...";
				opt.value = "";
				mi.options.add(opt);
				refresh.value = "ruota"
				//div.style.display = "none";
			}
			else
			{
				alert('Selezionare una ruota');
				mi.options.length = 0;
				if(ma) ma.disabled = false;
				if(mo) mo.disabled = false;
				if(ru) ru.disabled = false;
			}
		}
		else if(idx==4)
		{
			if(ma && ma.selectedIndex>0 && mo && mo.selectedIndex>0 && ru && ru.selectedIndex>0 && mi && mi.selectedIndex>0)
			{
				refresh.value = "misura"
				//div.style.display = "block";
			}
			else
			{
				alert('Selezionare una misura');
				if(ma) ma.disabled = false;
				if(mo) mo.disabled = false;
				if(ru) ru.disabled = false;
				if(mi) mi.disabled = false;
			}
		}
		window.document.getElementById('searchForm').submit();
	}