// These functions courtesy GoobNet Football, http://football.goobnet.net/
// Nathan S Brown, 2001-7
// Please use or modify these functions, but give me credit.
// Have a nice day...

var imgarr=new Array();
function loadimg(i) {
	var newimg=new Image;	newimg.src="http://football.goobnet.net/_images/"+i;
	imgarr[imgarr.length]=newimg;
}

if (document.images) {
	loadimg("btnrowopen_0.gif");	loadimg("btnrowopen_1.gif");
	loadimg("btntreeopen_0.gif");	loadimg("btntreeopen_1.gif");
}

// Switches a dynatree row on or off. def indicates the default setting.
function toggletreerow(rid,def) {
    togglerow("subtree"+rid);
    var i=(document.getElementById("subtree"+rid).style.display=="none") ? "0" : "1";
    if (document.images) document.getElementById("btntreeopen"+rid).src="http://football.goobnet.net/_images/btntreeopen_"+i+".gif";
}

// Switches a row on or off.
function togglerow(row) {
    var disp=(navigator.userAgent.indexOf("MSIE")==-1) ? "table-row" : "block";
    var t=document.getElementById(row).style.display;
    document.getElementById(row).style.display=(t=="none") ? disp : "none";
}

// Switches a matchnote row on or off.
function togglematchnote(mid) {
    togglerow("matchnotes"+mid);
    var i=(document.getElementById("matchnotes"+mid).style.display=="none") ? "0" : "1";
    if (document.images) document.getElementById("btnnoteopen"+mid).src="http://football.goobnet.net/_images/btnrowopen_"+i+".gif";
}

function gotodate(path) {
	var datelist=document.getElementById("matchdatelist");
	var d=datelist.options[datelist.selectedIndex].value;
	window.location.href="http://football.goobnet.net"+path+d+"/";
}