﻿var xmlHttp

<!----------TrangChu------------------------------------------------------------------->
function showCustomer(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChanged)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChanged() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("WEB").innerHTML='<center>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tải dữ liệu ...</center>   ';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("WEB").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}

	
						

<!----------Choi Nhac------------------------------------------------------------------>
function showCustomerPLAY(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChangedPLAY)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChangedPLAY() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("TInTuc").innerHTML='<center>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tải dữ liệu ...</center>   ';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("TInTuc").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}
<!----------Admin------------------------------------------------------------------>

function showCustomer2(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChanged2)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChanged2() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("Thu").innerHTML='<center><br><br>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tải dữ liệu ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("Thu").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}



function showCustomer3(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChanged3)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChanged3() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("DangTIn").innerHTML='<center><br><br>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tải dữ liệu ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("DangTIn").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}



<!----------VD2J-Info------------------------------------------------------------------->
function showCustomerINFO(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChangedINFO)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChangedINFO() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("VD2JINFO").innerHTML='<center>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tải dữ liệu ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("VD2JINFO").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}

<!----------VD2J-Info------------------------------------------------------------------->

<!----------VD2J-SEARCH------------------------------------------------------------------->
function showCustomerSEARCH(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChangedSEARCH)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChangedSEARCH() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("VD2JSEARCH").innerHTML='<center><br><br>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tìm kiếm ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("VD2JSEARCH").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}

<!----------VD2J-SEARCH------------------------------------------------------------------->

<!----------VD2J-QSEARCH------------------------------------------------------------------->
function showCustomerQSEARCH(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChangedQSEARCH)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChangedQSEARCH() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("VD2JQSEARCH").innerHTML='<center><br><br>Dai Viet Music Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tìm kiếm ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("VD2JQSEARCH").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}

<!----------VD2J-QSEARCH------------------------------------------------------------------->

<!----------VD2J-SINGER------------------------------------------------------------------->
function showCustomerSINGER(file)
{ 
var url=""+file+"";
xmlHttp=GetXmlHttpObject(stateChangedSINGER)
xmlHttp.open("GET", url , true)
xmlHttp.send(null)
} 

function stateChangedSINGER() 
{ 
if (xmlHttp.readyState==1 || xmlHttp.readyState==2)
{ 
document.getElementById("VD2JSINGER").innerHTML='<center><br><br>Dai Viet Online <br><br><img src="loading.gif" boder=0 ><br><br>Đang tìm kiếm ...</center>';

} 

  else  if (xmlHttp.readyState==4 || xmlHttp.readyState=="200")
{ 
document.getElementById("VD2JSINGER").innerHTML=xmlHttp.responseText 
window.status="Đã tải xong dữ liệu !";
}  
}

<!----------VD2J-SINGER------------------------------------------------------------------->

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP"
} 
try
{ 
objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler 
return objXmlHttp
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler 
return objXmlHttp
}
}
