function aggiornaCitta(str,tip)
{ 
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	  return;
	var url="/script/selectCitta.asp";
	url=url+"?AJpr="+str+"&tip="+tip;
	//parametro utile per non prendere i risultati in caching
	url=url+"&sid="+Math.random();
	
	xmlHttp.onreadystatechange=stateChangedCitta;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChangedCitta() 
{ 
	if (xmlHttp.readyState==1)
	{
		document.getElementById("selectCitta").innerHTML="<select disabled=\"disabled\" name=\"ct\" value=\"\"><option>caricamento in corso - -</option></select>";
	}
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById("selectCitta").innerHTML=xmlHttp.responseText;
	}
}
function FlashSelezionaProvincia(id)
{
	ok = 0;
	for(var i=0;i<document.getElementById("pr").options.length;i++) 
		if(document.getElementById("pr").options[i].value==id) 
			{ 
				document.getElementById("pr").selectedIndex=i; 
				ok = 1;
				break; 
			}
	if(ok == 0)
	{
		alert("ATTENZIONE!! La provincia selezionata in questo momento non contiene alcun immobile!");
	}
	else
	{
		aggiornaCitta(id,1);
	}
}

function effettua_ricerca(form)
	{
	if (form.pr.value==0)
		{
		alert("Devi selezionare una provincia per effettuare la ricerca!");
		form.pr.focus();
		return(false);
		}
	return(true)
	}