         // a funcao abaixo pega a versao mais nova do xmlhttp do ie.
            function createXMLHTTP() {

		var oRequest;

		if (window.XMLHttpRequest) { 
			oRequest=new XMLHttpRequest(); //Objeto nativo (FF/Safari/Opera7.6+)
			return oRequest;
		} 
		else {
	
       	         	var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
	
        		for (var i=0; i < arrSignatures.length; i++) {
	                try {
        	                oRequest = new ActiveXObject(arrSignatures[i]);
                	        return oRequest;
	                    } catch (oError) {
        	        }
                }
                throw new Error("MSXML is not installed on your system.");
		}
            }




           function Modelos_Carga(id_fabricante)
            {
                var oHTTPRequest = createXMLHTTP(); 
                oHTTPRequest.open("post", "mostra_modelos_carga.asp", true);
                oHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-1");

                oHTTPRequest.onreadystatechange=function() {
                    if (oHTTPRequest.readyState==4){
                        document.all.options_modelos.innerHTML = oHTTPRequest.responseText;
                    }
                }
                oHTTPRequest.send("id_fabricante=" + id_fabricante);
                
                Mostra_Ano_Carga(0);

            }




           function Mostra_Ano_Carga(id_modelo)
            {
                var oHTTPRequest = createXMLHTTP(); 
                oHTTPRequest.open("post", "mostra_ano_carga.asp", true);
                oHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-1");

                oHTTPRequest.onreadystatechange=function() {
                    if (oHTTPRequest.readyState==4){
                        document.all.options_anoFab.innerHTML = oHTTPRequest.responseText;
                    }
                }
                oHTTPRequest.send("id_modelo=" + id_modelo);
            }




           function Mostra_Cidades(uf)
            {
                var oHTTPRequest = createXMLHTTP(); 
                oHTTPRequest.open("post", "mostra_cidades.asp", true);
                oHTTPRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=iso-8859-1");

                oHTTPRequest.onreadystatechange=function() {
                    if (oHTTPRequest.readyState==4){
                        document.all.options_cidades.innerHTML = oHTTPRequest.responseText;
                    }

                    if (oHTTPRequest.readyState==1){
                        document.all.options_cidades.innerHTML = 'Aguarde...carregando as cidades.';
                    }


                }

                oHTTPRequest.send("uf=" + uf);
                

            }



