var xmlhttp;


function showvehiclePTR()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 	
	
	
	var manuf = document.getElementById('manuf').value;
	var model = document.getElementById('model').value;
//	var bodytype = document.getElementById('bodytype').value;
	var gvw = document.getElementById('gvw').value;
	var price = document.getElementById('price').value;  
	var location1   = document.getElementById('location1').value; 
	var keyword  = document.getElementById('keyword').value; 
	
	var url="../common/get_PTR.php";
//url=url+"?q1="+manuf+"&q2="+model+"&q3="+bodytype+"&q4="+gvw+"&q5="+price+"&q6="+location1+"&keyword="+keyword;
url=url+"?q1="+manuf+"&q2="+model+"&q3=&q4="+gvw+"&q5="+price+"&q6="+location1+"&keyword="+keyword;
url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null); 
}


function showvehicle2(page)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 	
	
	
	var start  = page;
	var manuf = document.getElementById('manuf').value;
	var model = document.getElementById('model').value;
//	var bodytype = document.getElementById('bodytype').value;
	var gvw = document.getElementById('gvw').value;
	var price = document.getElementById('price').value;  
	var location1   = document.getElementById('location1').value; 
	var keyword  = document.getElementById('keyword').value; 
	
	
	var url="../common/get.php";
//url=url+"?q1="+manuf+"&q2="+model+"&q3="+bodytype+"&q4="+gvw+"&q5="+price+"&q6="+location1+"&start="+start+"&keyword="+keyword;
url=url+"?q1="+manuf+"&q2="+model+"&q3=&q4="+gvw+"&q5="+price+"&q6="+location1+"&start="+start+"&keyword="+keyword;
url=url+"&sid="+Math.random();

xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null); 
}


function showvehicle()
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  } 
  
var manuf = document.getElementById('manuf').value;

if (document.getElementById('model') != null)
var model = document.getElementById('model').value
else
var model = "";

//var bodytype = document.getElementById('bodytype').value;
var gvw = document.getElementById('gvw').value;
var price = document.getElementById('price').value;  
var location1   = document.getElementById('location1').value;  
var start  = document.getElementById('start').value; 
var keyword  = document.getElementById('keyword').value;  
var url="../common/get.php";
//url=url+"?q1="+manuf+"&q2="+model+"&q3="+bodytype+"&q4="+gvw+"&q5="+price+"&q6="+location1+"&start="+start+"&keyword="+keyword;
url=url+"?q1="+manuf+"&q2="+model+"&q3=&q4="+gvw+"&q5="+price+"&q6="+location1+"&start="+start+"&keyword="+keyword;

url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
if (xmlhttp.readyState==4)
{
document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
}
}

function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}

function Openb(url)
		{
			var popit =
			window.open(url,'newwindow1','toolbar=no,width=900,height=550,resizeable=0,scrollbars=0,location=no,status=no');
		}