function ajaxloader(method,url,callbackfunction,params)
{
var objxmlhttp=false;
if(window.XMLHttpRequest && !(window.ActiveXObject)) 
{
	try {
		objxmlhttp = new XMLHttpRequest();
	} 
	catch(e) 
	{
		objxmlhttp = false;
	}
}
	else if(window.ActiveXObject)
	{
		try 
		{
		objxmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch(e) 
		{
		try 
		{
  			objxmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} 
		catch(e) 
		{
  			objxmlhttp = false;
		}
	}
	}

	if(objxmlhttp) 
	{ 
		objxmlhttp.open(method,url,true);
		
		if(method=='POST')
		{
			//Send the proper header information along with the request
		objxmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		objxmlhttp.setRequestHeader("Content-length", params.length);
		objxmlhttp.setRequestHeader("Connection", "close");
		objxmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"); 
		}
		
		objxmlhttp.onreadystatechange = function()
	{
		if(objxmlhttp.readyState == 4 || objxmlhttp.readyState == 'complete')
		{
			if (objxmlhttp.status==200)
			{		
				callbackfunction(objxmlhttp.responseText);
			}	
		}
	}

	if(method=='POST')
	{	
		objxmlhttp.send(params);	
	}
	else
	{	
		objxmlhttp.send(null);
	}	
}
}
