	var req;
	var url;
	function Initialize()
	{
		try
		{
			req=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				req=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(oc)
			{
				req=null;
			}
		}
	
		if(!req&&typeof XMLHttpRequest!="undefined")
		{
			req=new XMLHttpRequest();
		}
	
	}
	function Goi_fun(callbackFunction)
	{}
	function cho_NOIDUNG(name)
	{
		obj = document.getElementById(name);
		obj.innerHTML = '<center><br><br><br><br><br><img src="../images/choooo.gif"><br><span class="buttonblue">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#272;ang ch&#7901; d&#7919; li&#7879;u ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></center><br>';
	}
	
		function Cho_chodiem(name)
	{
		obj = document.getElementById(name);
		obj.innerHTML = '<center><img src="../images/choooo.gif"></center>';
	}
		function khong_gi(name)
	{
		obj = document.getElementById(name);
		obj.innerHTML = '';
	}
	
		function DisplayHTML(name)
	{
		obj = document.getElementById(name);
		obj.innerHTML = req.responseText;
		
	}
		function DisplayLANDAU(name)
	{
		obj = document.getElementById(name);
		var nhanve_s = req.responseText;
		var chiahai_s = nhanve_s.split("--!!tach_noi_dung!!--");
			obj.innerHTML = chiahai_s[0];
	}
		function DisplayLANHAI(name)
	{
		obj = document.getElementById(name);
		var nhanve_t = req.responseText;
		var chiahai_t = nhanve_t.split("--!!tach_noi_dung!!--");
		var bai = chiahai_t[1];
		obj.innerHTML = bai.split('.<br>').join('.<z>').split('!<br>').join('!<z>').split(':<br>').join(':<z>').split('?<br>').join('?<z>').split('"<br>').join('"<z>').split('. <br>').join('.<z>').split('! <br>').join('!<z>').split(': <br>').join(':<z>').split('? <br>').join('?<z>').split('" <br>').join('"<z>').split('.<BR>').join('.<z>').split('!<BR>').join('!<z>').split(':<BR>').join(':<z>').split('?<BR>').join('?<z>').split('"<BR>').join('"<z>').split('. <BR>').join('.<z>').split('! <BR>').join('!<z>').split(': <BR>').join(':<z>').split('? <BR>').join('?<z>').split('" <BR>').join('"<z>').split('.<BR>').join('.<z>').split('!<BR>').join('!<z>').split(':<BR>').join(':<z>').split('?<BR>').join('?<z>').split('"<BR>').join('"<z>').split('.  <BR>').join('.<z>').split('!  <BR>').join('!<z>').split(':  <BR>').join(':<z>').split('?  <BR>').join('?<z>').split('"  <BR>').join('"<z>').split('<BR>').join(' ').split('<br>').join(' ').split('<z>').join('<BR>');
	}
		function DisplayLANBA(name)
	{
		obj = document.getElementById(name);
		var nhanve_b = req.responseText;
		var chiahai_b = nhanve_b.split("--!!tach_noi_dung!!--");
			obj.innerHTML = chiahai_b[2];
	}
		function SendQuery(url,callbackFunction,method,cache,request)
	{
			Initialize();
		if ( (req!=null) )
		{		
			req.onreadystatechange = function()
									{
									// only if req shows "complete"
										if (req.readyState == 4)
									    {
								        // only if "OK"
											if (req.status == 200)
											{
												// Process
												eval(callbackFunction);
											}
										}
									};
					
						
			// Cache data or not , default is yes(1)
	

			if ( cache != 1 )
			{
				url += "&rand="+Math.random()*1000;

			}
			
			// Use POST or GET method , default is GET
			if ( method == 'POST' )
			{
		        req.open("POST", url, true);
		        req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		        req.send(request);
			}
			else
			{										
				req.open("GET", url , true);
				//req.setRequestHeader("Pragma", "no-cache");// xoa cache 
				//req.setRequestHeader("Cache-Control", "must-revalidate");// xoa cache 
				//req.setRequestHeader("If-Modified-Since", document.lastModified);// xoa cache 
				req.send(null);
			}
		}
	}