// JavaScript Document
function showRoster(id) {
	if (id=="")
		{
		document.getElementById("roster_table").innerHTML="";
		return;
		} 
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function()
		{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
			document.getElementById("roster_table").innerHTML=xmlhttp.responseText;
			}
		}
	xmlhttp.open("GET", "php/getroster.php?id="+id, true);
	xmlhttp.send();
}

function showInfo(id) {
	if (id=="")
		{
		document.getElementById("teamdata_table").innerHTML="";
		return;
		} 
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function()
		{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
			document.getElementById("teamdata_table").innerHTML=xmlhttp.responseText;
			}
		}
	xmlhttp.open("GET", "php/getteamdata.php?id="+id, true);
	xmlhttp.send();
}

function showSchedule(id) {
	if (id=="")
		{
		document.getElementById("schedule_table").innerHTML="";
		return;
		} 
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function()
		{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
			document.getElementById("schedule_table").innerHTML=xmlhttp.responseText;
			}
		}
	xmlhttp.open("GET", "php/getschedule.php?id="+id, true);
	xmlhttp.send();
}

function showStanding(id) {
	if (id=="")
		{
		document.getElementById("standing_table").innerHTML="";
		return;
		} 
	if (window.XMLHttpRequest)
		{// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
		}
	else
		{// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	xmlhttp.onreadystatechange=function()
		{
		if (xmlhttp.readyState==4 && xmlhttp.status==200)
			{
			document.getElementById("standing_table").innerHTML=xmlhttp.responseText;
			}
		}
	xmlhttp.open("GET", "php/getstanding.php?id="+id, true);
	xmlhttp.send();
}
