var http = null;
// var http2 = null;
if(window.XMLHttpRequest)
{
	http = new XMLHttpRequest();
}
else if(window.ActiveXObject)
{
	http = new ActiveXObject("Microsoft.XMLHTTP");
}

function loadContent(a,b,c,d)
{
	if(http != null)
	{	
		if (a == "info")
		{
			http.open("GET", '/ajx/ajx_events_info.php?x1='+a+'&x2='+b+'&x3='+c+'&x4='+d , true);
			http.onreadystatechange = ausgeben;
			http.send(null);
		}
		if (a == "anmeldung")
		{
			http.open("GET", '/ajx/ajx_events_anmeldung.php?x1='+a+'&x2='+b+'&x3='+c+'&x4='+d , true);
			http.onreadystatechange = ausgeben;
			http.send(null);
		}
		if (a == "startliste")
		{
			http.open("GET", '/ajx/ajx_events_startliste.php?x1='+a+'&x2='+b+'&x3='+c+'&x4='+d , true);
			http.onreadystatechange = ausgeben;
			http.send(null);
		}
		if (a == "close")
		{
			http.open("GET", '/ajx/ajx_leer.php?x1='+a+'&x2='+b+'&x3='+c+'&x4='+d , true);
			http.onreadystatechange = ausgeben;
			http.send(null);
		}
	}
	else
	{ alert("es wurde kein objekt erzeugt"); }
	
	function ausgeben()
	{
		if(d == "xx")
		{
			b = c;
		}
		if (http.readyState == 4)
		{
			var strContent = 'myContent_'+b; 
			document.getElementById(strContent).innerHTML = http.responseText;
		}
	}
}
