var xmlHttp;
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)
        {
            try
            {
                xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      
            }
            catch (e)
            {
                alert("Your browser does not support AJAX!");
                return false;
            }
        }
    }
    return xmlHttp;
 }
 
 function timbatdongsan()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = xulydulieutrave;
        xmlHttp.open('GET','content/search/timbatdongsan.php',true);
        xmlHttp.send(null);
    }
 }
 function xulydulieutrave()
 {
 	if(xmlHttp.readyState==4)
      {
    	document.getElementById("boxshow").innerHTML=xmlHttp.responseText;
       }
 }

/*---------------------------------*/
 function timcongtybds()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = xulydulieutrave;
        xmlHttp.open('GET','content/search/timcongtybds.php',true);
        xmlHttp.send(null);
    }
 }
 function timtintucvanban()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = xulydulieutrave;
        xmlHttp.open('GET','content/search/timtintucvanban.php',true);
        xmlHttp.send(null);
    }
 }


//-----------------------------------------------------------------------------------------

 function tinvip()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = hienthitin;
        xmlHttp.open('GET','content/ajaxquery/tinvip.php',true);
        xmlHttp.send(null);
    }
 }
 
 function tintrensan()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = hienthitin;
        xmlHttp.open('GET','content/ajaxquery/tintrensan.php',true);
        xmlHttp.send(null);
    }
 }
  function tinbdsplaza()
 {
 	xmlHttp = GetXmlHttpObject();
    if(xmlHttp==null) 
    {    
        alert("Trinh duyet k ho tro");
        return;
    }
    else
    {
        xmlHttp.onreadystatechange = hienthitin;
        xmlHttp.open('GET','content/ajaxquery/tinbdsplaza.php',true);
        xmlHttp.send(null);
    }
 }
 function hienthitin()
 {
 	if(xmlHttp.readyState==4)
      {
    	document.getElementById("raovatshow").innerHTML=xmlHttp.responseText;
       }
 }
