var xmlHttp

function showResult(MaTinh,SoMay)
{
if (SoMay.length==0)
 { 
 document.getElementById("danhbadt").
 innerHTML="";
 return
 }

xmlHttp=GetXmlHttpObject()

if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 

var url="../modules/dbdt.php"
url=url+"?MaTinh="+MaTinh
url=url+"&SoMay="+SoMay
xmlHttp.onreadystatechange=stateChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
} 

function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	 {
		if (xmlHttp.status == 200) 
		{
			
			 document.getElementById("danhbadt").innerHTML=xmlHttp.responseText;
		}
		else
			document.getElementById("danhbadt").innerHTML= "Lỗi từ phía server";
	 }
	 else
	 {
		document.getElementById("danhbadt").innerHTML='<img src="http://pdaviet.net/modules/loading.gif"> <font color="#38586D">Đang tra cứu...</font>';
	 }
 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}