var _ms_XMLHttpRequest_ActiveX = ""; // Holds type of ActiveX to instantiate

var versions = ["Msxml2.XMLHTTP.7.0", "Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
var AJAX_obj;
var AJAX_obj2;
var AJAX_obj3;

var site_base_url = "http://personalchoiceoutfitters.com";

function issue_query(url, call_back) 
{
	//alert("issue_query, url:" + url);
	if (window.XMLHttpRequest) 	// Non I.E. browsers
	{
		AJAX_obj = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)  // Internet Explorer
	{
		// Instantiate the latest MS ActiveX Objects
		if (_ms_XMLHttpRequest_ActiveX) 
		{
			AJAX_obj = new ActiveXObject(_ms_XMLHttpRequest_ActiveX);
		} 
		else // loops through the various versions of XMLHTTP to ensure we're using the latest
		{
			for (var i = 0; i < versions.length ; i++) 
			{
				try 
				{
					AJAX_obj = new ActiveXObject(versions[i]);
					if (AJAX_obj) {
						_ms_XMLHttpRequest_ActiveX = versions[i]; // save a reference to the proper one to speed up future instantiations
						break;
					}
				}
				catch (objException) {
				// trap; try next one
				} ;
			} ;
		}
	}
	
	AJAX_obj.onreadystatechange = call_back;    
	AJAX_obj.open( "GET", url, true );
	AJAX_obj.send(null);
	
}

function issue_query2(url, call_back) 
{
	//alert("issue_query2");
	if (window.XMLHttpRequest) 	// Non I.E. browsers
	{
		AJAX_obj2 = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)  // Internet Explorer
	{
		// Instantiate the latest MS ActiveX Objects
		if (_ms_XMLHttpRequest_ActiveX) 
		{
			AJAX_obj2 = new ActiveXObject(_ms_XMLHttpRequest_ActiveX);
		} 
		else // loops through the various versions of XMLHTTP to ensure we're using the latest
		{
			for (var i = 0; i < versions.length ; i++) 
			{
				try 
				{
					AJAX_obj2 = new ActiveXObject(versions[i]);
					if (AJAX_obj2) {
						_ms_XMLHttpRequest_ActiveX = versions[i]; // save a reference to the proper one to speed up future instantiations
						break;
					}
				}
				catch (objException) {
				// trap; try next one
				} ;
			} ;
		}
	}
	
	AJAX_obj2.onreadystatechange = call_back;    
	AJAX_obj2.open( "GET", url, true );
	AJAX_obj2.send(null);
}

function issue_query3(url, call_back) 
{
	if (window.XMLHttpRequest) 	// Non I.E. browsers
	{
		AJAX_obj3 = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)  // Internet Explorer
	{
		// Instantiate the latest MS ActiveX Objects
		if (_ms_XMLHttpRequest_ActiveX) 
		{
			AJAX_obj3 = new ActiveXObject(_ms_XMLHttpRequest_ActiveX);
		} 
		else // loops through the various versions of XMLHTTP to ensure we're using the latest
		{
			for (var i = 0; i < versions.length ; i++) 
			{
				try 
				{
					AJAX_obj3 = new ActiveXObject(versions[i]);
					if (AJAX_obj3) {
						_ms_XMLHttpRequest_ActiveX = versions[i]; // save a reference to the proper one to speed up future instantiations
						break;
					}
				}
				catch (objException) {
				// trap; try next one
				} ;
			} ;
		}
	}
	
	AJAX_obj3.onreadystatechange = call_back;    
	AJAX_obj3.open( "GET", url, true );
	AJAX_obj3.send(null);
}

function issue_query4(url, call_back) 
{
	if (window.XMLHttpRequest) 	// Non I.E. browsers
	{
		AJAX_obj4 = new XMLHttpRequest();
	} 
	else if (window.ActiveXObject)  // Internet Explorer
	{
		// Instantiate the latest MS ActiveX Objects
		if (_ms_XMLHttpRequest_ActiveX) 
		{
			AJAX_obj4 = new ActiveXObject(_ms_XMLHttpRequest_ActiveX);
		} 
		else // loops through the various versions of XMLHTTP to ensure we're using the latest
		{
			for (var i = 0; i < versions.length ; i++) 
			{
				try 
				{
					AJAX_obj4 = new ActiveXObject(versions[i]);
					if (AJAX_obj4) {
						_ms_XMLHttpRequest_ActiveX = versions[i]; // save a reference to the proper one to speed up future instantiations
						break;
					}
				}
				catch (objException) {
				// trap; try next one
				} ;
			} ;
		}
	}
	
	AJAX_obj4.onreadystatechange = call_back;    
	AJAX_obj4.open( "GET", url, true );
	AJAX_obj4.send(null);
}


