// JavaScript Document
var xmlHttp

function showUser(page,str)
{ 
		document.getElementById('loadingcontent').style.display='block';

	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url=page;
	url=url+"?p="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send("hien=hihi")
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 document.getElementById("content").innerHTML=xmlHttp.responseText 
	 	document.getElementById('loadingcontent').style.display='none';

	 } 
}
function showUser2(page,str)
{ 
	//document.getElementById('loading_tloai').style.display='block';
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	 {
	 alert ("Browser does not support HTTP Request")
	 return
	 }
	var url=page;
	url=url+"?p="+str
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChanged2 
	xmlHttp.open("GET",url,true)
	xmlHttp.send("hien=hihi")
}
function stateChanged2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	 { 
	 document.getElementById("content_tloai").innerHTML=xmlHttp.responseText 
	 //document.getElementById('loading_tloai').style.display='none';
	 } 
}

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