	var get_modelo;
	var formName;
  
function getmodelocoches(formName) {
    var valormarca = document.forms(formName).marca.options[document.forms(formName).marca.selectedIndex].value;
    // código para objeto nativo XMLHttpRequest
    if (window.XMLHttpRequest) {
        get_modelo = new XMLHttpRequest();
        get_modelo.onreadystatechange = recibircoches;
        get_modelo.open("GET", "/ajax/getmodelo.asp?marca="+valormarca+"&tipo="+formName,false);
        get_modelo.send(null);
    // código para objeto ActiveX IE/Windows
    } else if (window.ActiveXObject) {
        get_modelo = new ActiveXObject("Microsoft.XMLHTTP");
        if (get_modelo) {
            get_modelo.onreadystatechange = recibircoches;
            get_modelo.open("GET", "/ajax/getmodelo.asp?marca="+valormarca+"&tipo="+formName,false);
            get_modelo.send();
        }
    }
}
     
function getmodelomotos(formName) {
    var valormarca = document.forms(formName).marca.options[document.forms(formName).marca.selectedIndex].value;
    // código para objeto nativo XMLHttpRequest
    if (window.XMLHttpRequest) {
        get_modelo = new XMLHttpRequest();
        get_modelo.onreadystatechange = recibirmotos;
        get_modelo.open("GET", "/ajax/getmodelo.asp?marca="+valormarca+"&tipo="+formName,false);
        get_modelo.send(null);
    // código para objeto ActiveX IE/Windows
    } else if (window.ActiveXObject) {
        get_modelo = new ActiveXObject("Microsoft.XMLHTTP");
        if (get_modelo) {
            get_modelo.onreadystatechange = recibirmotos;
            get_modelo.open("GET", "/ajax/getmodelo.asp?marca="+valormarca+"&tipo="+formName,false);
            get_modelo.send();
        }
    }
}
     
function recibircoches() {
	//alert(formName);
	var strRes;       
    var arrValores;  
	var mivariable = new Array();
	if (get_modelo.readyState == 4) {	    
		strRes=get_modelo.responseText;
		arrValores=strRes.split("|");
		document.frmCoches.modelo.options.length=0;		    
		for(i=0;i<arrValores.length;i++)
		{
			mivariable = arrValores[i].split(";");
			document.frmCoches.modelo.options[document.frmCoches.modelo.options.length]= new Option(mivariable[1],mivariable[0]); 
		}
	}
}
     
function recibirmotos() {
	//alert(formName);
	var strRes;       
    var arrValores;  
	var mivariable = new Array();
	if (get_modelo.readyState == 4) {	    
		strRes=get_modelo.responseText;
		arrValores=strRes.split("|");
		document.frmMotos.modelo.options.length=0;		    
		for(i=0;i<arrValores.length;i++)
		{
			mivariable = arrValores[i].split(";");
			document.frmMotos.modelo.options[document.frmMotos.modelo.options.length]= new Option(mivariable[1],mivariable[0]); 
		}
	}
}