	var http = null;
	var id = null;
	if (window.XMLHttpRequest)
		{
			http = new XMLHttpRequest();
		}
	else if (window.ActiveXObject)
		{
			http = new ActiveXObject("Microsoft.XMLHTTP");
		}
	
	loadData();
	setInterval("loadData()",15000);
	
	function loadData()
		{
			if (http != null)
				{
					http.open("GET", "iptv_epg.php?rand=" + Math.random(), true);
					http.onreadystatechange = ausgeben;
					http.send(null);
					id = window.setTimeout("abbrechen()",14000);
				}
		}
	
	function ausgeben()
		{
			if (http.readyState == 4)
				{
					document.getElementById("EPG").innerHTML = http.responseText;
					window.clearTimeout(id);
				}
		}
	
	function abbrechen()
		{
			http.abort();
			document.getElementById("EPG").innerHTML = "Derzeit ist leider keine Verbindung zum EPG-Service möglich.";
		}
