function GetXmlHttpObject()
{
	if (window.XMLHttpRequest)
		return (new XMLHttpRequest());
	else if (window.ActiveXObject)
		return (new ActiveXObject("Microsoft.XMLHTTP"));
}

function ajax(t_url,t_divid)
{		
	
	var url = "",divid = "";	
	var xmlHttp = false;

	xmlHttp=GetXmlHttpObject();	
	url = t_url;	
	divid = t_divid;
	
	if (xmlHttp==null)
		alert ("Browser does not support HTTP Request");
	else
	{ 
		xmlHttp.onreadystatechange=
			function ()
				{				
				if(xmlHttp.readyState<4 )
				{			 							
				document.getElementById(divid).innerHTML='loading....';			
				}
				if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")				
				{	

				document.getElementById(divid).innerHTML=xmlHttp.responseText;

				}
		};
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}	
}
