/****************************************************************************
 To use place this in HTML page: 
 <script src="include/js/ajax_functions.js" type="text/javascript"></script>
 Then invoke the object and carry on with coding:
 <script type="text/javascript">
 	var myReq = getXMLHTTPRequest();
 </script>
****************************************************************************/

function getXMLHTTPRequest()
{
	var req = false;
	
	try 
	{
		/* For Firefox */
		req = new XMLHttpRequest();
	} 
	catch(err) 
	{
		try 
		{
			/* For Some Versions of IE */
			req = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(err) 
		{
			try
			{
				/* For Some Other Versions on IE */
				req = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(err)
			{
				req = false;
			}
		}
		
	}
	return req;
} /* end of function getXMLHTTPRequest */