function createXMLHttpObject()
{   
	var xmlHttp;
	try
    {
	    // Firefox, Opera 8.0+, Safari
	    xmlHttp = new XMLHttpRequest();
    }
	catch (e)
    {
        // Internet Explorer
	    try
	    {
	      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
	    }
	    catch (e)
	    {
	    	try
	        {
	        	xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	        }
	      	catch (e)
	        {
		        alert("Your browser does not support AJAX!");
		        return false;
	        }
	    }
    }
    
    if (xmlHttp.overrideMimeType) 
    {
      xmlHttp.overrideMimeType('text/xml');
    }
    return xmlHttp;
}	

function makeRequest(requestURL, method, params, resDivId, throbberDivId)
{
	var xmlhttp = createXMLHttpObject();
	xmlhttp.onreadystatechange=function() // Call Back Handler
    {
      if(xmlhttp.readyState==4)
      {
      	document.getElementById(resDivId).innerHTML = xmlhttp.responseText; // Loads the data      		
      }     
    }
    xmlhttp.open(method,requestURL,true);
    if(method == 'POST')
	{
		//Send the proper header information along with the request
		xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlhttp.setRequestHeader("Content-length", params.length);
		xmlhttp.setRequestHeader("Connection", "close");  
	}	    
    
    xmlhttp.send(params);
}
