function XML2JS()
{
	this.REQUEST;
	this.DATA = new Array();
	
	document.XML2JS_Object = this;
	
	this.createRequest = function()
	{
		var xmlHttp = null;
		// Mozilla, Opera, Safari sowie Internet Explorer 7
		if (typeof XMLHttpRequest != 'undefined') 
		{
			xmlHttp = new XMLHttpRequest();
		}
		
		if (!xmlHttp) 
		{
			// Internet Explorer 6 und älter
			try {
				xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
			} catch(e) {
				try {
					xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
				} catch(e) {
					xmlHttp  = null;
				}
			}
		}
		
		return xmlHttp;
	}
	
	this.sendRequest = function(_url)
	{
		this.REQUEST = this.createRequest();
		this.REQUEST.open('POST', _url, true);
		this.REQUEST.setRequestHeader('Content-Type', 'text/xml');
		this.REQUEST.onreadystatechange = function () 
		{
					if (document.XML2JS_Object.REQUEST.readyState == 4) 
					{
						k = document.XML2JS_Object.REQUEST.responseXML.getElementsByTagName('data');
						for(i=0; k[i]; i++)
						{
							d = new Array();
							for(j=0; k[i].attributes[j]; j++)
							{
								d.push(k[i].attributes[j].value);
							}
						}
						document.XML2JS_Object.DATA.push(d);
						document.XML2JS_Object.init();
					}
		}
		this.REQUEST.send( null );
	}
	
	this.getDATA = function()
	{
		return this.DATA;
	}
	
	this.init = function()
	{
		alert("overwrite the init() function!");
	}
	
}
