function ajax_start(tpl,id,cnt) {
	var url="/cgi-bin/ajax_start.pl";
	url=url+"?tpl="+tpl+"&id="+id;
	if (cnt!=undefined) {
		divid_2=id;
		xmlHttp_2=GetXmlHttpObject();
		xmlHttp_2.onreadystatechange=stateChanged_2;
		xmlHttp_2.open("GET",url,true);
		xmlHttp_2.send(null);
	}
	else {
		divid_1=id;
		xmlHttp_1=GetXmlHttpObject();
		xmlHttp_1.onreadystatechange=stateChanged_1;
		xmlHttp_1.open("GET",url,true);
		xmlHttp_1.send(null);
	}
}

function ajax_getTab(tpl,klasse,team,show,siebenm,cnt) {
	var url="/cgi-bin/getTab.pl";
	url=url+"?tpl="+tpl+"&klasse="+klasse+"&team="+team+"&show="+show+"&7m="+siebenm+"&cnt="+cnt;
	if (cnt!=undefined) {
		divid_2=tpl;
		xmlHttp_2=GetXmlHttpObject();
		xmlHttp_2.onreadystatechange=stateChanged_2;
		xmlHttp_2.open("GET",url,true);
		xmlHttp_2.send(null);
	}
	else {
		divid_1=tpl;
		xmlHttp_1=GetXmlHttpObject();
		xmlHttp_1.onreadystatechange=stateChanged_1;
		xmlHttp_1.open("GET",url,true);
		xmlHttp_1.send(null);
	}
}

function stateChanged_1() {
	if (xmlHttp_1.readyState==4) {
		if (document.getElementById(divid_1)) {
			document.getElementById(divid_1).innerHTML=xmlHttp_1.responseText;
		}
	}
}
function stateChanged_2() {
	if (xmlHttp_2.readyState==4) {
		if (document.getElementById(divid_2)) {
			document.getElementById(divid_2).innerHTML=xmlHttp_2.responseText;
		}
	}
}

function GetXmlHttpObject() {
	var xmlHttp=null;
	try	{  // Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e) {  // Internet Explorer
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e) {
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	if (xmlHttp==null) {
		alert ("Your browser does not support AJAX!");
		return;
	}
	return xmlHttp;
}

