var xmlHttp
var loading = '<img src="loading.gif" /> <br />Đang tải dữ liệu ... ';
var loading_log = '<img src="load_login.gif" />';
function showcont(url_)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=url_
url=url+"&sid="+Math.random()
document.getElementById("show").innerHTML = loading;     
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function showhome(url_)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=url_
url=url+"?sid="+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
function showerror(url_)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
var url=url_
url=url+"&sid="+Math.random()
//document.getElementById("show").innerHTML = loading;     
xmlHttp.onreadystatechange=stateChanged2
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function stateChanged()
{
document.getElementById("loading").innerHTML = loading; 
document.getElementById("loading").style.visibility="visible";     

if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
document.getElementById("loading").innerHTML = "&nbsp;";     
document.getElementById("show").innerHTML=xmlHttp.responseText
document.getElementById("loading").style.visibility="hidden";     
 }

}
function stateChanged2()
{
document.getElementById("loading_log").innerHTML = loading; 
document.getElementById("login_error").style.visibility="visible";
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
document.getElementById("loading_log").innerHTML = "&nbsp;";     
 document.getElementById("login_error").innerHTML=xmlHttp.responseText
 }

}

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;
}