// JavaScript Document



var http = false;


if(navigator.appName == "Microsoft Internet Explorer") {
  http = new ActiveXObject("Microsoft.XMLHTTP");
} else {
  http = new XMLHttpRequest();
}


function choosemodel1(make_id1) {

var params="make_id1="+make_id1;
  http.open("POST", "modindex.php", true);
  
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.setRequestHeader("Content-length", params.length);
	http.setRequestHeader("Connection", "close");


  http.onreadystatechange=function() {
    if(http.readyState == 4) {
	    
	    document.getElementById('divmodel1').innerHTML = http.responseText;
    }
  }
  http.send(params);
}


function validate()
{

	if(document.usedsearch.make.value=="")
	{
	alert('make is not selected!');
	return false;
	}
	
	if(document.usedsearch.Selmodelid1.value=="")
	{
	alert('Model is not selected!');
	return false;
	}
	
	return true;
}

		  function test(id,year,make,model)
		  {
		document.frmusedcar.id.value=id;
		//document.getElementById("id").value=id;
		document.frmusedcar.action ="used-cars/cardetail/"+year+"/"+make+"/"+model+"/"+"index.html";
		document.frmusedcar.submit();
		
		  }
	
	
	
	
	 
		  function testpage(page,make,model,year,zip,radius)
		  {
		
		
	     document.frmpaging.page.value=page;
		 document.frmpaging.make.value=make;
		document.frmpaging.Selmodelid1.value=model;
		document.frmpaging.year.value=year;
		 document.frmpaging.zip.value=zip;
		document.frmpaging.radius.value=radius;
		 document.frmpaging.action ="used-cars/"+make+"/usedlanding/index.html";
		 		 
		 document.frmpaging.submit();
			
		  }
		
		
		function statepage(page,state,make)
		  {
		
	     document.frmpaging.page.value=page;
		 document.frmpaging.id1.value=make;
		 document.frmpaging.id.value=state;		 
		 document.frmpaging.action ="used-cars/"+state+"/"+make+"/statelanding/index.html";
		 		 
		 document.frmpaging.submit();
			
		  }
		
		
	

