//  +------------------------------------------------------------------------+
//  | netjukebox, Copyright © 2001-2007  Willem Bartels                      |
//  |                                                                        |
//  | http://www.netjukebox.nl                                               |
//  | http://forum.netjukebox.nl                                             |
//  |                                                                        |
//  | This program is free software: you can redistribute it and/or modify   |
//  | it under the terms of the GNU General Public License as published by   |
//  | the Free Software Foundation, either version 3 of the License, or      |
//  | (at your option) any later version.                                    |
//  |                                                                        |
//  | This program is distributed in the hope that it will be useful,        |
//  | but WITHOUT ANY WARRANTY; without even the implied warranty of         |
//  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          |
//  | GNU General Public License for more details.                           |
//  |                                                                        |
//  | You should have received a copy of the GNU General Public License      |
//  | along with this program.  If not, see <http://www.gnu.org/licenses/>.  |
//  +------------------------------------------------------------------------+

//  +------------------------------------------------------------------------+
//  | AJAX ActiveX XMLHttpRequest wrapper                                    |
//  +------------------------------------------------------------------------+
if (typeof XMLHttpRequest == 'undefined' && typeof ActiveXObject != 'undefined')
{
var error;
var axObjects = ['MSXML2.XMLHTTP.6.0', 'MSXML2.XMLHTTP.3.0', 'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'];
for (var axIndex in axObjects)
	{
	try
		{
		new ActiveXObject(axObjects[axIndex]);
		XMLHttpRequest = function() { return new ActiveXObject(axObjects[axIndex]); }
		break;
		}
	catch(error)
		{
		// On error do nothing, try next one
		}
	}
error = null;
}



//  +------------------------------------------------------------------------+
//  | AJAX request                                                           |
//  +------------------------------------------------------------------------+
function AjaxRequest(url)
{
if (typeof XMLHttpRequest != 'undefined')
	{
	var http = new XMLHttpRequest();
	http.onreadystatechange = function()
		{
		if (http.readyState == 4 && http.status == 200)
			{
            eval(http.responseText);
			}
		}
	http.open('get', url, true);
	http.send(null);
	}
}

