// <!--

var currentschedlink;

function getscheduleteam(anchor, teamid, divid) {    
    document.getElementById('divPastStats').innerHTML = "";
	var response = competition.GetScheduleTeam(teamid, divid);
	checkAnchor(anchor);
	document.getElementById('ScheduleDiv').innerHTML = response.value;
}

function getschedulemonth(anchor, month, divid) {
    document.getElementById('divPastStats').innerHTML = "";
	var response = competition.GetScheduleMonth(month, divid);
	checkAnchor(anchor);
	document.getElementById('ScheduleDiv').innerHTML = response.value;
}

function getallschedule(anchor, divid) {
    document.getElementById('divPastStats').innerHTML = "";
	var response = competition.GetSchedule(divid);
	checkAnchor(anchor);
	document.getElementById('ScheduleDiv').innerHTML = response.value;
}			

var i=1;
var t;
function getstatistics(anchor,season_id,season_name,compDivId) {
    displayResponse("divPastStats", "Loading...");    
    var divScd=document.getElementById('ScheduleDiv');
    if(divScd!=null)
        divScd.innerHTML = "";	
    checkAnchor(anchor);
    
    t=setTimeout("Stats('"+season_id+"','"+season_name+"','"+compDivId+"')",10);
}
function Stats(season_id,season_name,compDivId)
{
    if(i!=0)
    {
        var response = competition.GetStatistics(season_id,season_name,compDivId);	
        document.getElementById('divPastStats').innerHTML = response.value;		
        i=0;
        clearTimeout(t);
    }    
    i++;
}

function checkAnchor(anchor) {
		if (currentschedlink != undefined) {
			currentschedlink.className ="";
		}
		currentschedlink = anchor;
		currentschedlink.className = "linkActive";
}
// -->

