﻿function cargaModelos(marca,modelosel, tipov)
{
	var xmlHttpTop5 = GetXmlHttpObject();
	if (xmlHttpTop5==null)
		{
			alert ("El Navegador no puede presentar la información");
			return;
		}
	var url="funciones/marcas.asp";
	url=url+"?marca="+marca+'&modelo='+modelosel+'&tipo='+tipov;
	xmlHttpTop5.onreadystatechange=function(){ 
		if (xmlHttpTop5.readyState==1)
			{
				document.getElementById('losmodelos').innerHTML='<center>Cargando ....</center>';
			}
		if (xmlHttpTop5.readyState==4)
			{
				document.getElementById('losmodelos').innerHTML=xmlHttpTop5.responseText;
			}
	}
	xmlHttpTop5.open("POST",url,true);
	xmlHttpTop5.send(url);
}

function cargaAutosDestacados()
{
	var xmlHttpT = GetXmlHttpObject();
	if (xmlHttpT==null)
		{
			alert ("El Navegador no puede presentar la información");
			return;
		}
	var url='ultimos_autos.asp';
	xmlHttpT.onreadystatechange=function(){ 
		if (xmlHttpT.readyState==1)
			{
				document.getElementById('autosDestacados').innerHTML='<center>Cargando ....</center>';
			}
		if (xmlHttpT.readyState==4)
			{
				document.getElementById('autosDestacados').innerHTML=xmlHttpT.responseText;
			}
	}
	xmlHttpT.open("POST",url,true);
	xmlHttpT.send(url);
}

function cargaNoticias()
{
	var xmlHttpT = GetXmlHttpObject();
	if (xmlHttpT==null)
		{
			alert ("El Navegador no puede presentar la información");
			return;
		}
	var url='noticias_recomendaciones.asp';
	xmlHttpT.onreadystatechange=function(){ 
		if (xmlHttpT.readyState==1)
			{
				document.getElementById('noticiasRecomendaciones').innerHTML='<center>Cargando ....</center>';
			}
		if (xmlHttpT.readyState==4)
			{
				document.getElementById('noticiasRecomendaciones').innerHTML=xmlHttpT.responseText;
			}
	}
	xmlHttpT.open("POST",url,true);
	xmlHttpT.send(url);
}