function Xml() 
{
	this.load_data = function (fname, callback, async) {
		var xml = init_req();

		if (typeof async == "undefined") async = true;

		var func = function () {
			if (xml.readyState == 4) {
				if (xml.responseText) {
					eval(xml.responseText);
					if (typeof data != "undefined") {
						if (callback) callback(data);
					}
				}
			}
		};

		if (async) xml.onreadystatechange = func;

		xml.open("GET", fname, async);

		try {
			xml.send(null);
			if (!async) func();
			
		} catch (e) {
			//window.alert("??:" + e);
		}

		return true;
	}

	function init_req() {
		var xml = false;

		try {
			xml = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xml = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (E) {
				xml = false;
			}
		}	

		if (!xml && typeof XMLHttpRequest!='undefined') {
			xml = new XMLHttpRequest();
		}

		return xml;
	}
}


