var ricerca_prob;

function cerb()
{
var valorecampob = document.cerca.marcab.options[document.cerca.marcab.selectedIndex].value;
// per l'oggetto nativo XMLHttpRequest
if (window.XMLHttpRequest) {
ricerca_prob = new XMLHttpRequest();
ricerca_prob.onreadystatechange = ricevib;
ricerca_prob.open("GET", "cerca_cell.php?codreg="+valorecampob,true);
ricerca_prob.send(null);
// per IE
} else if (window.ActiveXObject) {
ricerca_prob = new ActiveXObject("Microsoft.XMLHTTP");
if (ricerca_prob) {
ricerca_prob.onreadystatechange = ricevib;
ricerca_prob.open("GET", "cerca_cell.php?codreg="+valorecampob,true);
ricerca_prob.send();
}
}
}

function ricevib() {
var strRes;
var arrValori;
if (ricerca_prob.readyState == 4) {
if (ricerca_prob.status == 200){
document.getElementById('cittab').innerHTML=ricerca_prob.responseText;
} else {
document.getElementById('cittab').innerHTML="<select><option>ERRORE "+ricerca_prob.status+"</option></select>";
}
}
}

var ricerca_prob2;
function cer2b()
{
var valore1 = document.cerca.marcab.options[document.cerca.marcab.selectedIndex].value;
var valore2 = document.cerca.modellob.options[document.cerca.modellob.selectedIndex].value;
// per l'oggetto nativo XMLHttpRequest
if (window.XMLHttpRequest) {
ricerca_prob2 = new XMLHttpRequest();
ricerca_prob2.onreadystatechange = ricevib2;
ricerca_prob2.open("GET", "cerca_cell2.php?ma="+valore1+"&mo="+valore2,true);
ricerca_prob2.send(null);
// per IE
} else if (window.ActiveXObject) {
ricerca_prob2 = new ActiveXObject("Microsoft.XMLHTTP");
if (ricerca_prob2) {
ricerca_prob2.onreadystatechange = ricevib2;
ricerca_prob2.open("GET", "cerca_cell2.php?ma="+valore1+"&mo="+valore2,true);
ricerca_prob2.send();
}
}
}

function ricevib2() {
var strRes;
var arrValori;
if (ricerca_prob2.readyState == 4) {
if (ricerca_prob2.status == 200){
document.getElementById('citta2b').innerHTML=ricerca_prob2.responseText;
} 
}
}



