function aprinov(url) { 
newin = window.open(url,'interno','scrollbars=yes,resizable=no, width=625,height=550,status=no,location=no,toolbar=no');
} 
var tip;
var prez;
var marc;
var model;
function go(){
tip=document.form1.Tipo.options[document.form1.Tipo.selectedIndex].value
model=document.form1.modello.options[document.form1.modello.selectedIndex].value
marc=document.form1.marca.options[document.form1.marca.selectedIndex].value
prez=document.form1.Prezzo.options[document.form1.Prezzo.selectedIndex].value
location.href="ric.asp?idm=" + marc + "&tipo=" + tip + "&idmodel=" + model + "&price=" + prez
}
  var ricerca_pro;
  
   
function cerca() 
{
    var valorecampo = document.form1.marca.options[document.form1.marca.selectedIndex].value;
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        ricerca_pro = new XMLHttpRequest();
        ricerca_pro.onreadystatechange = ricevi;
        ricerca_pro.open("GET", "selmod.asp?marca="+valorecampo,true);
        ricerca_pro.send(null);
    // branch for IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        ricerca_pro = new ActiveXObject("Microsoft.XMLHTTP");
        if (ricerca_pro) {
            ricerca_pro.onreadystatechange = ricevi;
            ricerca_pro.open("GET", "selmod.asp?marca="+valorecampo,true);
            ricerca_pro.send();
        }
    }
}

     
  function ricevi() {   
    var strRes;       
    var arrValori; 
	var spl;  
    var txt;     
    var vle;
	  if (ricerca_pro.readyState == 4) {	    
		  strRes=ricerca_pro.responseText;
		  arrValori=strRes.split("|");
		  document.form1.modello.options.length=0;	
  	    document.form1.modello.options[document.form1.modello.options.length]= new Option("...",""); 
    
		  for(i=0;i<arrValori.length;i++)
		  {
		 spl=arrValori[i].split("#");
		 txt=spl[0] ;
		 vle=spl[1];
		    document.form1.modello.options[document.form1.modello.options.length]= new Option(txt,vle); 

		  }
		 }
	}